Search completed in 1.74 seconds.
2051 results for "contains":
Your results are loading. Please wait...
Selection.containsNode() - Web APIs
the selection.containsnode() method indicates whether a specfied node is part of the selection.
... syntax sel.containsnode(node, partialcontainment) parameters node the node that is being looked for in the selection.
... partialcontainment optional when true, containsnode() returns true when a part of the node is part of the selection.
...And 3 more matches
DOMTokenList.contains() - Web APIs
the contains() method of the domtokenlist interface returns a boolean — true if the underlying list contains the given token, otherwise false.
... syntax tokenlist.contains(token); parameters token a domstring representing the token you want to check for the existance of in the list.
... return value a boolean, which is true if the calling list contains token, otherwise false.
... first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let result = classes.contains("c"); if (result) { span.textcontent = "the classlist contains 'c'"; } else { span.textcontent = "the classlist does not contain 'c'"; } the output looks like this: specifications specification status comment domthe definition of 'contains()' in that specification.
Node.contains() - Web APIs
WebAPINodecontains
the node.contains() method returns a boolean value indicating whether a node is a descendant of a given node, i.e.
... syntax node.contains( othernode ) example this function checks to see if an element is in the page's body.
... as contains is inclusive and determining if the body contains itself isn't the intention of isinpage this case explicitly returns false.
...false : document.body.contains(node); } specifications specification status comment domthe definition of 'node.contains()' in that specification.
contains - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the contains function determines whether the first argument string contains the second argument string and returns boolean true or false.
... syntax contains(haystack, needle) arguments haystack the string to be searched needle the string to look for as a substring of haystack returns true if haystack contains needle.
contains - Archive of obsolete content
« xul reference home contains( item ) return type: boolean returns true if the menulist contains the specified menuitem as one of its items.
contains
this content is now available at nsifile.contains().
Index - Web APIs
WebAPIIndex
188 audiotrack.id api, audio, audio track, audiotrack, html dom, interface, media, property, read-only, reference, id, track the id property contains a string which uniquely identifies the track represented by the audiotrack.
... 189 audiotrack.kind api, audio, audio track, audiotrack, html dom, media, property, read-only, reference, id, track the kind property contains a string indicating the category of audio contained in the audiotrack.
... 254 basiccardrequest.supportednetworks api, basic card payment, basiccardrequest, experimental, payment request, payment request api, property, reference, supportednetworks the supportednetworks property of the basiccardrequest dictionary contains an array of domstrings representing the card networks that the retailer supports (e.g.
...And 145 more matches
Source code directories overview - Archive of obsolete content
this document contains material for seamonkey, firefox, and toolkit.
... base contains the basic (core) functionality for the module.
... base contains all the source code that cannot be categorized into a submodule.
...And 84 more matches
Index - Archive of obsolete content
140 package.json commonjs, jpm, sdk, add-on, 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.
... 169 using third-party modules (jpm) addon-sdk, jpm first, while in the root of your add-on, install the package that contains the modules you want to use: 170 bootstrapped extensions add-ons, extensions, firefox 4, gecko 2.0, guide, localization no summary!
...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.
...And 38 more matches
Index
a certificate contains lots of other details; for example, it contains a signature by a third party that expresses trust in the ownership relationship for the certificate.
...storage consists of multiple files: a key database file, which contains your secret keys, and a certificate database file which contains the public portion of your own certificates, the certificates of peers or cas, and a list of trust decisions (such as to not trust a built-in ca, or to explicitly trust other cas).
...a third file contains the list of external pkcs#11 modules that have been registered to be used by nss.
...And 21 more matches
Index
MozillaTechXPCOMIndex
90 weak reference xpcom in xpcom, a weak reference is a special object that contains a pointer to an xpcom object, but doesnot keep that object alive.
...contains the sum of what's needed to support iaccessible as well as atk's generic accessibility objects.
... 268 getchildatpoint this method returns an accessible child which contains the coordinate at (x, y) in screen pixels.
...And 14 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
465 contains xul methods, xul reference no summary!
...a query contains instructions for how to retrieve a set of data from the datasource.
...for rdf and xml, the query contains a set of instructions for navigating through the rdf graph or xml document tree.
...And 13 more matches
browser - Archive of obsolete content
it is similar to an iframe except that it holds a page history and contains additional methods to manipulate the currently displayed page.
... contentdocument type: document this read-only property contains the document object in the element.
... contentprincipal type: nsiprincipal this read-only property contains the principal for the content loaded in the browser, which provides security context information.
...And 12 more matches
nsIPromptService
acheckstate contains the initial checked state of the checkbox when this method is called and the final checked state after this method returns.
... acheckstate contains the initial checked state of the checkbox when this method is called and the final checked state after this method returns.
... acheckstate contains the initial checked state of the checkbox when this method is called and the final checked state after this method returns.
...And 12 more matches
tabbrowser - Archive of obsolete content
contentdocument type: document this read-only property contains the document object in the element.
... contenttitle type: string this read-only property contains the title of the document object in the browser.
... contentvieweredit type: nsicontentvieweredit this read-only property contains the nsicontentvieweredit which handles clipboard operations on the document.
...And 11 more matches
HTTP Index - HTTP
WebHTTPIndex
63 age caching, http, response, header the age header contains the time in seconds the object has been in a proxy cache.
... 66 authorization http, http header, reference, request header, header the http authorization request header contains the credentials to authenticate a user agent with a server, usually after the server has responded with a 401 unauthorized status and the www-authenticate header.
... 109 cookie cookies, http, reference, header, request the cookie http request header contains stored http cookies previously sent by the server with the set-cookie header.
...And 11 more matches
Index - HTTP
WebHTTPHeadersIndex
15 age caching, http, response, header the age header contains the time in seconds the object has been in a proxy cache.
... 18 authorization http, http header, reference, request header, header the http authorization request header contains the credentials to authenticate a user agent with a server, usually after the server has responded with a 401 unauthorized status and the www-authenticate header.
... 54 cookie cookies, http, reference, header, request the cookie http request header contains stored http cookies previously sent by the server with the set-cookie header.
...And 10 more matches
jspage - Archive of obsolete content
ll(e,this[b],b,this);}return c;},some:function(c,d){for(var b=0,a=this.length;b<a;b++){if(c.call(d,this[b],b,this)){return true; }}return false;},associate:function(c){var d={},b=math.min(this.length,c.length);for(var a=0;a<b;a++){d[c[a]]=this[a];}return d;},link:function(c){var a={}; for(var e=0,b=this.length;e<b;e++){for(var d in c){if(c[d](this[e])){a[d]=this[e];delete c[d];break;}}}return a;},contains:function(a,b){return this.indexof(a,b)!=-1; },extend:function(c){for(var b=0,a=c.length;b<a;b++){this.push(c[b]);}return this;},getlast:function(){return(this.length)?this[this.length-1]:null;},getrandom:function(){return(this.length)?this[$random(0,this.length-1)]:null; },include:function(a){if(!this.contains(a)){this.push(a);}return this;},combine:function(c){for(var b=0,a=c.length;b<a;b++){thi...
...);}});number.alias("times","each"); (function(b){var a={};b.each(function(c){if(!number[c]){a[c]=function(){return math[c].apply(null,[this].concat($a(arguments)));};}});number.implement(a); })(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]);string.implement({test:function(a,b){return((typeof a=="string")?new regexp(a,b):a).test(this); },contains:function(a,b){return(b)?(b+this+b).indexof(b+a+b)>-1:this.indexof(a)>-1;},trim:function(){return this.replace(/^\s+|\s+$/g,"");},clean:function(){return this.replace(/\s+/g," ").trim(); },camelcase:function(){return this.replace(/-\d/g,function(a){return a.charat(1).touppercase();});},hyphenate:function(){return this.replace(/[a-z]/g,function(a){return("-"+a.charat(0).tolowercase()); });},capital...
...on(b){a.push(b);});return a;},toquerystring:function(a){var b=[]; hash.each(this,function(f,e){if(a){e=a+"["+e+"]";}var d;switch($type(f)){case"object":d=hash.toquerystring(f,e);break;case"array":var c={};f.each(function(h,g){c[g]=h; });d=hash.toquerystring(c,e);break;default:d=e+"="+encodeuricomponent(f);}if(f!=undefined){b.push(d);}});return b.join("&");}});hash.alias({keyof:"indexof",hasvalue:"contains"}); var event=new native({name:"event",initialize:function(a,f){f=f||window;var k=f.document;a=a||f.event;if(a.$extended){return a;}this.$extended=true;var j=a.type; var g=a.target||a.srcelement;while(g&&g.nodetype==3){g=g.parentnode;}if(j.test(/key/)){var b=a.which||a.keycode;var m=event.keys.keyof(b);if(j=="keydown"){var d=b-111; if(d>0&&d<13){m="f"+d;}}m=m||string.fromcharcode(b).tolowercase()...
...And 9 more matches
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
the attribute contains a single “language tag” in the format defined in tags for identifying languages (bcp47).
... 27 part global attributes, html, reference, part the part global attribute contains a space-separated list of the part names of the element.
... 30 style global attributes, html, reference the style global attribute contains css styling declarations to be applied to the element.
...And 9 more matches
XUL Structure - Archive of obsolete content
content packages the name of the jar file might describe what it contains, but you can't be sure unless you view its contents.
...if you extract the files in browser.jar, you will find that it contains a directory structure much like the following: content browser browser.xul browser.js -- other browser xul and js files goes here -- bookmarks -- bookmarks files go here -- preferences -- preferences files go here -- .
... the content/browser directory contains a number of files with .xul and .js extensions.
...And 8 more matches
CSSCounterStyleRule - Web APIs
csscounterstylerule.name is a domstring object that contains the serialization of the <counter-style-name> defined for the associated rule.
... csscounterstylerule.system is a domstring object that contains the serialization of the system descriptor defined for the associated rule.
... csscounterstylerule.symbols is a domstring object that contains the serialization of the symbols descriptor defined for the associated rule.
...And 8 more matches
Getting Started - Archive of obsolete content
skin skin simply contains another directory, classic which holds all the good stuff.
... skin\classic classic contains the following directories.
... skin\classic\communicator communicator contains all the toolbar icons, as well as the icons for the bookmark manager and the preferences window.
...And 7 more matches
HTTP headers - HTTP
WebHTTPHeaders
authorization contains the credentials to authenticate a user-agent with a server.
... proxy-authorization contains the credentials to authenticate a user agent with a proxy server.
... max-forwards cookies cookie contains stored http cookies previously sent by the server with the set-cookie header.
...And 7 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.
... examples <em:developer>jane doe</em:developer> <em:developer>koos van der merwe</em:developer> hasembeddedwebextension if present and given the value "true", this indicates that this add-on contains an embedded webextension.
... <em:optionstype>3</em:optionstype> <em:optionsurl>chrome://myaddon/content/options.html</em:optionsurl> this section here contains an example of localized html page as an option panel in a new tab: bootstrapped extensions :: localization (l10n) (example linked to is: github :: l10n-html-options).
...And 6 more matches
Working with JSON - Learn web development
members contains an array populated by objects.
... other notes json is purely a data format — it contains only properties, no methods.
...the latter contains some simple css to style our page, while the former contains some very simple body html: <header> </header> <section> </section> plus a <script> element to contain the javascript code we will be writing in this exercise.
...And 6 more matches
Garbage collection
a chunk is 1mb and contains arenas, padding, the mark bitmap (chunkbitmap), a bitmap of decommitted arenas, and a chunk header (chunkinfo).
... the chunkinfo contains a list of unallocated arenas, starting at chunkinfo::freearenashead and linked through arenaheader::next.
... the chunkinfo also contains some basic stats, such as the number of free arenas.
...And 6 more matches
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
document metadata metadata contains information about the page.
... <head> the html <head> element contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets.
... <style> the html <style> element contains style information for a document, or part of a document.
...And 6 more matches
Elements - Archive of obsolete content
bindings contains zero or more binding elements as children.
...hello.xml should reside in the same directory which contains helloworld.html.
... if the children tag contains content itself, that content will become the default content.
...And 5 more matches
NPAPI plugin reference - Archive of obsolete content
np_port contains information required by the window field of an npwindow structure.
... npanycallbackstruct contains information required during embedded mode printing.
... npembedprint substructure of npprint that contains platform-specific information used during embedded mode printing.
...And 5 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
12 accessibility tree (aom) aom, accessibility, dom, glossary, reference the accessibility tree, or accessibility object model (aom), contains accessibility-related information for most html elements.
... 173 global scope codingscripting, glossary, needscontent in a programming environment, the global scope is the scope that contains, and is visible in, all other scopes.
... 202 head codingscripting, glossary, html, head, metadata 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.
...And 5 more matches
SpiderMonkey Internals
in addition to the interpreter, spidermonkey contains a just-in-time (jit) compiler, a garbage collector, code implementing the basic behavior of javascript values, a standard library implementing ecma 262-5.1 §15 with various extensions, and a few public apis.
... compiler the compiler consumes javascript source code and produces a script which contains bytecode, source annotations, and a pool of string, number, and identifier literals.
... the script also contains objects, including any functions defined in the source code, each of which has its own, nested script.
...And 5 more matches
The Places database
it contains the host url, frequency of access, if typed or not, and it's prefix (https://, ftp://, etc).
...it contains the date, referrer, and other information specific to that visit.
... it contains a reference to the moz_places table which contains the url and other global statistics.
...And 5 more matches
Drawing and Event Handling - Plugins
this structure contains information about coordinate position, size, the state of the plug-in (windowed or windowless), and some platform-specific information.
...in this case, platformprint->embedprint.window contains the window in which the plug-in should print.
... the value parameter contains the name of the plug-in.
...And 5 more matches
Structures - Plugins
structure summary npanycallbackstruct contains information required during embedded mode printing.
... npembedprint substructure of npprint that contains platform-specific information used during embedded mode printing.
... npfullprint substructure of npprint that contains platform-specific information used during full-page mode printing.
...And 5 more matches
Request - Web APIs
WebAPIRequest
properties request.cache read only contains the cache mode of the request (e.g., default, reload, no-cache).
... request.context read only contains the context of the request (e.g., audio, image, iframe, etc.) request.credentials read only contains the credentials of the request (e.g., omit, same-origin, include).
... request.headers read only contains the associated headers object of the request.
...And 5 more matches
MMgc - Archive of obsolete content
another way to think about it: unmanaged memory is c++ operators new and delete managed memory is c++ operator new, with optional delete mmgc contains a page allocator called gcheap, which allocates large blocks (megabytes) of memory from the system and doles out 4kb pages to the unmanaged memory allocator (fixedmalloc) and the managed memory allocator (gc).
.../** * flags to be passed as second argument to alloc */ enum allocflags { kzero=1, kcontainspointers=2, kfinalize=4, krcobject=8 }; kzero zeros out the memory.
... otherwise, the memory contains undefined values.
...And 4 more matches
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
note: starting in gecko 2.0, the new omni.jar file contains the skin, among other resources.
... skin skin simply contains another directory, classic which holds all the good stuff.
... skin\classic classic contains the following directories.
...And 4 more matches
Complete - Archive of obsolete content
the xpi contains: install.rdf information about the extension chrome.manifest registration data for firefox etc.
... the xul toolbarbutton tag contains an entity &allcustom.alert.1;.
...in the allcustom directory, the file allcustom.dtd contains the translated strings.
...And 4 more matches
editor - Archive of obsolete content
contentdocument type: document this read-only property contains the document object in the element.
... contentwindow type: todo use the contentwindow.wrappedjsobject to obtain a dom(html) window object docshell type: nsidocshell this read-only property contains the nsidocshell object for the document.
... webbrowserfind type: nsiwebbrowserfind this read-only property contains an nsiwebbrowserfind object which can be used to search for text in the document.
...And 4 more matches
Mozilla XForms User Interface - Archive of obsolete content
ui common the ui common attribute set (see the spec) contains the attributes that are available for the xforms elements that are used to build the user interface presentation in a form.
...this section contains a short description of each xforms element and its representation.
...form controls module this section contains a short description for each form control element.
...And 4 more matches
Client-side storage - Learn web development
now type these lines into your javascript console: let myname = localstorage.getitem('name'); myname upon typing in the second line, you should see that the myname variable now contains the value of the name data item.
... you can find the example html at personal-greeting.html — this contains a simple website with a header, content, and footer, and a form for entering your name.
...you'll see that the html is pretty simple: a web site with a header and footer, as well as a main content area that contains a place to display notes, and a form for entering new notes into the database.
...And 4 more matches
A first splash into JavaScript - Learn web development
the final block chained onto the end of this code (the else { }) contains code that is only run if neither of the other two tests returns true (i.e.
...for now, we'll just briefly discuss the built-in objects that your browser contains, which allow you to do lots of useful things.
... because guessfield now contains a reference to an <input> element, it now has access to a number of properties (basically variables stored inside objects, some of which can't have their values changed) and methods (basically functions stored inside objects).
...And 4 more matches
Client-Server Overview - Learn web development
the response contains an http response status code indicating whether or not the request succeeded (e.g.
... the request each line of the request contains information about it.
... the first part is called the header, and contains useful information about the request, in the same way that an html head contains useful information about an html document (but not the actual content itself, which is in the body): get https://developer.mozilla.org/search?q=client+server+overview&topic=apps&topic=html&topic=css&topic=js&topic=api&topic=webdev http/1.1 host: developer.mozilla.org connection: keep-alive pragma: no-cache cache-control: no-cache upgrade-insecure-requests: 1 user-agent: mozilla/5.0 (windows nt 10.0; wow64) applewebkit/537.36 (khtml, like gecko) chrome/52.0.2743.116 safari/537.36 accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 referer: https://developer.mozilla.org/ accept-encoding: gzip, deflate, sdch, br accept-charset: iso-8859-1,...
...And 4 more matches
NSS tools : certutil
bracket the issuer string with quotation marks if it contains spaces.
...bracket the nickname string with quotation marks if it contains spaces.
...bracket the output-file string with quotation marks if it contains spaces.
...And 4 more matches
certutil
bracket the issuer string with quotation marks if it contains spaces.
...bracket the nickname string with quotation marks if it contains spaces.
...bracket the output-file string with quotation marks if it contains spaces.
...And 4 more matches
Rhino Debugger
if the current line in the script contains a function call control will return to the debugger upon entry into the function.
... moving up and down the stack the lower-left (dockable) pane in the debugger main window contains a combo-box labeled "context:" which displays the current stack of the executing script.
... setting and clearing breakpoints the main desktop of the debugger contains file windows which display the contents of each script you are debugging.
...And 4 more matches
nsIMsgHeaderParser
sses(in wstring line); void removeduplicateaddresses(in string addrs, in string other_addrs, in prbool removealiasestome, out string newaddress); string unquotephraseoraddr(in string line, in boolean preserveintegrity); wstring unquotephraseoraddrwstring(in wstring line, in boolean preserveintegrity); methods extractheaderaddressmailboxes() given a string which contains a list of header addresses, returns a comma-separated list of just the 'mailbox' portions.
... exceptions thrown missing exception missing description native code only!extractheaderaddressnames given a string which contains a list of header addresses, returns a comma-separated list of just the 'user name' portions.
... exceptions thrown missing exception missing description native code only!parseheaderaddresses given a string which contains a list of header addresses, parses it into their component names and mailboxes.
...And 4 more matches
XPCOM reference
nsmsgnavigationtypethe nsmsgnavigationtype interface contains constants used for message navigation in thunderbird.
... for example to move forward a message, you would call:nsmsgsearchopvaluedefined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl nsmsgviewcommandcheckstatethe nsmsgviewcommandcheckstate interface contains constants used for command status in thunderbird.
... it is (as far as i can tell) not currently used anywhere in thunderbird.nsmsgviewcommandtypethe nsmsgviewcommandtype interface contains constants used for commands in thunderbird.
...And 4 more matches
BasicCardResponse - Web APIs
properties basiccardresponse.cardnumber read only secure context contains the number of the card used to make the payment.
... basiccardresponse.cardholdername read only secure context optional contains the cardholder name of the card used to make the payment.
... basiccardresponse.cardsecuritycode read only secure context optional contains the security code of the card used to make the payment.
...And 4 more matches
XMLHttpRequestEventTarget - Web APIs
" y="1" width="250" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="276" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmlhttprequesteventtarget</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties xmlhttprequesteventtarget.onabort contains the function to call when a request is aborted and the abort event is received by this object.
... xmlhttprequesteventtarget.onerror contains the function to call when a request encounters an error and the error event is received by this object.
... xmlhttprequesteventtarget.onload contains the function to call when an http request returns after successfully fetching content and the load event is received by this object.
...And 4 more matches
Content categories - Developer guides
phrasing content phrasing content defines the text and the mark-up it contains.
... a few other elements belong to this category, but only if a specific condition is fulfilled: <a>, if it contains only phrasing content <area>, if it is a descendant of a <map> element <del>, if it contains only phrasing content <ins>, if it contains only phrasing content <link>, if the itemprop attribute is present <map>, if it contains only phrasing content <meta>, if the itemprop attribute is present embedded content embedded content imports another resource or inserts content from another mark-u...
... <button> <fieldset> <input> <keygen> <label> <meter> <object> <output> <progress> <select> <textarea> this category contains several sub-categories: listed elements that are listed in the form.elements and fieldset.elements idl collections.
...And 4 more matches
widget - Archive of obsolete content
for example, this widget contains an image, so it looks like a simple icon: require("sdk/widget").widget({ id: "mozilla-icon", label: "my mozilla widget", contenturl: "http://www.mozilla.org/favicon.ico" }); you can make contenturl point to an html or icon file which you have packaged inside your add-on.
... 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 }); widgets are quite small by default, so this example used the width property to grow it in order to show all the text.
... setting the contenturl property will break the channel of communication between this widget and any content scripts it contains.
...And 3 more matches
ui/frame - Archive of obsolete content
this is passed an event object which always contains a source property, which has a postmessage() function modeled after window.postmessage().
...this is passed an event object which always contains a source property, which has a postmessage() function modeled after window.postmessage().
... arguments event : this contains two properties: source, which defines a postmessage() function which you can use to send messages back to this particular frame instance.
...And 3 more matches
Multiple Rules - Archive of obsolete content
rl.org/dc/elements/1.1/title" object="?title"/> </query> <rule> <where subject="?title" rel="equals" value="canal"/> <action> <button uri="?photo" image="?photo" label="view" orient="vertical"/> </action> </rule> <rule> <action> <image uri="?photo" src="?photo"/> </action> </rule> </template> </hbox> this template contains a query with two rules.
...the first rule contains a new element, where which is used to define a condition.
...an anothermatch only negative values with one rule, positive values with another greatermatch if a number is greater than anotherdisplay values greater 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> <l...
...And 3 more matches
XForms Custom Controls - Archive of obsolete content
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.
...in mozilla, every bound xforms control has a typelist attribute of moztype namespace that contains the inheritance chain of data types that we detected.
...controlfile-xhtml.xml contains the xhtml implementation bindings for the control and controlfile-xul.xml contains the implementation bindings for when this control is hosted in a xul document.
...And 3 more matches
Test your skills: Conditionals - Learn web development
conditionals 1 in this task you are provided with two variables: season — contains a string that says what the current season is.
... we want you to create a conditional that checks whether season contains the string "summer", and if so assigns a string to response that gives the user an appropriate message about the season.
... to finish off, you should then add another test that checks whether season contains the string "winter", and again assigns an appropriate string to response.
...And 3 more matches
Getting started with Svelte - Learn web development
��─ node_modules ├── public │ ├── favicon.ico │ ├── index.html │ ├── global.css │ └── build │ ├── bundle.css │ ├── bundle.css.map │ ├── bundle.js │ └── bundle.js.map └── src ├── app.svelte └── main.js the contents are as follows: package.json and package-lock.json: contains information about the project that node.js/npm uses to keep it organized.
... scripts: contains setup scripts as required.
... public: this directory contains all the files that will be published in production.
...And 3 more matches
Multiprocess on Windows
this file contains the typelib metadata.
...if your interface contains two functions with those annotations, then you will need to add two arraydata entries.
... arraydata contains seven fields: iid miid; ulong mmethodindex; ulong marrayparamindex; vartype marrayparamtype; iid marrayparamiid; ulong mlengthparamindex; flag mflag; miid is the uuid of the interface owning the function.
...And 3 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.
...this dictionary contains the uppercase variables directly assigned to and the special variables indirectly assigned to by calling functions exported to the execution environment.
...mozbuild is the name of our python package that contains most of the code for defining how the build system works.
...And 3 more matches
The Firefox codebase: CSS Guidelines
this document contains guidelines defining how css inside the firefox codebase should be written, it is notably relevant for firefox front-end engineers.
...the overriding css section contains more information about this.
...sometimes, when copy-pasting older code, it happens that the code in question contains unnecessary overrides.
...And 3 more matches
NSS sources building testing
find the directory that contains the highest version number.
...the subdirectories dbm, security/dbm, security/coreconf, security/nss were part of the nss sources.) the nss directory contains the following important subdirectories: nss/coreconf contains knowledge for cross platform building.
... nss/lib contains all the library code that is used to create the runtime libraries used by applications.
...And 3 more matches
nss tech note5
note: this document contains code snippets that focus on essential aspects of the task and often do not illustrate all the cleanup that needs to be done.
... pk11context* digestcontext = pk11_createdigestcontext(sec_oid_md5); <big>digest the data</big> <big>secstatus s = pk11_digestbegin(digestcontext); s = pk11_digestop(digestcontext, data, sizeof data); s = pk11_digestfinal(digestcontext, digest, &len, sizeof digest); /* now, digest contains the 'digest', and len contains the length of the digest */</big> clean up pk11_destroycontext(digestcontext, pr_true); you can also look at a sample program illustrating this hash / digest with secret key included 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 ...
... &param); <big>digest the data</big>, providing the key <big>secstatus s = pk11_digestbegin(digestcontext); s = pk11_digestkey(digestcontext, symkey); s = pk11_digestop(digestcontext, data, sizeof data); s = pk11_digestfinal(digestcontext, digest, &len, sizeof digest); /* now, digest contains the 'digest', and len contains the length of the digest */</big> clean up pk11_destroycontext(digestcontext, pr_true); pk11_freesymkey(symkey); pk11_freeslot(slot); you can also look at a sample program illustrating this hmac 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 da...
...And 3 more matches
NSS tools : modutil
enclose this list in quotation marks if it contains spaces.
...enclose this list in quotation marks if it contains spaces.
... installing a cryptographic module from a jar file pkcs #11 modules can also be loaded using a jar file, which contains all of the required libraries and an installation script that describes how to install the module.
...And 3 more matches
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
enclose this list in quotation marks if it contains spaces.
...enclose this list in quotation marks if it contains spaces.
... installing a cryptographic module from a jar file pkcs #11 modules can also be loaded using a jar file, which contains all of the required libraries and an installation script that describes how to install the module.
...And 3 more matches
Hacking Tips
the backtrace contains in the following order, the stack depth, the interpreter frame pointer (see js/src/vm/stack.h, stackframe class) or (nil) if compiled with ionmonkey, the file and line number of the call location and under parentheses, the jsscript pointer and the jsbytecode pointer (pc) executed.
... ionflags contains the names of each channel separated by commas.
... compilation logs and spew can be filtered with the ionfilter environment variable which contains locations as output in other spew channels.
...And 3 more matches
Index
in contrast, all native and host objects have a jsobjectmap at obj->map, which may be shared among a number of objects, and which contains the jsobjectops *ops pointer used to dispatch object operations from api calls.
...typically users of this function set vp to point to v, so that if conversion is successful, v now contains the converted value.
...name is the property name to assign to obj to hold the new object, and flags contains the property attributes to set for the newly created property.
...And 3 more matches
Bytecode Descriptions
(a jsop::enditer is always emitted at the end of the loop, and extra copies are emitted on "exit slides", where a break, continue, or return statement exits the loop.) typically a single try note entry marks the contiguous chunk of bytecode from the instruction after jsop::iter to jsop::enditer (inclusive); but if that range contains any instructions on exit slides, after a jsop::enditer, then those must be correctly noted as outside the loop.
...this instruction is used when an array literal contains a spreadelement.
...this walks the run-time environment chain looking for the environment record that contains the function.
...And 3 more matches
JIT Optimization Strategies
this page contains only historic information about this feature.
... call a function using f.apply(obj, arguments) if the function contains any use of the arguments object that falls out of the cases defined above, this optimization will be suppressed.
... call a function using f.apply(obj, arguments) if the function contains any use of the arguments object that falls out of the cases defined above, this optimization will be suppressed.
...And 3 more matches
nsIAccessibleRetrieval
apresshell the presentation shell which contains layout info for the dom node.
... apresshell the presentation shell which contains layout info for the dom node.
... ashell the presentation shell which contains layout info for the dom node.
...And 3 more matches
nsIAccessibleRole
role_window 9 represents the window frame, which contains child objects such as a title bar, client, and other objects contained in a window.
...there is not always a parent-child relationship between the grouping object and the objects it contains.
... role_table 24 represents a table that contains rows and columns of cells, and optionally, row headers and column headers.
...And 3 more matches
nsIFile
in addition, the native form cannot deal with files whose name contains characters outside the default system code page on windows.
... void appendrelativenativepath(in acstring relativefilepath); void appendrelativepath(in astring relativefilepath); nsifile clone(); boolean contains(in nsifile infile); void copyto(in nsifile newparentdir, in astring newname); void copytofollowinglinks(in nsifile newparentdir, in astring newname); void copytofollowinglinksnative(in nsifile newparentdir, in acstring newname); native code only!
... exceptions thrown ns_error_file_unrecognized_path indicates that anode incorrectly contains a path separator character.
...And 3 more matches
DevTools API - Firefox Developer Tools
a toolbox (and all the tools it contains) is linked to a target, which is the object the tools are debugging.
... parameters: tooldefinition {tooldefinition} - an object that contains information about the tool.
... parameters: themedefinition {themedefinition} - an object that contains information about the theme.
...And 3 more matches
RTCStatsReport - Web APIs
this statistics report contains a mapping of statistic category string names to objects containing the corresponding statistics data.
... type a domstring indicating the type of statistics the object contains, taken from the enum type rtcstatstype.
... csrc an rtccontributingsourcestats object which contains statistics related to a contributing source (csrc) that contributed to an inbound rtp stream.
...And 3 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 3 more matches
ARIA: grid role - Accessibility
the grid role is for a widget that contains one or more rows of cells.
... <button id="1b" tabindex="-1">1b</button> </td> <!-- more columns --> </tr> <tr> <th scope="row">aisle 2</th> <td tabindex="-1"> <button id="2a" tabindex="-1">2a</button> </td> <td tabindex="-1"> <button id="2b" tabindex="-1">2b</button> </td> <!-- more columns --> </tr> </tbody> </table> description a grid widget contains one or more rows with one or more cells of thematically related interactive content.
... home moves focus to the first cell in the row that contains focus.
...And 3 more matches
Setting up adaptive streaming media sources - Developer guides
once encoded your file structure may look something like this: play list -> /segments/news.mp4.mpd main segment folder -> /segments/main/ 100 kbps segment folder -> /segments/main/news100 contains (1.m4s, 2.m4s, 3.m4s ...
... ) 200 kbps segment folder -> /segments/main/news200 contains (1.m4s, 2.m4s, 3.m4s ...
... ) 300 kbps segment folder -> /segments/main/news300 contains (1.m4s, 2.m4s, 3.m4s ...
...And 3 more matches
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
WebHTMLElementtd
the html <td> element defines a cell of a table that contains data.
... colspan this attribute contains a non-negative integer value that indicates for how many columns the cell extends.
... headers this attribute contains a list of space-separated strings, each corresponding to the id attribute of the <th> elements that apply to this element.
...And 3 more matches
A typical HTTP session - HTTP
WebHTTPSession
the url of a page to fetch contains both the domain name, and the port number, though the latter can be omitted if it is 80.
...a client request consists of text directives, separated by crlf (carriage return, followed by line feed), divided into three blocks: the first line contains a request method followed by its parameters: the path of the document, i.e.
... the final block is a data block, which contains the optional data.
...And 3 more matches
Map - JavaScript
it only contains what is explicitly put into it.
... an object has a prototype, so it contains default keys that could collide with your own keys if you're not careful.
... iteration methods map.prototype[@@iterator]() returns a new iterator object that contains an array of [key, value] for each element in the map object in insertion order.
...And 3 more matches
Porting the Library Detector - Archive of obsolete content
it adds a tooltip to each icon, which contains the library name and version.
... how the library detector works all the work is done inside a single file, librarydetector.xul this contains: a xul overlay a script the xul overlay adds a box element to the browser's status bar: the script does everything else.
...each test object contains a function called test(): if the function finds the library, it defines various additional properties for the test object, such as a version property containing the library version.
...And 2 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
public interfaces the public/ directory contains any interfaces that need to be accessed by other modules.
...topsrcdir = @top_srcdir@ srcdir = @srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk module = myextension xpidl_module = myextension xpi_name = myextension exports = \ myheader.h \ $(null) xpidlsrcs = \ myifirstcomponent.idl \ myisecondcomponent.idl \ $(null) include $(topsrcdir)/config/rules.mk xpidl_module is the name of the generated xpt file that contains type information about your idl interfaces.
...it contains stubs for the component .h and .cpp files that you can copy and paste into your implementation files.
...And 2 more matches
Enhanced Extension Installation - Archive of obsolete content
datasource structure the extension manager implements a rdf datasource which contains a composite of the two xml/rdf datasources at the two install locations.
... installation initiation when an item is installed from the web, xpinstall is invoked and it calls into the extension system when it discovers that the xpi file contains an install.rdf manifest.
... extension metadata the following files are now used to hold metadata: <profile>/extensions.ini -active items this file contains a list of active extension directories (i.e.
...And 2 more matches
Block and Line Layout Cheat Sheet - Archive of obsolete content
nsinlineframe mflags ns_inline_frame_contains_percent_aware_child this flag is set if the inline frame has any children that have a percentage value set (via the style context) for the width or height of the content area, padding, border, or margin.
... brs_isinlineincrreflow this flag is set in nsblockframe::reflow() if we detect that we're incrementally reflowing a linebox that contains inline frames.
...(why?) brs_applytopmargin this flag is set if the top margin should be considered when placing a linebox that contains a block frame.
...And 2 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
dom differences the document object model (dom) is the tree structure that contains the document elements.
...the main issue here is when javascript, embedded inside an html document (thus, inside an <script> tag), generates html that contains a <script> tag.
...often when xml generates, it contains white spaces between xml nodes.
...And 2 more matches
Venkman Introduction - Archive of obsolete content
the toolbar contains icons for stop, continue, step over, step into, step out, profile, and pretty print commands.
...the type column contains a textual description of the type of the object.
...any loaded file which matches the file pattern, and contains an executable line at the requested line number will have a breakpoint set.
...And 2 more matches
Examples - Archive of obsolete content
this page contains the source code of the examples related to the "properly using css and javascript in xhtml documents" article.
... </p> <p> this document contains inline css rules contained in a <code>style</code> element and surrounded by a comment and javascript contained in a <code>script</code> element and surrounded by a comment.
... </p> <p> this document contains inline css rules contained in a <code>style</code> element and surrounded by a sgml comment.
...And 2 more matches
WAI-ARIA basics - Learn web development
the spec also contains a list of all the properties and states, with links to further information — see definitions of states and properties (all aria-* attributes).
...for example, voiceover gives you the following: on the <header> element — "banner, 2 items" (it contains a heading and the <nav>).
... on the <nav> element — "navigation 2 items" (it contains a list and a form).
...And 2 more matches
Document and website structure - Learn web development
main content: a big area in the center that contains most of the unique content of a given webpage, for example, the video you want to watch, or the main story you're reading, or the map you want to view, or the news headlines, etc.
... footer: a strip across the bottom of the page that generally contains fine print, copyright notices, or contact info.
...--> <form> <input type="search" name="q" placeholder="search query"> <input type="submit" value="go!"> </form> </nav> <!-- here is our page's main content --> <main> <!-- it contains an article --> <article> <h2>article heading</h2> <p>lorem ipsum dolor sit amet, consectetur adipisicing elit.
...And 2 more matches
Video and Audio APIs - Learn web development
the <video> element contains two <source> elements so that different formats can be loaded depending on the browser viewing the site.
...in the case of our play button, data-icon contains a capital "p".
...us ones: rwd.addeventlistener('click', mediabackward); fwd.addeventlistener('click', mediaforward); now on to the event handler functions — add the following code below your previous functions to define mediabackward() and mediaforward(): let intervalfwd; let intervalrwd; function mediabackward() { clearinterval(intervalfwd); fwd.classlist.remove('active'); if(rwd.classlist.contains('active')) { rwd.classlist.remove('active'); clearinterval(intervalrwd); media.play(); } else { rwd.classlist.add('active'); media.pause(); intervalrwd = setinterval(windbackward, 200); } } function mediaforward() { clearinterval(intervalrwd); rwd.classlist.remove('active'); if(fwd.classlist.contains('active')) { fwd.classlist.remove('active'); clearint...
...And 2 more matches
Accessibility API cross-reference
application frame n/a application see <div> and <nonstruct> a region that contains mostly site-oriented content, rather than page-specific content.
... composite (abstract role) a large perceivable region that contains information about the parent document such as copyright, authors' names etc.
... feed a landmark region that contains a collection of items and objects that, as a whole, combine to create a form.
...And 2 more matches
Gecko info for Windows accessibility vendors
contains more desktop-style widgets than html and follows a box layout model, rather than being text-flow based.
...none of the user interface contains standard windows controls -- not even the menus!
...if it is, than variant.bstrval contains the role string.
...And 2 more matches
HTML parser threading
main objects nshtml5parser contains the code for dealing with data from document.write().
... (for historical reasons, it also contains unrelated fragment parsing code that should be refactored into a separate class in due course.) nshtml5streamparser contains the code for dealing with data from the network.
...the speculation object has a queue of tree ops (into which the tree builder will now flush ops to instead of the tree op stage), an owning reference to the nshtml5owningutf16buffer that contains the starting point of the speculation, an index into the nshtml5owningutf16buffer defining the exact starting point within the buffer, the line number of the tokenizer at that point and a snapshot of the tree op state.
...And 2 more matches
Investigating leaks using DMD heap scan mode
this looks through all of the windows in all of the cc logs (which may leaked, this late in shutdown), and then filters out windows where the url contains example.com.
... known edges: 0x7f08975a24c0 [fragmentorelement (xhtml) head https://www.example.com] --[mattrsandchildren[i]]--> 0x7f0882fe3230 0x7f08967e7b20 [js object (htmlscriptelement)] --[unwrapdomobject(obj)]--> 0x7f0882fe3230 the first two lines mean that the script element 0x7f0882fe3230 contains a strong reference to the eventlistenermanager 0x7f0899b4e550.
... after that is done, we can finally find out which objects (possibly) point to other objects, using the block_analyzer script: python $srcdir/memory/replace/dmd/block_analyzer.py dmd-$pid.log.gz $leakaddr this will look through every block of memory in the log, and give some basic information about any block of memory that (possibly) contains a pointer to that object.
...And 2 more matches
nss tech note1
how to use the nss asn.1 and quickder decoders nss technical note: 1 nss 3.6 contains several decoders for asn.1 and der.two of them are extensively used and are part of the public nss api : the "classic" asn.1 decoder, written by lisa repka .
...this structure contains four fields : kind .
...if kind contains the sec_asn1_inline or sec_asn1_pointer modifiers, then it must point to the required subtemplate.
...And 2 more matches
NSS Tools certutil
bracket theissuer string with quotation marks if it contains spaces.
...bracket the nickname string with quotation marks if it contains spaces.
...bracket theoutput-file string with quotation marks if it contains spaces.
...And 2 more matches
NSS Tools modutil
enclose this list in quotation marks if it contains spaces.
...enclose this list in quotation marks if it contains spaces.
... this information file contains special scripting and must be declared in the jar archive's manifest file.
...And 2 more matches
Property cache
entry->vcap caches the results of part 1 above, telling which object contains the desired property.
...the entry is valid only for subsequent lookups that occur at the same instruction, for several reasons: the script, not the property cache entry, contains the id of the property being accessed.
...if pobj exists (that is, both the parent chain and the prototype chain are long enough) and it has the shape vshape, then it contains the desired property.
...And 2 more matches
JSAPI User Guide
note: the foss wiki page contains a few links to other libraries and programs that can make life easier when using spidermonkey and jsapi.
...lastly, the global object contains all the classes, functions, and variables that are available for javascript code to use.
...it contains everything described above.
...And 2 more matches
Gecko Roles
role_window represents the window frame, which contains child objects such as a title bar, client, and other objects contained in a window.
... role_table represents a table that contains rows and columns of cells, and optionally, row headers and column headers.
... role_animation represents an animation control, which contains content that changes over time, such as a control that displays a series of bitmap frames.
...And 2 more matches
Querying Places
the nsinavhistoryresult object returned by executequery()/executequeries() contains the list of matches to the given history or bookmarks query.
...contains uri, title, and other general info.
... nsinavhistoryvisitresultnode: derived from nsinavhistoryresultnode, contains session information.
...And 2 more matches
nsILocalFile
exceptions thrown ns_error_file_unrecognized_path indicates that relativefilepath incorrectly begins with a path separator character or otherwise contains invalid characters.
... exceptions thrown ns_error_file_unrecognized_path indicates that relativefilepath incorrectly begins with a path separator character or otherwise contains invalid characters.
... exceptions thrown ns_error_file_unrecognized_path indicates that filepath is not an absolute file path or that it contains characters that are invalid for the filesystem.
...And 2 more matches
nsITransferable
contains the serialized ancestor elements.
...contains numbers identifying where in the context the fragment came from.
... void getanytransferdata( out string aflavor, out nsisupports adata, out unsigned long adatalen ); parameters aflavor on return, contains the flavor of data that was retrieved.
...And 2 more matches
Index - Firefox Developer Tools
7 dom inspector faq dom_inspector the file menu contains approaches which will allow you to inspect a document.
...this tool contains several useful features for viewing and manipulating fonts applied to any document loaded in the browser including inspection of all fonts applied to the page, and precise adjustment of variable font axis values.
... 64 examine and edit the box model guide, tools with the select element button pressed, if you hover over an element in the page, the box model for the element is shown overlaid on the page: 65 inspect and select colors guide, inspector, tools in the css pane's rules view, if a rule contains a color value, you'll see a sample of the color next to the value: 66 open the inspector guide, inspector, tools there are two main ways to open the inspector: 67 reposition elements in the page starting in firefox 48 you can move absolutely positioned elements by dragging them around the page.
...And 2 more matches
CharacterData - Web APIs
the characterdata abstract interface represents a node object that contains characters.
... characterdata.appenddata() appends the given domstring to the characterdata.data string; when this method returns, data contains the concatenated domstring.
... characterdata.deletedata() removes the specified amount of characters, starting at the specified offset, from the characterdata.data string; when this method returns, data contains the shortened domstring.
...And 2 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
</h1> this source code contains a couple of line feeds after the doctype and a bunch of space characters before, after, and inside the <h1> element, but the browser doesn’t seem to care at all and just shows the words "hello world!" as if these characters didn’t exist at all: this is so that whitespace characters don't impact the layout of your page.
...to make it easier, we’ve illustrated all spaces with ◦, all tabs with ⇥ , and all line breaks with ⏎: this example: <h1>◦◦◦hello◦⏎ ⇥⇥⇥⇥<span>◦world!</span>⇥◦◦</h1> is rendered in the browser like so: hidden example <h1> hello <span> world!</span> </h1> the <h1> element contains only inline elements.
... in fact it contains: a text node (consisting of some spaces, the word "hello" and some tabs).
...And 2 more matches
Timing element visibility with the Intersection Observer API - Web APIs
the header the header is fairly simple, since for this example all it contains is some text.
...aliquam sed magna aliquam, vestibulum nisi at," + " cursus nunc.</p>"; function buildcontents() { for (let i=0; i<5; i++) { contentbox.appendchild(createarticle(loremipsum)); if (!(i % 2)) { loadrandomad(); } } } the variable loremipsum contains the text we'll use for the body of all of our articles.
...articles are inserted into the content box (that is, the <main> element that contains all the site content) after being created using a method called createarticle(), which we'll look at next.
...And 2 more matches
MediaTrackSettings - Web APIs
displaysurface a domstring which specifies the type of source the track contains; one of: application the stream contains all of the windows of the application chosen by the user rendered into the one video track.
... browser the stream contains the contents of a single browser tab selected by the user.
... monitor the stream's video track contains the entire contents of one or more of the user's screens.
...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.
... each item in the array contains the following fields: supportedmethods for early implementations of the spec, this was a sequence of identifiers for payment methods that the merchant website accepts.
...this parameter contains the following fields: total the total amount of the payment request.
...And 2 more matches
TextRange - Web APIs
WebAPITextRange
textrange.boundingleftread only returns the distance between the left edge of the rectangle that binds the textrange object and the left edge that completely contains the textrange object.
... textrange.boundingtopread only returns the distance between the top edge of the rectangle that binds the textrange object and the top edge that completely contains the textrange object.
... textrange.inrange() returns whether the current range contains the specified range.
...And 2 more matches
Web Speech API - Web APIs
speechrecognitionevent the event object for the result and nomatch events, and contains all the data associated with an interim or final speech recognition result.
... speechsynthesiserrorevent contains information about any errors that occur while processing speechsynthesisutterance objects in the speech service.
... speechsynthesisevent contains information about the current state of speechsynthesisutterance objects that have been processed in the speech service.
...And 2 more matches
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
value a domstring representing an e-mail address, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, multiple, name,pattern, placeholder, readonly, required, size, and type idl attributes list and value methods select() value the <input> element's value attribute contains a domstring which is automatically validated as conforming to e-mail syntax.
... 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 expression the input's contents mu...
...the list attribute specifies the id of a <datalist>, which in turn contains one <option> element per suggested value; each option's value is the corresponding suggested value for the email entry box.
...And 2 more matches
<th> - HTML: Hypertext Markup Language
WebHTMLElementth
abbr this attribute contains a short abbreviated description of the cell's content.
... colspan this attribute contains a non-negative integer value that indicates for how many columns the cell extends.
... headers this attribute contains a list of space-separated strings, each corresponding to the id attribute of the <th> elements that apply to this element.
...And 2 more matches
Array - JavaScript
array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... array.prototype.includes() determines whether the array contains a value, returning true or false as appropriate.
... array.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
...And 2 more matches
Date.parse() - JavaScript
the date.parse() method parses a string representation of a date, and returns the number of milliseconds since january 1, 1970, 00:00:00 utc or nan if the string is unrecognized or, in some cases, contains illegal date values (e.g.
... fall-back to implementation-specific date formats this section contains implementation-specific behavior that can be inconsistent across implementations.
... however, if the string is recognized as an iso format string and it contains invalid values, it will return nan in all browsers compliant with es5 and later: // iso string with invalid values new date('2014-25-23').toisostring(); // throws "rangeerror: invalid date" in all es5-compliant browsers spidermonkey's implementation-specific heuristic can be found in jsdate.cpp.
...And 2 more matches
url - Archive of obsolete content
contains everything after the host of the url.
... parameters an hashmap that contains the parameters of the data url.
... data the string that contains the data in the data url.
... if the uri given to the constructor contains base64 parameter, this string is decoded.
util/array - Archive of obsolete content
globals functions has(array, element) returns true if the given array contains the element or false otherwise.
... hasany(array, elements) returns true if the given array contains any of the elements in the elements array, or false otherwise.
... remove(array, element) if the given array contains the given element, this function removes the element from the array and returns true.
... element : * the element to remove from the array if it contains it.
Localization - Archive of obsolete content
operties format are named "xx-yy.properties", where "xx-yy" is the name of the locale in question contain one entry for each string you want to localize, consisting of an identifier for the string and its translation in that locale, in the format identifier=translation need to use utf-8 without bom encoding lines starting with "#" (after optional whitespace) are comments suppose your add-on contains a single localizable string, represented in english as "hello!", and you want to supply us english and french french localizations.
... 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!
... "fr.properties" contains this: hello_id= bonjour !
... limitations the current localization support is a first step towards full support, and contains a number of limitations.
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
listing 2: content for chrome.manifest content helloworld content/ overlay chrome://browser/content/browser.xul chrome://helloworld/content/overlay.xul register the content package (content instruction) line 1, beginning content, contains the code used to register the chrome’s content package.
... xul cross-package overlay (overlay instruction) line 2, beginning overlay, contains the code used to invoke the cross-package overlay, overlaying the firefox browser window, at chrome://browser/content/browser.xul with chrome://helloworld/content/overlay.xul.
...the menupop element 4 contains the merge point where you’re going to be adding a new menu item; you can see that it has the id menu_toolspopup.
...under the tool menu, the session store submenu contains two items—save session and clear sessions; in between them is a list of previously saved sessions that you can restore, most recent first.
Creating reusable content with CSS and XBL - Archive of obsolete content
this stylesheet contains the document style.
...this file contains the xbl binding.
...this separate stylesheet contains style for the binding.
...it only contains the text of the button's label.
Creating a Microsummary - Archive of obsolete content
ount"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output method="text"/> <template match="/"> </template> </transform> </template> </generator> including the download count to include the download count in the output of the xslt transform sheet, we need to add an xslt <value-of> element to the template whose select attribute contains an xpath expression that points to the node containing the count.
...it also contains basic functions for manipulating those nodes and their content.
...the new window will include an xpath field that contains this xpath expression pointing to the download count node: id('download-count').
... add a <value-of> element to the xslt <template> element whose select attribute contains that xpath expression: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output method="text"/> <template match="/"> <value-of select="id('download-count')"/> </template> </transform> </template> </generator> adding text to include the label fx downloads in the microsummary, we need to add an xslt <text> element to the xslt <template> element whose content is the text we want to add.
Rule Compilation - Archive of obsolete content
a query contains instructions for how to retrieve a set of data from the datasource.
...for rdf and xml, the query contains a set of instructions for navigating through the rdf graph or xml document tree.
...rules the template also contains a set of rules which define content to be generated based on various conditions.
...if the generated content itself contains hidden elements, those child elements will not be generated until necessary.
Custom toolbar button - Archive of obsolete content
note: for information about how to find the profile directory, see: profile folder explanation: the profile directory contains information specific to a user, keeping it separate from the application.
... explanation: this file contains information used by the application's extension manager.
... explanation: the chrome directory contains files that specify what the extension does.
... the next section in this tutorial contains examples of code that you can use to make your button do something useful.
Tabboxes - Archive of obsolete content
tabbox the outer box that contains the tabs along the top and the tab pages themselves.
... tabs the inner box that contains the individual tabs.
...it consists of two children, a tabs element which contains the row of tabs and a tabpanels elements which contains the tabbed pages.
...the tabbox also contains a tabpanels element which will appear below the tabs due to the vertical orientation on the whole tabbox.
Toolbars - Archive of obsolete content
« previousnext » a toolbar is usually placed along the top of a window and contains a number of buttons that perform common functions.
...for example, the mozilla browser window contains a textbox that displays the page url.
... toolbox a box that contains toolbars.
... toolbar a single toolbar that contains toolbar items such as buttons.
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
the second part, the tree body, contains the data to appear in the tree and is created with a treechildren tag.
...this interface contains thirty properties and functions which you may implement.
... treechildren this contains the main body of the tree where the individual rows of data will be displayed.
...the following tags are used: treeitem this contains a single parent row and all its descendants.
Using Remote XUL - Archive of obsolete content
it contains elements for all common ui widgets (menus, buttons, toolbars, etc.) and many sophisticated ones (trees, browsers, color pickers).
...its src attribute contains the url of the page being displayed in the iframe.
...the bar also contains two links that are independent of any category: faq and search.
...its label attribute contains the text to display in the item.
iframe - Archive of obsolete content
contentdocument type: document this read-only property contains the document object in the element.
... contentwindow type: todo use the contentwindow.wrappedjsobject to obtain a dom(html) window object docshell type: nsidocshell this read-only property contains the nsidocshell object for the document.
... webnavigation type: nsiwebnavigation this read-only property contains the nsiwebnavigation object for the document.
...it also contains the load constants used by reloadwithflags and loaduriwithflags.
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
the second section contains general options for your build.
...the third section contains options for building xulrunner.
...finally, the final section contains options specific to your application.
...contains the names of the subdirectories that need to be built, which at very least will include chrome and app.
NPAnyCallbackStruct - Archive of obsolete content
contains information required during embedded mode printing.
... syntax typedef struct { int32 type; } npanycallbackstruct; fields the data structure has the following field: type always contains np_print.
...the npanycallbackstruct structure contains information required by the platformprint field of the npembedprint structure during embedded mode printing.
...this structure contains the file pointer to which the plug-in should write its postscript data.
NPSetWindowCallbackStruct - Archive of obsolete content
contains information about the plug-in's unix window environment.
... 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.
...the npsetwindowcallbackstruct object, allocated by the browser, contains information required for the ws_info field of an npwindow.
...the type field of this structure always contains np_setwindow.
Introduction to Public-Key Cryptography - Archive of obsolete content
each certificate contains the name (dn) of that certificate's issuer, which is the same as the subject name of the next certificate in the chain.
... in figure 7, the engineering ca certificate contains the dn of the ca (that is, usa ca), that issued that certificate.
...otherwise, the issuer's certificate is checked to make sure it contains the appropriate subordinate ca indication in the red hat certificate type extension, and chain verification returns to step 1 to start again, but with this new certificate.
... key management before a certificate can be issued, the public key it contains and the corresponding private key must be generated.
Bounding volume collision detection with THREE.js - Game development
box3 / sphere both box3 and sphere have a containspoint method to do this test.
... var point = new three.vector3(2, 4, 7); knotbbox.containspoint(point); box3 vs.
... knotbbox.intersectsbox(otherbox); note: this is different from the box3.containsbox method, which checks whether the box3 fully wraps another one.
... // box vs box box3.intersectsbox(otherbox3); // box vs point box3.containspoint(point.position); demos there are two demos you can take a look at on our live demos page.
Sizing items in CSS - Learn web development
the border now contains that text because the height of the element is defined by the content.
...the third box contains the same image again, also with max-width: 100% set; in this case you can see how it has scaled down to fit into the box.
...the box contains a letter a, which has been given a font-size of 10vh.
...to see the example change when you change the viewport size you will need to load the example in a new browser window that you can resize (as the embedded <iframe> that contains the example shown above is its viewport).
Practical positioning examples - Learn web development
and now an ordered list: how exciting!</p> <ol> <li>dui neque eleifend lorem, a auctor libero turpis at sem.</li> <li>aliquam ut porttitor urna.</li> <li>nulla facilisi</li> </ol> </article> </div> </section> so here we've got a <section> element with a class of info-box, which contains a <ul> and a <div>.
... the unordered list contains three list items with links inside, which will become the actual tabs to click on for displaying our content panels.
... the div contains three <article> elements, which will make up the content panels that correspond to each tab.
... each panel contains some sample content.
Sending form data - Learn web development
an http request consists of two parts: a header that contains a set of global metadata about the browser's capabilities, and a body that can contain information necessary for the server to process the specific request.
...you can see this in action in our example php-example.html file — which contains the same example form as we saw before, with a method of post and an action of php-example.php.
... when it is submitted, it sends the form data to php-example.php, which contains the php code seen in the above block.
... greeting.html: this template just contains a line that renders the two bits of data passed to it when it is rendered.
HTML basics - Learn web development
take the <img> element that we already have in our html page: <img src="images/firefox-icon.png" alt="my test image"> this contains two attributes, but there is no closing </img> tag and no inner content.
...this contains all the content that you want to show to web users when they visit your page, whether that's text, images, videos, games, playable audio tracks or whatever else.
...it does this via the src (source) attribute, which contains the path to our image file.
...html contains 6 heading levels, <h1>–<h6>, although you'll commonly only use 3 to 4 at most: <h1>my main title</h1> <h2>my top level heading</h2> <h3>my subheading</h3> <h4>my sub-subheading</h4> now try adding a suitable title to your html page just above your <img> element.
JavaScript basics - Learn web development
*/ if your comment contains no line breaks, it's an option to put it behind two slashes like this: // this is a comment operators an operator is a mathematical symbol which produces a result based on two values (or variables).
...nameless) function, which contains the code we want the click event to run.
... function setusername() { let myname = prompt('please enter your name.'); localstorage.setitem('name', myname); myheading.textcontent = 'mozilla is cool, ' + myname; } the setusername() function contains a prompt() function, which displays a dialog box, similar to alert().
...we use localstorage's setitem() function to create and store a data item called 'name', setting its value to the myname variable which contains the user's entry for the name.
Creating hyperlinks - Learn web development
for example, the bbc homepage contains a many links that point not only to multiple news stories, but also different areas of the site (navigation functionality), login/registration pages (user tools), and more.
... anatomy of a link a basic link is created by wrapping the text or other content, see block level links, inside an <a> element and using the href attribute, also known as a hypertext reference, or target, that contains the web address.
...the title contains additional information about the link, such as which kind of information the page contains, or things to be aware of on the web site.
...when working locally with a web site, you'll have one directory that contains the entire site.
HTML table basics - Learn web development
LearnHTMLTablesBasics
adding headers with <th> elements now let's turn our attention to table headers — special cells that go at the start of a row or column and define the type of data that row or column contains (as an example, see the "person" and "age" cells in the first example shown in this article).
...the html contains the same dogs example as you saw above.
...the html contains the same animals example as you saw above.
...the html contains the same table you saw above, minus the column styling information.
Drawing graphics - Learn web development
previous overview: client-side web apis next the browser contains some very powerful graphics programming tools, from the scalable vector graphics (svg) language, to apis for drawing on html <canvas> elements, (see the canvas api and webgl).
...the ctx variable now contains a canvasrenderingcontext2d object, and all drawing operations on the canvas will involve manipulating this object.
...this contains a new method, translate(), which moves the origin point of the canvas: ctx.translate(width/2, height/2); this causes the coordinate origin (0, 0) to be moved to the center of the canvas, rather than being at the top left corner.
...the image looks like this: it contains six sprites that make up the whole walking sequence — each one is 102 pixels wide and 148 pixels high.
Storing the information you need — Variables - Learn web development
arrays an array is a single object that contains multiple values enclosed in square brackets and separated by commas.
...you can have a simple object that represents a box and contains information about its width, length, and height, or you could have an object that represents a person, and contains data about their name, height, weight, what language they speak, how to say hello to them, and more.
... for example, if you declare a variable and give it a value enclosed in quotes, the browser treats the variable as a string: let mystring = 'hello'; even if the value contains numbers, it is still a string, so be careful: let mynumber = '500'; // oops, this is still a string typeof mynumber; mynumber = 500; // much better — now this is a number typeof mynumber; try entering the four lines above into your console one by one, and see what the results are.
...the first time it is called, it should return string, as at that point the mynumber variable contains a string, '500'.
Getting started with Vue - Learn web development
public: this directory contains static assets that are published, but not processed by webpack during build (with one exception; index.html gets some processing).
... src: this directory contains the core of your vue app.
... <template> contains all the markup structure and display logic of your component.
... <script> contains all of the non-display logic of your component.
Displaying Places information using views
the overlay contains javascript required by the views.
... it also contains the built-in places context menu and commands, which you may want to take advantage of in your own uses of the views.
...(rowindex); to get the row index of a specific nsinavhistoryresultnode: var treeview = document.getelementbyid("myplacestreeview"); var rowindex = treeview.view.treeindexfornode(historyresultnode); to select a row in the tree whose node has a specific uri: var treeview = document.getelementbyid("myplacestreeview"); treeview.selectplaceuri("some place uri"); to select a row in the tree that contains a specific nsinavhistoryresultnode: var treeview = document.getelementbyid("myplacestreeview"); treeview.selectnode(somehistoryresultnode); placestreeview note: this section describes the implementation of the places tree view.
...if your view contains an internal instance of nsinavhistoryresultobserver, you would pass it instead.
Localizing without a specialized tool
localizing step-by-step dtd files in order to provide an example that can be viewed quickly in your ui, we'll start by translating a dtd file named searchbar.dtd that contains the string "manage search engines...".
... to start, make sure you are in /path/to/your/working/directory/l10n-mozilla-1.9.2/x-testing and then, type the command mkdir /browser/chrome/browser now, step back out to the broader directory that contains both your l10n base (l10n-mozilla-1.9.2) and the en-us source code (mozilla-1.9.2).
....properties files the property file "search.properties" contains the string "add %s".
... again, to start, make sure you are in /path/to/your/working/directory/l10n-mozilla-1.9.2/x-testing now, step back out to the broader directory that contains both your l10n base (l10n-mozilla-1.9.2) and the en-us source code (mozilla-1.9.2).
about:memory
(you don't need to take a screenshot.) this text contains fewer measurements than a memory reports file, but is often good enough to diagnose problems.
... 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.
... explicit allocations this section contains a single tree, called "explicit", that measures all the memory allocated via explicit calls to heap allocation functions (such as malloc and new) and to non-heap allocations functions (such as mmap and virtualalloc).
... other measurements this section contains multiple trees, includes many that cross-cut the measurements in the "explicit" tree.
An overview of NSS Internals
a certificate contains lots of other details; for example, it contains a signature by a third party that expresses trust in the ownership relationship for the certificate.
...storage consists of multiple files: a key database file, which contains your secret keys, and a certificate database file which contains the public portion of your own certificates, the certificates of peers or cas, and a list of trust decisions (such as to not trust a built-in ca, or to explicitly trust other cas).
...a third file contains the list of external pkcs#11 modules that have been registered to be used by nss.
...the common structure to store such an untyped block is secitem, which contains a size and an untyped c pointer variable.
Python binding for NSS
example code the doc/examples directory contains numerous examples of python-nss programs and libraries you may wish to consult.
... test code in addition the test directory contains unit tests that also illustrate python-nss usage, however unlike the examples the unit tests are geared towards testing rather than expository illustration.
... other documentation the doc directory contains other files you may wish to review.
... base64_to_binary the following files were added: test_cert_request release 0.14.1 release date 2013-10-28 scm tag pynss_release_0_14_1 source download https://ftp.mozilla.org/pub/mozilla.org/security/python-nss/releases/pynss_release_0_14_1/src/ change log release 0.14.1 contains only modifications to tests and examples, otherwise functionally it is the same as release 0.14.0 fix bug in ssl_example.py and test_client_server.py where complete data was not read from socket.
JSPropertyOp
on entry, *vp contains the property's stored value or undefined if the property doesn't have a stored value.
...on entry, *vp contains the value being assigned to the property.
...on entry, *vp contains the value provided by the code defining or setting the property.
... on entry, *vp contains the property's stored value, or undefined if the property doesn't exist or doesn't have a stored value.
Parser API
"literal", value:42}) it is also available since firefox 7; it can be imported into the global object via: components.utils.import("resource://gre/modules/reflect.jsm") or into a specified object via: components.utils.import("resource://gre/modules/reflect.jsm", obj) built-in objects whether in spidermonkey shell or firefox (after importing), the global singleton object reflect currently contains just the parse method.
... if the generator flag is true, the function is a generator function, i.e., contains a yield expression in its body (other than in a nested function).
...the lexical flag is metadata indicating whether the switch statement contains any unnested let declarations (and therefore introduces a new lexical scope).
...the islexical flag is metadata indicating whether the switch statement contains any unnested let declarations (and therefore introduces a new lexical scope).
Mozilla internal string guide
rs (the default) adopted buffers (a buffer that the string class owns, but is not reference counted, because it came from somewhere else) dependent buffers, that is, an underlying buffer that the string class does not own, but that the caller that constructed the string guarantees will outlive the string instance in addition, there is a special string class, ns[c]autostring, that additionally contains an internal 64-unit buffer (intended primarily for use on the stack), leading to a fourth ownership model: storage within an auto string's stack buffer auto strings will prefer reference counting an existing reference-counted buffer over their stack buffer, but will otherwise use their stack buffer for anything that will fit in it.
...any string class with a capital "c" in the classname contains 8-bit bytes.
...any string class without the "c" contains 16-bit code units.
... tonewunicode(nsacstring) - (avoid if possible) creates a new zero-terminated char16_t* string which contains the value of the latin1 to utf-16 conversion.
nsAutoString
it is normally not a good idea to use this class on the heap, because it will allocate space which may be wasted if the string it contains is significantly smaller or any larger than 64 characters.
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset print32 findcharinset(const prunichar*, print32) const - source parameters prunichar* as...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters prunichar* astring print32 aoffset print32 rfindcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset equalsignorecase prbool equalsignorecase(const char*, print32) const - source parameters char* astring print32 acount tofloat float tofloat(print32*) const - source perform string to float conversion.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsCAutoString
it is normally not a good idea to use this class on the heap, because it will allocate space which may be wasted if the string it contains is significantly smaller or any larger than 64 characters.
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset rfindcharinset print32 rfindcharinset(const char*, print32) cons...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 rfindcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset compare print32 compare(const char*, prbool, print32) const - source compares a given string to this string.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace f...
nsIEffectiveTLDService
ns_error_unexpected or other error returned by nsiidnservice.normalize() when the hostname contains characters disallowed in uris.
... ns_error_unexpected this exception originates in the normalize() method in nsiidnservice and is thrown when ahost contains characters disallowed in uris.
... ns_error_unexpected or other error returned by nsiidnservice.normalize() when the hostname contains characters disallowed in uris.
... ns_error_unexpected this exception originates in the normalize() method in nsiidnservice and is thrown when ahost contains characters disallowed in uris.
nsIHttpActivityObserver
socket transport activity when the activity type is activity_type_socket_transport and the subtype is status_sending_to, the aextrasizedata parameter contains the number of bytes sent.
...http transaction activity for activity notifications of type activity_type_http_transaction, there are three activities that include extra data: activity_subtype_request_header aextrastringdata contains the text of the header.
... activity_subtype_response_header aextrastringdata contains the text of the response header.
... activity_subtype_response_complete aextrasizedata contains the total number of bytes received.
nsIHttpChannelInternal
void getrequestversion( out unsigned long major, out unsigned long minor ); parameters major on return, contains the request's major version number.
... minor on return, contains the request's minor version number.
...void getresponseversion( out unsigned long major, out unsigned long minor ); parameters major on return, contains the response's major version number.
... minor on return, contains the response's minor version number.
nsINavBookmarksService
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.
... tagsfolder long long the item id of the top-level folder that contains the tag "folders".
... void replaceitem( in print64 folder, in nsiuri item, in nsiuri newitem ); parameters folder the folder which contains the item to replace.
nsISelection
void collapsetoend(); void collapsetostart(); boolean containsnode(in nsidomnode node, in boolean partlycontained); void deletefromdocument(); void extend(in nsidomnode parentnode, in long offset); void extendnative(in nsidomnode parentnode, in long offset); native code only!
...void collapsetostart(); containsnode() indicates whether the nsidomnode is part of the selection.
...boolean containsnode( in nsidomnode node, in boolean partlycontained ); parameters node the nsidomnode to look for partlycontained if partlycontained is set to pr_false, the function only returns true when the entire node is part of the selection.
... return value whether or not the range contains the requested noe.
XPCOM Interface Reference by grouping
(i'm fully aware that this will be a great point of discussion and probably will end in tears, but since i'm the first person to apparently take a swing at this, i get first dibs.) the primary sections consist of: browser this section contains elements associated with the view pane or the content of the "browser window" proper.
... data this section contains data wrappers and core object definitions.
... security this section contains apis for secure channel communications system this section contains application level interfaces including calls to external support elements (such as device calls).
... user this section contains elements specific to a given user's data storage.
Index
4 account interfaces code snippets, extension development, thunderbird this page contains a list of the interfaces that you'll will most likely use when writing extensions that work with email or other accounts.
... 7 address book interfaces mailnews, mozilla, seamonkey, thunderbird this page contains a list of the interfaces that you'll will most likely hit when writing patches for the address book or writing extensions.
... 27 folder pane interfaces this page contains a list of the interfaces that you'll will most likely use when writing extensions that affect the folder pane.
...a content/ folder sometimes contains the actual content files.
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.
... technically speaking, it implements a number of interfaces, including nsidomjswindow and nsidomwindow, but it also contains the user-defined properties for global variables and functions of the window.
... content windows when a xul window contains a widget capable of displaying a page, such as <browser> or <iframe>, the document in that widget is, naturally, separate from the document of the chrome window itself.
...suppose the overlay contains a button to open the extension's options window which needs to read some data from the browser window.
Initialization and Destruction - Plugins
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.
...the argn array contains the attribute names; the argv array contains the attribute values.
... in npp_new, the saved parameter contains previously saved data for this instance of the plug-in (saved by npp_destroy).
... the plug-in must free the memory for npsaveddata and the buffer it contains.
URLs - Plugins
the notifydata parameter contains private plug-in data that can be used to associate the request with the subsequent npp_urlnotify call (which returns this value) and/or to pass a pointer to some request-related payload.
...the notifydata parameter contains the private plug-in data passed to the corresponding call to npn_geturlnotify and npn_posturlnotify.
... the buf parameter identifies a local temporary file or data buffer that contains the data to post.
...the notifydata parameter contains plug-in-private data passed by npp_urlnotify and may be used for tracking multiple posts.
DOM Inspector internals - Firefox Developer Tools
the panelset contains two panels.
...at the top of each panel is a toolbar which contains a menu button allowing you to choose which viewer to display from the viewer list, a label displaying the name of the currently active viewer, and another menu button allowing you to issue viewer-specific commands.
...this comparison turns out to be quite apt, since each panel actually contains an anonymous browser, and individual viewers exist in separate documents loaded in the browser.
... shared structure overlays taking a look at the contents of inspector.xul, dom inspector's primary ui, will reveal that it contains almost no visible elements.
Debugger.Object - Firefox Developer Tools
boundarguments if the referent is a bound debuggee function, this is an array (in the debugger object’s compartment) that contains the debuggee values of the arguments object it was bound to.
... note that the array only contains the promises that directly depend on the referent promise.
... codeis interpreted as strict mode code when it contains a use strict directive.
... note that, like executeinglobal, any declarations it contains affect the referent global object, even ascode is evaluated in an environment extended according tobindings.
Debugger.Script - Firefox Developer Tools
the elements of the array are objects, each of which describes a single entry point, and contains the following properties: linenumber: the line number for which offset is an entry point columnnumber: the column number for which offset is an entry point offset: the bytecode instruction offset of the entry point for example, suppose we have a script for the following source code: a=[] for (i=1; i < 10; i++) // it's hip to be square.
...if the script contains no executable code at that line, the array returned is empty.
... getoffsetscoverage(): if the instance refers to a jsscript, return null or an array which contains informations about the coverage of all opcodes.
... the elements of the array are objects, each of which describes a single opcode, and contains the following properties: linenumber: the line number of the current opcode.
Blob - Web APIs
WebAPIBlob
to create a blob that contains a subset of another blob's data, use the slice() method.
... constructor blob() returns a newly created blob object which contains a concatenation of all of the data in the array passed into the constructor.
...having converted the data into an object url, it can be used in a number of ways, including as the value of the <img> element's src attribute (assuming the data contains an image, of course).
...the following code reads the content of a blob as a typed array: const reader = new filereader(); reader.addeventlistener('loadend', () => { // reader.result contains the contents of blob as a typed array }); reader.readasarraybuffer(blob); another way to read content from a blob is to use a response.
DisplayMediaStreamConstraints.video - Web APIs
this may be a single one of the following strings, or a list of them to allow multiple source surfaces: application the stream contains all of the windows of the application chosen by the user rendered into the one video track.
... browser the stream contains the contents of a single browser tab selected by the user.
... monitor the stream's video track contains the entire contents of one or more of the user's screens.
... window the stream contains a single window selected by the user for sharing.
FileReader - Web APIs
filereader.readasarraybuffer() starts reading the contents of the specified blob, once finished, the result attribute contains an arraybuffer representing the file's data.
... filereader.readasbinarystring() starts reading the contents of the specified blob, once finished, the result attribute contains the raw binary data from the file as a string.
... filereader.readasdataurl() starts reading the contents of the specified blob, once finished, the result attribute contains a data: url representing the file's data.
... filereader.readastext() starts reading the contents of the specified blob, once finished, the result attribute contains the contents of the file as a text string.
Using the Geolocation API - Web APIs
sition.coords.latitude, position.coords.longitude); } function error() { alert('sorry, no position available.'); } const options = { enablehighaccuracy: true, maximumage: 30000, timeout: 27000 }; const watchid = navigator.geolocation.watchposition(success, error, options); describing a position the user's location is described using a geolocationposition object instance, which itself contains a geolocationcoordinates object instance.
... the geolocationposition instance contains only two things, a coords property that contains the geolocationcoordinates instance, and a timestamp property that contains a domtimestamp instance representing the time at which the position data was retrieved.
... the geolocationcoordinates instance contains a number of properties, but the two you'll use most commonly are latitude and longitude, which are what you need to draw your position on a map.
...this object type contains two properties, a code indicating what type of error has been returned, and a human-readable message that describes what the error code means.
Geolocation API - Web APIs
interfaces geolocation the main class of this api — contains methods to retrieve the user's current position, watch for changes in their position, and clear a previously-set watch.
...a geolocationposition instance is returned by a successful call to one of the methods contained inside geolocation, inside a success callback, and contains a timestamp plus a geolocationcoordinates object instance.
... geolocationcoordinates represents the coordinates of a user's position; a geolocationcoordinates instance contains latitude, longitude, and other important related information.
... geolocationpositionerror a geolocationpositionerror is returned by an unsuccessful call to one of the methods contained inside geolocation, inside an error callback, and contains an error code and message.
HTMLMediaElement - Web APIs
htmlmediaelement.played read only returns a timeranges object that contains the ranges of the media source that the browser has played, if any.
... htmlmediaelement.seekable read only returns a timeranges object that contains the time ranges that the user is able to seek to, if any.
... htmlmediaelement.src is a domstring that reflects the src html attribute, which contains the url of a media resource to use.
... htmlmediaelement.mozcapturestream() [enter description] htmlmediaelement.mozcapturestreamuntilended() [enter description] htmlmediaelement.mozgetmetadata() returns object, which contains properties that represent metadata from the playing media resource as {key: value} pairs.
MediaTrackConstraints - Web APIs
this may be a single one of the following strings, or a list of them to allow multiple source surfaces: application the stream contains all of the windows of the application chosen by the user rendered into the one video track.
... browser the stream contains the contents of a single browser tab selected by the user.
... monitor the stream's video track contains the entire contents of one or more of the user's screens.
... window the stream contains a single window selected by the user for sharing.
RTCStats - Web APIs
WebAPIRTCStats
type a domstring indicating the type of statistics the object contains, taken from the enum type rtcstatstype.
... rtcinboundrtpstreamstats contains statistics that can only be measured on a receiver at the local end of the rtp connection.
... rtcoutboundrtpstreamstats contains statistics related to the receiver at the remote end of the rtp stream.
... rtcoutboundrtpstreamstats contains statistics about the local sending endpoint of an rtp stream.
RTCStatsType - Web APIs
csrc an rtccontributingsourcestats object which contains statistics related to a contributing source (csrc) that contributed to an inbound rtp stream.
... data-channel an rtcdatachannelstats object which contains statistics about each rtcdatachannel on the connection.
... remote-outbound-rtp the report is an rtcremoteoutboundrtpstreamstats object that contains statistics about your inbound rtp (inbound-rtp) stream, but from the perspective of the remote peer.
... transport an object that contains statistics related to a transport for an rtcpeerconnection.
:where() - CSS: Cascading Style Sheets
WebCSS:where
this <a href="https://mozilla.org">contains a link</a>.
...this <a href="https://developer.mozilla.org">also contains a link</a>.
...this <a href="https://mozilla.org">contains a link</a>.
...this <a href="https://developer.mozilla.org">also contains a link</a>.
Adding captions and subtitles to HTML5 video - Developer guides
the various attributes of this element allow us to specify such things as the type of content that we're adding, the language it's in, and of course a reference to the text file that contains the actual subtitle information.
...al setup as with all the other buttons, one of the first things we need to do is store a handle to the subtitles' button: var subtitles = document.getelementbyid('subtitles'); we also initially turn off all subtitles, in case the browser turns any of them on by default: for (var i = 0; i < video.texttracks.length; i++) { video.texttracks[i].mode = 'hidden'; } the video.texttracks property contains an array of all the text tracks attached to the video.
...this can easily be done by adding an .htaccess file to an appropriate directory that contains addtype text/vtt .vtt.
... chrome and opera these browsers have similar implementations again: subtitles are enabled by default and the default control set contains a 'cc' button that turns subtitles on and off.
Using HTML sections and outlines - Developer guides
section elements in html5 html navigational element (<nav>) defines a section that contains navigation links that appear often on a site.
...it contains all the content and html tags.
... html header element (<header>) defines a page area that typically contains a logo, title, and navigation.
... html footer element (<footer>) defines a page footer, which typically contains copyright or legal notices and sometimes some links.
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
a telephone number, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, and size idl attributes list, selectionstart, selectionend, selectiondirection, and value methods select(), setrangetext(), setselectionrange() value the <input> element's value attribute contains a domstring that either represents a telephone number or is an empty string ("").
... 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 u...
...the list attribute specifies the id of a <datalist> element, which in turn contains one <option> element per suggested value; each option's value is the corresponding suggested value for the telephone number entry box.
... <span class="validity"></span> </span> <span class="number2div"> <input id="number2" name="number2" type="tel" required placeholder="second part" pattern="[0-9]{4}" aria-label="second part of number"> <span class="validity"></span> </span> </div> <div> <button>submit</button> </div> </form> the javascript is relatively simple — it contains an onchange event handler that, when the <select> value is changed, updates the <input> element's pattern, placeholder, and aria-label to suit the format of telephone numbers in that country/territory.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
for example, a link to the site's favicon: <link rel="icon" href="favicon.ico"> there are a number of other icon rel values, mainly used to indicate special icon types for use on various mobile platforms, e.g.: <link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-icon-114.png" type="image/png"> the sizes attribute indicates the icon size, while the type contains the mime type of the resource being linked.
... integrity contains inline metadata — a base64-encoded cryptographic hash of the resource (file) you’re telling the browser to fetch.
...it must be present only if the rel contains a value of icon or a non-standard type such as apple's apple-touch-icon.
... note: most icon formats are only able to store one single icon; therefore most of the time the sizes attribute contains only one entry.
JavaScript modules - JavaScript
the modules directory's two modules are described below: canvas.js — contains functions related to setting up the canvas: create() — creates a canvas with a specified width and height inside a wrapper <div> with a specified id, which is itself appended inside a specified parent element.
... square.js — contains: name — a constant containing the string 'square'.
...to get modules to work correctly in a browser, you need to make sure that your server is serving them with a content-type header that contains a javascript mime type such as text/javascript.
...as an example, the square.js file now contains all its functionality in a single class: class square { constructor(ctx, listid, length, x, y, color) { ...
BigInt64Array - JavaScript
bigint64array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... bigint64array.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... bigint64array.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... bigint64array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
BigUint64Array - JavaScript
biguint64array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... biguint64array.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... biguint64array.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... biguint64array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Float32Array - JavaScript
float32array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... float32array.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... float32array.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... float32array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Float64Array - JavaScript
float64array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... float64array.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... float64array.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... float64array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Int16Array - JavaScript
int16array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... int16array.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... int16array.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... int16array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Int32Array - JavaScript
int32array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... int32array.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... int32array.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... int32array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Int8Array - JavaScript
int8array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... int8array.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... int8array.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... int8array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Promise.all() - JavaScript
this returned promise will resolve when all of the input's promises have resolved, or if the input iterable contains no promises.
... an asynchronously resolved promise if the iterable passed contains no promises.
... var p1 = promise.resolve(3); var p2 = 1337; var p3 = new promise((resolve, reject) => { settimeout(() => { resolve("foo"); }, 100); }); promise.all([p1, p2, p3]).then(values => { console.log(values); // [3, 1337, "foo"] }); if the iterable contains non-promise values, they will be ignored, but still counted in the returned promise array value (if the promise is fulfilled): // this will be counted as if the iterable passed is empty, so it gets fulfilled var p = promise.all([1,2,3]); // this will be counted as if the iterable passed contains only the resolved promise with value "444", so it gets fulfilled var p2 = promise.all([1,2,3, promise...
....resolve(444)]); // this will be counted as if the iterable passed contains only the rejected promise with value "555", so it gets rejected var p3 = promise.all([1,2,3, promise.reject(555)]); // using settimeout we can execute code after the stack is empty settimeout(function() { console.log(p); console.log(p2); console.log(p3); }); // logs // promise { <state>: "fulfilled", <value>: array[3] } // promise { <state>: "fulfilled", <value>: array[4] } // promise { <state>: "rejected", <reason>: 555 } asynchronicity or synchronicity of promise.all this following example demonstrates the asynchronicity (or synchronicity, if the iterable passed is empty) of promise.all: // we are passing as argument an array of promises that are already resolved, // to trigger promise.all as soon as pos...
String.prototype.split() - JavaScript
if separator contains multiple characters, that entire character sequence must be found in order to split.
... if separator is omitted or does not occur in str, the returned array contains one element consisting of the entire string.
...how are you doing?' const splits = mystring.split(' ', 3) console.log(splits) this script displays the following: ["hello", "world.", "how"] splitting with a regexp to include parts of the separator in the result if separator is a regular expression that contains capturing parentheses (), matched results are included in the array.
... reversing a string using split() this is not a robust way to reverse a string: const str = 'asdfghjkl' const strreverse = str.split('').reverse().join('') // 'lkjhgfdsa' // split() returns an array on which reverse() and join() can be applied it doesn't work if the string contains grapheme clusters, even when using a unicode-aware split.
TypedArray - JavaScript
typedarray.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... typedarray.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... typedarray.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... typedarray.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Uint16Array - JavaScript
uint16array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... uint16array.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... uint16array.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... uint16array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Uint32Array - JavaScript
uint32array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... uint32array.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... uint32array.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... uint32array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Uint8Array - JavaScript
uint8array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... uint8array.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... uint8array.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... uint8array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Uint8ClampedArray - JavaScript
uint8clampedarray.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... uint8clampedarray.prototype.keys() returns a new array iterator that contains the keys for each index in the array.
... uint8clampedarray.prototype.values() returns a new array iterator object that contains the values for each index in the array.
... uint8clampedarray.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
dx - SVG: Scalable Vector Graphics
WebSVGAttributedx
for <altglyph>, if it contains a single value, dx defines a shift along the x-axis for all alternate glyph.
... value <number> default value 0 animatable yes text for <text>, if it contains a single value, dx defines a shift along the x-axis for all glyphs.
... for <tref>, if it contains a single value, dx defines a shift along the x-axis for all glyphs.
... value list of <length> default value none animatable yes tspan for <tspan>, if it contains a single value, dx defines a shift along the x-axis for all alternate glyph.
dy - SVG: Scalable Vector Graphics
WebSVGAttributedy
for <altglyph>, if it contains a single value, dy defines a shift along the y-axis for all alternate glyph.
... value <number> default value 0 animatable yes text for <text>, if it contains a single value, dy defines a shift along the y-axis for all glyphs.
... for <tref>, if it contains a single value, dy defines a shift along the y-axis for all glyphs.
... value list of <length> default value none animatable yes tspan for <tspan>, if it contains a single value, dy defines a shift along the y-axis for all alternate glyph.
Introduction to using XPath in JavaScript - XPath
note that, if the xpathexpression contains a namespace prefix, this will result in a domexception being thrown with the code namespace_err.
...there is a section in the appendix which contains a full list of the available constants.
... numbervalue stringvalue booleanvalue example the following uses the xpath expression count(//p) to obtain the number of <p> elements in an html document: var paragraphcount = document.evaluate( 'count(//p)', document, null, xpathresult.any_type, null ); alert( 'this document contains ' + paragraphcount.numbervalue + ' paragraph elements' ); although javascript allows us to convert the number to a string for display, the xpath interface will not automatically convert the numerical result if the stringvalue property is requested, so the following code will not work: var paragraphcount = document.evaluate('count(//p)', document, null, xpathresult.any_type, null ); alert( 'th...
...is document contains ' + paragraphcount.stringvalue + ' paragraph elements' ); instead, it will return an exception with the code ns_dom_type_error.
Understanding WebAssembly text format - WebAssembly
so for example, after executing the following function: (func (param $p i32) (result i32) local.get $p local.get $p i32.add) the stack contains exactly one i32 value — the result of the expression ($p + $p), which is handled by i32.add.
...for example, the following module contains two functions — one just returns the value 42, the other returns the result of calling the first plus one: (module (func $getanswer (result i32) i32.const 42) (func (export "getanswerplus1") (result i32) call $getanswer i32.const 1 i32.add)) note: i32.const just defines a 32-bit integer and pushes it onto the stack.
...webassembly contains instructions like i32.load and i32.store for reading and writing from linear memory.
... note: the wasm-bindgen documentation contains some useful information on how to take advantage of externref from rust.
clipboard - Archive of obsolete content
var clipboard = require("sdk/clipboard"); clipboard.set("<blink>lorem ipsum dolor sit amet</blink>", "html"); if the clipboard contains html content, open it in a new tab.
... var clipboard = require("sdk/clipboard"); clipboard.set("data:image/png;base64,ivborw0kggoaaaansuheugaaacaaaaagcaya" + "aabzenr0aaaasuleqvryhe3o0qkaiawd0eyqe3q993aq3cbsukpygfsnty" + "n5ugbqpk0baadgp0brdwxwlweaaaaagpsa3rzdaaaaahgpcgrpganzq2fg" + "bwrr9aaaaabjru5erkjggg%3d%3d"); if the clipboard contains an image, open it in a new tab.
...this property is an array contains all types in which the data currently on the clipboard is available.
context-menu - Archive of obsolete content
for example, this item appears whenever the context menu is invoked on a page that contains at least one image: require("sdk/context-menu").item({ label: "this page has images", contentscript: 'self.on("context", function (node) {' + ' return !!document.queryselector("img");' + '});' }); note that the listener function has a parameter called node.
...; cm.item({ label: "edit mozilla image", context: [ cm.urlcontext(["*.mozilla.org", "*.mozilla.com"]), cm.selectorcontext("img") ], contentscript: 'self.on("click", function (node, data) {' + ' self.postmessage(node.src);' + '});', onmessage: function (imgsrc) { openimageeditor(imgsrc); } }); show an "edit page images" item when the page contains at least one image: var cm = require("sdk/context-menu"); cm.item({ label: "edit page images", // this ensures the item only appears during the page context.
... selectioncontext() creates a context that occurs when a page contains a selection.
passwords - Archive of obsolete content
it contains the following properties: username the username.
...if it does, this property contains the value for the "realm" field.
... it takes an options object as an argument: this contains all the properties for the new credential.
self - Archive of obsolete content
name this property contains the add-on's short name.
... version this property contains the add-on's version string.
... loadreason this property contains of the following strings describing the reason your add-on was loaded: install enable startup upgrade downgrade isprivatebrowsingsupported this property indicates whether or not the add-on supports private browsing.
dev/panel - Archive of obsolete content
this file contains the specification of the panel's user interface.
...if the message reply in the remote debugging protocol would contain an actor id, then in volcan.js the object that fulfills the promise contains that actor instance.
... if the message reply contains some json object, then in volcan.js the object that fulfills the promise includes a corresponding json object.
stylesheet/style - Archive of obsolete content
source string,array a string, or an array of strings, that contains css rules.
... style properties source an array of strings that contains the css rule(s) specified in the constructor's option; null if no source option was given to the constructor.
... uri an array of strings that contains the stylesheet local uri(s) specified in the constructor's option; null if no uri option was given to the constructor.
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.
... boolean value: true if the add-on contains an embedded webextension.
... useful when the extension contains binaries.
Drag and Drop JavaScript Wrapper - Archive of obsolete content
the object contains a series of functions, one for each event handler (except for dragenter where it has nothing special to do).
...var textobserver = { getsupportedflavours : function () { var flavours = new flavourset(); flavours.appendflavour("text/unicode"); return flavours; } } the flavours list contains only one flavour, which is 'text/unicode'.
...by the time ondrop is called, the wrapper has called getsupportedflavours to determine the best flavour for the drop, so the transfer object only contains the data for the best matching flavour.
Repackaging Firefox - Archive of obsolete content
however, it's still recommended that you look through this tutorial, as it contains tips specific for creating extensions of this type, and there are a few options that you will need to set to ensure a smooth upgrade path for users.
...r.properties locale/nl/partner.properties locale/pl/partner.properties locale/pt-br/partner.properties locale/pt-pt/partner.properties locale/ru/partner.properties locale/sk/partner.properties locale/sv-se/partner.properties locale/tr/partner.properties locale/zh-cn/partner.properties locale/zh-tw/partner.properties partner-bookmarks.xml one by one, the files listed above are: chrome.manifest contains a specialized listing of the contents of the xpi.
...the source directory is a directory that contains the windows installer, mac disk image (.dmg), and/or linux tarball of the standard firefox that you wish to customize.
Creating a Help Content Pack - Archive of obsolete content
nc:base contains the base url relative to which the help content referenced in the descriptor file is located.
...an example of how to use this attribute follows: <!-- assumptions: win-toc.rdf contains windows- and os/2-specific info, unix-toc.rdf contains linux- and mac-specific info.
...nc:link contains a uri referencing what will be displayed in the viewer when the entry is accessed.
Modularization techniques - Archive of obsolete content
#include "nsifactory.h" // {d3944dd0-ae1a-11d1-b66c-00805f8a2676} #define ns_sample_cid \ {0xd3944dd0, 0xae1a, 0x11d1, \ {0xb6, 0x6c, 0x00, 0x80, 0x5f, 0x8a, 0x26, 0x76}} extern nsresult getsamplefactory(nsifactory **aresult); file nssample.cpp nssample.cpp contains both the declaration and implementation of our sample class, and the declaration and implementation of our class factory.
...a dll that contains a factory need to define one or two exported functions: // returns the factory associated with the given class id extern "c" ns_export nsresult nsgetfactory(const nscid &acid, nsifactory **afactory); // returns whether the dll can be unloaded now.
...if your dll contains multiple factories, you'll need to add conditional code to determine which one to return.
URIs and URLs - Archive of obsolete content
nssimpleuri contains setters and getters for the uri and the components of an uri: scheme and path (non-scheme).
...nsstandardurl also contains the facilities to parse these typ of urls, to break the specification of the url "spec" down into the most basic segments.
...to stay almost generic necko contains three parsers for the main classes of standard urls.
Introduction to XUL - Archive of obsolete content
this paper contains a short introduction to mozilla front-end architecture, concentrating on the task of building uis.
...the menubar contains a single menu called "file".
... this menu contains a single menu item that has a simple javascript onclick handler attached to it.
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
explanation: the chrome directory contains program files that are part of seamonkey itself, together with other files that are provided by extensions.
... explanation: this file contains details of your extension, and specifies how it modifies seamonkey.
... the next section in this tutorial contains examples of code that you can use to make your button do something useful.
Adding Style Sheets - Archive of obsolete content
style sheets a style sheet is a file which contains style information for elements.
...the style sheet contains information such as the fonts, colors, borders, and size of elements.
...in mozilla, this will be translated as the file global.css, which contains default style information for xul elements.
Creating a Window - Archive of obsolete content
this file contains all the default declarations for all of the xul elements.
...the syntax is described below: window.open(url,windowname,flags); where the flags contains the flag "chrome" as in this example window.open("chrome://navigator/content/navigator.xul", "bmarks", "chrome,width=600,height=300"); if you are using firefox, try below: window.open("chrome://browser/content/places/places.xul", "bmarks", "chrome,width=600,height=300"); you can test lines of javascript like these in the error console.
... the extension developer's extension contains an xul editor that allows you to type in xul code and see the results in real-time from within mozilla!
Grids - Archive of obsolete content
ArchiveMozillaXULTutorialGrids
a grid contains elements that are aligned in rows just like tables.
...each row contains two elements, both buttons.
...the second column contains a box in its second row, which in turn contains two elements, a textbox and a button.
Introduction to RDF - Archive of obsolete content
you can use any of the provided rdf datasources to populate trees with data or you can point to an rdf file stored in xml which contains the data.
...it contains a fairly simple set of elements.
...a bookmarks list contains a set of records, each with a set of data associated with it, such as a url, a bookmark title and a visited date.
More Tree Features - Archive of obsolete content
as can be seen in the image, a small plus or minus sign (often called a twisty) has appeared next to the first row, indicating that it contains child rows.
...the outer treeitem element contains a single treerow element and a treechildren element.
... the former creates the data for the parent row and the latter contains the child items.
Property Files - Archive of obsolete content
a property file contains a set of strings.
... here, the property file contains three properties.
...in case you need to format a string that already contains the percentage character in it (to get something like "50% off" returned), escape the percentage character with another percentage character, like this: my.percentage.string = %s%% off not escaping the percentage character will generate an incorrect string that strips the space character between the percentage character and the next word of the string ("50%off").
The Implementation of the Application Object Model - Archive of obsolete content
the downloaded file contains an aol instant messenger button, and the user really doesn't want that on the toolbar.
...it makes sense to maintain a clean separation between the web application and the web documents that the application contains.
...suppose that a bookmarks folder contains a mailbox folder, a composer page template, and a bookmark.
Application Update - Archive of obsolete content
other apps may wish to show this ui, and supply // a whatsnewurl field in their brand.properties that contains a link to a page // which tells users what's new in this new update.
... update.xml contains only information about the update.
... it points to the update mar file (a mozilla archive) which contains all files which are going to be updates it also contains a sha1 hash and file size used for verification of the update.
Monitoring plugins - Archive of obsolete content
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, receivin...
...the topic contains the notification's topic - experimental-notify-plugin-call in this case, the data is the runtime in milliseconds and the subject is always null and should not be used.
... clean up to unregister your class with the observer service - when you no longer want to be listening to runtime notifications - your class must include an unregister method that contains the following code: var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); observerservice.removeobserver(this, "experimental-notify-plugin-call"); skeleton observer class below is a skeleton class that you may use to listen to runtime notifications: function pluginobserver() { this...
NPP_SetWindow - Archive of obsolete content
the window structure contains a window handle and values for top left corner, width, height, and clipping rectangle (see note on unix below).
... 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.
... for windowed plug-ins on windows and unix, the window parameter contains a handle to a subwindow of the browser window hierarchy.
NPPrintCallbackStruct - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary contains information required by the platformprint field of the npembedprint structure during embedded mode printing on unix systems.
...syntax typedef struct { int32 type; file* fp; } npprintcallbackstruct; fields the data structure has the following fields: type always contains np_print.
...the npprintcallbackstruct structure contains the file pointer to which the plug-in should write its postscript data.
NPSavedData - Archive of obsolete content
description the npsaveddata object contains a block of per-instance information that the browser saves after the instance is deleted.
... this information can be returned to another instance of the same plug-in if the user returns to the web page that contains it.
...if the user revisits a web page that contains a plug-in, the browser returns the npsaveddata to the new instance of the plug-in in a call to npp_new().
NPWindow - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary contains information about the target into which the plug-in instance can draw.
... ws_info unix: contains information about the plug-in's unix window environment; points to an npsetwindowcallbackstruct.
...(the drawable is provided in a graphicsexpose event, when the paint is requested.) description the npwindow structure represents the native window or a drawable, and contains information about coordinate position, size, whether the plug-in is windowed or windowless, and some platform-specific information.
Introduction to SSL - Archive of obsolete content
this document is primarily intended for administrators of red hat server products, but the information it contains may also be useful for developers of applications that support ssl.
... to authenticate the binding between a public key and the server identified by the certificate that contains the public key, an ssl-enabled client must receive a "yes" answer to the four questions shown in figure 2.
... to authenticate the binding between the public key and the person or other entity identified by the certificate that contains the public key, an ssl-enabled server must receive a "yes" answer to the first four questions shown in figure 3.
Table Reflow Internals - Archive of obsolete content
overview review of reflow table frames table reflow intro to paginated reflow table paginated reflow review of reflow reflow process starts when an html document starts loading (the frame tree contains only viewport, scroll(s), canvas, html, body).
...absolutely positioned elements) reflows reflowee and passes a reflow state (in) and a reflow metrics (in/out) review of reflow the reflow state: is a node in a tree structurally equivalent to the frame tree of reflow participants contains: reflow type, avail size, various computed values, resolved style structs possible request for preferred size and more.
... review of reflow the reflow metrics contains: max element size (if requested) - the minimum size it can be preferred size (if requested) - the size it would like to be given no size constraints.
Theme changes in Firefox 2 - Archive of obsolete content
mozapps/extensions/notifybadges.png new file; contains the icons used ito badge the icons for add-ons in the add-on manager window to indicate their status.
... mozapps/extensions/viewbuttons.png new file; contains icons for each of the views that may be available in the add-ons manager.
... in the default theme, these look something like this: the top row contains dimmed versions of the icons below them.
Theme changes in Firefox 4 - Archive of obsolete content
in particular, the new file omni.jar contains most of the resources, including the skin.
... /chrome/browser/skin contains application-specific skin resource files.
... /chrome/toolkit/skin contains toolkit skin files.
XForms Output Element - Archive of obsolete content
image - if the instance node contains an image, then an output element can be used in combination with the mediatype element to display the image (fx 3.0 only, xhtml/xul).
... image if the bound instance node contains an image then you are free to use this representation to show the image instead of the byte sequence of the image data (fx 3.0 only, xhtml/xul).
... characteristics the bound instance node is of type xsd:anyuri, xsd:base64binary or a type derived from it either the mediatype attribute is present and contains the image's mimetype or the output element contains a mediatype element which specifies the image's mimetype (for example, image/*).
XForms Repeat Element - Archive of obsolete content
introduction a repeat element contains markup and is itself bound to a nodeset in an instance document (see the spec).
...to accommodate this, xforms 1.0 defines an alternative syntax that is functionally equivalent to the repeat element, using the following attributes: repeat-model repeat-bind repeat-nodeset repeat-startindex repeat-number additionally, when using xforms action setindex, its repeat attribute (which contains an idref) can point to any element carrying these repeat attributes.
...the id of the element that contains the repeat attributes can be used as the argument to index.
Desktop gamepad controls - Game development
here's the gamepadapi object, which contains useful variables and functions: var gamepadapi = { active: false, controller: {}, connect: function(event) {}, disconnect: function(event) {}, update: function() {}, buttons: { layout: [], cache: [], status: [], pressed: function(button, state) {} } axes: { status: [] } }; the controller variable stores the information ...
... the buttons variable contains the layout of a given controller (for example which buttons are where, because an xbox 360 layout may be different to a generic one), the cache containing the information about the buttons from the previous frame and the status containing the information from the current frame.
...ut the controller is stored in the object: connect: function(event) { gamepadapi.controller = event.gamepad; gamepadapi.active = true; }, the disconnect function removes the information from the object: disconnect: function(event) { delete gamepadapi.controller; gamepadapi.active = false; }, the update() function is executed in the update loop of the game on every frame, so it contains the latest information on the pressed buttons: update: function() { gamepadapi.buttons.cache = []; for(var k=0; k<gamepadapi.buttons.status.length; k++) { gamepadapi.buttons.cache[k] = gamepadapi.buttons.status[k]; } gamepadapi.buttons.status = []; var c = gamepadapi.controller || {}; var pressed = []; if(c.buttons) { for(var b=0,t=c.buttons.length; b<t; b++) { if(c.b...
Accessibility tree (AOM) - MDN Web Docs Glossary: Definitions of Web-related terms
the accessibility tree, or accessibility object model (aom), contains accessibility-related information for most html elements.
...the dom tree contains objects for all the markup’s elements, attributes, and text nodes.
... additionally, the accessibility tree often contains information on what can be done with an element: a link can be followed, a text input can be typed into, etc.
Images, media, and form elements - Learn web development
in the example below we have two boxes, both 200 pixels in size: one contains an image which is smaller than 200 pixels — it is smaller than the box and doesn't stretch to fill it.
... form elements form elements can be a tricky issue when it comes to styling with css, and the web forms module contains detailed guides to the trickier aspects of styling form elements, which i will not fully reproduce here.
... html5 also contains attributes that enable web developers to indicate which fields are required, and even the type of content that needs to be entered.
Attribute selectors - Learn web development
[attr~=value] p[class~="special"] matches elements with an attr attribute whose value is exactly value, or contains value in its (space separated) list of values.
... li[class~="a"] will match a class of a but also a value that contains the class of a as part of a whitespace-separated list.
... [attr*=value] li[class*="box"] matches elements with an attr attribute whose value contains value anywhere within the string.
Client-side form validation - Learn web development
if the field contains a value outside this range, it will be invalid.
... validity: returns a validitystate object that contains several properties describing the validity state of the element.
... emailerror.textcontent = `email should be at least ${ email.minlength } characters; you entered ${ email.value.length }.`; } // set the styling appropriately emailerror.classname = 'error active'; } the comments explain things pretty well, but briefly: every time we change the value of the input, we check to see if it contains valid data.
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 ac...
... // this function will be used each time we want to deactivate a custom control // it takes one parameter // select : the dom node with the `select` class to deactivate function deactivateselect(select) { // if the control is not active there is nothing to do if (!select.classlist.contains('active')) return; // we need to get the list of options for the custom control var optlist = select.queryselector('.optlist'); // we close the list of option optlist.classlist.add('hidden'); // and we deactivate the custom control itself select.classlist.remove('active'); } // this function will be used each time the user wants to (de)activate the control // it takes two paramete...
...rs: // select : the dom node with the `select` class to activate // selectlist : the list of all the dom nodes with the `select` class function activeselect(select, selectlist) { // if the control is already active there is nothing to do if (select.classlist.contains('active')) return; // we have to turn off the active state on all custom controls // because the deactivateselect function fulfills all the requirements of the // foreach callback function, we use it directly without using an intermediate // anonymous function.
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.
...this is the code we used: <p>japanese example: ご飯が熱い。</p> adding an author and description many <meta> elements include name and content attributes: name specifies the type of meta element it is; what type of information it contains.
...this takes two attributes, rel="stylesheet", which indicates that it is the document's stylesheet, and href, which contains the path to the stylesheet file: <link rel="stylesheet" href="my-css-file.css"> the <script> element should also go into the head, and should include a src attribute containing the path to the javascript you want to load, and defer, which basically instructs the browser to load the javascript at the same time as the page's html.
Adding vector graphics to the Web - Learn web development
on the web, you'll work with two types of image — raster images, and vector images: raster images are defined using a grid of pixels — a raster image file contains information showing exactly where each pixel is to be placed, and exactly what color it should be.
... popular web raster formats include bitmap (.bmp), png (.png), jpeg (.jpg), and gif (.gif.) vector images are defined using algorithms — a vector image file contains shape and path definitions that the computer can use to work out what the image should look like when rendered on the screen.
... the difference becomes apparent when you zoom in the page — the png image becomes pixellated as you zoom in because it contains information on where each pixel should be (and what color).
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
this contains the finished html structure and css styling, giving us a game board that shows the two players' information (as seen above), but with the spinner and results paragraph displayed on top of one another.
... a reference to the <div> element that contains the spinner, used for showing and hiding it.
... inside keyhandler(), the code includes the event object as a parameter (represented by e) — its key property contains the key that was just pressed, and you can use this to respond to specific key presses with specific actions.
Third-party APIs - Learn web development
the icon is defined using an mapquest.icons.marker() method, which as you can see contains information such as color and size of marker.
...initially the <script> element contains a number of variables needed for the setup of the example; below we'll fill in the required functionality.
... the first if() block checks to see if 10 articles are returned (the api returns up to 10 articles at a time.) if so, we display the <nav> that contains the previous 10/next 10 pagination buttons.
Basic math in JavaScript — numbers and operators - Learn web development
we have already used the most basic one, =, loads of times — it simply assigns the variable on the left the value stated on the right: let x = 3; // x contains the value 3 let y = 4; // y contains the value 4 x = y; // x now contains the same value y contains, 4 but there are some more complex types, which provide useful shortcuts to keep your code neater and more efficient.
... note that you can quite happily use other variables on the right hand side of each expression, for example: let x = 3; // x contains the value 3 let y = 4; // y contains the value 4 x *= y; // x now contains the value 12 note: there are lots of other assignment operators available, but these are the basic ones you should learn now.
...in this case, we are not testing if two mathematical expressions have the same value — we are testing whether the text content of a button contains a certain string — but it is still the same principle at work.
Object prototypes - Learn web development
most modern browsers, however, do offer property available called __proto__ (that's 2 underscores either side), which contains the object's constructor's prototype object.
... for example, try these commands in the console: person1.constructor person2.constructor these should both return the person() constructor, as it contains the original definition of these instances.
...this makes the code easier to read, as the constructor only contains the property definitions, and the methods are split off into separate blocks.
Getting started with React - Learn web development
the public directory contains files that will be read by your browser while you're developing the app; the most important of these is index.html.
... the package.json file contains information about our project that node.js/npm uses to keep it organized.
...this file contains our first component, app, and a few other lines of code: import react from 'react'; import logo from './logo.svg'; import './app.css'; function app() { return ( <div classname="app"> <header classname="app-header"> <img src={logo} classname="app-logo" alt="logo" /> <p> edit <code>src/app.js</code> and save to reload.
Deploying our app - Learn web development
the newly-created production code is placed in a new directory called dist, which contains all the files required to run the website, ready for you to upload to a server.
... you should enter the command npm run build for the build command, and specify the dist directory for the publish directory — this contains the code that we want to make public.
... find your scripts member, and update it so that it contains the following test and build commands: "scripts": { … "test": "node tests/*.js", "build": "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, an...
Multiple Firefox profiles
the beta channel contains the features that are expected to be in the next release of firefox and are in final stages of testing.
... aurora contains experimental features, which are not yet at beta quality.
... nightly contains the latest code from firefox developers and is the least stable channel.
Message manager overview
its most important functions and attributes are: childcount : contains the number of children (typically, browser windows) getchildat() : get the child at the given index loadframescript() : load a frame script into every tab in the browser broadcastasyncmessage() : send a message to frame scripts addmessagelistener() : start listening to a specific message from all frame scripts removemessagelistener() : stop listening to a specific message...
... its most important functions and attributes are: childcount : contains the number of children (typically, browser tabs) getchildat() : get the child at the given index loadframescript() : load a frame script into every tab in this window broadcastasyncmessage() : send a message to all frame scripts in this window addmessagelistener() : start listening to a specific message from frame scripts removemessagelistener() : stop listening to a spec...
... its most important functions and attributes are: childcount : contains the number of children (child processes, plus the in-content child) getchildat() : get the child at the given index loadprocessscript() : load a process script into every content process broadcastasyncmessage() : send a message to all process scripts addmessagelistener() : start listening to a specific message from process scripts removemessagelistener() : stop listening ...
Gecko SDK
furthermore, since a component contains basic functionality, it is intended to run with every product of the mozilla platform.
... the gecko sdk contains all of the necessary tools and headers for making scriptable npapi plugins including the xpidl compiler/linker and the latest npapi.h.
... contents of the sdk the sdk contains the following: 1.9.2 idl files for frozen interfaces (under idl/) header files for frozen interfaces, xpcom functions, and nspr functions (under include/) import libraries or shared libraries (under lib/) static utility libraries (under lib/) various tools (under bin/) for more information about safely linking xpcom components using the xpcom "glue" library, see xpcom glue.
Script security
expanded principal an expanded principal is specified as an array of origins: ["http://mozilla.org", "http://moz.org"] the expanded principal subsumes every content principal it contains.
... the content principals do not subsume the expanded principal, even if the expanded principal only contains a single content principal.
...the expanded principal gets full access to the content principals it contains, with xray vision by default, and the content principals get no access to the expanded principal.
Internationalized Domain Names (IDN) Support in Mozilla Browsers
if end users input non-ascii characters as part of a domain name or if a web page contains a link using a non-ascii domain name, the application must convert such input into a special encoded format using only the usual ascii subset characters.
...since the punycode contains only ascii characters, it is possible that an output may, though unlikely, coincide with existing domain names.
...since the unicode repertoire contains characters no longer used in any living languages and there are also living characters in most languages that are not suitable for uri/url creation, the icann guideline allows the governing body of each country's domain registrars to set appropriate limitations on the use of characters.
Localizing with Mercurial
mozilla-central contains the files for firefox nightly.
... comm-central contains the files for seamonkey and thunderbird which are not already part of firefox.
... l10n-central contains all of the l10n repos for firefox nightly.
Fonts for Mozilla 2.0's MathML engine
recommended fonts the stix fonts project has been developing a comprehensive set of fonts that cover all the symbols in mathml and also contains glyphs to stretch mathematical operators.
...the font only contains glyphs for stretchy operators that have unicode assignments.
...the font contains the necessary glyphs for stretchy operators but mozilla does not yet make use of all of these.
MathML Demo: <mo> - operator, fence, separator, or accent
binary operators and relations the following table contains instances of all operators found on the swp binary operations and binary relations panels.
... a ⊎ b ⋖ c a ⌆ b ⋗ c a ⨿ b ∣ c a ⊴ b ∥ c a ⊵ b ∼ c a ▽ b ≈ c a △ b ≊ c a ⋄ b ⪸ c a † b ⪷ c a ‡ b ∋ c a ⊞ b \vartriangle c arrows the following table contains instances of all arrows found on the swp arrows panel.
...- b ↫ c a + b ↬ c a - b ⊸ c a + b ⇛ c a - b ⇚ c a + b ↶ c a - b ↷ c a + b ⤏ c a - b ⤎ c a + b ⇒ c a - b ⇐ c a + b ⇔ c negated relations the following table contains instances of all negated relations found on the swp panel.
BloatView
this log contains data on leaks and bloat (a.k.a.
... reading individual bloat logs full bloatview output contains per-class statistics on allocations and refcounts, and provides gross numbers on the amount of memory being leaked broken down by class.
...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).
A guide to searching crash reports
the first link in each "signature" column cell links to a signature report, which contains additional details about crash reports with that signature.
... you can do things like: search for crashes where the signature is foo, and the proto signature contains bar.
...by default, it contains the value "signature", which explains why we saw a "signature facet" tab in the earlier search results.
NSS tools : crlutil
-i crl-import-file specify the file which contains the crl to import -f password-file specify a file that will automatically supply the password to include in a certificate or to access a certificate database.
...bracket the nickname string with quotation marks if it contains spaces.
...bracket the output-file string with quotation marks if it contains spaces.
sslerr.html
sec_error_unknown_critical_extension -8151 certificate contains unknown critical extension.
...r before performing this operation." sec_error_ocsp_malformed_response -8063 "the response from the ocsp server was corrupted or improperly formed." sec_error_ocsp_unauthorized_response -8062 "the signer of the ocsp response is not authorized to give status for this certificate." sec_error_ocsp_future_response -8061 "the ocsp response is not yet valid (contains a date in the future)." sec_error_ocsp_old_response -8060 "the ocsp response contains out-of-date information." sec_error_digest_not_found -8059 "the cms or pkcs #7 digest was not found in signed message." sec_error_unsupported_message_type -8058 "the cms or pkcs #7 message type is unsupported." sec_error_module_stuck -8057 "pkcs #11 mod...
...gged in." sec_error_ocsp_responder_cert_invalid -8036 "the configured ocsp responder's certificate is invalid." sec_error_ocsp_bad_signature -8035 "ocsp response has an invalid signature." sec_error_out_of_search_limits -8034 "certification validation search is out of search limits." sec_error_invalid_policy_mapping -8033 "policy mapping contains any-policy." sec_error_policy_validation_failed -8032 "certificate chain fails policy validation." sec_error_unknown_aia_location_type -8031 "unknown location type in certificate aia extension." sec_error_bad_http_response -8030 "server returned a bad http response." sec_error_bad_ldap_response -8029 "server returned a bad ldap response.
NSS Tools crlutil
-i crl-import-file specify the file which contains the crl to import -f password-file specify a file that will automatically supply the password to include in a certificate or to access a certificate database.
...bracket the nickname string with quotation marks if it contains spaces.
...bracket the output-file string with quotation marks if it contains spaces.
NSS tools : crlutil
MozillaProjectsNSStoolscrlutil
-i crl-import-file specify the file which contains the crl to import -f password-file specify a file that will automatically supply the password to include in a certificate or to access a certificate database.
...bracket the nickname string with quotation marks if it contains spaces.
...bracket the output-file string with quotation marks if it contains spaces.
NSS tools : signtool
signdir you may have trouble if the nickname contains a single quotation mark.
...the metadata file contains one entry per line, each with three fields: field #1: file specification, or + if you want to specify global metadata (that is, metadata about the jar archive itself or all entries in the archive) field #2: the name of the data you are specifying; for example: install-script field #3: data corresponding to the name in field #2 for example, th...
... -v archive displays the contents of an archive and verifies the cryptographic integrity of the digital signatures it contains and the files with which they are associated.
Rhino overview
rhino contains all the features of javascript 1.7 allows direct scripting of java a javascript shell for executing javascript scripts a javascript compiler to transform javascript source files into java class files a javascript debugger for scripts executed with rhino language the javascript language itself is standardized by standard ecma-262 ecmascript: a general purpose, cross-platform programming language.
...javascript: the definitive guide is recommended, and contains a chapter on rhino.
...in a typical client embedding, this object might be a string with the url of the server that supplied the script, or an object that contains a representation of the signers of a piece of code for certificate-based security policies.
Tracing JIT
the nanojit component is language agnostic, and contains no knowledge about spidermonkey or any other part of the mozilla codebase.
...therefore an assembler contains several machine-specific methods which are implemented in the accompanying nanojit/native*.* files.
... if the recorder is asked to record a bytecode that implies a call to a native function elsewhere in spidermonkey -- some helper function written in c -- and that native happens to re-enter the interpreter to interpret yet more bytecode, and furthermore if that bytecode itself contains a hot pc that has not yet been traced, the trace monitor may be asked to begin nested recording.
TPS Tests
a phase runs in some firefox profile, and contains some set of actions to perform or check on that profile.
...each phase block contains the name of a phase, and a list of actions.
...the sync_wipe_server argument causes tps to set the firstsync="wipeserver" pref before syncing, in case the sync account already contains data (this is typically unnecessary, and done largely as an example).
Feed content access API
contains the person's name, email address, and their home page address.
... 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.
...this array contains nsifeedentry objects that describe each feed item.
Setting up the Gecko SDK
each module directory is divided into three subdirectories: module subdirectories the bin directory contains static libraries, dynamic libraries, and in some cases tools that may be useful in development.
... the idl directory contains the public idl files exported by the module.
... the includes directory contains c++ header files used by your component.
Starting WebLock
each category contains a set of name-value pairs.
... the xpcom api reference contains detailed information on nsifile and other xpcom interfaces.
...in the example below, appdir will point to the directory that contains the executable.
Introduction to XPCOM for the DOM
an_iid \ {0xxxxxxxxx, 0xxxxx, 0xxxxx, \ { 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx }} class nsidomfabian : public nsisupports { public: ns_imethod fabian(void) = 0; ns_imethod getneat(prbool *aneat) = 0; }; #define ns_decl_nsidomfabian #define ns_forward_nsidomfabian(_to) #define ns_forward_safe_nsidomfabian(_to) as we can see, the auto-generated header file contains the iid of our interface, and a "pure abstract class" is correctly defined.
...we also saw that an interface defined in xpidl contains methods and attributes, which are transformed into c++ functions by the xpidl compiler.
...if we look at nsidomhtmlanchorelement (which contains the methods and properties defined by the w3c for this element), we can see that it inherits from another interface, nsidomhtmlelement: interface nsidomhtmlanchorelement : nsidomhtmlelement this means that whatever class implements the nsidomhtmlanchorelement interface will also have to implement the nsidomhtmlelement interface.
NS_ConvertASCIItoUTF16
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset print32 findcharinset(const prunichar*, print32) const - source parameters prunichar* as...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters prunichar* astring print32 aoffset print32 rfindcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset equalsignorecase prbool equalsignorecase(const char*, print32) const - source parameters char* astring print32 acount tofloat float tofloat(print32*) const - source perform string to float conversion.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
NS_ConvertUTF16toUTF8
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset rfindcharinset print32 rfindcharinset(const char*, print32) const - source this met...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 rfindcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset compare print32 compare(const char*, prbool, print32) const - source compares a given string to this string.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
NS_ConvertUTF8toUTF16
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset print32 findcharinset(const prunichar*, print32) const - source parameters prunichar* as...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters prunichar* astring print32 aoffset print32 rfindcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset equalsignorecase prbool equalsignorecase(const char*, print32) const - source parameters char* astring print32 acount tofloat float tofloat(print32*) const - source perform string to float conversion.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
NS_LossyConvertUTF16toASCII
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset rfindcharinset print32 rfindcharinset(const char*, print32) const - source this met...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 rfindcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset compare print32 compare(const char*, prbool, print32) const - source compares a given string to this string.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsAdoptingCString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset rfindcharinset print32 rfindcharinset(const char*, print32) const - source this met...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 rfindcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset compare print32 compare(const char*, prbool, print32) const - source compares a given string to this string.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsAdoptingString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset print32 findcharinset(const prunichar*, print32) const - source parameters prunichar* as...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters prunichar* astring print32 aoffset print32 rfindcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset equalsignorecase prbool equalsignorecase(const char*, print32) const - source parameters char* astring print32 acount tofloat float tofloat(print32*) const - source perform string to float conversion.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsCString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset rfindcharinset print32 rfindcharinset(const char*, print32) const - source this met...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 rfindcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset compare print32 compare(const char*, prbool, print32) const - source compares a given string to this string.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsDependentCString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset rfindcharinset print32 rfindcharinset(const char*, print32) const - source this met...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 rfindcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset compare print32 compare(const char*, prbool, print32) const - source compares a given string to this string.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsDependentString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset print32 findcharinset(const prunichar*, print32) const - source parameters prunichar* as...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters prunichar* astring print32 aoffset print32 rfindcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset equalsignorecase prbool equalsignorecase(const char*, print32) const - source parameters char* astring print32 acount tofloat float tofloat(print32*) const - source perform string to float conversion.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsFixedCString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset rfindcharinset print32 rfindcharinset(const char*, print32) const - source this met...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 rfindcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset compare print32 compare(const char*, prbool, print32) const - source compares a given string to this string.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsFixedString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset print32 findcharinset(const prunichar*, print32) const - source parameters prunichar* as...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters prunichar* astring print32 aoffset print32 rfindcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset equalsignorecase prbool equalsignorecase(const char*, print32) const - source parameters char* astring print32 acount tofloat float tofloat(print32*) const - source perform string to float conversion.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsPromiseFlatCString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset rfindcharinset print32 rfindcharinset(const char*, print32) const - source this met...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 rfindcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset compare print32 compare(const char*, prbool, print32) const - source compares a given string to this string.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsPromiseFlatString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset print32 findcharinset(const prunichar*, print32) const - source parameters prunichar* as...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters prunichar* astring print32 aoffset print32 rfindcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset equalsignorecase prbool equalsignorecase(const char*, print32) const - source parameters char* astring print32 acount tofloat float tofloat(print32*) const - source perform string to float conversion.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset print32 findcharinset(const prunichar*, print32) const - source parameters prunichar* as...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters prunichar* astring print32 aoffset print32 rfindcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset equalsignorecase prbool equalsignorecase(const char*, print32) const - source parameters char* astring print32 acount tofloat float tofloat(print32*) const - source perform string to float conversion.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsXPIDLCString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset rfindcharinset print32 rfindcharinset(const char*, print32) const - source this met...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 rfindcharinset(const nscstring&, print32) const - source parameters nscstring& astring print32 aoffset compare print32 compare(const char*, prbool, print32) const - source compares a given string to this string.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsXPIDLString
@param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters char* astring print32 aoffset print32 findcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset print32 findcharinset(const prunichar*, print32) const - source parameters prunichar* as...
... @param astring contains set of chars to be found @param aoffset tells us where in this string to start searching (counting from left) @return offset in string, or knotfound parameters prunichar* astring print32 aoffset print32 rfindcharinset(const nsstring&, print32) const - source parameters nsstring& astring print32 aoffset equalsignorecase prbool equalsignorecase(const char*, print32) const - source parameters char* astring print32 acount tofloat float tofloat(print32*) const - source perform string to float conversion.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
mozIStorageService
if your database contains virtual tables (for example, for full-text indexes), you must use mozistorageservice.openunshareddatabase() to open it, since those tables are not compatible with a shared cache.
... ns_error_file_corrupted the database file is corrupted, or contains virtual tables and is not compatible with this method.
... ns_error_file_corrupted the database file is corrupted, or contains virtual tables and is not compatible with this method.
nsICryptoHash
you can, for example, calculate the sha256 hash of a file to determine if it contains the data you think it does.
...var s = array.from(hash, (c, i) => tohexstring(hash.charcodeat(i))).join(""); // s now contains your hash in hex this gives 5eb63bbbe01eeed093cb22bb8f5acdc3 for the hash value.
...var s = array.from(hash, (c, i) => tohexstring(hash.charcodeat(i))).join(""); // s now contains your hash in hex: should be // 5eb63bbbe01eeed093cb22bb8f5acdc3 see also firefox 1.5 ...
nsIIOService
in that case the principal of the stylesheet which contains the import command is the triggeringprincipal, and the principal of the document whose rendering is affected is the loadingprincipal.
...in that case the principal of the stylesheet which contains the import command is the triggeringprincipal, and the principal of the document whose rendering is affected is the loadingprincipal.
...in that case the principal of the stylesheet which contains the import command is the triggeringprincipal, and the principal of the document whose rendering is affected is the loadingprincipal.
nsIMsgDatabase
me, in boolean acreate, in boolean aleaveinvaliddb); void forcefolderdbclosed(in nsimsgfolder afolder); void close(in boolean aforcecommit); void commit(in nsmsgdbcommit committype); void forceclosed(); void clearcachedhdrs; void resethdrcachesize(in unsigned long size); nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); nsimsgdbhdr getmsghdrformessageid(in string messageid); boolean containskey(in nsmsgkey key); nsimsgdbhdr createnewhdr(in nsmsgkey key); void addnewhdrtodb(in nsimsgdbhdr newhdr, in boolean notify); nsimsgdbhdr copyhdrfromexistinghdr(in nsmsgkey key, in nsimsgdbhdr existinghdr, in boolean addhdrtodb); void listallkeys(in nsmsgkeyarrayref outputkeys); native code only!
... void forceclosed(); clearcachedhdrs() void clearcachedhdrs(); resethdrcachesize() void resethdrcachesize(in unsigned long size); getmsghdrforkey() nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); parameters key getmsghdrformessageid() nsimsgdbhdr getmsghdrformessageid(in string messageid); parameters messageid containskey() returns whether or not this database contains the given key.
... boolean containskey(in nsmsgkey key); parameters key createnewhdr() must call addnewhdrtodb after creating.
nsIMsgFolder
sortkeys(in nsimsgfolder msgfolder); [noscript] void getsortkey(out octet_ptr key, out unsigned long length); boolean callfilterplugins(in nsimsgwindow amsgwindow); acstring getstringproperty(in string propertyname); void setstringproperty(in string propertyname, in acstring propertyvalue); boolean isancestorof(in nsimsgfolder folder); boolean containschildnamed(in astring name); nsimsgfolder getchildnamed(in astring aname); nsimsgfolder findsubfolder(in acstring escapedsubfoldername); void addfolderlistener(in nsifolderlistener listener); void removefolderlistener(in nsifolderlistener listener); void notifypropertychanged(in nsiatom property, in acstring oldvalue, in acstring newvalue); voi...
... boolean isancestorof(in nsimsgfolder folder); containschildnamed() looks in immediate children of this folder for the given name.
... boolean containschildnamed(in astring name); getchildnamed() return the child folder which the specified name.
XPIDL
this infallible getter contains code that calls the fallible getter, asserts success, and returns the gotten value directly.
... out and inout parameters are reflected as objects having the .value property which contains the real value of the parameter; it is not initialized in the case of out parameters and is initialized to the passed-in-value for inout parameters.
...naturally, a method which contains a retval parameter must be declared void, and the parameter itself must be an out parameter and the last parameter.
Building a Thunderbird extension 1: introduction
the tutorial has the following pages: introduction (this page) the extension filesystem (setting up your local system) install manifest (the install.rdf file that contains meta-information about the extension) chrome manifest (list of packages and overlays) xul (the xml user interface language that is used to modify the thunderbird user interface) adding javascript (explains how to add some simple javascript to your thunderbird extension) installing locally (enabling the extension on your local thunderbird instance) packaging (making a distribution package tha...
...t contains the extension) distributing (from your own site or from http://addons.mozilla.org/) this tutorial is compatible with thunderbird versions 2,3 and 5.
... documentation thunderbird extensions (documentation overview) firefox addons developer guide (many topics are applicable to thunderbird) mozilla cross-reference source code browser ("comm-central" contains the thunderbird code repository) community the thunderbird development community has a mailing list with an extensive searchable archive with an extensive searchable archive.
PKCS #11 Netscape Trust Objects - Network Security Services
conceptually a trust object contains the following: certificate reference purpose + level of trust (multiple) purpose + level of trust a trust object ultimately denotes a level of trust in a certificate.
...a trust object contains multiple purposes and the level of trust for each one.
... certificate reference each trust object contains a reference to a certificate.
Network request list - Firefox Developer Tools
starting in firefox 45, the timeline also contains two vertical lines: the blue line marks the point at which the page's domcontentloaded event is triggered.
...(click the icon again when you want to close the sidebar.) enter a string in the field with the placeholder text block resource when url contains.
...you can filter by plain text (in which case the text is used to find partial matches; entering "for" will match any message that contains the word "for") or—as of firefox 75—using regular expressions (by writing the regexp bracketed within slashes; "/.+corp.*/" will look for any occurrence of "corp" which has at least one character before it and may or may not have any characters after it, for example).
Pixel manipulation with canvas - Web APIs
it contains the following read-only attributes: width the width of the image in pixels.
... the uint8clampedarray contains height × width × 4 bytes of data, with index values ranging from 0 to (height×width×4)-1.
... note: be aware that if the canvas contains any pixels that were obtained from another origin without using cors, the canvas is tainted and its contents can no longer be read and saved.
DOMException - Web APIs
properties domexception.code read only returns a short that contains one of the error code constants, or 0 if none match.
... domexception.name read only returns a domstring that contains one of the strings associated with an error name.
...(legacy code value: 4 and legacy constant name: wrong_document_err) invalidcharactererror the string contains invalid characters.
DataTransfer - Web APIs
datatransfer.files contains a list of all the local files available on the data transfer.
...if data for the specified type does not exist, or the data transfer contains no data, this method will have no effect.
... datatransfer.getdata() retrieves the data for a given type, or an empty string if data for that type does not exist or the data transfer contains no data.
Element.classList - Web APIs
WebAPIElementclassList
use the classlist api to remove and add classes div.classlist.remove("foo"); div.classlist.add("anotherclass"); // <div class="anotherclass"></div> console.log(div.outerhtml); // if visible is set remove it, otherwise add it div.classlist.toggle("visible"); // add/remove visible, depending on test conditional, i less than 10 div.classlist.toggle("visible", i < 10 ); console.log(div.classlist.contains("foo")); // add or remove multiple classes div.classlist.add("foo", "bar", "baz"); div.classlist.remove("foo", "bar", "baz"); // add or remove multiple classes using spread syntax const cls = ["foo", "bar"]; div.classlist.add(...cls); div.classlist.remove(...cls); // replace class "foo" with class "bar" div.classlist.replace("foo", "bar"); versions of firefox before 26 do not implement the u...
...ototype = new error; var wsre = /[\11\12\14\15\40]/, wsindex = 0, checkifvalidclasslistentry = function(o, v) { if (v === "") throw new domexception( "failed to execute '" + o + "' on 'domtokenlist': the token provided must not be empty." ); if((wsindex=v.search(wsre))!==-1) throw new domexception("failed to execute '"+o+"' on 'domtokenlist': " + "the token provided ('"+v[wsindex]+"') contains html space characters, which are not valid in tokens."); } // 2.
...peof testclass.replace("a", "b") !== "boolean") domtokenlistproto.replace = function(oldtoken, newtoken){ checkifvalidclasslistentry("replace", oldtoken), checkifvalidclasslistentry("replace", newtoken); var oldvalue = this.value; return (this.remove(oldtoken), this.value !== oldvalue && (this.add(newtoken), true)); }; if (!domtokenlistproto.contains) domtokenlistproto.contains = function(value){ for (var i=0,len=this.length; i !== len; ++i) if (this[i] === value) return true; return false; }; if (!domtokenlistproto.foreach) domtokenlistproto.foreach = function(f){ if (arguments.length === 1) for (var i = 0, len = this.length; i !== len; ++i) f( this[i], i, this); else for (var i=0,len=this.length,targ=...
HTMLCanvasElement.getContext() - Web APIs
contextattributes you can use several context attributes when creating your rendering context, for example: const gl = canvas.getcontext('webgl', { antialias: false, depth: false }); 2d context attributes: alpha: boolean that indicates if the canvas contains an alpha channel.
... webgl context attributes: alpha: boolean that indicates if the canvas contains an alpha buffer.
... premultipliedalpha: boolean that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha.
HTMLImageElement - Web APIs
this is different from a client-side image map, specified using an <img> element and a corresponding <map> which contains <area> elements indicating the clickable areas in the image.
... htmlimageelement.src a usvstring that reflects the src html attribute, which contains the full url of the image including base uri.
...the <map> in turn contains <area> elements indicating the clickable areas in the image.
Recommended Drag Types - Web APIs
for example, this sample text/uri-list data contains two links and a comment: http://www.mozilla.org #a second link http://www.example.com when retrieving a dropped link, ensure you handle when multiple links are dragged, including any comments.
... the following example shows how to create an area for receiving dropped files: <listbox ondragenter="return checkdrag(event)" ondragover="return checkdrag(event)" ondrop="dodrop(event)"/> <script> function checkdrag(event) { return event.datatransfer.types.contains("application/x-moz-file"); } function dodrop(event) { var file = event.datatransfer.mozgetdataat("application/x-moz-file", 0); if (file instanceof components.interfaces.nsifile) { event.currenttarget.appenditem(file.leafname); } } </script> in this example, the event returns false only if the data transfer contains the application/x-moz-file type.
... as a result, the contains method no longer works; the includes method should be used instead to check if a specific type of data is provided, using code like the following: if ([...event.datatransfer.types].includes('text/html')) { // do something } you could use feature detection to determine which method is supported on types, then run code as appropriate.
IDBDatabase - Web APIs
" y="1" width="110" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="206" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">idbdatabase</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties idbdatabase.name read only a domstring that contains the name of the connected database.
... idbdatabase.version read only a 64-bit integer that contains the version of the connected database.
... idbdatabase.objectstorenames read only a domstringlist that contains a list of the names of the object stores currently in the connected database.
Keyboard API - Web APIs
keyboard api concepts and usage keyboard mapping on physical keyboards, the code attribute contains the physical location of the key that was pressed, and the key attribute contains the string generated by pressing the key at that physical location on the keyboard.
...keyboard provides the keyboard.getlayoutmap method, which returns a promise that resolves with a keyboardlayoutmap object that contains members for converting codes to keys.
... to capture the "w", "a", "s", and "d" keys, call lock() with a list that contains the key code attribute value for each of these keys: navigator.keyboard.lock(["keyw", "keya", "keys", "keyd"]); this captures these keys regardless of which modifiers are used with the key press.
Node - Web APIs
WebAPINode
node.contains() returns a boolean value indicating whether or not a node is a descendant of the calling node.
... if callback is omitted, the function returns an array instead, which contains rootnode and all nodes contained within.
...this can be used to abort loops once a node has been found (such as searching for a text node which contains a certain string).
OffscreenCanvas.getContext() - Web APIs
contextattributes you can use several context attributes when creating your rendering context, for example: offscreen.getcontext("webgl", { antialias: false, depth: false }); 2d context attributes: alpha: boolean that indicates if the canvas contains an alpha channel.
... webgl context attributes: alpha: boolean that indicates if the canvas contains an alpha buffer.
... premultipliedalpha: boolean that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha.
Pointer events - Web APIs
additionally, a pointer event contains the usual properties present in mouse events (client coordinates, target element, button states, etc.) in addition to new properties for other forms of input: pressure, contact geometry, tilt, etc.
... examples this section contains examples of basic usage of using the pointer events interfaces.
...this section contains information about pointer event and mouse event interaction and the ramifications for application developers.
RTCPeerConnection.createAnswer() - Web APIs
the answer contains information about any media already attached to the session, codecs and options supported by the browser, and any ice candidates already gathered.
... syntax apromise = rtcpeerconnection.createanswer([options]); rtcpeerconnection.createanswer(successcallback, failurecallback[, options]); parameters options optional an object which contains options which customize the answer; this is based on the rtcansweroptions dictionary.
... return value a promise whose fulfillment handler is called with an object conforming to the rtcsessiondescriptioninit dictionary which contains the sdp answer to be delivered to the other peer.
SVGAnimatedString.animVal - Web APIs
animval attribute or animval property contains the same value as the baseval property.if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, then it contains the same value as baseval the animval property is a read only property.
...as a result, the animval property contains the same value as the baseval property.
ServiceWorkerGlobalScope - Web APIs
idth="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="481" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">serviceworkerglobalscope</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties serviceworkerglobalscope.clients read only contains the clients object associated with the service worker.
... serviceworkerglobalscope.registration read only contains the serviceworkerregistration object that represents the service worker's registration.
... serviceworkerglobalscope.caches read only contains the cachestorage object associated with the service worker.
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.
... recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
Text - Web APIs
WebAPIText
if an element has no markup within its content, it has a single child implementing text that contains the element's text.
... however, if the element contains markup, it is parsed into information items and text nodes that form its children.
... text.iselementcontentwhitespace read only returns a boolean flag indicating whether or not the text node contains only whitespace.
Signaling and video calling - Web APIs
ent.queryselector(".userlistbox"); while (listelem.firstchild) { listelem.removechild(listelem.firstchild); } msg.users.foreach(function(username) { var item = document.createelement("li"); item.appendchild(document.createtextnode(username)); item.addeventlistener("click", invite, false); listelem.appendchild(item); }); } after getting a reference to the <ul> which contains the list of user names into the variable listelem, we empty the list by removing each of its child elements.
... finally, we append the new item to the <ul> that contains all of the user names.
... each object in iceservers contains at least a urls field providing urls at which the specified server can be reached.
Web Video Text Tracks Format (WebVTT) - Web APIs
a webvtt file (.vtt) contains cues, which can be either a single line or multiple lines, as shown below: webvtt 00:01.000 --> 00:04.000 - never drink liquid nitrogen.
... each cue timing contains five components: timestamp for start time.
...in normal usage the payload contains the subtitles to be displayed.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
a2a6a10a14a3a7a11a15a4a8a12a16]\left [ \begin{matrix} a_{1} & a_{5} & a_{9} & a_{13} \\ a_{2} & a_{6} & a_{10} & a_{14} \\ a_{3} & a_{7} & a_{11} & a_{15} \\ a_{4} & a_{8} & a_{12} & a_{16} \end{matrix} \right ] is represented in array form like this: let matrixarray = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16]; in this array, the leftmost column contains the entries a1, a2, a3, and a4.
... the topmost row contains the entries a1, a5, a9, and a13.
...in this case, we're passing in the webgl context, gl, the xrview view, a scenedata object (which contains things like the vertex and fragment shaders, vertex lists, textures, and so forth), and deltatime, which indicates how much time has passed since the previous frame, so that we know how far to advance the animation.
XSLT Basic Example - Web APIs
the example will take an xml document that contains information (title, list of authors and body text) about an article and present it in an human readable form.
...the xml document (example.xml) contains the information about the article.
...an xslt stylesheet starts with the xsl:stylesheet element, which contains all the templates used to create the final output.
Generating HTML - Web APIs
the second example will transform the input document (example2.xml), which again contains information about an article, into an html document.
... the <body> element of the article now contains html elements (a <b> and <u> tag, see figure 2).
... the xml document contains both html elements and xml elements, but only one namespace is needed, namely for the xml elements.
ARIA: application role - Accessibility
description the application role indicates to assistive technologies that this part of the web content contains elements that do not conform to any other known html element or wai-aria widget.
... if the web application encompassed by the application role contains parts that should be treated like normal web content, a role of document or article should be used.
... aria-describedby used to indicate the idref of an element that contains additional instructions for navigating or operating this element.
ARIA: feed role - Accessibility
the feed pattern enables reliable assistive technology reading mode interaction by establishing the following interoperability agreement between the web page and assistive technologies: in the context of a feed, the web page code is responsible for: appropriate visual scrolling of the content based on which article contains dom focus.
... loading or removing feed articles based on which article contains dom focus.
... in the context of a feed, assistive technologies with a reading mode are responsible for: indicating which article contains the reading cursor by ensuring the article element or one of its descendants has dom focus.
ARIA: rowgroup role - Accessibility
a rowgroup contains one or more rows of cells, grid cells, column headers, or row headers within a grid, table or treegrid.
...each row, in turn, contains child cells.
...a row contains one or more cells, gridcell, or column headers, and sometimes a row header.
ARIA: textbox role - Accessibility
the value of aria-controls is the id of the element that contains the list of suggested values.
... additionally, either the textbox or a containing element with role combobox has a value for aria-haspopup that matches the role of the element that contains the list of suggested values.
...if it also contains content, this should be announced as with a regular textbox.
WAI-ARIA Roles - Accessibility
a figure is generally considered to be one or more images, code snippets, or other content that puts across information in a different way to a regular flow of text.aria: form rolethe form landmark role can be used to identify a group of elements on a page that provide equivalent functionality to an html form.aria: grid rolethe grid role is for a widget that contains one or more rows of cells.
...a row contains one or more cells, grid cells or column headers, and possibly a row header, within a grid, table or treegrid, and optionally within a rowgroup.aria: rowgroup rolean element with role="rowgroup" is a group of rows within a tabular structure.
... a rowgroup contains one or more rows of cells, grid cells, column headers, or row headers within a grid, table or treegrid.aria: search rolethe search landmark role is used to identify a section of the page used to search the page, site, or collection of sites.aria: suggestion rolethe suggestion landmark role semantically denotes a single proposed change to an editable document.
Accessibility documentation index - Accessibility
64 aria: grid role aria, html the grid role is for a widget that contains one or more rows of cells.
...a row contains one or more cells, grid cells or column headers, and possibly a row header, within a grid, table or treegrid, and optionally within a rowgroup.
...a rowgroup contains one or more rows of cells, grid cells, column headers, or row headers within a grid, table or treegrid.
Text labels and names - Accessibility
a common navigation technique for users of assistive technology is to infer what content a page contains by reading its title.
...without a title, users of assistive technologies have to navigate into the frame in order to understand what it contains, which can be difficult and confusing.
...without a title, users of assistive technologies have to navigate into the frame in order to understand what it contains, which can be difficult and confusing.
Understandable - Accessibility
your site should provide a glossary that contains definitions of such words/terms that you can then link to when they appear, or at the very least provide definitions somewhere in the surrounding text, or in a description list at the bottom of the page.
... the <abbr> element is often thought of as the preferred way to provide an expansion for an abbreviation — it takes a title attribute that contains the expansion, and this appears when the acronym is moused over.
... globaleventhandlers.onfocus contains some useful information.
Visual formatting model - CSS: Cascading Style Sheets
the principal box when an element generates one or more boxes, one of them is the principal box, which contains its descendant boxes and generated content in the box tree, and is also the box involved in any positioning scheme.
... block containers a block container either contains only inline-level boxes participating in an inline formatting context, or only block-level boxes participating in a block formatting context.
...an element is a block container only if it contains block-level or inline-level boxes.
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
the above example shows usage of the <img> element: the src attribute is required, and contains the path to the image you want to embed.
...if the srcset attribute is absent, or contains no values with a width descriptor, then the sizes attribute has no effect.
...on browsers supporting srcset, src is treated like a candidate image with a pixel density descriptor 1x, unless an image with this pixel density descriptor is already defined in srcset, or unless srcset contains w descriptors.
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
events change and input supported common attributes required additional attributes accept, capture, files, multiple idl attributes files and value dom interface htmlinputelement properties properties that apply only to elements of type file methods select() value a file input's value attribute contains a domstring that represents the path to the selected file(s).
... each file object contains the following information: name the file's name.
... grab the filelist object that contains the information on all the selected files, and store it in a variable called curfiles.
<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 ...
...our above example contains a placeholder saying that the value should be a multiple of 10, so it makes sense to add a step value of 10: <input type="number" placeholder="multiple of 10" step="10"> in this example, you should find that the up and down step arrows will increase and decrease the value by 10 each time, not 1.
... text we have been using so far: <input type="number" placeholder="x10" step="10" min="0" max="100" id="number"> then we add some css to narrow the width of the element with the id selector #number: #number { width: 3em; } the result looks like this: offering suggested values you can provide a list of default options from which the user can select by specifying the list attribute, which contains as its value the id of a <datalist>, which in turn contains one <option> element per suggested value.
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
value the <input> element's value attribute contains a domstring which is automatically validated as conforming to url syntax.
... 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 display in the input field w...
...the list attribute specifies the id of a <datalist>, which in turn contains one <option> element per suggested value; each option's value is the corresponding suggested value for the url entry box.
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
content this attribute contains the value for the http-equiv or name attribute, depending on which is used.
... refresh this instruction specifies: the number of seconds until the page should be reloaded - only if the content attribute contains a positive integer.
... the number of seconds until the page should redirect to another - only if the content attribute contains a positive integer followed by the string ';url=', and a valid url.
<title>: The Document Title element - HTML: Hypertext Markup Language
WebHTMLElementtitle
it only contains text; tags within the element are ignored.
... permitted parents a <head> element that contains no other <title> element.
... a common navigation technique for users of assistive technology is to read the page title and infer the content the page contains.
Global attributes - HTML: Hypertext Markup Language
the attribute contains one “language tag” (made of hyphen-separated “language subtags”) in the format defined in tags for identifying languages (bcp47).
... style contains css styling declarations to be applied to the element.
... title contains a text representing advisory information related to the element it belongs to.
A re-introduction to JavaScript (JS tutorial) - JavaScript
for (var i = 0; i < 5; i++) { // will execute 5 times } javascript also contains two other prominent for loops: for...of for (let value of array) { // do something with value } and for...in: for (let property in object) { // do something with object property } the && and || operators use short-circuit logic, which means whether they will execute their second operand is dependent on the first.
...javascript is a prototype-based language that contains no class statement, as you'd find in c++ or java (this is sometimes confusing for programmers accustomed to languages with a class statement).
...in this snippet, ...args (including the ellipsis) is called the "rest arguments" — as the name implies, this contains the rest of the arguments.
Control flow and error handling - JavaScript
the javascript reference contains exhaustive details about the statements in this chapter.
... the try...catch statement consists of a try block, which contains one or more statements, and a catch block, containing statements that specify what to do if an exception is thrown in the try block.
... the finally block the finally block contains statements to be executed after the try and catch blocks execute.
Math.hypot() - JavaScript
polyfill a naive approach that does not handle overflow/underflow issues: if (!math.hypot) math.hypot = function() { var y = 0, i = arguments.length, containsinfinity = false; while (i--) { var arg = arguments[i]; if (arg === infinity || arg === -infinity) containsinfinity = true y += arg * arg } return containsinfinity ?
... infinity : math.sqrt(y) } a polyfill that avoids underflows and overflows: if (!math.hypot) math.hypot = function () { var max = 0; var s = 0; var containsinfinity = false; for (var i = 0; i < arguments.length; ++i) { var arg = math.abs(number(arguments[i])); if (arg === infinity) containsinfinity = true if (arg > max) { s *= (max / arg) * (max / arg); max = arg; } s += arg === 0 && max === 0 ?
... 0 : (arg / max) * (arg / max); } return containsinfinity ?
try...catch - JavaScript
description the try statement consists of a try-block, which contains one or more statements.
...this gives us three forms for the try statement: try...catch try...finally try...catch...finally a catch-block contains statements that specify what to do if an exception is thrown in the try-block.
... function isvalidjson(text) { try { json.parse(text); return true; } catch { return false; } } the finally-block the finally-block contains statements to execute after the try-block and catch-block(s) execute, but before the statements following the try...catch...finally-block.
Digital audio concepts - Web media technologies
each channel contains a sample indicating the amplitude of the audio being produced by that source at a given moment in time.
...each audio frame is a data record that contains the samples for all of the channels available in an audio signal.
...in particular, the waveform for music is almost always more complex than that of an audio sample that contains only human voices.
Image file type and format guide - Web media technologies
each image consists of 2 to 4 #define directives, providing the width and height of the bitmap (and optionally the hotspot, if the image is designed as a cursor), followed by an array of unsigned char, where each value contains 8 1-bit monochrome pixels.
...type image/xbm, image-xbitmap file extension(s) .xbm specification none browser compatibility firefox 1–3.5, internet explorer 1–5 maximum dimensions unlimited supported color modes color mode bits per component description greyscale 1 each byte contains eight 1-bit pixels.
...if your image contains fewer than 256 colors, gif is an option, although png often compresses even smaller with its indexed compression option (png-8).
WebAssembly Concepts - WebAssembly
memory: a resizable arraybuffer that contains the linear array of bytes read and written by webassembly’s low-level memory access instructions.
...the glue code also contains the logic for calling the above-mentioned webassembly javascript apis to fetch, load and run the .wasm file.
...if the application uses opengl, the html also contains a <canvas> element that is used as the rendering target.
Module structure of the SDK - Archive of obsolete content
commonjs defines: an object called exports which contains all the objects which a commonjs module wants to make available to other modules a function called require which a module can use to import the exports object of another module.
... for example, the following add-on contains an additional module directly under "lib", and other modules under subdirectories of "lib": my-addon lib main.js password-dialog.js secrets hash.js storage password-store.js to import modules into main: // main.js code var dialog = require("./password-dialog"); var hash = require("./secrets/...
panel - Archive of obsolete content
the panel just contains a <textarea> element: when the user presses the return key, the contents of the <textarea> is sent to the main add-on code.
...it contains a single key named script whose value is a boolean that indicates whether or not to execute script in the content.
io/file - Archive of obsolete content
if the string contains "r", the file is opened in read-only mode.
...if the string contains "b", the contents will be returned in binary mode.
ui/button/action - Archive of obsolete content
"./firefox-16.png", "32": "./firefox-32.png" }, onclick: firstclick }); function firstclick(state) { console.log("you clicked '" + state.label + "'"); button.removelistener("click", firstclick); button.on("click", subsequentclicks); } function subsequentclicks(state) { console.log("you clicked '" + state.label + "' again"); } the listener is passed a state object that contains all the button's properties.
...this contains all the button's properties.
cfx to jpm - Archive of obsolete content
if the package.json does include an id field, and it contains "@", then this is written into the install.rdf as the add-on id.
... what you need to do all this means that: if your package.json contains an id field, and its value does not contain "@", then you must append "@jetpack" to it when switching to jpm.
Bootstrapped extensions - Archive of obsolete content
this is done using a special script file that's included in the extension that contains functions the browser calls to command the extension to install, uninstall, start up, and shut down.
... creating a bootstrapped extension to mark an extension as bootstrappable, you need to add the following element to its install manifest: <em:bootstrap>true</em:bootstrap> then you need to add a bootstrap.js file that contains the required functions; this should be alongside the install.rdf file in the extension's package.
Bookmarks - Archive of obsolete content
var ios = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var uri = ios.newuri("http://google.com/", null, null); var bookmarksarray = bmsvc.getbookmarkidsforuri(uri, {}); after executing this code, the array bookmarksarray contains the ids of all bookmarks that refer to the specified uri (in this case, "http://google.com").
... finding the folder containing an item if you need to know what folder contains an item (this can be especially handy after using nsinavbookmarksservice.getbookmarkidsforuri() to find bookmarks for a given uri), you can use the nsinavbookmarksservice.getfolderidforitem() method.
Miscellaneous - Archive of obsolete content
this page contains small, self-explanatory code snippets.
...event.detail contains the number of lines to scroll.
Extension Versioning, Update and Compatibility - Archive of obsolete content
if the install.rdf contains any targetplatform entries then the platform of the currently running application must be listed or the installation will be rejected.
...this means that if your update manifest contains an entry for the currently installed version of the add-on, and the entry's targetapplication entry specifies a larger maxversion then the application will use this value instead of that specified in the add-on's install.rdf.
Listening to events in Firefox extensions - Archive of obsolete content
if the page contains scripts or other behaviors that fire during loading that you want to continue to execute every time the user navigates to the page, or if you want to know when a user has navigated to a cached page, use the new pageshow event.
...if the page contains frames, then when the cached page is loaded: pageshow events from each frame fire before the pageshow event in the main document fires.
Connecting to Remote Content - Archive of obsolete content
in the onload callback function, the responsetext parameter contains the server response as text.
...the xslt tutorial contains details for building these templates.
Signing an XPI - Archive of obsolete content
windows contains its own version of some of these files (e.g.
... hint: when applying for a certificate ensure that the organisation (o) contains your name and not the issuer's default text, because this is what is displayed to users.
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.
... legacy add-ons this section contains links to documentation for legacy technology for add-on development, including: legacy extensions for firefox for android add-ons that work with desktop firefox do not automatically work in firefox for android: overlay extensions this page contains links to documentation for the approach to developing extensions for gecko-based applications which uses: performance best practices in extensions one of firefox's great advantages is its extreme extensibility.
Adding preferences to an extension - Archive of obsolete content
establish the defaults in order to set a default preference for the stock to monitor, we need to add a new folder to our extension's package, called "defaults", which in turn contains another folder called "preferences".
... 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.
Localizing an extension - Archive of obsolete content
the stockwatcher2.dtd file contains the mappings for the stockwatcher2.xul file: <!entity panel_loading "loading..."> <!entity menu_refresh_now.label "refresh now"> <!entity menu_apple.label "apple (aapl)"> <!entity menu_google.label "google (goog)"> <!entity menu_microsoft.label "microsoft (msft)"> <!entity menu_yahoo.label "yahoo (yhoo)"> update the xul files each xul file needs to reference its corresponding locale file.
...localizing strings in javascript code if your javascript code contains literal strings that need to be localized, as does our stock watcher sample, we need to make those localizable as well.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
the baseline's exact placement is dependent on the "default" font for the line box (represented by the red box), which is determined by the value of font-family for the element that contains the line box.
... so we have an image sitting on the baseline of a line box that contains only the image.
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
it also contains an interesting feature that i did not use anymore -> autoconfig from a web server!
...// getplatform().contains("unix")...
Notes on HTML Reflow - Archive of obsolete content
a frame is rectangular, with width, height, and an offset from the parent frame that contains it.
...in reflowdirtychild, the parent frame sets the ns_frame_has_dirty_child state bit on itself, and does any bookkeeping necessary to remember which child is dirty (for example, the block frame marks the linebox dirty that contains the child frame).
Using XML Data Islands in Mozilla - Archive of obsolete content
rder").textcontent; var parser = new domparser(); var doc = parser.parsefromstring(ordersource, "application/xml"); var lineitems = doc.getelementsbytagnamens("http://example.mozilla.org/purchaseorderml", "lineitem"); var firstprice = lineitems[0].getelementsbytagnamens("http://example.mozilla.org/purchaseorderml", "price")[0].textcontent; document.body.textcontent = "the purchase order contains " + lineitems.length + " line items.
...pt> function rundemo() { var doc = document.getelementbyid("purchase-order").contentdocument; var lineitems = doc.getelementsbytagnamens("http://example.mozilla.org/purchaseorderml", "lineitem"); var firstprice = lineitems[0].getelementsbytagnamens("http://example.mozilla.org/purchaseorderml", "price")[0].textcontent; document.getelementbyid("output-box").textcontent = "the purchase order contains " + lineitems.length + " line items.
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
this 100k activex control contains the entire np api implementation and probably worked much like pluginhostctrl.dll does now.
... package it there is a subdirectory named cab/ which contains a script and a readme.txt for producing your own signed cab files.
Style System Overview - Archive of obsolete content
↓ quote quote ↓ span class="emph" example stylesheet doc { display: block; text-indent: 1em; } title { display: block; font-size: 3em; } para { display: block; } [class="emph"] { font-style: italic; } css style rule representation each declaration block is represented by an nscssdeclaration an cssstyleruleimpl contains each selector associated with that declaration, and the declaration, and is the most important implementation of nsistylerule.
... to allow for optimizations, each style struct contains only inherited properties or only “reset” properties.
Using microformats - Archive of obsolete content
if provided, this is a javascript object that contains zero or more of the following flags: recurseexternalframes if true, child frames are included in the search.
...if provided, this is a javascript object that contains zero or more of the following flags: recurseexternalframes if true, child frames that reference external content are included in the search.
JavaScript Client API - Archive of obsolete content
we're also going to import ''util.js'' as it contains many useful helpers.
...syncengine contains a lot of code which handles logic for the core sync algorithm, but your subclass won't need to call any of this directly, unless you are overriding part of the sync algorithm to provide custom sync behavior (an advanced technique outside the scope of this article).
Hidden prefs - Archive of obsolete content
note, the ui has "name or email contains:".
...see http://lxr.mozilla.org/mozilla/sourc...drdatabase.idl for the list of valid attributes "c" == contains.
Introducing the Audio API extension - Archive of obsolete content
this event therefore contains the raw samples of a period of time.
... the mozaudioavailable event has 2 attributes: framebuffer: framebuffer (i.e., an array) containing decoded audio sample data (i.e., floats) time: timestamp for these samples measured from the start in seconds the framebuffer contains an array of audio samples.
Microsummary XML grammar reference - Archive of obsolete content
the <template> element the <template> element contains the xslt stylesheet which transforms web pages into their microsummaries.
...his element, firefox will never update microsummaries more frequently than once per minute; because firefox checks for expired microsummaries every 15 seconds, it is possible for a microsummary update to begin up to 15 seconds later than its interval indicates; firefox respects the browser cache when updating microsummaries, so it will not reload a page to update its microsummary if the cache contains a fresh copy of the page.
Mozilla Application Framework in Detail - Archive of obsolete content
don't feel limited by the widgets that the framework already contains!
... more information using the mozilla soap api (an article written for the apple developer connection) xml extras (the home page for the xml extras code module, which contains mozilla's web services support) soap scripts in mozilla (documentation on soap in mozilla from the engineer who implemented it) xpinstall, mozilla's cross platform installation technology one of the many things that makes the mozilla platform easy for both users and developers is that applications can be installed, extended, or upgraded with simple web page links.
Mozilla Crypto FAQ - Archive of obsolete content
for more information see 15 cfr part 730, section 730.2 (concerning statutory authority for the ear), and the document "principal statutory authority for the export administration regulations", which contains copies of the export administration act of 1979 (as amended), the international emergency economic powers act (as amended), and related legislation and executive orders.
... for more information see the document "principal statutory authority for the export administration regulations", which contains a copy of executive order 13026.
Table Cellmap - Archive of obsolete content
further it contains info whether this entry is a row- or colspan.
...this can produce enormous costs once the cellmap contains large holes that are not caused by zero spans, this is at least a o2(n) algorithm.
Running Tamarin performance tests - Archive of obsolete content
use --csvappend if you want to append the results to the csv file support files testconfig.txt this file contains instructions for how the harness should handle performance tests.
... metricinfo.py this file contains a list of metrics that the harness will look for and record.
Tamarin Build System Documentation - Archive of obsolete content
compile, smoke, or test to show the build slaves from the most recent phase run or click on an individual box to display the test result below the phase table the waterfall displays each buildstep and result the left side contains the time column and the user/revision link to represent the revision triggering a build, mouse over the user to see the revision and submission notes each buildstep run on a slave is a box with color indicating status, red is failed, green passed, yellow has warnings click the stdio link to see the output click on the build yellow box at the bottom of a set of buildsteps to see the result of all...
... the test/acceptance/testconfig.txt file contains a list of tests marked as expected failures or skipped with the configuration see the testconfig.txt for current instructions generally the format is comma separated list with regular expressions for test and configuration.
Anonymous Content - Archive of obsolete content
binding scopes are determined by the bound element that contains the binding responsible for the generation of the anonymous nodes.
...if anonymous content that contains an insertion point is removed, then any explicit children found underneath the insertion point are relocated to any other insertion points that match.
Binding Implementations - Archive of obsolete content
a getter contains script whose return value is handed back when the property is requested.
... a setter contains a script that is invoked when a new value is assigned to the property.
Creating XPI Installer Modules - Archive of obsolete content
a xpi file typically contains the resources to be installed (in this case the barley.jar we want to have installed in the mozilla/bin/chrome/ directory) and an install script that guides the installation process.
...the javascript file barley.js contains a single function, bar(), defined as follows: function bar() { alert("aphids"); } if you want to use the same gif image that is used in the barley package, it can be grabbed from here.
Using XPInstall to Install Plugins - Archive of obsolete content
since the file format that contains the software and the install.js javascript file is a cross-platform file (zip) and since javascript is understood by mozilla browsers on all platforms, often one single xpi package can be deployed on all platforms.
...here is an example: var plid = "myplugin.plug/version=6.5"; err = initinstall(software_name, plid, version); if (err != 0) { // install may have failed because of n6 and = // replace plid with a simple string err = initinstall(software_name, "mypluginstring", version); if (err != 0) cancelinstall(err); } note that above, the plid contains an "=" and in case the xpi package is running on browsers that treat "=" as an illegal token, the workaround is to handle the error and invoke initinstall again.
windowsShortcut - Archive of obsolete content
aicon a filespecobject representing the absolute path (including fiilename) to a file that contains icons.
... can be either .ico, .dll, .exe, or any other binary file that contains icons.
A XUL Bestiary - Archive of obsolete content
like a chrome, that chunk usually contains xul content, css and graphic skin information, localization strings, and maybe some platform-specific code.
...xul itself contains very little provision for how widgets are to be presented in the interface.
Namespaces - Archive of obsolete content
duplicates element and attribute names can occur when an xml document contains elements and attributes from two or more different xml schemas (or dtds).
...here's a question: what namespace contains the element foo in the xml document below?
webNavigation - Archive of obsolete content
« xul reference webnavigation type: nsiwebnavigation this read-only property contains the nsiwebnavigation object for the document.
...it also contains the load constants used by reloadwithflags and loaduriwithflags.
Multiple Queries - Archive of obsolete content
the queryset element is a bit of a misnomer, it actually only contains one query each.
...al"/> </query> <action> <button uri="?photo" image="?photo" label="view" orient="vertical"/> </action> </queryset> <queryset> <query> <content uri="?start"/> <member container="?start" child="?photo"/> </query> <action> <image uri="?photo" src="?photo"/> </action> </queryset> </template> </hbox> this template contains two queries, the first contains a <triple> which matches only the photo with a title of 'canal'.
Using Recursive Templates - Archive of obsolete content
this is done with all nodes that have children to indicate that the node contains generated children as well as whether the node is empty.
...ry expr="*"> <assign var="?type" expr="local-name(.)"/> </query> <rule> <where subject="?type" rel="equals" value="group"/> <action> <groupbox uri="?"> <caption label="?name"/> </groupbox> </action> </rule> <rule> <action> <label uri="?" value="?name"/> </action> </rule> </template> </vbox> the first rule contains a where clause which matches only those results that have a type of group.
Adding Methods to XBL-defined Elements - Archive of obsolete content
the method element contains two type of child elements, parameter elements which describe the parameters to the method and body which contains the script for the method.
... the body element contains the script that is executed when the method is called.
Creating a Wizard - Archive of obsolete content
the wizard a wizard is a special type of dialog that contains a number of pages.
...each page contains a single question or a set of related questions.
Creating an Installer - Archive of obsolete content
it contains a number of methods which can be used to start an installation.
...this jar file contains all of the files used by your application.
Element Positioning - Archive of obsolete content
the third button is larger because it contains more content.
... cropping text and buttons you could potentially create a button element that contains a label that is larger than the maximum width of the button.
Groupboxes - Archive of obsolete content
the groupbox is a type of box, and the elements it contains are aligned according to the xul box rules.
...the groupbox contains a horizontal box with a label and textbox.
Install Scripts - Archive of obsolete content
in an install script, there is no associated window, however the global object will be an install object which contains a number of functions to customize the install process.
...because the find files dialog contains content, a skin file and a locale file, registerchrome() will need to be called three times.
Introduction to XBL - Archive of obsolete content
an xbl file contains a set of bindings.
...shows the basic skeleton of an xbl file: <?xml version="1.0"?> <bindings xmlns="http://www.mozilla.org/xbl"> <binding id="binding1"> <!-- content, property, method and event descriptions go here --> </binding> <binding id="binding2"> <!-- content, property, method and event descriptions go here --> </binding> </bindings> the bindings element is the root element of an xbl file and contains one or more binding elements.
Modifying the Default Skin - Archive of obsolete content
the file classic.jar contains the skin definitions.
... the global directory within this archive contains the main style definitions for how to display the various xul elements.
XUL FAQ - Archive of obsolete content
this document contains answers to frequently asked questions about xul, mozilla's markup language for describing application's user interface.
... does each prefpane contains a <preferences></preferences> block, even if empty?
XUL element attributes - Archive of obsolete content
empty type: boolean set to true if the element is a container that contains no children.
...this can be used instead of setting the tooltip to a popup for the common case where it contains only text.
menulist - Archive of obsolete content
attributes accesskey, crop, disableautoselect, disabled, editable, focused, image, label, oncommand, open, preference, readonly, sizetopopup, tabindex, value properties accessibletype, crop, description, disableautoselect, disabled, editable, editor, image, inputfield, itemcount, label, menuboxobject, menupopup, open, selectedindex, selecteditem, tabindex, value methods appenditem, contains, getindexofitem, getitematindex, insertitemat, removeallitems, removeitemat, select examples <menulist> <menupopup> <menuitem label="option 1" value="1"/> <menuitem label="option 2" value="2"/> <menuitem label="option 3" value="3"/> <menuitem label="option 4" value="4"/> </menupopup> </menulist> attributes accesskey type: character this should be set to a char...
... contains( item ) return type: boolean returns true if the menulist contains the specified menuitem as one of its items.
stringbundle - Archive of obsolete content
the "src" attribute accepts only absolute chrome:// urls (see bugs 133698, 26291) attributes src properties applocale , src, stringbundle, strings methods getformattedstring, getstring examples (example needed) attributes src type: uri the uri of the property file that contains the localized strings.
...the enumeration contains nsipropertyelement objects.
toolbar - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container which typically contains a row of buttons.
...this means that the palette now only contains items not already in the toolbar.
tree - Archive of obsolete content
ArchiveMozillaXULtree
if the element contains more than this number of rows, a scrollbar will appear which the user can use to scroll to the other rows.
...this object implements the nsitreeboxobject interface and contains functions for retrieving the cells at certain coordinates, redrawing cells and scrolling the tree.
treeitem - Archive of obsolete content
the treeitem contains a single row and all of what appear to the user as that row's descendants.
... empty type: boolean set to true if the element is a container that contains no children.
where - Archive of obsolete content
ArchiveMozillaXULwhere
multiple type: boolean set to true to indicate that the value contains multiple values separated by commas.
... value of the subject must be less than the value greater the numeric value of the subject must be greater than the value before the string value of subject must come before value alphabetically after the string value of subject must come after value alphabetically startswith the value of subject must start with the value endswith the value of subject must end with the value contains the value of subject must contain the value as a substring subject type: string the variable or string to compare.
XULRunner tips - Archive of obsolete content
contains tons of non-working code (bit rot).
...this way i have one directory where i keep all my mozilla extensions, and each application (firefox, thunderbird) simply contains a few small, one line files pointing to the location of the extensions.
Archived Mozilla and build documentation - Archive of obsolete content
ant script to assemble an extension this ant script helps to package an extension archived spidermonkey docs this section contains old spidermonkey documentation.
... plugin architecture this page contains some notes on how plugins work internally in gecko.
NPP_New - Archive of obsolete content
instance contains instance-specific private data for the plug-in and the browser.
...the plug-in is responsible for freeing the memory for the npsaveddata and the buffer it contains.
Adobe Flash - Archive of obsolete content
with fscommands, developers may choose to use macromedia's actionscript language to make a call back into the environment that contains the flash animation -- in this case, the html page.
...this shows communication flowing in the other direction -- namely, an action taken within the flash animation affects something in the html page that contains the flash animation.
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
plugin packages should only need to package a small set of files in the following structure in the xpi file: install.rdf plugins/ pluginlib.dll plugintypes.xpt the install.rdf file contains an install manifest that describes the plugin to the user.
...inid@myplugin.com</em:id> <em:name>my plugin</em:name> <em:version>1.0</em:version> <em:targetapplication> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>1.5</em:minversion> <em:maxversion>4.0.*</em:maxversion> </description> </em:targetapplication> <em:unpack>true</em:unpack> </description> </rdf> this contains 5 required pieces of information.
The First Install Problem - Archive of obsolete content
example: [hkey_local_machine\software\mozillaplugins\@mycompany.com/myapplication,version=5.01] version=5.01 mimetypes -- this is a subkey and contains individual mimetypes as further subkeys.
... hkey_local_machine\software\mozillaplugins\@mycompany.com/myapplication,version=5.01/mimetypes/somemimetypesubkey/ the mimetypes subkey contains further subkeys based on an application's actual mimetypes.
Vulnerabilities - Archive of obsolete content
an attacker could craft a fraudulent email message that contains hyperlinks that, when rendered in html, appear to the recipient to be benign but actually take the recipient to a malicious web site when they are clicked on.
... for example, the address resolution protocol (arp) trusts that an arp reply contains the correct mapping between media access control (mac) and internet protocol (ip) addresses.
-ms-filter - Archive of obsolete content
syntax the -ms-filter property is specified as a string that contains a list of one or more items, separated by spaces, of the following types: filters transitions procedural surfaces formal syntax filter: <-ms-filter-function>+ -ms-filter: [ "'" <-ms-filter-function># "'" ] | [ '"' <-ms-filter-function># '"' ] where <-ms-filter-function> = <-ms-filter-function-progid> | <-ms-filter-function-legacy> where <-ms-filter-function-progid> = 'progid:' [ <ident-...
...token> '.' ]* [ <ident-token> | <function-token> <any-value> ')' ] <-ms-filter-function-legacy> = <ident-token> | <function-token> <any-value> ')' the <string> contains the list of filters, transitions, and procedural surfaces.
VBArray.toArray - Archive of obsolete content
for example, a vbarray with three dimensions and three elements in each dimension is converted into a javascript array as follows: suppose the vbarray contains: (1, 2, 3), (4, 5, 6), (7, 8, 9).
... after translation, the javascript array contains: 1, 2, 3, 4, 5, 6, 7, 8, 9.
JavaPackage - Archive of obsolete content
for example, the netscape package contains the package netscape.javascript; the netscape.javascript package contains the classes jsobject and jsexception.
... properties the properties of a javapackage are the javaclass objects and any other javapackage objects it contains.
Writing JavaScript for XHTML - Archive of obsolete content
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?
...so if the browser tells our server, that it can handle xhtml as xml, that is, the accept: field in the http head contains application/xhtml+xml somewhere, we are safe to send the content as xml.
Troubleshooting XForms Forms - Archive of obsolete content
ensure that your <html> element contains the supported namespace declaration: xmlns="http://www.w3.org/1999/xhtml" (instead of the newer, unratified version, xhtml 2.0, located at http://www.w3.org/2002/06/xhtml2 ) inline instance, no controls get bound have you remembered to use the correct namespace for the instance nodes?
... if your binding expression contains a /, look for any containing xf:group, xf:repeat, xf:input or other elements that set the context node.
Requests For Enhancement - Archive of obsolete content
ArchiveWebXFormsRFE
rfe categories xforms api this section contains rfe to the xforms api.
... custom controls interfaces this section contains rfe to the custom control interfaces.
Building up a basic demo with A-Frame - Game development
html structure the first step is to create an html document — inside your project directory, create a new index.html file, and save the follow html inside it: <!doctype html> <html> <head> <meta charset="utf-8"> <title>mdn games: a-frame demo</title> <script src="aframe.min.js"></script> </head> <body> <!-- html goes here --> </body> </html> this contains some basic information like the document charset and <title>.
...add it now: <a-box color="#0095dd" position="0 1 0" rotation="20 40 0"> </a-box> it contains a few parameters already defined: color, position and rotation — these are fairly obvious, and define the base color of the cube, the position inside the 3d scene, and the rotation of the cube.
Building up a basic demo with Babylon.js - Game development
f-8"> <title>mdn games: babylon.js demo</title> <style> html,body,canvas { margin: 0; padding: 0; width: 100%; height: 100%; font-size: 0; } </style> </head> <body> <script src="babylon.js"></script> <canvas id="render-canvas"></canvas> <script> var canvas = document.getelementbyid("render-canvas"); /* all our javascript code goes here */ </script> </body> </html> it contains some basic information like the document <title>, and some css to set the width and height of the <canvas> element (which babylon.js will use to render the content on) to fill the entire available viewport space.
...add the following code to the bottom of your second <script> element: var engine = new babylon.engine(canvas); the babylon global object contains all the babylon.js functions available in the engine.
Building up a basic demo with PlayCanvas editor - Game development
as you can see, the file contains some boilerplate code already: pc.script.create('boxanimation', function (app) { // creates a new boxanimation instance var boxanimation = function (entity) { this.entity = entity; }; boxanimation.prototype = { // called once after all resources are loaded and before the first update initialize: function () { }, // called every frame, dt ...
...add the following line inside this function, to rotate the cube on every frame: this.entity.rotate(dt*10, dt*20, dt*30); in the line above this.entity refers to the object to which the script will be attached (the box); using the dt variable, which contains the delta time passed since the previous frame, we can rotate the box by a different amount around all three axes.
Building up a basic demo with the PlayCanvas engine - Game development
tle>mdn games: playcanvas demo</title> <style> body { margin: 0; padding: 0; } canvas { width: 100%; height: 100%; } </style> </head> <body> <script src="playcanvas-latest.js"></script> <canvas id="application-canvas"></canvas> <script> var canvas = document.getelementbyid("application-canvas"); /* all our javascript code goes here */ </script> </body> </html> it contains some basic information like the document <title>, and some css to set the width and height of the <canvas> element that playcanvas will use to 100% so that it will fill the entire available viewport space.
...add the following code to the bottom of your second <script> element: var app = new pc.application(canvas); app.start(); the pc global object contains all the playcanvas functions available in the engine.
Building up a basic demo with Three.js - Game development
a typical 3d scene in a game — even the simplest one — contains standard items like shapes located in a coordinate system, a camera to actually see them, lights and materials to make it look better, animations to make it look alive, etc.
...e will use: <!doctype html> <html> <head> <meta charset="utf-8"> <title>mdn games: three.js demo</title> <style> body { margin: 0; padding: 0; } canvas { width: 100%; height: 100%; } </style> </head> <body> <script src="three.min.js"></script> <script> var width = window.innerwidth; var height = window.innerheight; /* all our javascript code goes here */ </script> </body> </html> it contains some basic information like the document <title>, and some css to set the width and height of the <canvas> element, that three.js will insert on the page to 100% to fill the entire available viewport space.
Square tilemaps implementation: Static maps - Game development
it contains the basic map properties: cols: the width of the map, in columns.
... tiles contains the actual visual map data.
Legacy layout methods - Learn web development
start out by making a local copy of our sample simple-grid.html file, which contains the following markup in its body.
... include the skeleton and normalize css in the html page, by adding the following to its head: <link href="normalize.css" rel="stylesheet"> <link href="skeleton.css" rel="stylesheet"> skeleton includes more than a grid system — it also contains css for typography and other page elements that you can use as a starting point.
How CSS is structured - Learn web development
external stylesheet an external stylesheet contains css in a separate file with a .css extension.
...the example below contains two rules: one for the h1 selector and one for the p selector.
What do common web layouts contain? - Learn web development
contains information relevant to all pages (like site name or logo) and an easy-to-use navigation system.
...like the header, contains less prominent global information like legal notices or contact info.
UI pseudo-classes - Learn web development
the email input on the other hand is valid when empty, as it is not required, but invalid when it contains something that is not a proper email address.
... the following are fairly well-supported in modern browsers: the :focus-within pseudo-class matches an element that has received focus or contains an element that has received focus.
Introduction to HTML - Learn web development
guides this module contains the following articles, which will take you through all the basic theory of html and provide ample opportunity for you to test out some skills.
...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).
Images in HTML - Learn web development
the src attribute contains a path pointing to the image you want to embed in the page, which can be a relative or absolute url, in the same way as href attribute values in <a> elements.
...it contains the content you need, and is nicely stylable using css.
Responsive images - Learn web development
each value contains a comma-separated list, and each part of those lists is made up of three sub-parts.
...the code in responsive.html looks like so: <picture> <source media="(max-width: 799px)" srcset="elva-480w-close-portrait.jpg"> <source media="(min-width: 800px)" srcset="elva-800w.jpg"> <img src="elva-800w.jpg" alt="chris standing up holding his daughter elva"> </picture> the <source> elements include a media attribute that contains a media condition — as with the first srcset example, these conditions are tests that decide which image is shown — the first one that returns true will be displayed.
Video and audio content - Learn web development
here is a <a href="rabbit320.webm">link to the video</a> instead.</p> </video> the features of note are: src in the same way as for the <img> element, the src (source) attribute contains a path to the video you want to embed.
...the type attribute contains the mime type of the file specified by the <source>, and browsers can use the type to immediately skip videos they don't understand.
Build your own function - Learn web development
you'll see that the html is simple — the body contains just a single button.
...we are making the onclick handler equal to an anonymous function, which contains the code to run when the button is clicked.
Functions — reusable blocks of code - Learn web development
this contains two functions called a() and b(), and three variables — x, y, and z — two of which are defined inside the functions, and one in the global scope.
... it also contains a third function called output(), which takes a single parameter and outputs it in a paragraph on the page.
Test your skills: Loops - Learn web development
name — contains a name to search for para — contains a reference to a paragraph, which will be used to report the results.
... para — contains a reference to a paragraph, which will be used to report the results.
Fetching data from the server - Learn web development
if this completes successfully, the function inside the first .then() block contains the response returned from the network.
... next, we chain another .then() onto the end of our first one, the success function that contains the json returned from the response.json() promise.
Handling text — strings in JavaScript - Learn web development
html provides structure and meaning to our text, css allows us to precisely style it, and javascript contains a number of features for manipulating strings, creating custom welcome messages and prompts, showing the right text labels when needed, sorting terms into the desired order, and much more.
... let one = 'hello, '; let two = 'how are you?'; let joined = one + two; joined; the result of this is a variable called joined, which contains the value "hello, how are you?".
Measuring performance - Learn web development
the report contains scores about how your website is performing, both for mobile and desktop.
... at the time of writing, mdn's performance report summary looks similar to the following: a performance report contains information about things like how long a user has to wait before anything is displayed on the page, how many bytes need to be downloaded to display a page, and much more.
Properly configuring server MIME types - Learn web development
look in the iana | mime media types registry which contains all registered mime types.
... if you're using the apache web server, simply copy this sample .htaccess file to the directory that contains the files that you want to send with the correct mime types.
Server-side web frameworks - Learn web development
for example, the httprequest object that django passes to every view function contains methods and properties for accessing the target url, the type of request (e.g.
...it contains a development server and debugger, and includes support for jinja2 templating, secure cookies, unit testing, and restful request dispatching.
Ember interactivity: Events, classes and state - Learn web development
minal command to generate a service for us to store our todo-list data in: ember generate service todo-data this should give you a terminal output like so: installing service create app/services/todo-data.js installing service-test create tests/unit/services/todo-data-test.js this creates a todo-data.js file inside the todomvc/app/services directory to contain our service, which initially contains an import statement and an empty class: import service from '@ember/service'; export default class tododataservice extends service { } first of all, we want to define what a todo is.
... add the following import statement below the existing one: import { tracked } from '@glimmer/tracking'; now add the following class below the previous line you added: class todo { @tracked text = ''; @tracked iscompleted = false; constructor(text) { this.text = text; } } this class represents a todo — it contains a @tracked text property containing the text of the todo, and a @tracked iscompleted property that specifies whether the todo has been completed or not.
Routing in Ember - Learn web development
it contains the following contents: import emberrouter from '@ember/routing/router'; import config from './config/environment'; export default class router extends emberrouter { location = config.locationtype; rooturl = config.rooturl; } router.map(function() { this.route('completed'); this.route('active'); }); the highlighted lines were added when the 2nd and 3rd commands above were run.
...it already contains a getter that returns all todos, and a getter that returns incomplete todos.
Vue resources - Learn web development
contains comprehensive documentation, including examples, cookbooks, and reference material.
...this contains information on customizing and extending the output you are generating via the cli.
Implementing feature detection - Learn web development
if you look at the dom inspector of your browser's developer tools, you'll see that modernizr has updated your <html> class value like so: <html class="js no-htmlimports sizes flash transferables applicationcache blobconstructor blob-constructor cookies cors ...and loads more values!> it now contains a large number of classes that indicate the support status of different technology features.
...it does this by making the global modernizr object available to the page it is applied to, which contains results of the feature detects as true/false properties.
Handling common HTML and CSS problems - Learn web development
if you look at this running live, you'll see that it contains two paragraphs, one of which is styled.
...mdn contains several useful types of content: reference material with browser support information for client-side web technologies, e.g.
Setting up your own test automation environment - Learn web development
note: saucelabs-sample-test-frameworks contains several useful examples showing how to set up different combinations of test/assertion tools.
... note: the resources menu option on the browserstack automation dashboard contains a wealth of useful information on using it to run automated tests.
Command line crash course - Learn web development
if you want to remove a directory that is not empty (and also remove everything it contains), then you can use the -r option (recursive), but this is dangerous.
...in this case, ls would normally print its output to stdout, but instead ls’s output is being piped into wc, which takes that output as an input, counting the number of lines it contains, and prints that count to stdout instead.
Package management basics - Learn web development
a bundle is the term that’s generally used to refer to a single file on your web server that contains all the javascript for your software — typically compressed as much as possible to help reduce the time it takes to get your software downloaded and displayed in your visitors’ browser.
... initialise a new project npm init yarn init as shown above, this will prompt and walk you through a series of questions to describe your project (name, license, description and so on) then generate a package.json for you that contains meta information about your project and its dependencies.
Mozilla accessibility architecture
accessible tree contains only a subset of nodes from the dom tree not all dom nodes are exposed through accessibility api toolkits -- only those objects deemed important by the developers of the toolkit.
...each nsaccessnode contains the dom node and weak pres shell for the object.
Mozilla's Section 508 Compliance
part of section 508 (§1194.21) specifically relates to mozilla, and the ability of us government agencies to buy software that contains mozilla software components.
...mozilla's appearance preferences panel contains a large number of color possibilities.
Creating a Language Pack
you'll see that it contains the files which in your localization were missing some entities.
... x-testing: changed: 6 missinginfiles: 6124 missing: 5 0% of entries changed if you now preview the contents of the mergedir, you'll see that it contains the files which in your localization were missing some entities.
Creating a spell check dictionary add-on
to create a dictionary add-on, simply create a zip file which contains the following files and folders: my-dictionary.xpi install.rdf dictionaries/ locale-code.dic locale-code.aff the .dic and .aff files must be placed in a subfolder named dictionaries within the zip file.
...this file contains information about your add-on such as name and version number (see below).
Inner and outer windows
that lets the document interact with the "physical" window, while the outer window can keep track of all the documents (inner windows) it contains.
...this happens, for example, when a document contains a <frame> or <iframe>.
mozbrowsercontextmenu
contextmenu a menu object (see the menu object, below) representing a custom menu defined via <menu> / <menuitem> elements and pointed to via a contextmenu attribute on the dom element clicked on, which contains the menu's id.
... the menu object an object representing a custom menu defined via <menu> / <menuitem> elements and pointed to via a contextmenu attribute on the dom element clicked on, which contains the menu's id.
JNI.jsm
jni.jsm contains all the js-ctypes needed to communicate with the jni libraries.
...a required object that contains up to five fields of key names: constructors, fields, static_fields, methods, and static_methods.
OS.File for the main thread
xhtml', 'canvas'); canvas.width = img.naturalwidth; canvas.height = img.naturalheight; var ctx = canvas.getcontext('2d'); ctx.drawimage(img, 0, 0); (canvas.toblobhd || canvas.toblob).call(canvas, function(b) { var r = cc['@mozilla.org/files/filereader;1'].createinstance(ci.nsidomfilereader); //new filereader(); r.onloadend = function() { // r.result contains the arraybuffer.
... promise resolves to an object contains a file object{file} and the path{path}.
Patching a Localization
a good patch only contains those changes that you intended to make.
... if it contains more, you'll likely regress something else.
Localization technical reviews
here is some of the criteria we use to perform technical reviews: revision attachment contains only relevant files we run into exports that contain .xpi langpacks and other random files.
... defines.inc the file for each app (like browser/defines.inc) contains the names of all contributors that a localization team would like to credit the work to.
Mozilla DOM Hacking Guide
basically it contains convenient methods to find out about the interfaces an object promises to support.
...it implements the nsidomdomimplementation interface (which contains the three methods mentionned above).
Mozilla Web Services Security Model
for example, when accessing a web service at http://www.example.com/dir1/dir2/service, if the access file at http://www.example.com/web-scripts-access.xml contains a delegate element, mozilla will instead use http://www.example.com/dir1/dir2/web...ipt-access.xml to determine whether access is permitted.
...if the file exists but contains no allow elements, then all access will be allowed.
Mozilla Style System Documentation
each of the style structs contains a group of properties.
...as stated above, each style struct contains only features that are inherited by default or those that are set to their initial value ("reset") by default.
Power profiling overview
each package contains multiple cores.
... each core typically has hyper-threading, which means it contains two logical cpus.
TraceMalloc
the shutdown log contains the stack trace of every allocation that has not been deallocated by shutdown.
...(a strongly connected component with only one node is listed as a single object.) any single object listed as a root is really a leak root, and any component listed as a root either (a) contains an object that is a root or (b) contains objects that form an ownership cycle that is a root.
PR_CreatePipe
on return, this parameter contains the file descriptor for the read end of the pipe.
...on return, this parameter contains the file descriptor for the write end of the pipe.
NSS 3.28 release notes
request to test and prepare for tls 1.3 this release contains improved support for tls 1.3, however, the code that supports tls 1.3 is still disabled by default (not built).
... the certificate validation code contains checks to no longer trust certificates that are issued by old wosign and startcom cas, after october 21, 2016.
nss tech note4
pulling certificate extension information out of ssl certificates nss technical note: 4 note: this document contains code snippets that focus on essential aspects of the task and often do not illustrate all the cleanup that needs to be done.
... 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.
GC Rooting Guide
this is a template class where the template parameter is the type of the gc thing it contains.
... other jsobjects when defining a jsobject subclass that contains heap<t> fields, set the trace hook to invoke a function that traces those fields.
JS_CompileUTF8FileHandle
it should be the name of the file that contains the script, if available.
... see also the jsapi user guide contains example code using compiled scripts.
JS_DefineProperty
(exception: if attrs contains the jsprop_readonly flag, the setter will never be called, as property assignment will fail before it gets that far.
... if attrs contains the jsprop_getter (or jsprop_setter) flag, then getter (or setter) must point to a javascript function, not a c/c++ function.
JSAPI reference
note: the foss wiki page contains a few links to other libraries and programs that can make life easier when using spidermonkey and the jsapi.
...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.
SpiderMonkey 1.8.8
it also contains new language and api features described in detail below.
... the jsresolve_classname and jsresolve_with resolve flags (passed to jsclass.resolve when jsclass.flags contains jsclass_new_resolve) have been removed.
SpiderMonkey 17
it also contains new language and api features described in detail below.
... the jsresolve_classname and jsresolve_with resolve flags (passed to jsclass.resolve when jsclass.flags contains jsclass_new_resolve) have been removed.
SpiderMonkey 38
spidermonkey 38 is outdated and contains known security vulnerabilities.
...it also contains new language and api features described in detail below.
SpiderMonkey 45
spidermonkey 45 is outdated and contains known security vulnerabilities.
...it also contains new language and api features described in detail below.
Secure Development Guidelines
takes and how they affect a product how to avoid making them how to mitigate them everything is oriented toward c/c++ introduction: gaining control specifics about the underlying architecture, using x86 as an example 6 basic registers (eax, ebx, ecx, edx, edi, esi) 2 stack-related registers (esp, ebp) mark top and bottom of current stack frame status register (eflags) contains various state information instruction pointer (eip) points to register being executed; can’t be modified directly introduction: gaining control (2) eip is modified using call or jump instructions attacks usually rely on obtaining control over the eip otherwise the attacker can try to control memory pointed to by an existing function pointer a vulnerability is required t...
...rgv) { char *file = argv[1]; int fd; struct stat statbuf; stat(file, &statbuf); if (s_islink(statbuf.st_mode)) { bailout(“symbolic link”); } else if (statbuf.st_uid != getuid) { bailout(“you don’t own the file”); } fd = open(file, o_rdwr); write(fd, argv[2], strlen(argv[2])); } file i/o: race conditions previous example contains a race condition the file may change between the call top stat() and open() this opens the possibility of writing arbitrary content to any file race conditions occur when two separate execution flows share a resource and its access is not synchronized properly race condition types include file (previously covered) thread (two threads share a resource but don’t lock it) signa...
AT APIs Support
but in the meantime it more up-to-date and contains more details than existed analogues for at-spi and msaa this documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support gecko-based software.
...none of the user interface contains standard os controls.
Mork
MozillaTechMork
the meta-row of the table (different from the meta-row of a row) contains a few things you might care about.
...the presence of a row or rowreference in the meta-table indicates that said row is the meta-row of the table: it contains arbitrary properties for the entire table just like a normal row.
Manipulating bookmarks using Places
var ios = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var uri = ios.newuri("http://google.com/", null, null); var bookmarksarray = bmsvc.getbookmarkidsforuri(uri, {}); after executing this code, the array bookmarksarray contains the ids of all bookmarks that refer to the specified uri (in this case, "http://google.com").
... finding the folder containing an item if you need to know what folder contains an item (this can be especially handy after using nsinavbookmarksservice.getbookmarkidsforuri() to find bookmarks for a given uri), you can use the nsinavbookmarksservice.getfolderidforitem() method.
Places utilities for JavaScript
lmanno_feeduri - need to clarify here too, but i think for each livemark, there is an bookmark which contains an annotation storing the associated feed uri.
... lmanno_siteuri - need to clarify here, but i think for each livemark, there is an bookmark which contains an annotation storing the associated site uri.
Using the Places history service
a visit contains a reference to the url table for the page, the visit date, the transition type (typed, click, redirect, bookmark, etc.), a reference to the referring visit, and the session id.
... nsibrowserhistory.lastpagevisited: contains the uri of the last page visited.
Creating the Component Code
this is the object that contains the business logic, that implements functionality such as starting a network download, implementing interfaces that listen to the download progress, or providing a new content type handler.
... the source file for the weblock component contains three classes.
Detailed XPCOM hashtable guide
this entry class contains the key and the data that you are hashing (just like pldhash, above).
...the mozilla codebase already contains hash functions for most key types, including narrow and wide strings, pointers, and most binary data: void* (or nsisupports*) cast using ns_ptr_to_int32 char* string nscrt::hashcode() prunichar* string nsastring hashstring() nsacstring nsid& nsidhashkey::hashkey() writing a good hash function is well beyond the scope of...
Components.utils.cloneInto
function foo(greeting) { console.log("they said: " + greeting.message); } the add-on script can define an object, clone it, and pass it into this function: // add-on script var addonscriptobject = {"message" : "hello from add-on"}; contentwindow.foo(cloneinto(addonscriptobject, contentwindow)); // "they said: hello from add-on" cloning objects that have functions if the object to be cloned contains functions, you must pass the {clonefunctions:true} flag or you'll get an error.
...iptobject = cloneinto(addonscriptobject, contentwindow, {clonefunctions: true}); // page script var test = document.getelementbyid("test"); test.addeventlistener("click", function() { window.addonscriptobject.greetme(); }, false); cloning objects that contain dom elements by default, if the object you clone contains objects that are reflected from c++, such as dom elements, the cloning operation will fail with an error.
imgIContainer
create a new imgcontainer that contains only a single frame, which itself contains a subregion of the current frame.
... return value missing description exceptions thrown missing exception missing description native code only!extractframe create a new imgcontainer that contains only a single frame, which itself contains a subregion of the given frame.
inIDOMUtils
isignorablewhitespace() determines if the specified text node contains only ignorable whitespace characters.
... return value true if the node only contains insignificant whitespace.
nsIAccessible
contains the sum of what's needed to support iaccessible as well as atk's generic accessibility objects.
... getchildatpoint this method returns an accessible child which contains the coordinate at (x, y) in screen pixels.
nsICookieManager2
the nsicookiemanager2 interface contains additional methods that expand upon the nsicookiemanager interface.
...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.
nsIDOMMozNetworkStatsManager
it contains the following fields: starttime a date object representing the start time.
...it contains the following fields: appmanifesturl a string used to filter network stats by app.
nsIDOMWindowUtils
keep in mind that during a restyle operation, an element may be restyled multiple times (for example, when an inline element contains blocks).
... will be called on the widget that contains aelement.
nsIFeedTextConstruct
method overview nsidomdocumentfragment createdocumentfragment(in nsidomelement element); astring plaintext(); attributes attribute type description base nsiuri if the text construct contains html or xhtml, relative references in the content should be resolved against this base uri.
... methods createdocumentfragment() creates a new document fragment on a given dom element, containing the text and (if the text construct contains html or xhtml) its markup.
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.
nsIInputStream
nsresult consumestream(nsiinputstream* astream) { nsresult rv; uint32_t numread; char buf[512]; while (1) { rv = astream->read(buf, sizeof(buf), &numread); if (ns_failed(rv)) { printf("### error reading stream: %x\n", rv); break; } if (numread == 0) break; // buf now contains numread bytes of data } return rv; } consume all data from an input stream using readsegments().
... static ns_method appendsegment(nsiinputstream* astream, void* aclosure, const char* afromsegment, uint32_t atooffset, uint32_t acount, uint32_t* awritecount) { // afromsegment now contains acount bytes of data.
nsIMemoryReporter
units_count_cumulative 2 the amount contains the number of times some event has occurred since the application started up.
... units_percentage 3 the amount contains a fraction that should be expressed as a percentage.
nsIProfile
void getprofilelist( out unsigned long length, [retval, array, size_is(length)] out wstring profilenames ); parameters length on return, contains the number of profiles in the profilenames array.
... profilenames on return, contains an array of all of the available profiles' names.
nsISound
event_select_dialog_open 4 a select dialog (one that contains a list box) is opened.
... _moz_selectdialog the system sound when a select dialog (one that contains a list box) is opened.
nsITaggingService
length optional on return, contains the number of tags returned in atags.
... atags on return, contains an array of tags for the specified uri.
nsIUpdate
this object also contains information about the update that the front end and other application services can use to learn more about what is going on.
... licenseurl astring the url to an html fragment that contains a license for the update.
nsIVariant
useful in case the string contains embedded null characters.
...useful in case the string contains embedded null characters.
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.
...in the base file, the html image element points to a netscape gif icon: <html:img id="foo" src="netscapeimage.gif"/> in the overlay, an element with the same id attribute specifies a different image, and that image is superimposed on top of the original netscape image as part of the merge process: <html:img id="foo" src="mozillaimage.gif"/> when the base file references an overlay file which contains the html image element above, the new src attribute is superimposed over the original, and the mozilla icon replaces the netscape icon.
Main Windows
the third is the attachment box which can be toggled into a slim or an expanded view basemenuoverlay.xul contains the contents of most of the menus (i.e.
...the third is the attachment box which can be toggled into a slim or an expanded view basemenuoverlay.xul contains the contents of most of the menus (i.e.
WebIDL bindings
this maybe<> object contains the principal only on the main thread; when the method is called on a worker thread, the value of the object will be nothing().
... this annotation includes the full, namespace-qualified name of the class that contains an implementation of the named method.
CData
if the 8-bit string contains invalid encoded character, a typeerror exception is thrown.
... if the 8-bit string contains invalid encoded character, no exception is thrown.
Plug-in Basics - Plugins
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.
... gecko loads an embedded plug-in when the user displays an html page that contains an embedded object whose mime type is registered by a plug-in.
Debugger.Source - Firefox Developer Tools
if a single piece of source code contains both top-level code and function definitions, perhaps with nested functions, then the debugger.script instances for those all refer to the same debugger.source instance.
... binary if the instance refers to webassembly code and the debugger has the allowwasmbinarysource property set, a uint8array that contains the webassembly bytecode.
Debugger.Object - Firefox Developer Tools
codeis interpreted as strict mode code when it contains a use strict directive.
... note that, like evalinglobal, if the code passed to evalinglobalwithbindings is not strict mode code, then any declarations it contains affect the referent global object, even ascode is evaluated in an environment extended according tobindings.
Network request details - Firefox Developer Tools
in the above screenshot for example, the highlighted request's server-timing header contains 4 items — data, markup, total, and miss.
...this contains details about the secure connection used including the protocol, the cipher suite, and certificate details: the security tab shows a warning for security weaknesses.
Examine and edit HTML - Firefox Developer Tools
if a shadow dom contains a "slotted" element (an element with a slot attribute after it has been inserted inside a <slot> element — see adding flexibility with slots for an explanation of how these are used), the "slotted" element will be shown inside its corresponding <slot> element, with a "reveal" link alongside it.
...the menu contains the following items — click on the links to find the description of each command in the context menu reference: edit as html create new node duplicate node delete node attributes add attribute copy attribute value edit attribute remove attribute break on ...
CSS Grid Inspector: Examine grid layouts - Firefox Developer Tools
grid options the grid section of the layout view looks like this: you'll see a number of options contained within: overlay grid: contains a checkbox for each grid present on the page, along with various options.
... inspecting a subgrid when the page contains a grid with a subgrid, the entry for the subgrid is indented under its parent in the overlay grid section.
Work with animations - Firefox Developer Tools
the box below contains a grayscale icon, representing firefox developer edition.
...the bar is: blue if a transition was used to animate a property orange if a @keyframes animation was used green if the web animations api was used the bar contains a lightning bolt icon if the property was animated using the compositor thread (see more about the cost of animating different css properties).
UI Tour - Firefox Developer Tools
the performance tool's ui consists of 4 main pieces: toolbar recordings pane recording overview details pane, which may contain any one of: waterfall call tree flame chart toolbar the toolbar contains buttons to: start and stop a recording import a recording you previously saved clear the recordings pane.
... it contains two elements: an overview of the waterfall and a frame rate graph.
Style Editor - Firefox Developer Tools
the media sidebar the style editor displays a sidebar on the right-hand side whenever the current sheet contains any @media rules.
... the media sidebar works especially well with responsive design view for creating and debugging responsive layouts: from firefox 46 onwards, if an @media rule contains a screen size in a condition, then it is made clickable: clicking it then resizes the screen to that size using the responsive design view: creating and importing style sheets you can create a new style sheet by clicking the new button in the toolbar.
Firefox Developer Tools
this section contains detailed guides to all of the tools as well as information on how to debug firefox for android, how to extend devtools, and how to debug the browser as a whole.
... the ellipsis menu on the right-hand side of developer tools contains several commands that let you perform actions or change tool settings.
AesGcmParams - Web APIs
the aes-gcm specification recommends that the iv should be 96 bits long, and typically contains bits from a random number generator.
...this contains additional data that will not be encrypted but will be authenticated along with the encrypted data.
AudioBuffer - Web APIs
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.
...webkitaudiocontext)(); // 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 array 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.
AudioBufferSourceNode.buffer - Web APIs
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 - Web APIs
if there's no buffer set—that is, if buffer is null—the output contains a single channel of silence (every sample is 0).
...taudiocontext)(); // 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.
AuthenticatorAttestationResponse.attestationObject - Web APIs
when used in attestation, it contains an optional field, attestedcredentialdata.
...the attestedcredentialdata field contains the credentialid and credentialpublickey.
BasicCardRequest.supportedNetworks - Web APIs
the supportednetworks property of the basiccardrequest dictionary contains an array of domstrings representing the card networks that the retailer supports (e.g.
...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.
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.
CSSUnparsedValue - Web APIs
cssunparsedvalue.keys() returns a new array iterator object that contains the keys for each index in the cssunparsedvalue object.
... cssunparsedvalue.values() returns a new array iterator object that contains the values for each index in the cssunparsedvalue object.
CredentialsContainer.create() - Web APIs
syntax var promise = credentialscontainer.create([options]) parameters options an object of type credentialcreationoptions that contains options for the requested new credentials object.
...contains requirements for creating/obtaining federated credentials.
DOMError - Web APIs
WebAPIDOMError
the domerror interface describes an error object that contains an error name.
... invalidcharactererror the string contains invalid characters.
DOMMatrixReadOnly - Web APIs
dommatrixreadonly.tostring() creates and returns a domstring object which contains a string representation of the matrix in css matrix syntax, using the appropriate css matrix notation.
... for a 3d matrix, the returned string contains all 16 elements and takes the form matrix3d(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44).
DOMStringList - Web APIs
a type returned by some apis which contains a list of domstring (strings).
... domstringlist.contains() returns boolean indicating if the given string is in the list specifications specification status comment html living standardthe definition of 'domstringlist' in that specification.
Detecting device orientation - Web APIs
the orientation event contains four values: deviceorientationevent.absolute deviceorientationevent.alpha deviceorientationevent.beta deviceorientationevent.gamma the event handler function can look something like this: function handleorientation(event) { var absolute = event.absolute; var alpha = event.alpha; var beta = event.beta; var gamma = event.gamma; // do stuff with the new orientation data...
... the motion event contains four properties: devicemotionevent.acceleration devicemotionevent.accelerationincludinggravity devicemotionevent.rotationrate devicemotionevent.interval motion values explained the devicemotionevent objects provide web developers with information about the speed of changes for the device's position and orientation.
Document.title - Web APIs
WebAPIDocumenttitle
if the title was overridden by setting document.title, it contains that value.
... otherwise, it contains the title specified in the markup (see the notes below).
EXT_texture_compression_bptc - Web APIs
it only contains rgb data, so the returned alpha value is 1.0.
...it only contains rgb data, so the returned alpha value is 1.0.
EventTarget.addEventListener() - Web APIs
ick', this, false); element.addeventlistener('dblclick', this, false); // you can properly remove the listeners element.removeeventlistener('click', this, false); element.removeeventlistener('dblclick', this, false); } const s = new something(document.body); another way of handling the reference to this is to pass to the eventlistener a function that calls the method of the object that contains the fields that need to be accessed: class someclass { constructor() { this.name = 'something good'; } register() { const that = this; window.addeventlistener('keydown', function(e) { that.somemethod(e); }); } somemethod(e) { console.log(this.name); switch(e.keycode) { case 5: // some code here...
... getting data into an event listener using the outer scope property when an outer scope contains a variable declaration (with const, let), all the inner functions declared in that scope have access to that variable (look here for information on outer/inner functions, and here for information on variable scope).
GeolocationPosition.coords - Web APIs
it contains the location, that is longitude and latitude on the earth, the altitude, and the speed of the object concerned, regrouped inside the returned value.
... it also contains accuracy information about these values.
HTMLImageElement.alt - Web APIs
syntax htmlimageelement.alt = alttext; let alttext = htmlimageelement.alt; value a domstring which contains the alternate text to display when the image is not loaded or for use by assistive devices.
...="songs.html" aria-role="button"><img src="songicon.svg" alt="songs"</a> <a href="albums.html" aria-role="button"><img src="albumicon.svg" alt="albums"</a> <a href="artists.html" aria-role="button"><img src="artisticon.svg" alt="artists"</a> <a href="playlists.html" aria-role="button"><img src="playlisticon.svg" alt="playlists"</a> </li> images containining diagrams or maps when an image contains information presented as a diagram, chart, graph, or map, the alt text should provide the same information, at least in summary form.
HTMLOptionElement - Web APIs
htmloptionelement.defaultselected is a boolean that contains the initial value of the selected html attribute, indicating whether the option is selected by default or not.
... htmloptionelement.text is a domstring that contains the text content of the element.
HTMLTextAreaElement - Web APIs
if no text is selected, contains the index of the character that follows the input cursor.
...if no text is selected, contains the index of the character that follows the input cursor.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
ing; let language = userlanguages[user]; switch(language) { case "es": greeting = `¡hola, ${user}!`; break; case "en": default: greeting = `hello, ${user}!`; break; } return greeting; } outputelem.innerhtml += localgreeting(user) + "<br>\r"; } greetuser("mike"); greetuser("teresa"); greetuser("veronica"); this short program contains three execution contexts, some of which are created and destroyed several times over the course of the program's execution.
... if a window is actually a container within an <iframe>, it likely shares an event loop with the window that contains it.
Drag Operations - Web APIs
the drag data contains two pieces of information, the type (or format) of the data, and the data's value.
...if the drag contains no drag data items, or all of the items have been subsequently cleared, then no drag will occur.
Working with the History API - Web APIs
whenever the user navigates to the new state, a popstate event is fired, and the state property of the event contains a copy of the history entry's state object.
...if the history entry being activated was created by a call to pushstate or affected by a call to replacestate, the popstate event's state property contains a copy of the history entry's state object.
IDBEnvironment - Web APIs
the idbenvironment helper of the indexeddb api contains the indexeddb property, which provides access to indexeddb functionality.
... properties idbenvironment.indexeddb read only provides a mechanism for applications to asynchronously access capabilities of indexed databases; contains an idbfactory object.
IntersectionObserverEntry.boundingClientRect - Web APIs
the intersectionobserverentry interface's read-only boundingclientrect property returns a domrectreadonly which in essence describes a rectangle describing the smallest rectangle that contains the entire target element.
... syntax var boundsrect = intersectionobserverentry.boundingclientrect; value a domrectreadonly which describes the smallest rectangle that contains every part of the target element whose intersection change is being described.
KeyboardLayoutMap - Web APIs
keyboardlayoutmap.keys read only returns a new array iterator object that contains the keys for each index in the array.
... keyboardlayoutmap.values read only returns a new array iterator object that contains the values for each index in the keyboardlayoutmap object.
MediaCapabilitiesInfo - Web APIs
properties the mediacapabilitiesinfo interface contains three boolean attribues: supported: given the properties defined in the mediaconfiguration, can the specified piece of media content be encoded (if mediaencodingconfiguration is set) or decode (if mediadecodingconfiguration is set) at all?
... example // mediaconfiguration to be tested const mediaconfig = { type : 'file', audio : { contenttype : "audio/ogg", channels : 2, bitrate : 132700, samplerate : 5200 }, }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { // result contains the media capabilities information console.log('this configuration is ' + (result.supported ?
MediaElementAudioSourceNode.mediaElement - Web APIs
the mediaelementaudiosourcenode interface's read-only mediaelement property indicates the htmlmediaelement that contains the audio track from which the node is receiving audio.
... syntax audiosourceelement = mediaelementaudiosourcenode.mediaelement; value an htmlmediaelement representing the element which contains the source of audio for the node.
MediaKeySession - Web APIs
mediakeysession.keystatuses read only contains a reference to a read-only mediakeystatusmap of the current session's keys and their statuses.
... mediakeysession.sessionid read only contains a unique string generated by the cdm for the current media object and its associated keys or licenses.
MediaRecorder - Web APIs
the event, of type blobevent, contains the recorded media in its data property.
...the received event is based on the mediarecordererrorevent interface, whose error property contains a domexception that describes the actual error that occurred.
MediaStream.clone() - Web APIs
WebAPIMediaStreamclone
this new mediastream object has a new unique id and contains clones of every mediastreamtrack contained by the mediastream on which clone() was called.
... return value a new mediastream instance which has a new unique id and contains clones of every mediastreamtrack contained by the mediastream on which clone() was called.
MediaStreamAudioSourceNode.mediaStream - Web APIs
the mediastreamaudiosourcenode interface's read-only mediastream property indicates the mediastream that contains the audio track from which the node is receiving audio.
... syntax audiosourcestream = mediastreamaudiosourcenode.mediastream; value a mediastream representing the stream which contains the mediastreamtrack serving as the source of audio for the node.
MediaTrackSettings.logicalSurface - Web APIs
the most common scenario in which a display surface may be a logical one is if the selected surface contains the entire content area of a window which is too large to display onscreen at once.
... since the window that contains the surface has to be scrolled to show the rest of the contents, the surface is a logical one.
Media Source API - Web APIs
videoplaybackquality contains information about the quality of video being played by a <video> element, such as number of dropped or corrupted frames.
... htmlmediaelement.seekable when a mediasource object is played by an html media element, this property will return a timeranges object that contains the time ranges that the user is able to seek to.
NameList - Web APIs
WebAPINameList
properties namelist.length read only methods namelist.contains() returns a boolean.
... namelist.containsns() returns a boolean.
Node.compareDocumentPosition() - Web APIs
the return value is a bitmask of the following values: name value document_position_disconnected 1 document_position_preceding 2 document_position_following 4 document_position_contains 8 document_position_contained_by 16 document_position_implementation_specific 32 syntax comparemask = node.comparedocumentposition(othernode) parameters othernode the other node with which to compare the first node’s document position.
...for example, if othernode is located earlier in the document and contains the node on which comparedocumentposition() was called, then both the document_position_contains and document_position_preceding bits would be set, producing a value of 10 (0x0a).
Path2D.addPath() - Web APIs
WebAPIPath2DaddPath
html <canvas id="canvas"></canvas> javascript first, we create two separate path2d objects, each of which contains a rectangle made using the rect() method.
...finally, we draw the first path (which now contains both rectangles) using fill().
PaymentAddress.country - Web APIs
syntax var paymentcountry = paymentaddress.country; value a domstring which contains the iso3166-1 alpha-2 code identifying the country in which the address is located, or an empty string if no country is available, which frequently can be assumed to mean "same country as the site owner." usage notes if the payment handler validates the address and determines that the value of country is invalid, a call to paymentrequestupdateevent.updatewith() will be made with a details object containing a shippingaddresserrors field.
... that field contains an addresserrors-compliant object whose country property is a string indicating the validation error that occurred and, if possible, suggests how to fix it.
PaymentAddress - Web APIs
paymentaddress.city read only a domstring which contains the city or town portion of the 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.
PaymentDetailsUpdate.shippingAddressErrors - Web APIs
the paymentdetailsupdate dictionary's shippingaddresserrors property, if present, contains an addresserrors object whose contents provide error messages for one or more of the values in the paymentaddress specified as paymentrequest.shippingaddress.
... syntax var addresserrors = paymentdetailsupdate.shippingaddresserrors; value an addresserrors object, which contains domstrings describing errors in the properties of a paymentaddress.
PaymentRequest.show() - Web APIs
e = await payrequest.show(); await validateresponse(response); } catch(err) { /* handle the error; aborterror usually means a user cancellation */ } } in this code, the methods checkaddress() and checkshipping(), respectively, check the shipping address and the shipping option changes and supply in response either a paymentdetailsupdate object or a promise to return one; this object contains the fields in the paymentresponse which have been or need to be changed.
... // paymentresponse.methodname contains the selected payment method // paymentresponse.details contains a payment method specific response await response.complete("success"); } catch (err) { console.error("uh oh, something bad happened", err.message); } } the following example shows how to update the payment sheet as it's being presented to the end-user.
Using Performance Timeline - Web APIs
when the observer (callback) is invoked the callback's parameters include a performance observer entry list that only contains observed performance entries.
... that is, the list only contains entries for the event types that were specified when the observer's observe() method was invoked.
Performance Timeline - Web APIs
when the observer (callback) is invoked, the callback's parameters include a performance observer entry list that contains only observed performance entries.
... that is, the list contains entries only for the event types that were specified when the observer's observe() method was invoked.
Using the Permissions API - Web APIs
this object will eventually include methods for querying, requesting, and revoking permissions, although currently it only contains permissions.query(); see below.
... } else if (result.state == 'denied') { report(result.state); geobtn.style.display = 'inline'; } result.onchange = function() { report(result.state); } }); } function report(state) { console.log('permission ' + state); } handlepermission(); permission descriptors the permissions.query() method takes a permissiondescriptor dictionary as a parameter — this contains the name of the api you are interested in.
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.getClientExtensionResults() - Web APIs
getclientextensionresults() is a method of the publickeycredential interface that returns an arraybuffer which contains a map between the extensions identifiers and their results after having being processed by the client.
...this object contains a map between the extensions' identifiers and their results from the processing.
Push API - Web APIs
WebAPIPush API
it contains information sent from an application to a pushsubscription.
...when a push service sets an expiration time.) examples mozilla's serviceworker cookbook contains many useful push examples.
RTCPeerConnection - Web APIs
if it has not yet been set, this is null.peeridentity read only the read-only rtcpeerconnection property peeridentity returns a javascript promise that resolves to an rtcidentityassertion which contains a domstring identifying the remote peer.pendinglocaldescription read only the read-only property rtcpeerconnection.pendinglocaldescription returns an rtcsessiondescription object describing a pending configuration change for the local end of the connection.
...the answer contains information about any media already attached to the session, codecs and options supported by the browser, and any ice candidates already gathered.
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
the findreportentry() function shown below examines an rtcstatsreport, returning the rtcstats-based statistics record which contains the specified key — and for which the key has the specified value.
...the box contains a number of log entries, the last handful of which are visible.
RTCRtpCapabilities - Web APIs
an rtcrtpcapabilities object contains an array of objects conforming to rtcrtpcodeccapability (each describing the capabilities of one codec) and an array of the supported rtp header extensions for that codec.
...each object contains a single domstring, uri, specifying the uri of the header extension, as described in rfc 5285.
RTCRtpReceiver - Web APIs
rtcrtpreceiver.getparameters() returns an rtcrtpparameters object which contains information about how the rtc data is to be decoded.
... rtcrtpreceiver.getstats() returns a promise whose fulfillment handler receives a rtcstatsreport which contains statistics about the incoming streams and their dependencies.
RTCRtpStreamStats.kind - Web APIs
the kind property of the rtcrtpstreamstats dictionary is a string indicating whether the described rtp stream contains audio or video media.
... syntax mediakind = rtcrtpstreamstats.kind; value a domstring whose value is "audio" if the track whose statistics are given by the rtcrtpstreamstats object contains audio, or "video" if the track contains video media.
Range.setStart() - Web APIs
WebAPIRangesetStart
the address contains nine nodes: five text nodes, and four <br> elements.
...the resulting range contains the first through fifth characters within a text node.
Report - Web APIs
WebAPIReport
this contains the list of reports currently contained in the observer's report queue.
...ode); let innerlist = document.createelement('ul'); listitem.appendchild(innerlist); list.appendchild(listitem); for (let key in reports[i].body) { let innerlistitem = document.createelement('li'); let keyvalue = reports[i].body[key]; innerlistitem.textcontent = key + ': ' + keyvalue; innerlist.appendchild(innerlistitem); } } } the reports parameter contains an array of all the reports in the observer's report queue.
SVGAnimatedBoolean - Web APIs
animval boolean if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as baseval.
SVGAnimatedEnumeration - Web APIs
animval unsigned short if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as baseval.
SVGAnimatedInteger - Web APIs
animval long if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as baseval.
SVGAnimatedLength - Web APIs
animval svglength if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as baseval.
SVGAnimatedNumber - Web APIs
animval float if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as baseval.
SVGAnimatedPoints - Web APIs
if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as points.
SVGAnimatedString - Web APIs
if the given attribute or property is being animated it contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, it contains the same value as baseval.
SVGFilterElement - Web APIs
svgfilterelement.filterresx read only an svganimatedinteger that contains the x component of the filterres attribute of the given <filter> element.
... svgfilterelement.filterresy read only an svganimatedinteger that contains the y component of the filterres attribute of the given <filter> element.
Using the Screen Capture API - Web APIs
using the captured stream the promise returned by getdisplaymedia() resolves to a mediastream that contains at least one video stream that contains the screen or screen area, and which is adjusted or filtered based upon the constraints specifed when getdisplaymedia() was called.
... the object displaymediaoptions contains the mediastreamconstraints to pass into getdisplaymedia(); here, the cursor property is set to always, indicating that the mouse cursor should always be included in the captured media.
ScriptProcessorNode - Web APIs
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.
...ion(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } request.send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // 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 sa...
Using server-sent events - Web APIs
the second message contains a data field with the value "some text".
... the third message contains a data field with the value "another message\nwith two lines".
SpeechRecognition.onresult - Web APIs
recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
SpeechRecognitionAlternative.confidence - Web APIs
recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
SpeechRecognitionAlternative.transcript - Web APIs
recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
SpeechRecognitionAlternative - Web APIs
recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
SpeechRecognitionEvent.results - Web APIs
recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
SpeechRecognitionResult.isFinal - Web APIs
examples recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
SpeechRecognitionResult.item() - Web APIs
recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
SpeechRecognitionResult.length - Web APIs
recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
SpeechRecognitionResult - Web APIs
recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
SpeechRecognitionResultList.item() - Web APIs
recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
SpeechRecognitionResultList.length - Web APIs
recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
SpeechRecognitionResultList - Web APIs
recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
... // each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual results.
StaticRange - Web APIs
staticrange.endcontainer read only returns the dom node which contains the ending point of the range.
... staticrange.startcontainer read only returns the dom node which contains the starting point of the range (which is in turn identified by startoffset.
Using writable streams - Web APIs
listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.textcontent = "[message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); the write() method contains a promise including code that decodes each written chunk into a format that can be written to the ui.
...this contains an instance of the writablestreamdefaultcontroller interface, which can be used by the developer to further control the stream as required.
Text.splitText() - Web APIs
WebAPITextsplitText
after the split, the current node contains all the content up to the specified offset point, and a newly created node of the same type contains the remaining text.
... return value returns a newly created text node that contains the text after the specified offset point.
TextEncoder.prototype.encodeInto() - Web APIs
return value a textencoderencodeintoresult dictionary, which contains two members: read the number of utf-16 units of code from the source that has been converted over to utf-8.
... no zero-termination if the input string contains the character u+0000 in the input, encodeinto() will write a 0x00 byte in the output.
TextTrack - Web APIs
WebAPITextTrack
texttrack.cues read only a texttrackcuelist which contains all of the track's cues.
... texttrack.label read only a human-readable domstring which contains the text track's label, if one is present; otherwise, this is an empty string (""), in which case a custom label may need to be generated by your code using other attributes of the track, if the track's label needs to be exposed to the user.
WebGLRenderingContext.getContextAttributes() - Web APIs
the webglrenderingcontext.getcontextattributes() method returns a webglcontextattributes object that contains the actual context parameters.
... syntax gl.getcontextattributes(); return value a webglcontextattributes object that contains the actual context parameters, or null if the context is lost.
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
possible values: gl.framebuffer_attachment_object_type: the type which contains the attached image.
... gl.framebuffer_attachment_texture_layer a glint indicating the number of the texture layer which contains the attached image.
WebGLRenderingContext.getProgramInfoLog() - Web APIs
it contains errors that occurred during failed linking or validation of webglprogram objects.
... return value a domstring that contains diagnostic messages, warning messages, and other information about the last linking or validation operation.
WebGLRenderingContext.getShaderInfoLog() - Web APIs
it contains warnings, debugging and compile information.
... return value a domstring that contains diagnostic messages, warning messages, and other information about the last compile operation.
Boilerplate 1 - Web APIs
specifically, the html has a <p> element that contains some descriptive text about the page and may also hold error messages; a <canvas> element; and optionally a <button>.
... the css contains rules for body, canvas, and button.
WebRTC connectivity - Web APIs
the information we need to exchange is the offer and answer which just contains the sdp mentioned below.
... the pendinglocaldescription contains not just the offer or answer under consideration, but any local ice candidates which have already been gathered since the offer or answer was created.
Taking still photos with WebRTC - Web APIs
the first panel on the left contains two components: a <video> element, which will receive the stream from webrtc, and a <button> the user clicks to capture a video frame.
... 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.
WebRTC Statistics API - Web APIs
this object contains a map of named dictionaries based on rtcstats and its affiliated types.
... commonly used statistics reference the rtcstatsreport object contains a map of named objects based one of the rtcstats dictionary's subclasses.
Writing WebSocket servers - Web APIs
if the server doesn't understand that version of websockets, it should send a sec-websocket-version header back that contains the version(s) it does understand.
... notice the first frame contains an entire message (has fin=1 and opcode!=0x0), so the server can process or respond as it sees fit.
Web Audio API - Web APIs
an audio context controls the creation of the nodes it contains and the execution of the audio processing, or decoding.
...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.
Using the Web Speech API - Web APIs
each speechrecognitionresult object contains speechrecognitionalternative objects that contain individual recognised words.
... the first case mentioned, although note that at the moment it doesn't seem to fire correctly; it just returns whatever was recognised anyway: recognition.onnomatch = function(event) { diagnostic.textcontent = 'i didnt recognise that color.'; } speechrecognition.onerror handles cases where there is an actual error with the recognition successfully — the speechrecognitionerror.error property contains the actual error returned: recognition.onerror = function(event) { diagnostic.textcontent = 'error occurred in recognition: ' + event.error; } speech synthesis speech synthesis (aka text-to-speech, or tts) involves receiving synthesising text contained within an app to speech, and playing it out of a device's speaker or audio output connection.
Using Web Workers - Web APIs
worker()) that runs a named javascript file — this file contains the code that will run in the worker thread; workers run in another global context that is different from the current window.
...as you will probably know by now, messages can be sent to and from the main thread by using postmessage(), and the message event's data attribute contains data passed back from the worker.
Window.pageYOffset - Web APIs
html the html is extremely simple and has just two elements: an <iframe> that contains the document we're going to scroll, and a <div> into which we'll output the value of pageyoffset when we've finished the scroll.
...byid("frame"); var framedoc = frame.contentdocument; var info = document.getelementbyid("info"); var target = framedoc.getelementbyid("overview"); framedoc.scrollingelement.scrolltop = target.offsettop; info.innertext = "y offset after scrolling: " + frame.contentwindow.pageyoffset + " pixels"; the javascript code begins by getting into frame and info the <iframe> element that contains our content as well as the <div> element into which we'll output the result of our scroll position check.
Window.sidebar - Web APIs
WebAPIWindowsidebar
returns a sidebar object which contains several methods for registering add-ons with the browser.
...adding sherlock search engines contains more details.
Window - Web APIs
WebAPIWindow
that said, even in a tabbed browser, some properties and methods still apply to the overall window that contains the tab, such as resizeto() and innerheight.
... window.document read only returns a reference to the document that the window contains.
XMLHttpRequest - Web APIs
xmlhttprequest.response read only returns an arraybuffer, blob, document, javascript object, or a domstring, depending on the value of xmlhttprequest.responsetype, that contains the response entity body.
... xmlhttprequest.responsetext read only returns a domstring that contains the response to the request as text, or null if the request was unsuccessful or has not yet been sent.
XPathException - Web APIs
properties xpathexception.code read only returns a short that contains one of the error code constants.
... constants constant value description invalid_expression_err 51 if the expression has a syntax error or otherwise is not a legal expression according to the rules of the specific xpathevaluator or contains specialized extension functions or variables not supported by this implementation.
XRSession: inputsourceschange event - Web APIs
the received event, of type xrinputsourceschangeevent, contains a list of any newly added and/or removed input devices.
... bubbles yes cancelable no interface xrinputsourceschangeevent event handler property oninputsourceschange the event object contains lists of the newly-added and/or removed input devices in its added and removed properties.
XRViewerPose.views - Web APIs
the read-only xrviewerpose property views returns an array which contains every xrview which must be rendered in order to fully represent the scene from the viewpoint defined by the viewer pose.
... for monoscopic devices, this array contains a single view.
ARIA Test Cases - Accessibility
if it also contains content, an indication should be given as for regular textboxes.
... n/a n/a jaws 10 - - - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - tooltip dojo nightly build (tooltip) simple tooltip -- the tooltip for the link contains the text "some tooltip" expected at behavior: the tooltip text should be spoken as the user navigates to the widget with the tooltip.
ARIA annotations - Accessibility
to provide a semantic association between the document content being annotated and the annotation, an aria-details attribute can be set on the annotated content that contains the id of the annotated element.
... aria-labelledby="" can be set on an element and given a value the same as the id of an element that contains a label for the element.
ARIA: cell role - Accessibility
if a cell contains column or row header information, use the colheader or rowheader roles, respecitively.
...a row contains one or more cells, grid cells, column headers, or row headers within a grid, table or treegrid, and optionally within a rowgroup.
ARIA: row role - Accessibility
a row contains one or more cells, grid cells or column headers, and possibly a row header, within a grid, table or treegrid, and optionally within a rowgroup.
...each row contains child cells.
ARIA: table role - Accessibility
within that container, each row has role="row" set and contains child cells.
... if the table contains sortable columns or rows, the aria-sort attribute should be added on the header cell element (not the table itself).
Web accessibility for seizures and physical reactions - Accessibility
"a pattern with the potential for provoking seizures contains clearly discernible stripes, numbering more than five light-dark pairs of stripes in any orientation" in addition to stripes, checkered patterns have also been known to cause photosensitive seizures, according to cedars-sinai.
...working draft personalization tools 1.0 working draft three flashes or below threshhold understanding sc 2.3.1 understanding wcag 2.0 (older, but contains some explanations of references made in the wcag 2.1 criteria) three flashes or below threshold understanding success criterion 2.3.1 understanding wcag 2.1 understanding success criteria 1.4.3: contrast (minimum) web accessibility initiative (wai) web animations model w3c working draft web content accessibility guidelines (wcag) 2.0 definition of relative luminance web content accessibilit...
Attribute selectors - CSS: Cascading Style Sheets
ements with a title attribute */ a[title] { color: purple; } /* <a> elements with an href matching "https://example.org" */ a[href="https://example.org"] { color: green; } /* <a> elements with an href containing "example" */ a[href*="example"] { font-size: 2em; } /* <a> elements with an href ending ".org" */ a[href$=".org"] { font-style: italic; } /* <a> elements whose class attribute contains the word "logo" */ a[class~="logo"] { padding: 2px; } syntax [attr] represents elements with an attribute name of attr.
... [attr*=value] represents elements with an attribute name of attr whose value contains at least one occurrence of value within the string.
Coordinate systems - CSS: Cascading Style Sheets
displaying the coordinates as we'll see in the html, the inner box (the one we're watching for events on) contains several paragraphs; one for each of the four coordinate systems we'll be reporting on.
... let inner = document.queryselector(".inner"); let log = document.queryselector(".log"); function setcoords(e, type) { let idx = type + "x"; let idy = type + "y"; document.getelementbyid(idx).innertext = e[idx]; document.getelementbyid(idy).innertext = e[idy]; } a reference to the <div> inside the inner box which contains the paragraphs that will show the coordinate information is fetched into log.
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
in addition to the ability to place items accurately onto a created grid, the css grid layout specification contains rules that control what happens when you create a grid and do not place some or all of the child items.
...the specification contains a long section detailing the grid item placement algorithm, however for most of us we just need to remember a few simple rules for our items.
Basic Concepts of grid layout - CSS: Cascading Style Sheets
grid also contains an algorithm to control the placement of items not given an explicit position on the grid.
... alignment control grid contains alignment features so we can control how the items align once placed into a grid area, and how the entire grid is aligned.
clear - CSS: Cascading Style Sheets
WebCSSclear
if an element contains only floated elements, its height collapses to nothing.
... if you want it to always be able to resize, so that it contains floating elements inside it, you need to self-clear its children.
Getting Started - Developer guides
our javascript will request an html document, test.html, which contains the text "i'm a test." then we'll alert() the contents of the response.
...the document (test.xml) contains the following: <?xml version="1.0" ?> <root> i'm a test.
Media events - Developer guides
the element's error attribute contains more information.
... mozaudioavailable sent when an audio buffer is provided to the audio layer for processing; the buffer contains raw audio samples that may or may not already have been played by the time you receive the event.
HTML attribute reference - HTML: Hypertext Markup Language
buffered <audio>, <video> contains the time range of already buffered media.
... cite <blockquote>, <del>, <ins>, <q> contains a uri which points to the source of the quote or change.
Block-level elements - HTML: Hypertext Markup Language
<main> contains the central content unique to this document.
... <nav> contains navigation links.
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
permitted content if the element has a src attribute: zero or more <track> elements followed by transparent content that contains no <audio> or <video> media elements.
... else: zero or more <source> elements followed by zero or more <track> elements followed by transparent content that contains no <audio> or <video> media elements.
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
WebHTMLElementembed
examples <embed type="video/quicktime" src="movie.mov" width="640" height="480" title="title of my video"> accessibility concerns use the title attribute on an embed element to label its content so that people navigating with assistive technology such as a screen reader can understand what it contains.
...this context shift can be confusing and time-consuming, especially if the embed element contains interactive content like video or audio.
<input type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
value a 7-character domstring specifying a <color> in lower-case hexadecimal notation events change and input supported common attributes autocomplete and list idl attributes list and value methods select() value the value of an <input> element of type color is always a domstring which contains a 7-character string specifying an rgb color in hexadecimal format.
...here we establish some variables, setting up a variable that contains the color we'll set the color well to when we first load up, and then setting up a load handler to do the main startup work once the page is fully loaded.
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
in addition to the actual names of tabs, windows, or inline frames, there are a few special keywords that can be used: _self loads the response into the same browsing context as the one that contains the form.
...use this method when the form has no side-effects and contains only ascii characters.
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
value the value attribute contains a domstring which contains a string representation of the selected number.
... 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.
<input type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
value the value attribute contains a domstring representing the value contained in the search field.
... 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 display in the input field w...
<input type="submit"> - HTML: Hypertext Markup Language
WebHTMLElementinputsubmit
<input type="submit" value="send request"> value a domstring used as the button's label events click supported common attributes type and value idl attributes value methods none value an <input type="submit"> element's value attribute contains a domstring which is displayed as the button's label.
... in addition to the actual names of tabs, windows, or inline frames, there are a few special keywords that can be used: _self loads the response into the same browsing context as the one that contains the form.
<input type="text"> - HTML: Hypertext Markup Language
WebHTMLElementinputtext
value the value attribute is a domstring that contains the current value of the text entered into the text field.
... 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 display in the input field w...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
in addition to the errors described in the table above, the validitystate interface contains the badinput, valid, and customerror boolean readonly properties.
...if you don't do this, and a custom validity was previously set, the input will register as invalid, even if it current contains a valid value on submission.
<menu> - HTML: Hypertext Markup Language
WebHTMLElementmenu
the key difference is that <ul> primarily contains items for display, whilst <menu> is intended for interactive items, to act on.
... context menus consist of a <menu> element which contains <menuitem> elements for each selectable option in the menu, <menu> elements for submenus within the menu, and <hr> elements for separator lines to break up the menu's content into sections.
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
the content attribute contains a valid css <color>.
... other metadata names the whatwg wiki metaextensions page contains a large set of non-standard metadata names that have not been formally accepted yet; however, some of the names included there are already used quite commonly in practice — including the following: creator: the name of the creator of the document, such as an organization or institution.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
cols contains the preferred count of characters that a line should have.
... width contains the preferred count of characters that a line should have.
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
the html <style> element contains style information for a document, or part of a document.
... it contains css, which is applied to the contents of the document containing the <style> element.
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
this attribute contains a timeranges object.
... permitted content if the element has a src attribute: zero or more <track> elements, followed by transparent content that contains no media elements–that is no <audio> or <video> else: zero or more <source> elements, followed by zero or more <track> elements, followed by transparent content that contains no media elements–that is no <audio> or <video>.
Link types - HTML: Hypertext Markup Language
list of the defined link types and their significance in html link type description allowed in these elements not allowed in these elements alternate if the element is <link> and the rel attribute also contains the stylesheet type, the link defines an alternative style sheet; in that case the title attribute must be present and not be the empty string.
... page, of one of these types: for another medium, like a handheld device (if the media attribute is set) in another language (if the hreflang attribute is set), in another format, such as a pdf (if the type attribute is set) a combination of these <a>, <area>, <link> <form> archives defines a hyperlink to a document that contains an archive link to this one.
Expressions and operators - JavaScript
this section describes the operators and contains information about operator precedence.
...d" for the keywords true and null, the typeof operator returns the following results: typeof true; // returns "boolean" typeof null; // returns "object" for a number or string, the typeof operator returns the following results: typeof 62; // returns "number" typeof 'hello world'; // returns "string" for property values, the typeof operator returns the type of value the property contains: typeof document.lastmodified; // returns "string" typeof window.length; // returns "number" typeof math.ln2; // returns "number" for methods and functions, the typeof operator returns results as follows: typeof blur; // returns "function" typeof eval; // returns "function" typeof parseint; // returns "function" typeof shape.split; // returns "function" ...
Functions - JavaScript
in other words, the inner function contains the scope of the outer function.
... for example: a function (a) contains a function (b), which itself contains a function (c).
Indexed collections - JavaScript
for example, consider an array called emp, which contains employees' names indexed by their numerical employee number.
... let wisenarray = array.of(9.3) // wisenarray contains only one element 9.3 referring to array elements because elements are also properties, you can access the using property accessors.
Loops and iteration - JavaScript
example in the example below, the function contains a for statement that counts the number of selected options in a scrolling list (a <select> element that allows multiple selections).
... let i = 0; let n = 0; while (i < 5) { i++; if (i === 3) { continue; } n += i; console.log(n); } //1,3,7,12 let i = 0; let n = 0; while (i < 5) { i++; if (i === 3) { // continue; } n += i; console.log(n); } // 1,3,6,10,15 example 2 a statement labeled checkiandj contains a statement labeled checkj.
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
message warning: string.charat is deprecated; use string.prototype.charat instead warning: string.charcodeat is deprecated; use string.prototype.charcodeat instead warning: string.concat is deprecated; use string.prototype.concat instead warning: string.contains is deprecated; use string.prototype.contains instead warning: string.endswith is deprecated; use string.prototype.endswith instead warning: string.includes is deprecated; use string.prototype.includes instead warning: string.indexof is deprecated; use string.prototype.indexof instead warning: string.lastindexof is dep...
...lready present // (one may use shims for these if not available) (function() { 'use strict'; var i, // we could also build the array of methods with the following, but the // getownpropertynames() method is non-shimable: // object.getownpropertynames(string).filter(function(methodname) { // return typeof string[methodname] === 'function'; // }); methods = [ 'contains', 'substring', 'tolowercase', 'touppercase', 'charat', 'charcodeat', 'indexof', 'lastindexof', 'startswith', 'endswith', 'trim', 'trimleft', 'trimright', 'tolocalelowercase', 'normalize', 'tolocaleuppercase', 'localecompare', 'match', 'search', 'slice', 'replace', 'split', 'substr', 'concat', 'localecompare' ], methodcount = methods.length, assignstringgeneric ...
SyntaxError: for-in loop head declarations may not have initializers - JavaScript
the javascript strict mode-only exception "for-in loop head declarations may not have initializers" occurs when the head of a for...in contains an initializer expression, such as |for (var i = 0 in obj)|.
... the head of a for...in loop contains an initializer expression.
SyntaxError: a declaration in the head of a for-of loop can't have an initializer - JavaScript
the javascript exception "a declaration in the head of a for-of loop can't have an initializer" occurs when the head of a for...of loop contains an initializer expression such as |for (var i = 0 of iterable)|.
... the head of a for...of loop contains an initializer expression.
The arguments object - JavaScript
arguments is an array-like object accessible inside functions that contains the values of the arguments passed to that function.
... arguments[@@iterator] returns a new array iterator object that contains the values for each index in arguments.
Rest parameters - JavaScript
formally defined in function expression), while the arguments object contains all arguments passed to the function; the arguments object is not a real array, while rest parameters are array instances, meaning methods like sort, map, foreach or pop can be applied on it directly; the arguments object has additional functionality specific to itself (like the callee property).
... however, the third argument, manymoreargs, will be an array that contains the 3rd, 4th, 5th, 6th ...
Error.prototype.fileName - JavaScript
the filename property contains the path to the file that raised this error.
... description this non-standard property contains the path to the file that raised this error.
Promise.any() - JavaScript
an asynchronously resolved promise if the iterable passed contains no promises.
... rejection if all of the passed-in promises reject, promise.any asynchronously rejects with an aggregateerror object, which extends error, and contains an errors property with an array of rejection values.
Promise.race() - JavaScript
if the iterable contains one or more non-promise value and/or an already settled promise, then promise.race will resolve to the first of these values found in the iterable.
...33 } an empty iterable causes the returned promise to be forever pending: var foreverpendingpromise = promise.race([]); console.log(foreverpendingpromise); settimeout(function(){ console.log('the stack is now empty'); console.log(foreverpendingpromise); }); // logs, in order: // promise { <state>: "pending" } // the stack is now empty // promise { <state>: "pending" } if the iterable contains one or more non-promise value and/or an already settled promise, then promise.race will resolve to the first of these values found in the array: var foreverpendingpromise = promise.race([]); var alreadyfulfilledprom = promise.resolve(100); var arr = [foreverpendingpromise, alreadyfulfilledprom, "non-promise value"]; var arr2 = [foreverpendingpromise, "non-promise value", promise.resolve(100)]; ...
Reflect - JavaScript
examples detecting whether an object contains certain properties const duck = { name: 'maurice', color: 'white', greeting: function() { console.log(`quaaaack!
... my name is ${this.name}`); } } reflect.has(duck, 'color'); // true reflect.has(duck, 'haircut'); // false returning the object's own keys reflect.ownkeys(duck); // [ "name", "color", "greeting" ] adding a new property to the object reflect.set(duck, 'eyes', 'black'); // returns "true" if successful // "duck" now contains the property "eyes: 'black'" specifications specification ecmascript (ecma-262)the definition of 'reflect' in that specification.
Set.prototype.entries() - JavaScript
the entries() method returns a new iterator object that contains an array of [value, value] for each element in the set object, in insertion order.
... syntax myset.entries() return value a new iterator object that contains an array of [value, value] for each element in the given set, in insertion order.
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.
... value the value the variable contains.
WebAssembly.Module.customSections() - JavaScript
we then do a check using webassembly.module.customsections, looking to see whether the module instance contains a "name" custom section by checking that its length is more than 0.
... webassembly.compilestreaming(fetch('simple-name-section.wasm')) .then(function(mod) { var namesections = webassembly.module.customsections(mod, "name"); if (namesections.length != 0) { console.log("module contains a name section"); console.log(namesections[0]); }; }); specifications specification webassembly javascript interfacethe definition of 'customsections()' in that specification.
WebAssembly.Table() constructor - JavaScript
var tbl = new webassembly.table({initial:2, element:"anyfunc"}); console.log(tbl.length); // "2" console.log(tbl.get(0)); // "null" console.log(tbl.get(1)); // "null" we then create an import object that contains the table: var importobj = { js: { tbl:tbl } }; finally, we load and instantiate a wasm module (table2.wasm) using the webassembly.instantiatestreaming() method.
... the table2.wasm module contains two functions (one that returns 42 and another that returns 83) and stores both into elements 0 and 1 of the imported table (see text representation).
WebAssembly.Table - JavaScript
var tbl = new webassembly.table({initial:2, element:"anyfunc"}); console.log(tbl.length); // "2" console.log(tbl.get(0)); // "null" console.log(tbl.get(1)); // "null" we then create an import object that contains the table: var importobj = { js: { tbl:tbl } }; finally, we load and instantiate a wasm module (table2.wasm) using the webassembly.instantiatestreaming() method.
... the table2.wasm module contains two functions (one that returns 42 and another that returns 83) and stores both into elements 0 and 1 of the imported table (see text representation).
WebAssembly.instantiate() - JavaScript
return value a promise that resolves to a resultobject which contains two fields: module: a webassembly.module object representing the compiled webassembly module.
... instance: a webassembly.instance object that contains all the exported webassembly functions.
WebAssembly.instantiateStreaming() - JavaScript
return value a promise that resolves to a resultobject which contains two fields: module: a webassembly.module object representing the compiled webassembly module.
... instance: a webassembly.instance object that contains all the exported webassembly functions.
Authoring MathML - MathML
html becomes verbose when your document contains advanced structures like lists or tables but fortunately there are many generators from simple notations, wysiwyg editors and other content management systems to help writing web pages.
...abiword contains a small equation editor, based on itex2mml.
<semantics> - MathML
the <annotation> element is the container element containing semantic information in a non-xml format, whereas the <annotation-xml> element contains content in an xml format, e.g.
..."mathml-content", "mathml-presentation", "application/openmath+xml", "image/png") cd the content dictionary that contains the annotation key symbol.
Handling media support issues in web content - Web media technologies
this may be simply the first frame of video; however, in many cases, the first frame is blank, or contains nothing but the logo of a business, or some other image that doesn't give the reader any context for the video's contents.
... a good poster frame is one which is either a representative of the video's contents, or is an image which isn't even from the video itself but contains imagery and/or text which gives the reader a useful idea of the video's contents.
Digital video concepts - Web media technologies
the human eye contains two kinds of photoreceptor (light-sensing) cells.
...for example, in the av1 codec, a record stores the encoded luma for a tile, and a second record contains the chroma data in the form of the u and v values.
Critical rendering path - Web Performance
css object model the dom contains all the content of the page.
... the cssom contains all the styles of the page; information on how to style that dom.
Web Performance
beginner's tutorials the mdn web performance learning area contains modern, up-to-date tutorials covering performance essentials.
...in this guide, we'll show you how to analyze your application's script bundles, so you know what you're using, as well how to detect if your app contains duplicated scripts between bundles.
Add to Home screen - Progressive web apps (PWAs)
it contains multiple fields that define certain information about the web app and how it should behave.
... the click handler contains the following steps: hide the button again with display: none — it is no longer needed once the app is installed.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
this demo consists of three files: index.js, which contains the source code of our app server.js, which contains the server part (written in node.js) service-worker.js, which contains the service worker-specific code.
...there are two options passed to the pushmanager.subscribe() method — the first is uservisibleonly: true, which means all the notifications sent to the user will be visible to them, and the second one is the applicationserverkey, which contains our successfully acquired and converted vapid key.
Responsive Navigation Patterns - Progressive web apps (PWAs)
maximizes space for content on a small screen important items stay visiblein most screen sizes and you decide the item priorities legibility of navigation items is maintained with adequate spacing, by automatically hiding items that don't fit cons: navigation items might be less discoverable because some items are hidden in the drop-down or toggle menu users may not notice the button contains a navigation menu in the smallest screen size one more step is needed to access the hidden navigation items pattern 2: expandable bottom menu similar to the first pattern, the top navigation items rearrange for smaller widths until there is not enough space.
... pros: potentially displays more navigation items in a left navigation compared to a top navigation most items are always visible except in the smallest screen size one button in header maximizes space for content on a small screen cons: navigation items might be less discoverable because some items are hidden in the drop-down or toggle menu users may not notice the button contains a navigation menu in the smallest screen size one more step is needed to access the navigation items that are hidden ...
SVG Core Attributes - SVG: Scalable Vector Graphics
WebSVGAttributeCore
the tag contains one single entry value in the format defined in the tags for identifying languages (bcp47) ietf document.
... value type: <iri>; animatable: no xml:lang it is a universal attribute allowed in all xml dialects to mark up the natural human language that an element contains.
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
97 gradienttransform svg, svg attribute the gradienttransform attribute contains the definition of an optional additional transformation from the gradient coordinate system onto the target coordinate system (i.e., userspaceonuse or objectboundingbox).
...if the attribute contains an odd number of coordinates, the last one will be ignored.
SVG In HTML Introduction - SVG: Scalable Vector Graphics
the only interesting part is the <svg> element it contains.
...the element contains a gradient and two shapes filled with the gradient.
Using shadow DOM - Web Components
all you see in the dom is the <video> element, but it contains a series of buttons and other controls inside its shadow dom.
...this takes as its parameter an options object that contains one option — mode — with a value of open or closed: let shadow = elementref.attachshadow({mode: 'open'}); let shadow = elementref.attachshadow({mode: 'closed'}); open means that you can access the shadow dom using javascript written in the main page context, for example using the element.shadowroot property: let myshadowdom = mycustomelem.shadowroot; if you attach a shadow root to a custom element with mode: closed set, you won't be able to access the shadow dom from the outside — mycustomelem.shadowroot retur...
Web Components
reference custom elements customelementregistry contains functionality related to custom elements, most notably the customelementregistry.define() method used to register new custom elements so they can then be used in your document.
... html templates <template> contains an html fragment that is not rendered when a containing document is initially loaded, but can be displayed at runtime using javascript, mainly used as the basis of custom element structures.
<xsl:if> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementif
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:if> element contains a test attribute and a template.
... syntax <xsl:if test=expression> template </xsl:if> required attributes test contains an xpath expression that can be evaluated (using the rules defined for boolean( ) if necessary) to a boolean value.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
since the xml data loaded only contains the raw information without any presentation data, it can load quickly even on dialup.
... 33 <xsl:if> element, reference, xslt, if the <xsl:if> element contains a test attribute and a template.
Caching compiled WebAssembly modules - WebAssembly
function opendatabase() { return new promise((resolve, reject) => { var request = indexeddb.open(dbname, dbversion); request.onerror = reject.bind(null, 'error opening wasm cache database'); request.onsuccess = () => { resolve(request.result) }; request.onupgradeneeded = event => { var db = request.result; if (db.objectstorenames.contains(storename)) { console.log(`clearing out version ${event.oldversion} wasm cache`); db.deleteobjectstore(storename); } console.log(`creating version ${event.newversion} wasm cache`); db.createobjectstore(storename) }; }); } looking up modules in the database our next function — lookupindatabase() — provides a simple promise-based ope...
...iatestreaming(fetch(url)).then(results => { storeindatabase(db, results.module); return results.instance; }); }) }, note: it is for this kind of usage that webassembly.instantiate() returns both a module and an instance: the module represents the compiled code and can be stored/retrieved in idb or shared between workers via postmessage(); the instance is stateful and contains the callable javascript functions, therefore it cannot be stored/shared.
Compiling from Rust to WebAssembly - WebAssembly
the third line contains a use command, which imports code from a library into your code.
...it contains {}s, where variables will be interpolated.
port - Archive of obsolete content
this means you can't send functions, and if the object contains methods they won't be encoded.
Communicating using "port" - Archive of obsolete content
this means you can't send functions, and if the object contains methods they won't be encoded.
Classes and Inheritance - Archive of obsolete content
the add-on sdk team consists of highly trained professionals, but they are also lazy: that is why the sdk contains a helper function that handles this boilerplate code for us.
Program ID - Archive of obsolete content
if the package.json does include an id field, and it contains "@", then this is written into the install.rdf as the add-on id.
XUL Migration Guide - Archive of obsolete content
the tabs/utils module gives you direct access to the tabbrowser object and the xul tab objects it contains.
indexed-db - Archive of obsolete content
var { indexeddb, idbkeyrange } = require('sdk/indexed-db'); var database = {}; database.onerror = function(e) { console.error(e.value) } function open(version) { var request = indexeddb.open("stuff", version); request.onupgradeneeded = function(e) { var db = e.target.result; e.target.transaction.onerror = database.onerror; if(db.objectstorenames.contains("items")) { db.deleteobjectstore("items"); } var store = db.createobjectstore("items", {keypath: "time"}); }; request.onsuccess = function(e) { database.db = e.target.result; }; request.onerror = database.onerror; }; function additem(name) { var db = database.db; var trans = db.transaction(["items"], "readwrite"); var store = trans.objectstore("items"); ...
page-mod - Archive of obsolete content
this means you can't send functions, and if the object contains methods they won't be usable.
page-worker - Archive of obsolete content
it contains a single key named script whose value is a boolean that indicates whether or not to execute script in the content.
request - Archive of obsolete content
response the response object contains the response to a network request issued using a request object.
tabs - Archive of obsolete content
it contains various tab properties, several methods for manipulation, as well as per-tab event registration.
windows - Archive of obsolete content
this object has the same interface as the tabs api, except it contains only the tabs in this window, not all tabs in all windows.
/loader - Archive of obsolete content
'resource://my-addon/' ], [ '', 'resource:///modules/' ] ]; resolveuri('./main', mapping); // => resource://my-addon/main.js resolveuri('devtools/gcli', mapping); // => resource:///modules/devtools/gcli.js resolveuri('sdk/core/promise', mapping); // => resource://gre/modules/commonjs/sdk/core/promise.js override() this function is used to create a fresh object that contains own properties of two arguments it takes.
content/loader - Archive of obsolete content
symbiont inherits from loader but contains its own frame into which it loads content supplied as the contenturl option.
core/promise - Archive of obsolete content
e examples above: const { defer } = require('sdk/core/promise'); function readasync(url) { var deferred = defer(); let xhr = new xmlhttprequest(); xhr.open("get", url, true); xhr.onload = function() { deferred.resolve(xhr.responsetext); }; xhr.onerror = function(event) { deferred.reject(event); }; xhr.send(); return deferred.promise; } so defer returns an object that contains a promise and two resolve, reject functions that can be used to resolve / reject that promise.
net/xhr - Archive of obsolete content
attenuating access based on a regular expression may be ineffective if it's easy to write a regular expression that looks safe but contains a special character or two that makes it far less secure than it seems at first glance.
places/history - Archive of obsolete content
contains url, time, accesscount and title of the entry.
remote/parent - Archive of obsolete content
const { remoterequire } = require("sdk/remote/parent"); remoterequire("./my-module.js", module); note that even single-process applications have a process that contains content frames.
test/assert - Archive of obsolete content
to check that the exception thrown contains a specific message, pass a regular expression here: the message property of the exception thrown must match the regular expression for example, suppose we define two different custom exceptions: function myerror(message) { this.name = "myerror"; this.message = message || "default message"; } myerror.prototype = new error(); myerror.prototype.constructor = myerror; function anothererror...
test/runner - Archive of obsolete content
this module contains the package's main program, which does a bit of high-level setup and then delegates test finding and running to the harness module.
ui/button/toggle - Archive of obsolete content
equentclicks(state) { console.log("you clicked '" + state.label + "' again"); } function firstchange(state) { console.log("you changed '" + state.label + "'"); button.removelistener("change", firstchange); button.on("change", subsequentchanges); } function subsequentchanges(state) { console.log("you changed '" + state.label + "' again"); } the listener is passed a state object that contains all the button's properties.
ui/sidebar - Archive of obsolete content
on the sidebar end of the conversation, sidebar scripts get a global variable addon that contains a port for sending and receiving messages.
util/object - Archive of obsolete content
extend(arguments) returns an object that inherits from the first argument and contains all of the properties from all following arguments, with precedence from right to left.
jpm - Archive of obsolete content
the way this works is: you run jpm sign anytime you need to create a new version you host the signed add-on xpi and update it when you need to you host an "update manifest", which, among other things, contains a url pointing to the xpi your add-on tells firefox where it can find the update manifest to do this, include two extra keys in package.json: updateurl: this url is included in the install manifest of the xpi file that jpm xpi builds.
jpmignore - Archive of obsolete content
if your project folder contains a lot of files that aren't necessary for the xpi to run, like documentation, jshint, etc., you can use .jpmignore as a whitelist instead of a blacklist.
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.
Creating annotations - Archive of obsolete content
the show message contains: the url for the page, the id attribute value, and the text content of the page element.
Displaying annotations - Archive of obsolete content
ent) { self.port.emit('show', $(this).attr('annotation')); event.stoppropagation(); event.preventdefault(); }); $('.annotated').bind('mouseleave', function() { 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.
Overview - Archive of obsolete content
meanwhile the main module contains the application logic and mediates interactions between the different sdk objects.
Display a Popup - Archive of obsolete content
the panel just contains a <textarea> element: when the user presses the return key, the contents of the <textarea> is sent to the main add-on code.
Modifying Web Pages Based on URL - Archive of obsolete content
in the add-on script, you need to listen for the onattach event to get passed a worker object that contains port.
Using third-party modules (jpm) - Archive of obsolete content
summary first, while in the root of your add-on, install the package that contains the modules you want to use: npm install menuitem --save now you'll see a new directory in your add-on root called "node_modules" that contains a directory "menuitem".
Customizing the download progress bar - Archive of obsolete content
this is required since it contains platform-specific directives, as we will see.
HTML in XUL for rich tooltips - Archive of obsolete content
our enhanced xul tooltip is an element that is written ahead of time, and it contains an html div element whose type attribute lowers its privileges to being that content element, although it is an element of chrome.
Sidebar - Archive of obsolete content
is moment: if (sidebarwindow.location.href == "chrome://yourextension/content/whatever.xul") { // call "yournotificationfunction" in the sidebar's context: sidebarwindow.yournotificationfunction(anyarguments); } testing which sidebar is open the sidebar content may contain different panels (bookmarks, history, webpanel, etc.) and sometimes one wants to only act on the sidebar when it contains a specific panel.
StringView - Archive of obsolete content
ljiunqbfzwrhdgeax2zpbmkax19sawjjx3n0yxj0x21haw5aqedmsujdxziumi41af9fzgf0yv9zdgfydabfx2dtb25fc3rhcnrfxwbfx2rzb19oyw5kbguax0lpx3n0zglux3vzzwqax19sawjjx2nzdv9pbml0af9lbmqax3n0yxj0af9fynnzx3n0yxj0ag1haw4ax0p2x1jlz2lzdgvyq2xhc3nlcwbfx1rnq19ftkrfxwbfsvrnx3jlz2lzdgvyve1dbg9uzvrhymxlaf9pbml0aa==", "ascii", 1444, 12); alert(string.fromcharcode.apply(null, swhelloworld.bufferview)); // swhelloworld.buffer contains the whole file alert(swhelloworld); // "hello world" /* traslating "hello world" into italian...
JavaScript timers - Archive of obsolete content
timer.jsm the timer.jsm javascript code module contains pure-javascript implementations of settimeout and cleartimeout that are compatible with the dom window functions, but that can be used by code that does not have access to a dom window (for example, javascript code modules or content frame scripts).
Windows - Archive of obsolete content
this can be used in cases in which you need to uniquely identify a dom window during the duration of the application's lifespan: var util = win.queryinterface(components.interfaces.nsiinterfacerequestor).getinterface(components.interfaces.nsidomwindowutils); var windowid = util.outerwindowid; after running that code, windowid contains the outer window's unique id.
Deploying a Plugin as an Extension - Archive of obsolete content
this contains information about our extension; all extensions have one.
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.
Installing Extensions and Themes From Web Pages - Archive of obsolete content
the href attribute contains a direct link to the extension xpi file, this is what will show in the location bar when the link is moused over.
Jetpack Processes - Archive of obsolete content
the error object contains the following properties: filename, linenumber, and message.
Legacy Add-ons - Archive of obsolete content
this section contains links to documentation for legacy technology for add-on development, including: add-on sdk legacy extensions for firefox for android earlier technology bootstrapped extensions overlay extensions ...
Multiple item extension packaging - Archive of obsolete content
the extension manager will read the install.rdf install manifest to determine if this is a multiple item package and then start the installation of the individual packages it contains automatically.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
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!
Appendix F: Monitoring DOM changes - Archive of obsolete content
the code below contains an inefficient fallback implementation for older browsers.
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
pup", { onpopupshowing: function(event) { addentrytopopup(this, document, window); } }, null ] ]; var capturednodes = {}; var toolbox = doc.getelementbyid("navigator-toolbox"); var palette = toolbox.palette; var domfragment = jsontodom(jsontemplatebtn, document, capturednodes); palette.appendchild(domfragment); alert("capturednodes contains any created nodes that have optionally been captured (for later convenient javascript access) by giving them a 'key' attribute; for example: " + capturednodes.mytestbutton123); another example this here is another example of using jsontodom but in the html scope, a complex form is created with ease.
Handling Preferences - Archive of obsolete content
each source is a js file that contains some special functions not available in regular code.
JavaScript Object Management - Archive of obsolete content
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.
Overlay extensions - Archive of obsolete content
this page contains links to documentation for the approach to developing extensions for gecko-based applications which uses: xul overlays to specify the interface apis available to privileged code, such as tabbrowser and javascript modules, to interact with the application and content.
Session store API - Archive of obsolete content
me (whether the tab is in the process of being restored or not), using code similar to the following: var ss = components.classes["@mozilla.org/browser/sessionstore;1"] .getservice(components.interfaces.nsisessionstore); var currenttab = gbrowser.selectedtab; var retrieveddata = ss.gettabvalue(currenttab, "key-name-here"); after this code executes, the variable retrieveddata contains the value saved for the key "key-name-here".
Setting up an extension development environment - Archive of obsolete content
the contents of this file should be the path to the directory that contains your install.rdf file, for example /full/path/to/yourextension/ on mac and linux, and c:\full\path\to\yourextension\ on windows.
Signing an extension - Archive of obsolete content
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.
Promises - Archive of obsolete content
the following page contains examples of many promise-based replacement apis for common operations.
Using the Stylesheet Service - Archive of obsolete content
loadandregistersheet fails if css contains #id.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
for wired news, the center (or main) column usually contains the most important content for each page.
XML data - Archive of obsolete content
this page contains an example of how you can use css with xml data.
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.
Creating a dynamic status bar extension - Archive of obsolete content
the refreshinformation() function contains another function, called inforeceived().
Creating a status bar extension - Archive of obsolete content
the xul overlay the xul overlay file contains the xul description of the user interface we want to add to firefox.
Getting the page URL in NPAPI plugin - Archive of obsolete content
via dom from benjamin smedberg: the npapi gives you the ability to get access to the nsidomwindow object which contains the current plugin via the npnvdomelement enum passed to npn_getvalue.
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.
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).
Kill the XUL.mfl file for good - Archive of obsolete content
avoiding the creation of the xul.mfl file mozilla creates in its profile directory a file named xul.mfl, which contains pre-compiled ui elements.
Creating a Firefox sidebar extension - Archive of obsolete content
an extension package usually contains a "content" provider, which contains the xul code and application logic.
Finding the file to modify - Archive of obsolete content
it contains elements for all common ui widgets (menus, buttons, toolbars, etc.) and many sophisticated ones (trees, browsers, color pickers).
Making a Mozilla installation modifiable - Archive of obsolete content
the registry contains a bunch of complicated configuration statements in which you will find a number of urls of the form jar:resource:/chrome/something.jar!/something-else...
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
: url("chrome://tinderstatus/content/tb-success.png"); } statusbarpanel#tinderbox-status[status="testfailed"] { list-style-image: url("chrome://tinderstatus/content/tb-testfailed.png"); } statusbarpanel#tinderbox-status[status="busted"] { list-style-image: url("chrome://tinderstatus/content/tb-busted.png"); } then we need to create two files in the directory, one called contents.rdf which contains information for the chrome registry about the component being installed and one called install.js that contains the code to install the component.
In-Depth - Archive of obsolete content
then it contains a xul:hbox with the class .toolbar-holder.
Drag and Drop - Archive of obsolete content
isdataflavorsupported(flavor) returns true if the data being dragged contains data of the specified flavor.
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
there is a static variable on the // nsieventqueueservice that contains the id of the special ui event queue.
External CVS snapshots in mozilla-central - Archive of obsolete content
mozilla-central contains copies of external software modules that it depends on.
Layout System Overview - Archive of obsolete content
frames are an encapsulation of a region on the screen, a region that contains geometry (size and location, stacking order).
JavaScript OS.Shared - Archive of obsolete content
module os.shared contains tools to interact with the operating system (and, more generally, in c) in javascript.
CRMF Request object - Archive of obsolete content
the object returned by generatecrmfrequest() contains one of those.
importUserCertificates - Archive of obsolete content
"certrepstring" this string is the cmmf certification response from the ca that contains the user's certificate(s).
First run - Archive of obsolete content
by default this page contains some simple text explaining that they may now use the jetpack and how to uninstall it.
First Run - Archive of obsolete content
by default this page contains some simple text explaining that they may now use the jetpack and how to uninstall it.
Settings - Archive of obsolete content
the value of this variable must be an object that contains a property named settings.
Settings - Archive of obsolete content
the value of this variable must be an object that contains a property named settings.
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
note that the submenu contains many items, including a menu separator: jetpack.menu.context.page.add({ label: "ice cream", icon: "http://example.com/ice-cream.png", menu: new jetpack.menu(["vanilla", "chocolate", "pistachio", null, "none"]), command: function (menuitem) jetpack.notifications.show(menuitem.label) }); add an item to the hyperlink context menu that tweets the link: jetpack.menu.context.page.on("a").add(f...
statusBar - Archive of obsolete content
the class statusbar contains functions to add and control the statusbar of the browser.
Metro browser chrome tests - Archive of obsolete content
a simple test looks like this: gtests.push({ desc: "test loading about:blank", setup: function () { }, teardown: function () { }, run: function () { yield addtab("about:blank"); is(tab.browser.currenturi.spec, "about:blank", "about:blank is loaded"); } }); function test() { runtests(); } gtests contains individual tests that make up the library of tests your test file will contain.
New Security Model for Web Services - Archive of obsolete content
for example, if the script in question is "http://www.example.com/foo/bar.xml", then the declarations file http://www.example.com/web-scripts-access.xml which contains the "delegate" keyword delegates to http://www.example.com/foo/web-scripts-access.xml.
Plugin Architecture - Archive of obsolete content
this page contains some notes on how plugins work internally in gecko.
Bundles - Archive of obsolete content
how-to here is a simple way to build a basic web application bundle: create file called webapp.ini that contains something like: [parameters] id=unique-app-id@unique-author-id.whatever name=webapp name uri=http://[the-url-what-you-want-to-connect-to]/ status=yes location=no sidebar=no navigation=no zip the file to [whatever].webapp double-click the webapp bundle or use prism -webapp [path-to-webapp] structure a bundle can contain the following files.
HostWindow - Archive of obsolete content
location bar - a readonly textbox that contains the currently displayed url.
Hacking wiki - Archive of obsolete content
the <tt>css</tt> folder contains files that are supposed to be in the <tt>/css</tt> directory of the site.) to get a working install, you need to configure mediawiki.
RDF Datasource How-To - Archive of obsolete content
it contains elements for authorship, subject, publication date, etc.
Reading textual data - Archive of obsolete content
in embedded nulls such as utf-16 and utf-32 // first, get and initialize the converter var converter = components.classes["@mozilla.org/intl/scriptableunicodeconverter"] .createinstance(components.interfaces.nsiscriptableunicodeconverter); converter.charset = /* the character encoding you want, using utf-8 here */ "utf-8"; // this assumes that 'file' is a variable that contains the file you want to read, as an nsifile var fis = components.classes["@mozilla.org/network/file-input-stream;1"] .createinstance(components.interfaces.nsifileinputstream); fis.init(file, -1, -1, 0); var lis = fis.queryinterface(components.interfaces.nsilineinputstream); var linedata = {}; var cont; do { cont = lis.readline(linedata); var line = converter.converttounicode...
Frequently Asked Questions - Archive of obsolete content
this is either because your browser doesn't support svg (you must have mozilla firefox 1.5 or newer), or because the webpage/server isn't correctly telling mozilla that the file contains svg.
Archived SpiderMonkey docs - Archive of obsolete content
this section contains old spidermonkey documentation.
Standalone XPCOM - Archive of obsolete content
building standalone xpcom here are the instructions for building the standalone xpcom on unix or windows: step 1 : pull the sources cvs -z 3 co mozilla/client.mk cd mozilla gmake -f client.mk pull_all build_modules=xpcom step 2 : build xpcom standalone ./configure --enable-standalone-modules=xpcom --enable-application=standalone gmake testing standalone xpcom xpcom/sample contains a sample application and a component.
Supporting per-window private browsing - Archive of obsolete content
if some action triggered by a chrome element (such as a button) requires an api that takes a privacy context, the most relevant window is the one that contains the chrome element.
Cmdline tests - Archive of obsolete content
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=runtestlib() r.run_test(name='memstats', command="%s -memstats testdata/memstats.abc" % r.avm, expectedout=[ 'gross stats', 'managed fragmentation', 'gross stats end', ...
Tamarin build documentation - Archive of obsolete content
the tamarin codebase contains a cross-platform build system for mozilla developers.
Treehydra Manual - Archive of obsolete content
it is also acceptable for meet to return a value that contains the intersection--this may cause the analysis to have more false positives but will not introduce false negatives.
Binding Attachment and Detachment - Archive of obsolete content
this block contains script that executes upon completion of the binding attachment.
DOM Interfaces - Archive of obsolete content
the nsidomdocumentxbl interface the nsidomdocumentxbl interface contains methods for manipulating xbl bindings.
Event Handlers - Archive of obsolete content
the handler contains script that is executed when an event flows to the object the handler is attached to and if that event matches all of the criteria specified by the handler.
Example Sticky Notes - Archive of obsolete content
--> <getter><![cdata[ var st = this.innerhtml || ''; if (st != '') { var re = /<\/?[^>]+>/gi; return st.replace(re,''); } else { return ''; } ]]></getter> <setter><![cdata[ // "val" in setter contains the assignment value.
XBL 1.0 Reference - Archive of obsolete content
for this reason it contains many comments and some blocks could be avoided in a more compact solution yet used here for demonstration purposes.
Mac stub installer - Archive of obsolete content
alternative to steps 3 and 4 copy the "installer modules" folder from the "mozilla installer" folder into the "macbuild" folder that contains the build debug or non-debug installer binary next to miw.mcp.
Install Wizards (aka: Stub Installers) - Archive of obsolete content
it contains some files to be installed and the install script, usually named install.js, which contains javascript directives for actions to take during an install including adding files and directories, removing old or obsolete files and directories, executing command line tools, etc.
addDirectory - Archive of obsolete content
xpisourcepath a string specifying the location of the directory within the xpi file.an empty string ("") causes the creation of a subdirectory node in the registry without actually unpacking any files, which may be useful when you are updating a package that contains subcomponents that could also be updated separately.
getFolder - Archive of obsolete content
the first set contains platform-independent locations; the second set contains platform-specific locations.
initInstall - Archive of obsolete content
sion version, int flags); int initinstall ( string displayname, string package, string version, int flags); int initinstall ( string displayname, string package, string version); int initinstall ( string displayname, string package, installversion version); parameters the initinstall method has the following parameters: displayname a string that contains the name of the software being installed.
Properties - Archive of obsolete content
jarfile alias for archive platform contains information about the platform xpinstall was compiled for/runs on.
XPInstall - Archive of obsolete content
an xpi (pronounced "zippy" and derived from xpinstall) installer module is a zip file that contains an install script or manifest (entitled install.js or install.rdf) at the root of the file.
empty - Archive of obsolete content
« xul reference home empty type: boolean set to true if the element is a container that contains no children.
multiple - Archive of obsolete content
« xul reference home multiple type: boolean set to true to indicate that the value contains multiple values separated by commas.
preference.type - Archive of obsolete content
in this situation the preference will save the path to a property file which contains the actual value of the preference.
rel - Archive of obsolete content
ArchiveMozillaXULAttributerel
value of the subject must be less than the value greater the numeric value of the subject must be greater than the value before the string value of subject must come before value alphabetically after the string value of subject must come after value alphabetically startswith the value of subject must start with the value endswith the value of subject must end with the value contains the value of subject must contain the value as a substring ...
right - Archive of obsolete content
placing the element which contains this attribute within the stack may result in the stack changing size.
rows - Archive of obsolete content
ArchiveMozillaXULAttributerows
if the element contains more than this number of rows, a scrollbar will appear which the user can use to scroll to the other rows.
sizemode - Archive of obsolete content
issues with this attribute (at least on firefox 3): sizemode is only updated when the value of the persist attribute on the root element (such as <window>) contains sizemode.
stringbundle.src - Archive of obsolete content
« xul reference home src type: uri the uri of the property file that contains the localized strings.
tooltiptext - Archive of obsolete content
this can be used instead of setting the tooltip to a popup for the common case where it contains only text.
getEditor - Archive of obsolete content
« xul reference home geteditor( window ) return type: nsieditor returns the editing interface for the editor which contains numerous methods for manipulating the document.
getHTMLEditor - Archive of obsolete content
« xul reference home gethtmleditor( window ) return type: nsihtmleditor returns the html editing interface for the editor which contains methods for manipulating an html document.
getTabForBrowser - Archive of obsolete content
« xul reference home gettabforbrowser( browser ) return type: tab returns the xul tab which contains the specified browser.
Methods - Archive of obsolete content
« xul reference home acceptdialog additemtoselection addpane addprogresslistener addsession addtab addtabsprogresslistener advance advanceselectedtab appendcustomtoolbar appendgroup appenditem appendnotification blur cancel canceldialog centerwindowonscreen checkadjacentelement clearresults clearselection click close collapsetoolbar contains decrease decreasepage docommand ensureelementisvisible ensureindexisvisible ensureselectedelementisvisible expandtoolbar extra1 extra2 focus getbrowseratindex getbrowserfordocument getbrowserfortab getbrowserindexfordocument getbutton getdefaultsession geteditor getelementsbyattribute getelementsbyattributens getformattedstring gethtmleditor getindexoffirstvis...
Special per-platform menu considerations - Archive of obsolete content
this menu contains a number of items that pertain to the application.
Tooltips - Archive of obsolete content
<tooltip id="iconic"> <image src="help.png"/> <label value="save a file to a remote site"/> </tooltip> <button label="save" tooltip="iconic"/> in this example, a tooltip with the id 'iconic' contains an image and a label.
Popup Guide - Archive of obsolete content
context menus a context menu is like a regular menu except that the commands it contains apply to what the user had clicked on to open the context menu.
browser.preferences - Archive of obsolete content
« xul reference preferences type: nsiprefservice this read-only property contains an nsipref object for getting and setting user preferences.
contentDocument - Archive of obsolete content
« xul reference contentdocument type: document this read-only property contains the document object in the element.
contentPrincipal - Archive of obsolete content
« xul reference contentprincipal type: nsiprincipal this read-only property contains the principal for the content loaded in the browser, which provides security context information.
contentTitle - Archive of obsolete content
« xul reference contenttitle type: string this read-only property contains the title of the document object in the browser.
contentViewerEdit - Archive of obsolete content
« xul reference contentvieweredit type: nsicontentvieweredit this read-only property contains the nsicontentvieweredit which handles clipboard operations on the document.
currentURI - Archive of obsolete content
« xul reference currenturi type: nsiuri this read-only property contains the currently loaded url.
docShell - Archive of obsolete content
« xul reference docshell type: nsidocshell this read-only property contains the nsidocshell object for the document.
documentCharsetInfo - Archive of obsolete content
« xul reference documentcharsetinfo obsolete since gecko 12.0 type: nsidocumentcharsetinfo this read-only property contains the nsidocumentcharsetinfo object for the document which is used to handle which character set should be used to display the document.
markupDocumentViewer - Archive of obsolete content
« xul reference markupdocumentviewer type: nsimarkupdocumentviewer this read-only property contains the nsimarkupdocumentviewer which is responsible for drawing the document.
sessionHistory - Archive of obsolete content
« xul reference sessionhistory type: nsishistory this read-only property contains the nsishistory object which holds the session history.
strings - Archive of obsolete content
the enumeration contains nsipropertyelement objects.
tabContainer - Archive of obsolete content
« xul reference tabcontainer type: tabs element returns the tabs element that contains the tabs.
tabbox - Archive of obsolete content
« xul reference tabbox type: tabbox element returns the tabbox element that contains the tabs.
treeBoxObject - Archive of obsolete content
this object implements the nsitreeboxobject interface and contains functions for retrieving the cells at certain coordinates, redrawing cells and scrolling the tree.
webBrowserFind - Archive of obsolete content
« xul reference webbrowserfind type: nsiwebbrowserfind this read-only property contains an nsiwebbrowserfind object which can be used to search for text in the document.
webProgress - Archive of obsolete content
« xul reference webprogress type: nsiwebprogress this read-only property contains an nsiwebprogress object which is used to monitor the progress of a document loading.
Actions - Archive of obsolete content
this action contains only one element, but you can put as many or as few elements as you need.
Multiple Rule Example - Archive of obsolete content
//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/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg, ?phototitle = obelisk) the first result matches the first rule and contains variables for the two additional predicates that were examined in the conditions.
Result Generation - Archive of obsolete content
while the information network created by the template builder contains a number of different pieces of necessary information, for the purposes of this discussion, we will only be interested in the list of possible results.
Template Builder Interface - Archive of obsolete content
the composite datasource can only be accessed from privileged code, regardless of what datasources it contains.
Code Samples - Archive of obsolete content
this page contains sample code that you can use with the custom toolbar button tutorial.
Additional Install Features - Archive of obsolete content
during installation, a log file is created that contains the operations that are performed.
Anonymous Content - Archive of obsolete content
l thing): <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <binding id="scrollbarbinding"> <content> <xul:scrollbarbutton type="decrement"/> <xul:slider flex="1"> <xul:thumb/> </xul:slider> <xul:scrollbarbutton type="increment"/> </content> </binding> </bindings> this file contains a single binding, declared with the binding element.
Box Model Details - Archive of obsolete content
centering buttons example 4 : source view <hbox pack="center" align="center" flex="1"> <button label="look at me!"/> <button label="push me!"/> </hbox> this example contains a horizontal box with two buttons in it, contained inside a flexible box.
Commands - Archive of obsolete content
the command dispatcher contains methods for retrieving controllers for commands and for retrieving and modifying the focus.
Content Panels - Archive of obsolete content
the third type is used when your window contains multiple browser elements, for example if you have a sidebar displaying some extra content.
Creating a Skin - Archive of obsolete content
if you look at this image (btn1.gif), you will notice that it contains a grid of smaller images, each one 16 by 16 pixels.
Localization - Archive of obsolete content
a file is created which contains the entity declarations for each supported language.
Modifying a XUL Interface - Archive of obsolete content
the box element contains a button element.
Simple Menu Bars - Archive of obsolete content
this box contains the list of menu commands.
Skinning XUL Files by Hand - Archive of obsolete content
on to the actual global.css file: after some comments, the css file contains basic style information for the <window> and <dialog> elements.
Stack Positioning - Archive of obsolete content
example 1 : source view <stack> <button label="goblins" left="5" top="5"/> <button label="trolls" left="60" top="20"/> <button label="vampires" left="10" top="60"/> </stack> the stack here contains three elements, each positioned at the coordinates given by the left and top attributes.
Styling a Tree - Archive of obsolete content
it contains a function appendelement() which can be used to add an element to the array.
Templates - Archive of obsolete content
you can see that the template contains a single button.
Tree View Details - Archive of obsolete content
for example, if the liquids row was opened, the corresponding array from childdata, which in this case contains only the single mercury child, will be inserted into the visibledata array after liquids but before gases.
Using Spacers - Archive of obsolete content
for example, if a box is 200 pixels wide and contains two flexible buttons, the first 50 pixels and the other 90 pixels, there will be 60 pixels of space left over.
XPCOM Examples - Archive of obsolete content
window management this example contains rdf datasource that will be seen in the later section.
XPCOM Interfaces - Archive of obsolete content
the interfaces property of the components object contains a list of all the interfaces that are available.
Using the Editor from XUL - Archive of obsolete content
the xul contains an <editor> tag, e.g.: <editor type="content-primary" id="content-frame" src="about:blank" flex="1"/> the attribute type="content-primary" identifies this as the window content element, i.e.
Writing Skinnable XUL and CSS - Archive of obsolete content
this package contains a special skin called theglobal skin.
XUL Questions and Answers - Archive of obsolete content
creating mozsearch plugins contains more help information about creating mozsearch plugin on firefox 2.
label - Archive of obsolete content
ArchiveMozillaXULlabel
<label control="email">email address</label> <textbox id="email"/> if the text node contains no tags, it can easily be accessed and manipulated from javascript using node.textcontent.
listbox - Archive of obsolete content
if the element contains more than this number of rows, a scrollbar will appear which the user can use to scroll to the other rows.
listcell - Archive of obsolete content
by default it only contains text but iconic and checkbox listcells are also available.
listitem - Archive of obsolete content
by default it contains a single listcell element of type and class appropriate to that of the listitem.
menubar - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container that usually contains menu elements.
preference - Archive of obsolete content
in this situation the preference will save the path to a property file which contains the actual value of the preference.
richlistbox - Archive of obsolete content
item, insertitemat, invertselection, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <richlistbox> <richlistitem> <description>a xul description!</description> </richlistitem> <richlistitem> <button label="a xul button"/> </richlistitem> </richlistbox> the richlistbox element contains multiple richlistitem elements, which can contain any content.
statusbar - Archive of obsolete content
contains statusbarpanels.
tabbox - Archive of obsolete content
the tabbox should contain two children, the first a tabs element which contains the tabs and the second a tabpanels element which contains the contents of the pages.
tabs - Archive of obsolete content
ArchiveMozillaXULtabs
tabbox type: tabbox element returns the tabbox element that contains the tabs.
textbox - Archive of obsolete content
if the element contains more than this number of rows, a scrollbar will appear which the user can use to scroll to the other rows.
timepicker - Archive of obsolete content
it contains three fields to enter the hour, minute and second.
Custom app bundles for Mac OS X - Archive of obsolete content
xulrunner (this is the xulrunner stub) resources/ (this is where you place your xul application code and support files) application.ini (xulrunner-related application settings) example.icns (this is the icon which will be used by your application bundle) chrome/ content/ example.xul (this directory contains your application's chrome) example.manifest defaults/ preferences/ app-prefs.js (this provides some default values for preferences) application bundle contents in addition to the standard directory hierarchy that's required of all mac ...
Getting started with XULRunner - Archive of obsolete content
on the mac, extract the tar.bz2 archive, which contains xulrunner as xul.framework.
XULRunner Hall of Fame - Archive of obsolete content
it also contains a built in email marketing system that is tightly integrated with the associated web site.
Using SOAP in XULRunner 1.9 - Archive of obsolete content
several alternatives were considered: soapclient 2.4 - this library contains a few javascript mistakes but nevertheless seems (fairly) widely used, mature and tested.
calICalendarView - Archive of obsolete content
it also fueled the development, however, of the more predictable, but less flexible calidecoratedview, which usually contains an embedded calicalendarview.
External resources for plugin creation - Archive of obsolete content
it contains pretty much everything you're likely to need to create most applications, and is particularly good for creating highly-specialised uis and for handling graphics and sound.
NPEmbedPrint - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary substructure of npprint that contains platform-specific information used during embedded mode printing.
NPFullPrint - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary substructure of npprint that contains platform-specific information used during full-page mode printing.
NPN_Evaluate - Archive of obsolete content
result on return, contains the value returned by the script.
NPN_GetProperty - Archive of obsolete content
<tt>result</tt> on return, contains the value of the specified property.
NPN_GetURL - Archive of obsolete content
if the buffer contains header information (even a blank line).
NPN_PostURL - Archive of obsolete content
buf path to local temporary file or data buffer that contains the data to post.
NPN_PostURLNotify - Archive of obsolete content
buf path to local temporary file or data buffer that contains the data to post.
NPN_Status - Archive of obsolete content
message pointer the buffer that contains the status message string to display.
NPN_UserAgent - Archive of obsolete content
returns a pointer to a buffer that contains the user agent field of the browser.
NPP - Archive of obsolete content
npp contains private instance data for both the plug-in and the browser.
NPP_Print - Archive of obsolete content
description npp_print is called when the user requests printing for a web page that contains a visible plug-in (either embedded or full-page).
NPP_Write - Archive of obsolete content
buf buffer of data, delivered by the stream, that contains len bytes of data offset bytes from the start of the stream.
NPPrint - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary contains information the plug-in needs to print itself in full-page or embedded mode.
NP_GetMIMEDescription - Archive of obsolete content
each mime type description contains the mime type, an extensions list and a short description.
NP_Port - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary used on mac os only contains information required by the window field of an npwindow structure.
Writing a plugin for Mac OS X - Archive of obsolete content
xcode will create a "build" directory next to the project file, and if you built it in release mode, that folder in turn contains a "release" directory with the plugin inside it.
Proposal - Archive of obsolete content
draft exists source guid when an rss item is posted in response to a previous item (called the source item) rss 2.0 offers the source element which allows the item to refer to the rss feed which contains the source item.
Use Case - Archive of obsolete content
rss use cases this section contains common rss use cases.
TCP/IP Security - Archive of obsolete content
the payload consists of the information passed down from the previous layer, while the header contains layer-specific information such as addresses.
Sunbird Theme Tutorial - Archive of obsolete content
sunbird also contains communicator, global, help and mozapps components.
Tamarin Tracing Build Documentation - Archive of obsolete content
the tamarin codebase contains a cross-platform build system for mozilla developers.
Building a Theme - Archive of obsolete content
it contains several folders, modules, jssubloader and others.
Common Firefox theme issues and solutions - Archive of obsolete content
mozillazine firefox nightly theme changes thread mozillazine's firefox nightly theme changes thread is a great resource for keeping up to date with the latest changes to the firefox ui and contains links to the bugzilla bug reports, which detail what changes were made.
Using SSH to connect to CVS - Archive of obsolete content
mozillabuild 1.2 contains a bug that will stop ssh-agent from automatically starting with msys.
Browser Detection and Cross Browser Support - Archive of obsolete content
cvs branch tag beginning in gecko 0.9.0 (netscape 6.1 in gecko 0.9.2), navigator.useragent contains the cvs branch tag of the source which was used to create the version of gecko being used in the browser.
Error.description - Archive of obsolete content
remarks the description property contains the error message string associated with a specific error.
ECMAScript 2015 support in Mozilla - Archive of obsolete content
ace]() (firefox 49) regexp.prototype[@@search]() (firefox 49) regexp.prototype[@@split]() (firefox 49) get regexp[@@species] (firefox 49) additions to the string object string.fromcodepoint() (firefox 29) string.prototype.codepointat() (firefox 29) string.prototype.startswith(), string.prototype.endswith() (firefox 17) string.prototype.includes() (firefox 40) (formerly string.prototype.contains() (firefox 17)) string.prototype.repeat() (firefox 24) string.prototype.normalize() (firefox 31) string.raw() (firefox 34) \u{xxxxxx} unicode code point escapes (firefox 40) new symbol object symbol (firefox 36) symbol.iterator (firefox 36) symbol.for() - global symbol registry (firefox 36) symbol.match (firefox 40) symbol.species (firefox 41) symbol.toprimitive (firefox 44) symbol...
New in JavaScript - Archive of obsolete content
this chapter contains information about javascript's version history and implementation status for mozilla/spidermonkey-based javascript applications, such as firefox.
Archived JavaScript Reference - Archive of obsolete content
to make the function a legacy generator, the function body should contain at least one yield expression.microsoft javascript extensionsmicrosoft browsers (internet explorer, and in a few cases, microsoft edge) support a number of special microsoft extensions to the otherwise standard javascript apis.new in javascriptthis chapter contains information about javascript's version history and implementation status for mozilla/spidermonkey-based javascript applications, such as firefox.number.tointeger()the number.tointeger() method used to evaluate the passed value and convert it to an integer, but its implementation has been removed.object.getnotifier()the object.getnotifer() method was used to create an object that allows to synthet...
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
javascript contains characters which can not exist in xhtml javascript typically contains characters which can not exist in xhtml outside of cdata sections.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
listing 7 contains the code which demonstrates this concept.
Reference - Archive of obsolete content
like math, date is a global object that contains useful methods (date.parse() and date.utc()).
Developing Mozilla XForms - Archive of obsolete content
schema validation problems the schema-validation extension contains a logging facility that can show some internals on the schema processing.
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).
RFE to the Custom Controls Interfaces - Archive of obsolete content
introduction this page contains requests for enhancement to the custom control interfaces.
RFE to the XForms API - Archive of obsolete content
ArchiveWebXFormsRFEXForms API
introduction this page contains requests for enhancement to the xforms api.
XForms Alert Element - Archive of obsolete content
representations can be represented in two ways: modeless window that contains the alert element's message (default representation).
XForms Help Element - Archive of obsolete content
representations is represented by modeless window that contains the help element's message.
XForms Hint Element - Archive of obsolete content
representations is represented by a tooltip window that contains the hint element's message.
XForms Input Element - Archive of obsolete content
characteristics the bound instance node is of type xsd:date or a type derived from it appearance attribute also contains the value "full" firefox 2.0 doesn't currently contain any similar xhtml or xul widgets.
XForms Label Element - Archive of obsolete content
focus behavior - when a label element is clicked or its accesskey is activated then the form control that contains the label will be given the focus.
XForms Select Element - Archive of obsolete content
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> <x...
XForms Select1 Element - Archive of obsolete content
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/val...
XForms Submit Element - Archive of obsolete content
characteristics appearance attribute contains the value minimal analogue widget is <html:a onclick="form.submit();"/>.
XForms Switch Module - Archive of obsolete content
the switch element contains case elements which in turn contain markup.
XForms Trigger Element - Archive of obsolete content
characteristics appearance attribute contains the value minimal analogue widget is <xhtml:a/>.
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
since this rule is not valid css, it will prevent the validation of any stylesheet that contains it.
RDF in Fifty Words or Less - Archive of obsolete content
the inbox "folder" was really just a pointer to an internet resource that contains more rdf that extends the graph.
RDF in Mozilla FAQ - Archive of obsolete content
the database property refers to an nsirdfcompositedatasource object, which contains the datasources from which the template is built.
Using the Right Markup to Invoke Plugins - Archive of obsolete content
the configuration parameters for the applet, including the class which contains the initial entry point (animator.class, referenced by the "code" param element), are specified in multiple param elements.
bootstrap.js - Extensions
the example below contains the required methods in vsdoc format.
Anatomy of a video game - Game development
*/ ;(function () { function main() { mygame.stopmain = window.requestanimationframe( main ); // your main loop contents } main(); // start the cycle })(); we now have a variable declared in our mygame namespace, which we call stopmain, that contains the id returned from our main loop's most recent call to requestanimationframe().
Index - Game development
41 tutorials canvas, games, javascript, web, workflows this page contains multiple tutorial series that highlight different workflows for effectively creating different types of web games.
3D collision detection - Game development
sphere to check whether a sphere contains a point we need to calculate the distance between the point and the sphere's center.
GLSL Shaders - Game development
0; font-size: 0; } canvas { width: 100%; height: 100%; } </style> <script src="three.min.js"></script> </head> <body> <script id="vertexshader" type="x-shader/x-vertex"> // vertex shader's code goes here </script> <script id="fragmentshader" type="x-shader/x-fragment"> // fragment shader's code goes here </script> <script> // scene setup goes here </script> </body> </html> it contains some basic information like the document <title>, and some css to set the width and height of the <canvas> element that three.js will insert on the page to be the full size of the viewport.
WebVR — Virtual Reality for the Web - Game development
break; } } if (ghmd) { for (var i = 0; i < devices.length; ++i) { if (devices[i] instanceof positionsensorvrdevice && devices[i].hardwareunitid === ghmd.hardwareunitid) { gpositionsensor = devices[i]; break; } } } }); this code will loop through the available devices and assign proper sensors to the headsets — the first devices array contains the connected devices, and a check is done to find the hmdvrdevice, and assign it to the ghmd variable — using this you can set up the scene, getting the eye parameters, setting the field of view, etc.
Audio for Web games - Game development
the web audio api contains the notion of an internal clock that starts ticking the moment you create an audio context.
Desktop mouse and keyboard controls - Game development
there's also the phaser.keycode object, which contains all the available keyboard keys: in the main menu of the game we can add an extra way to begin playing.
Mobile touch controls - Game development
the pointer element contains the x and y variables storing the current position of the dragged element.
Implementing game control mechanisms - Game development
the src folder contains the javascript files split as a separate states — boot.js, preloader.js, mainmenu.js and game.js — these are loaded into the index file in this exact order.
Implementing controls using the Gamepad API - Game development
d (either physically by the user or due to inactivity.) in the demo, the gamepadapi object is used to store everything related to the api: var gamepadapi = { controller: {}, turbo: false, connect: function() {}, disconnect: function() {}, update: function() {}, buttonpressed: function() {}, buttons: [], buttonscache: [], buttonsstatus: [], axesstatus: [] }; the buttons array contains the xbox 360 button layout: buttons: [ 'dpad-up','dpad-down','dpad-left','dpad-right', 'start','back','axis-left','axis-right', 'lb','rb','power','a','b','x','y', ], this can be different for other types of gamepads like the ps3 controller (or a no-name, generic one), so you have to be careful and not just assume the button you're expecting will be the same button you'll actually get.
Create the Canvas and draw on it - Game development
the body contains <canvas> and <script> elements — we will render the game inside the first one and write the javascript code that controls it in the second one.
Animations and tweens - Game development
loading the animation next up, go into your create() function, find the line that loads the ball sprite, and below it put the call to animations.add() seen below: ball = game.add.sprite(50, 250, 'ball'); ball.animations.add('wobble', [0,1,0,2,0,1,0,2,0], 24); to add an animation to the object we use the animations.add() method, which contains the following parameters the name we chose for the animation an array defining the order in which to display the frames during the animation.
Initialize the framework - Game development
the body contains a second <script> element, where we will write the javascript code to render the game and control it.
2D maze game with device orientation - Game development
the <body> contains initialization of the phaser framework and the definitions of the game states.
Tutorials - Game development
this page contains multiple tutorial series that highlight different workflows for effectively creating different types of web games.
Visual JS GE - Game development
contains the following tools.
Base64 - MDN Web Docs Glossary: Definitions of Web-related terms
note that btoa() expects to be passed binary data, and will throw an exception if the given string contains any characters whose utf-16 representation occupies more than one byte.
CSS - MDN Web Docs Glossary: Definitions of Web-related terms
a style declaration contains the properties and their values, which determine how a webpage looks.
Digital certificate - MDN Web Docs Glossary: Definitions of Web-related terms
a digital certificate contains information about an organization, such as the common name (e.g., mozilla.org), the organization unit (e.g., mozilla corporation), and the location (e.g., mountain view).
Domain - MDN Web Docs Glossary: Definitions of Web-related terms
a fully qualified domain name (fqdn) contains all necessary parts to look up this authority by name unambigously using the dns system of the internet.
Fragmentainer - MDN Web Docs Glossary: Definitions of Web-related terms
a fragmentainer is defined in the css fragmentation specification as follows: a box—such as a page box, column box, or region—that contains a portion (or all) of a fragmented flow.
Global scope - MDN Web Docs Glossary: Definitions of Web-related terms
in a programming environment, the global scope is the scope that contains, and is visible in, all other scopes.
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.
Hypertext - MDN Web Docs Glossary: Definitions of Web-related terms
hypertext is text that contains links to other texts, as opposed to a single linear flow like in a novel.
IIFE - MDN Web Docs Glossary: Definitions of Web-related terms
(function () { statements })(); it is a design pattern which is also known as a self-executing anonymous function and contains two major parts: the first is the anonymous function with lexical scope enclosed within the grouping operator ().
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
the controller the controller contains logic that updates the model and/or view in response to input from the users of the app.
PAC - MDN Web Docs Glossary: Definitions of Web-related terms
a proxy auto-configuration file (pac file) is a file which contains a function, findproxyforurl(), which is used by the browser to determine whether requests (including http, https, and ftp) should go directly to the destination or if they need to be forwarded through a web proxy server.
Packet - MDN Web Docs Glossary: Definitions of Web-related terms
a packet contains: hop limit a hop occurs when a packet is passed from one network to the next network.
Polyfill - MDN Web Docs Glossary: Definitions of Web-related terms
for example, the object.create polyfill only contains the functionalities that are possible in a non-native implementation of object.create.
SDP - MDN Web Docs Glossary: Definitions of Web-related terms
sdp contains the codec, source address, and timing information of audio and video.
SLD - MDN Web Docs Glossary: Definitions of Web-related terms
as another example, in developer.mozilla.org, the developer subdomain is used to specify that the subdomain contains the developer section of the mozilla website.
Second-level Domain - MDN Web Docs Glossary: Definitions of Web-related terms
as another example, in developer.mozilla.org, the developer subdomain is used to specify that the subdomain contains the developer section of the mozilla website.
Style origin - MDN Web Docs Glossary: Definitions of Web-related terms
author origin the author origin is the style origin which contains all of the styles which are part of the document, whether embedded within the html or loaded from an external stylesheet file.
Time to interactive - MDN Web Docs Glossary: Definitions of Web-related terms
tti, proposed by the web incubator community group in 2018, is intended to provide a metric that describes when a page or application contains useful content and the main thread is idle and free to respond to user interactions, including having event handlers registered.
Type - MDN Web Docs Glossary: Definitions of Web-related terms
for example, a value of type number can be multiplied by another number, but not by a string - even if that string contains only a number, such as the string "2".
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.
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
oding); //'x-user-defined' } responsetype = 'responsetext'; break; case null: case 'xml': responsetype = 'responsexml'; break; default: alert('xinclude element contains an invalid "parse" attribute value'); return false; break; } request.send(null); if((request.status === 200 || request.status === 0) && request[responsetype] !== null) { response = request[responsetype]; if (responsetype === 'response...
non-normative - MDN Web Docs Glossary: Definitions of Web-related terms
software specifications often contains information marked as non-normative or informative, which means that those are provided there for the purpose of helping the readers to understand the specification better or to show an example or a best practice, and not needed to be followed as a rule.
HTML: A good basis for accessibility - Learn web development
you can verify these claims by comparing your previous experience with a more modern website structure example, which could look something like this: <header> <h1>header</h1> </header> <nav> <!-- main navigation in here --> </nav> <!-- here is our page's main content --> <main> <!-- it contains an article --> <article> <h2>article heading</h2> <!-- article content in here --> </article> <aside> <h2>related</h2> <!-- aside content in here --> </aside> </main> <!-- and here is our main footer that is used across all the pages of our website --> <footer> <!-- footer content in here --> </footer> if you try our more modern structure example with a screen rea...
HTML: A good basis for accessibility - Learn web development
you can verify these claims by comparing your previous experience with a more modern website structure example, which could look something like this: <header> <h1>header</h1> </header> <nav> <!-- main navigation in here --> </nav> <!-- here is our page's main content --> <main> <!-- it contains an article --> <article> <h2>article heading</h2> <!-- article content in here --> </article> <aside> <h2>related</h2> <!-- aside content in here --> </aside> </main> <!-- and here is our main footer that is used across all the pages of our website --> <footer> <!-- footer content in here --> </footer> if you try our more modern structure example with a screen rea...
Fundamental CSS comprehension - Learn web development
grab the css resources text file — this contains a set of raw selectors and rulesets that you'll need to study and combine to answer part of this assessment.
Overflowing content - Learn web development
in general, restricting the block dimension is problematic when the box contains text.
Pseudo-classes and pseudo-elements - Learn web development
::marker matches the marker box of a list item, which typically contains a bullet or number.
Test your skills: Selectors - Learn web development
target the <a> element with an href attribute that contains the word contact somewhere in its value and make the border orange (border-color: orange).
Type, class, and ID selectors - Learn web development
in the example below we have a <div> that contains a note.
Test your skills: sizing - Learn web development
task two this task has a box, which contains another box.
CSS building blocks - Learn web development
guides this module contains the following articles, which cover the most essential parts of the css language.
Flexbox - Learn web development
the third <article> contains three <div>s.
Test your skills: Flexbox - Learn web development
flex layout three there are two elements in the html below, a div with a class of .parent which contains another div with a class of .child.
Floats - Learn web development
this involves inserting some generated content after the box which contains the float and wrapping content, and setting that to clear both.
Grids - Learn web development
this contains a container with a 12 column grid defined, and the same markup as we used in the previous two examples.
Multiple-column layout - Learn web development
our starting point contains some very simple html; a wrapper with a class of container inside which is a heading and some paragraphs.
Positioning - Learn web development
the initial containing block has the dimensions of the viewport, and is also the block that contains the <html> element.
Supporting older browsers - Learn web development
the specification for feature queries also contains the ability to test if a browser does not support a feature — this is only helpful if the browser does support feature queries.
Getting started with CSS - Learn web development
it contains an <em>emphasized</em> element.</p> <ul> <li>item one</li> <li>item two</li> <li>item <em>three</em></li> </ul> </body> </html> note: if you are reading this on a device or an environment where you can't easily create files, then don't worry — live code editors are provided below to allow you to write example code right here in the page.
What is CSS? - Learn web development
for example, you could take a look at the mdn reference to the backgrounds and borders module to find out what its purpose is, and what different properties and other features it contains.
CSS first steps - Learn web development
guides this module contains the following articles, which will take you through all the basic theory of css, and provide opportunities for you to test out some skills.
Styling links - Learn web development
the text "http" should therefore only appear in external links (like the second and third ones), and we can select this with an attribute selector: a[href*="http"] selects <a> elements, but only if they have an href attribute with a value that contains "http" somewhere inside it.
Web fonts - Learn web development
a stylesheet.css file, which contains the generated @font-face code you'll need.
Styling text - Learn web development
guides this module contains the following articles, which will teach you all of the essentials behind styling html text content.
Learn to style HTML using CSS - Learn web development
modules this topic contains the following modules, in a suggested order for working through them.
How do you host your website on Google App Engine? - Learn web development
have a look at the sample application's structure — the website folder contains your website content and app.yaml is your application configuration file.
What is the difference between webpage, website, web server, and search engine? - Learn web development
to access a website, type its domain name in your browser address bar, and the browser will display the website's main web page, or homepage (casually referred as "the home"): the ideas of a web page and a website are especially easy to confuse for a website that contains only one web page.
What are browser developer tools? - Learn web development
file list the first pane on the left contains the list of files associated with the page you are debugging.
The HTML5 input types - Learn web development
additionally, the first week 1 of each year contains the first thursday of that year—which may not include the first day of the year, or may include the last few days of the previous year.
Example 3 - Learn web development
ion { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(select, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.o...
Example 4 - Learn web development
ion { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(select, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.o...
Example 5 - Learn web development
ion { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(select, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.o...
How to structure a web form - Learn web development
take this example, which we saw in the previous article: <label for="name">name:</label> <input type="text" id="name" name="user_name"> with the <label> associated correctly with the <input> via its for attribute (which contains the <input> element's id attribute), a screenreader will read out something like "name, edit text".
Styling web forms - Learn web development
we already looked at some simple form styling in your first form, and the css building blocks module contains some useful form styling essentials too.
Your first form - Learn web development
the <label>, <input>, and <textarea> elements our contact form is not complex: the data entry portion contains three text fields, each with a corresponding <label>: the input field for the name is a single-line text field.
Add a hitmap on top of an image - Learn web development
an image map, on the other hand, contains several active regions (called "hotspots") that each link to a different resource.
Tips for authoring fast-loading HTML pages - Learn web development
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
for example, the below bit of markup contains a quotation from the mdn <q> page: <p>the quote element — <code>&lt;q&gt;</code> — is <q cite="/docs/web/html/element/q">intended for short quotations that don't require paragraph breaks.</q></p> browser default styling will render this as normal text put in quotes to indicate a quotation, like so: citations the content of the cite attribute sounds useful, but unfortunately browsers, sc...
Getting started with HTML - Learn web development
this contains all the content that displays on the page, including text, images, videos, games, playable audio tracks, or whatever else.
HTML text fundamentals - Learn web development
this document's body currently contains multiple pieces of content—they aren't marked up in any way, but they are separated with linebreaks (enter/return pressed to go onto the next line).
Structuring a page of content - Learn web development
the zip file contains: the html you need to add structural markup to.
Mozilla splash page - Learn web development
note: the example html file contains quite a lot of css, to style the page.
From object to iframe — other embedding technologies - Learn web development
src this attribute, as with <video>/<img>, contains a path pointing to the url of the document to be embedded.
Multimedia and Embedding - Learn web development
guides this module contains the following articles which will take you through all the fundamentals of embedding multimedia on webpages.
HTML table advanced features and accessibility - Learn web development
the "sum" row that contains a summation of the spent amounts seems to be in the wrong place, and there are some details missing from the code.
Assessment: Structuring planet data - Learn web development
add a black border just around the column that contains all the planet name row headers.
HTML Tables - Learn web development
LearnHTMLTables
guides this module contains the following articles: html table basics this article gets you started with html tables, covering the very basics such as rows and cells, headings, making cells span multiple columns and rows, and how to group together all the cells in a column for styling purposes.
Structuring the web with HTML - Learn web development
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.
Index - Learn web development
an image map, on the other hand, contains several active regions (called "hotspots") that each link to a different resource.
Introduction to events - Learn web development
here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video> </div> when the <button> is selected, the video is displayed, by changing the class attribute on the <div> from hidden to showing (the example's css contains these two classes, which position the box off the screen and on the screen, respectively): btn.onclick = function() { videobox.setattribute('class', 'showing'); } we then add a couple more onclick event handlers — the first one to the <div> and the second one to the <video>.
Manipulating documents - Learn web development
this is done with the htmlelement.style property, which contains inline styling information for each element in the document.
Client-side web APIs - Learn web development
drawing graphics the browser contains some very powerful graphics programming tools, from the scalable vector graphics (svg) language, to apis for drawing on html <canvas> elements, (see the canvas api and webgl).
Silly story generator - Learn web development
this contains text strings that will act as input into our program.
Useful string methods - Learn web development
a code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not the solution, so that solution is not saved over the user code if(solution.value === 'show solution') { userentry = textarea.value; } else { solutionentry = textarea.value; } updatecode(); }; making new strings from old parts in this last exercise, the array contains a bunch of strings containing information about train stations in the north of england.
JavaScript object basics - Learn web development
this contains very little — a <script> element for us to write our source code into.
Inheritance in JavaScript - Learn web development
we have defined a new constructor, and it has a prototype property, which by default just contains an object with a reference to the constructor function itself.
JavaScript — Dynamic client-side scripting - Learn web development
after getting familiar with the basics of javascript, you should be in a position to learn about more advanced topics, for example: javascript in depth, as taught in our javascript guide web apis modules this topic contains the following modules, in a suggested order for working through them.
Web performance - Learn web development
guides this topic contains the following guides.
Introduction to the server side - Learn web development
the response contains a status line indicating whether or not the request succeeded (e.g.
Website security - Learn web development
an attacker can construct a search link that contains a malicious script as a parameter (e.g., http://mysite.com?q=beer<script%20src="http://evilsite.com/tricky.js"></script>) and email it to another user.
Server-side website programming - Learn web development
modules this topic contains the following modules.
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.
React interactivity: Events and state - Learn web development
this is almost right, except that if our list ever contains a single task, the heading will still use the word “tasks”.
React interactivity: Editing, filtering, conditional rendering - Learn web development
this means that the return statement of <todo /> is now repetitious — it also contains a definition of the "view" template.
TypeScript support in Svelte - Learn web development
this can be a little tricky because updatedtodo contains only the attributes of the todo that have been updated.
Working with Svelte stores - Learn web development
we can declare a region that contains dynamic content that should be announced by assistive technologies with the aria-live property followed by the politeness setting, which is used to set the priority with which screen readers should handle updates to that regions.
Creating our first Vue component - Learn web development
add a props property inside the export default {} object, which contains an empty object.
Adding a new todo form: Vue events, methods, and models - Learn web development
using v-model to update an input value there's one more thing to fix in our todoform component — after submitting, the <input> still contains the old value.
Handling common accessibility problems - Learn web development
when vo is on, the display will look mostly the same, but you'll see a black box at the bottom left of the screen that contains information on what vo currently has selected.
Handling common JavaScript problems - Learn web development
note: addy osmani's writing fast, memory-efficient javascript contains a lot of detail and some excellent tips for boosting javascript performance.
omni.ja (formerly omni.jar)
omni.ja contents the omni.ja file contains assorted application resources: chrome.manifest the chrome manifest file.
Accessibility Features in Firefox
finally, bookmarks.html contains all your bookmarks, and is easy to move around from computer to computer.
Accessibility Information for Core Gecko Developers
it contains a class hierararchy and an explanation of the accessibility cache.
Information for External Developers Dealing with Accessibility
contains info on accessible roles, states and events.
Mozilla’s UAAG evaluation report
the uaag document contains a very rich set of accessibility guidelines, that broadly define how accessibility should be implemented by any user agent, i.e.
Accessibility and Mozilla
here is a rundown of problems and the planned solutions:mozilla's section 508 compliancemozilla’s uaag evaluation reportthe uaag document contains a very rich set of accessibility guidelines, that broadly define how accessibility should be implemented by any user agent, i.e.
Index
685 obsolete add-ons, archive, look & feel, obsolete, themes this page contains theme documents and resources that we don't expect will ever be updated, but which we're keeping for the time being as potential source material for updated docs.
Obsolete
this page contains theme documents and resources that we don't expect will ever be updated, but which we're keeping for the time being as potential source material for updated docs.
Adding a new CSS property
remember that each style struct contains only properties that inherit by default or only properties that do not.
What to do and what not to do in Bugzilla
resolving bugs as duplicate in general newer bugs should be marked as duplicates of older bugs, except when the newer bug contains more information (bug description clearer, patch already attached, lots of people already cc'ed, etc.).
Command line options
if the option contains arguments, enter the argument after the option.
Continuous Integration
each talos suite contains a set of tests or pages, some of these in turn have sub-tests.
Creating a Login Manager storage module
this.stub(arguments); }, findlogins: function slms_findlogins(count, hostname, formsubmiturl, httprealm) { this.stub(arguments); }, countlogins: function slms_countlogins(ahostname, aformsubmiturl, ahttprealm) { this.stub(arguments); } }; function nsgetmodule(compmgr, filespec) xpcomutils.generatemodule([sampleloginmanagerstorage]); sample c++ implementation bug 309807 contains a complete example.
Debugging a hang on OS X (Archived)
this article contains historical information about older versions of os x.
Debugging
debugging a minidump windows crash reports include a minidump, which contains a lot of information about the application when it crashed.
Configuring Build Options
mozconfig contains two types of options: options prefixed with mk_add_options are passed to client.mk.
Old Thunderbird build
build configuration to build thunderbird, you need to add a file named mozconfig to the root directory of the comm-central checkout that contains the following line: ac_add_options --enable-application=mail you can create a file with this line by doing this: cd comm-central echo 'ac_add_options --enable-application=mail' > mozconfig if you omit this line, the build system will build firefox instead.
Simple SeaMonkey build
the space in this directory name, or in your user name if it contains one, will cause the configure script to break.
Simple Sunbird build
on windows, if you open the command prompt you are usually in your user profile folder which often contains spaces ( c:\documents and settings\...).
Simple Thunderbird build
build configuration to build thunderbird, you need to add a file named mozconfig to the root directory of the mozilla-central checkout that contains the following line: ac_add_options --enable-application=comm/mail you can create a file with this line by doing this in the source/ directory: echo 'ac_add_options --enable-application=comm/mail' > mozconfig if you omit this line, the build system will build firefox instead.
Creating Custom Events That Can Pass Data
mozilla/dom/src/base/nsdomclassinfo.cpp mozilla contains many convenience macros to make changes like the one you're making easier.
Eclipse CDT
however, when the object directory is outside the source directory, eclipse doesn't know about it - or the headers it contains - unless the user takes extra steps to tell it.
Eclipse CDT Manual Setup
this page contains the content that used to live on the eclipse cdt page that most people will likely just consider noise.
Working with Mozilla source code
the firefox codebase: css guidelines this document contains guidelines defining how css inside the firefox codebase should be written, it is notably relevant for firefox front-end engineers.
mach
the decorators are: @commandprovider this is a class decorator that tells mach that this class contains methods that implement mach commands.
Communicating with frame scripts
because a single message can be received by more than one listener, the return value of sendsyncmessage() is an array of all the values returned from every listener, even if it only contains a single value: // frame script addeventlistener("click", function (event) { var results = sendsyncmessage("my-addon@me.org:my-e10s-extension-message", { details : "they clicked", tag : event.target.tagname }); content.console.log(results[0]); // "value from chrome" }, false); like arguments, return values from sendsyncmessage() must be json-serializable, so chrome can't return...
Process scripts
retrieving the content frame message manager for a content window when an observer notification in a process script contains a content document or window it can be useful to not use talk through the child/parent process message managers but through the window's content frame message manager, e.g.
Storage access policy: Block cookies from trackers
a user clicks on your advertisement and is taken to a landing page that contains a conversion tracking tag from the third-party network.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
the search bar also contains buttons, as well as a form to type search requests into.
HTMLIFrameElement.getStructuredData()
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-...
Gecko Chrome
this page contains information specific to chrome code running in gecko.
Overview of Mozilla embedding APIs
rv = basewindow->create(); if (ns_failed(rv)) return rv; // at this point webbrowser contains the new initialized instance // of the nswebbrowser component...
Gecko Keypress Event
that is, when the currently selected keyboard layout produces a unicode character (according to the current state of capslock and numlock), the charcode property contains that character.
Gecko
documentation chrome this page contains information specific to browser chrome (not google chrome) code running in gecko.
Gecko's "Almost Standards" Mode
ublic 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.
HTTP Cache
this document only contains what cannot be found or may not be clear directly from the idl files comments.
How to get a process dump with Windows Task Manager
(to get a process dump for thunderbird or some other product, substitute the product name where ever you see firefox in these instructions.) caution the memory dump that will be created through this process is a complete snapshot of the state of firefox when you create the file, so it contains urls of active tabs, history information, and possibly even passwords depending on what you are doing when the snapshot is taken.
How to get a stacktrace for 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.
UpdateInfo
each item in the array contains "id", "minversion", and "maxversion" properties.
DownloadList
the returned array does not change when downloads are added or removed, though the download objects it contains are still updated in real time.
DownloadTarget
calling this method lets the download object's properties be updated if the user moves or deletes the target file or its associated ".part" file, which contains a partially-downloaded file's contents.
JavaScript OS.Constants
javascript module os.constants contains operating system-specific constants.
JavaScript OS
the javascript os module contains tools that allow chrome content (i.e.
Log.jsm
outputstream reset(); structuredformatter(); length: 0 keys of prototype: format(); method overview enumerateinterfaces(); length: 0 enumerateproperties(); length: 2 member fields variable type description level object contains the following fields: field name value all 0 config 30 debug 20 desc { 0: "all", 10: "trace", 20: "debug", 30: "config", 40: "info", 50: "warn", 60: "error", 70: "fatal" } error 30 fatal 70 ...
OSFile.jsm
javascript module os.file contains primitives for manipulating files out of the main thread.
PopupNotifications.jsm
this object contains all the data necessary to present and manage the notification, and has one method.
SourceMap.jsm
sourcenode.prototype.tostringwithsourcemap(startofsourcemap) returns the string representation of this tree of source nodes, plus a sourcemapgenerator which contains all the mappings between the generated and original sources.
Task.jsm
it is a generator function because it contains the // "yield" operator at least once.
Timer.jsm
the timer.jsm javascript code module contains pure-javascript implementations of settimeout, cleartimeout, setinterval, and clearinterval that are compatible with the dom window functions, but that can be used by code that does not have access to a dom window (for example, javascript code modules or content frame scripts).
WebRequest.jsm
next, return an object from the listener that contains instructions for what the browser should do with this request.
source-editor.jsm
the editor configuration object when you call init() to initialize the editor, you pass in an object that contains properties configuring the editor's features.
JavaScript code modules
xpcomutils.jsm contains utilities for javascript components loaded by the js component loader.
Index
the following list contains links to pages that highlight steps that can be taken to make web content localizable.
Localization and Plurals
list of plural rules this section contains a list of plural rules ordered by their plural rule number.
Localizing with Koala
due to a bug in koala (bug 21930), it is recommended that you don't choose a path that contains spaces (like c:\documents and settings\user\...).
Localizing with Mozilla Translator
if you are using a filesystem with symbolic links support (i.e., linux or mac), you can create symbolic links in a separate directory so it contains just the locale part.
QA phase
this file contains the necessary build instructions.
Web Localizability
the following list contains links to pages that highlight steps that can be taken to make web content localizable.
MathML Torture Test
addeventlistener("change", updatemathfont, false) } window.addeventlistener("load", load, false); the following test contains sample tex formulas from knuth's tex book and equivalent mathml representations.
Using the viewport meta tag to control layout on mobile browsers
viewport basics a typical mobile-optimized site contains something like the following: <meta name="viewport" content="width=device-width, initial-scale=1"> the width property controls the size of the viewport.
Mozilla Style System
the style contexts then provide the api for computed style data by allowing retrieval of a set of style structs, each of which contains the computed values of a set of css properties.
DMD
you can pull them like so: adb pull /sdcard/download/memory-reports/dmd-default-20731.json.gz adb pull /sdcard/download/memory-reports/unified-memory-report-default-20731.json.gz processing the output dmd outputs one gzipped json file per process that contains a description of that process's heap.
Gecko Profiler FAQ
the profile contains markers for dom events, and those include user-generated events like mouse clicks, but these markers are only exposed as a huge unsearchable list in the markers tab.
Leak-hunting strategies and tips
some places you can do this are: layout engine define debug_tracemalloc_framearena where it is commented out in layout/base/nspresshell.cpp glib set the environment variable g_slice=always-malloc other references performance tools leak debugging screencasts (dbaron) leakingpages - a list of pages known to leak mdc:performance - contains documentation for all of our memory profiling and leak detection tools ...
Profiling with the Firefox Profiler
it contains, for each layer, the type of the layer, and various metrics about the layer, such as the visible region and any transforms.
Refcount tracing and balancing
specifically, any call stack that contains that call site will not contribute to the computation of balance factors in the tree.
Reporting a Performance Problem
note that while it's possible to strip profiles of potentially privacy sensitive information, the less information a profile contains, the harder it is to analyze and turn into actionable data.
browser.urlbar.trimURLs
subdomain nor contains @ (usually for ftp login information), the http:// prefix will be hidden.
Emscripten techniques
this page contains specific emscripten-related techniques.
Emscripten
other articles of interest on mdn our games zone contains some useful content related to games development, which is a common area of use for emscripten.
Installing JSHydra
there is not yet a repository for this information, but bug 506128 contains more information.
AsyncTestUtils extended framework
the second argument defines the search query; each attribute defines a "contains" string constraint.
Midas
note: the shortcut key will automatically trigger this command (typically accel-z) unlink if the insertion point is within a link or if the current selection contains a link, the link will be removed and the text will remain.
NSPR Poll Method
if new_flags contains pr_poll_read, you should try pr_recv or pr_send when the underlying network transport is readable if new_flags contains pr_poll_write, you should try pr_recv or pr_send when the underlying network transport is writable important do not use out_flags in any way other than testing if (new_flags & out_flags) is 0.
PL_strcpy
on output, the buffer contains a copy of the string passed in src.
PR_Accept
on output, this structure contains the address of the connecting entity.
PR_CreateIOLayerStub
the file descriptor returned contains the pointer to the i/o methods table provided.
PR_ExplodeTime
upon return, the location pointed to by the exploded parameter contains the converted time value.
PR_FindSymbolAndLibrary
upon return, the location pointed to by the parameter lib contains a pointer to the library that contains that symbol.
PR_GetErrorText
syntax #include <prerror.h> print32 pr_geterrortext(char *text); parameters the function has one parameter: text on output, the array pointed to contains the thread's current error text.
PR_GetSocketOption
on output, this structure contains the requested socket option data.
PR_NewLogModule
if the environment variable nspr_log_modules contains the specified name, then the associated level value from the variable is associated with the new prlogmoduleinfo structure.
PR_Read
on output, the buffer contains the data.
PR_SetLibraryPath
syntax #include <prlink.h> prstatus pr_setlibrarypath(const char *path); parameters the function has this parameter: path a pointer to a character array that contains the directory path that the application should use as a default.
PR_dtoa
upon return, the buffer specified by buf and bufsz contains the converted string.
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.
Building NSS
unit testing nss contains extensive unit tests.
CERT_FindCertByDERCert
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?
NSS FAQ
MozillaProjectsNSSFAQ
it contains bugs that were never fixed, doesn't support tls or or the new 56-bit export cipher suites, and does not contain the fix to the bleichenbacher attack on pkcs#1.
FIPS Mode - an explanation
the device must have a way for users to authenticate to it (to "login" to it), to prove to it that they are authorized to use the cryptographic engines and keys it contains.
Using JSS
MozillaProjectsNSSJSSUsing JSS
it is not just the directory that contains jss42.jar.) ld_library_path (unix) / path (windows) include the path to the nspr, nss, and jss shared libraries.
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
linux x86) fails pairwise consistency test bug 330622: certutil's usage messages incorrectly document certain options bug 330628: coreconf/linux.mk should _not_ default to x86 but result in an error if host is not recognized bug 359302: remove the sslsample code from nss source tree bug 372241: need more versatile form of cert_nametoascii bug 390296: nss ignores subject cn even when san contains no dnsname bug 401928: support generalized pkcs#5 v2 pbes bug 403543: pkix: need a way to enable/disable aia cert fetching bug 408847: pkix_ocspchecker_check does not support specified responder (and given signercert) bug 414003: crash [[@ cert_decodecertpackage] sometimes with this testcase bug 415167: memory leak in certutil bug 417399: arena allocation results are not checked in pk...
NSS 3.12.4 release notes
bug 497217: the first random value ever generated by the rng should be discarded bug 498163: assert if profile path contains cyrillic chars.
NSS 3.15.1 release notes
bug 876352 - certutil now warns if importing a pem file that contains a private key.
NSS 3.16.2.3 release notes
nss 3.16.2.3 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_16_2_3_rtm/src/ new in nss 3.16.2.3 this patch release fixes a bug and contains a backport of the tls_fallback_scsv feature, which was originally made available in nss 3.17.1.
NSS 3.18 release notes
a pkcs#11 library that contains root ca certificates can be loaded by tstclnt, which may either be the nssckbi library provided by nss (-b) or another compatible library (-r).
NSS 3.19 release notes
nss now more strictly validates tls extensions and will fail a handshake that contains malformed extensions (bug 753136).
NSS 3.24 release notes
this struct contains supplementary information about a certificate, such as the intended type of the certificate, stapled ocsp responses, or signed certificate timestamps (used for certificate transparency).
NSS 3.35 release notes
without a prefix, the default database type will be used (dbm in versions prior to 3.35, and sql in version 3.35 and later.) when using the sql type (either explicitly, or because of the new default), with a database directory which already contains a dbm type database, nss will automatically perform a one time migration of the information contained in the dbm files to the newer sql files.
NSS 3.46 release notes
new in nss 3.46 this release contains no significant new functionality, but concentrates on providing improved performance, stability, and security.
NSS Sample Code Utilities_1
port_zalloc(maxpwdfilesize); if (!phrases) { return 0; /* out of memory */ } fd = pr_open(pwfile, pr_rdonly, 0); if (!fd) { fprintf(stderr, "no password file \"%s\" exists.\n", pwfile); port_free(phrases); return null; } nb = pr_read(fd, phrases, maxpwdfilesize); pr_close(fd); if (nb == 0) { fprintf(stderr,"password file contains no data\n"); port_free(phrases); return null; } if (slot) { tokenname = pk11_gettokenname(slot); if (tokenname) { tokenlen = port_strlen(tokenname); } } i = 0; do { int startphrase = i; int phraselen; /* handle the windows eol case */ while (phrases[i] != '\r' && phrases[i] != '\n' && i < nb)...
Utilities for nss samples
port_zalloc(maxpwdfilesize); if (!phrases) { return 0; /* out of memory */ } fd = pr_open(pwfile, pr_rdonly, 0); if (!fd) { fprintf(stderr, "no password file \"%s\" exists.\n", pwfile); port_free(phrases); return null; } nb = pr_read(fd, phrases, maxpwdfilesize); pr_close(fd); if (nb == 0) { fprintf(stderr,"password file contains no data\n"); port_free(phrases); return null; } if (slot) { tokenname = pk11_gettokenname(slot); if (tokenname) { tokenlen = port_strlen(tokenname); } } i = 0; do { int startphrase = i; int phraselen; /* handle the windows eol case */ while (phrases[i] != '\r' && phrases[i] != '\n' && i < nb)...
nss tech note3
that extension contains a sequence of oids, each of which signifies one or more cert types, depending on the presence or absence of of the true basic constraints extension; that is, the interpretation of the extended key usage extension is controlled by whether the cert is a ca cert, or not.
nss tech note6
the libsoftokn3.chk/softokn3.chk file contains a checksum for the softoken.
nss tech note8
a sid (or sslsessionid struct) contains all the info needed to restart the ssl session at a later time on another socket.
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
on servers, it's almost always the slot that contains the server's private key.
PKCS 7 functions
function name/documentation source code nss versions sec_pkcs7addcertificate mxr 3.3 and later sec_pkcs7addrecipient mxr 3.2 and later sec_pkcs7addsigningtime mxr 3.2 and later sec_pkcs7containscertsorcrls mxr 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 ...
FC_Initialize
libraryparameters should point to a string that contains the library parameters.
FC_SetOperationState
uloperationstatelen [in] contains the total length (in bytes) of the operation state.
NSS functions
function name/documentation source code nss versions sec_pkcs7addcertificate mxr 3.3 and later sec_pkcs7addrecipient mxr 3.2 and later sec_pkcs7addsigningtime mxr 3.2 and later sec_pkcs7containscertsorcrls mxr 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 ...
sslcrt.html
canames a pointer to a structure that contains a list of distinguished names (dns) against which to check the dns for the signers in the certificate chain.
TLS Cipher Suite Discovery
the sslciphersuiteinfo structure contains this information, declared in "sslt.h": typedef struct sslciphersuiteinfostr { pruint16 length; pruint16 ciphersuite; /* cipher suite name */ const char * ciphersuitename; /* server authentication info */ const char * authalgorithmname; sslauthtype authalgorithm; /* key exchange algorithm info */ co...
NSS tools : signver
MozillaProjectsNSStoolssignver
-d [sql:]directory specify the database directory which contains the certificates and keys.
Network Security Services
getting started nss releases this page contains information about the current and past releases of nss.
Scripting Java
one example of this is the thread class: its constructor takes a runnable that contains a single method run that will be called when the new thread is started.
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.
Creating JavaScript jstest reftests
this directory contains tests of spidermonkey conformance to ecmascript as well as spidermonkey non-standard extenstions to ecmascript.
GCIntegration - SpiderMonkey Redirect 1
the initial snapshot only contains objects reachable via traced pointers, so there's no danger that overwriting an untraced pointer will disrupt the snapshot.
Getting SpiderMonkey source code
that page also contains links to several bundles, which can be useful if you have a poor network connection.
64-bit Compatibility
the following table contains the most relevant opcodes: platform alias 32-bit op 64-bit op ldp ld ldq ldcp ldc ldcq piadd add qiadd piand and qiand pilsh lsh qilsh pirsh rsh qirsh pursh ush qursh pcmov cmov qcmov pior or qior pxor xor qxor addp ia...
Statistics API
var prefs = require("api-utils/preferences-service"); components.utils.import('resource://gre/modules/services.jsm'); function observer(subject, topic, json) { var data = json.parse(json); // process the data } prefs.set("javascript.options.mem.notify", true); services.obs.addobserver(observer, "garbage-collection-statistics", false); the toplevel json object contains these fields: timestamp: integer (microseconds) - time at which the gc ended, measured from epoch.
Invariants
these cases can be detected statically by looking for with and eval "nearby" in the parse tree.) if a nested function contains a nameexpression that refers to a variable in an enclosing scope which the function can outlive (i.e.
Self-hosted builtins in SpiderMonkey
the selfhostingdefines.h header contains adding self-hosted functions to host objects first, the code has to be embedded into spidermonkey.
JIT Optimization Outcomes
the interpreted callee function contains variables bindings that are closed over.
JSAPI Cookbook
note: the foss wiki page contains a few links to other libraries and programs that can make life easier when using spidermonkey and jsapi.
JS::Compile
see also the jsapi user guide contains example code using compiled scripts.
JS::CompileFunction
see also the jsapi user guide contains example code using compiled scripts.
JS::CompileOffThread
see also the jsapi user guide contains example code using compiled scripts.
JSErrorReport
this is the buffer that contains the original data.
JSExtendedClass
this contains some required fields.
JSExtendedClass.wrappedObject
the specific cases where this happens are: the default tostring method returns a string that contains the name of the wrapped object's class rather than the wrapper's class.
JSFunction
the documentation for each affected api contains a warning about the problem.
JSGetObjectOps
in contrast, all native and host objects have a jsobjectmap at obj->map, which may be shared among a number of objects, and which contains the jsobjectops *ops pointer used to dispatch object operations from api calls.
JSRuntime
it contains the global object and the execution stack.
JSVAL_IS_NULL
(note: jsval_is_object(jsval_null) is also true.) example the following code snippet illustrates how a javascript variable, myitem, is conditionally tested in an if statement to see if it contains a null value.
JS_CompileFunctionForPrincipals
principals is a pointer to the jsprincipals structure that contains the security information to associate with this function.
JS_CompileScript
see also the jsapi user guide contains example code using compiled scripts.
JS_CompileScriptForPrincipals
principals is a pointer to the jsprincipals structure that contains the security information to associate with this script.
JS_CompileUTF8File
see also the jsapi user guide contains example code using compiled scripts.
JS_ConvertValue
typically users of this function set vp to point to v, so that if conversion is successful, v now contains the converted value.
JS_DecompileFunction
if you decompile a function that makes a native c call, the body of the function contains the text "native code'" and cannot be re-parsed.
JS_DecompileFunctionBody
if you decompile a function that makes a native c call, the body of the function only contains the text "[native code]".
JS_DefineConstDoubles
js_defineconstdoubles/js_defineconstintegers create one property for each element in the array what contains a non-zero name field.
JS_DefineElement
obsolete since jsapi 32 flags contains the property attributes to set for the new property.
JS_DefineObject
name is the property name to assign to obj to hold the new object, and flags contains the property attributes to set for the newly created property.
JS_DumpHeap
every jscontext is permanently associated with a jsruntime; each jsruntime contains a gc heap.
JS_EncodeCharacters
this happens if the destination is too small for the resulting string or if the source buffer isn't proper utf-16 because it contains unpaired surrogate values.
JS_EvaluateScriptForPrincipals
principals is a pointer to the jsprincipals structure that contains the security information to associate with this script.
JS_ExecuteRegExp
chars const char16_t * a pointer to the string contains a input string.
JS_ExecuteScript
the jsapi user guide contains example code using compiled scripts.
JS_GetFunctionObject
but in the jsapi there are two separate concepts: a jsobject is what is exposed to scripts and has properties and can be stored in variables; and the corresponding jsfunction contains the code of a function.
JS_NewDependentString
the new string contains the same characters as if it were created with the javascript method str.substr(start, length).
JS_NewRegExpObject
bytes or chars const char * or const char16_t * a pointer to the string that contains a regular expression.
JS_NewScriptObject
(the name "js_newscriptobject" suggests that the script object is freshly allocated; this was the case in older versions of the api, but now the script object is allocated along with the jsscript itself.) (some temporary scripts used internally by spidermonkey do not have script objects allocated for them; such scripts are not accessible via jsapi.) see also the jsapi user guide contains example code using compiled scripts.
JS_NewStringCopyN
if the array s contains more than n characters, the new string contains a truncated version of the original string.
JS_SetPrivate
if your class's private data contains any jsvals or other references to javascript objects, implement the jsclass.mark callback to ensure they are not prematurely reclaimed by the garbage collector.
SpiderMonkey 1.8.5
it is much faster than spidermonkey 1.8, implements es-5 (ecma 262, 5th edition), and contains many new language and api features, described in detail below.
SpiderMonkey 1.8.7
it is much faster than spidermonkey 1.8, implements es-5 (ecma 262, 5th edition), and contains many new language and api features, described in detail below.
SpiderMonkey 1.8
it is much faster than spidermonkey 1.7 and contains a few new language features and api features, described in detail below.
SpiderMonkey 24
it also contains new language and api features described in detail below.
SpiderMonkey 31
it also contains new language and api features described in detail below.
SpiderMonkey 52
it also contains new language and api features described in detail below.
Shell global objects
variables scriptargs an array that contains arguments passed to js shell.
Redis Tips
here's what the zset contains now: > r.zrange('last-login', 0, -1, print); // remember, i defined 'print' above ["jparsons", "zcarter", "lloyd"] since this is a set, lloyd only appears once, with updated login timestamp.
A Web PKI x509 certificate primer
-sign the certificate with a standardized certificate signing algorithm sec_error_invalid_time a time field in a certificate has an invalid value re-generate the certificate with valid encodings for time fields mozilla_pkix_error_key_pinning_failure sec_error_path_len_constraint_invalid sec_error_unknown_critical_extension a certificate contains an extension marked as critical that is not handled by mozilla::pkix re-generate the certificate without the extension or with it not marked as critical sec_error_unknown_issuer either a missing intermediate or root certificate is necessary to verify the certificate import the root certificate into firefox or have the server send the intermediate sec_error_invalid_key ...
Setting up an update server
aded the mar you're using, you'll find the sha512 value in a file called sha512sums in the root of the release directory on archive.mozilla.org for a release or beta build (you'll have to search it for the file name of your mar, since it includes the sha512 for every file that's part of that release), and for a nightly build you'll find a file with a .checksums extension adjacent to your mar that contains that information (for instance, for the mar file at https://archive.mozilla.org/pub/firefox/nightly/2019/09/2019-09-17-09-36-29-mozilla-central/firefox-71.0a1.en-us.win64.complete.mar, the file https://archive.mozilla.org/pub/firefox/nightly/2019/09/2019-09-17-09-36-29-mozilla-central/firefox-71.0a1.en-us.win64.checksums contains the sha512 for that file as well as for all the other win64 files t...
Signing Mozilla apps for Mac OS X
--keychain /path/to/keychain lets you specify which keychain contains the signing certificate specified by your-signing-identity, rather than allowing the codesign to search the keychain list.
Animated PNG graphics
MozillaTechAPNG
the 'actl' chunk contains: byte offset field name field type description 0 num_frames unsigned int the number of frames in the apng.
Gecko object attributes
container-live-role indicates the role for the live region that contains the current accessible object.
ROLE_TABLE
« gecko roles page represents a table that contains rows and columns of cells, and optionally, row headers and column headers.
Retrieving part of the bookmarks tree
it contains administrative data as well as user data, and is therefore not recommended for use in querying.
The Publicity Stream API
possible error codes include: denied - if the user refuses to publicize the activity permissiondenied - if the publicizing site is not allowed to post to the publicity stream networkerror - if the publicity server is unreachable activityparseerror - if the activity contains syntax errors (not proper json) invalidactivity - if the activity contains semantic errors (i.e.
extIApplication
contains a list of all installed extensions.
XML Extras
the xml extras module contains several features that allow developers to treat xml as data i.e.
Bundling multiple binary components
the gears project contains an example of a javascript-based stub loader.
How to build an XPCOM component in JavaScript
the imported library contains functions for generating the module, factory, and the nsgetmodule and queryinterface functions for you.
Building the WebLock UI
the "shell" for the xul file, then, looks like this: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <dialog id="weblock_ui" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="web lock manager" persist="screenx screeny" screenx="24" screeny="24"> </dialog> note that this part of the xul file also contains a stylesheet declaration, which imports css rules and applies them to particular parts of the interface.
Component Internals
xpcom glue xpcom contains a lot of stuff.
Packaging WebLock
the files themselves are stored in the jar file weblock.jar, which is simple a zip file with the xpi extension that sometimes also contains an internal installation file called install.js.
How to build a binary XPCOM component using Visual Studio
for now, you can use the included xpcom project that contains a simple xpcom component.
Interfacing with the XPCOM cycle collector
for instance, if nsfoo contains two member variables, mbar and mbaz, we'd add ns_impl_cycle_collection_2(nsfoo, mbar, mbaz) in nsfoo.cpp.
Components.lastResult
example in the following example, the local variable i contains the actual result returned by bar() (assuming that bar() is called via xpconnect), and components.lastresult contains the success code returned by bar().
Components.utils.Sandbox
generally the javascript garbage collector will take care of this when there are no remaining references to the sandbox or the code it contains.
Components.utils.evalInWindow
if the returned object contains a function, calls to evalinwindow() will throw an error: // page-script.js function bar() { } var somelocalvariablecontainingafunction = {name: "selection1", foo : bar}; // add-on-script.js components.utils.evalinwindow("somelocalvariablecontainingafunction", contentwindow); // error, function can't be cloned ...
PyXPCOM
pyxpcom also contains several classes that provide access to functions for initializing and shutting down xpcom and gecko from python, as well as some xpcom helper functions.
XPCshell Test Manifest Expressions
comments if an expression contains a # (pound/hash) character outside of a string, the character and the rest of the line will be treated as a comment.
nsScriptableInputStream
inputstream = components.interfaces.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.
IAccessible2
windowhandle() returns the window handle for the parent window which contains this object.
IAccessibleText
if the text() is implemented as a tree of text() objects with embed characters in higher levels representing substrings of child text() objects and the caret is in one of the child text() objects, then the offset in the higher level text() object would be at the embed character representing child text() object that contains the caret.
imgICache
use the following snippet to obtain a relevant image cache for a given document or channel (where relevantdocument is a document object that contains images you care about, or relevantchannel is an nsichannel that is used for fetching images): var tools = components.classes["@mozilla.org/image/tools;1"].getservice(components.interfaces.imgitools); var cache = tools.getimgcachefordocument(relevantdocument); // alternatively, tools.getimgcacheforchannel(relevantchannel) if there is no relevant document or channel, null may be passed, but th...
imgIRequest
getstaticrequest() if this request is for an animated image, the method creates a new request which contains the current frame of the image.
mozIStorageStatementParams
enumeration of properties you can also enumerate all the properties on this object with a for..in enumeration: // valuestobind is an object that contains key-value pairs // to bind to the statement before executing it.
GetChildAtPoint
« nsiaccessible page summary this method returns an accessible child which contains the coordinate at (x, y) in screen pixels.
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.
nsIAuthModule
aouttokenlength if getnexttoken succeeds, then aouttokenlength contains the length of the buffer (number of bytes) pointed to by aouttoken.
nsICommandLineHandler
by convention, the right column which contains flag descriptions begins at the 24th character.
nsICrashReporter
exceptions thrown ns_error_invalid_arg if data contains invalid characters.
nsIDOMFileList
the nsidomfilelist interface contains a list of nsidomfile objects describing the files selected by the user for a "file" input field on a web form.
nsIDOMWindow
it represents a single window object that may contain child windows if the document in the window contains an html frameset document, or if the document contains iframe elements.
nsIDOMWindow2
it represents a single window object that may contain child windows if the document in the window contains an html frameset document, or if the document contains <iframe> elements.
nsIDOMWindowInternal
location nsidomlocation readonly: returns a nsidomlocation object, which contains information about the url of the document.
nsIDownload
can only be safely used for direct database manipulation in the database that contains this download.
nsIEditorSpellCheck
count on return, contains the number of entries in the dictionarylist array.
nsIEventListenerService
acount on return, contains the number of elements in the returned array.
nsIFileView
selectedfiles nsiarray an nsiarray of selected files, which contains nsiarray instances.
nsIHttpServer
*/ void registercontenttype(in string extension, in string type); /** * sets the handler used to display the contents of a directory if * the directory contains no index page.
nsIInstallLocation
getitemlocation() gets the directory that contains an item.
Using nsILoginManager
an nsilogininfo object contains the following attributes: hostname, form submit url, http realm, username, username field, password, and password field.
nsILoginManager
if the propertybag contains an item named "timesusedincrement", the login's timesused property will be incremented by the item's value.
nsILoginMetaInfo
toolkit/components/passwordmgr/public/nsiloginmetainfo.idlscriptable an object that contains metadata for logins stored by the login manager.
nsIMessageWakeupService
to indicate a wakeup request in a manifest file, add a line that looks something like this: category wakeup-request nscomponent @mozilla.org/myservice;1,nsimyinterface,getservice,mymessage1,mymessage2[,..] the category entry value consists of a comma separate string that contains: the contract id for your component (e.g.
nsIMessenger
if this window contains a messagepane element (i think this may mean a xul:browser element with its id set to "messagepane"?), then the nsidocshell will be used for future nsimessenger operations.
nsIMsgIdentity
the nsimsgidentity interface contains all the personal outgoing mail information for a given person.
nsIMsgSearchCustomTerm
ned 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 nsmsgsearchopvalue searchop); ...
nsIMsgSearchSession
opcontains value value e.g.
nsIOutputStream
xample writesegments() example // copy data from a string to a stream static ns_method copysegment(nsiinputstream* astream, void* aclosure, char* atosegment, pruint32 afromoffset, pruint32 acount, pruint32* areadcount) { // afromsegment now contains acount bytes of data.
nsIPrincipal
void getpreferences( out string prefbranch, out string id, out string subjectname, out string grantedlist, out string deniedlist, out boolean istrusted ); parameters prefbranch on return, contains the preference branch to which the preferences pertain.
nsIRandomGenerator
abuffer a buffer that contains random bytes of size alength.
nsIRequest
the following flags control what happens when the cache contains data that could perhaps satisfy this request.
nsIScriptableInputStream
warning: if the data contains a null byte, then this method will return a truncated string.
nsISearchEngine
getsubmission() gets a nsisearchsubmission object that contains information about what to send to the search engine, including the uri and postdata, if applicable.
nsISessionStore
return value a json string representing a session state that contains only the window specified by awindow.
nsIStreamListener
nsirequestobserver contains two methods.
nsIStructuredCloneContainer
initfromvariant() initialize this structured clone container so it contains a clone of the given variant.
nsIToolkitProfile
nsiprofilelock lock( out nsiprofileunlocker aunlocker ); parameters aunlocker on error, contains an nsiprofileunlocker object you can use to unlock the profile.
nsITreeBoxObject
the nsitreeboxobject interface contains information about the size and layout of a tree.
nsIUploadChannel2
astreamhasheaders true if the stream already contains headers for the http request.
nsIXMLHttpRequest
this page contains documentation, specific to mozilla application and add-on developers.
nsIXULAppInfo
it contains advanced information on the xul runtime.
nsIXULTemplateBuilder
the <queryset> element contains a single query and one or more <rule> elements.
nsIXULTemplateResult
each result also contains a set of variable bindings.
nsIZipEntry
if the zip file contains an actual entry for a directory, this attribute will be false for the nsizipentry for that directory.
nsIZipReader
hasentry() checks whether the zipfile contains an entry specified by zipentry.
nsIZipWriter
the file need not exist, but the directory that contains it (nsifile.parent) must exist.
nsMsgSearchOp
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl typedef long nsmsgsearchopvalue; [scriptable, uuid(9160b196-6fcb-4eba-aaaf-6c806c4ee420)] interface nsmsgsearchop { const nsmsgsearchopvalue contains = 0; /* for text attributes */ const nsmsgsearchopvalue doesntcontain = 1; const nsmsgsearchopvalue is = 2; /* is and isn't also apply to some non-text attrs */ const nsmsgsearchopvalue isnt = 3; const nsmsgsearchopvalue isempty = 4; const nsmsgsearchopvalue isbefore = 5; /* for date attributes */ const nsmsgsearchopvalue isafter = 6; const nsmsgsearchopvalue ishigherthan = 7; /* for priority.
nsMsgNavigationType
the nsmsgnavigationtype interface contains constants used for message navigation in thunderbird.
nsMsgSearchOpValue
nsmsgsearchopvalue defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl 146 typedef long nsmsgsearchopvalue; 147 148 [scriptable, uuid(9160b196-6fcb-4eba-aaaf-6c806c4ee420)] 149 interface nsmsgsearchop { 150 const nsmsgsearchopvalue contains = 0; /* for text attributes */ 151 const nsmsgsearchopvalue doesntcontain = 1; 152 const nsmsgsearchopvalue is = 2; /* is and isn't also apply to some non-text attrs */ 153 const nsmsgsearchopvalue isnt = 3; 154 const nsmsgsearchopvalue isempty = 4; 155 156 const nsmsgsearchopvalue isbefore = 5; /* for date attributes */ 157 const nsmsgsearchopvalue isafter = 6; 158 159 const nsmsgsearchopvalue ishigherthan = 7; /* for priority.
nsMsgViewCommandCheckState
the nsmsgviewcommandcheckstate interface contains constants used for command status in thunderbird.
nsMsgViewCommandType
the nsmsgviewcommandtype interface contains constants used for commands in thunderbird.
nsMsgViewFlagsType
the nsmsgviewflagstype interface contains constants used for view flags in thunderbird.
nsMsgViewSortOrder
the nsmsgviewsortorder interface contains constants used for sort direction in thunderbird.
nsMsgViewSortType
the nsmsgviewsorttype interface contains constants used for sorting the thunderbird threadpane.
nsMsgViewType
the nsmsgviewtype interface contains constants used for views in thunderbird.
Warnings
if, for some reason you cannot use an index in your order by clause, you can suppress this warning by including a sql comment in your query that contains this text: /* do not warn (bug [everything in these brackets does not matter] */ the bug mentioned should explain why the query cannot use an index.
Storage
nsresult myclass::myfunction() { // mspecialstatement is a member variable of the class that contains a statement.
Using nsIPasswordManager
// this contains the actual password...
Using the Gecko SDK
the sdk contains headers for all of the frozen interfaces and functions, and it also contains headers for classes and functions defined in the glue libraries.
Weak reference
in xpcom, a weak reference is a special object that contains a pointer to an xpcom object, but doesnot keep that object alive.
Working with out parameters
after the call, this object will have a new property called value, which contains the out values.
Xptcall Porting Status
sproul <jsproul@condor.fddi.wesleyan.edu> <font color="red">?</font> sean chitwood <darkmane@w-link.net> waterson said: mozilla runs on linux/ppc <font color="white">done</font> linux alpha glen nakamura <glen.nakamura@usa.net> dan morril <morrildl@nycap.rr.com> glen writes: i am attaching a patch which contains my linux alpha xptcall code.
XPCOM
this implementation will allow you to get(), set(), define(), and undefine() nsifile.using nsipasswordmanagertechnical review completed.using nsisimpleenumeratorusing the clipboardthis section provides information about cutting, copying, and pasting to and from the clipboard.using the gecko sdkweak referencein xpcom, a weak reference is a special object that contains a pointer to an xpcom object, but doesnot keep that object alive.
Mozilla technologies
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.
Autoconfiguration in Thunderbird
it contains settings for the world's largest isps.
Filelink Providers
a provider implementation can choose what information it gets from the user from the setup dialog by pointing the settingsurl attribute of their nsimsgcloudfileprovider implementation to a chrome url for an xhtml page that contains a form with the extra information.
Mail client architecture overview
address book - the address book contains lists of people and all attributes associated with them such as their e-mail address, phone number, etc.
Mail composition back end
ns_imethod quotemessage( const prunichar *msguri, - the uri of the message to be quoted nsioutputstream *outstream) = 0; - the consumer output stream for the quoted data sample programs the mozilla/mailnews/compose/tests/ directory contains sample test programs for all of the above described interfaces.
Mail event system
nsimsgmailsession also contains a number of other methods that are completely unrealted to folder notification.
Thunderbird Binaries
at conception, a branch contains everything that the trunk contains, but from that point onwards, only certain fixes or changes will be accepted.
Building a Thunderbird extension 2: extension file layout
a content/ folder sometimes contains the actual content files.
Building a Thunderbird extension 3: install manifest
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>: this element contains the version id of the application that this add on is developed for.
Building a Thunderbird extension 5: XUL
we have also added a <script> tag that contains a reference to the javascript file overlay.js.
Building a Thunderbird extension 6: Adding JavaScript
finally the label of our panel is set to "date: " and concatenated with the date string that contains the formatted date.
Demo Addon
it contains a collection of glodaconversation objects which itself is a thread that contains one or more glodamessages.
Folders and message lists
getting the current nsimsgfolder the nsimsgfolder interface contains many methods and attributes for working with folders.
Thunderbird extensions
all these concepts are related : a conversation contains messages which are linked to identities (from field, to field) which are themselves part of a contact: indeed, a contact has multiple identities.
Using the Multiple Accounts API
identities (nsimsgidentity): an identity contains all the information necessary to compose and outgoing mail message.
XPI
an xpi contains installation instructions (install.js or install.rdf) as well as the actual software to install, which is often itself packaged as a jar file.
Add to iPhoto
cfstring a cfstring is an opaque data type that contains a string.
Using C struct and pointers
each field descriptor contains the name and field type of the corresponding field of the c struct.
Standard OS Libraries
core foundation to learn about all the mac os x apis and which library file you will need to call, go to the mac developer library website and find the function, then scroll down to "declared in" section, and find which framework contains the header file.
Int64
either it's not a number, string, or 64-bit integer object, or it's a string that is incorrectly formatted or contains a value outside the range that can be represented in 64 bits.
StructType
each field descriptor contains the field's name and its type, such as {'serialnumber': ctypes.int}.
UInt64
either it's not a number, string, or 64-bit integer object, or it's a string that is incorrectly formatted or contains a value outside the range that can be represented in 64 bits.
ctypes
the ctypes object contains methods and predefined data types used to create and manage a library.
Mozilla
it contains tips and example code on opening new windows, finding an already opened window, and passing data between different windows.
Constants - Plugins
nperr_no_data 12 stream contains no data.
Version, UI, and Status Information - Plugins
this function returns a string that contains the user_agent field of the browser.
Accessibility Inspector - Firefox Developer Tools
this is a bit like the dom tree, except that it contains a more limited set of elements and slightly different information about them.
DOM Inspector FAQ - Firefox Developer Tools
the file menu contains approaches which will allow you to inspect a document.
DOM Property Viewer - Firefox Developer Tools
items match the search term if their name contains the search term.
Set a breakpoint - Firefox Developer Tools
the line number is highlighted in blue: in addition, if the line contains multiple function calls, each one will be given a small blue arrow icon to the left of it.
Use a source map - Firefox Developer Tools
the compiled source contains a comment like this, that points to a source map: //# sourcemappingurl=main.js.map in the debugger's source list pane, the original coffeescript source now appears as "main.coffee", and we can debug it just like any other source.
Set an XHR breakpoint - Firefox Developer Tools
note: if you enter a key word instead of a url, code execution will pause on any call to a url that contains that keyword.
UI Tour - Firefox Developer Tools
a settings menu that contains: disable javascript: disables javascript for this tab.
Debugger.Frame - Firefox Developer Tools
codeis interpreted as strict mode code when it contains a use strict directive, or the code executing in this frame is strict mode code.
Eyedropper - Firefox Developer Tools
from firefox 31, the popup contains an eyedropper icon: click this icon to activate the eyedropper.
Aggregate view - Firefox Developer Tools
next to the type's name, there's an icon that contains three stars arranged in a triangle: click this to see every instance of that type.
DOM allocation example - Firefox Developer Tools
it just contains a script that creates a large number of dom nodes: var toolbarbuttoncount = 20; var toolbarcount = 200; function getrandomint(min, max) { return math.floor(math.random() * (max - min + 1)) + min; } function createtoolbarbutton() { var toolbarbutton = document.createelement("span"); toolbarbutton.classlist.add("toolbarbutton"); // stop spidermonkey from sharing instances toolbarbutton[getrandomint(0,5000)] = "foo"; return toolbarbutton; } function createtoolbar() { var toolbar = document.createelement("div"); // stop spidermonkey from sharing instanc...
Dominators view - Firefox Developer Tools
emory tool in the settings, if you haven't already open the memory tool check "record call stacks" press the button labeled "make monsters!" take a snapshot switch to the "dominators" view analyzing the dominators tree you'll see the three arrays as the top three gc roots, each retaining about 23% of the total memory usage: if you expand an array, you'll see the objects (monsters) it contains.
Monster example - Firefox Developer Tools
monsters.friendly.push(new monster()); } for (var i = 0; i &lt; monster_count; i++) { monsters.fierce.push(new monster()); } for (var i = 0; i &lt; monster_count; i++) { monsters.undecided.push(new monster()); } console.log(monsters); } var makemonstersbutton = document.getelementbyid("make-monsters"); makemonstersbutton.addeventlistener("click", makemonsters); the page contains a button: when you push the button, the code creates some monsters.
Network Monitor - Firefox Developer Tools
ui overview the ui is divided into four main pieces: the main screen contains the toolbar, the network request list, and the network request details pane: the performance analysis view is a separate screen: working with the network monitor the following articles cover different aspects of using the network monitor: toolbar network request list network request details network traffic recording performance analysis throttling ...
Edit fonts - Firefox Developer Tools
this tool contains several useful features for viewing and manipulating fonts applied to any document loaded in the browser including inspection of all fonts applied to the page, and precise adjustment of variable font axis values.
Examine and edit CSS - Firefox Developer Tools
(note that this setting is independent of the "browser styles" checkbox in the computed view.) user-agent styles are displayed against a different background, and the link to the filename and line number contains the prefix (user agent): element {} rule the element {} rule at the top of the rules list isn't actually a css rule.
Examine Event Listeners - Firefox Developer Tools
the inspector shows the word "event" next to elements in the html pane, that have event listeners bound to them: click the icon, then you'll see a popup listing all the event listeners bound to this element: each line contains: a right-pointing arrowhead; click to expand the row and show the listener function source code a curved arrow pointing to a stack; click it to show the code for the handler in the debugger the name of the event for which a handler was attached to this element the name and line number for the listener; you can also click here to expand the row and view the listener function source code a label indicating whether the event bubbles a label indicating the system that defines the event.
Inspect and select colors - Firefox Developer Tools
in the css pane's rules view, if a rule contains a color value, you'll see a sample of the color next to the value: a color sample is also shown for css custom properties (variables) that represent colors.
Animation inspector example: CSS transitions - Firefox Developer Tools
-serif; overflow: hidden; white-space: nowrap; display: inline-block; opacity: 0; width: 0; transition: opacity 500ms 150ms, width 500ms 150ms; } .icon#selected { filter: grayscale(0%); transform: scale(1.5); } .icon#selected+span { opacity: 1; width: 300px; } javascript content function toggleselection(e) { if (e.button != 0) { return; } if (e.target.classlist.contains("icon")) { var wasselected = (e.target.getattribute("id") == "selected"); clearselection(); if (!wasselected) { e.target.setattribute("id", "selected"); } } } function clearselection() { var selected = document.getelementbyid("selected"); if (selected) { selected.removeattribute("id"); } } document.addeventlistener("click", toggleselection); ...
Allocations - Firefox Developer Tools
if a gc event was caused by allocation pressure, then the sidebar on the right of the marker in the waterfall view contains a link labeled "show allocation triggers".
Cache Storage - Firefox Developer Tools
if you select a cache, you'll see a list of the resources it contains.
Extension Storage - Firefox Developer Tools
this table contains the following columns: key — the name of the stored item.
Toolbox - Firefox Developer Tools
toolbar the toolbar contains controls to activate a particular tool, to dock/float the window, and to close the window.
Web Console Helpers - Firefox Developer Tools
:block (starting in firefox 80) followed by an unquoted string, blocks requests where the url contains that string.
The JavaScript input interpreter - Firefox Developer Tools
working with iframes if a page contains embedded iframes, you can use the cd() function to change the console's scope to a specific iframe, and then you can execute functions defined in the document hosted by that iframe.
Web Console UI Tour - Firefox Developer Tools
toolbar the toolbar across the top contains a number of features: garbage can: click this icon to clear the contents of the console.
AbstractRange.endContainer - Web APIs
syntax var endnode = range.endcontainer value the dom node which contains the final character of the range.
AbstractRange - Web APIs
we then finish up by calling clonecontents() on the range to create a new documentfragment object which contains the portion of the document encompassed by the range.
AddressErrors.city - Web APIs
syntax var cityerror = addresserrors.city; value if the value specified in the paymentaddress object's city property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.dependentLocality - Web APIs
syntax var localityerror = addresserrors.dependentlocality; value if the value specified in the paymentaddress object's dependentlocality property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.languageCode - Web APIs
syntax var languageerror = addresserrors.languagecode; value if the value specified in the paymentaddress object's languagecode property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.organization - Web APIs
syntax var organizationerror = addresserrors.organization; value if the value specified in the paymentaddress object's organization property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.phone - Web APIs
syntax var phoneerror = addresserrors.phone; value if the value specified in the paymentaddress object's phone property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.postalCode - Web APIs
syntax var postcodeerror = addresserrors.postcode; value if the value specified in the paymentaddress object's postalcode property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.recipient - Web APIs
syntax var recipienterror = addresserrors.recipient; value if the value specified in the paymentaddress object's recipient property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.region - Web APIs
syntax var regionerror = addresserrors.region; value if the value specified in the paymentaddress object's region property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.regionCode - Web APIs
syntax var regioncodeerror = addresserrors.regioncode; value if the value specified in the paymentaddress object's regioncode property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.sortingCode - Web APIs
syntax var sortingcodeerror = addresserrors.sortingcode; value if the value specified in the paymentaddress object's sortingcode property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors - Web APIs
that's done by removing all shipping options currently set on the request, then set up an object named shippingaddresserrors which contains a country property which is an error message describing why the stated country isn't being permitted as a value.
AnimationEffect.getComputedTiming() - Web APIs
return value a computedeffecttiming dictionary object, which contains the following properties: endtime the end time of the animation in milliseconds from the animation's start (if the keyframeeffect is associated with an animation).
AudioBuffer.duration - Web APIs
stereo 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 'dura...
AudioBuffer.getChannelData() - Web APIs
stereo 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; } } // get an audiobuffersourcenode.
AudioBuffer.length - Web APIs
stereo 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'...
AudioBuffer.numberOfChannels - Web APIs
stereo 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 o...
AudioBuffer.sampleRate - Web APIs
stereo 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.samplerate); } specification specification status comment web audio apithe definition of 'sam...
AudioContext() - Web APIs
syntax var audioctx = new audiocontext(); var audioctx = new audiocontext(options); parameters options optional an object based on the audiocontextoptions dictionary that contains zero or more optional properties to configure the new context.
AudioContext.createMediaStreamDestination() - Web APIs
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.
AudioContext - Web APIs
an audio context controls both the creation of the nodes it contains and the execution of the audio processing, or decoding.
AudioParamDescriptor - Web APIs
parameters['customgain'][i] : parameters['customgain'][0]) // note: a parameter contains an array of 128 values (one value for each of 128 samples), // however it may contain a single value which is to be used for all 128 samples // if no automation is scheduled for the moment.
AudioProcessingEvent - Web APIs
(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } request.send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // 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 sa...
AudioTrack.id - Web APIs
WebAPIAudioTrackid
the id property contains a string which uniquely identifies the track represented by the audiotrack.
AudioTrack.kind - Web APIs
WebAPIAudioTrackkind
the kind property contains a string indicating the category of audio contained in the audiotrack.
AudioTrack.label - Web APIs
WebAPIAudioTracklabel
nction gettracklist(el) { var tracklist = []; const wantedkinds = [ "main", "alternative", "main-desc", "translation", "commentary" ]; el.audiotracks.foreach(function(track) { if (wantedkinds.includes(track.kind)) { tracklist.push({ id: track.id, kind: track.kind, label: track.label }); } }); return tracklist; } the resulting tracklist contains an array of audio tracks whose kind is one of those in the array wantedkinds, with each entry providing the track's id, kind, and label.
AudioTrack - Web APIs
nction gettracklist(el) { var tracklist = []; const wantedkinds = [ "main", "alternative", "main-desc", "translation", "commentary" ]; el.audiotracks.foreach(function(track) { if (wantedkinds.includes(track.kind)) { tracklist.push({ id: track.id, kind: track.kind, label: track.label }); } }); return tracklist; } the resulting tracklist contains an array of audio tracks whose kind is one of those in the array wantedkinds, with each entry providing the track's id, kind, and label.
AudioWorkletNode() - Web APIs
options optional an object based on the audioworkletnodeoptions dictionary, which contains zero or more optional properties to configure the new node.
AudioWorkletNode.parameters - Web APIs
parameters['customgain'][i] : parameters['customgain'][0]) // note: a parameter contains an array of 128 values (one value for each of 128 samples), // however it may contain a single value which is to be used for all 128 samples // if no automation is scheduled for the moment.
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
parameters['customgain'][i] : parameters['customgain'][0]) // note: a parameter contains an array of 128 values (one value for each of 128 samples), // however it may contain a single value which is to be used for all 128 samples // if no automation is scheduled for the moment.
Background Tasks API - Web APIs
to enqueue the task, we push an object onto the tasklist array; the object contains the taskhandler and taskdata values under the names handler and data, respectively, then increment totaltaskcount, which reflects the total number of tasks which have ever been enqueued (we don't decrement it when tasks are removed from the queue).
BaseAudioContext.createBuffer() - Web APIs
audiocontext)(); // 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.
BaseAudioContext.createBufferSource() - Web APIs
stereo 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; } } // get an audiobuffersourcenode.
BaseAudioContext.createPeriodicWave() - Web APIs
var real = new float32array(2); var imag = new float32array(2); var ac = new audiocontext(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag, {disablenormalization: true}); osc.setperiodicwave(wave); osc.connect(ac.destination); osc.start(); osc.stop(2); this works because a sound that contains only a fundamental tone is by definition a sine wave here, we create a periodicwave with two values.
BaseAudioContext.createScriptProcessor() - Web APIs
(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } request.send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // 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 sa...
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.
BasicCardRequest - 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.
BasicCardResponse.billingAddress - Web APIs
the billingaddress property of the basiccardresponse dictionary contains the billing address of the card used to make the payment.
BasicCardResponse.cardNumber - Web APIs
the cardnumber property of the basiccardresponse dictionary contains the number of the card used to make the payment.
BasicCardResponse.cardSecurityCode - Web APIs
the cardsecuritycode property of the basiccardresponse dictionary contains the security code of the card used to make the payment.
BasicCardResponse.cardholderName - Web APIs
the cardnumber property of the basiccardresponse dictionary contains the cardholder name of the card used to make the payment.
BasicCardResponse.expiryMonth - Web APIs
the expirymonth property of the basiccardresponse dictionary contains the expiry month of the card used to make the payment.
BasicCardResponse.expiryYear - Web APIs
the expiryyear property of the basiccardresponse dictionary contains the expiry year of the card used to make the payment.
Using the Beacon API - Web APIs
this document contains examples of the beacon interfaces.
Blob.arrayBuffer() - Web APIs
WebAPIBlobarrayBuffer
returns a promise that resolves with an arraybuffer that contains the blob's data in binary form.
Blob.text() - Web APIs
WebAPIBlobtext
returns a promise that resolves with a usvstring which contains the blob's data as a text string.
Body.bodyUsed - Web APIs
WebAPIBodybodyUsed
the bodyused read-only property of the body mixin contains a boolean that indicates whether the body has been read yet.
CSS - Web APIs
WebAPICSS
no objects with this interface are implemented: it contains only static methods and is therefore a utilitarian interface.
CSSGroupingRule - Web APIs
an object implementing the cssgroupingrule interface represents any css at-rule that contains other rules nested within it.
CSSKeyframeRule - Web APIs
it corresponds to the contains of a single keyframe of a @keyframes at-rule.
CSSKeyframesRule - Web APIs
if it contains more than one keyframe rule, a domexception with a syntax_err is thrown.
CSSMathProduct.values - Web APIs
the cssmathproduct.values read-only property of the cssmathproduct interface returns a cssnumericarray object which contains one or more cssnumericvalue objects.
CSSMathProduct - Web APIs
properties cssmathproduct.values returns a cssnumericarray object which contains one or more cssnumericvalue objects.
CSSMathSum.values - Web APIs
WebAPICSSMathSumvalues
the cssmathsum.values read-only property of the cssmathsum interface returns a cssnumericarray object which contains one or more cssnumericvalue objects.
CSSMathSum - Web APIs
properties cssmathsum.values returns a cssnumericarray object which contains one or more cssnumericvalue objects.
CSSRule - Web APIs
WebAPICSSRule
cssrule.parentstylesheet read only returns the cssstylesheet object for the style sheet that contains this rule cssrule.type read only one of the type constants indicating the type of css rule.
CSSStyleDeclaration.parentRule - Web APIs
syntax var rule = styles.parentrule; value the css rule that contains this declaration block or null if this cssstyledeclaration is not attached to a cssrule.
CSSUnparsedValue.keys() - Web APIs
the cssunparsedvalue.keys() method returns a new array iterator object that contains the keys for each index in the array.
CSSUnparsedValue.values() - Web APIs
the cssunparsedvalue.values() method returns a new array iterator object that contains the values for each index in the cssunparsedvalue object.
CSSValue.cssValueType - Web APIs
css_inherit the value is inherited and the csstext contains "inherit".
CSSValue - Web APIs
WebAPICSSValue
css_inherit the value is inherited and the csstext contains "inherit".
CSS Painting API - Web APIs
concepts and usage essentially, the css painting api contains functionality allowing developers to create custom values for paint(), a css <image> function.
CSS Typed Object Model API - Web APIs
cssunparsedvalue.keys() method returning a new array iterator object that contains the keys for each index in the array.
CanvasRenderingContext2D.beginPath() - Web APIs
syntax void ctx.beginpath(); examples creating distinct paths this example creates two paths, each of which contains a single line.
CanvasRenderingContext2D.getImageData() - Web APIs
securityerror the canvas contains or may contain pixels which were loaded from an origin other than the one from which the document itself was loaded.
CanvasRenderingContext2D.measureText() - Web APIs
the canvasrenderingcontext2d.measuretext() method returns a textmetrics object that contains information about the measured text (such as its width, for example).
CanvasRenderingContext2D.setTransform() - Web APIs
the newer type consists of a single parameter, matrix, representing a 2d transformation matrix to set (technically, a dommatrixinit object; any object will do as long as it contains the above components as properties).
CanvasRenderingContext2D - Web APIs
the canvas state the canvasrenderingcontext2d rendering context contains a variety of drawing style states (attributes for line styles, fill styles, shadow styles, text styles).
Advanced animations - Web APIs
to draw the ball, we will create a ball object which contains properties and a draw() method to paint it on the canvas.
Using channel messaging - Web APIs
when a message is received from the main page we create a list item and insert it in the unordered list, setting the textcontent of the list item equal to the event's data attribute (this contains the actual message).
ChildNode - Web APIs
WebAPIChildNode
the childnode mixin contains methods and properties that are common to all types of node objects that can have a parent.
Clipboard.read() - Web APIs
WebAPIClipboardread
if (result.state == "granted" || result.state == "prompt") { navigator.clipboard.read().then(data => { for (let i=0; i<data.items.length; i++) { if (data.items[i].type != "image/png") { alert("clipboard contains non-image data.
Console.table() - Web APIs
WebAPIConsoletable
ar people = [["john", "smith"], ["jane", "doe"], ["emily", "jones"]] console.table(people); // an array of objects function person(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; } var john = new person("john", "smith"); var jane = new person("jane", "doe"); var emily = new person("emily", "jones"); console.table([john, jane, emily]); note that if the array contains objects, then the columns are labeled with the property name.
Console API - Web APIs
find out about these at: google chrome devtools implementation safari devtools implementation usage is very simple — the console object — available via window.console, or workerglobalscope.console in workers; accessible using just console — contains many methods that you can call to perform rudimentary debugging tasks, generally focused around logging various values to the browser's web console.
Constraint validation API - Web APIs
if you don't do this, and a custom validity was previously set, the input will register as invalid, even if it current contains a valid value on submission.
ContentIndexEvent - Web APIs
it contains the id of the indexed content to be removed.
Credential.type - Web APIs
WebAPICredentialtype
syntax var credtype = credential.type; value a domstring contains a credential's given name.
CredentialsContainer.get() - Web APIs
syntax var promise = credentialscontainer.get([options]) parameters options optional an object of type credentialrequestoptions that contains options for the request.
CryptoKeyPair - Web APIs
it contains two properties, which are both cryptokey objects: a privatekey property containing the private key and a publickey property containing the public key.
CustomElementRegistry.define() - Web APIs
exceptions exception description notsupportederror the customelementregistry already contains an entry with the same name or the same constructor (or is otherwise already defined), or extends is specified and it is a valid custom element name, or extends is specified but the element it is trying to extend is an unknown element.
DOMException() - Web APIs
name optional returns a domstring that contains one of the strings associated with an error constant.
DOMException.code - Web APIs
WebAPIDOMExceptioncode
the code read-only property of the domexception interface returns a short that contains one of the error code constants, or 0 if none match.
DOMException.name - Web APIs
WebAPIDOMExceptionname
the name read-only property of the domexception interface returns a domstring that contains one of the strings associated with an error name.
DOMMatrixReadOnly.flipX() - Web APIs
examples this svg contains two paths in the shape of a triangle, both drawn to the same position.
DOMMatrixReadOnly.scale() - Web APIs
examples this svg contains three squares, one red, one blue, and one green, each positioned at the document origin: <svg width="250" height="250" viewbox="0 0 25 25"> <rect width="25" height="25" fill="red" /> <rect id="transformed" width="25" height="25" fill="blue" /> <rect id="transformedorigin" width="25" height="25" fill="green" /> </svg> this javascript first creates an identity matrix, then uses the scale() ...
DOMMatrixReadOnly.translate() - Web APIs
examples this svg contains two squares, one red and one blue, each positioned at the document origin: <svg width="250" height="250" viewbox="0 0 50 50"> <rect width="25" height="25" fill="red" /> <rect id="transformed" width="25" height="25" fill="blue" /> </svg> the following javascript first creates an identity matrix, then uses the translate() method to create a new, translated matrix — which is then applied to ...
DOMPoint - Web APIs
WebAPIDOMPoint
in the following snippet, the pose of the xr device (such as a vr headset or phone with ar capabilities) can be retrieved by calling using xrframe.getviewerpose() during an xrsession animation frame, then accessing the resulting xrpose's transform property, which contains two dompointreadonly attributes: position as a vector and orientation as a quaternion.
Binary strings - Web APIs
WebAPIDOMStringBinary
however at least one native function requires binary strings as its input, btoa(): invoking it on a string that contains codepoints greater than 255 will cause a character out of range error.
DOMTokenList.replace() - Web APIs
to use with earlier versions of ie, refer to the polyfill at element.classlist#polyfill domtokenlist.prototype.replace = function (a, b) { if (this.contains(a)) { this.add(b); this.remove(a); return true; } return false; } specifications specification status comment domthe definition of 'replace()' in that specification.
DOMTokenList - Web APIs
domtokenlist.contains(token) returns true if the list contains the given token, otherwise false.
DataTransferItem - Web APIs
during a drag operation, each drag event has a datatransfer property which contains a list of drag data items.
DataTransferItemList.add() - Web APIs
exceptions notsupportederror a string data parameter was provided, and the list already contains an item whose kind is "plain unicode string" and whose type is equal to the specified type parameter.
DeprecationReportBody - Web APIs
ode); let innerlist = document.createelement('ul'); listitem.appendchild(innerlist); list.appendchild(listitem); for (let key in reports[i].body) { let innerlistitem = document.createelement('li'); let keyvalue = reports[i].body[key]; innerlistitem.textcontent = key + ': ' + keyvalue; innerlist.appendchild(innerlistitem); } } } the reports parameter contains an array of all the reports in the observer's report queue.
Using light sensors - Web APIs
if your app contains a lot of white in the ui, it is usually beneficial to the user to change the ui to a darker color in a darker environment.
DirectoryEntrySync - Web APIs
if you delete a directory that contains a file that cannot be removed or if an error occurs while the deletion is in progress, some of the contents might not be deleted.
Document.all - Web APIs
WebAPIDocumentall
syntax var htmlallcollection = document.all; value an htmlallcollection which contains every element in the document.
Document.anchors - Web APIs
WebAPIDocumentanchors
<h1>title</h1> <h2><a name="contents">contents</a></h2> <ul id="toc"></ul> <h2><a name="plants">plants</a></h2> <ol> <li>apples</li> <li>oranges</li> <li>pears</li> </ol> <h2><a name="veggies">veggies</a></h2> <ol> <li>carrots</li> <li>celery</li> <li>beats</li> </ol> </body> </html> view on jsfiddle notes for reasons of backwards compatibility, the returned set of anchors only contains those anchors created with the name attribute, not those created with the id attribute.
Document.body - Web APIs
WebAPIDocumentbody
syntax const objref = document.body document.body = objref example // given this html: <body id="oldbodyelement"></body> alert(document.body.id); // "oldbodyelement" const anewbodyelement = document.createelement("body"); anewbodyelement.id = "newbodyelement"; document.body = anewbodyelement; alert(document.body.id); // "newbodyelement" notes document.body is the element that contains the content for the document.
Document.createAttribute() - Web APIs
exceptions invalid_character_err if the parameter contains invalid characters for xml attribute.
Document.getElementsByName() - Web APIs
the returned nodelist collection contains all elements with the given name, such as <meta>, <object>, and even elements which do not support the name attribute at all.
Document.location - Web APIs
WebAPIDocumentlocation
the document.location read-only property returns a location object, which contains information about the url of the document and provides methods for changing that url and loading another url.
Document - Web APIs
WebAPIDocument
internet explorer does not support all methods from the node interface in the document interface: document.contains as a work-around, document.body.contains() can be used.
Locating DOM elements using selectors - Web APIs
for example: var el = document.queryselector( "#main, #basic, #exclamation" ); after executing the above code, el contains the first element in the document whose id is one of main, basic, or exclamation.
Document Object Model (DOM) - Web APIs
each branch of the tree ends in a node, and each node contains objects.
DragEvent.dataTransfer - Web APIs
syntax let data = dragevent.datatransfer; return value data a datatransfer object which contains the drag event's data.
Element: MozMousePixelScroll event - Web APIs
if the platform's native mouse wheel events indicate the scroll distance in terms of lines or pages, the value of detail is computed using that value and the line height or page width/height of the nearest ancestor scrollable element that contains the target element.
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.
Element: fullscreenerror event - Web APIs
bubbles yes cancelable no interface event event handler property onfullscreenerror as with the fullscreenchange event, two fullscreenerror events are fired; the first is sent to the element which failed to change modes, and the second is sent to the document which contains that element.
Element.getBoundingClientRect() - Web APIs
the result is the smallest rectangle which contains the entire element, with read-only left, top, right, bottom, x, y, width, and height properties describing the overall border-box in pixels.
Element.getClientRects() - Web APIs
each domrect object contains read-only left, top, right and bottom properties describing the border box, in pixels, with the top-left relative to the top-left of the viewport.
Element.getElementsByClassName() - Web APIs
the element method getelementsbyclassname() returns a live htmlcollection which contains every descendant element which has the specified class name or names.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
we add a second method that logs information about mouseevent based events (such as mousedown, click, and mouseenter): function logevent(event) { var msg = "event <strong>" + event.type + "</strong> at <em>" + event.clientx + ", " + event.clienty + "</em>"; log(msg); } then we use this as the event handler for a number of mouse events on the box that contains our log: var boxelem = document.queryselector(".box"); boxelem.addeventlistener("mousedown", logevent); boxelem.addeventlistener("mouseup", logevent); boxelem.addeventlistener("click", logevent); boxelem.addeventlistener("mouseenter", logevent); boxelem.addeventlistener("mouseleave", logevent); html the html is quite simple for our example.
Element.removeAttributeNS() - Web APIs
syntax element.removeattributens(namespace, attrname); parameters namespace is a string that contains the namespace of the attribute.
Element.setAttribute() - Web APIs
exceptions invalidcharactererror the specified attribute name contains one or more characters which are not valid in attribute names.
Element.slot - Web APIs
WebAPIElementslot
examples in our simple-template example (see it live), we create a trivial custom element example called <my-paragraph> in which a shadow root is attached and then populated using the contents of a template that contains a slot named my-text.
Element.toggleAttribute() - Web APIs
exceptions invalidcharactererror the specified attribute name contains one or more characters which are not valid in attribute names.
Element - Web APIs
WebAPIElement
element.getelementsbyclassname() returns a live htmlcollection that contains all descendants of the current element that possess the list of classes given in the parameter.
ElementCSSInlineStyle.style - Web APIs
when getting, it returns a cssstyledeclaration object that contains a list of all styles properties for that element with values assigned for the attributes that are defined in the element's inline style attribute.
ElementCSSInlineStyle - Web APIs
when getting, it returns a cssstyledeclaration object that contains a list of all styles properties for that element with values assigned for the attributes that are defined in the element's inline style attribute.methodsthis interface has no methods.
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.
Comparison of Event Targets - Web APIs
</small></td> <td class="standard">target who's event listener is being processed <small>event.currenttarget</small></td> <td class="standard">identify other element (if any) involved in the event <small>event.relatedtarget</small></td> <td class="non-standard">if there was a retargetting of the event for some reason <small> event.explicitoriginaltarget</small> contains the target before retargetting (never contains anonymous targets)</td> <td class="non-standard">if there was a retargetting of the event for some reason <small> event.originaltarget</small> contains the target before retargetting (may contain anonymous targets)</td> </tr> </thead> <tr> <td id="target"></td> <td id="currenttarget"></td> <td id="r...
Event.preventDefault() - Web APIs
it's not an elegant function but does the job for the purposes of this example: var warningtimeout; var warningbox = document.createelement("div"); warningbox.classname = "warning"; function displaywarning(msg) { warningbox.innerhtml = msg; if (document.body.contains(warningbox)) { window.cleartimeout(warningtimeout); } else { // insert warningbox after mytextbox mytextbox.parentnode.insertbefore(warningbox, mytextbox.nextsibling); } warningtimeout = window.settimeout(function() { warningbox.parentnode.removechild(warningbox); warningtimeout = -1; }, 2000); } result notes calling preventdefault() during any stage of eve...
Event - Web APIs
WebAPIEvent
event itself contains the properties and methods which are common to all events.
FetchEvent - Web APIs
it contains information about the fetch, including the request and how the receiver will treat the response.
File.mozFullPath - Web APIs
WebAPIFilemozFullPath
a privileged exension to the file interface, the mozfullpath property contains the full pathname of the represented file.
File.webkitRelativePath - Web APIs
the file.webkitrelativepath is a read-only property that contains a usvstring which specifies the file's path relative to the directory selected by the user in an <input> element with its webkitdirectory attribute set.
FileReader.onabort - Web APIs
the filereader.onabort property contains an event handler executed when the abort event is fired, i.e.
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.readAsDataURL() - Web APIs
at that time, the result attribute contains the data as a data: url representing the file's data as a base64 encoded string.
FileReader.readAsText() - Web APIs
when the read operation is complete, the readystate is changed to done, the loadend event is triggered, and the result property contains the contents of the file as a text string.
FileReader.result - Web APIs
WebAPIFileReaderresult
readasbinarystring() the result contains the raw binary data from the file in a string.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
if you try to delete a directory which contains one or more files that can't be removed, or if an error occurs while deletion of a number of files is underway, some files may not be deleted.
FileSystemEntry.filesystem - Web APIs
the read-only filesystem property of the filesystementry interface contains a filesystem object that represents the file system on which the entry resides.
FileSystemEntry.toURL() - Web APIs
if your site is located at http://my-awesome-website.woot, and you have a temporary file system that contains an image file named awesomesauce.jpg, the url returned by tourl() might be (depending on the browser's implementation) something like "filesystem:http://my-awesome-website.woot/temporary/awesomesauce.jpg".
FileSystemFileEntry.createWriter() - Web APIs
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.
FontFace - Web APIs
WebAPIFontFace
fontface.weight a cssomstring that contains the weight of the font.
FontFaceSet.check() - Web APIs
WebAPIFontFaceSetcheck
"italic bold 16px roboto" text: limit the font faces to those whose unicode range contains at least one of the characters in text.
FontFaceSet.load() - Web APIs
WebAPIFontFaceSetload
"italic bold 16px roboto" text: limit the font faces to those whose unicode range contains at least one of the characters in text.
Using FormData Objects - Web APIs
retrieving a formdata object from an html form to construct a formdata object that contains the data from an existing <form>, specify that form element when creating the formdata object: note: formdata will only use input fields that use the name attribute.
FormData.has() - Web APIs
WebAPIFormDatahas
the has() method of the formdata interface returns a boolean stating whether a formdata object contains a certain key.
FormData - Web APIs
WebAPIFormData
formdata.has() returns a boolean stating whether a formdata object contains a certain key.
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.
FormDataEvent - Web APIs
formdataevent.formdata contains the formdata object representing the data contained in the form when the event was fired.
Guide to the Fullscreen API - Web APIs
notification when fullscreen mode is successfully engaged, the document which contains the element receives a fullscreenchange event.
GamepadEvent - Web APIs
the gamepadevent interface of the gamepad api contains references to gamepads connected to the system, which is what the gamepad events window.gamepadconnected and window.gamepaddisconnected are fired in response to.
Gamepad API - Web APIs
it contains three interfaces, two events and one specialist function, to respond to gamepads being connected and disconnected, and to access other information about the gamepads themselves, and what buttons and other controls are currently being pressed.
GlobalEventHandlers.onanimationend - Web APIs
= function(event) { log("animation stopped", event); }; finally, we set up a handler for a click on the button that runs the animation: document.getelementbyid("play").addeventlistener("click", function(event) { document.getelementbyid("box").classname = "slideanimation"; event.target.style.display = "none"; }, false); this sets the class of the box we want to animate to the class that contains the animation description, then hides the play button because this example will only run the animation once.
GlobalEventHandlers.onanimationstart - Web APIs
= function(event) { log("animation stopped", event); }; finally, we set up a handler for a click on the button that runs the animation: document.getelementbyid("play").addeventlistener("click", function(event) { document.getelementbyid("box").classname = "slideanimation"; event.target.style.display = "none"; }, false); this sets the class of the box we want to animate to the class that contains the animation description, then hides the play button because this example will only run the animation once.
GlobalEventHandlers.onerror - Web APIs
}) event of type errorevent contains all the information about the event and the error.
HTMLBaseElement - Web APIs
the htmlbaseelement interface contains the base uri for a document.
HTMLCanvasElement.toBlob() - Web APIs
var canvas = document.getelementbyid('canvas'); var d = canvas.width; ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(d / 2, 0); ctx.lineto(d, d); ctx.lineto(0, d); ctx.closepath(); ctx.fillstyle = 'yellow'; ctx.fill(); function blobcallback(iconname) { return function(b) { var r = new filereader(); r.onloadend = function () { // r.result contains the arraybuffer.
HTMLElement: animationcancel event - Web APIs
ctive'); applyanimation.textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationend event - Web APIs
ctive'); applyanimation.textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationiteration event - Web APIs
ctive'); applyanimation.textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationstart event - Web APIs
ctive'); applyanimation.textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLFontElement.size - Web APIs
it contains either an integer number in the range of 1-7 or a relative value to increase/decrease the value of the size attribute of the <basefont> element.
HTMLFormElement.name - Web APIs
if your <form> element contains an element named name then that element overrides the form.name property, so that you can't access it.
HTMLFormElement - Web APIs
you can also get the form's element by using its name attribute as a key of the form, but using elements is a better approach—it contains only the form's elements, and it cannot be mixed with other attributes of the form.
HTMLHeadElement - Web APIs
the htmlheadelement interface contains the descriptive information, or metadata, for a document.
HTMLHyperlinkElementUtils.hash - Web APIs
if the url does not have a fragment identifier, this property contains an empty string, "".
HTMLIFrameElement - Web APIs
htmliframeelement.longdesc is a domstring that contains the uri of a long description of the frame.
HTMLImageElement.longDesc - Web APIs
the obsolete property longdesc on the htmlimageelement interface specifies the url of a text or html file which contains a long-form description of the image.
HTMLImageElement.srcset - Web APIs
each image candidate string contains an image url and an optional width or pixel density descriptor that indicates the conditions under which that candidate should be used instead of the image specified by the src property.
HTMLImageElement.x - Web APIs
the nearest root element is the outermost <html> element that contains the image.
HTMLImageElement.y - Web APIs
the nearest root element is the outermost <html> element that contains the image.
HTMLInputElement.webkitEntries - Web APIs
the read-only webkitentries property of the htmlinputelement interface contains an array of file system entries (as objects based on filesystementry) representing files and/or directories selected by the user using an <input> element of type file, but only if that selection was made using drag-and-drop: selecting a file in the dialog will leave the property empty (bug 1326031).
HTMLInputElement - Web APIs
files returns/accepts a filelist object, which contains a list of file objects representing the files selected for upload.
HTMLLabelElement.htmlFor - Web APIs
syntax controlid = htmllabelelement.htmlfor htmllabelelement.htmlfor = newid value a domstring which contains the id string of the element which is associated with the control.
HTMLMediaElement.currentSrc - Web APIs
the htmlmediaelement.currentsrc property contains the absolute url of the chosen media resource.
HTMLMediaElement.seekable - Web APIs
the seekable read-only property of the htmlmediaelement returns a timeranges object that contains the time ranges that the user is able to seek to, if any.
HTMLMetaElement - Web APIs
the htmlmetaelement interface contains descriptive metadata about a document.
HTMLSelectElement.selectedOptions - Web APIs
the read-only htmlselectelement property selectedoptions contains a list of the <option> elements contained within the <select> element that are currently selected.
HTMLSelectElement - Web APIs
htmlselectelement.size a long reflecting the size html attribute, which contains the number of visible items in the control.
HTMLStyleElement.scoped - Web APIs
by default it contains the value of the scoped content attribute.
HTMLStyleElement - Web APIs
this interface doesn't allow to manipulate the css it contains (in most case).
HTMLTableCellElement - Web APIs
the headers property is now read-only and contains a domsettabletokenlist rather than a mere domstring.
HTMLTemplateElement - Web APIs
content read only a read-only documentfragment which contains the dom subtree representing the <template> element's template contents.
HTMLTitleElement - Web APIs
the htmltitleelement interface contains the title for a document.
HTMLVideoElement - Web APIs
htmlvideoelement.getvideoplaybackquality() returns a videoplaybackquality object that contains the current playback metrics.
HTML Drag and Drop API - Web APIs
(firefox supports some gecko-specific extensions to the datatransfer object, but those extensions will only work on firefox.) each datatransfer object contains an items property, which is a list of datatransferitem objects.
Headers.has() - Web APIs
WebAPIHeadershas
the has() method of the headers interface returns a boolean stating whether a headers object contains a certain header.
Headers - Web APIs
WebAPIHeaders
headers.has() returns a boolean stating whether a headers object contains a certain header.
History.pushState() - Web APIs
WebAPIHistorypushState
whenever the user navigates to the new state, a popstate event is fired, and the state property of the event contains a copy of the history entry's state object.
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.
IDBDatabase.version - Web APIs
the version property of the idbdatabase interface is a 64-bit integer that contains the version of the connected database.
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
experimental gecko options object options (version and storage) optional in gecko, since version 26, you can include a non-standard options object as a parameter of idbfactory.open that contains the version number of the database, plus a storage value that specifies whether you want to use persistent or temporary storage.
IDBIndex.count() - Web APIs
WebAPIIDBIndexcount
dataerror the key or key range provided contains an invalid key.
IDBIndex.get() - Web APIs
WebAPIIDBIndexget
dataerror the key or key range provided contains an invalid key.
IDBIndex.getKey() - Web APIs
WebAPIIDBIndexgetKey
dataerror the key or key range provided contains an invalid key.
IDBIndex.name - Web APIs
WebAPIIDBIndexname
the name property of the idbindex interface contains a string which names the index.
IDBIndex.openCursor() - Web APIs
dataerror the key or key range provided contains an invalid key.
IDBIndex.openKeyCursor() - Web APIs
dataerror the key or key range provided contains an invalid key.
IDBObjectStore.get() - Web APIs
dataerror the key or key range provided contains an invalid key.
IDBObjectStore.getAll() - Web APIs
dataerror the key or key range provided contains an invalid key or is null.
IDBObjectStore.getAllKeys() - Web APIs
dataerror the key or key range provided contains an invalid key or is null.
IDBObjectStore.getKey() - Web APIs
dataerror the key or key range provided contains an invalid key.
IDBObjectStore.openCursor() - Web APIs
his simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store: var transaction = db.transaction("name", "readonly"); var objectstore = transaction.objectstore("name"); var 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.
IDBObjectStore.openKeyCursor() - Web APIs
is simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store: var transaction = db.transaction("name", "readonly"); var objectstore = transaction.objectstore("name"); var request = objectstore.openkeycursor(); request.onsuccess = function(event) { 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.
ImageData.data - Web APIs
WebAPIImageDatadata
the readonly imagedata.data property returns a uint8clampedarray that contains the imagedata object's pixel data.
ImageData - Web APIs
WebAPIImageData
constructors imagedata() creates an imagedata object from a given uint8clampedarray and the size of the image it contains.
InputDeviceCapabilities - Web APIs
it contains the following property.
IntersectionObserver.rootMargin - Web APIs
syntax var marginstring = intersectionobserver.rootmargin; value a string, formatted similarly to the css margin property's value, which contains offsets for one or more sides of the root's bounding box.
IntersectionObserverEntry.intersectionRect - Web APIs
the intersectionobserverentry interface's read-only intersectionrect property is a domrectreadonly object which describes the smallest rectangle that contains the entire portion of the target element which is currently visible within the intersection root.
Intersection Observer API - Web APIs
similarly, if the visible portion of an element is not rectangular, the element's intersection rectangle is construed to be the smallest rectangle that contains all the visible portions of the element.
KeyboardEvent.code - Web APIs
shipsize contains the size of the ship the player is moving around, for convenience.
KeyboardEvent.which - Web APIs
syntax var keyresult = event.which; return value keyresult contains the numeric code for a particular key pressed, depending on whether an alphanumeric or non-alphanumeric key was pressed.
KeyboardEvent - Web APIs
for keys whose char attribute contains multiple characters, this is the unicode value of the first character in that attribute.
KeyboardLayoutMap.keys - Web APIs
the keys read-only property of the keyboardlayoutmap interface returns a new array iterator object that contains the keys for each index in the array.
KeyboardLayoutMap.values - Web APIs
the values read-only property of the keyboardlayoutmap interface returns a new array iterator object that contains the values for each index in the map.
KeyframeEffect.setKeyframes() - Web APIs
if there are insufficient values, or if the list contains null values, the keyframes without specified offsets will be evenly spaced as with the array format described above.
Location: hash - Web APIs
WebAPILocationhash
if the url does not have a fragment identifier, this property contains an empty string, "".
LockManager - Web APIs
lockmanager.query() returns a promise that resolves with a lockmanagersnapshot which contains information about held and pending locks.
MediaCapabilities.decodingInfo() - Web APIs
the mediacapabilities.decodinginfo() method, part of the media capabilities api, returns a promise with the tested media configuration's mediacapabilitiesinfo; this contains the three boolean properties supported, smooth, and powerefficient, which describe whether decoding the media described would be supported, smooth, and powerefficient.
MediaCapabilities.encodingInfo() - Web APIs
the mediacapabilities.encodinginfo() method, part of the mediacapabilities interface of the media capabilities api, returns a promise with the tested media configuration's mediacapabilitiesinfo; this contains the three boolean properties supported, smooth, and powerefficient, which describe how compatible the device is with the type of media.
MediaDeviceInfo.groupId - Web APIs
finally, the list, which now contains a mediadeviceinfo object for each device in the same group, is returned to the caller.
MediaDeviceInfo - Web APIs
the mediadeviceinfo interface contains information that describes a single media input or output device.
MediaDevices.getDisplayMedia() - Web APIs
async function startcapture(displaymediaoptions) { let capturestream = null; try { capturestream = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { console.error("error: " + err); } return capturestream; } this uses await to asynchronously wait for getdisplaymedia() to resolve with a mediastream which contains the display contents as requested by the specified options.
MediaDevices.getUserMedia() - Web APIs
a secure context is one the browser is reasonably confident contains a document which was loaded securely, using https/tls, and has limited exposure to insecure contexts.
MediaError.message - Web APIs
the read-only property mediaerror.message returns a domstring which contains a human-readable string offering specific diagnostic details related to the error described by the mediaerror object, or an empty string ("") if no diagnostic information can be determined or provided.
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.
sessionId - Web APIs
the mediakeysession.sessionid read-only property contains a unique string generated by the cdm for the current media object and its associated keys or licenses.
MediaRecorder.ondataavailable - Web APIs
the data is provided in a blob object that contains the data.
MediaRecorder.onerror - Web APIs
the error object is of type mediarecordererrorevent, and its error property contains a domexception object that describes the error that occurred.
MediaRecorder.onwarning - Web APIs
properties message contains information about the error that occurred.
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.
MediaSession - Web APIs
properties metadata returns an instance of mediametadata which contains rich media metadata, for display in a platform ui.
MediaStream.getAudioTracks() - Web APIs
the array is empty if the stream contains no audio tracks.
MediaStream.getVideoTracks() - Web APIs
the array is empty if the stream contains no video tracks.
MediaStream - Web APIs
you can create an empty stream, a stream which is based upon an existing stream, or a stream that contains a specified list of tracks (specified as an array of mediastreamtrack objects).
MediaStreamEvent - Web APIs
mediastreamevent.stream read only contains the mediastream containing the stream associated with the event.
MediaStreamTrack - Web APIs
mediastreamtrack.contenthint a string that may be used by the web application to provide a hint as to what type of content the track contains to guide how it should be treated by api consumers.
Recording a media element - Web APIs
the received event's data property is a blob that contains the media data.
Using the MediaStream Recording API - Web APIs
we wanted to give the first two (the header and the controls) fixed heights: header { height: 70px; } .main-controls { padding-bottom: 0.7rem; height: 170px; } however, we wanted to make the third area (which contains the recorded samples you can play back) take up whatever space is left, regardless of the device height.
MediaStream Recording API - Web APIs
your dataavailable event handler gets called every time there's data ready for you to do with as you will; the event has a data attribute whose value is a blob that contains the media data.
MediaTrackSettings.displaySurface - Web APIs
syntax displaysurface = mediatracksettings.displaysurface; value the value of displaysurface is a string that comes from the displaycapturesurfacetype enumerated type, and is one of the following: application the stream's video track contains all of the windows belonging to the application chosen by the user.
Media Session API - Web APIs
dictionaries mediaimage a mediaimage object contains information describing an image associated with the media.
Capabilities, constraints, and settings - Web APIs
this object contains zero or more individual constraints, as well as an optional sub-object named advanced, which contains another set of zero or more constraints which the user agent must satisfy if at all possible.
Microdata DOM API - Web APIs
the document.getitems(typenames) method takes a string that contains an unordered set of unique space-separated tokens that are case-sensitive, representing types.
MimeType - Web APIs
WebAPIMimeType
the mimetype interface provides contains information about a mime type associated with a particular plugin.
MimeTypeArray - Web APIs
the mimetypearray interface returns an array of mimetype instances, each of which contains information about a supported browser plugins.
MutationObserverInit.characterData - Web APIs
note that this doesn't monitor content of an htmlelement, even if it only contains text inside, as it only monitors text nodes themselves.
NDEFRecord.data - Web APIs
WebAPINDEFRecorddata
syntax ndefrecord.data value a dataview that contains encoded payload data of the record.
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.
Navigation Timing API - Web APIs
performancenavigation the type used to return the value of navigation, which contains information explaining the context of the load operation described by this performance instance.
Navigator.getUserMedia() - Web APIs
the function is called with one parameter: the mediastream object that contains the media stream.
Navigator.msLaunchUri() - Web APIs
the uniform resource identifier (uri) contains the protocol for the default service or app, such as mailto://test@contoso.com.
NavigatorID - Web APIs
the navigatorid interface contains methods and properties related to the identity of the browser.
NavigatorLanguage - Web APIs
navigatorlanguage contains methods and properties related to the language of the navigator.
NavigatorOnLine - Web APIs
the navigatoronline interface contains methods and properties related to the connectivity status of the browser.
NavigatorPlugins.mimeTypes - Web APIs
returns a mimetypearray object, which contains a list of mimetype objects representing the mime types recognized by the browser.
NetworkInformation.onchange - Web APIs
the networkinformation.onchange event handler contains the code that is fired when connection information changes, and the change is received by the networkinformation object.
Node.baseURI - Web APIs
WebAPINodebaseURI
if the document contains xml:base attributes (which you shouldn't do in html documents), the element.baseuri takes the xml:base attributes of element's parents into account when computing the base url.
Node.cloneNode() - Web APIs
WebAPINodecloneNode
any text that node contains is not cloned, either (since text is contained by one or more child text nodes).
NonDocumentTypeChildNode - Web APIs
the nondocumenttypechildnode interface contains methods that are particular to node objects that can have a parent, but not suitable for documenttype.
Notification.icon - Web APIs
WebAPINotificationicon
the icon read-only property of the notification interface contains the url of an icon to be displayed as part of the notification, as specified in the icon option of the notification() constructor.
Notification.image - Web APIs
the image read-only property of the notification interface contains the url of an image to be displayed as part of the notification, as specified in the image option of the notification() constructor.
OfflineAudioContext.startRendering() - Web APIs
syntax event-based version: offlineaudioctx.startrendering(); offlineaudioctx.oncomplete = function(e) { // e.renderedbuffer contains the output buffer } promise-based version: offlineaudioctx.startrendering().then(function(buffer) { // buffer contains the output buffer }); parameters none.
OscillatorNode.setPeriodicWave() - Web APIs
var real = new float32array(2); var imag = new float32array(2); var ac = new audiocontext(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag); osc.setperiodicwave(wave); osc.connect(ac.destination); osc.start(); osc.stop(2); this works because a sound that contains only a fundamental tone is by definition a sine wave.
ParentNode.children - Web APIs
the parentnode property children is a read-only property that returns a live htmlcollection which contains all of the child elements of the node upon which it was called.
ParentNode - Web APIs
the parentnode mixin contains methods and properties that are common to all types of node objects that can have children.
PayerErrors - Web APIs
for each field in the payment information that fails validation, the payererrors object contains a string explaining the error.
PaymentAddress.postalCode - Web APIs
syntax var paymentpostalcode = paymentaddress.postalcode; value a domstring which contains the postal code portion of the address.
PaymentMethodChangeEvent.methodDetails - Web APIs
// methoddetails contains the card information const result = calculatediscount(ev.methoddetails); object.assign(newstuff, result); break; } } // finally...
PaymentMethodChangeEvent.methodName - Web APIs
// methoddetails contains the card information const result = calculatediscount(ev.methoddetails); object.assign(newstuff, result); break; } } // finally...
PaymentRequest.onpaymentmethodchange - Web APIs
// methoddetails contains the store card information const result = calculatediscount(ev.methoddetails); object.assign(newstuff, result); break; } } // finally...
PaymentRequest: shippingaddresschange event - Web APIs
that is, the paymentaddress which contains the shipping address may have some portions of its content altered, obscured, or left out entirely in order to prevent identifying the user without their consent (since if they choose to have you ship products to them, you'll need their address).
paymentRequestId - Web APIs
syntax var id = paymentrequestevent.paymentrequestid value a domstring contains the id.
PaymentResponse.retry() - Web APIs
shippingaddress optional an addresserrors object which contains error messages for any of the fields in the shipping address that failed validation.
PaymentValidationErrors - Web APIs
shippingaddress optional an addresserrors object which contains error messages for any of the fields in the shipping address that failed validation.
Payment processing concepts - Web APIs
this results in the creation and returning of a payment method-specific object that contains the information needed to handle the transaction.
Payment Request API - Web APIs
interfaces paymentaddress an object that contains address information; used for billing and shipping addresses, for example.
PerformanceServerTiming.duration - Web APIs
the duration read-only property returns a double that contains the server-specified metric duration, or value 0.0.
PerformanceServerTiming - Web APIs
performanceservertiming.durationread only a double that contains the server-specified metric duration, or value 0.0.
PerformanceTiming - Web APIs
the performancetiming interface is a legacy interface kept for backwards compatibility and contains properties that offer performance timing information for various events which occur during the loading and use of the current page.
PeriodicWave - Web APIs
var real = new float32array(2); var imag = new float32array(2); var ac = new audiocontext(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag, {disablenormalization: true}); osc.setperiodicwave(wave); osc.connect(ac.destination); osc.start(); osc.stop(2); this works because a sound that contains only a fundamental tone is by definition a sine wave here, we create a periodicwave with two values.
PopStateEvent - Web APIs
if the history entry being activated was created by a call to history.pushstate() or was affected by a call to history.replacestate(), the popstate event's state property contains a copy of the history entry's state object.
PromiseRejectionEvent() - Web APIs
this can be anything from a numeric error code to an error domstring to an object which contains detailed information describing the situation resulting in the promise being rejected.
PublicKeyCredential.response - Web APIs
this object contains data from the client (authenticatorresponse/clientdatajson) and from the authenticator.
PublicKeyCredentialCreationOptions.challenge - Web APIs
contains a cryptographic challenge emitted from the relying party's server which must be signed by the authenticator's private key and sent back (within the response) to the relying party's server for verification.
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
if the authenticator already contains one of such a public key credential, the client will throw a domexception or asks the user if they want to create a new credential.
PublicKeyCredentialCreationOptions.extensions - Web APIs
if true, the client outputs an arraybuffer which contains a value uniquely identifying a user verification data record.
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
if this array contains multiple elements, they are sorted by descending order of preference.
PublicKeyCredentialRequestOptions.challenge - Web APIs
contains a cryptographic challenge emitted from the relying party's server which must be signed by the authenticator's private key and sent back (within the response) to the relying party's server for verification.
PublicKeyCredentialRequestOptions.extensions - Web APIs
if true, the client outputs an arraybuffer which contains a value uniquely identifying a user verification data record.
PushEvent - Web APIs
WebAPIPushEvent
it contains the information sent from an application server to a pushsubscription.
PushSubscription.toJSON() - Web APIs
it currently only contains the subscription endpoint, as an endpoint member.
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.
RTCDTMFSender - Web APIs
idth="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="216" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">rtcdtmfsender</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties rtcdtmfsender.tonebuffer read only a domstring which contains the list of dtmf tones currently in the queue to be transmitted (tones which have already been played are no longer included in the string).
RTCDtlsTransport.iceTransport - Web APIs
the read-only rtcdtlstransport property icetransport contains a reference to the underlying rtcicetransport.
RTCDtlsTransport - Web APIs
0" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="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.
RTCErrorEvent.error - Web APIs
the read-only rtcerrorevent property error contains an rtcerror object describing the details of the error which the event is announcing.
RTCIceCandidate.port - Web APIs
the rtcicecandidate interface's read-only port property contains the port number on the device at the address given by ip at which the candidate's peer can be reached.
RTCIceCandidate.relatedAddress - Web APIs
syntax var reladdress = rtcicecandidate.relatedaddress; value a domstring which contains the candidate's related address.
RTCIceCandidate.usernameFragment - Web APIs
the function below, ssnewcandidate(), is called when a message, signalmsg, arrives from the signaling server that contains an ice candidate to be added to the rtcpeerconnection.
RTCIceCandidateInit - Web APIs
the webrtc api's rtcicecandidateinit dictionary, which contains the information needed to fundamentally describe an rtcicecandidate.
RTCIceComponent - Web APIs
the webrtc api's rtcicecomponent enumerated type contains domstring values that each identify a specific ice component; these are "rtp" and "rtcp".
RTCIceTransport.getRemoteCandidates() - Web APIs
the rtcicetransport method getremotecandidates() returns an array which contains one rtcicecandidate for each of the candidates that have been received from the remote peer so far during the current ice gathering session.
RTCIceTransport: selectedcandidatepairchange event - Web APIs
the pair of candidates is in turn described by an rtcicecandidatepair object which contains one rtcicecandidate representing the local end of the connection, and another representing the remote end of the connection.
RTCInboundRtpStreamStats.qpSum - Web APIs
example calculating average quantization the calculateaverageqp() function shown below computes the average qp for the given rtcstats object that contains rtp stream statistics, returning 0 if the object doesn't describe an rtp stream.
RTCInboundRtpStreamStats.receiverId - Web APIs
syntax var receiverstatsid = rtcinboundrtpstreamstats.receiverid; value a domstring which contains the id of the rtcaudioreceiverstats or rtcvideoreceiverstats object which provides information about the rtcrtpreceiver which is receiving the streamed media.
RTCInboundRtpStreamStats - Web APIs
the webrtc api's rtcinboundrtpstreamstats dictionary, based upon rtcreceivedrtpstreamstats and rtcstats, contains statistics related to the receiving end of an rtp stream on the local end of the rtcpeerconnection.
RTCOutboundRtpStreamStats.qpSum - Web APIs
example calculating average quantization the calculateaverageqp() function shown below computes the average qp for the given rtcstats object that contains rtp stream statistics, returning 0 if the object doesn't describe an rtp stream.
RTCPeerConnection.addTrack() - Web APIs
tream = await navigator.mediadevices.getusermedia( {video: true, audio: true}); for (const track of gumstream.gettracks()) { pc.addtrack(track, gumstream); } } the remote peer might then use a track event handler that looks like this: pc.ontrack = ({streams: [stream]} => videoelem.srcobject = stream; this sets the video element's current stream to the one that contains the track that's been added to the connection.
RTCPeerConnection.canTrickleIceCandidates - Web APIs
that way, the offer contains all of the candidates.
RTCPeerConnection.createOffer() - Web APIs
return value a promise whose fulfillment handler will receive an object conforming to the rtcsessiondescriptioninit dictionary which contains the sdp describing the generated offer.
RTCPeerConnection: icecandidateerror event - Web APIs
the event object is of type rtcpeerconnectioniceerrorevent, and contains information describing the error in some amount of detail.
RTCPeerConnection.onconnectionstatechange - Web APIs
the event object contains no special information of note; you can look at the value of the peer connection's connectionstate property to determine what the new state is.
RTCPeerConnection.onsignalingstatechange - Web APIs
syntax rtcpeerconnection.onsignalingstatechange = errorhandler; value set this to a function which you provide that receives an event object as input; this contains the signalingstatechange event.
RTCPeerConnection.peerIdentity - Web APIs
the read-only rtcpeerconnection property peeridentity returns a javascript promise that resolves to an rtcidentityassertion which contains a domstring identifying the remote peer.
RTCPeerConnectionIceEvent - Web APIs
rtcpeerconnectioniceevent.candidate read only contains the rtcicecandidate containing the candidate associated with the event, or null if this event indicates that there are no further candidates to come.
RTCRtpSendParameters.encodings - Web APIs
syntax sendparameters.encodings = encodingparameterlist; encodingparameterlist = sendparameters.encodings; value an array of objects conforming to the rtcrtpencodingparameters dictionary, each of which contains properties which provide settings and parameters that describe and configure a single codec that could be used to encode the track.
RTCRtpStreamStats.trackId - Web APIs
the rtcrtpstreamstats dictionary's trackid property is a string which uniquely identifies the rtcmediastreamtrackstats object which contains the track statistics for the mediastreamtrack for which statistics are provided in this object.
RTCRtpStreamStats - Web APIs
kind a domstring whose value is "audio" if the associated mediastreamtrack is audio-only or "video" if the track contains video.
RTCRtpTransceiver.direction - Web APIs
the sdp contains an a-line which specifies the directionality.
RTCSessionDescriptionCallback - Web APIs
this object contains the type and sdp properties which are part of rtcsessiondescription.
RadioNodeList.value - Web APIs
if the underlying element collection contains radio buttons, the radionodelist.value property represents the checked radio button.
RadioNodeList - Web APIs
radionodelist.value if the underlying element collection contains radio buttons, the value property represents the checked radio button.
Range.commonAncestorContainer - Web APIs
the range.commonancestorcontainer read-only property returns the deepest — or furthest down the document tree — node that contains both boundary points of the range.
Range.createContextualFragment() - Web APIs
syntax documentfragment = range.createcontextualfragment(tagstring) parameters tagstring text that contains text and tags to be converted to a document fragment.
Range.getBoundingClientRect() - Web APIs
the bounding client rectangle contains everything selected in the range.</p> css #highlight { background: yellow; position: absolute; z-index: -1; } p { width: 200px; } javascript const range = document.createrange(); range.setstartbefore(document.getelementsbytagname('b').item(0), 0); range.setendafter(document.getelementsbytagname('b').item(1), 0); const clientrect = range.getboundingclientrect(); const highlight = doc...
Range - Web APIs
WebAPIRange
range.commonancestorcontainer read only returns the deepest node that contains the startcontainer and endcontainer nodes.
ReadableStream.ReadableStream() - Web APIs
the reason parameter contains a domstring describing why the stream was cancelled.
Request() - Web APIs
WebAPIRequestRequest
integrity: contains the subresource integrity value of the request (e.g., sha256-bpfbw7ivv8q2jlit13fxdyae2tjllusrsz273h2nfse=).
Request.cache - Web APIs
WebAPIRequestcache
the cache read-only property of the request interface contains the cache mode of the request.
Request.context - Web APIs
WebAPIRequestcontext
the deprecated context read-only property of the request interface contains the context of the request (e.g., audio, image, iframe).
Request.headers - Web APIs
WebAPIRequestheaders
the headers read-only property of the request interface contains the headers object associated with the request.
Request.integrity - Web APIs
WebAPIRequestintegrity
the integrity read-only property of the request interface contains the subresource integrity value of the request.
Request.method - Web APIs
WebAPIRequestmethod
the method read-only property of the request interface contains the request's method (get, post, etc.) syntax var mymethod = request.method; value a bytestring indicating the method of the request.
Request.mode - Web APIs
WebAPIRequestmode
the mode read-only property of the request interface contains the mode of the request (e.g., cors, no-cors, same-origin, or navigate.) this is used to determine if cross-origin requests lead to valid responses, and which properties of the response are readable.
Request.redirect - Web APIs
WebAPIRequestredirect
the redirect read-only property of the request interface contains the mode for how redirects are handled.
Request.url - Web APIs
WebAPIRequesturl
the url read-only property of the request interface contains the url of the request.
RequestDestination - Web APIs
the requestdestination enumerated type contains the permitted values for a request's destination.
ResizeObserverEntry.borderBoxSize - Web APIs
each object in the array contains two properties: blocksize the length of the observed element's border box in the block dimension.
ResizeObserverEntry.contentBoxSize - Web APIs
this object contains two properties: blocksize the length of the observed element's content box in the block dimension.
Response.headers - Web APIs
WebAPIResponseheaders
the headers read-only property of the response interface contains the headers object associated with the response.
Response.ok - Web APIs
WebAPIResponseok
the ok read-only property of the response interface contains a boolean stating whether the response was successful (status in the range 200-299) or not.
Response.status - Web APIs
WebAPIResponsestatus
the status read-only property of the response interface contains the status code of the response (e.g., 200 for a success).
Response.statusText - Web APIs
the statustext read-only property of the response interface contains the status message corresponding to the status code (e.g., ok for 200).
Response.type - Web APIs
WebAPIResponsetype
the type read-only property of the response interface contains the type of the response.
Response.url - Web APIs
WebAPIResponseurl
the url read-only property of the response interface contains the url of the response.
Response.useFinalURL - Web APIs
the usefinalurl property of the response interface contains a boolean stating whether this is the final url of the response.
SVGAnimatedPathData - Web APIs
if the given attribute or property is being animated, contains the current animated value of the attribute or property, and both the object itself and its contents are read only.
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.
SVGSVGElement - Web APIs
this interface contains also various miscellaneous commonly-used utility methods, such as matrix operations and the ability to control the time of redraw on visual rendering devices.
SVGTransform - Web APIs
for svg_transform_matrix, the matrix contains the a, b, c, d, e, f values supplied by the user.
SVGTransformable - Web APIs
svg transformable interface interface svgtransformable contains properties and methods that apply to all elements which have attribute transform.
ScriptProcessorNode: audioprocess event - Web APIs
no cancelable no default action none interface audioprocessingevent event handler property scriptprocessornode.onaudioprocess examples scriptnode.addeventlistener('audioprocess', function(audioprocessingevent) { // 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 sa...
ScriptProcessorNode.bufferSize - Web APIs
ion(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } request.send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // 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 sa...
ScriptProcessorNode.onaudioprocess - Web APIs
(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } request.send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // 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 sa...
ScrollToOptions - Web APIs
the scrolltooptions dictionary of the cssom view spec contains properties specifying where an element should be scrolled to, and whether the scrolling should be smooth.
Selection.addRange() - Web APIs
example currently only firefox supports multiple selection ranges, other browsers will not add new ranges to the selection if it already contains one.
Selection - Web APIs
WebAPISelection
selection.containsnode() indicates if a certain node is part of the selection.
Selection API - Web APIs
yeschrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yescontainsnode experimentalchrome full support yesedge full support 12firefox full support 4notes full support 4notes notes before firefox 35, the method didn't throw if node was null.ie no support ...
ServiceWorkerGlobalScope.onpush - Web APIs
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...
ServiceWorkerMessageEvent - Web APIs
the serviceworkermessageevent interface of the serviceworker api contains information about an event sent to a serviceworkercontainer target.
Using Service Workers - Web APIs
ut the rest of the code is a little different: let body = document.queryselector('body'); let myimage = new image(); imgload('mylittlevader.jpg').then((response) => { var imageurl = window.url.createobjecturl(response); myimage.src = imageurl; body.appendchild(myimage); }, (error) => { console.log(error); }); on to the end of the function call, we chain the promise then() method, which contains two functions — the first one is executed when the promise successfully resolves, and the second is called when the promise is rejected.
Service Worker API - Web APIs
it contains information about the request and resulting response, and provides the fetchevent.respondwith() method, which allows us to provide an arbitrary response back to the controlled page.
Slottable: assignedSlot - Web APIs
examples in our simple-template example (see it live), we create a trivial custom element example called <my-paragraph> in which a shadow root is attached and then populated using the contents of a template that contains a slot named my-text.
SourceBuffer.appendBuffer() - Web APIs
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
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.
SpeechSynthesis.pending - Web APIs
the pending read-only property of the speechsynthesis interface is a boolean that returns true if the utterance queue contains as-yet-unspoken utterances.
SpeechSynthesis - Web APIs
speechsynthesis.pending read only a boolean that returns true if the utterance queue contains as-yet-unspoken utterances.
SpeechSynthesisErrorEvent - Web APIs
the speechsynthesiserrorevent interface of the web speech api contains information about any errors that occur while processing speechsynthesisutterance objects in the speech service.
SpeechSynthesisEvent - Web APIs
the speechsynthesisevent interface of the web speech api contains information about the current state of speechsynthesisutterance objects that have been processed in the speech service.
SpeechSynthesisUtterance - Web APIs
it contains the content the speech service should read and information about how to read it (e.g.
StaticRange.endContainer - Web APIs
syntax var node = staticnode.endcontainer staticnode.endcontainer = endcontainer value the dom node which contains the final character of the range.
Storage - Web APIs
WebAPIStorage
we first test whether the local storage contains data items using !localstorage.getitem('bgcolor').
StorageManager.estimate() - Web APIs
this dictionary contains estimates of how much space is available to the origin in storageestimate.quota, as well as how much is currently used in storageestimate.usage.
Storage API - Web APIs
to determine the estimated quota and usage values for a given origin, use the navigator.storage.estimate() method, which returns a promise that, when resolved, receives a storageestimate that contains these figures.
SubtleCrypto.encrypt() - Web APIs
ption counter = window.crypto.getrandomvalues(new uint8array(16)); return window.crypto.subtle.encrypt( { name: "aes-ctr", counter, length: 64 }, key, encoded ); } let iv = new uint8array(16); let key = new uint8array(16); let data = new uint8array(12345); //crypto functions are wrapped in promises so we have to use await and make sure the function that //contains this code is an async function //encrypt function wants a cryptokey object const key_encoded = await crypto.subtle.importkey( "raw", key.buffer, 'aes-ctr' , false, ["encrypt", "decrypt"]); const encrypted_content = await window.crypto.subtle.encrypt( { name: "aes-ctr", counter: iv, length: 128 }, key_encoded, data ); //uint8array console.log(encrypted...
TextMetrics.width - Web APIs
WebAPITextMetricswidth
the read-only width property of the textmetrics interface contains the text's advance width (the width of that inline box) in css pixels.
TouchEvent.changedTouches - Web APIs
the touchevent.changedtouches property is a touchlist object that contains one touch object for each touch point which contributed to the event.
Using Touch Events - Web APIs
basic steps this section contains a basic usage of using the above interfaces.
UIEvent - Web APIs
WebAPIUIEvent
uievent.viewread only returns a windowproxy that contains the view that generated the event.
URL.hash - Web APIs
WebAPIURLhash
if the url does not have a fragment identifier, this property contains an empty string — "".
URL API - Web APIs
WebAPIURL API
queries the search property on a url contains the query string portion of the url.
USBConfiguration.USBConfiguration() - Web APIs
the usbconfiguration() constructor creates a new usbconfiguration object which contains information about the configuration on the provided usbdevice with the given configuration value.
USBConfiguration - Web APIs
constructor usbconfiguration.usbconfiguration() creates a new usbconfiguration object which contains information about the configuration on the provided usbdevice with the given configuration value.
VRStageParameters - Web APIs
properties vrstageparameters.sittingtostandingtransform read only contains a matrix that transforms the sitting-space view matrices of vrframedata to standing-space.
VideoPlaybackQuality - Web APIs
a videoplaybackquality object is returned by the htmlvideoelement.getvideoplaybackquality() method and contains metrics that can be used to determine the playback quality of a video.
VideoTrack.id - Web APIs
WebAPIVideoTrackid
the id property contains a string which uniquely identifies the track represented by the videotrack.
VideoTrack.kind - Web APIs
WebAPIVideoTrackkind
the kind property contains a string indicating the category of video contained in the videotrack.
VideoTrack.label - Web APIs
WebAPIVideoTracklabel
function gettracklist(el) { var tracklist = []; const wantedkinds = [ "main", "alternative", "commentary" ]; el.videotracks.foreach(function(track) { if (wantedkinds.includes(track.kind)) { tracklist.push({ id: track.id, kind: track.kind, label: track.label }); } }); return tracklist; } the resulting tracklist contains an array of video tracks whose kind is one of those in the array wantedkinds, with each entry providing the track's id, kind, and label.
Visual Viewport API - Web APIs
visual viewport concepts and usage the mobile web contains two viewports, the layout viewport and the visual viewport.
WebGL2RenderingContext.drawBuffers() - Web APIs
exceptions if buffers contains not one of the accepted values, a gl.invalid_enum error is thrown.
WebGLContextEvent.statusMessage - Web APIs
the read-only webglcontextevent.statusmessage property contains additional event status information, or is an empty string if no additional information is available.
WebGLRenderingContext.makeXRCompatible() - Web APIs
box("unable to transfer the game to your xr headset.", "cancel"); break; case invalidstateerror: showsimplemessagebox("you don't appear to have a compatible xr headset available.", "cancel"); break; default: handlefatalerror(err); break; } xrsession.end(); } } async function handlestartbuttonclick(event) { if (event.target.classlist.contains("use-webxr") && navigator.xr) { try { xrsession = await navigator.xr.requestsession("immersive-vr"); usingxr = true; } catch(err) { xrsession = null; usingxr = false; } } startgame(); } function startgame() { currentscene = "scene1"; loadsceneresources(currentscene); /* and so on */ } this works by having two buttons, one which starts the game nor...
WebGLRenderingContext - Web APIs
webglrenderingcontext.getcontextattributes() returns a webglcontextattributes object that contains the actual context parameters.
A basic 2D WebGL animation example - Web APIs
the array shaderset contains a list of objects, each describing one shader function to be compiled into the program.
Adding 2D content to a WebGL context - Web APIs
locations: { vertexposition: gl.getattriblocation(shaderprogram, 'avertexposition'), }, uniformlocations: { projectionmatrix: gl.getuniformlocation(shaderprogram, 'uprojectionmatrix'), modelviewmatrix: gl.getuniformlocation(shaderprogram, 'umodelviewmatrix'), }, }; creating the square plane before we can render our square plane, we need to create the buffer that contains its vertex positions and put the vertex positions in it.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
on receiving an ice candidate on the other hand, if the received message contains an ice candidate, we simply deliver it to the local ice layer by calling the rtcpeerconnection method addicecandidate().
A simple RTCDataChannel sample - Web APIs
first, we have a couple of buttons for establishing and closing the connection: <button id="connectbutton" name="connectbutton" class="buttonleft"> connect </button> <button id="disconnectbutton" name="disconnectbutton" class="buttonright" disabled> disconnect </button> then there's a box which contains the text input box into which the user can type a message to transmit, with a button to send the entered text.
WebRTC API - Web APIs
rtcrtpcontributingsource contains information about a given contributing source (csrc) including the most recent time a packet that the source contributed was played out.
WebSocket.close() - Web APIs
WebAPIWebSocketclose
syntax_err the reason string is too long or contains unpaired surrogates.
Using bounded reference spaces - Web APIs
this property contains an array of dompointreadonly objects, each of which defines one of the points making up the space's border, moving around the room in clockwise order.
Inputs and input sources - Web APIs
identifying the input's profile each input source has a profiles property, which contains a live list of the webxr input profiles which apply to the input source, in order of specificity from most-specific to least.
Movement, orientation, and motion: A WebXR example - Web APIs
y++) { outhtml += "<mtr>\n"; for (let x=0; x<rowlength; x++) { outhtml += `<mtd><mn>${mat[(x*rowlength) + y].tofixed(2)}</mn></mtd>\n`; } outhtml += "</mtr>\n"; } outhtml += "</mtable>\n<mo>]</mo>\n</mrow>\n</math>"; } target.innerhtml = outhtml; } this replaces the contents of the element specified by target with a newly-created <math> element which contains the 4x4 matrix.
Rendering and the WebXR frame animation callback - Web APIs
*/ const deltatime = (time - lastframetime) * 0.001; lastframetime = time; for (let view of pose.views) { /* render each view */ } } this maintains a global (or an object property) called lastframetime which contains the previous frame's time of rendering.
Keyframe Formats - Web APIs
if there are insufficient values, or if the list contains null values, the keyframes without specified offsets will be evenly spaced as with the array format described above.
Using the Web Animations API - Web APIs
ange’s animation.effect property, which returns an object containing all the details of the effect(s) active on alice: alicechange.currenttime = alicechange.effect.getcomputedtiming().duration / 2; effect lets us access the animation’s keyframes and timing properties — alicechange.effect.getcomputedtiming() points to alice’s timing object (which is of type computedeffecttiming) — this contains her computedeffecttiming.duration.
Web Audio API best practices - Web APIs
user control if your website or application contains sound, you should allow the user control over it, otherwise again, it will become annoying.
Example and tutorial: Simple synth keyboard - Web APIs
let notefreq = null; let customwaveform = null; let sineterms = null; let cosineterms = null; finally, global variables that will be used when constructing waveforms are created: notefreq will be an array of arrays; each array represents one octave, each of which contains one entry for each note in that octave.
Background audio processing using AudioWorklet - Web APIs
by specification, each block of audio your process() function receives contains 128 frames (that is, 128 samples for each channel), but it is planned that this value will change in the future, and may in fact vary depending on circumstances, so you should always check the array's length rather than assuming a particular size.
Web Authentication API - Web APIs
browser creates final data, application sends response to server - the browser resolves the promise to a publickeycredential with a publickeycredential.response that contains the authenticatorassertionresponse.
Web Workers API - Web APIs
worker()) that runs a named javascript file — this file contains the code that will run in the worker thread; workers run in another global context that is different from the current window.
Window.controllers - Web APIs
by default, a window's controller contains the code that supports the global window commands.
Window.getComputedStyle() - Web APIs
<style> h3::after { content: ' rocks!'; } </style> <h3>generated content</h3> <script> var h3 = document.queryselector('h3'); var result = getcomputedstyle(h3, ':after').content; console.log('the generated content is: ', result); // returns ' rocks!' </script> notes the returned cssstyledeclaration object contains active values for css property longhand names.
window.ondeviceorientation - Web APIs
summary an event handler for the deviceorientation event, which contains information about a relative device orientation change.
Window.open() - Web APIs
WebAPIWindowopen
when window.open() returns, the window always contains about:blank.
Window.openDialog() - Web APIs
WebAPIWindowopenDialog
if the features parameter is a zero-length string, or contains only one or more of the behavior features (chrome, dependent, dialog and modal) the chrome features are assumed "os' choice." that is, window creation code is not given specific instructions, but is instead allowed to select the chrome that best fits a dialog on that operating system.
Window: popstate event - Web APIs
bubbles yes cancelable no interface popstateevent event handler property onpopstate the history stack if the history entry being activated was created by a call to history.pushstate() or was affected by a call to history.replacestate(), the popstate event's state property contains a copy of the history entry's state object.
window.postMessage() - Web APIs
the value of the origin property when the sending window contains a javascript: or data: url is the origin of the script that loaded the url.
Window.prompt() - Web APIs
WebAPIWindowprompt
the above prompt appears as follows (in chrome on os x): notes a prompt dialog contains a single-line textbox, a cancel button, and an ok button, and returns the (possibly empty) text the user entered into that textbox.
window.requestIdleCallback() - Web APIs
options optional contains optional configuration parameters.
Window.resizeBy() - Web APIs
WebAPIWindowresizeBy
creating and resizing an external window for security reasons, it's no longer possible in firefox for a website to change the default size of a window in a browser if the window wasn’t created by window.open(), or contains more than one tab.
WindowEventHandlers.onpopstate - Web APIs
if the activated history entry was created by a call to history.pushstate(), or was affected by a call to history.replacestate(), the popstate event's state property contains a copy of the history entry's state object.
WindowOrWorkerGlobalScope.atob() - Web APIs
syntax var decodeddata = scope.atob(encodeddata); parameters encodeddata a binary string contains an base64 encoded data.
WindowOrWorkerGlobalScope.btoa() - Web APIs
for example: // convert a unicode string to a string in which // each 16-bit unit occupies only one byte function tobinary(string) { const codeunits = new uint16array(string.length); for (let i = 0; i < codeunits.length; i++) { codeunits[i] = string.charcodeat(i); } return string.fromcharcode(...new uint8array(codeunits.buffer)); } // a string that contains characters occupying > 1 byte const mystring = "☸☹☺☻☼☾☿"; const converted = tobinary(mystring); const encoded = btoa(converted); console.log(encoded); // ocy5jjomoyy8jj4mpyy= if you do this, of course you'll have to reverse the conversion on the decoded string: function frombinary(binary) { const bytes = new uint8array(binary.length); for (let i = 0; i < byte...
WindowOrWorkerGlobalScope.fetch() - Web APIs
integrity contains the subresource integrity value of the request (e.g., sha256-bpfbw7ivv8q2jlit13fxdyae2tjllusrsz273h2nfse=).
WorkerGlobalScope - Web APIs
workers have no browsing context; this scope contains the information usually conveyed by window objects — in this case event handlers, the console or the associated workernavigator object.
WritableStream.WritableStream() - Web APIs
the reason parameter contains a domstring describing why the stream was aborted.
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
bug 867872 has been filed to implement this and // contains a documented tcperror.webidl that maps all the error codes we use in // this file to slightly more readable explanations.
XMLHttpRequest.onreadystatechange - Web APIs
the xmlhttprequest.onreadystatechange property contains the event handler to be called when the readystatechange event is fired, that is every time the readystate property of the xmlhttprequest changes.
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().
XMLHttpRequest.responseType - Web APIs
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.
XMLHttpRequest.statusText - Web APIs
unlike xmlhttprequest.status which indicates a numerical status code, this property contains the text of the response status, such as "ok" or "not found".
XPathEvaluator.createExpression() - Web APIs
namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
XPathEvaluator.evaluate() - Web APIs
namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
XPathException.code - Web APIs
the code read-only property of the xpathexception interface returns a short that contains one of the error code constants.
XPathExpression.evaluate() - Web APIs
namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
XRInputSourceEvent() - Web APIs
eventinitdict an object based on the xrinputsourceeventinit dictionary which contains the values to assign to the new event's properties.
XRRenderState - Web APIs
the xrrenderstate interface of the webxr device api contains configurable values which affect how the imagery generated by an xrsession gets composited.
XRRigidTransform.inverse - Web APIs
syntax let transforminverse = xrrigidtransform.inverse; value an xrrigidtransform which contains the inverse of the xrrigidtransform on which it's accessed.
XRRigidTransform.orientation - Web APIs
syntax let orientation = xrrigidtransform.orientation; value a dompointreadonly object which contains a unit quaternion providing the orientation component of the transform.
XRRigidTransform - Web APIs
xrrigidtransform.orientation read only a dompointreadonly which contains a unit quaternion describing the rotational component of the transform.
XRSession.environmentBlendMode - Web APIs
the value is a domstring which contains one of the values defined by the xrenvironmentblendmode enumerated type.
XRSession.onsqueezeend - Web APIs
in response to the end of the squeeze operation, this code looks to see if there is an object currently being held by the user by checking to see if the variable user.heldobject contains a reference to an object representing the held item.
XRSession - Web APIs
WebAPIXRSession
renderstate read only an xrrenderstate object which contains options affecting how the imagery is rendered.
XRSessionEvent() - Web APIs
eventinitdict an object conforming to the xrsessioneventinit dictionary which contains values to be applied to the newly-created event object.
XRWebGLLayerInit.stencil - Web APIs
the stencil buffer is an optional buffer which, just like the depth buffer, contains one entry for every pixel in the frame buffer.
Using the alertdialog role - Accessibility
if an alert dialog only contains static content and has no interactive controls at all, alertdialog is likely not the right role to use here.
Using the aria-activedescendant attribute - Accessibility
description the aria-activedescendant attribute contains the id of the currently active child object that is part of a composite widget within the document object model.
Using the aria-labelledby attribute - Accessibility
note that the region being referenced is the region that contains the header.
Using the aria-relevant attribute - Accessibility
aria-relevant is commonly used when a web page contains content that may be updated while viewing the page.
ARIA: timer role - Accessibility
aria-describedby used to indicate the idref of an element that contains additional instructions for navigating or operating this element.
ARIA: document role - Accessibility
however, when the keyboard focus is set on the starting heading on a single conversation that contains the subject of the conversation, the screen reader user can use the reading mode commands to read through the messages, expand or collapse them, and manipulate them.
ARIA: form role - Accessibility
description a form landmark identifies a region of content that contains a collection of items and objects that, as a whole, combine to create a form when no other named landmark is appropriate (e.g.
ARIA: Main role - Accessibility
if a document contains two main roles, say updating page content when triggered by javascript, the inactive main role's presence should be removed from assistive technology via techniques such as toggling the hidden attribute.
ARIA: dialog role - Accessibility
additionally, if the dialog contains additional descriptive text besides the dialog title, this text can be associated with the dialog using the aria-describedby attribute.
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
if you’re using a screen reader, have you noticed that, when you go to this setting in firefox, it tells you “delete history after 21 days”?, followed by the announcement that you’re in a textbox, and that it contains the number 21.
Alerts - Accessibility
in order to simplify this example, we’ll check whether the e-mail address contains the “@” symbol, and if the name entry contains at least 1 character.
Architecture - Accessibility
example take the following html code: <div>hello<a href="http://www.mozilla.org/access">my link<img src="image.gif">is cool</a>bye</div> both the <a> and <img> are hyperlinks also, both the <div> and <a> are hypertexts so the <a> is both a hypertext and a hyperlink, because it contains text and is contained within text.
Cognitive accessibility - Accessibility
people who read slowly and people with limited short-term memory benefit when section titles make it possible to predict what each section contains.
HTML To MSAA - Accessibility
te checkable state_system_ checked if checked property of dom element returns true n/a "select" event_object_ statechange when state is changed label role_system_ statictext from child nodes n/a n/a n/a n/a n/a legend role_system_ statictext n/a n/a n/a label_for (0x1002), points to caption element n/a n/a li and others role_system_ listitem n/a n/a state_system_ readonly n/a n/a n/a contains child accessible for list bullet ol, ul and others role_system_ list n/a n/a state_system_ readonly n/a n/a n/a optgroup bstr role n/a n/a n/a n/a n/a n/a option role_system_ listitem from @label attribute, from child text nodes n/a state_system_ selected if option is selected n/a "select" event_object_ selectionwithin event_object_ selectionadd if selected event_object_ selectionremov...
Accessibility Information for Web Authors - Accessibility
two panes are added at the bottom of the view source code window: the left pane contains the errors and warnings (with their correspondent line number) and the right pane identifies the checkpoint along with an example and a clickable link to the reference/guideline.
Web Accessibility: Understanding Colors and Luminance - Accessibility
according to wikipedia's page on "shades of red", the color "carmine" is a saturated red in which, in its pigment form, mostly contains the red light with wavelengths longer than 600nm; the article makes the special note that "carmine" is close to the extreme spectrum.
Perceivable - Accessibility
1.2.4 provide captions for live audio (aa) you should provide synchronized captions for all live multimedia that contains audio (e.g., video conferences, live audio broadcasts).
Accessibility
when the web meets this goal, it is accessible to people with a diverse range of hearing, movement, sight, and cognitive ability." (w3c - accessibility) key tutorials the mdn accessibility learning area contains modern, up-to-date tutorials covering accessibility essentials: what is accessibility?
-webkit-mask-attachment - CSS: Cascading Style Sheets
achment: fixed; -webkit-mask-attachment: local; /* multiple values */ -webkit-mask-attachment: scroll, local; -webkit-mask-attachment: fixed, local, scroll; /* global values */ -webkit-mask-attachment: inherit; -webkit-mask-attachment: initial; -webkit-mask-attachment: unset; syntax values scroll if scroll is specified, the mask image scrolls within the viewport along with the block that contains the mask image.
:-moz-only-whitespace - CSS: Cascading Style Sheets
the :-moz-only-whitespace css pseudo-class matches elements that only contains text nodes that only contain whitespace.
::marker - CSS: Cascading Style Sheets
WebCSS::marker
the ::marker css pseudo-element selects the marker box of a list item, which typically contains a bullet or number.
:active - CSS: Cascading Style Sheets
WebCSS:active
syntax :active examples active links html <p>this paragraph contains a link: <a href="#">this link will turn red while you click on it.</a> the paragraph will get a gray background while you click on it or the link.
:empty - CSS: Cascading Style Sheets
WebCSS:empty
/* selects any <div> that contains no content */ div:empty { background: lime; } syntax :empty examples html <div class="box"><!-- i will be lime.
:focus-within - CSS: Cascading Style Sheets
the :focus-within css pseudo-class represents an element that has received focus or contains an element that has received focus.
:focus - CSS: Cascading Style Sheets
WebCSS:focus
use :focus-within if you want to select an element that contains a focused element.
:optional - CSS: Cascading Style Sheets
WebCSS:optional
accessibility concerns if a form contains optional <input>s, required inputs should be indicated using the required attribute.
:required - CSS: Cascading Style Sheets
WebCSS:required
if the form also contains optional inputs, required inputs should be indicated visually using a treatment that does not rely solely on color to convey meaning.
:valid - CSS: Cascading Style Sheets
WebCSS:valid
the email input on the other hand is valid when empty, as it is not required, but invalid when it contains something that is not a proper email address.
range - CSS: Cascading Style Sheets
a range is inclusive, that means it always contains both, the lower and upper bound numbers.
font-variation-settings - CSS: Cascading Style Sheets
if the <string> has more or fewer characters or contains characters outside the u+20 - u+7e codepoint range, the whole property is invalid.
src - CSS: Cascading Style Sheets
WebCSS@font-facesrc
the format hint contains a comma-separated list of format strings that denote well-known font formats.
@keyframes - CSS: Cascading Style Sheets
each @keyframes rule contains a style list of keyframe selectors, which specify percentages along the animation when the keyframe occurs, and a block containing the styles for that keyframe.
@viewport - CSS: Cascading Style Sheets
WebCSS@viewport
@viewport { width: 100vw; /*sets the width of the actual viewport to the device width*/ } note: the use of <meta name="viewport"> tag overrides @viewport syntax the at-rule contains a set of nested descriptors in a css block that is delimited by curly braces.
Detecting CSS animation support - CSS: Cascading Style Sheets
this variable, once constructed, contains the complete description of all the keyframes needed by our animation sequence.
Introduction to the CSS basic box model - CSS: Cascading Style Sheets
the content area, bounded by the content edge, contains the "real" content of the element, such as text, an image, or a video player.
Mastering margin collapsing - CSS: Cascading Style Sheets
examples html <p>the bottom margin of this paragraph is collapsed …</p> <p>… with the top margin of this paragraph, yielding a margin of <code>1.2rem</code> in between.</p> <div>this parent element contains two paragraphs!
Using feature queries - CSS: Cascading Style Sheets
syntax css feature queries are part of the css conditional rules module, which also contains the media query @media rule; when you use feature queries, you will find they behave in a similar way to media queries.
Basic concepts of flexbox - CSS: Cascading Style Sheets
the live sample below contains items that have been given a width, the total width of the items being too wide for the flex container.
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
flexbox and other layout methods the flexbox specification contains a definition of what happens if an item uses another layout method and then becomes a flex item.
Block and inline layout in normal flow - CSS: Cascading Style Sheets
the rectangular area that contains the boxes that form a line is called a line box.” - 9.4.2 note that the css 2.1 specification describes documents as being in a horizontal, top to bottom writing mode.
Flow Layout and Overflow - CSS: Cascading Style Sheets
using a value of scroll contains the content in its box and add scrollbars to enable viewing it.
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
this is shown in the next example where the box which displays as horizontal-tb contains a float which is contained due to its parent establishing a new bfc.
In Flow and Out of Flow - CSS: Cascading Style Sheets
in the following example i have a heading, paragraph, a list and a final paragraph which contains a strong element.
Introduction to formatting contexts - CSS: Cascading Style Sheets
a bfc contains everything inside it, float and clear only apply to items inside the same formatting context, and margins only collapse between elements in the same formatting context.
Variable fonts guide - CSS: Cascading Style Sheets
to/font/file/myvariablefont.woff2' format('woff2-variations'); font-weight: 125 950; font-stretch: 75% 125%; font-style: oblique 0deg 20deg; } note: there is no set specific value for the upper-end degree measurement in this case; they simply indicate that there is an axis so the browser can know to render upright or italic (remember that italics are only on or off) example for a font that contains only italics and no upright characters: @font-face { font-family: 'myvariablefontname'; src: 'path/to/font/file/myvariablefont.woff2' format('woff2-variations'); font-weight: 125 950; font-stretch: 75% 125%; font-style: italic; } example for a font that contains an oblique (slant) axis: @font-face { font-family: 'myvariablefontname'; src: 'path/to/font/file/myvariablefont.woff2' format(...
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
for some things, for example, where a grid contains text content, this switching may be exactly what you want.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
each item contains a heading, some text of varying height, and a call to action link.
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
it contains three nested items.
Logical properties for floating and positioning - CSS: Cascading Style Sheets
the logical properties and values specification contains logical mappings for the physical values of float and clear, and also for the positioning properties used with positioned layout.
CSS Overflow - CSS: Cascading Style Sheets
the css overflow module contains the features of css relating to scrollable overflow handling in visual media.
Using the :target pseudo-class in selectors - CSS: Cascading Style Sheets
for example, the url http://developer.mozilla.org/en/docs/using_the_:target_selector#example contains the fragment identifier #example.
Viewport concepts - CSS: Cascading Style Sheets
the web contains two viewports, the layout viewport and the visual viewport.
animation - CSS: Cascading Style Sheets
WebCSSanimation
ation = array.from(document.queryselectorall('.animation')); var button = array.from(document.queryselectorall('button')); function togglebutton (btn, type) { btn.classlist.remove('play', 'pause', 'restart'); btn.classlist.add(type); btn.title = type.touppercase(type); } function playpause (i) { var btn = button[i]; var anim = animation[i]; if (btn.classlist.contains('play')) { anim.style.animationplaystate = 'running'; togglebutton(btn, 'pause'); } else if (btn.classlist.contains('pause')) { anim.style.animationplaystate = 'paused'; togglebutton(btn, 'play'); } else { anim.classlist.remove('a' + (i + 1)); settimeout(function () { togglebutton(btn, i === 0 ?
attr() - CSS: Cascading Style Sheets
WebCSSattr
<fallback> the value to be used if the associated attribute is missing or contains an invalid value.
background-image - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
background - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
border-image - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
box-decoration-break - CSS: Cascading Style Sheets
formal definition initial valuesliceapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax slice | clone examples inline box fragments an inline element that contains line breaks styled with: .example { background: linear-gradient(to bottom right, yellow, green); box-shadow: 8px 8px 10px 0px deeppink, -5px -5px 5px 0px blue, 5px 5px 15px 0px yellow; padding: 0em 1em; border-radius: 16px; border-style: solid; margin-left: 10px; font: 24px sans-serif; line-height: 2; } ...
box-flex - CSS: Cascading Style Sheets
WebCSSbox-flex
the -moz-box-flex and -webkit-box-flex css properties specify how a -moz-box or -webkit-box grows to fill the box that contains it, in the direction of the containing box's layout.
box-lines - CSS: Cascading Style Sheets
WebCSSbox-lines
if a line contains only a single element that doesn't fit, then the element should stay on that line and overflow out of the box.
break-after - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region examples breaking into neat columns in the following example we have a container that contains an <h1> spanning all columns (achieved using column-span: all) and a series of <h2>s and paragraphs laid out in multiple columns using column-width: 200px.
break-before - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region examples breaking into neat columns in the following example we have a container that contains an <h1> spanning all columns (achieved using column-span: all) and a series of <h2>s and paragraphs laid out in multiple columns using column-width: 200px.
break-inside - CSS: Cascading Style Sheets
ows: page-break-inside break-inside auto auto avoid avoid formal definition initial valueautoapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid | avoid-page | avoid-column | avoid-region examples avoiding breaking inside a figure in the following example we have a container that contains an <h1> spanning all columns (achieved using column-span: all) and a series of paragraphs laid out in multiple columns using column-width: 200px.
conic-gradient() - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
cross-fade() - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
it contains everything inside the inline-level box.
<display-inside> - CSS: Cascading Style Sheets
examples in this example the parent box has been given display: flow-root and so establishes a new bfc and contains the floated item.
<display-outside> - CSS: Cascading Style Sheets
that is: if the run-in box contains a block box, same as block.
display - CSS: Cascading Style Sheets
WebCSSdisplay
that is: if the run-in box contains a block box, same as block.
font-feature-settings - CSS: Cascading Style Sheets
if it has more or less characters, or if it contains characters outside the u+20 – u+7e codepoint range, the whole property is invalid.
font-variation-settings - CSS: Cascading Style Sheets
if the <string> has more or fewer characters or contains characters outside the u+20 - u+7e codepoint range, the whole property is invalid.
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
<image> - CSS: Cascading Style Sheets
WebCSSimage
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
image() - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
page-break-inside - CSS: Cascading Style Sheets
rmal syntax auto | avoid examples avoiding page breaks inside elements html <div class="page"> <p>this is the first paragraph.</p> <section class="list"> <span>a list</span> <ol> <li>one</li> <!-- <li>two</li> --> </ol> </section> <ul> <li>one</li> <!-- <li>two</li> --> </ul> <p>this is the second paragraph.</p> <p>this is the third paragraph, it contains more text.</p> <p>this is the fourth paragraph.
perspective - CSS: Cascading Style Sheets
also, in that case, the object will act as a containing block for position: fixed elements that it contains.
repeating-conic-gradient() - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
resize - CSS: Cascading Style Sheets
WebCSSresize
in the example below, a resizable <div> contains a resizable paragraph (<p> element).
<resolution> - CSS: Cascading Style Sheets
screens typically contains 72 or 96 dots per inch, but the dpi for printed documents is usually much greater.
text-transform - CSS: Cascading Style Sheets
the capitalize line in the browser compatibility table contains the version the different engines started to support this now precisely-defined behavior.
transform - CSS: Cascading Style Sheets
WebCSStransform
in that case, the element will act as a containing block for any position: fixed; or position: absolute; elements that it contains.
unicode-bidi - CSS: Cascading Style Sheets
for example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex unicode algorithm to decide how to display the text.
CSS: Cascading Style Sheets
WebCSS
css tutorials our css learning area contains a wealth of tutorials to take you from beginner level to proficiency, covering all the fundamentals.
WAI ARIA Live Regions/API Support - Developer guides
firefox 3 contains important improvements to the way the mozilla engine exposes live changes in a document.
Cross-browser audio basics - Developer guides
src contains the path to the audio file to be loaded (relative or absolute).
Live streaming web audio and video - Developer guides
this contains the metadata for the various sub-streams that are provided.
Creating a cross-browser video player - Developer guides
interestingly document must be used for exiting/cancelling fullscreen mode, whereas any html element can request fullscreen mode, here the videocontainer is used as it also contains the custom controls which should also appear with the video in fullscreen mode.
DOM onevent handlers - Developer guides
note that the event parameter actually contains the error message as a string.
Overview of events and handlers - Developer guides
the web api documentation contains a page defining the event object which also includes the known dom event subclasses of the event object.
Rich-Text Editing in Mozilla - Developer guides
html: <body onload="load()"> javascript: function load(){ getiframedocument("editorwindow").designmode = "on"; } function getiframedocument(aid){ // if contentdocument exists, w3c compliant (mozilla) if (document.getelementbyid(aid).contentdocument){ return document.getelementbyid(aid).contentdocument; } else { // ie return document.frames[aid].document; } } the example contains a doricheditcommand function that makes it easier to execute commands on the iframe's document and keeps the html code clean.
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
--> in contrast, the following code contains two scripts with unbalanced sub-trees, which causes speculative parsing to fail and therefore the time to parse the document is longer.
Introduction to HTML5 - Developer guides
declaring that the document contains html5 mark-up with the html5 doctype the doctype for html5 is very simple.
Index - Developer guides
WebGuideIndex
5 wai aria live regions/api support ajax, accessibility firefox 3 contains important improvements to the way the mozilla engine exposes live changes in a document.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
html the html here creates a box that contains a color picker control (with a label created using the <label> element) and an empty paragraph element (<p>) into which we'll output some text from our javascript code.
DASH Adaptive Streaming for HTML 5 Video - HTML: Hypertext Markup Language
the -adaptation_sets argument assigns them into adaptation sets; for example, this creates one set (0) that contains the streams 0, 1, 2 and 3 (the videos), and another set (1) that contains only stream 4, the audio stream.
Date and time formats used in HTML - HTML: Hypertext Markup Language
for <input>, the values of type that return a value which contains a string representing a date and/or time are: date datetime datetime-local month time week examples before getting into the intricacies of how date and time strings are written and parsed in html, here are some examples that should give you a good idea what the more commonly-used date and time string formats look like.
<area> - HTML: Hypertext Markup Language
WebHTMLElementarea
ping contains a space-separated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the browser (in the background).
<basefont> - HTML: Hypertext Markup Language
WebHTMLElementbasefont
face this attribute contains a list of one or more font names.
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
the html bidirectional isolate element (<bdi>) tells the browser's bidirectional algorithm to treat the text it contains in isolation from its surrounding text.
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
use when the form contains information that shouldn’t be public, like login credentials.
<caption>: The Table Caption element - HTML: Hypertext Markup Language
WebHTMLElementcaption
when the <table> element that contains the <caption> is the only descendant of a <figure> element, you should use the <figcaption> element instead of <caption>.
<col> - HTML: Hypertext Markup Language
WebHTMLElementcol
span this attribute contains a positive integer indicating the number of consecutive columns the <col> element spans.
<colgroup> - HTML: Hypertext Markup Language
WebHTMLElementcolgroup
span this attribute contains a positive integer indicating the number of consecutive columns the <colgroup> element spans.
<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.
<dfn>: The Definition element - HTML: Hypertext Markup Language
WebHTMLElementdfn
if the <dfn> contains a single child element and does not have any text content of its own, and the child element is an <abbr> element with a title attribute itself, then the exact value of the <abbr> element's title is the term being defined.
<dialog>: The Dialog element - HTML: Hypertext Markup Language
WebHTMLElementdialog
examples simple example <dialog open> <p>greetings, one and all!</p> </dialog> advanced example this example opens a pop-up dialog box that contains a form, when the "update details" button is clicked.
<font> - HTML: Hypertext Markup Language
WebHTMLElementfont
face this attribute contains a comma-separated list of one or more font names.
<footer> - HTML: Hypertext Markup Language
WebHTMLElementfooter
a footer typically contains information about the author of the section, copyright data or links to related documents.
<form> - HTML: Hypertext Markup Language
WebHTMLElementform
multipart/form-data: use this if the form contains <input> elements with type=file.
<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.
<input type="button"> - HTML: Hypertext Markup Language
WebHTMLElementinputbutton
value a domstring used as the button's label events click supported common attributes type, and value idl attributes value methods none value an <input type="button"> elements' value attribute contains a domstring that is used as the button's label.
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
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.
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
bel> <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 value of the input field ...
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
representing a password, or empty events change and input supported common attributes autocomplete, inputmode, maxlength, minlength, pattern, placeholder, readonly, required, and size idl attributes selectionstart, selectionend, selectiondirection, and value methods select(), setrangetext(), and setselectionrange() value the value attribute contains a domstring whose value is the current contents of the text editing control being used to enter the password.
<input type="reset"> - HTML: Hypertext Markup Language
WebHTMLElementinputreset
value a domstring used as the button's label events click supported common attributes type and value idl attributes value methods none value an <input type="reset"> element's value attribute contains a domstring that is used as the button's label.
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
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 interfa...
<nobr>: The Non-Breaking Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementnobr
the non-standard, obsolete html <nobr> element prevents the text it contains from automatically wrapping across multiple lines, potentially resulting in the user having to scroll horizontally to see the entire width of the text.
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
the html <picture> element contains zero or more <source> elements and one <img> element to offer alternative versions of an image for different display/device scenarios.
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
WebHTMLElementrp
one <rp> element should enclose each of the opening and closing parentheses that wrap the <rt> element that contains the annotation's text.
<script>: The Script element - HTML: Hypertext Markup Language
WebHTMLElementscript
integrity this attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation.
<tbody>: The Table Body element - HTML: Hypertext Markup Language
WebHTMLElementtbody
<tr> <td>3971244</td> <td>nim, victor</td> </tr> </tbody> <tbody> <tr> <th colspan="2">astrophysics</th> </tr> <tr> <td>4100332</td> <td>petrov, alexandra</td> </tr> <tr> <td>8892377</td> <td>toyota, hiroko</td> </tr> </tbody> </table> notice that each major is placed in a separate <tbody> block, the first row of which contains a single <th> element with a colspan attribute that spans the entire width of the table.
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
having a second row of <th> elements that contains only the "joined" and "canceled" headings.
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
if the attribute contains an invalid value, it will use metadata (versions of chrome earlier than 52 treated an invalid value as subtitles).
<ul>: The Unordered List element - HTML: Hypertext Markup Language
WebHTMLElementul
--> <ul> <li>second item second subitem first sub-subitem</li> <li>second item second subitem second sub-subitem</li> <li>second item second subitem third sub-subitem</li> </ul> </li> <!-- closing </li> tag for the li that contains the third unordered list --> <li>second item third subitem</li> </ul> <!-- here is the closing </li> tag --> </li> <li>third item</li> </ul> the above html will output: ordered list inside unordered list <ul> <li>first item</li> <li>second item <!-- look, the closing </li> tag is not placed here!
itemprop - HTML: Hypertext Markup Language
one not defined in a public specification), or if the item is not a typed item it must be: a string that contains no "." (u+002e full stop) characters and no ":" characters (u+003a colon) and is used as a proprietary item property name (again, one not defined in a public specification).
lang - HTML: Hypertext Markup Language
the attribute contains a single “language tag” in the format defined in tags for identifying languages (bcp47).
part - HTML: Hypertext Markup Language
the part global attribute contains a space-separated list of the part names of the element.
style - HTML: Hypertext Markup Language
the style global attribute contains css styling declarations to be applied to the element.
title - HTML: Hypertext Markup Language
the title global attribute contains text representing advisory information related to the element it belongs to.
Inline elements - HTML: Hypertext Markup Language
, some simple css that we'll be using: .highlight { background-color:#ee3; } inline let's look at the following example which demonstrates an inline element: <div>the following span is an <span class="highlight">inline element</span>; its background has been colored to display both the beginning and end of the inline element's influence.</div> in this example, the <div> block-level element contains some text.
Preloading content with rel="preload" - HTML: Hypertext Markup Language
including a mime type <link> elements can accept a type attribute, which contains the mime type of the resource the element points to.
Microformats - HTML: Hypertext Markup Language
for example if they wanted to identify themselves they could use an h-card such as: html example <a class="h-card" href="http://alice.example.com">alice blogger</a> when a parser encounters this data, it will know that this page contains a "card" which describes a person or organization named alice blogger with a url of http://alice.example.com/.
HTTP authentication - HTTP
in the case of proxies, the challenging status code is 407 (proxy authentication required), the proxy-authenticate response header contains at least one challenge applicable to the proxy, and the proxy-authorization request header is used for providing the credentials to the proxy server.
Resource URLs - HTTP
resources that have to be exposed to web content have been moved to a new location named resource://content-accessible/, which is isolated and only contains non-sensitive resources.
Browser detection using the user agent - HTTP
; addeventlistener("orientationchange", function(){ orientationchanged = true; }, passive_listener_option); addeventlistener("resize", settimeout.bind(0,function(){ if (orientationchanged && !mediaqueryupdated) for (var i=0,len=mql.length|0; i<len; i=i+1|0) mql[i][1]( mql[i][0] ); mediaqueryupdated = orientationchanged = false; },0)); which part of the user agent contains the information you are looking for?
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
er: apache/2 access-control-allow-origin: https://foo.example access-control-allow-credentials: true cache-control: no-cache pragma: no-cache set-cookie: pageaccess=3; expires=wed, 31-dec-2008 01:34:53 gmt vary: accept-encoding, origin content-encoding: gzip content-length: 106 keep-alive: timeout=2, max=100 connection: keep-alive content-type: text/plain [text/plain payload] although line 10 contains the cookie destined for the content on http://bar.other, if bar.other did not respond with an access-control-allow-credentials: true (line 17) the response would be ignored and not made available to web content.
Content Security Policy (CSP) - HTTP
WebHTTPCSP
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.
Configuring servers for Ogg media - HTTP
if you don't know whether the ogg file contains audio or video, you can serve it with the mime type application/ogg, and the browser will treat it as a video file.
Age - HTTP
WebHTTPHeadersAge
the age header contains the time in seconds the object has been in a proxy cache.
Authorization - HTTP
the http authorization request header contains the credentials to authenticate a user agent with a server, usually, but not necessarily, after the server has responded with a 401 unauthorized status and the www-authenticate header.
Connection - HTTP
chrome and firefox ignore them in http/2 responses, but safari conforms to the http/2 spec requirements and won’t load any response which contains them.
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
even though the second policy would allow the connection, the first policy contains connect-src 'none'.
Cookie - HTTP
WebHTTPHeadersCookie
the cookie http request header contains stored http cookies previously sent by the server with the set-cookie header.
Date - HTTP
WebHTTPHeadersDate
the date general http header contains the date and time at which the message was originated.
Expires - HTTP
WebHTTPHeadersExpires
the expires header contains the date/time after which the response is considered stale.
Forwarded - HTTP
the forwarded header contains information from the reverse proxy servers that is altered or lost when a proxy is involved in the path of the request.
From - HTTP
WebHTTPHeadersFrom
the from request header contains an internet email address for a human user who controls the requesting user agent.
Host - HTTP
WebHTTPHeadersHost
a 400 (bad request) status code may be sent to any http/1.1 request message that lacks a host header field or that contains more than one.
Keep-Alive - HTTP
chrome and firefox ignore them in http/2 responses, but safari conforms to the http/2 spec requirements and won’t load any response which contains them.
Last-Modified - HTTP
the last-modified response http header contains the date and time at which the origin server believes the resource was last modified.
Link - HTTP
WebHTTPHeadersLink
parameters the link header contains parameters, which are separated with ; and are equivalent to attributes of the <link> element.
Proxy-Authorization - HTTP
the http proxy-authorization request header contains the credentials to authenticate a user agent to a proxy server, usually after the server has responded with a 407 proxy authentication required status and the proxy-authenticate header.
Referer - HTTP
WebHTTPHeadersReferer
the referer request header contains the address of the previous web page from which a link to the currently requested page was followed.
User-Agent - HTTP
it contains the word "mobile".
WWW-Authenticate - HTTP
examples typically, a server response contains a www-authenticate header that looks like these: www-authenticate: basic www-authenticate: basic realm="access to the staging site", charset="utf-8" see also http authentication for examples on how to configure apache or nginx servers to password protect your site with http basic authentication.
Want-Digest - HTTP
the header contains identifiers for one or more digest algorithms that the sender wishes the responder to use to create the digest.
Warning - HTTP
WebHTTPHeadersWarning
the warning general http header contains information about possible problems with the status of the message.
Link prefetching FAQ - HTTP
if a subframe contains prefetching hints, prefetching will not begin until the top-most frame and all its "child" frames finish loading.
HTTP Messages - HTTP
WebHTTPMessages
http responses status line the start line of an http response, called the status line, contains the following information: the protocol version, usually http/1.1.
OPTIONS - HTTP
WebHTTPMethodsOPTIONS
safe yes idempotent yes cacheable no allowed in html forms no syntax options /index.html http/1.1 options * http/1.1 examples identifying allowed request methods to find out which request methods a server supports, one can use the curl command-line program to issue an options request: curl -x options https://example.org -i the response then contains an allow header that holds the allowed methods: http/1.1 204 no content allow: options, get, head, post cache-control: max-age=604800 date: thu, 13 oct 2016 11:45:00 gmt server: eos (lax004/2813) preflighted requests in cors in cors, a preflight request is sent with the options method so that the server can respond if it is acceptable to send the request.
Network Error Logging - HTTP
the top-level "body" key contains the network error report.
Proxy servers and tunneling - HTTP
a common way to disclose this information is by using the following http headers: the standardized header: forwarded contains information from the client-facing side of proxy servers that is altered or lost when a proxy is involved in the path of the request.
HTTP range requests - HTTP
each part contains its own content-type and content-range fields and the required boundary parameter specifies the boundary string used to separate each body-part.
200 OK - HTTP
WebHTTPStatus200
trace: the message body contains the request message as received by the server.
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.
401 Unauthorized - HTTP
WebHTTPStatus401
this status is sent with a www-authenticate header that contains information on how to authorize correctly.
407 Proxy Authentication Required - HTTP
WebHTTPStatus407
this status is sent with a proxy-authenticate header that contains information on how to authorize correctly.
416 Range Not Satisfiable - HTTP
WebHTTPStatus416
the 416 response message contains a content-range indicating an unsatisfied range (that is a '*') followed by a '/' and the current length of the resource.
451 Unavailable For Legal Reasons - HTTP
WebHTTPStatus451
status 451 unavailable for legal reasons example this example response is taken from the ietf rfc (see below) and contains a reference to monty python's life of brian.
510 Not Extended - HTTP
WebHTTPStatus510
in that specification a client may send a request that contains an extension declaration, that describes the extension to be used.
HTTP response status codes - HTTP
WebHTTPStatus
trace: the message body contains the request message as received by the server 201 created the request has succeeded and a new resource has been created as a result.
CSS Houdini
<script> css.paintworklet.addmodule('csscomponent.js'); </script> this added module contains registerpaint() functions, which register completely configurable worklets.
Closures - JavaScript
the lexical environment contains two private items: a variable called privatecounter, and a function called changeby.
JavaScript data types and data structures - JavaScript
undefined [[set]] function object or undefined the function is called with an argument that contains the assigned value and is executed whenever a specified property is attempted to be changed.
Introduction - JavaScript
javascript contains a standard library of objects, such as array, date, and math, and a core set of language elements such as operators, control structures, and statements.
Meta programming - JavaScript
handler placeholder object which contains traps.
Numbers and dates - JavaScript
ar endyear = new date(1995, 11, 31, 23, 59, 59, 999); // set day and month endyear.setfullyear(today.getfullyear()); // set year to this year var msperday = 24 * 60 * 60 * 1000; // number of milliseconds per day var daysleft = (endyear.gettime() - today.gettime()) / msperday; var daysleft = math.round(daysleft); //returns days left in the year this example creates a date object named today that contains today's date.
Assertions - JavaScript
let fruitsstartswithnota = fruits.filter(fruit => /^[^a]/.test(fruit)); console.log(fruitsstartswithnota); // [ 'watermelon', 'orange', 'strawberry' ] matching a word boundary let fruitswithdescription = ["red apple", "orange orange", "green avocado"]; // select descriptions that contains 'en' or 'ed' words endings: let enedselection = fruitswithdescription.filter(descr => /(en|ed)\b/.test(descr)); console.log(enedselection); // [ 'red apple', 'green avocado' ] lookahead assertion // js lookahead assertion x(?=y) let regex = /first(?= test)/g; console.log('first test'.match(regex)); // [ 'first' ] console.log('first peach'.match(regex)); // null console.log('this is a first t...
Character classes - JavaScript
the "basic multilingual plane" of unicode contains most of the characters used around the world and we can use character classes and ranges to match words written with those characters.
Regular expressions - JavaScript
there is no match in the string "grab crab" because while it contains the substring "ab c", it does not contain the exact substring "abc".
Text formatting - JavaScript
startswith, endswith, includes returns whether or not the string starts, ends or contains a specified string.
Using Promises - JavaScript
if saysomething() fails or contains a programming error, nothing catches it.
JavaScript technologies overview - JavaScript
however, the umbrella term "javascript" as understood in a web browser context contains several very different elements.
Classes - JavaScript
a syntaxerror will be thrown if the class contains more than one occurrence of a constructor method.
URIError: malformed URI sequence - JavaScript
message urierror: the uri to be encoded contains invalid character (edge) urierror: malformed uri sequence (firefox) urierror: uri malformed (chrome) error type urierror what went wrong?
arguments.callee - JavaScript
the arguments.callee property contains the currently executing function.
arguments.length - JavaScript
the arguments.length property contains the number of arguments passed to the function.
Array.prototype[@@unscopables] - JavaScript
the @@unscopable symbol property contains property names that were not included in the ecmascript standard prior to the es2015 version.
Array.prototype.concat() - JavaScript
the concat method does not alter this or any of the arrays provided as arguments but instead returns a shallow copy that contains copies of the same elements combined from the original arrays.
Array.prototype.entries() - JavaScript
the entries() method returns a new array iterator object that contains the key/value pairs for each index in the array.
Array.prototype.keys() - JavaScript
the keys() method returns a new array iterator object that contains the keys for each index in the array.
Array.prototype.length - JavaScript
when you extend an array by changing its length property, the number of actual elements increases; for example, if you set length to 3 when it is currently 2, the array now contains 3 elements, which causes the third element to be a non-iterable empty slot.
Array.prototype.map() - JavaScript
mapped array contains undefined when undefined or nothing is returned: let numbers = [1, 2, 3, 4] let filterednumbers = numbers.map(function(num, index) { if (index < 3) { return num } }) // index goes from 0, so the filternumbers are 1,2,3 and undefined.
Array.prototype.push() - JavaScript
the total variable contains the new length of the array.
Array.prototype.slice() - JavaScript
examples return a portion of an existing array let fruits = ['banana', 'orange', 'lemon', 'apple', 'mango'] let citrus = fruits.slice(1, 3) // fruits contains ['banana', 'orange', 'lemon', 'apple', 'mango'] // citrus contains ['orange','lemon'] using slice> in the following example, slice creates a new array, newcar, from mycar.
Array.prototype.values() - JavaScript
the values() method returns a new array iterator object that contains the values for each index in the array.
ArrayBuffer.prototype.slice() - JavaScript
if end is unspecified, the new arraybuffer contains all bytes from begin to the end of this arraybuffer.
Atomics.wait() - JavaScript
the static atomics.wait() method verifies that a given position in an int32array still contains a given value and if so sleeps, awaiting a wakeup or a timeout.
Atomics - JavaScript
atomics.wait() verifies that the specified index of the array still contains a value and sleeps awaiting or times out.
Error.prototype.columnNumber - JavaScript
the columnnumber property contains the column number in the line of the file that raised this error.
Error.prototype.lineNumber - JavaScript
the linenumber property contains the line number in the file that raised this error.
Error.prototype.message - JavaScript
description this property contains a brief description of the error if one is available or has been set.
Intl​.List​Format​.prototype​.formatToParts() - JavaScript
return value an array of components which contains the formatted parts from the list.
Intl.Locale() constructor - JavaScript
options an object that contains configuration for the locale.
JSON.stringify() - JavaScript
}); // converting the json string with json.stringify() // then saving with localstorage in the name of session localstorage.setitem('session', json.stringify(session)); // example of how to transform the string generated through // json.stringify() and saved in localstorage in json object again var restoredsession = json.parse(localstorage.getitem('session')); // now restoredsession variable contains the object that was saved // in localstorage console.log(restoredsession); well-formed json.stringify() engines implementing the well-formed json.stringify specification will stringify lone surrogates, any code point from u+d800 to u+dfff, using unicode escape sequences rather than literally.
JSON - JavaScript
the json object contains methods for parsing javascript object notation (json) and converting values to json.
Map.prototype.entries() - JavaScript
the entries() method returns a new iterator object that contains the [key, value] pairs for each element in the map object in insertion order.
Map.prototype.keys() - JavaScript
the keys() method returns a new iterator object that contains the keys for each element in the map object in insertion order.
Map.prototype.values() - JavaScript
the values() method returns a new iterator object that contains the values for each element in the map object in insertion order.
Number - JavaScript
the number constructor contains constants and methods for working with numbers.
Object.freeze() - JavaScript
use the pattern on a case-by-case basis based on your design when you know the object contains no cycles in the reference graph, otherwise an endless loop will be triggered.
Object.prototype.hasOwnProperty() - JavaScript
o = new object(); o.propone = null; o.hasownproperty('propone'); // returns true o.proptwo = undefined; o.hasownproperty('proptwo'); // returns true examples using hasownproperty to test for a property's existence the following example determines whether the o object contains a property named prop: o = new object(); o.hasownproperty('prop'); // returns false o.prop = 'exists'; o.hasownproperty('prop'); // returns true direct vs.
Object - JavaScript
object.prototype.hasownproperty() returns a boolean indicating whether an object contains the specified property as a direct property of that object and not inherited through the prototype chain.
Promise - JavaScript
states and fates contains more details about promise terminology.
RegExp() constructor - JavaScript
flags if specified, flags is a string that contains the flags to add.
RegExp.input ($_) - JavaScript
the non-standard input property is a static property of regular expressions that contains the string against which a regular expression is matched.
RegExp.lastMatch ($&) - JavaScript
the non-standard lastmatch property is a static and read-only property of regular expressions that contains the last matched characters.
RegExp.lastParen ($+) - JavaScript
the non-standard lastparen property is a static and read-only property of regular expressions that contains the last parenthesized substring match, if any.
RegExp.leftContext ($`) - JavaScript
the non-standard leftcontext property is a static and read-only property of regular expressions that contains the substring preceding the most recent match.
RegExp.rightContext ($') - JavaScript
the non-standard rightcontext property is a static and read-only property of regular expressions that contains the substring following the most recent match.
RegExp.prototype.test() - JavaScript
const str = 'hello world!'; const result = /^hello/.test(str); console.log(result); // true the following example logs a message which depends on the success of the test: function testinput(re, str) { let midstring; if (re.test(str)) { midstring = 'contains'; } else { midstring = 'does not contain'; } console.log(`${str} ${midstring} ${re.source}`); } using test() on a regex with the "global" flag when a regex has the global flag set, test() will advance the lastindex of the regex.
RegExp - JavaScript
instance properties regexp.prototype.flags a string that contains the flags of the regexp object.
Set.prototype.has() - JavaScript
examples using the has method var myset = new set(); myset.add('foo'); myset.has('foo'); // returns true myset.has('bar'); // returns false var set1 = new set(); var obj1 = {'key1': 1}; set1.add(obj1); set1.has(obj1); // returns true set1.has({'key1': 1}); // returns false because they are different object references set1.add({'key1': 1}); // now set1 contains 2 entries specifications specification ecmascript (ecma-262)the definition of 'set.prototype.has' in that specification.
Set.prototype.values() - JavaScript
the values() method returns a new iterator object that contains the values for each element in the set object in insertion order.
Set - JavaScript
(for sets, this is the same as the keys() method.) set.prototype.entries() returns a new iterator object that contains an array of [value, value] for each element in the set object, in insertion order.
String.prototype.charAt() - JavaScript
g: the character at index 0 is 'b' the character at index 0 is 'b' the character at index 1 is 'r' the character at index 2 is 'a' the character at index 3 is 'v' the character at index 4 is 'e' the character at index 999 is '' getting whole characters the following provides a means of ensuring that going through a string loop always provides a whole character, even if the string contains characters that are not in the basic multi-lingual plane.
String.prototype.indexOf() - JavaScript
the variables contain the same string, except that the second string contains uppercase letters.
String length - JavaScript
the length property of a string object contains the length of the string, in utf-16 code units.
String.prototype.match() - JavaScript
infinity contains -infinity and +infinity in javascript.", str2 = "my grandfather is 65 years old and my grandmother is 63 years old.", str3 = "the contract was declared null and void."; str1.match("number"); // "number" is a string.
String.raw() - JavaScript
...substitutions contains substitution values.
String.prototype.repeat() - JavaScript
the repeat() method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.
String - JavaScript
string.prototype.includes(searchstring [, position]) determines whether the calling string contains searchstring.
TypedArray.BYTES_PER_ELEMENT - JavaScript
the bytes_per_element constant contains the number of bytes each element in the given typedarray has.
TypedArray.prototype.entries() - JavaScript
the entries() method returns a new array iterator object that contains the key/value pairs for each index in the array.
TypedArray.prototype.keys() - JavaScript
the keys() method returns a new array iterator object that contains the keys for each index in the array.
TypedArray.prototype.values() - JavaScript
the values() method returns a new array iterator object that contains the values for each index in the array.
WeakRef - JavaScript
description a weakref object contains a weak reference to an object, which is called its target or referent.
WebAssembly.Module - JavaScript
a webassembly.module object contains stateless webassembly code that has already been compiled by the browser — this can be efficiently shared with workers, and instantiated multiple times.
WebAssembly.Table.prototype.set() - JavaScript
var tbl = new webassembly.table({initial:2, element:"anyfunc"}); console.log(tbl.length); console.log(tbl.get(0)); console.log(tbl.get(1)); we then create an import object that contains a reference to the table: var importobj = { js: { tbl:tbl } }; finally, we load and instantiate a wasm module (table2.wasm) using the webassembly.instantiatestreaming(), log the table length, and invoke the two referenced functions that are now stored in the table (the table2.wasm module (see text representation) adds two function references to the table, both of which print out a simpl...
WebAssembly - JavaScript
webassembly.module() contains stateless webassembly code that has already been compiled by the browser and can be efficiently shared with workers, and instantiated multiple times.
decodeURI() - JavaScript
exceptions throws an urierror ("malformed uri sequence") exception when encodeduri contains invalid character sequences.
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.
globalThis - JavaScript
the global globalthis property contains the global this value, which is akin to the global object.
isNaN() - JavaScript
the function should be interpreted as answering the question, "is this value, when coerced to a numeric value, an ieee-754 'not a number' value?" ecmascript 2015 contains the number.isnan() function.
in operator - JavaScript
object object to check if it (or its prototype chain) contains the property with specified name (prop).
yield - JavaScript
yield can only be called directly from the generator function that contains it.
continue - JavaScript
var i = 0; var n = 0; while (i < 5) { i++; if (i === 3) { continue; } n += i; } using continue with a label in the following example, a statement labeled checkiandj contains a statement labeled checkj.
import.meta - JavaScript
it contains information about the module, like the module's url.
Transitioning to strict mode - JavaScript
if your code base contains such cases, testing will be necessary to be sure nothing is broken.
Template literals (Template strings) - JavaScript
the first argument of a tag function contains an array of string values.
MathML documentation index - MathML
WebMathMLIndex
html becomes verbose when your document contains advanced structures like lists or tables but fortunately there are many generators from simple notations, wysiwyg editors and other content management systems to help writing web pages.
Web audio codec guide - Web media technologies
even audio that contains only voices, but singing rather than simply speaking, will likely not be of acceptable quality in one of these formats.
Media container formats (file types) - Web media technologies
base ogg media mime types audio video audio/ogg video/ogg the application/ogg mime type can be used when you don't necessarily know whether the media contains audio or video.
Using images in HTML - Web media technologies
WebMediaimages
<picture> the html <picture> element contains zero or more <source> elements and one <img> element which provides versions of an image for different display/device scenarios.
Performance fundamentals - Web Performance
if your page contains javascript code that is taking a long time to run, the javascript profiler will pinpoint the slowest lines of code: the built-in gecko profiler is a very useful tool that provides even more detailed information about which parts of the browser code are running slowly while the profiler runs.
Populating the page: how browsers work - Web Performance
le>my simple page</title> <link rel="stylesheet" src="styles.css"/> <script src="myscript.js"></script> </head> <body> <h1 class="heading">my page</h1> <p>a paragraph with a <a href="https://example.com/about">link</a></p> <div> <img src="myimage.jpg" alt="image description"/> </div> <script src="anotherscript.js"></script> </body> </html> this response for this initial request contains the first byte of data received.
Privacy, permissions, and information security
<--- allow attribute, feature policy, and permissions api stuff ---> a specific user experience issue that often arises is a document that's loaded with permission to access a resource and the document contains an <iframe> with the allow attribute to delegate that permission to the contents of the frame.
Progressive web app structure - Progressive web apps (PWAs)
on github</a> to check its source code.</p> <button id="notifications">request dummy notifications</button> <section id="content"> // content inserted in here </section> </main> <footer> <p>© js13kgames 2012-2018, created and maintained by <a href="http://end3r.com">andrzej mazur</a> from <a href="http://enclavegames.com">enclave games</a>.</p> </footer> </body> </html> the <head> section contains some basic info like title, description and links to css, web manifest, games content js file, and app.js — that's where our javascript application is initialized.
How to make PWAs installable - Progressive web apps (PWAs)
it contains useful information, such as the app’s title, paths to different-sized icons that can be used to represent the app on an os (such as an icon on the home screen, an entry in the start menu, or an icon on the desktop), and a background color to use in loading or splash screens.
Progressive loading - Progressive web apps (PWAs)
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.
Media - Progressive web apps (PWAs)
example a document on a website has a navigation area that contains the primary site menu.
Structural overview of progressive web apps - Progressive web apps (PWAs)
</a> to check its source code.</p> <button id="notifications">request dummy notifications</button> <section id="content"> // content inserted in here </section> </main> <footer> <p>© js13kgames 2012-2018, created and maintained by <a href="http://end3r.com"> andrzej mazur</a> from <a href="http://enclavegames.com">enclave games</a>.</p> </footer> </body> </html> the <head> section contains basic information about the app, including its title, description, and the needed references to its css file, web manifest, the main application javascript file (app.js, in which the app is initialized) as well as an additional javascript code file.
gradientTransform - SVG: Scalable Vector Graphics
the gradienttransform attribute contains the definition of an optional additional transformation from the gradient coordinate system onto the target coordinate system (i.e., userspaceonuse or objectboundingbox).
points - SVG: Scalable Vector Graphics
WebSVGAttributepoints
if the attribute contains an odd number of coordinates, the last one will be ignored.
requiredExtensions - SVG: Scalable Vector Graphics
note: if a given extension reference contains white space within itself, that white space must be escaped.
xml:lang - SVG: Scalable Vector Graphics
it is a universal attribute allowed in all xml dialects to mark up the natural human language that an element contains.
Content type - SVG: Scalable Vector Graphics
ive it an id, as in: <lineargradient xml:id="mygradient">...</lineargradient> you then reference the linear gradient as the value of the fill attribute for the rectangle, as in the following example: <rect fill="url(#mygradient)"/> svg supports two types of iri references: local iri references, where the iri reference does not contain an <absoluteiri> or <relativeiri> and thus only contains a fragment identifier (i.e., #<elementid> or #xpointer(id<elementid>)).
<feSpecularLighting> - SVG: Scalable Vector Graphics
this filter primitive produces an image which contains the specular reflection part of the lighting calculation.
<pattern> - SVG: Scalable Vector Graphics
WebSVGElementpattern
patterntransform this attribute contains the definition of an optional additional transformation from the pattern coordinate system onto the target coordinate system.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
version 2 contains a lot of changes regarding the last stable version svg 1.1.
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
(see more in basic shapes.) the d attribute contains a series of commands and parameters used by those commands.
SVG Filters Tutorial - SVG: Scalable Vector Graphics
<femerge> primitive contains the nodes <femergenode> taking as input the result offsetblur , this will allow it to appear below the sourcegraphic implementation of more primitives <defs> <filter id="drop-shadow"> <fegaussianblur in="sourcealpha" stddeviation="3" result="blur"/> <feoffset in="blur" dx="4" dy="4" result="offsetblur"/> </filter> <femerge> <femergenode in="offsetblur"/> <femergenode in="sourcegra...
Referer header: privacy and security concerns - Web security
the referrer problem the referer (sic) header contains the address of the previous web page from which a link to the currently requested page was followed, which has lots of fairly innocent uses including analytics, logging, or optimized caching.
Same-origin policy - Web security
if this popup also contains javascript, that script would inherit the same origin as the script that created it.
Types of attacks - Web security
��t really an image (for example in an unfiltered chat or forum), instead it really is a request to your bank’s server to withdraw money: <img src="https://bank.example.com/withdraw?account=bob&amount=1000000&for=mallory"> now, if you are logged into your bank account and your cookies are still valid (and there is no other validation), you will transfer money as soon as you load the html that contains this image.
Using custom elements - Web Components
} } the preceding code snippet contains the constructor() definition for the class, which always starts by calling super() so that the correct prototype chain is established.
Using templates and slots - Web Components
so, if we want to add a slot into our trivial example, we could update our template's paragraph element like this: <p><slot name="my-text">my default text</slot></p> if the slot's content isn't defined when the element is included in the markup, or if the browser doesn't support slots, <my-paragraph> just contains the fallback content "my default text".
XML introduction - XML: Extensible Markup Language
example <?xml version="1.0" encoding="utf-8"?> <message> <warning> hello world <!--missing </warning> --> </message> now let's look at a corrected version of that same document: <?xml version="1.0" encoding="utf-8"?> <message> <warning> hello world </warning> </message> a document that contains an undefined tag is invalid.
document - XPath
notes if the uri contains a fragment identifier and that fragment can be identified in the external document, that fragment will be treated as the root in the node-set argument's expression.
translate - XPath
if xyz contains more characters than abc, the extra characters are ignored.
Functions - XPath
boolean() ceiling() choose() concat() contains() count() current() xslt-specific document() xslt-specific element-available() false() floor() format-number() xslt-specific function-available() generate-id() xslt-specific id() (partially supported) key() xslt-specific lang() last() local-name() name() namespace-uri() normalize-space() not() number() position() round() starts-with() string() string-length() substring() ...
Index - XPath
WebXPathIndex
22 contains xslt, xslt_reference the contains function determines whether the first argument string contains the second argument string and returns boolean true or false.
XPath snippets - XPath
i in results) alert("person #" + i + " has the last name " + results[i].value); // get the 2nd person node results = evaluatexpath(people, "/people/person[2]"); // get all the person nodes that have addresses in denver results = evaluatexpath(people, "//person[address/@city='denver']"); // get all the addresses that have "south" in the street name results = evaluatexpath(people, "//address[contains(@street, 'south')]"); alert(results.length); docevaluatearray the following is a simple utility function to get (ordered) xpath results into an array, regardless of whether there is a special need for namespace resolvers, etc.
<xsl:choose> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementchoose
it contains one or more <xsl:when> elements, and, optionally, a final <xsl:otherwise> element.
<xsl:variable> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementvariable
if the element contains a template, this attribute is ignored.
<xsl:with-param> - XSLT: Extensible Stylesheet Language Transformations
if the element contains a template, this attribute is ignored.
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
value contains the string value for the parameter.
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
(supported) xsl:value-of (partially supported) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) axes ancestor ancestor-or-self attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) na...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
form (supported) xsl:value-of (partially supported) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) axes ancestor ancestor-or-self attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (s...
Introduction - XSLT: Extensible Stylesheet Language Transformations
since the xml data loaded only contains the raw information without any presentation data, it can load quickly even on dialup.
Converting WebAssembly text format to wasm - WebAssembly
next, execute the wat2wasm program, passing it the path to the input file, followed by an -o parameter, followed by the path to the output file: wat2wasm simple.wat -o simple.wasm this will convert the wasm into a file called simple.wasm, which contains the .wasm assembly code.
Using the WebAssembly JavaScript API - WebAssembly
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.
WebAssembly
webassembly.module() a webassembly.module object contains stateless webassembly code that has already been compiled by the browser and can be efficiently shared with workers, and instantiated multiple times.