Search completed in 0.94 seconds.
2332 results for "sum":
Your results are loading. Please wait...
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
WebHTMLElementsummary
the html disclosure summary element (<summary>) element specifies a summary, caption, or legend for a <details> element's disclosure box.
... clicking the <summary> element toggles the state of the parent <details> element open and closed.
... usage notes the <summary> element's contents can be any heading content, plain text, or html that can be used within a paragraph.
...And 9 more matches
CSSMathSum.CSSMathSum() - Web APIs
the cssmathsum() constructor creates a new cssmathsum object which creates a new csskeywordvalue object which represents the result obtained by calling add(), sub(), or tosum() on cssnumericvalue.
... syntax var cssmathsum = new cssmathsum() parameters values one or more double integers or cssnumericvalue objects.
... specifications specification status comment css typed om level 1the definition of 'cssmathsum()' in that specification.
nsIMicrosummaryService
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides methods for managing installed microsummaries, and the bookmarks they apply to.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) implemented by: @mozilla.org/microsummary/service;1 as a service: var microsummaryservice = components.classes["@mozilla.org/microsummary/service;1"] .getservice(components.interfaces.nsimicrosummaryservice); method overview void addgenerator(in nsiuri generatoruri); nsimicrosummary createmicrosummary(in nsiuri pageuri, in nsiuri generatoruri); nsisimpleenumerator getbookmarks(); nsimicrosummarygenerator getgenerator(in nsiuri generatoruri); nsimicrosummaryset getmi...
...crosummaries(in nsiuri pageuri, in long long bookmarkid); nsimicrosummary getmicrosummary(in long long bookmarkid); boolean hasmicrosummary(in long long bookmarkid); nsimicrosummarygenerator installgenerator(in nsidomdocument xmldefinition); boolean ismicrosummary(in long long bookmarkid, in nsimicrosummary microsummary); nsimicrosummary refreshmicrosummary(in long long bookmarkid); void removemicrosummary(in long long bookmarkid); void setmicrosummary(in long long bookmarkid, in nsimicrosummary microsummary); methods addgenerator() install the microsummary generator from the resource at the supplied uri.
...And 40 more matches
Microsummary XML grammar reference - Archive of obsolete content
a microsummary generator is an xml document that describes how to pull specific information from a web page to be presented in summary form as a bookmark whose title changes based on the content of the page it targets.
... warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) this article provides detailed information about the xml grammar used to build microsummary generators, describing each element and their attributes.
... for an introduction to how to create a microsummary, read the article creating a microsummary.
...And 27 more matches
Creating a Microsummary - Archive of obsolete content
warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) a microsummary generator is a set of instructions for creating a microsummary from the content of a page.
... web pages can reference generators via <link rel="microsummary"> elements in their <head> elements.
... in this tutorial we're going to create a microsummary generator for the spread firefox home page that displays the current firefox download count along with the label fx downloads; for example: 174475447 fx downloads.
...And 25 more matches
nsIMicrosummary
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface defines attributes and methods for dealing with microsummaries generated by an nsimicrosummarygenerator.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void addobserver(in nsimicrosummaryobserver observer); boolean equals(in nsimicrosummary aother); void removeobserver(in nsimicrosummaryobserver observer); void update(); attributes attribute type description content astring the content of the microsummary.
... generator nsimicrosummarygenerator the generator that generates this microsummary.
...And 14 more matches
Microsummary topics - Archive of obsolete content
warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) programmatically installing a microsummary generator to programmatically install a microsummary generator -- for example, in an extension that helps users create custom generators for their favorite sites -- obtain a reference to the nsimicrosummaryservice interface implemented by the nsimicrosummaryservice component, then call its installgenerator() method, passing it an xml document containing the generator.
... for example, the following code snippet installs the microsummary generator from the creating a microsummary tutorial: var generatortext = ' \ <?xml version="1.0" encoding="utf-8"?> \ <generator xmlns="http://www.mozilla.org/microsummaries/0.1" \ name="firefox download count" \ uri="urn:{835daeb3-6760-47fa-8f4f-8e4fdea1fb16}"> \ <template> \ <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> \ <output method="text"/> \ <template match="/"> \ <value-of select="id(\'download-count\')"/> \ <text> fx downloads</text> \ </template> \ </transform> \ </template> \ <pages> <include>http://(www\.)?spreadfirefox\.com/(index\.php)?</include> </pages> </generator> \ '; var d...
... createinstance(components.interfaces.nsidomparser); var generatordoc = domparser.parsefromstring(generatortext, "text/xml"); var microsummaryservice = components.classes["@mozilla.org/microsummary/service;1"].
...And 11 more matches
nsIMicrosummaryGenerator
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides access to a microsummary that has been installed in firefox.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview long calculateupdateinterval(in nsidomnode apagecontent); boolean equals(in nsimicrosummarygenerator aother); astring generatemicrosummary(in nsidomnode apagecontent); attributes attribute type description loaded boolean has the generator itself (which may be a remote resource) been loaded.
... name autf8string an arbitrary descriptive name for this microsummary generator.
...And 10 more matches
Implementing Download Resuming
this document describes how an embedder or other gecko/necko-using application can implement download resuming.
...this means that if a download was interrupted, it can be resumed from that point on, rather than regetting the whole file.
... the interface resuming is done using the nsiresumablechannel interface.
...And 9 more matches
nsIResumableChannel
netwerk/base/public/nsiresumablechannel.idlscriptable this interface is meant to be implemented by the channels that support resuming broken downloads (for example necko's html and ftp channels).
... inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void asyncopenat(in nsistreamlistener listener, in nsisupports ctxt, in unsigned long startpos, in nsiresumableentityid entityid); obsolete since gecko 1.8 void resumeat(in unsigned long long startpos, in acstring entityid); attributes attribute type description entityid acstring the entity id for this uri.
...exceptions thrown ns_error_not_resumable if this load is not resumable.
...And 7 more matches
DownloadSummary
a reference to a downloadsummary object can be obtained using the downloads.getsummary() function.
...views on the summarized data can be registered before this object is bound to an actual list.
... this allows the summary to be used without requiring the initialization of the downloadlist first.
...And 6 more matches
nsIMicrosummaryObserver
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides methods for observing changes to micrummaries.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void oncontentloaded(in nsimicrosummary microsummary); void onelementappended(in nsimicrosummary microsummary); void onerror(in nsimicrosummary microsummary); methods oncontentloaded() called when an observed microsummary updates its content.
... since an observer might watch multiple microsummaries at the same time, the microsummary whose content has been updated gets passed to this handler.
...And 6 more matches
nsIMicrosummarySet
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides access to sets of microsummaries returned from the nsimicrosummaryservice.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void addobserver(in nsimicrosummaryobserver observer); nsisimpleenumerator enumerate(); void removeobserver(in nsimicrosummaryobserver observer); methods addobserver() add a microsummary observer to this microsummary set.
... adding an observer to a set is the equivalent of adding it to each constituent microsummary.
...And 6 more matches
CSSMathSum - Web APIs
the cssmathsum interface of the css typed object model api represents the result obtained by calling add(), sub(), or tosum() on cssnumericvalue.
... a cssmathsum is the object type returned when the stylepropertymapreadonly.get() method is used on a css property whosevalue is created with a calc() function.
... constructor cssmathsum.cssmathsum() creates a new cssmathsum object.
...And 3 more matches
MediaRecorder.onresume - Web APIs
the mediarecorder.onresume event handler (part of the mediarecorder api) handles the resume event, allowing you to run code in response to the media recording being resumed after pausing.
... the resume event is thrown as a result of the mediarecorder.resume() method being invoked.
... syntax mediarecorder.onresume = function(event) { ...
...And 3 more matches
MediaRecorder.resume() - Web APIs
the mediarecorder.resume() method (part of the mediarecorder api) is used to resume media recording when it has been previously paused.
... when the resume() method is invoked, the browser queues a task that runs the following steps: if mediarecorder.state is "inactive", raise a dom invalidstate error and terminate these steps.
... raise a resume event.
...And 3 more matches
Creating regular expressions for a microsummary generator - Archive of obsolete content
warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) a regular expression is a special kind of string (i.e.
...microsummary generators use them to identify the pages that the generators know how to summarize by matching patterns in those pages' urls.
...to learn how to create a microsummary generator, see creating a microsummary.
...And 2 more matches
AudioContext.resume() - Web APIs
the resume() method of the audiocontext interface resumes the progression of time in an audio context that has previously been suspended.
... syntax completepromise = audiocontext.resume(); parameters none.
... return value a promise that resolves when the context has resumed.
...And 2 more matches
RTCRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcrtpstreamstats dictionary is a value generated by adding the quantization parameter (qp) values for every frame sent or received to date on the video track corresponding to this rtcrtpstreamstats object.
... syntax var qpsum = rtcrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent or received so far on the track described by the rtcrtpstreamstats object.
... since the value of qp is typically larger to indicate higher compression factors, the larger this sum is, the more heavily compressed the stream generally has been.
...And 2 more matches
panel.consumeoutsideclicks - Archive of obsolete content
« xul reference home consumeoutsideclicks type: boolean controls whether or not the event that caused the popup to be automatically dismissed (or "rolled up") should be consumed or be dispatched as a normal event.
...if it set to true the rollup event is consumed.
... if set to false, the rollup event is not consumed.
... this attribute should be used instead of setconsumerollupevent.
RTCInboundRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcinboundrtpstreamstats dictionary is a value generated by adding the quantization parameter (qp) values for every frame sent or received to date on the video track corresponding to this rtcinboundrtpstreamstats object.
... syntax var qpsum = rtcinboundrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent or received so far on the track described by the rtcinboundrtpstreamstats object.
... since the value of qp is typically larger to indicate higher compression factors, the larger this sum is, the more heavily compressed the stream generally has been.
... function calculateaverageqp(stats) { let framecount = 0; switch(stats.type) { case "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0; } return status.qpsum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.qpsum' in that specification.
RTCOutboundRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcoutboundrtpstreamstats dictionary is a value generated by adding the quantization parameter (qp) values for every frame this sender has produced to date on the video track corresponding to this rtcoutboundrtpstreamstats object.
... syntax var qpsum = rtcoutboundrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent so far on the track described by the rtcoutboundrtpstreamstats object.
... since the value of qp is typically larger to indicate higher compression factors, the larger this sum is, the more heavily compressed the stream generally has been.
... function calculateaverageqp(stats) { let framecount = 0; switch(stats.type) { case "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0; } return status.qpsum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.qpsum' in that specification.
WebGL2RenderingContext.resumeTransformFeedback() - Web APIs
the webgl2renderingcontext.resumetransformfeedback() method of the webgl 2 api resumes a transform feedback operation.
... syntax void gl.resumetransformfeedback(); parameters none.
...gl.resumetransformfeedback(); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'resumetransformfeedback' in that specification.
... opengl es 3.0the definition of 'glresumetransformfeedback' in that specification.
Message Summary Database - Archive of obsolete content
the mail summary files (.msf) are used to store summary information about messages and threads in a folder, and some meta information about the folder.
... nsimsgdatabase the main access point to the summary information is nsimsgdatabase.
...mork assumes the caller will do file locking, so two processes or threads writing to the same database can corrupt it.
CSSNumericValue.toSum() - Web APIs
the tosum() method of the cssnumericvalue interface converts the object's value to a cssmathsum object to values of the specified unit.
... syntax var cssmathsum = cssnumericvalue.tosum(units); parameters units the units to convert to.
... examples let v = css.px("23").add(css.percent("4")).add(css.cm("3")).add(css.in("9")); v.tostring() // => "calc(23px + 4% + 3cm + 9in)" v.tosum("px", "percent").tostring() // => "calc(1000.39px + 4%)" specifications specification status comment css typed om level 1the definition of 'tosum' in that specification.
OfflineAudioContext.resume() - Web APIs
the resume() method of the offlineaudiocontext interface resumes the progression of time in an audio context that has been suspended.
... syntax offlineaudiocontext.resume().then(function() { ...
... specifications specification status comment web audio apithe definition of 'resume()' in that specification.
SpeechSynthesis.resume() - Web APIs
the resume() method of the speechsynthesis interface puts the speechsynthesis object into a non-paused state: resumes it if it was already paused.
... syntax speechsynthesisinstance.resume(); returns void.
...this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.pause(); // pauses utterances being spoken synth.resume() // resumes speaking specifications specification status comment web speech apithe definition of 'resume()' in that specification.
SpeechSynthesisUtterance.onresume - Web APIs
the onresume property of the speechsynthesisutterance interface represents an event handler that will run when a paused utterance is resumed (when the resume event fires.) this occurs when the speechsynthesis.resume() method is invoked on a paused speech synthesis instance.
... syntax speechsynthesisutteranceinstance.onresume = function() { ...
... inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onresume = function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onresume' in that specification.
sum - XPath
WebXPathFunctionssum
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the sum function returns a number that is the sum of the numeric values of each node in a given node-set.
... syntax sum(node-set ) arguments node-set the node-set to be evaluated.
... each node in this node-set is evaluated as if it were passed to the number() function, and a sum of the resulting numbers is returned.
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.
... syntax var cssnumericarray = cssmathsum.values; value a cssnumericarray.
CSSNumericValue.sum() - Web APIs
syntax var cssmathsum = cssnumericvalue.sub(number); parameters number either a number or a cssmathsum return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method.
... examples let mathsum = css.px("23").sum(css.percent("4")).sum(css.cm("3")).sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(mathsum.tostring()); and/or include a list of links to useful code samples that live elsewhere: specifications specification status comment css typed om level 1the definition of 'sub' in that specification.
HTMLTableElement.summary - Web APIs
the htmltableelement.summary property represents the table description.
... syntax htmltableelement.summary = string; varstring = htmltableelement.summary; example htmltableelement.summary = "usage statistics"; specification w3c dom 2 html specification ...
SpeechSynthesisUtterance: resume event - Web APIs
the resume event of the web speech api speechsynthesisutterance object is fired when a paused utterance is resumed.
... bubbles no cancelable no interface speechsynthesisevent event handler property onresume examples you can use the resume event in an addeventlistener method: utterthis.addeventlistener('resume', function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); }); or use the onresume event handler property: utterthis.onresume = function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
Index - Archive of obsolete content
found 3833 pages: # page tags and summary 1 archive of obsolete content archive, landing here at mdn, we try to avoid outright deleting content that might be useful to people targeting legacy platforms, operating systems, and browsers.
... 3 2015 mdn fellowship program 2015, archive, fellowship no summary!
... 8 window: userproximity event sensors, events no summary!
...And 1313 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
found 1218 pages: # page tags and summary 1 xul landing, mozilla, xul xul (xml user interface language) is mozilla's xml-based language for building user interfaces of applications like firefox.
... 5 attribute (xul) xul attributes, xul reference no summary!
... 7 accelerated xul, xul attribute, xul reference no summary!
...And 895 more matches
Index
MozillaTechXPCOMIndex
found 1275 pages: # page tags and summary 1 xpcom add-ons, extensions, landing, mozilla, xpcom xpcom is a cross platform component object model, similar to microsoft com.
... 3 aggregating the in-memory datasource rdf no summary!
... 7 fun with xbl and xpconnect xbl, xpcom, xpcom:language bindings, xpconnect no summary!
...And 252 more matches
Index
found 353 pages: # page tags and summary 1 network security services jss, nss, needsmigration network security services (nss) is a set of libraries designed to support cross-platform development of security-enabled client and server applications.
... 4 cert_findcertbydercert nss no summary!
... 5 cert_findcertbyissuerandsn nss no summary!
...And 123 more matches
Index - Web APIs
WebAPIIndex
found 5328 pages: # page tags and summary 1 web apis api, dom, landing, reference, web when writing code for the web, there are a large number of web apis available.
...this is able to abort fetch requests, consumption of any response body, and streams.
... 47 ambient light sensor api api, ambient light sensor api, ambientlightsensor, junk, landing, overview, reference no summary!
...And 50 more matches
Bytecode Descriptions
initialyield operands: (uint24_t resumeindex) stack: gen ⇒ rval, gen, resumekind suspend the current generator and return to the caller.
...later, when resuming execution, rval, gen and resumekind will receive the values passed in by jsop::resume.
... resumekind is the generatorresumekind stored as an int32 value.
...And 33 more matches
Multiple-column layout - Learn web development
column-count example body { width: 90%; max-width: 900px; margin: 2em auto; font: .9em/1.2 arial, helvetica, sans-serif; } <div class="container"> <h1>simple multicol example</h1> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...integer ligula ipsum, tristique sit amet orci vel, viverra egestas ligula.
... column-width example body { width: 90%; max-width: 900px; margin: 2em auto; font: .9em/1.2 arial, helvetica, sans-serif; } <div class="container"> <h1>simple multicol example</h1> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...And 22 more matches
HTTP Cache
object: memory-only (memorycachestorage): stores data only in a memory cache, data in this storage are never put to disk disk (diskcachestorage): stores data on disk, but for existing entries also looks into the memory-only storage; when instructed via a special argument also primarily looks into application caches application cache (appcachestorage): when a consumer has a specific nsiapplicationcache (i.e.
...pple/uxp/blob/master/netwerk/base/public/nsiloadcontextinfo.idl it is a helper interface wrapping following four arguments into a single one: private-browsing boolean flag anonymous load boolean flag app id number (0 for no app) is-in-browser boolean flag helper functions to create nsiloadcontextinfo objects: c++ consumers: functions at loadcontextinfo.h exported header js consumers: resource://gre/modules/loadcontextinfo.jsm module methods two storage objects created with the same set of nsiloadcontextinfo arguments are identical, containing the same cache entries.
... only one consumer (the so called "writer") may have such an entry available (obtained via oncacheentryavailable).
...And 22 more matches
Index
found 550 pages: # page tags and summary 1 spidermonkey: the mozilla javascript runtime spidermonkey standalone source code releases can be found on the releases page.
... 6 gc rooting guide spidermonkey no summary!
... 87 jsautocompartment jsapi reference, spidermonkey no summary!
...And 21 more matches
Floats - Learn web development
first, we'll start off with some simple html — add the following to your html body, removing anything that was inside there before: <h1>simple float example</h1> <div class="box">float</div> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...integer ligula ipsum, tristique sit amet orci vel, viverra egestas ligula.
...at the text around it add the float and margin-right properties to the .box rule: .box { float: left; margin-right: 15px; width: 150px; height: 100px; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } now if you save and refresh you'll see something like the following: float example 1 <h1>simple float example</h1> <div class="box">float</div> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...And 16 more matches
Power profiling overview
it is equivalent to an amount of energy consumed per unit time.
... in the context of computing, a fully-charged mobile device battery (as found in a laptop or smartphone) holds a certain amount of energy, and the speed at which that stored energy is depleted depends on the power consumption of the mobile device.
...reducing) the power consumption caused by firefox and firefox os.
...And 16 more matches
window.location - Web APIs
WebAPIWindowlocation
rollleft = onode.offsetleft; } function showbookmark (sbookmark, busehash) { if (arguments.length === 1 || busehash) { location.hash = sbookmark; return; } var obookmark = document.queryselector(sbookmark); if (obookmark) { shownode(obookmark); } } </script> <style> span.intlink { cursor: pointer; color: #0000ff; text-decoration: underline; } </style> </head> <body> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...nam turpis nunc, suscipit a hendrerit vitae, volutpat non ipsum.</p> <p>duis lobortis sapien quis nisl luctus porttitor.
...etiam congue, elit vitae egestas mollis, ipsum nisi malesuada turpis, a volutpat arcu arcu id risus.</p> <p>nam faucibus, ligula eu fringilla pulvinar, lectus tellus iaculis nunc, vitae scelerisque metus leo non metus.
...And 15 more matches
nsIMsgMessageService
amovemessage, in nsiurllistener aurllistener, in nsimsgwindow amsgwindow, out nsiuri aurl); [noscript] void copymessages(in nsmsgkeyarrayptr keys, in nsimsgfolder srcfolder, in nsistreamlistener acopylistener, in boolean amovemessage, in nsiurllistener aurllistener, in nsimsgwindow amsgwindow, out nsiuri aurl); void displaymessage(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in string acharsetoverride, out nsiuri aurl); void openattachment(in string acontenttype, in string afilename, in string aurl, in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener); void savemessagetodisk(in string amessageuri, in nsifilespec afile, in boo...
...lean ageneratedummyenvelope, in nsiurllistener aurllistener, out nsiuri aurl, in boolean canonicallineending, in nsimsgwindow amsgwindow); void geturlforuri(in string amessageuri, out nsiuri aurl, in nsimsgwindow amsgwindow); void displaymessageforprinting(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, out nsiuri aurl); void search(in nsimsgsearchsession asearchsession, in nsimsgwindow amsgwindow, in nsimsgfolder amsgfolder, in string asearchuri); nsiuri streammessage(in string amessageuri, in nsisupports aconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in boolean aconvertdata, in string aadditionalheader); nsiuri streamheaders(in string amessageuri, in nsist...
...reamlistener aconsumer, in nsiurllistener aurllistener [optional] in boolean alocalonly); boolean ismsginmemcache(in nsiuri aurl, in nsimsgfolder afolder, out nsicacheentrydescriptor acacheentry); nsimsgdbhdr messageuritomsghdr(in string uri); methods copymessage() pass in the uri for the message you want to have copied.
...And 14 more matches
nsIAnnotationService
for other types, only c++ consumers may use the type-specific methods.
...for other types, only c++ consumers may use the type-specific methods.
...for other types, only c++ consumers may use the type-specific methods.
...And 13 more matches
Script security
security checks to determine the security relation between two compartments, gecko uses two concepts: security principals and the act of subsuming.
... to establish the security relationship between two compartments a and b, gecko asks: does the security principal for compartment a subsume the security principal for compartment b, and vice versa?
... subsumes a subsumes b a has all of the privileges of b, and possibly more, and therefore a is allowed to see and do anything that b can see and do.
...And 12 more matches
nsITextInputProcessor
however, if the event is consumed by web content, it returns false.
...sum of alength must be same as the length of astring of setpendingcompositionstring().
...if this is not specified, the value is assumed as 0.
...And 12 more matches
<details>: The Details disclosure element - HTML: Hypertext Markup Language
WebHTMLElementdetails
a summary or label can be provided using the <summary> element.
...if the first child of the <details> element is a <summary>, the contents of the <summary> element are used as the label for the disclosure widget.
...the default closed state displays only the triangle and the label inside <summary> (or a user agent-defined default string if no <summary>).
...And 12 more matches
Anatomy of a video game - Game development
but do not immediately assume animations require frame-by-frame control.
...let us assume that your game's functions and variables are built on a namespace that you called mygame.
...* * let us also assume that mygame is previously defined.
...And 10 more matches
Introduction to CSS layout - Learn web development
floats example body { width: 90%; max-width: 900px; margin: 0 auto; } p { line-height: 2; word-spacing: 0.1rem; } .box { background-color: rgb(207,232,220); border: 2px solid rgb(79,185,227); padding: 10px; border-radius: 5px; } <h1>simple float example</h1> <div class="box">float</div> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...integer ligula ipsum, tristique sit amet orci vel, viverra egestas ligula.
... <h1>fixed positioning</h1> <div class="positioned">fixed</div> <p>paragraph 1.</p> <p>paragraph 2.</p> <p>paragraph 3.</p> fixed positioning example <h1>fixed positioning</h1> <div class="positioned">fixed</div> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...And 10 more matches
Introduction to NSPR
nspr assumes that the priorities of global threads are not manageable, but that the host os will perform some sort of fair scheduling.
...suppose an object has three values, v1, v2, and sum.
... the invariant is that the third value is the sum of the other two.
...And 10 more matches
Debugger - Firefox Developer Tools
this function should return a resumption value, which determines how the debuggee should continue.
...most handler functions can return a resumption value indicating how the debuggee’s execution should proceed.
... this handler method should return a resumption value specifying how the debuggee’s execution should proceed.
...And 10 more matches
Browser Detection and Cross Browser Support - Archive of obsolete content
an implicit assumption by many web authors around this time was the there were only two types of browser available...
... these strategies of classifying browsers by vendor/version, assuming that the only browsers being used where either netscape navigator 4 or internet explorer 4 failed when alternative browsers such as those based upon gecko were introduced.
... misidentifying browsers a common mistake web authors make is to assume that if a browser is not netscape navigator 4, it must be internet explorer and vice versa.
...And 9 more matches
MathML Torture Test
<mi>x</mi> <mn>2</mn> </msup> </mrow> </mfrac> </mrow> </math> </td></tr> <tr> <td>10</td> <td><img src="https://udn.realityripple.com/samples/e4/0fe420309f.png" width="116" height="63" alt="texbook, 17.7-17.8" /></td> <td> <math display="block"> <mrow> <munder> <mo>&sum;</mo> <mrow> <mfrac linethickness="0px"> <mrow> <mn>0</mn> <mo>&leq;</mo> <mi>i</mi> <mo>&leq;</mo> <mi>m</mi> </mrow> <mrow> <mn>0</mn> <mo>&lt;</mo> <mi>j</mi> <...
...x</mi> <mrow> <mn>2</mn> <mi>y</mi> </mrow> </msup> </mrow> </math> </td></tr> <tr> <td>12</td> <td><img src="https://udn.realityripple.com/samples/c6/2e157bd274.png" width="175" height="61" alt="texbook, 17.8" /></td> <td> <math display="block"> <mrow> <munderover> <mo>&sum;</mo> <mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>p</mi> </munderover> <munderover> <mo>&sum;</mo> <mrow> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>q</mi> </munderover> <munderover...
...> <mo>&sum;</mo> <mrow> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>r</mi> </munderover> <msub> <mi>a</mi> <mrow> <mi>i</mi> <mi>j</mi> </mrow> </msub> <msub> <mi>b</mi> <mrow> <mi>j</mi> <mi>k</mi> </mrow> </msub> <msub> <mi>c</mi> <mrow> <mi>k</mi> <mi>i</mi> </mrow> </msub> </mrow> </math> </td></tr> <tr> <td>13</td> <td><img src="https://udn.realityripple.com/samples/12/befe77af13.png" width="405" height="100" alt="t...
...And 9 more matches
Index
found 118 pages: # page tags and summary 1 thunderbird thunderbird thunderbird is a mail/messaging application managed and developed by the thunderbird community.
...pizzarro <rhp@netscape.com> 10 autoconfiguration in thunderbird administration, enterprise author: ben bucksch please do not change this document without consulting the author 11 autoconfig file format no summary!
... 31 gloda indexing this page provides a big-picture summary of what the indexer does; please see the source for nitty-gritty details or if this page seems to be wrong.
...And 9 more matches
Using readable streams - Web APIs
note: this article assumes that you understand the use cases of readable streams, and are aware of the high-level concepts.
... browser support you can consume fetch body objects as streams and create your own custom readable streams in firefox 65+ and chrome 42+ (and equivalent chromium-based browsers).
... consuming a fetch as a stream the fetch api allows you to fetch resources across the network, providing a modern alternative to xhr.
...And 9 more matches
WebIDL bindings
if you don't have to set any annotations, then you don't need to add an entry either and the code generator will simply assume the defaults here.
...ptions); template<typename t> int16_t dosomething(const t& thisobj, nsinode& somenode, errorresult& rv, exceptionhandling aexceptionhandling = ereportexceptions); }; and these c++ function declarations on the implementation of myinterface: already_addrefed<mycallback> getfoo(); void setfoo(mycallback&); already_addrefed<mycallback> getbar(); void setbar(mycallback*); a consumer of mycallback would be able to use it like this: void someclass::dosomethingwithcallback(mycallback& acallback) { errorresult rv; int32_t number = acallback.getsomenumber(rv); if (rv.failed()) { // the error has already been reported to the js console; you can handle // things however you want here.
...consumers doing this should declare their dictionary as rooteddictionary<dictionaryname>.
...And 8 more matches
HTML table advanced features and accessibility - Learn web development
previous overview: tables next in the second article in this module, we look at some more advanced features of html tables — such as captions/summaries and grouping your rows into table head, body and footer sections — as well as looking at the accessibility of tables for visually impaired users.
... note: the summary attribute can also be used on the <table> element to provide a description — this is also read out by screenreaders.
... we'd recommend using the <caption> element instead, however, as summary is deprecated by the html5 spec, and can't be read by sighted users (it doesn't appear on the page.) active learning: adding a caption let's try this out, revisiting an example we first met in the previous article.
...And 7 more matches
Web Replay
to resume recording and interacting with the tab, press the pause button and then the play button to run forward to the end of the recording.
... debugger integration allows the js debugger to read the information it needs from a replaying process and control the process's execution (resume/rewind).
... inter-thread non-determinism is handled by first assuming the program is data race free: shared memory accesses which would otherwise race are either protected by locks or use apis that perform atomic operations.
...And 7 more matches
nsIDOMWindowUtils
ent); void forceupdatenativemenuat(in astring indexstring); void garbagecollect([optional] in nsicyclecollectorlistener alistener); short getcursortype(); astring getdocumentmetadata(in astring aname); nsidomwindow getouterwindowwithid(in unsigned long long aouterwindowid); long getpccountscriptcount(); astring getpccountscriptsummary(in long ascript); astring getpccountscriptcontents(in long ascript); void getscrollxy(in boolean aflushlayout, out long ascrollx, out long ascrolly); astring getvisiteddependentcomputedstyle(in nsidomelement aelement, in astring apseudoelement, in astring apropertyname); boolean isinmodalstate(); void leavemodalstate(); void load...
... void removesheet(in nsiuri sheeturi, in unsigned long type); void resumetimeouts(); void sendcompositionevent(in astring atype); obsolete since gecko 9 void sendcompositionevent(in astring atype, in astring adata, in astring alocale); obsolete since gecko 38.0 void sendcontentcommandevent(in astring atype, [optional] in nsitransferable atransferable); void getclassname(in object aobj); boolean sendkeyevent(in astring at...
... getpccountscriptsummary() returns a summary of the profile information for a script.
...And 7 more matches
nsIPermissionManager
netwerk/base/nsipermissionmanager.idlscriptable please add a summary to this article.
...it should not be used by consumers.
... type a unique, case-sensitive ascii string identifying the consumer.
...And 7 more matches
Inputs and input sources - Web APIs
let primaryinputsource = xrsession.inputsources[0]; for (let i=0; i < xrsession.inputsources.length; i++) { if (xrsession.inputsources[i].handedness === user.handedness) { primaryinputsource = inputsources[i]; break; } } this snippet of code starts by assuming that the first input source is the primary, but then looks for one whose handedness matches the one specified in the user object.
...the code below starts by assuming the first input source is the primary, then establishes a handler for the select event that records the event's source as the primary input source.
...do not presume these events will happen with any particular amount of time between them.
...And 7 more matches
Details of the object model - JavaScript
this chapter assumes that you are already somewhat familiar with javascript and that you have used javascript functions to create simple objects.
...for example, assume the employee class includes only the name and dept properties, and manager is a subclass of employee that adds the reports property.
... summary of differences the following table gives a short summary of some of these differences.
...And 7 more matches
CustomizableUI.jsm
customizableui assumes that each area it is told about is present in every browser window.
...if consumers make a change to the placements in an area, customizableui will update the actual nodes in each area instance for them.
... custom which are widgets that are custom-created by some js supplied by the consumer for more details, see api-provided widgets.
...And 6 more matches
Archived Mozilla and build documentation - Archive of obsolete content
creating a hybrid cd creating a microsummary a microsummary generator is a set of instructions for creating a microsummary from the content of a page.
... web pages can reference generators via <link rel="microsummary"> elements in their <head> elements.
... creating regular expressions for a microsummary generator a regular expression is a special kind of string (i.e.
...And 5 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
client authentication refers to the confident identification of a client by a server (that is, identification of the person assumed to be using the client software).
... server authentication refers to the confident identification of a server by a client (that is, identification of the organization assumed to be responsible for the server at a particular network address).
...figure 4 assumes the following: the user has already decided to trust the server, either without authentication or on the basis of server authentication via ssl.
...And 5 more matches
Using Vue computed properties - Learn web development
using computed properties the aim here is to add a summary count of our to-do list.
...if we have 2 of 5 items completed in our to-do list, our summary could read "3 items completed out of 5".
... adding a summary counter add the following code to your app component object, below the methods property.
...And 5 more matches
JS_SuspendRequest
suspends the calling thread's current request, if any, to allow the thread to block or perform time-consuming calculations.
... syntax jsrefcount js_suspendrequest(jscontext *cx); void js_resumerequest(jscontext *cx, jsrefcount savedepth); name type description cx jscontext * the context whose current request is to be suspended or resumed.
... savedepth jsrefcount (only in js_resumerequest) the valued returned by the matching js_suspendrequest call.
...And 5 more matches
nsIPrincipal
boolean subsumes(in nsiprincipal other); attributes attribute type description certificate nsisupports the certificate associated with this principal, if any.
...sing description annotation missing description exceptions thrown missing exception missing description native code only!setcanenablecapability void setcanenablecapability( in string capability, in short canenable ); parameters capability missing description canenable missing description exceptions thrown missing exception missing description subsumes() returns whether the other principal is equal to or weaker than this principal.
...a principal always subsumes itself.
...And 5 more matches
Debugger.Frame - Firefox Developer Tools
older the next-older visible frame, in which control will resume when this frame completes.
...the function should return a resumption value specifying how the debuggee’s execution should proceed.
...if any onstep handler forces the frame to return early (by returning a resumption value other than undefined), any remaining debuggers’ onstep handlers do not run.
...And 5 more matches
Microformats - HTML: Hypertext Markup Language
summary microformats (sometimes abbreviated μf) are standards used to embed semantics & structured data in html, and provide an api to be used by search engines, aggregators, and other tools.
..."p-name", "p-summary" generic plain text parsing, element text in general.
...developer</a> on <time class="dt-published" datetime="2013-06-13 12:00:00">13<sup>th</sup> june 2013</time></p> <p class="p-summary">in which i extoll the virtues of using microformats.</p> <div class="e-content"> <p>blah blah blah</p> </div> </article> properties property description p-name entry name/title p-author who wrote the entry, optionally embedded h-card dt-published when the entry was published p-summary short entry summary e-conten...
...And 5 more matches
Browser detection using the user agent - HTTP
rn (""+str).split(camelcaseexpression); }; } else { /*this fallback code is much less performant, but works*/ var splitupstring = function(str){ return str.replace(/[a-z]/g,"z$1").split(/z(?=[a-z])/g); }; } console.log(splitupstring("foobare")); // ["foob", "are"] console.log(splitupstring("jqwhy")); // ["jq", "w", "hy"] the above code would have made several incorrect assumptions: it assumed that all user agent strings that include the substring "chrome" are chrome.
... it assumed that the lookbehind feature would always be available if the browser was chrome.
... most importantly, it assumed no other browsers would support the feature.
...And 5 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
all of these documents currently assume, however, that you are developing your extension using xul and javascript only.
... anatomy of a simple c++ extension we assume that you are using c++ to write xpcom components that can be used either from other c++ components or from javascript.
...i'm assuming that you've already built firefox successfully.
...And 4 more matches
sslfnc.html
an application that wishes to do sumultaneous reads and writes should set this to pr_true.
...if you turn this option on, this socket will be unable to resume a session begun by another socket.
... when this socket's session is finished, no other socket will be able to resume the session begun by this socket.
...And 4 more matches
nsIRequest
method overview void cancel(in nsresult astatus); boolean ispending(); void resume(); void suspend(); attributes attribute type description loadflags nsloadflags the load flags of this request.
...it is not recommended for normal browsing as it may likely violate reasonable assumptions made by the server and confuse users.
... resume() resumes the current request.
...And 4 more matches
Writing forward-compatible websites - Developer guides
as a simple example, don't assume that any browser in which "filter" in body.style tests true must be microsoft internet explorer and therefore e.g.
...don't assume that browsers with support for a given dom feature must also have some other, especially nonstandard, dom feature.
... or, conversely, that they don't have support for some other feature (e.g., don't assume that a browser that supports onload on script elements will never support onreadystatechange on them).
...And 4 more matches
MMgc - Archive of obsolete content
threading the gc routines are not currently thread safe, we're operating under the assumption that none of the player spawned threads create gc'd things.
...this is a lot to ask from our c++ developers, so instead, mmgc assumes that every memory location might potentially contain a gc pointer.
...when the gc encounters a false positive, it has to assume that it might be a pointer since it doesn't have an exact description of whether that memory is a pointer or not.
...And 3 more matches
Vulnerabilities - Archive of obsolete content
these vulnerabilities are caused by the software designer making trust assumptions that permit the software to provide beneficial features, while also introducing the possibility of someone violating the trust assumptions to compromise security.
...one of the trust assumptions in the design of the html content rendering feature was that users would not receive malicious hyperlinks and click on them.
...trust assumptions may have been explicit—for example, a designer being aware of a security weakness and determining that a separate security control would compensate for it.
...And 3 more matches
Theme changes in Firefox 2 - Archive of obsolete content
file description of change browser/bookmarks/addbookmark.css updated to include microsummary-related css changes.
... browser/bookmarks/bookmarksproperties.css new file; includes microsummary-related css.
... browser/browser.css needs to be updated to include new css for microsummaries, search fields, iconic bookmark menu items, and more.
...And 3 more matches
HTTP logging
for many bugs, the "log.txt-main" file is the only thing you need to upload as a file attachment to your bugzilla bug (this is assuming you're logging to help a mozilla developer).
...log=timestamp,rotate:200,nshttp:5,cache2:5,nssockettransport:5,nshostresolver:5,cookie:5 set moz_log_file=%temp%\log.txt "c:\program files\mozilla firefox\firefox.exe" for 32-bit windows: set moz_log=timestamp,rotate:200,nshttp:5,cache2:5,nssockettransport:5,nshostresolver:5,cookie:5 set moz_log_file=%temp%\log.txt "c:\program files (x86)\mozilla firefox\firefox.exe" (these instructions assume that you installed firefox to the default location, and that drive c: is your windows startup disk.
...the commands listed here assume a bash-compatible shell.
...And 3 more matches
Embedding the editor
(the current nseditorshell makes assumptions about the hosting xul document, which need to be broken.) composer embedded in a web page (<htmlarea>) ie 5 supports the <htmlarea> element; if mozilla is to support something similar, editor needs to be embeddable to the extent that this can be done.
...one editor per window limitation the current composer window xul/c++ architecture has grown up with the assumption that there can be just one <editor> tag per window.
...thence, lots of javascript in editor.js, composercommands.js and the various dialog js files assume that they can get at the one true editor via window.editorshell.
...And 3 more matches
Downloads.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/downloads.jsm"); method overview promise<download> createdownload(object aproperties); promise<void> fetch(asource, atarget, [optional] object aoptions); promise<downloadlist> getlist(atype); promise<downloadsummary> getsummary(atype); constants constant description public work on downloads that were not started from a private browsing window.
... getsummary() retrieves the specified type of downloadsummary object.
... there is one download summary for each type, and this method always retrieves a reference to the same download summary when called with the same argument.
...And 3 more matches
MathML Accessibility in Mozilla
torture test 10: ∑ 0 ≤ i ≤ m 0 < j < n p ( i , j ) __________ sum over fraction 0 is less than or equal to i is less than or equal to m over 0 is less than j is less than n end fraction of cap pee of open i comma j close __________ ∑ p (i, j) see webkit's bug 146407 sum.
... torture test 12: ∑ i = 1 p ∑ j = 1 q ∑ k = 1 r a i j b j k c k i __________ the sum from i is equal to 1 to pee of the sum from j is equal to 1 to q of the sum from k is equal to 1 to r of a sub i j end sub b sub j k end sub c sub k i end sub __________ ∑, with p underneath, ∑...
..., with q underneath, ∑, with r underneath, a, subscript i j, b, subscript j k, c, subscript k i see webkit's bug 146407 sum.
...And 3 more matches
Activity Monitor, Battery Status Menu and top
it is well-known and its "energy impact" measure is likely to be consulted by users to compare the power consumption of different programs.
...using the high-performance gpu can greatly increase power consumption, and should be avoided whenever possible.
... "energy impact" is a hybrid proxy measure of power consumption.
...And 3 more matches
Profiling with Xperf
just make sure you set the symbol paths before enabling "load symbols" and before opening a summary view.
...if you change it within the program, you'll have to close all summary tables and reopen them for it to pick up the new symbol path data.
...in the viewer, when summary data is viewed for heap events (heap allocations outstanding, etc.
...And 3 more matches
PR_Wait
returns the function returns one of the following values: pr_success means the thread is being resumed from the pr_wait call either because it was explicitly notified or because the time specified by the parameter ticks has expired.
... a thread waiting on the monitor resumes when the monitor is notified or when the timeout specified by the ticks parameter elapses.
... the resumption from the wait is merely a hint that a change of state has occurred.
...And 3 more matches
Shell global objects
shell principals are toys, meant only for testing; one shell principal subsumes another if its set bits are a superset of the other's.
... thus, a principal of 0 subsumes nothing, while a principals of ~0 subsumes all other principals.
... the absence of a principal is treated as if its bits were 0xffff, for subsumption purposes.
...And 3 more matches
Introduction to XPCOM for the DOM
important note: this document assumes some knowledge of c++, specially the object-oriented part of it.
...in summary, manipulate an interface rather than its implementation whenever possible!
... queryinterface() consider again the class nsfoo that implements two interfaces, nsifoo and nsifoo2: class nsfoo : public nsifoo, public nsifoo2 let's assume an instance of nsfoo was somehow created (this assertion is true most of the time).
...And 3 more matches
imgIRequest
modules/libpr0n/public/imgirequest.idlscriptable please add a summary to this article.
... inherits from: nsirequest last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void cancelandforgetobserver(in nsresult astatus); imgirequest clone(in imgidecoderobserver aobserver); void decrementanimationconsumers(); imgirequest getstaticrequest(); void incrementanimationconsumers(); void lockimage(); void requestdecode(); void unlockimage(); attributes attribute type description corsmode long the cors mode that this image was loaded with.
...imgirequest clone( in imgidecoderobserver aobserver ); parameters aobserver return value decrementanimationconsumers() tell the image it can forget about a request that the image animate.
...And 3 more matches
nsIAppShell
spatchnativeevent(in prbool arealevent, in voidptr aevent); obsolete since gecko 1.9 void exit(); void favorperformancehint(in boolean favorperfoverstarvation, in unsigned long starvationdelay); void getnativeevent(in prboolref arealevent, in voidptrref aevent); obsolete since gecko 1.9 void listentoeventqueue(in nsieventqueue aqueue, in prbool alisten); obsolete since gecko 1.9 void resumenative(); void run(); void runinstablestate(in nsirunnable arunnable); void spindown(); obsolete since gecko 1.9 void spinup(); obsolete since gecko 1.9 void suspendnative(); attributes attribute type description eventloopnestinglevel unsigned long the current event loop nesting level.
... resumenative() resumes the use of additional platform-specific methods to run() gecko events on the main application thread.
... calls to suspendnative() and resumenative may be nested.
...And 3 more matches
Streams - Plugins
streams can be produced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser.
... finding out how much data the plug-in can accept after a call to npp_newstream and before writing data to the plug-in, the browser calls npp_writeready to determine the maximum number of bytes that the plug-in can consume.
...this maximum is only a promise to consume a certain amount of data from the buffer, not an upper limit on the buffer size.
...And 3 more matches
Using the CSS Typed Object Model - Web APIs
<button>styled button</button> // get the element const button = document.queryselector( 'button' ); // retrieve all computed styles with computedstylemap() const allcomputedstyles = button.computedstylemap(); // cssmathsum example let btnwidth = allcomputedstyles.get('width') console.log( btnwidth ); // cssmathsum console.log( btnwidth.values ); // cssnumericarray {0: cssunitvalue, 1: cssunitvalue, length: 2} console.log( btnwidth.operator ); // 'sum' // csstransformvalue let transform = allcomputedstyles.get('transform'); console.log( transform ); // csstransformvalue {0: cssscale, 1: csstranslate, lengt...
... let parsedunit = cssnumericvalue.parse( unit ); console.log( parsedunit ); // cssunitvalue {value: 1.2, unit: "rem"} console.log( parsedunit.unit ); // "rem" console.log( parsedunit.value ); // 1.2 cssmathsum although the <button> element is an inline element by default, we've added display: inline-block; to enable sizing.
... when we get() the width, we get a cssmathsum returned.
...And 3 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
</div> <h1>javascript typewriter</h1> <div id="article"> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...nam turpis nunc, suscipit a hendrerit vitae, volutpat non ipsum.</p> <form> <p>phasellus ac nisl lorem: <input type="text" /><br /> <textarea style="width: 400px; height: 200px;">nullam commodo suscipit lacus non aliquet.
...pellentesque dapibus tellus ut ipsum aliquam eu auctor dui vehicula.
...And 3 more matches
Using multi-column layouts - CSS: Cascading Style Sheets
e.g., example 1 html <div id="col"> <p> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... example 2 html <div id="wid"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... example 3 html <div id="col_short"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
...And 3 more matches
HTTP conditional requests - HTTP
such requests can be useful to validate the content of a cache, and sparing a useless control, to verify the integrity of a document, like when resuming a download, or when preventing to lose updates when uploading or modifying a document on the server.
... comparing versions of the same resource is a bit tricky: depending on the context, there are two kinds of equality checks: strong validation is used when byte to byte identity is expected, for example when resuming a download.
...although there is a response/request round-trip that consumes some resources, this is more efficient than to transmit the whole resource over the wire again.
...And 3 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
this takes the base for the conversion as an optional second argument, which you should always provide: parseint('123', 10); // 123 parseint('010', 10); // 10 in older browsers, strings beginning with a "0" are assumed to be in octal (radix 8), but this hasn't been the case since 2013 or so.
...let's re-write the add function to take as many values as we want: function add() { var sum = 0; for (var i = 0, j = arguments.length; i < j; i++) { sum += arguments[i]; } return sum; } add(2, 3, 4, 5); // 14 that's really not any more useful than writing 2 + 3 + 4 + 5 though.
... let's create an averaging function: function avg() { var sum = 0; for (var i = 0, j = arguments.length; i < j; i++) { sum += arguments[i]; } return sum / arguments.length; } avg(2, 3, 4, 5); // 3.5 this is pretty useful, but it does seem a little verbose.
...And 3 more matches
Applying SVG effects to HTML content - SVG: Scalable Vector Graphics
applying the svg effect to (x)html is accomplished by assigning the target class defined above to an element, like this: <p class="target" style="background:lime;"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
...</p> <p> lorem ipsum dolor sit amet, consectetur adipisicing <b class="target">elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</b> ut enim ad minim veniam.
... <p class="target" style="background:lime;"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
...And 3 more matches
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
found 383 pages: # page tags and summary 1 svg: scalable vector graphics 2d graphics, graphics, icons, images, reference, responsive design, svg, scalable graphics, scalable images, vector graphics, web, l10n:priority scalable vector graphics (svg) are an xml-based markup language for describing two-dimensional based vector graphics.xml 2 applying svg effects to html content css, guide, html, svg modern browsers support using svg within css styles to apply graphical effects to html content.
... 8 other resources reference, svg here is a list of additional resources on svg: 9 project svg no summary!
... 21 additive needscompattable, needsexample, svg, svg attribute no summary!
...And 3 more matches
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes found 54 pages: # page tags and summary 1 xslt: extensible stylesheet language transformations landing, web, xslt extensible stylesheet language transformations (xslt) is an xml-based language used, in conjunction with specialized processing software, for the transformation of xml documents.
... 3 index index, reference, xslt found 54 pages: 4 pi parameters xslt no summary!
... 5 the xslt/javascript interface in gecko xslt no summary!
...And 3 more matches
Index of archived content - Archive of obsolete content
dat file automatically handle failed asserts in debug builds blackconnect blackwood bonsai bookmark keywords build building transformiix standalone chromeless compiling the npruntime sample plugin in visual studio creating a firefox sidebar extension creating a microsummary creating a mozilla extension adding the structure conclusion enabling the behavior - retrieving tinderbox status enabling the behavior - updating the status bar panel enabling the behavior - updating the status periodically finding the code to modify finding the file to modify...
... getting started in-depth links contents.rdf toolbarbindings.xml creating a skin for seamonkey 2.x getting started chrome.manifest install.rdf creating a hybrid cd creating regular expressions for a microsummary generator dtrace dehydra dehydra frequently asked questions dehydra function reference dehydra object reference installing dehydra using dehydra developing new mozilla features devmo 1.0 launch roadmap download manager improvements in fir...
... ui selection jspage statusbar statusbar litmus tests mac os x build prerequisites/fink makefile.mozextension.2 message summary database metro browser chrome tests microsummary topics microsummary xml grammar reference migrate apps from internet explorer to mozilla modularization techniques monitoring downloads mozilla application framework mozilla application frame...
...And 2 more matches
The Implementation of the Application Object Model - Archive of obsolete content
in html or xul, when you put one tag inside another tag, a relationship of containment can safely be assumed.
...in order to achieve aggregation of data, a content node implementation cannot make any assumptions about what kind of children it holds.
...well, let's take this problem to the natural extreme, and assume that there are n total possible representations for the same group of data.
...And 2 more matches
panel - Archive of obsolete content
ArchiveMozillaXULpanel
attributes backdrag, close, consumeoutsideclicks, fade, flip, ignorekeys, label, left, level, noautofocus, noautohide, norestorefocus, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, titlebar, top, type properties accessibletype, label, popupboxobject, popup, state methods hidepopup, moveto, openpopup, openpopupatscreen, sizeto examples the following example shows how a panel may be attached to ...
... consumeoutsideclicks type: boolean controls whether or not the event that caused the popup to be automatically dismissed (or "rolled up") should be consumed or be dispatched as a normal event.
...if it set to true the rollup event is consumed.
...And 2 more matches
calICalendarView - Archive of obsolete content
summary an object implementing calicalendarview is generally intended to serve as a way of manipulating a set of dom nodes corresonding to a visual representation of calievent and calitodo objects.
... calendar/base/public/calicalendarview.idlscriptable please add a summary to this article.
...note that in most cases, this attribute will be set by the consumers of calicalendarview very early in an application/extension's loading process.
...And 2 more matches
What is RSS - Archive of obsolete content
it wasn't really a format for syndication, but was a format for providing a summary of a website.
... in fact, back then, rss did not stand for really simple syndication but stood for rich site summary.
...like rss 0.90, netscape's rss 0.91 was also a format for providing a summary of a website, and not really a syndication format (as it is today).
...And 2 more matches
Efficient animation for web games - Game development
because of this, the browser can make some assumptions that it can’t easily make when you’re manually tweaking values in javascript.
...when you animate position with javascript, the browser cannot easily make that same assumption, and so you might end up causing it to draw only the newly-exposed region of content, which may introduce slow-down.
... speaking of the assumptions that the browser can make, you should avoid causing it to have to re-layout during animations.
...And 2 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
found 528 pages: # page tags and summary 1 mdn web docs glossary: definitions of web-related terms beginner, definitions, dictionary, glossary, index, landing, terminology web technologies contain long lists of jargon and abbreviations that are used in documentation and coding.
...this is defined by the layout mode; it is usually the alignment subject’s containing block, and assumes the writing mode of the box establishing the containing block.
...for example, an html document is data, but html can also contain metadata in its <head> element that describes the document — for example who wrote it, and its summary.
...And 2 more matches
Legacy layout methods - Learn web development
replace whatever is inside the body currently with the following: <h1>2 column layout example</h1> <div> <h2>first column</h2> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...integer ligula ipsum, tristique sit amet orci vel, viverra egestas ligula.
...now we just need to float the columns, like so: div:nth-of-type(1) { width: 48%; float: left; } div:nth-of-type(2) { width: 48%; float: right; } putting this all together should give us a result like so: simple two-column layout <h1>2 column layout example</h1> <div> <h2>first column</h2> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...And 2 more matches
Positioning - Learn web development
sticky positioning example <h1>sticky positioning</h1> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...integer ligula ipsum, tristique sit amet orci vel, viverra egestas ligula.
...cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...And 2 more matches
Practical positioning examples - Learn web development
let's look at the html contained within the body: <section class="info-box"> <ul> <li><a href="#" class="active">tab 1</a></li> <li><a href="#">tab 2</a></li> <li><a href="#">tab 3</a></li> </ul> <div class="panels"> <article class="active-panel"> <h2>the first tab</h2> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...vivamus varius libero at ipsum mattis efficitur ut nec nisl.
...nulla facilisi.</p> </article> <article> <h2>the second tab</h2> <p>this tab hasn't got any lorem ipsum in it.
...And 2 more matches
Document and website structure - Learn web development
--> <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.
...set sit amet ipsum mauris.
...lorem ipsum dolor sit amet, consectetur adipisicing elit.
...And 2 more matches
Index - Learn web development
found 348 pages: # page tags and summary 1 learn web development beginner, css, html, index, intro, landing, learn, web welcome to the mdn learning area.
... 3 accessible multimedia accessibility, article, audio, beginner, codingscripting, html, images, javascript, learn, multimedia, video, captions, subtitles, text tracks this chapter has provided a summary of accessibility concerns for multimedia content, along with some practical solutions.
... 145 introduction to css layout article, beginner, css, floats, grids, introduction, layout, learn, positioning, tables, flexbox, flow this article has provided a brief summary of all the layout technologies you should know about.
...And 2 more matches
How Mozilla's build system works
since the dawn of mozilla, this has been done with the make tool, consuming makefiles.
...if you wanted to create a consumer that performed a line count of all c++ files or generated a clang compilation database, for example, this would be an acceptable use of a buildbackend.
... technically, we don't need to feed the treemetadataemitter output into a buildbackend: it's possible to create your own consumer.
...And 2 more matches
Index
found 42 pages: # page tags and summary 1 localization at mozilla landing, localization, mozilla, translation, l10n localization (l10n) is the process of translating software user interfaces from one language to another and adapting it to suit a foreign culture.
... 25 localizing with mozilla translator guide, localization, translator, l10n no summary!
...to translate it, you can follow one of two approaches: 29 mozilla content localized in your language localization, mdn, mozilla, reference, style guide no summary!
...And 2 more matches
SpiderMonkey Internals
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.
...an example, from perfect.js: function perfect(n) { print("the perfect numbers up to " + n + " are:"); // we build sumofdivisors[i] to hold a string expression for // the sum of the divisors of i, excluding i itself.
... var sumofdivisors = new exprarray(n + 1, 1); for (var divisor = 2; divisor <= n; divisor++) { for (var j = divisor + divisor; j <= n; j += divisor) { sumofdivisors[j] += " + " + divisor; } // at this point everything up to 'divisor' has its sumofdivisors // expression calculated, so we can determine whether it's perfect // already by evaluating.
...And 2 more matches
nsIDocShell
void preparefornewcontentmodel(); void resumerefreshuris(); void setchildoffset(in unsigned long offset); native code only!
...this is not refcounted and is assumed to be nulled out by the parent when the parent is going away.
...resumerefreshuris() restart the xpcom timers for each meta-refresh uri in this docshell, and this docshell's children, recursively.
...And 2 more matches
nsIDownloadManager
r(in nsidownload adownload, in nsidomwindow aparent, in boolean acanceldownloadonclose); obsolete since gecko 1.9.1 void pausedownload(in unsigned long aid); void removedownload(in unsigned long aid); void removedownloadsbytimeframe(in long long abegintime, in long long aendtime); void removelistener(in nsidownloadprogresslistener alistener); void resumedownload(in unsigned long aid); void retrydownload(in unsigned long aid); void savestate(); obsolete since gecko 1.8 void startbatchupdate(); obsolete since gecko 1.9.1 attributes attribute type description activedownloadcount long the number of files currently being downloaded.
... also notifies observers of the "download-manager-remove-download" topic with a null subject to allow any download manager consumers to react to the removals.
... also notifies observers of the "download-manager-remove-download" topic with the download id as the subject to allow any download manager consumers to react to the removal.
...And 2 more matches
Getting Started Guide
in the example above, there is no reason to assume that the nsifoo* c++ pulls out of p would be the same one that p->queryinterface() would return.
...after learning how nscomptr automatically addrefs a pointer as it is being assigned in, the natural assumption is that it does the same thing when assigning out.
... // incorrect assumptions about |nscomptr|...
...And 2 more matches
Activity Manager examples
ing a process into the activity manager const nsiap = components.interfaces.nsiactivityprocess; const nsiae = components.interfaces.nsiactivityevent; const nsiam = components.interfaces.nsiactivitymanager; let gactivitymanager = components.classes["@mozilla.org/activity-manager;1"].getservice(nsiam); let process = components.classes["@mozilla.org/activity-process;1"].createinstance(nsiap); // assuming folder is an instance of nsimsgfolder interface // localization is omitted, initiator is not provided process.init("processing folder: " + folder.prettiestname, null); // note that we don't define a custom icon, default process icon // will be used process.contexttype = "account"; // group this activity by account process.contextobj = folder.server; // account in question g...
... // assuming that the initiator has some way to cancel // the junk processing for given folder if (initiator.cancelfolderop(folder)) { aactivity.state = components.interfaces.nsiactivityprocess.state_canceled; gactivitymanager.removeactivity(aactivity.id); return cr.ns_success; } } return cr.ns_failure; } } // step 2: modify the previous sample to add initiator, s...
...// assuming that gjunkprocessor is the entity initiating the junk processing // activity, and it has cancelfolderop method that cancels the operations on folders process.init("processing folder: " + folder.prettiestname, gjunkprocessor); // folder is being filtered/processed process.addsubject(folder); process.cancelhandler = new canceljunkprocess(); ...
...And 2 more matches
CData
8-bit strings are assumed to be encoded as utf-8.
... 8-bit strings are assumed to be encoded as utf-8.
... here is a method to read "malformed", it attempts to do readstring on it, if it errors then it tries to read it in another way, so this is an alternative to readstringreplacemalformed, it is an attempt at readingmalformed function readaschar8thenaschar16(stringptr, known_len, jschar) { // when reading as jschar it assumes max length of 500 // stringptr is either char or jschar, if you know its jschar for sure, pass 2nd arg as true // if known_len is passed, then assumption is not made, at the known_len position in array we will see a null char // i tried getting known_len from stringptr but its not possible, it has be known, i tried this: //"stringptr.contents.tostring()" "95" //"str...
...And 2 more matches
Mozilla
see querying places for information about obtaining and using nsinavhistoryresult objects, which this page assumes you are familiar with.
... implementing download resuming this document describes how an embedder or other gecko/necko-using application can implement download resuming.
...all the methods that are supposed to show up on this jsobject are actually not properties of the object itself, but rather properties of the prototype of the jsobject for the wrapper (unless the c++ object's class info has the flag nsixpcscriptable::dont_share_prototype set, but lets assume that's not the case here).
...And 2 more matches
Debugger.Memory - Firefox Developer Tools
function properties of the debugger.memory.prototype object memory use analysis exposes implementation details memory analysis may yield surprising results, because browser implementation details that are transparent to content javascript often have visible effects on memory consumption.
... web developers need to know their pages’ actual memory consumption on real browsers, so it is correct for the tool to expose these behaviors, as long as it is done in a way that helps developers make decisions about their own code.
...however, the memory consumed by the string itself is a small constant independent of its size, since it is simply a reference to the larger string, a start position, and a length.
...And 2 more matches
Index - Firefox Developer Tools
found 158 pages: # page tags and summary 1 firefox developer tools developing mozilla, guide, tools, web development, web development:tools, l10n:priority firefox developer tools is a set of web developer tools built into firefox.
... 48 network monitor recording 110n:priority, debugging, dev tools, firefox, guide, networking, tools you can pause and resume the monitoring of network traffic using the pause button.
... 124 ignore a source in modern web development, we often rely on libraries like jquery, ember, or angular, and 99% of the time we can safely assume that they “just work”.
...And 2 more matches
HTMLImageElement.alt - Web APIs
<div class="container"> <div class="left-margin"> <img src="/files/16861/margin-flourish.svg" alt=""> </div> <div class="contents"> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...lorem ipsum dolor sit amet, consectetur adipiscing elit.
...umicon.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.
...And 2 more matches
KeyboardEvent.getModifierState() - Web APIs
if (event.getmodifierstate("control") + event.getmodifierstate("alt") + event.getmodifierstate("meta") > 1) { return; } // handle shortcut key with standard modifier if (event.getmodifierstate("accel")) { switch (event.key.tolowercase()) { case "c": if (event.getmodifierstate("shift")) { // handle accel + shift + c event.preventdefault(); // consume the key event } break; case "k": if (!event.getmodifierstate("shift")) { // handle accel + k event.preventdefault(); // consume the key event } break; } return; } // do somethig different for arrow keys if scrolllock is locked.
... if ((event.getmodifierstate("scrolllock") || event.getmodifierstate("scroll") /* hack for ie */) && !event.getmodifierstate("control") && !event.getmodifierstate("alt") && !event.getmodifierstate("meta")) { switch (event.key) { case "arrowdown": case "down": // hack for ie and old gecko event.preventdefault(); // consume the key event break; case "arrowleft": case "left": // hack for ie and old gecko // do something different if scrolllock is locked.
... event.preventdefault(); // consume the key event break; case "arrowright": case "right": // hack for ie and old gecko // do something different if scrolllock is locked.
...And 2 more matches
Request.cache - Web APIs
WebAPIRequestcache
fetch("some.json", {cache: "no-store"}) .then(function(response) { /* consume the response */ }); // download a resource with cache busting, but update the http // cache with the downloaded resource.
... fetch("some.json", {cache: "reload"}) .then(function(response) { /* consume the response */ }); // download a resource with cache busting when dealing with a // properly configured server that will send the correct etag // and date headers and properly handle if-modified-since and // if-none-match request headers, therefore we can rely on the // validation to guarantee a fresh response.
... fetch("some.json", {cache: "no-cache"}) .then(function(response) { /* consume the response */ }); // download a resource with economics in mind!
...And 2 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
note: this article presumes that you are familiar with the concepts introduced in geometry and reference spaces in webxr: that is, the basics of 3d coordinate systems, as well as webxr spaces, reference spaces, and how reference spaces are used to create local coordinate systems for individual objects or movable components within a scene.
...with this in hand, we can resume rendering the scene as usual, with the viewer's perspective unaffected.
...not only does your app need to determine what to show the user during these periods, but it needs to cleanly recover when tracking resumes.
...And 2 more matches
Web Accessibility: Understanding Colors and Luminance - Accessibility
because of the current domination of the rgb color space in measuring color output, most calculations in this document are presumed to be in the rgb color space, and very specifically, in the srgb color space.
... in speaking specifically to relative luminance, wcag's definition of relative luminance notes: "note 2: almost all systems used today to view web content assume srgb encoding.
... to summarize, color is as much about human physiology and perception in the brain as it is the measurement of light coming from a computer screen.
...And 2 more matches
all - CSS: Cascading Style Sheets
WebCSSall
ormal definition initial valuethere is no practical initial value for it.applies toall elementsinheritednocomputed valueas the specified value applies to each property this is a shorthand for.animation typeas each of the properties of the shorthand (all properties but unicode-bidi and direction) formal syntax initial | inherit | unset | revert examples html <blockquote id="quote"> lorem ipsum dolor sit amet, consectetur adipiscing elit.
... css body { font-size: small; background-color: #f0f0f0; color: blue; } blockquote { background-color: skyblue; color: red; } result no all property <blockquote id="quote">lorem ipsum dolor sit amet, consectetur adipiscing elit.</blockquote> phasellus eget velit sagittis.
... all:unset <blockquote id="quote">lorem ipsum dolor sit amet, consectetur adipiscing elit.</blockquote> phasellus eget velit sagittis.
...And 2 more matches
text-justify - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toinline-level and table-cell elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | inter-character | inter-word | none examples <p class="none"><code>text-justify: none</code> —<br>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...cras eu elementum dui.</p> <p class="auto"><code>text-justify: auto</code> —<br>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...cras eu elementum dui.</p> <p class="dist"><code>text-justify: distribute</code> —<br>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...And 2 more matches
HTTP Index - HTTP
WebHTTPIndex
this page lists all mdn http pages along with their summary and tags.
... found 277 pages: # page tags and summary 1 http http, hypertext, reference, tcp/ip, web, web development, l10n:priority hypertext transfer protocol (http) is an application-layer protocol for transmitting hypermedia documents, such as html.
... 39 http index http, index this page lists all mdn http pages along with their summary and tags.
...And 2 more matches
yield - JavaScript
the yield keyword is used to pause and resume a generator function (function* or legacy generator function).
... rv optional retrieves the optional value passed to the generator's next() method to resume its execution.
...each time the generator's next() method is called, the generator resumes execution, and runs until it reaches one of the following: a yield, which causes the generator to once again pause and return the generator's new value.
...And 2 more matches
Understanding WebAssembly text format - WebAssembly
for example, local.get is defined to push the value of the local it read onto the stack, and i32.add pops two i32 values (it implicitly grabs the previous two values pushed onto the stack), computes their sum (modulo 2^32) and pushes the resulting i32 value.
...let's assume that we’ve written a suitable string of bytes to memory; how do we pass that string out to javascript?
...since webassembly is typechecked, and the funcref can be potentially any function signature, we have to supply the presumed signature of the callee at the callsite, hence we include the $return_i32 type, to tell the program a function returning an i32 is expected.
...And 2 more matches
core/promise - Archive of obsolete content
}); consuming promises in general, the whole purpose of promises is to avoid the so-called callback spaghetti.
...module exports promised function to do exactly that: const { promised } = require('sdk/core/promise'); function sum(x, y) { return x + y }; var asyncsum = promised(sum); var c = sum(a, b); var casync = asyncsum(aasync(), basync()); promised takes normal function and composes new promise-aware version of it.
...for example grouping promises to observe single resolution of all of them is as simple as this: var group = promised(array); var abc = group(aasync, basync, casync).then(function(items) { return items[0] + items[1] + items[2]; }); all the all function is provided to consume an array of promises and return a promise that will be accepted upon the acceptance of all the promises in the initial array.
... const { all } = require('sdk/core/promise'); all([aasync, failasync, basync]).then(function (result) { // success function will not be called return result; }, function (reason) { // rejection handler called because `failasync` promise // was rejected with its reason propagated return reason; }); making promises everything above assumes you get a promise from somewhere else.
lang/functional - Archive of obsolete content
let { invoke } = require("sdk/lang/functional"); invoke(sum, [1,2,3,4,5], null); // 15 function sum () { return array.slice(arguments).reduce(function (a, b) { return a + b; }); } parameters callee : function function to invoke.
... compose(fn...) returns the composition of a list of functions, where each function consumes the return value of the function that follows.
...our hash // function will just parse the last name, as our naive // implementation assumes that they will share the same lineage let getlineage = memoize(function (name) { // computes lineage return data; }, hasher); // hashing function takes a string of first and last name // and returns the last name.
... let { once } = require("sdk/lang/functional"); let setup = once(function (env) { // initializing important things console.log("successfully initialized " + env); return 1; // assume success and return 1 }); setup('dev'); // returns 1 // prints "successfully initialized dev" // future attempts to call this function just return the cached // value that was returned previously setup('production'); // returns 1 // no print message is displayed since the function isn't executed parameters fn : function the function that will be executed only once inside the once wrapper.
Appendix: What you should know about open-source software licenses - Archive of obsolete content
this document was authored by yutaka kachi and was originally published in japanese for the firefox developers conference summer 2007.
...yukihiro matsumoto, the developer behind the ruby scripting language, published a “free software license diagnostic” in his personal blog.
... the title hints at matsumoto’s diagnostic approach, since it mentions “free software.” this is slightly different from open source.
... (matsumoto updated his free software license diagnostic for a special open-source section in the january 2007 edition of softbank’s open source magazine.) if a company is considering releasing its own software as open source, it should consider dual-licensing or the cpl.
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
« previous this document was authored by taro (btm) matsuzawa and was originally published in japanese for the firefox developers conference summer 2007.
... once you’ve finished your inspection, you can continue and let the halted program resume execution.
...fixme: not sure we should talk about this tool installation windows users can take advantage of a self-contained version created by soutaro matsumoto called “gonzui for win32” http://soutaro.com/gonzui-win32/ run it as follows: download gonzui-win32-1.2.2.zip and expand it into a suitable directory.
... fixme: figure a: gonzui 1 - http://quicknote.mozdev.org 2 - http://www5f.biglobe.ne.jp/~t-susumu/ 3 - reverse-polish notation.
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
« previousnext » this document was authored by taiga (gomita) gomibuchi and was originally published in japanese for the firefox developers conference summer 2007.
...the folder can be wherever you want, but for the purposes of this guide, we’ll assume it’s at c:\extensions\helloworld .
...assuming you’ve done that, you’ll be able to confirm the changes to overlay.xul and clock.xul without the bother of relaunching firefox or reinstalling the extension.
...the following all assumes that you’ve disabled the xul cache as discussed in the section “setting up your development environment”.
Download Manager preferences - Archive of obsolete content
0 indicates that the downloads should be paused and resumed automatically the next time firefox is run; 1 indicates that the downloads should be paused but will not automatically resume when the application is restarted; and 2 indicates that the downloads will be canceled on quit.
... default value is 0 (resume on next launch).
... browser.download.manager.resumeonwakedelay an integer value indicating the number of milliseconds to wait after the system wakes up from sleep before resuming downloads.
... on other oses the default value is true if a preference is not set when the download manager looks it up, the download manager assumes the default value but doesn't necessarily add the missing preference.
Binding Attachment and Detachment - Archive of obsolete content
scripts that invoke this method should not assume that the binding is installed immediately after this method returns.
...when the load event fires, and if all binding documents loaded successfully, it can be assumed that all bindings are attached to all elements in the page.
... for elements that are created during or after the load event is fired, no assumptions can be made regarding order of binding attachment.
... the rule for detachment can be summarized as follows.
Using XPInstall to Install Plugins - Archive of obsolete content
in a nutshell, the first install problem can be summed up by the question: how can a browser which is installed on a user's machine after a given plugin has already been installed by the user benefit from the existing installation rather than download the same plugin again?
...) has already been called // using the install object's execute method to block on a native installer execute("setup.exe", "-s", true); // in the above sample, assume that running "setup -s" from the // command prompt runs the setup executable, and that "-s" is some // invocation parameter defined by the setup.exe file, perhaps to force // the installer to run silently.
...this install.js file assumes that the plugin software that is to be installed consists of both a dll and an xpt file, which is not always true.
...it is, however, a safe assumption for most plugins, especially macromedia's flash plugin which consists of a single dll (on windows this is npswf32.dll) and a single xpt file for scriptability (called flashplayer.xpt).
patch - Archive of obsolete content
summary updates an existing component.
...if the existing version of the file does not match the checksum stored in the gdiff file, patch returns an error without applying the patch.
... after patch applies a patch, it compares a checksum.of the resulting file against a checksum stored in the gdiff file.
... if the checksums do not match, the original version of the file is preserved, the patched version of the file is discarded, and an error code is returned.
Anonymous Content - Archive of obsolete content
presumably this binding would be bound to a scroll bar, although it doesn't have to be.
...the result of using the above binding is that the line of xul below will be expanded as follows, assuming that the scrollbar is bound to the xbl above: <scrollbar/> expands to: <scrollbar> <xul:scrollbarbutton type="decrement"/> <xul:slider flex="1"> <xul:thumb/> </xul:slider> <xul:scrollbarbutton type="increment"/> </scrollbar> the elements within the content tag are added to the scroll bar anonymously.
...if you don't use the namespace on xul elements, mozilla will assume that the elements are xbl, not understand them, and your elements won't work correctly.
...for example, take this xul fragment, assuming it is bound to the scrollbar xbl earlier: <scrollbar/> <scrollbar> <button label="overridden"/> </scrollbar> the first scroll bar, because it has no content of its own, will have its content generated from a binding definition declared in an xbl file.
Skinning XUL Files by Hand - Archive of obsolete content
it presumes you have at least basic understanding of xul and the application object model that xul describes.
... appearing within other elements, such as italicized text anywhere within a <p> element or a <div> -- can be grouped in css, but this is an extremely inefficient way to style xul, and is frowned upon in the mozilla development community (again, refer to the skinning guidelines in writing skinnable xul and css for more info); css2 also provides some new ways to group elements for styling, which we summarize briefly here, because they appear in mozilla with some frequency, but reserve for another article: pseudo-class parent-child element:pseudo-class { attribute: value; } parent > child { attribute: value; } button:hover { border: 1px; } menu#file > menuitem { font-weight: bold; } pseudo-classes reflect states of the eleme...
... loading stylesheets in xul for your custom skin, let's assume you want to skin the xul file, xulnote_sample1.xul.
...not only is the production of such interfaces democratized, in other words; the consumption and distribution of these interfaces is equally democratic.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.tech.layout september 22-29, 2006 announcements no announcements for this week.
... * @param amargin the sum of the left and right margins of the * frame, including actual values resulting from * percentages, but not including actual values * resulting from 'auto'.
... * @param aborder the sum of the left and right border widths of the * frame.
... * @param apadding the sum of the left and right margins of the * frame, including actual values resulting from * percentages.
NPAPI plugin reference - Archive of obsolete content
npn newstream requests the creation of a new data stream produced by the plug-in and consumed by the browser.
... npn_write pushes data into a stream produced by the plug-in and consumed by the browser.
...(remark: hence the name "npp_write" is misleading - just think of:"data_arrived") npp_writeready determines maximum number of bytes that the plug-in can consume.
... npstream represents a stream of data either produced by the browser and consumed by the plug-in, or produced by the plug-in and consumed by the browser.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
it is assumed that you have already downloaded, extracted, and consumed the necessary documentation to get up and running with some basic rhino scripts.
... e4x (ecmascript for xml) is an extension of javascript which provides direct support for xml, greatly simplifying the process of consuming xml via javascript.
...</comments> now that we've created this simple xml feed, we can now also consume it using the code from listing 11.
... listing 11 - consuming the xml feed <script runat="server"> var r = jaxer.web.get("service.html", {as: 'e4x'}); for (var i=0, len = r.comment.length(); i<len; i++) { var comment = r.comment[i]; document.write('id: ' + comment.@id + '<br/>'); document.write('name: ' + comment.@name + '<br/>'); document.write('message: ' + comment.@message + '<br/>'); document.write('<hr/>'); } </script> the code in listing 11 is very simple.
Index - Game development
found 74 pages: # page tags and summary 1 game development apps, game development, gamedev, games, html5 games, javascript games, web gaming is one of the most popular computer activities.
... 4 index meta found 74 pages: 5 introduction to html5 game development (summary) firefox os, games, html5, mobile games built with html5 work on smartphones, tablets, pcs and smart tvs.update your game whenever you want.players can play the game anywhere, anytime.
... 6 introduction to game development for the web firefox os, games, guide, mobile no summary!
...it is assumed that before reading this you have read our 3d collision detection introductory article first, and have basic knowledge about three.js.
Grids - Learn web development
integer ligula ipsum, tristique sit amet orci vel, viverra egestas ligula.
...integer ligula ipsum, tristique sit amet orci vel, viverra egestas ligula.
...integer ligula ipsum, tristique sit amet orci vel, viverra egestas ligula.
... summary in this overview we have toured the main features of css grid layout.
Sending form data - Learn web development
client/server architecture at it's most basic, the web uses a client/server architecture that can be summarized as follows.
...assuming you've used the post method, the following example just takes the data and displays it to the user.
...don't assume that you've seen all the possible problems.
... summary as we'd alluded to above, sending form data is easy, but securing an application can be tricky.
Basic math in JavaScript — numbers and operators - Learn web development
you can test this by typing in the following: typeof mynumber; to fix the calculation, you can do this: number(mynumber) + 3; arithmetic operators arithmetic operators are the basic operators that we use to do sums in javascript: operator name purpose example + addition adds two numbers together.
... first try entering some simple examples of your own, such as 10 + 7 9 * 8 60 % 3 you can also try declaring and initializing some numbers inside variables, and try using those in the sums — the variables will behave exactly like the values they hold for the purposes of the sum.
... operator precedence let's look at the last example from above, assuming that num2 holds the value 50 and num1 holds the value 10 (as originally stated above): num2 + num1 / 8 + 2; as a human being, you may read this as "50 plus 10 equals 60", then "8 plus 2 equals 10", and finally "60 divided by 10 equals 6".
... summary in this article we have covered the fundamental information you need to know about numbers in javascript, for now.
TypeScript support in Svelte - Learn web development
anyway, assuming you are inside the vs code application, from the root of your project's folder, type code .
...and how could we handle a stack of types we don't know yet, and that should be defined by the consumer?
...now we want the consumers of localstore to be able to specify the type of data to persist, but instead of working with any type they should comply with the jsonvalue type.
... summary in this article we took our to-do list application and ported it to typescript.
Focus management with Vue refs - Learn web development
inside app.vue, update your <h2> as follows: <h2 id="list-summary" ref="listsummary" tabindex="-1">{{listsummary}}</h2> note: tabindex is a really powerful tool for handling certian accessibility problems.
...at the end of deletetodo(), use the listsummary ref to set focus on the <h2>.
... deletetodo(todoid) { const itemindex = this.todoitems.findindex(item => item.id === todoid); this.todoitems.splice(itemindex, 1); this.$refs.listsummary.focus(); } now, when you delete an item from your list, focus should be moved up to the list heading.
... summary so that's it for focus management, and for our app!
Introduction to automated testing - Learn web development
previous overview: cross browser testing next manually running tests on several browsers and devices, several times per day, can get tedious, and time-consuming.
...the only difference between their premium and their freemium plan is on the amount of consumption.
...the dashboard will provide you details related to how many minutes you have consumed, how many concurrent sessions are running, your total number of tests to date, and more.
... summary this was quite a ride, but i'm sure you can start to see the benefits of using automation tools to do some of the heavy lifting in terms of testing.
Introduction to cross browser testing - Learn web development
workflows for cross browser testing all of this cross browser testing business may sound time consuming and scary, but it needn't be — you just need to plan carefully for it, and make sure you do enough testing in the right places to make sure you don't run into unexpected problems.
... if you leave all the testing to the end of a project, any bugs you uncover will be a lot more expensive and time consuming to fix than if you uncover them and fix them as you go along.
...we will look at the different parts of the testing process in much greater detail in subsequent articles, but for now let's just summarize what may occur in each step.
... reporting bugs just to reiterate on what was said above, if you discover bugs in browsers, you should report them: firefox bugzilla edgehtml issue tracker safari chrome opera summary this article should have given you a high-level understanding of the most important concepts you need to know about cross browser testing.
Command line crash course - Learn web development
many tutorials and tools that exist on the web today support (and sadly assume) unix-based systems, but not to worry — they are available on most systems.
...all the operating systems (assuming a default setup) will launch their terminal program in your "home" directory, and from there you’re likely to want to move to a different place.
...assuming the directory is inside your home directory, you can use cd desktop (see the screenshots below).
... summary that brings us to the end of our brief tour of the terminal/command line.
Package management basics - Learn web development
these are the files you would upload to your web server when releasing the site online for public consumption.
...pnpm and yarn can consume the same package.json format as npm, and can install any package from the npm and other package registries.
... this is determined using a system called semver, which might look a bit complicated from the documentation but can be simplified by considering only the summary information and that a version is represented by major.minor.patch, such as 2.0.1 being major version 2 with patch version 1.
... summary this brings us to the end of our tour of package managers.
Accessibility API cross-reference
form <form> presumably msaa's graphic is aria's and html's img?
...a case, they should be wrapped in a <reference> pragmatically however, user agents should expect to find <link> tags as direct children of <toci> abstract role - a perceivable section containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page.
... such a page summary could be generated dynamically by a user agent or assistive technology.
... section (abstract role) <section> <sect> a structure that labels or summarizes the topic of its related section.
IME handling guide
notify_ime_of_blur when an imecontentobserver instance ends observing the focused editor, this is sent to widget synchronously because assumed that this notification causes neither query content events nor composition events.
...if ime consumes an event, widget should return ns_success_event_consumed from nsiwidget::notifyime().
... note that if a mousedown event or a mouseup event is consumed by a web application (before a focused editor handles it), this notification is not sent to widget.
...for example, pressing the space key to attempt scrolling a page may be consumed and prevented by ime.
DMD
assuming you have done a local build, the app identifier will be org.mozilla.fennec_$username ($username is your username on the host machine) and so we do this as shown below.
... "summary": gives measurements of the total heap, and the unreported/once-reported/twice-reported portions of it.
... "summary": gives measurements of the total heap.
... "summary": gives measurements of the total (cumulative) heap.
powermetrics
the sum of the process values typically exceeds the coalition value slightly, for unknown reasons.
...high frequency timers, which typically have short time-to-deadlines, can cause high power consumption and should be avoided if possible.
...results in lower power consumption — for all of these measurements.
... mach power you can use the mach power command to run powermetrics in combination with rapl in a way that gives the most useful summary measurements for each of firefox, chrome and safari.
tools/power/rapl
these are machine-wide estimates, so if you want to estimate the power consumption of a single program you should minimize other activity on the machine while measuring.
... the total power is the sum of the package power and the ram power.
... once sampling is finished — either because the user interrupted it, or because the requested number of samples has been taken — the following summary data is shown: 10 samples taken over a period of 10.000 seconds distribution of 'total' values: mean = 8.85 w std dev = 3.50 w 0th percentile = 5.17 w (min) 5th percentile = 5.17 w 25th percentile = 5.17 w 50th percentile = 8.13 w 75th percentile = 11.16 w 95th percentile = 14.63 w 100th percentile = 14.63 w (max) the distribution data is omitted if there...
... combining with powermetrics on mac, you can use the mach power command to run rapl in combination with powermetrics in a way that gives the most useful summary measurements for each of firefox, chrome and safari.
nss tech note6
nss .chk files for the fips 140 mode nss technical note: 6 in nss 3.8, we added checksum files required for the nss softoken to operate in fips 140 mode.
... the new checksum file is called libsoftokn3.chk on unix/linux and softokn3.chk on windows.
...the libsoftokn3.chk/softokn3.chk file contains a checksum for the softoken.
... when in fips 140 mode, the softoken is required to compute its checksum and compare it with the value in libsoftokn3.chk/softokn3.chk.
PKCS11 Implement
summarizes the support nss expects from different kinds of tokens.
... nss's interpretation of the ckf_login_required and ckf_user_pin_initialized flags cfk_login_required cfk_user_pin_initialized nss assumes that: false false this is a general access device.
... table 1.2 summarizes the pkcs #11 functions (in addition to the other functions described in this document) that nss expects each type of token to support.
... read/write and read-only requirements the nss assumes that the following operations always require a read/write session: creating a token object, such as with c_createobject (token) or c_destroyobject (token) changing a password initializing a token creating session objects must work with a read-only session.
Rhino Debugger
controlling execution the debugger provides the following facilities for you to control the execution of scripts you are debugging: step into to single step entering any function calls, you may do any of the following: select the debug->step into menu item on the menu bar press the step into button on the toolbar press the f11 key on the keyboard execution will resume.
... step over to single step to the next line in the current function, you may do any of the following: select the debug->step over menu item on the menu bar press the step over button on the toolbar press the f7 key on the keyboard execution will resume but control will return to the debugger at the next line in the current function or top-level script.
... step out to continue execution until the current function returns you may do any of the following: select the debug->step out menu item on the menu bar press the step out button on the toolbar press the f8 key on the keyboard execution will resume until the current function returns or a breakpoint is hit.
... go to resume execution of a script you may do any of the following: select the debug->go menu item on the menu bar press the go button on the toolbar press the f5 key on the keyboard execution will resume until a breakpoint is hit or the script completes.
GCIntegration - SpiderMonkey Redirect 1
{{ svg{source: "http://people.mozilla.org/~wmccloskey/incremental1.svg", embedding: "iframe", height:"130"} }} assume object b is already marked, as in the leftmost frame, while objects a and c have not been marked yet.
...this barrier is conservative—it assumes that any destroyed pointer was pointing to an object that was part of the initial snapshot.
...assume that an incremental gc has already started, and a and b have been marked.
...now let's assume, between the left and right frames, that some code has read the weak pointer to c and then created a regular (strong) reference from b to c.
Mork
MozillaTechMork
values are merely an opaque sequence of bytes, so their actual content is dependent on the mork consumer.
... hex = [0-9a-fa-f]+ name = [a-za-z_?:] [a-za-z_?:+-]* value is a string terminated by ')' (not consumed) where '\' quotes the next metacharacter and '$' quotes the next two hexadecimal digits as a value (e.g., $20 is a space) the first line in the file is the header.
...for example, the message summary format files use a table for each thread, where the meta-rows represent information about the thread in general.
...in many places, the mid's scope has an assumed default value; if the scope component is not present, it assumes this default value.
Starting WebLock
assuming there weren't any unexpected errors, the variable catman holds the nsicategorymanager interface pointer, which you can use to add the component as a startup observer by calling a method on the nsicategorymanager.
... common xpcom notifications category name value creates component xpcom-startup any contract id yes xpcom-shutdown any contract id no xpcom-autoregistration any contract id no app-startup any service, contract id * the table above summarizes the popular persistent notifications registered through the category manager.
...the xpidl for iweblock appears below: iweblock #include "nsisupports.idl" interface nsisimpleenumerator; [scriptable, uuid(ea54eee4-9548-4b63-b94d-c519ffc91d09)] interface iweblock : nsisupports { void lock(); void unlock(); // assume strings are utf-8 void addsite(in string url); void removesite(in string url); attribute nsisimpleenumerator sites; }; the first line includes the file nsisupports.idl, which defines the nsisupports interface from which all xpcom interfaces must derive, and makes it possible for the iweblock interface to subclass that base interface.
...since we have only registered to receive a notification when xpcom starts up, it's a safe assumption that observe will only be called during the startup event, so we can read the file data in the callback.
mozIStorageAggregateFunction
this is an interface that must be implemented by consumers.
... it allows consumers to add aggregate functions that are available to sql queries and triggers.
... storage/public/mozistorageaggregatefunction.idlscriptable please add a summary to this article.
... sample code both of the following code samples assume that the variable dbconn is an opened mozistorageconnection.
mozIStorageFunction
this is an interface that must be implemented by consumers.
... it allows consumers to add functions that are available to sql queries and triggers.
... storage/public/mozistoragefunction.idlscriptable please add a summary to this article.
... sample code both of the following code samples assume that the variable dbconn is an opened mozistorageconnection.
nsIInputStream
unsigned long readsegments( in nswritesegmentfun awriter, in voidptr aclosure, in unsigned long acount ); parameters awriter the "consumer" of the data to be read.
... example consume all data from an input stream using read().
... 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().
... nsacstring* pbuf = (nsacstring*) aclosure; pbuf->append(afromsegment, acount); // indicate that we have consumed all of afromsegment *awritecount = acount; return ns_ok; } // copy the contents of astream into aresultbuf as one contiguous // buffer.
nsIMsgDatabase
mailnews/db/msgdb/public/nsimsgdatabase.idlscriptable please add a summary to this article.
... defaultviewflags nsmsgviewflagstypevalue readonly: defaultsorttype nsmsgviewsorttypevalue readonly: defaultsortorder nsmsgviewsortordervalue readonly: msghdrcachesize unsigned long folderstream nsioutputstream summaryvalid boolean methods open() opens a database folder.
...ns_msg_error_folder_summary_out_of_date the database is present (and was opened), but the summary file is out of date.
... ns_msg_error_folder_summary_missing the database is present (and was opened), but the summary file is missing.
nsIMsgFolder
sgwindow,in nsisupportsarray aofflinefolderarray); void emptytrash(in nsimsgwindow amsgwindow, in nsiurllistener alistener); void rename(in astring name, in nsimsgwindow msgwindow); void renamesubfolders( in nsimsgwindow msgwindow, in nsimsgfolder oldfolder); astring generateuniquesubfoldername(in astring prefix,in nsimsgfolder otherfolder); void updatesummarytotals(in boolean force); void summarychanged(); long getnumunread(in boolean deep); long gettotalmessages(in boolean deep); void clearnewmessages(); void clearrequirescleanup(); void setflag(in unsigned long flag); void clearflag(in unsigned long flag); boolean getflag(in unsigned long flag); void toggleflag(in u...
... knowssearchnntpextension boolean readonly allowsposting boolean readonly relativepathname acstring readonly sizeondisk unsigned long size of this folder on disk (not including .msf file) for imap, it's the sum of the size of the messages.
... rename() change the name of the folder void rename(in astring name, in nsimsgwindow msgwindow); renamesubfolders() void renamesubfolders(in nsimsgwindow msgwindow, in nsimsgfolder oldfolder); generateuniquesubfoldername() astring generateuniquesubfoldername(in astring prefix, in nsimsgfolder otherfolder); updatesummarytotals() void updatesummarytotals(in boolean force); summarychanged() void summarychanged(); getnumunread() get the total number of unread messages in this folder, or in all subfolders.
...simsgcopyservicelistener listener); acquiresemaphore() void acquiresemaphore(in nsisupports semholder); releasesemaphore() void releasesemaphore(in nsisupports semholder); testsemaphore() boolean testsemaphore(in nsisupports semholder); getnewmessages() void getnewmessages(in nsimsgwindow awindow, in nsiurllistener alistener); writetofoldercache() write out summary data for this folder to the given folder cache (i.e.
nsIUTF8ConverterService
intl/uconv/idl/nsiutf8converterservice.idlscriptable please add a summary to this article.
...if not, convert to utf-8 assuming it's encoded in acharset and return the converted string in utf-8.
...if not, convert it to utf-8, assuming it's encoded in acharset, and return the result.
...no valid spec going around in mozilla code would break this assumption.
nsIXULWindow
xpfe/appshell/nsixulwindow.idlscriptable please add a summary to this article.
... void assumechromeflagsarefrozen(); void center(in nsixulwindow arelative, in boolean ascreen, in boolean aalert); nsixulwindow createnewwindow(in print32 achromeflags, in nsiappshell aappshell); nsidocshelltreeitem getcontentshellbyid(in wstring id); void removechildwindow(in nsixulwindow achild); void showmodal(); attributes attribute type ...
... assumechromeflagsarefrozen() begin assuming chromeflags do not change hereafter, and assert if they do change.
... void assumechromeflagsarefrozen(); parameters none.
AudioContextOptions - Web APIs
constants standard values for latencyhint the latencyhint property can be number specifying a preferred maximum latency in seconds or a string from the audiocontextlatencycategory enumerated string, which selects a standard value for a given type of audio usage: value description "balanced" the user agent should balance audio output latency and power consumption when selecting a latency value.
...this is likely to require increased power consumption.
... "playback" the user agent should select a latency that will maximize playback time by minimizing power consumption at the expense of latency.
... example this example instantiates an audio context for music playback (optimized for power consumption over latency), with the sample rate 48,000 hz.
Element.scrollHeight - Web APIs
example padding-top lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
...for example: html <form name="registration"> <p> <textarea id="rules">lorem ipsum dolor sit amet, consectetur adipiscing elit.
...praesent dictum ipsum aliquet erat eleifend sit amet sollicitudin felis tempus.
...morbi feugiat, ipsum ac mattis congue, quam neque mollis tortor, nec mollis nisl dolor a tortor.
HTMLDetailsElement: toggle event - Web APIs
html <aside id="log"> <b>open chapters:</b> <div data-id="ch1" hidden>i</div> <div data-id="ch2" hidden>ii</div> <div data-id="ch3" hidden>iii</div> </aside> <section id="summaries"> <b>chapter summaries:</b> <details id="ch1"> <summary>chapter i</summary> philosophy reproves boethius for the foolishness of his complaints against fortune.
... </details> <details id="ch2"> <summary>chapter ii</summary> philosophy in fortune's name replies to boethius' reproaches, and proves that the gifts of fortune are hers to give and to take away.
... </details> <details id="ch3"> <summary>chapter iii</summary> boethius falls back upon his present sense of misery.
... </details> </section> css body { display: flex; flex-direction: row-reverse; } #log { flex-shrink: 0; padding-left: 3em; } #summaries { flex-grow: 1; } javascript function logitem(e) { const item = document.queryselector(`[data-id=${e.target.id}]`); item.toggleattribute('hidden'); } const chapters = document.queryselectorall('details'); chapters.foreach((chapter) => { chapter.addeventlistener('toggle', logitem); }); result specifications specification status comment html living standardthe definition of 'toggle event' in that specification.
Using IndexedDB - Web APIs
now, assuming that the user allowed your request to create a database, and you've received a success event to trigger the success callback; what's next?
...since such catastrophic events are rare most consumers should not need to concern themselves further.
...when the request is finished you'll get a dom event and, assuming that the request succeeded, you'll have another opportunity to extend the transaction during that callback.
...here's how you can shorten it up a bit, assuming that you handle errors at the database level: db.transaction("customers").objectstore("customers").get("444-44-4444").onsuccess = function(event) { console.log("name for ssn 444-44-4444 is " + event.target.result.name); }; see how this works?
Key Values - Web APIs
resumes a previously paused application, if applicable.
...(also known as suspend or sleep.) this turns off the display and puts the computer in a low power consumption mode, without completely powering off.
... vk_media_play_pause (0xb3) appcommand_media_play_pause qt::key_mediatoggleplaypause (0x1000086) keycode_media_play_pause (85) "mediarecord" starts or resumes recording media.
... the values below are derived in part form a number of consumer electronics technical specifications: dtv application software environment (part of the atsc specification) open cable application platform 1.1.3 ansi/cea-2014-b: web-based protocol and framework for remote user interface on upnp™ networks and the internet android keyevent key code values note: remote controls typically include keys whose values are already defined elsewhere, such as...
Streams API concepts - Web APIs
the reader plus the other processing code that goes along with it is called a consumer.
...since a response body cannot be consumed more than once, and a stream can't be read by more than one reader at once, you’d need two copies to do this.
... to use backpressure in a readablestream, we can ask the controller for the chunk size desired by the consumer by querying the readablestreamdefaultcontroller.desiredsize property on the controller.
... if later on the consumer again wants to receive data, we can use the pull method in the stream creation to tell our underlying source to feed our stream with data.
Rendering and the WebXR frame animation callback - Web APIs
refresh rate and frame rate assuming you've called the xrsession method requestanimationframe() since the last time the screen refreshed, the browser will call your frame renderer callback every time it's ready to repaint your app or site window.
...in other words, when in doubt, you can assume that the display is refreshing at 60 hz.
...we can use this value while drawing the scene to ensure we move everything the appopriate distance given the true elapsed time, rather than assuming that the callback will be fired at a consistent frame rate.
...because the execution of your callback is not going to happen at precise 1/60th of a second intervals—and, indeed, could happen at other rates if the user's display has a different framer ate—you can't rely on the simple fact that your code is running to assume that it's been 1/60th of a second since the last frame.
Window.pageYOffset - Web APIs
example var contenthtml = ` <h2 id="introduction">introduction</h2> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...quisque vel turpis justo.</p> <h2 id="overview">overview</h2> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...mauris efficitur tellus massa, id ullamcorper ipsum fermentum eu.
...integer euismod lectus a ipsum pellentesque lacinia.</p> `; document.getelementbyid("frame").contentdocument .body.innerhtml = contenthtml; in this example, an <iframe> is created and filled with content, then a specific element within the document is scrolled into view in the frame.
clear - CSS: Cascading Style Sheets
WebCSSclear
formal definition initial valuenoneapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | left | right | both | inline-start | inline-end examples clear: left html <div class="wrapper"> <p class="black">lorem ipsum dolor sit amet, consectetuer adipiscing elit.
...suspendisse eget dolor.</p> <p class="red">lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> <p class="left">this paragraph clears left.</p> </div> css .wrapper{ border:1px solid black; padding:10px; } .left { border: 1px solid black; clear: left; } .black { float: left; margin: 0; background-color: black; color: #fff; width: 20%; } .red { float: left; margin: 0; background-color: pink; width:20%; } p { width: 50%; } clear: right html <div class="wrapper"> <p class="black">lorem ipsum dolor sit amet, consectetuer adipiscing elit.
...suspendisse eget dolor.</p> <p class="red">lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> <p class="right">this paragraph clears right.</p> </div> css .wrapper{ border:1px solid black; padding:10px; } .right { border: 1px solid black; clear: right; } .black { float: right; margin: 0; background-color: black; color: #fff; width:20%; } .red { float: right; margin: 0; background-color: pink; width:20%; } p { width: 50%; } clear: both html <div class="wrapper"> <p class="black">lorem ipsum dolor sit amet, consectetuer adipiscing elit.
...fusce pulvinar lacus ac dui.</p> <p class="red">lorem ipsum dolor sit amet, consectetuer adipiscing elit.
overflow-block - CSS: Cascading Style Sheets
ntainers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll | auto examples html <ul> <li><code>overflow-block:hidden</code> — hides the text outside the box <div id="div1"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... </div> </li> <li><code>overflow-block:scroll</code> — always adds a scrollbar <div id="div2"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... </div> </li> <li><code>overflow-block:visible</code> — displays the text outside the box if needed <div id="div3"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... </div> </li> <li><code>overflow-block:auto</code> — on most browser, equivalent to <code>scroll</code> <div id="div4"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
overflow-y - CSS: Cascading Style Sheets
inersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll | auto examples setting overflow-y behavior html <ul> <li><code>overflow-y:hidden</code> — hides the text outside the box <div id="div1"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... </div> </li> <li><code>overflow-y:scroll</code> — always adds a scrollbar <div id="div2"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... </div> </li> <li><code>overflow-y:visible</code> — displays the text outside the box if needed <div id="div3"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... </div> </li> <li><code>overflow-y:auto</code> — on most browser, equivalent to <code>scroll</code> <div id="div4"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
position - CSS: Cascading Style Sheets
WebCSSposition
html <div class="outer"> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
... vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; nam ac dolor augue.
... </p> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
... vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; nam ac dolor augue.
shape-image-threshold - CSS: Cascading Style Sheets
html <div id="gradient-shape"></div> <p> lorem ipsum dolor sit amet, consectetur adipisicing elit.
...saepe optio accusamus doloribus sint facilis itaque ab nulla, dolor molestiae assumenda cum sit placeat adipisci, libero quae nihil porro debitis laboriosam inventore animi impedit nostrum nesciunt quisquam expedita!
... dolores consectetur iure atque a mollitia dicta repudiandae illum exercitationem aliquam repellendus ipsum porro modi, id nemo eligendi, architecto ratione quibusdam iusto nisi soluta?
... totam inventore ea eum sed velit et eligendi suscipit accusamus iusto dolore, at provident eius alias maxime pariatur non deleniti ipsum sequi rem eveniet laboriosam magni expedita?
text-transform - CSS: Cascading Style Sheets
it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | capitalize | uppercase | lowercase | full-width | full-size-kana examples none <p>initial string <strong>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</strong> </p> <p>text-transform: none <strong><span>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</span></strong> </p> span { text-transform: none; } strong { float: right; } this demonstrates no text transformation.
... capitalize (general) <p>initial string <strong>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</strong> </p> <p>text-transform: capitalize <strong><span>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</span></strong> </p> span { text-transform: capitalize; } strong { float: right; } this demonstrates text capitalization.
... uppercase (general) <p>initial string <strong>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</strong> </p> <p>text-transform: uppercase <strong><span>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</span></strong> </p> span { text-transform: uppercase; } strong { float: right; } this demonstrates transforming the text to uppercase.
... lowercase (general) <p>initial string <strong>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</strong> </p> <p>text-transform: lowercase <strong><span>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</span></strong> </p> span { text-transform: lowercase; } strong { float: right; } this demonstrates transforming the text to lowercase.
Closures - JavaScript
the function it returns takes a single argument y, and returns the sum of x and y.
... // global scope var e = 10; function sum(a){ return function(b){ return function(c){ // outer functions scope return function(d){ // local scope return a + b + c + d + e; } } } } console.log(sum(1)(2)(3)(4)); // log 20 // you can also write without anonymous functions: // global scope var e = 10; function sum(a){ return function sum2(b){ return function sum3(c){ // outer funct...
...ions scope return function sum4(d){ // local scope return a + b + c + d + e; } } } } var s = sum(1); var s1 = s(2); var s2 = s1(3); var s3 = s2(4); console.log(s3) //log 20 in the example above, there's a series of nested functions, all of which have access to the outer functions' scope.
...]; helptext.foreach(function(text) { document.getelementbyid(text.id).onfocus = function() { showhelp(text.help); } }); } setuphelp(); performance considerations it is unwise to unnecessarily create functions within other functions if closures are not needed for a particular task, as it will negatively affect script performance both in terms of processing speed and memory consumption.
Iterators and generators - JavaScript
done this is true if the last value in the sequence has already been consumed.
...iterating over an iterator is said to consume the iterator, because it is generally only possible to do once.
...arrays must be allocated in their entirety, but iterators are consumed only as necessary.
...when a value is consumed by calling the generator's next method, the generator function executes until it encounters the yield keyword.
Numbers and dates - JavaScript
the following table summarizes the number object's properties.
...the following table summarizes the methods of number.prototype.
... the following table summarizes the math object's methods.
... sqrt(), cbrt(), hypot() square root, cube root, square root of the sum of square arguments.
await - JavaScript
description the await expression causes async function execution to pause until a promise is settled (that is, fulfilled or rejected), and to resume execution of the async function after fulfillment.
... when resumed, the value of the await expression is that of the fulfilled promise.
... an await can split execution flow, allowing the caller of the await's function to resume execution before the deferred continuation of the await's function.
... after the await defers the continuation of its function, if this is the first await executed by the function, immediate execution also continues by returning to the function's caller a pending promise for the completion of the await's function and resuming execution of that caller.
Strict mode - JavaScript
assignments, which would accidentally create global variables, instead throw an error in strict mode: 'use strict'; // assuming no global variable mistypedvariable exists mistypevariable = 17; // this line throws a referenceerror due to the // misspelling of variable second, strict mode makes assignments which would otherwise silently fail to throw an exception.
...still, this hiding makes little sense and is probably undesirable (it might hide a typo, for example), so in strict mode duplicate argument names are a syntax error: function sum(a, a, c) { // !!!
...a leading zero syntax for the octals is rarely useful and can be mistakenly used, so strict mode makes it a syntax error: 'use strict'; var sum = 015 + // !!!
... syntax error 197 + 142; var sumwithoctal = 0o10 + 8; console.log(sumwithoctal); // 16 seventh, strict mode in ecmascript 2015 forbids setting properties on primitive values.
Autoplay guide for media and Web Audio APIs - Web media technologies
autoplay availability as a general rule, you can assume that media will be allowed to autoplay only if at least one of the following is true: the audio is muted or its volume is set to 0 the user has interacted with the site (by clicking, tapping, pressing keys, etc.) if the site has been whitelisted; this may happen either automatically if the browser determines that the user engages with media frequently, or manually through preferences or oth...
...s the autoplay property on the element to true, and when autoplay is true, the media will automatically begin to play as soon as possible after the following have occurred: the page is allowed to use autoplay functionality the element has been created during page load enough media has been received to begin playback and continue to play through to the end of the media without interruption, assuming there are no dramatic changes in network performance or bandwidth.
... the play event is sent both when the media is resumed after being paused and when autoplay occurs.
...that could happen if the video is paused and resumed by the user or automatically by the browser when the document is in a background tab.
Index - XPath
WebXPathIndex
found 57 pages: # page tags and summary 1 xpath css selectors, dom, jxon, landing, path, xml, xpath, xslt xpath stands for xml path language.
... 3 ancestor axe, xpath no summary!
... 17 functions transforming_xml_with_xslt, xpath, xpath_reference, xslt, xslt_reference no summary!
... 50 sum xslt, xslt_reference the sum function returns a number that is the sum of the numeric values of each node in a given node-set.
Cross-domain Content Scripts - Archive of obsolete content
cross-domain xmlhttprequest the following add-on creates a panel whose content is the summary weather forecast for shetland.
..."show", function(){ forecast_panel.port.emit("show"); }); require("sdk/ui/button/action").actionbutton({ id: "get-forecast", label: "get the forecast", icon: "./icon-16.png", onclick: function() { forecast_panel.show(); } }); the "panel.html" just includes a <div> block for the forecast: <!doctype html> <!-- panel.html --> <html> <head></head> <body> <div id="forecast_summary"></div> </body> </html> the "panel-script.js" uses xmlhttprequest to fetch the latest forecast: // panel-script.js var url = "http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/json/500?key=your-api-key"; self.port.on("show", function () { var request = new xmlhttprequest(); request.open("get", url, true); request.onload = function () { var jsonresponse ...
...= json.parse(request.responsetext); var summary = getsummary(jsonresponse); var element = document.getelementbyid("forecast_summary"); element.textcontent = summary; }; request.send(); }); function getsummary(forecast) { return forecast.regionalfcst.fcstperiods.period[0].paragraph[0].$; } finally, we need to add the "cross-domain-content" key to "package.json": "permissions": { "cross-domain-content": ["http://datapoint.metoffice.gov.uk"] } content permissions and unsafewindow if you use "cross-domain-content", then javascript values in content scripts will not be available from pages.
Extension Etiquette - Archive of obsolete content
it assumes that you are already familiar with building an extension.
... coding practices namespace conflicts there are many namespaces which extensions often must share with other consumers, be they other add-ons, web code, or the browser itself.
...for example, "does an action in the browser." documentation assume that the vast majority of your users don't have inner working knowledge of mozilla.
How to convert an overlay extension to restartless - Archive of obsolete content
step 1: use services.jsm if you load one of mozilla's internal jsm files, for example services.jsm, you'll do so via privileged javascript code like this: components.utils.import("resource://gre/modules/services.jsm"); from here on out, it is assumed you've imported services.jsm somewhere at the top of whatever file you're in and will be using it in all code examples.
... the examples will also assume that you know how to properly add instructions to your add-on's chrome.manifest to add and remove resource, chrome, locale, & etc.
...this is all assuming a minimum version of firefox 17+ (or other gecko 17+ application) which you should remember to state explicitly in your install.rdf.
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
and was originally published in japanese for the firefox developers conference summer 2007.
...listing 5 shows how to get a summary of all browser windows in firefox and then close them.
... note: here, we assume that the file is named temp.txt and is saved in the temp folder on the c: drive.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
however, these techniques may be relevant when the developer cannot assume that users have a modern browser, such as for html-based e-mail messages.
...do that, and it no longer generates a line box, and so the problem goes away-- assuming that the image is the only thing that occupies that table cell.
... lorem ipsum, dolor sit amet...</p></td></tr></table> as we see in figure 8, that works well in some cases but not so well in others.
Autodial for Windows NT - Archive of obsolete content
a brief history of autodial on windows in the consumer versions of windows, (windows 95, windows 98, windows me) autodial for all applications is controlled from the control panel, in the internet options applet, under the tab connections.
... how the feature works this feature doesn't do anything on linux, mac, or the consumer versions of windows.
...or pehaps we should assume mozilla users can configure the autodial service and disable the helper by default, but netscape users need a little more help, and enable it for them.
Layout System Overview - Archive of obsolete content
it is unclear if this is really possible, however, and in general it is assumed that there is a one-to-one correspondence between a presentation shell and a presentation context.
...presumably it is more time and space-efficient to prevent frame creation for elements with no display.) the frame manager also maintains a list of forms and form controls, as content nodes.
... this is presumably related to the fact that layout is responsible for form submission, but this is a design flaw that is being corrected by moving form submission into the content world.
Nanojit - Archive of obsolete content
then a pointer to a function is used, which takes an int as input and returns the sum of that parameter with two.
...certain assumptions are made when a particular jit code is generated.
... hence, guards are needed to prevent certain erroneous behaviour that might result from the assumptions that are generally made while jit is generated.
Reading textual data - Archive of obsolete content
using utf-8 for this example: */ "utf-8"; var is = components.classes["@mozilla.org/intl/converter-input-stream;1"] .createinstance(components.interfaces.nsiconverterinputstream); // this assumes that fis is the nsiinputstream you want to read from is.init(fis, charset, 1024, 0xfffd); is.queryinterface(components.interfaces.nsiunicharlineinputstream); if (is instanceof components.interfaces.nsiunicharlineinputstream) { var line = {}; var cont; do { cont = is.readline(line); // now you can do something with line.value } while (cont); } the above example reads an entir...
... for example: // 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"; // now, read from the stream // this assumes istream is the stream you want to read from var scriptablestream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); scriptablestream.init(istream); var chunk = scriptablestream.read(4096); var text = converter.converttounicode(chunk); however, you must be aware that this method will not...
...rk for character encodings that contain 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...
The Download Manager schema - Archive of obsolete content
entityid text the entity id from the nsiresumablechannel used to implement the download channel.
... this information is used to resume the download after it's been paused.
... autoresume integer 0 if the file should not automatically resume downloading, 1 if it should.
Introduction to XUL - Archive of obsolete content
most of the details of writing a xul document are identical to those for writing an xml document, a description of which we will leave to other excellent xml documentation which we assume must exist but have never seen.
... #main-window { display: block; width: 100%; height: 100%; } for example, the above style rule would apply to the main window and dictates that the window should consume the full width and height available to it in a content area.
...the frame also has a special attribute called flex, which indicates how much the frame is allowed to stretch to consume available space inside its window.
Multiple Rules - Archive of obsolete content
thus, you can assume that earlier rules handled earlier matches.
... for instance, if the first rule matched all folders, then the remaining rules can assume that any results that get past the first rule are not folders.
...we assume that anyone that isn't male is female and use the second rule to create a disabled radio button for females.
calICalendarViewController - Archive of obsolete content
summary a calicalendarviewcontroller provides a way for a calicalendarview to create, modify, and delete items.
... calendar/base/public/calicalendarviewcontroller.idlscriptable please add a summary to this article.
...the other values of the calievent (title, summary, alarm, etc) should likewise be set to defaults.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - november 4, 2006 - november 10, 2006 announcements none this week.
... favicon as microsummary/feed/other stuff indicator suggestion about making the favicon create a bookmark for the page with a microsummary.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - november 17, 2006 - november 24, 2006 announcements none this week.
... discussions microsummary w/ script a user created patch that will allow script to run in a sandbox during the update of a microsummary.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - november 24, 2006 - december 1, 2006 announcements none this week.
... developping microsummary generator questions and discussion surrounding microsummaries in ff 2.0.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.builds - october 21st to october 27th 2006 fx 1.5.0.x (linux) not building since 20-oct-2006 17:45 pdt october 22nd: gavin sharp answered a question that was posted by tony mechelynck.
... he also mentioned that the tinderbox is just a virtual machine, so you can easily allocate more space to it as need, assuming the host has some available.
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.l10n - november 24, 2006 announcements thunderbird 2 release schedule for localizations beta 1 freeze for thunderbird 2 is scheduled on december 4th (en-us only).
... summary vs.
... live titles there seems to be a few locales that use "summary" or a translation thereof instead of "live titles" to name the ui part of microsummaries.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 11 - november 17, 2006 announcements none this week.
...if bugs are filed, "[reflow branch]" should be placed at the beginning of the summary.
...the possibility of turning the microsummaryresource object into a xpcom component, which accomplishes this task in a "hacky" manner, was also discussed.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 17 - november 24, 2006 announcements no meeting for this week.
... proposal for an event summary dialog discussions about design for an event summary dialog.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
NPP_Write - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary delivers data to a plug-in instance.
... returns the plug-in should return the number of bytes written (consumed by the instance).
...a plug-in must consume at least as many bytes as indicated in the npp_writeready call.
0.90 - Archive of obsolete content
ArchiveRSSVersion0.90
it was created by netscape to be a metadata format providing a summary of a website.
... when rss 0.90 was created, the rss initialization stood for rich site summary and not really simple syndication.
...(see the rss versions list for a list of non-deprecated rss formats.) consumers of rssshould still be able to accept rss 0.90 feeds though.
JSException - Archive of obsolete content
summary the public class jsexception extends runtimeexception java.lang.object | +----java.lang.throwable | +----java.lang.exception | +----java.lang.runtimeexception | +----netscape.javascript.jsexception description jsexception is an exception which is thrown when javascript code returns an error.
... constructor summary the netscape.javascript.jsexception class has the following constructors: jsexception deprecated constructors optionally let you specify a detail message and other information.
... method summary the netscape.javascript.jsexception class has the following methods: getwrappedexception instance method getwrappedexception.
XForms Range Element - Archive of obsolete content
if this attribute is omitted, then it is assumed to be 0.
...if this attribute is omitted, then it is assumed to be the value of start + 20.
...if this attribute is omitted, then it is assumed to be the value of end - start / 20.
RDF in Mozilla FAQ - Archive of obsolete content
the following code illustrates its usage: // this is the object that will observe the rdf/xml load's progress var observer = { onbeginload: function(asink) {}, oninterrupt: function(asink) {}, onresume: function(asink) {}, onendload: function(asink) { asink.removexmlsinkobserver(this); alert("done!"); }, onerror: function(asink, astatus, aerrormsg) { alert("error!
...</window> assuming that we've aquired a datasource somehow (e.g., like this), the following sample code illustrates how to add that datasource to the template, and then force the template to rebuild itself based on the newly added datasource's contents.
... var ds = /* assume we got this somehow!
The Business Benefits of Web Standards - Archive of obsolete content
assumptions about the user and their platform based on erroneous thinking about the anticipated user community are inevitably always wrong.
...even more importantly, it reduces bandwidth consumption by images.
... the development process: working in teams a common challenge for web developers when assuming management of existing sites is the code written by other developers.
Bounding volume collision detection with THREE.js - Game development
it is assumed that before reading this you have read our 3d collision detection introductory article first, and have basic knowledge about three.js.
...we assume our scene variable to be simply called scene.
... var knot = new three.mesh( new three.torusknotgeometry(0.5, 0.1), new three.meshnormalmaterial({}) ); var knotboxhelper = new three.boxhelper(knot, 0x00ff00); scene.add(knotboxhelper); in order to also have our actual box3 bounding box, we create a new box3 object and make it assume the boxhelper's shape and position.
Type coercion - MDN Web Docs Glossary: Definitions of Web-related terms
examples const value1 = '5'; const value2 = 9; let sum = value1 + value2; console.log(sum); in the above example, javascript has coerced the 9 from a number into a string and then concatenated the two values together, resulting in a string of 59.
... the compiler could have coerced the 5 into a number and returned a sum of 14, but it did not.
... to return this result, you'd have to explicitly convert the 5 to a number using the number() method: sum = number(value1) + value2; ...
HTML: A good basis for accessibility - Learn web development
this gives you complete groups of data that can be consumed by screen readers as single units.
... the <caption> element and <table> summary attribute both do similar jobs — they act as alt text for a table, giving a screen reader user a useful quick summary of the table's contents.
... summary you should now be well-versed in writing accessible html for most occasions.
HTML: A good basis for accessibility - Learn web development
this gives you complete groups of data that can be consumed by screen readers as single units.
... the <caption> element and <table> summary attribute both do similar jobs — they act as alt text for a table, giving a screen reader user a useful quick summary of the table's contents.
... summary you should now be well-versed in writing accessible html for most occasions.
Overflowing content - Learn web development
css assumes that you are managing the potential for overflow.
...they largely work without assumptions or dependencies for how much content there will be on a web page.
... summary this lesson introduced the concept of overflow.
How much does it cost to do something on the Web? - Learn web development
summary when launching a website, you may spend nothing, or your costs may go through the roof.
... hosting understanding bandwidth hosting providers charge you according to how much bandwidth your website consumes.
...if you consume a huge amount of bandwidth, expect to pay a huge amount of money.
Video and audio content - Learn web development
such companies offer a convenient, easy way to host and consume videos, so you don't have to worry about the enormous bandwidth consumption.
...note that the third assessment question in this test assumes knowledge of some of the techniques covered in the next article, so you may want to read that before attempting it.
... summary and that's a wrap; we hope you had fun playing with video and audio in web pages!
Multimedia: Images - Learn web development
optimizing image delivery despite being the largest consumer of bandwidth, images load asynchronously so the visitor can see the page as they download and therefore, their impact on perceived performance is far lower than many expect.
...this is just one of the types of media consuming users bandwidth and slowing down page load.
... let's take a look at video optimization, tackling the next 20% of bandwidth consumption.
Website security - Learn web development
the requests may simply be numerous, or they may individually consume large amounts of resource (e.g., slow reads or uploading of large files).
...always assume the worst.
... summary this article has explained the concept of web security and some of the more common threats against which your website should attempt to protect.
Getting started with Svelte - Learn web development
note that you can also use the yarn package manager in place of npm, but we'll assume you are using npm in this set of tutorials.
... <script> export let name; </script> svelte uses the export keyword to mark a variable declaration as a property (or prop), which means it becomes accessible to consumers of the component (e.g.
... repl to code along with us using the repl, start at https://svelte.dev/repl/fc68b4f059d34b9c84fa042d1cce586c?version=3.23.2 summary this brings us to the end of our initial look at svelte, including how to install it locally, create a starter app, and how the basics work.
Dynamic behavior in Svelte: working with variables and props - Learn web development
in this case svelte is using the export keyword to mark a variable declaration as a property or prop, which means it becomes accessible to consumers of the component.
...this will be used if the component's consumer doesn't specify the prop on the component — or if its initial value is undefined — when instantiating the component.
... repl to see the current state of the code in a repl, visit: https://svelte.dev/repl/99b9eb228b404a2f8c8959b22c0a40d3?version=3.23.2 summary that will do for now!
Strategies for carrying out testing - Learn web development
c grade: rare/unknown browsers — don't test, but assume they are capable.
... educated guesses you could call these "assumptions", or "gut feelings".
... summary after reading this article you should now have a good idea of what you can do to identify your target audience/target browser list, and then effectively carry out cross-browser testing on that list.
Introducing a complete toolchain - Learn web development
it's an extremely powerful and versatile tool but can be tricky to configure correctly and you could easily consume many hours trying to get a configuration just right!
... if the browser tries to run the source javascript it will immediately complain; the project needs a build tool to transform the source code to something the browser can consume without issue.
... summary we've come a long way in this chapter, building up a rather nice local development environment to create an application in.
Mozilla accessibility architecture
accessibility apis on each operating system have built-in assumptions about what is the most important information, and how an accessibility server like mozilla should use the api's programmatic interfaces to expose this information to an accessibility client (the assistive technology).
... each platform's accessibility api has made different assumptions, although there are a number of common characteristics.
...we cannot assume that all of the accessible children will come from the direct children, grandchildren or even great-great-great-children of the current accessible's node.
A bird's-eye view of the Mozilla framework
prerequisites this article assumes you have access to mozilla sources and are familiar with the directory structure of the source tree.
...thehelp viewer files referenced in the article are located in /seamonkey/extensions/help/ this article also assumes you are familiar with the javascript and c++ programming languages, object-oriented programming (oop) terminology and design concepts, the microsoft® component object model (com), and the corba omg interface definition language (idl).
... xpcom in summary to summarize, the xpcom object model specifies the structure of xpcom components, builds a central registry based on the xpcom components loaded at startup, generates xpcom component instances on demand using the registry, which specifies the supported interfaces, their corresponding implementation objects, and the nsifactory interface, provides api facilities clients can use to dynami...
Performance best practices for Firefox front-end engineers
you can do that using requestidlecallback() and the cooperative scheduling of background tasks api, and doing it only when we have a free second where presumably the user isn’t doing something.
... for now, it is up to you as the consumer of this api to not accidentally write to the dom within the promisedocumentflushed callback.
...assuming there weren’t any style changes requiring size or position recalculation above line 1, the clientheight information should be cached since the last reflow, and will not result in a new layout calculation.
HTML parser threading
this way, the queues into which tree ops are produced and the queues from which they are consumed don't need to involve a mutex on each modification.
...that method is responsible for moving back to consuming tree ops from the parser thread via the staging area.) document.write() calls to document.write() push data to the tokenizer/tree builder pair that exists on the main thread solely for parsing data from document.write().
...when parseuntilblocked() exhausts the data available to it, it calls nshtml5streamparser::continueafterscripts to resume the consumption of data from the network.
Geckoview-Junit Tests
tests can also be conditionally skipped using junit's assume or assumethat methods.
... for example: import org.junit.assume.assumethat ...
... assumethat(sessionrule.env.isdebugbuild && sessionrule.env.cpuarch == "x86", equalto(false)) running tests on try to run these tests on try, use something like: mach try fuzzy -q geckoview-junit --artifact or mach try -b do -p android-x86_64 -u geckoview-junit --artifact currently, geckoview-junit is only run on android-x86_64.
NetUtil.jsm
the callback may then consume data from the input stream passed to the callback.
... example this example shows the basic code consumers would need to implement to be correct.
... if (!components.issuccesscode(aresult)) { // handle error return; } // consume the input stream.
Examples
"you have file.txt in your temporary directory." : "you don't have file.txt in your temporary directory."); }).then(null, components.utils.reporterror); chaining promises the promise returned by then eventually assumes the state of the promise returned by the callback.
...newpromise.then(null, components.utils.reporterror); note: more examples for consuming promises are available in the promise object documentation.
... warning: when consuming promises, you should always handle or report errors (rejection reasons).
SourceMap.jsm
get a reference to the module: let sourcemap = {}; components.utils.import('resource:///modules/devtools/sourcemap.jsm', sourcemap); sourcemapconsumer a sourcemapconsumer instance represents a parsed source map which we can query for information about the original file positions by giving it a file position in the generated source.
... new sourcemapconsumer(rawsourcemap) the only parameter is the raw source map (either as a string which can be json.parse'd, or an object).
... sourcemapconsumer.prototype.originalpositionfor(generatedposition) returns the original source, line, and column information for the generated source's line and column positions provided.
Sqlite.jsm
consumers of this api can call the cancel function should they want to immediately abort the execution of the statement.
...assume we open an opened connection in the conn variable.
... conn.executetransaction(async function simpletransaction() { await conn.execute("insert into mytable values (?, ?)", ["foo", "bar"]); await conn.execute("insert into mytable values (?, ?)", ["biz", "baz"]); }); the above will result in 2 insert statements being committed in a deferred transaction (assuming the inserts proceed without error, of course).
Localization content best practices
create localizable strings don't assume grammar structures you need to consider the need for different grammar structures in different locales, and add switching mechanisms to present them appropriately.
... you shouldn't make assumptions as to what those structures will be: instead, let locales/localizers decide.
... splitting splitting sentences into several keys often inadvertently presumes a grammar, a sentence structure, and such composite strings are often very difficult to translate.
Localizing with Koala
here's a quick summary of what the output of the comparison means: files: "unmodified" - the file is completely translated.
...assuming that your locale files are in c:\mozilla\l10n\locale\x-testing\3.6 which is where the local mercurial repository was created (see creating a new project section), you should be able to successfully issue "hg cmd" commands in that directory (where "cmd" might be "status", "log", "commit" etc.).
...if you run "hg log" however, you will see you first commit in the repository's revision history: c:\mozilla\l10n\locale\x-testing\3.6> hg log changeset: 0:7c543e8f3a6a tag: tip user: stas malolepszy <stas@mozilla.com> date: mon nov 23 18:08:25 2009 +0100 summary: added search bar strings congratulations!
about:memory
how to generate memory reports let's assume that you want to measure firefox's memory usage.
...for example: 585 (100.0%) -- preference-service └──585 (100.0%) -- referent ├──493 (84.27%) ── strong └───92 (15.73%) -- weak ├──92 (15.73%) ── alive └───0 (00.00%) ── dead leaf nodes represent actual measurements; the value of each internal node is the sum of all its children.
...if you want a single measurement to summarize memory usage, this is probably the best one.
NSS tools : modutil
if the prefix sql: is not used, then the tool assumes that the given databases are in the old format.
...if this attribute is omitted, a default of 777 is assumed.
... by default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type.
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
if the prefix sql: is not used, then the tool assumes that the given databases are in the old format.
...if this attribute is omitted, a default of 777 is assumed.
... by default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type.
Network Security Services
documentation background information overview of nss provides a brief summary of nss and its capabilities.
... nss ssl public functions summarizes the ssl apis exported by the nss shared libraries.
...ules implementing pkcs #11 for nss the strings nss uses to load pkcs #11 modules pkcs #11 faq using the jar installation manager to install a pkcs #11 cryptographic module pkcs #11 conformance testing - archived version ca certificates pre-loaded into nss mozilla ca certificate policy list of pre-loaded ca certificates consumers of this list must consider the trust bit setting for each included root certificate.
Statistics API
total_time: number (milliseconds) - the amount of wall time that this gc consumed.
... note: this is the sum of all the slice durations, not end time - start time.
... times: object - a map from phase names to the total time taken by each phase: the sum of each field of the map from the slices.
Garbage collection
mark bits are allocated based on the minimum cell size, thus an object comprised of larger cells consumes multiple bits in the bitmap (but only uses two of them.) exact stack rooting api note: the information here is about the implementation of gc roots and their use within spidermonkey.
...now let the incremental slice stop, so the mutator resumes.
... to understand how this barrier works, first assume that we're going to do an incremental gc during which no new objects are allocated, just to keep things simple.
JS_GetSecurityCallbacks
callback structure struct jssecuritycallbacks { jscspevalchecker contentsecuritypolicyallows; // added in spidermonkey 1.8.5 jssubsumesop subsumes; // added in spidermonkey 31 jscheckaccessop checkobjectaccess; // obsolete since jsapi 29 jsprincipalstranscoder principalstranscoder; // obsolete since jsapi 13 jsobjectprincipalsfinder findobjectprincipals; // obsolete since jsapi 13 }; name type description contentsecuritypolicyallows jscspevalchecker ...
... subsumes jssubsumesop a pointe to the function which returns whether the first principal subsumes the second.
...if the callbacks are default value, it returns null see also mxr id search for js_getsecuritycallbacks mxr id search for js_setsecuritycallbacks jsprincipals jscspevalchecker jssubsumesop bug 957688 - removed checkobjectaccess bug 924905 - added subsumes bug 728250 - added -js_getsecuritycallbacks and js_setsecuritycallbacks, removed js_setcontextsecuritycallbacks, js_getruntimesecuritycallbacks, and js_setruntimesecuritycallbacks ...
JS_THREADSAFE
requests in a js_threadsafe build, the application must separate code that uses the jsapi from code that performs blocking i/o or time-consuming calculations.
...this means that any potentially long-running operation in a native must be bracketed with calls to js_suspendrequest() and js_resumerequest().
... rc = js_suspendrequest(cx); read_size = recv(socket, buf, size, flags); js_resumerequest(cx, rc); ...
WebReplayRoadmap
this is time consuming, especially when the bug only reproduces intermittently.
... one important issue is that any side effects from evaluating expressions via the console or the debugger's watch expressions will not carry over when the tab resumes executing.
... recordings can be manually analyzed to determine this information, but it would be nice to automate this process and provide a summary of the allocation sites and places where objects are linked together that end up entraining the most amount of memory later on.
compare-locales
rwardmenu.tooltip +fullzoomenlargecmd.commandkey3 +fullzoomreducecmd.commandkey2 +fullzoomresetcmd.commandkey2 +organizebookmarks.label -showallbookmarkscmd2.label migration/migration.dtd -importfromfile.accesskey -importfromfile.label +importfromhtmlfile.accesskey +importfromhtmlfile.label you can assume changed strings when you see entities removed and added with a similar name.
... the output closes with a summary, giving the total counts of missing and obsolete strings and words, and some statistics on how many strings are changed or not, excluding access- and commandkeys.
... pass --json to get just the summary in json format.
Redis Tips
}); client.watch("foo", function( err ){ if(err) throw err; client.get("foo", function(err, result) { if(err) throw err; // process result // heavy and time consuming operation here client.multi() .set("foo", "some heavy computation") .exec(function(err, results) { /** * if err is null, it means redis successfully attempted * the operation.
... you may encounter articles on the web trying to scare you away from using lots of small zsets due to their memory consumption.
... how much space could this consume over time?
Setting up an update server
oding="utf-8"?> <updates> <update type="minor" displayversion="2000.0a1" appversion="2000.0a1" platformversion="2000.0a1" buildid="21181002100236"> <patch type="complete" url="http://127.0.0.1:8000/<mar name>" hashfunction="sha512" hashvalue="<hash>" size="<size>"/> </update> </updates> if you've downloaded 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.mozil...
...la.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 that are part of that nightly release).
... if you've built your own mar, you can obtain its sha512 checksum by running the following command, which should work in linux, macos, or windows in the mozillabuild environment: shasum --algorithm 512 <filename> on windows, you can get the exact file size in bytes for your mar by right clicking on it in the file explorer and selecting properties.
Finishing the Component
weblock interfaces interface name defined by status summary nsisupports xpcom frozen provides interface discovery, and object reference counting nsiobserver xpcom frozen allows messaging passing between objects nsicontentpolicy content not frozen interface for policy control mechanism iweblock web lock not frozen enables and disables weblock.
...we are assuming here that the charset of the url string is utf-8, and also assuming that every url string is absolute.
... return ns_error_failure; nsembedcstring scheme; contentlocation->getscheme(scheme); if (strcmp("http", scheme.get()) != 0 && strcmp("https", scheme.get()) != 0 && strcmp("ftp", scheme.get()) != 0) { // this isn't a type of uri that we deal with *_retval = pr_true; return ns_ok; } nsembedcstring hosttoload; contentlocation->gethost(hosttoload); // assume failure.
Using XPCOM Utilities to Make Things Easier
the following table summarizes the macro usage in this portion of the weblock.cpp source file: common xpcom macros ns_impl_isupportsn implements nsisupports for a given class with n number of interfaces ns_decl_isupports declares methods of nsisupports including mrefcnt ns_init_isupports initializes mrefcnt to zero.
... ns_release(value); // release our reference } a method returns an nsisupports interface pointer that has been reference counted before it is returned (assuming it wasn't nsnull).
...next, it calls another method on an object that is presumed to exist in this context.
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
stream listeners a stream listener is an object you build to let you know when there is data in a stream ready for you to consume.
... most streams are asynchronous: they make no assumptions that all the data a resource provides is available immediately.
... * * also, baseinputstream has been completely consumed at this point, so we * shouldn't read from it anymore.
IAccessibleTable
ren), length_is(, nchildren)] long children, [out] long nchildren ); [propget] hresult selectedcolumns([in] long maxcolumns, [out, size_is(,maxcolumns), length_is(, ncolumns)] long columns, [out] long ncolumns ); [propget] hresult selectedrows([in] long maxrows, [out, size_is(,maxrows), length_is(, nrows)] long rows, [out] long nrows ); hresult selectrow([in] long row ); [propget] hresult summary([out] iunknown accessible ); hresult unselectcolumn([in] long column ); hresult unselectrow([in] long row ); methods accessibleat() returns the accessible object at the specified row and column in the table.
...summary() returns the summary description of the table.
...[propget] hresult summary( [out] iunknown accessible ); parameters accessible returns a reference to an implementation dependent accessible object representing the table's summary or a null pointer if the table does not support a summary.
IAccessibleTable2
olumn([in] long column ); [propget] hresult selectedcells([out, size_is(, nselectedcells,)] iunknown cells, [out] long nselectedcells ); [propget] hresult selectedcolumns([out, size_is(, ncolumns)] long selectedcolumns, [out] long ncolumns ); [propget] hresult selectedrows([out, size_is(, nrows)] long selectedrows, [out] long nrows ); hresult selectrow([in] long row ); [propget] hresult summary([out] iunknown accessible ); hresult unselectcolumn([in] long column ); hresult unselectrow([in] long row ); methods caption() returns the caption for the table.
...summary() returns the summary description of the table.
...[propget] hresult summary( [out] iunknown accessible ); parameters accessible returns a reference to an implementation dependent accessible object representing the table's summary or a null pointer if the table does not support a summary.
nsIAccessible
« gecko at interfaces page summary the nsiaccessible interface is a cross-platform interface that supports platform-specific accessibility apis like msaa and atk.
... contains the sum of what's needed to support iaccessible as well as atk's generic accessibility objects.
...}; accessible/public/nsiaccessible.idlscriptable please add a summary to this article.
nsIAccessibleTable
accessible/public/nsiaccessibletable.idlscriptable please add a summary to this article.
... note: renamed from selectedrowscount in gecko 1.9.2 summary astring the summary description for the table.
... for example, @summary attribute on html:table element.
nsIProtocolHandler
current versions of firefox assume that the uri has uri_loadable_by_anyone set, but this will not work starting with the mozilla 2 platform.
... uri_loadable_by_subsumers 1<<14 the uris for this protocol can be loaded only by callers with a principal that subsumes this uri.
...if this is null, then utf-8 encoding is assumed and no character transformation is not performed.
nsIXULTemplateBuilder
if a result passes a rule's conditions, this is considered a match, and the content within the rule's <action> body is inserted as a sibling of the <template>, assuming the template builder creates real dom content.
... /xul/templates/public/nsixultemplatebuilder.idlscriptable please add a summary to this article.
...this element presumably has a datasources attribute, which the builder will parse to set up the template builder's data sources.
Browser Side Plug-in API - Plugins
netscape plug-in method summary « previousnext » npn_destroystream closes and deletes a stream.
... npn_newstream requests the creation of a new data stream produced by the plug-in and consumed by the browser.
... npn_write pushes data into a stream produced by the plug-in and consumed by the browser.
AudioContextLatencyCategory - Web APIs
values value description "balanced" the user agent should balance audio output latency and power consumption when selecting a latency value.
...this is likely to require increased power consumption.
... "playback" the user agent should select a latency that will maximize playback time by minimizing power consumption at the expense of latency.
CSSMathValue.operator - Web APIs
for example, if the current cssmathvalue subtype is cssmathsum, this property will return the string "sum".
... interface value cssmathsum "sum" cssmathproduct "product" cssmathmin "min" cssmathmax "max" cssmathclamp "clamp" cssmathnegate "negate" cssmathinvert "invert" examples we create an element with a width determined using a calc() function, then console.log() the operator.
... <div>my width has a <code>calc()</code> function</div> we assign a width with a calculation div { width: calc(50% - 0.5vw); } we add the javascript const stylemap = document.queryselector('div').computedstylemap(); console.log( stylemap.get('width') ); // cssmathsum {values: cssnumericarray, operator: "sum"} console.log( stylemap.get('width').values ); // cssnumericarray {0: cssunitvalue, 1: cssmathnegate, length: 2} console.log( stylemap.get('width').operator ); // 'sum' console.log( stylemap.get('width').values[1].operator ) // 'negate' the cssmathvalue.operator returns sum for the equation and negate for the operator on the second value.
CSSNumericValue.add() - Web APIs
syntax var cssmathsum = cssnumericvalue.add(double | cssnumericvalue); parameters number either a number or a cssnumericvalue.
... return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method.
... examples let mathsum = css.px("23").add(css.percent("4")).add(css.cm("3")).add(css.in("9")); // prints "calc(23px + 4% + 3cm + 9in)" console.log(mathsum.tostring()); specifications specification status comment css typed om level 1the definition of 'add' in that specification.
CSSNumericValue.sub() - Web APIs
syntax var cssmathsum = cssnumericvalue.sub(number); parameters number either a number or a cssmathsum.
... return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method.
... examples let mathsum = css.px("23").sum(css.percent("4")).sum(css.cm("3")).sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(mathsum.tostring()); and/or include a list of links to useful code samples that live elsewhere: specifications specification status comment css typed om level 1the definition of 'sub' in that specification.
EventTarget.addEventListener() - Web APIs
because older browsers (as well as some not-too-old browsers) still assume the third parameter is a boolean, you need to build your code to handle this scenario intelligently.
...in the second case, the same previously declared function is used as an event handler, which results in smaller memory consumption because there is only one handler function created.
... actually, regarding memory consumption, the lack of keeping a function reference is not the real issue; rather it is the lack of keeping a static function reference.
Timing element visibility with the Intersection Observer API - Web APIs
building the page contents the buildcontents() function is called by the startup code to select and insert into the document the articles and ads to be presented: let loremipsum = "<p>lorem ipsum dolor sit amet, consectetur adipiscing" + " elit.
...etiam rutrum faucibus sem, vitae mattis ipsum ullamcorper" + " eu.
...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.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
if stride is 0, the attribute is assumed to be tightly packed, that is, the attributes are not interleaved but each attribute is in a separate block, and the next vertex' attribute follows immediately after the current vertex.
... description let's assume we want to render some 3d geometry, and for that we will need to supply our vertices to the vertex shader.
...then we could load the binary file and interpret it as an array buffer: const response = await fetch('assets/geometry.bin'); const buffer = await response.arraybuffer(); consume array buffer with webgl first, we create a new vertex buffer object (vbo) and supply it with our array buffer: //bind array buffer to a vertex buffer object const vbo = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, vbo); gl.bufferdata(gl.array_buffer, buffer, gl.static_draw); then, we specify the memory layout of the array buffer, either by setting the index ourselves: //describe the la...
WebGL best practices - Web APIs
don't assume you can use thirty texture samplers per shader just because it works on your machine!
...this requires estimating the number of bytes consumed by each texture, for example.
...assume that the memory usage of depth and stencil formats is rounded up to the nearest four bytes.
Starting up and shutting down a WebXR session - Web APIs
assuming you're already familiar with 3d graphics in general and webgl in particular, taking that next bold step into mixed reality—the idea of presenting artificial scenery or objects in addition to or in place of the real world—is not overly complicated.
... here we define a getxr() function, which returns the xrsystem object after optionally installing the polyfill, assuming that the polyfill has been included or loaded using a prior <script> tag.
...presumably the renderer uses this value to compute how often to render new frames as the animation loop progresses, thus rendering less frequently the more "blurred" the scene becomes.
Web Audio API best practices - Web APIs
autoplay policy browsers have started to implement an autoplay policy, which in general can be summed up as: "create or resume context from inside a user gesture".
...we can use the same click event example here, test for the state of the context and start it, if it is suspended, using the resume() method.
... const audioctx = new audiocontext(); const button = document.queryselector('button'); button.addeventlistener('click', function() { // check if context is in suspended state (autoplay policy) if (audioctx.state === 'suspended') { audioctx.resume(); } }, false); you might instead be working with an offlineaudiocontext, in which case you can resume the suspended audio context with the startrendering() method.
Web Authentication API - Web APIs
assuming that the checks pan out, the server will store the new public key associated with the user's account for future use -- that is, whenever the user desires to use the public key for authentication.
...assuming both of those steps are successful, the authenticator will create a new assertion by signing over the clientdatahash and authenticatordata with the private key generated for this account during the registration call.
...assuming the validation is successful, the server will note that the user is now authenticated.
Window.openDialog() - Web APIs
WebAPIWindowopenDialog
window.opendialog() finds it useful because of its different default assumptions.
... default behavior the chrome and dialog features are always assumed on, unless explicitly turned off ("chrome=no").
...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.postMessage() - Web APIs
example /* * in window a's scripts, with a being on <http://example.com:8080>: */ var popup = window.open(/* popup details */); // when the popup has fully loaded, if not blocked by a popup blocker: // this does nothing, assuming the window hasn't changed its location.
... popup.postmessage("the user is 'bob' and the password is 'secret'", "https://secure.example.net"); // this will successfully queue a message to be sent to the popup, assuming // the window hasn't changed its location.
... if (event.origin !== "http://example.com:8080") return; // event.source is window.opener // event.data is "hello there!" // assuming you've verified the origin of the received message (which // you must do in any case), a convenient idiom for replying to a // message is to call postmessage on event.source and provide // event.origin as the targetorigin.
XRView - Web APIs
WebAPIXRView
in other words, don't assume there are exactly two views on a given viewer; there can be as few as one (such as when rendering the scene in inline mode, and potentially many (especially if the field of view is very large).
...so you should process the view list every time without making assumptions based on previous frames.
... if in the future it becomes possible for each view to render into a different layer, there would have to be changes made to the api, so it's safe for now to assume that all views will render into the same layer.
ARIA: application role - Accessibility
in this mode, the web author is completely responsible for handling any and all keyboard input, focus management, and other interactions and cannot assume assistive technologies would do any processing on their end.
...the ats build their own representation of it that makes the most sense for a blind user to consume the content.
... for all of this to work, ats intercept almost all keyboard input and consume it themselves, letting nothing through to the browser or other user agent.
Text labels and names - Accessibility
if the title is not available, they have to navigate the page to determine its content, which can be a time consuming and potentially confusing process.
...(this assumes that the enclosed document is under your control; if not, try to match the frame's title attribute to the document's title.) some screen readers replace the contents of the title attribute with the contents of the enclosed document's <title>.
...(this assumes that the enclosed document is under your control; if not, try to match the frame's title attribute to the document's title.) some screen readers replace the contents of the title attribute with the contents of the enclosed document's <title>.
Block and inline layout in normal flow - CSS: Cascading Style Sheets
by default block elements will consume all of the space in the inline direction, so our paragraphs spread out and get as big as they can inside their containing block.
...this means that if you have an element with a top margin immediately after an element with a bottom margin, rather than the total space being the sum of these two margins, the margin collapses, and so will essentially become as large as the larger of the two margins.
... summary in this guide, we have looked at how elements display in normal flow, as block and inline elements.
clamp() - CSS: Cascading Style Sheets
WebCSSclamp
formal syntax clamp( <calc-sum>#{3} )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) examples min, max, and clamp comparison in this example we have a simple responsive example that makes use of min(), max(), and clamp() for some of the sizes.
... html <h1>simple responsive test</h1> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...fusce iaculis, libero quis elementum viverra, nulla ante accumsan lectus, sit amet convallis lacus ipsum vel est.
cross-fade() - CSS: Cascading Style Sheets
hite, 75% black */ cross-fade( url(white.png) 50%, url(black.png) 50%); /* 50% white, 50% black */ cross-fade( url(white.png) 75%, url(black.png) 25%); /* 75% white, 25% black */ cross-fade( url(white.png) 100%, url(black.png) 0%); /* fully white */ cross-fade( url(green.png) 75%, url(red.png) 75%); /* both green and red at 75% */ if any percentages are omitted, all the specified percentages are summed together and subtracted from 100%.
... in the last example, the sum of both percentages is not 100%, and therefore both images include their respective opacities.
...the original syntax, which has been implemented in some browsers, only allowed for two images, with the sum of the transparency of those two images being exactly 100%.
white-space - CSS: Cascading Style Sheets
the following table summarizes the behavior of the various white-space values: new lines spaces and tabs text wrapping end-of-line spaces normal collapse collapse wrap remove nowrap collapse collapse no wrap remove pre preserve preserve no wrap preserve pre-wrap preserve preserve wrap hang pre-line ...
... /* ie 5.5-7 */ white-space: pre-wrap; /* modern browsers */ } in action html <div id="css-code" class="box"> p { white-space: <select> <option>normal</option> <option>nowrap</option> <option>pre</option> <option>pre-wrap</option> <option>pre-line</option> <option>break-spaces</option> </select> } </div> <div id="results" class="box"> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
...font-family: inherit; } #results { background-color: rgb(230, 230, 230); overflow-x: scroll; height: 400px; white-space: normal; font-size: 14px; } var select = document.queryselector("#css-code select"); var results = document.queryselector("#results p"); select.addeventlistener("change", function(e) { results.setattribute("style", "white-space: "+e.target.value); }) <p> lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Index - Developer guides
WebGuideIndex
found 43 pages: # page tags and summary 1 developer guides api, guide, landing, web these articles provide how-to information to help make use of specific web technologies and apis.
... 12 setting up adaptive streaming media sources audio, hls, html5, http live streaming, mpeg-dash, video, adaptive streaming let's say you want to set up an adaptive streaming media source on a server, to be consumed inside an html5 media element.
... 24 overview of events and handlers beginner, dom, example, javascript, needsbeginnerupdate, needsupdate, events this overview of events and event handling explains the code design pattern used to react to incidents occurring when a browser accesses a web page, and it summarizes the types of such incidents modern web browsers can handle.
<dfn>: The Definition element - HTML: Hypertext Markup Language
WebHTMLElementdfn
html <p>the <strong>html definition element</strong> (<strong><dfn id="definition-dfn">&lt;dfn&gt;</dfn></strong>) is used to indicate the term being defined within the context of a definition phrase or sentence.</p> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...scrupulum, inquam, abeunti; </p> <p>negare non possum.
...quid enim possumus hoc agere divinius?
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
found 237 pages: # page tags and summary 1 html: hypertext markup language html, html5, landing, web, l10n:priority html (hypertext markup language) is the most basic building block of the web.
... 200 <summary>: the disclosure summary element disclosure box, disclosure control, disclosure summary, element, html, html interactive elements, reference, summary, web the html disclosure summary element (<summary>) element specifies a summary, caption, or legend for a <details> element's disclosure box.
... 207 <tfoot>: the table foot element element, html, html tabular data, reference, tables, web the html <tfoot> element defines a set of rows summarizing the columns of the table.
Connection management in HTTP/1.x - HTTP
this simple model held an innate limitation on performance: opening each tcp connection is a resource-consuming operation.
... the tcp handshake itself is time-consuming, but a tcp connection adapts to its load, becoming more efficient with more sustained (or warm) connections.
... persistent connections also have drawbacks; even when idling they consume server resources, and under heavy load, dos attacks can be conducted.
parseInt() - JavaScript
if radix is undefined, 0, or unspecified, javascript assumes the following: if the input string begins with "0x" or "0x" (a zero, followed by lowercase or uppercase x), radix is assumed to be 16 and the rest of the string is parsed as a hexidecimal number.
... if the input string begins with "0" (a zero), radix is assumed to be 8 (octal) or 10 (decimal).
...if radix is undefined or 0, it is assumed to be 10 except when the number begins with the character pairs 0x or 0x, in which case a radix of 16 is assumed.
Codecs used by WebRTC - Web media technologies
see this article on sumo for details.
... max-smbps if specified and supported by the software, this specifies an integer stating the maximum static macroblock processing rate in static macroblocks per second (using the hypothetical assumption that all macroblocks are static macroblocks).
... chrome edge firefox vp9 (firefox 46 and later) vp8 opera safari choosing the right codec before choosing a codec that isn't one of the mandatory codecs (vp8 or avc for video and opus or pcm for audio), you should seriously consider the potential drawbacks: in particular, only these codecs can be generally assumed to be available on essentially all devices that support webrtc.
Basic Transformations - SVG: Scalable Vector Graphics
an example: <svg width="30" height="10"> <g fill="red"> <rect x="0" y="0" width="10" height="10" /> <rect x="20" y="0" width="10" height="10" /> </g> </svg> all following transformations are summed up in an element's transform attribute.
... if the second value is not given, it is assumed to be 0.
...if the second number is omitted, it is assumed to be equal to the first.
Subresource Integrity - Web security
tools for generating sri hashes you can generate sri hashes from the command-line with openssl using a command invocation such as this: cat filename.js | openssl dgst -sha384 -binary | openssl base64 -a or with shasum using a command invocation such as this: shasum -b -a 384 filename.js | awk '{ print $1 }' | xxd -r -p | base64 notes: the pipe-through-xxd step takes the hexadecimal output from shasum and converts it to binary.
... the pipe-through-awk step is necessary because shasum will pass the hashed filename in its output to xxd.
...therefore, the resource must be served with an access-control-allow-origin header that allows the resource to be shared with the requesting origin; for example: access-control-allow-origin: * examples in the following examples, assume that oqvuafxrkap7fdgccy5uykm6+r9gqq8k/uxy9rx7hnqlgyl1kpzqho1wx4jwy8wc is already known to be the expected sha-384 hash (digest) of a particular script example-framework.js, and there’s a copy of the script hosted at https://example.com/example-framework.js.
Using the WebAssembly JavaScript API - WebAssembly
more involved memory example let’s make the above assertions clearer by looking at a more involved memory example — a webassembly module that imports the memory instance we defined earlier, populates it with an array of integers, then sums them.
...add the following into your code, where indicated: var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = results.instance.exports.accumulate(0, 10); console.log(sum); note how we create the uint32array view on the memory object’s buffer (memory.prototype.buffer), not on the memory itself.
... summary this article has taken you through the basics of using the webassembly javascript api to include a webassembly module in a javascript context and make use of its functions, and how to use webassembly memory and tables in javascript.
clipboard - Archive of obsolete content
var clipboard = require("sdk/clipboard"); clipboard.set("lorem ipsum dolor sit amet"); var contents = clipboard.get(); set the clipboard contents to some html.
... 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.
content/mod - Archive of obsolete content
for example, the following code applies a style to a content window, adding a border to all divs in page: var attachto = require("sdk/content/mod").attachto; var style = require("sdk/stylesheet/style").style; var style = style({ source: "div { border: 4px solid gray }" }); // assuming window points to the content page we want to modify attachto(style, window); parameters modification : object the modification we want to apply to the target.
... for example, the following code applies and removes a style to a content window, adding a border to all divs in page: var { attachto, detachfrom } = require("sdk/content/mod"); var style = require("sdk/stylesheet/style").style; var style = style({ source: "div { border: 4px solid gray }" }); // assuming window points to the content page we want to modify attachto(style, window); // ...
io/file - Archive of obsolete content
if "b" is not present, the file is opened in text mode, and its contents are assumed to be utf-8.
... if mode is not given, "r" is assumed, and the file is opened in read-only text mode.
io/text-streams - Archive of obsolete content
if not specified, "utf-8" is assumed.
...if not specified, "utf-8" is assumed.
platform/xpcom - Archive of obsolete content
for example, this subclass implements the nsirequest interface: var { class } = require('sdk/core/heritage'); var { unknown } = require('sdk/platform/xpcom'); var request = class({ extends: unknown, interfaces: [ 'nsirequest' ], initialize: function initialize() { this.pending = false; }, ispending: function() { return this.pending; }, resume: function() { console.log('resuming...'); }, suspend: function() { console.log('suspending...'); }, cancel: function() { console.log('canceling...'); } }); this component definition: specifies that we support nsirequest using the interfaces property.
...onstructor with its contract id: var { factory } = require('sdk/platform/xpcom'); var { cc, ci } = require('chrome'); var contractid = '@me.org/request' // create and register the factory var factory = factory({ contract: contractid, component: request }); now xpcom users can access our implementation in the normal way: var request = cc[contractid].createinstance(ci.nsirequest); request.resume(); methods queryinterface(interface) this method is called automatically by xpcom, so usually you don't need to call it yourself.
jpm - Archive of obsolete content
y (as the file .profile is executed every time a new terminal is opened): export path="$home/node_modules/.bin/:$path" installing jpm from git alternatively, you can also get the latest version of jpm using git: git clone https://github.com/mozilla-jetpack/jpm.git cd jpm npm install npm link after installing jpm after installation, at the command prompt, type: jpm you should see a screen summarizing the available jpm commands.
...assuming you don't want an old version of firefox, your options are firefox developer edition, firefox nightly, unbranded beta, or unbranded release.
Getting started (cfx) - Archive of obsolete content
summary in this tutorial we've built and packaged an add-on using three commands: cfx init to initialize an empty add-on template cfx run to run a new instance of firefox with the add-on installed, so we can try it out cfx xpi to package the add-on into an xpi file for distribution these are the three main commands you'll use when developing sdk add-ons.
...in this case it's assumed that you have checked out the sdk from its github repo and will have run the bin/activate script from the root of your checkout.
Finding window handles - Archive of obsolete content
finding the content window handle hwnd hcontent = 0; // first we need to find the main browser window hwnd hff = ::findwindowex(0, 0, "mozillauiwindowclass", 0); if (hff) { // next we step down through a fixed structure hwnd htemp; htemp = ::findwindowex(hff, 0, "mozillawindowclass", 0); htemp = ::findwindowex(htemp, 0, "mozillawindowclass", 0); // assume only 1 window at this level has children // and the 1 with children is the one we want hwnd hchild = ::getwindow(htemp, gw_child); while (htemp && !hchild) { htemp = ::getwindow(htemp, gw_hwndnext); hchild = ::getwindow(htemp, gw_child); } // did we find a window with children?
... // that child is hopefully the content window if (htemp) { htemp = ::getwindow(htemp, gw_child); hcontent = ::findwindowex(htemp, 0, "mozillacontentwindowclass", 0); } } // at this point hcontent is null or the content window hwnd i am not sure how "fragile" the assumptions are about the window structure, but it matched the values i got from spy++.
Miscellaneous - Archive of obsolete content
using string bundles from javascript assuming the extension has myext.properties with name/value pairs such as: invalid.url=the speficied url, %s, is invalid.
... var ci = components.interfaces; var cc = components.classes; //assume you can not get the main window object directly, if you can, just use it var wm = cc["@mozilla.org/appshell/window-mediator;1"].getservice(ci.nsiwindowmediator); var mainwindow = wm.getmostrecentwindow("navigator:browser"); //get sessionhistory from the current selected tab var history = mainwindow.gbrowser.selectedbrowser.webnavigation.sessionhistory; and then get the page you want, and it's...
Modules - Archive of obsolete content
// at the end of your code: (assuming neither 'i' nor 'thatobj' is being exported!) for (var i=0; i < exported_symbols.length; i++) {thatobj[exported_symbols[i]] = eval(exported_symbols[i]);} } or for one-time-only usage of a module: (function (thatobj) { thatobj = thatobj || window; var exported_symbols = [ // put the symbols here ]; // your code here...
... // at the end of your code: (assuming neither 'i' nor 'thatobj' is being exported!) for (var i=0; i < exported_symbols.length; i++) {thatobj[exported_symbols[i]] = eval(exported_symbols[i]);} })(); // can put an object argument here ...
Tree - Archive of obsolete content
t; i++) { if (treeview.iscontainer(i) && !treeview.iscontaineropen(i)) treeview.toggleopenstate(i); } to collapse all tree nodes just change the condition: var treeview = tree.treeboxobject.view; for (var i = 0; i < treeview.rowcount; i++) { if (treeview.iscontainer(i) && treeview.iscontaineropen(i)) treeview.toggleopenstate(i); } getting the text from the selected row assuming the given <tree>: <tree id="my-tree" seltype="single" onselect="ontreeselected()"> use the following javascript: function ontreeselected(){ var tree = document.getelementbyid("my-tree"); var cellindex = 0; var celltext = tree.view.getcelltext(tree.currentindex, tree.columns.getcolumnat(cellindex)); alert(celltext); } getting the tree item from the focused row assuming <tr...
...for example, assuming the given <tree>: <tree id="my-tree" onclick="ontreeclicked(event)"> use the following javascript: function ontreeclicked(event){ var tree = document.getelementbyid("my-tree"); var tbo = tree.treeboxobject; // get the row, col and child element at the point var row = { }, col = { }, child = { }; tbo.getcellat(event.clientx, event.clienty, row, col, child); var celltext = tre...
Extension Versioning, Update and Compatibility - Archive of obsolete content
there are quite a few tools you may use to generate hashes: various unix flavors include sha1sum, sha256sum and so on.
...there are also gnu ports for win (besides usual suspects like cygwin), which are good for non-interactive use: sha256sum file there is also md5deep, which is cross platform: sha256deep file openssl also generates hashes for you: openssl sha256 file if you're on windows, hashtab is a shell extension...
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
and was originally published in japanese for the firefox developers conference summer 2007.
...i will assume that you have experience developing with dynamic html, as well as the topics below.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
this assumes that you've set the class xs-hw-toolbarbutton to all of your buttons.
...keep in mind that you shouldn't assume anything about the location (or presence!) of any specific buttons; remember users could have moved them or removed them altogether.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
moreover, code using eval is harder to parse for a human mind, is often pretty complex, and relies on assumptions that are not necessarily true in the future or even now.
...in real life such code is often far more complex) the code might break in the future, as certain assumptions might not longer be true, for example the function signature may change (auri from above becomes aurl) or the function is replaced by a short-hand/arrow function: function addtab(auri) tabbrowser.addtab(auri); var addtab = (auri) => tabbrowser.addtab(auri); same as with "passing functions/code as strings" above, patching a function to with fragments of externally retrieved data will c...
Appendix D: Loading Scripts - Archive of obsolete content
the examples below which make use of the services global assume that you're previously imported the services.jsm module.
...this means that any and all javascript objects passed in our out of them are wrapped in inter-compartment proxy objects, which consume additional memory and add an extra layer of complexity to all property accesses and method calls.
Connecting to Remote Content - Archive of obsolete content
assume we need to parse the following data: {"shops": [{"name": "apple", "code": "a001"}, {"name": "orange"}], "total": 100} when the onload callback function is called, the response text is converted into a js object using the parse method.
...let's assume that the xml returned from remote server is this: <?xml version="1.0"?> <data> <shops> <shop> <name>apple</name> <code>a001</code> </shop> <shop> <name>orange</name> </shop> </shops> <total>2</total> </data> when a valid xml response comes back from the remote server, the xml document object can be manipulated using different dom methods, to display the...
JavaScript Object Management - Archive of obsolete content
you have to make sure you test your extension with multiple windows open; never assume everything will work the same as with a single window.
...well, only if consumers of the class play nice and don't change anything they shouldn't.
Signing an XPI - Archive of obsolete content
*assumes you have a zip utility available on your system path.
... this procedure assumes you installed the new certificate into mozilla firefox here's the commands required to export it to a file, import it to the code signing database, and verify the signing attributes (u,u,u).
Tabbed browser - Archive of obsolete content
these snippets assume they are run in the context of a browser window.
...this assumes the tab is opened by your extension, not by some other browser component.
Using Dependent Libraries In Extension Components - Archive of obsolete content
// assume that we're in <extensiondir>/components, and we want to find // <extensiondir>/libraries nscomptr<nsifile> libraries; rv = alocation->getparent(getter_addrefs(libraries)); if (ns_failed(rv)) return rv; nscomptr<nsilocalfile> library(do_queryinterface(libraries)); if (!library) return ns_error_unexpected; library->setnativeleafname(ns_literal_cstring("libraries")); libr...
... // assume that we're in <extensiondir>/components, and we want to find // <extensiondir>/libraries nscomptr<nsifile> libraries; rv = alocation->getparent(getter_addrefs(libraries)); if (ns_failed(rv)) return rv; nscomptr<nsilocalfile> library(do_queryinterface(libraries)); if (!library) return ns_error_unexpected; library->setnativeleafname(ns_literal_cstring("libraries")); library->appe...
Add-ons - Archive of obsolete content
all of these documents currently assume, however, that you are developing your extension using xul and javascript only.
...it assumes that you are already familiar with building an extension.
JXON - Archive of obsolete content
in summary let's take the third algorithm as the most representative jxon parsing algorithm.
... about this library the jxon.build() method summarizes all our four ways of conversion (see: #1, #2, #3, #4).
Defining Cross-Browser Tooltips - Archive of obsolete content
summary: authors are used to having alt text appear as a &quot;tooltip&quot; above images, but that's not how it was meant to be used.
...this assumes that the browser can find the image and that it supports the image format used; if either of these is not true, and the image cannot be displayed, then the alt text should be displayed in place of the missing image.
Notes on HTML Reflow - Archive of obsolete content
during an incremental reflow, a frame can assume that none of the constraints computed "from above" (for example, available width) have changed; instead, something "within" the frame has changed, which may have bottom-up impact to the frame hierarchy.
...during a resize reflow, the frame can assume that none of the frame's internal state (e.g., a text frame's text) has changed; instead, a top-down change in the layout constraints has occurred.
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
assuming you have cvs somewhere in your path, type this from a command prompt: c:\> set cvsroot=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot c:\> set home=\temp c:\> cvs login (logging in to anonymous@cvs-mirror.mozilla.org) cvs password: anonymous c:\> cvs -z3 co mozilla/embedding/browser/activex/src/pluginhostctrl this fetches the source for the control into mozilla\embedding\browser\activex\...
... manual installation assuming you have the precompiled pluginhostctrl.dll and wish to install it on a machine, you must register it either through an install script or manually: regsvr32 pluginhostctrl.dll you must have administrator privileges to install a new control on operating systems such as windows nt, 2000 & xp.
Modularization techniques - Archive of obsolete content
here's a quick summary.
... in parameters and local pointers interfaces that are passed in to a function and local copies of that interface pointer are assumed to be in the lifetime of the calling function, and do not need to have addref() called.
Mozilla Application Framework in Detail - Archive of obsolete content
by meeting the needs of developers and companies who are working to provide consumers with new interactive applications, solutions and services, gecko will become a key catalyst for new growth and innovation and for delivering anytime, anywhere access to millions of new users.
...the gecko browser engine offers several key benefits including: size: gecko has been designed to be lean and modular, bringing full-functionality browsing to a variety of new consumer devices.
Stress testing - Archive of obsolete content
tools for microsoft windows consume.exe from the windows server 2003 resource kit tools can consume various resources: physical memory, cpu time, page file, disk space and even the kernel pool.
...the only downside is you can't specify how much of the resource to use, only which one to consume.
Table Cellmap - Archive of obsolete content
79 // this union relies on the assumption that an object (not primitive type) does 80 // not start on an odd bit boundary.
...83 union { 84 nstablecellframe* morigcell; 85 long mbits; 86 }; the idea behind this construction is a entry in the cellmap can be either the origin of a row- or colspan (a cell cell without a defined row- or colspan attribute assumes 1 as a default value), or a entry which is only covered by a row- or colspan.
Table Layout Strategy - Archive of obsolete content
8 // desired width due to proportional <col>s or cols attribute #define final 9 // width after the table has been balanced, considering all of the others the priority of allocations for columns is as follows: max(min_con, min_adj) max (pct, pct_adj) fix fix_adj max(des_con, des_adj), but use min_pro if present for a fixed width table, the column may get more space if the sum of the col allocations is insufficient column width info columns get their width information from style info <col width="200px"> and from the cells that belong into this column.
... width = "0*" assume that you would like to give all the space to the second column in a table.
The new nsString class implementation (1999) - Archive of obsolete content
the problem stems from assumptions that programmers make regarding ascii strings; the typical assumption being that they will never need to interoperate with code that assumes ucs2 strings.
... this assumption is nearly always wrong -- and will seriously hinder our ability to localize the source base.
Writing textual data - Archive of obsolete content
writing to a stream in gecko 1.8 (seamonkey 1.0, firefox 1.5), you can use nsiconverteroutputstream: var charset = "utf-8"; // can be any character encoding name that mozilla supports var os = components.classes["@mozilla.org/intl/converter-output-stream;1"] .createinstance(components.interfaces.nsiconverteroutputstream); // this assumes that fos is the nsioutputstream you want to write to os.init(fos, charset, 0, 0x0000); os.writestring("umlaute: \u00fc \u00e4\n"); os.writestring("hebrew: \u05d0 \u05d1\n"); // etc.
...re's an example: // 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 for this example */ "utf-8"; now you can convert and write to the stream: // this code assumes that os is your nsioutputstream // your_string here is the string you want to write.
Anonymous Content - Archive of obsolete content
assuming that all explicit children have valid insertion points, the anonymous content is generated underneath the bound element.
...style rules can be written with the assumption that they will match (in the above example) both the file control and the element focused inside the file control.
Binding Implementations - Archive of obsolete content
it can be assumed that the anonymous content of the binding has been fully constructed, although the bindingattached event will not have fired.
... property initialization always takes place after content generation but before the firing of a binding attachment event, since the bindingattached handler needs to be able to assume that all properties will be accessible on the binding.
Elements - Archive of obsolete content
if no phase is specified, a default of bubbling is assumed.
... [editor's note: a forthcoming dom events specification will presumably outline the list of valid keycode strings.] if this attribute is present, then its value must match the keycode field of the dom key event object in order for the handler to fire.
execute - Archive of obsolete content
summary launches a file inside the install archive.
... blocking a boolean value that specifies whether the installation should wait for the execution of the file to finish before it resumes.
Return Codes - Archive of obsolete content
patch_bad_checksum_target -221 the checksum generated for the source file does not match the checksum in the xpi file.
... patch_bad_checksum_result -222 the checksum of the patched file failed.
XTech 2006 Presentations - Archive of obsolete content
microsummaries in firefox and on the web - myk melez microsummaries are regularly-updated compilations of the most important and timely information on web pages.
... this talk demonstrates how firefox will incorporate microsummaries into its ui, starting with bookmark labels.
A XUL Bestiary - Archive of obsolete content
note that when no file name is specified after the chrome directory path, a file name with the same name as the package is assumed.
... locale/ us-en/ navigator.dtd the default directory underneath each of these main package subdirectories is assumed in the chrome url (i.e.
RDF Modifications - Archive of obsolete content
let's assume we have single query with as follows: <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/description" object="?description"/> </query> these query sta...
...assuming that the 'obelisk' photo doesn't have a description already, adding the triple listed above should cause a new result to be available for this photo.
Things I've tried to do with XUL - Archive of obsolete content
vlad: sure; the snippets assume that there's some enclosing structure that will provide the actual height.
...this is assuming no scrolling is going on.
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
we assume that you're also familiar with the basics of creating firefox extensions and have the hello world extension working.
...the dimensions of the icons in various applications for both modes are summarized in the following table (feel free to add information about other applications): application (theme name) big icon size small icon size firefox 1.0 (winstripe) 24x24 16x16 thunderbird 1.0 (qute) 24x24 16x16 the stylesheet to set the image for your toolbar button, use the following css rules: /* skin/toolbar-button.css */ #myextension-bu...
Complete - Archive of obsolete content
the extension is assumed to fail in any future version of the application.
...the extension is assumed to work in any future version of the application.
Adding HTML Elements - Archive of obsolete content
stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> then, you can use html tags as you would normally, keeping in mind the following: you must add a html: prefix to the beginning of each tag, assuming you declared the html namespace as above.
... <html:hr/> </html:div> expense report 1 what i did last summer <button id="yes" label="yes"/> <button id="no" label="no"/> as can be seen in the image, the text inside the div tag was displayed but the other text (expense report 1 and what i did last summer) was not.
Adding Style Sheets - Archive of obsolete content
let's assume that we are building the find files dialog for themeability, because the find files dialog can be referred to with the url chrome://findfile/content/findfile.xul so the style sheet file will be stored in chrome://findfile/skin/findfile.css.
...the following list summarizes some of the selectors available: button matches all button tags.
Creating a Window - Archive of obsolete content
you should also be able to double-click the file in your file manager, assuming that xul files are associated with mozilla.
...(usually the browser window.) for example, we could open the find files dialog with either of the following: mozilla -chrome chrome://findfile/content/findfile.xul mozilla -chrome resource:/chrome/findfile/content/findfile.xul if you run this command from a command-line (assuming you have one on your platform), the find files dialog will open by default instead of the mozilla browser window.
Element Positioning - Archive of obsolete content
this is because the flexibility is assumed by default in the other direction.
... find files example so far: source view next, a summary and some additional details of the box model are described.
Using multiple DTDs - Archive of obsolete content
assuming you have an entity called somebutton.label defined in mainwindow.dtd, you can access the entity like this: <button id="somebutton" label="&somebutton.label"> multiple dtds if you want to use multiple dtds with your xul file, you can simply list all of the dtds inside your dtd declaration: <!doctype window [ <!entity % commondtd system "chrome://myextensions/locale/common.dtd"> %common...
...assume you have an entity okbutton.label defined in file common.dtd.
Using nsIXULAppInfo - Archive of obsolete content
example 1: checking firefox version // assuming we're running under firefox var appinfo = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulappinfo); var versionchecker = components.classes["@mozilla.org/xpcom/version-comparator;1"] .getservice(components.interfaces.nsiversioncomparator); if(versionchecker.compare(appinfo.version, "1.5") >= 0) { ...
...see bug 809920, and in summary: // work around the fact that xpcshell doesn't have a proper app-info xpcom object.
Getting started with XULRunner - Archive of obsolete content
i am assuming that it doesn’t need to hook into my windows system and that’s a good thing.
... you can extract this to any location you like, but there are many places in the documentation that will assume that you have this installed in /library/frameworks.
Format - Archive of obsolete content
this is an example of what a newsgroup summary should look like when completed.
... summary: mozilla.dev.planning - july 17-23, 2006 announcements firefox 2/gecko 1.8.1 bug approvals starting on friday july 21 at 10:00a pdt the release triage team will no longer be accepting bugs unless they meet one of the posted criteria.
Mozilla.dev.apps.firefox-2006-09-29 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - september 22-29, 2006 announcements bon echo 20060921 nightly to recieve "major update" offer mike beltnzer announced that 'users running the bon echo 20060921 nightly build will be offered the chance to upgrade to a "new version"' firefox start up performance boris zbarsky recently performed some profiling of firefox's start up - these are some of the details discussions problem handling dmg files on mac discussion about why sometimes dmg files are not mounted correctly after they are downloaded.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
Mozilla.dev.apps.firefox-2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - september 30 - october 6, 2006 announcements vista compatibility lab mike schroepfer announced the current work being done testing mozilla products with vista.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-22 - Archive of obsolete content
summary: mozilla.dev.accessibility - nov 17-nov 22, 2006 announcements mozilla osk project grant aaron leventhal (on behalf of michael curran) mentiond that there is now an nvda email list you can join if you wish to keep up to date with the latest changes, or if you wish to discuss new features or talk with other nvda users.
...he expressed his gratitude and thanks everyone for being supportive during and after the summit.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - september 22 - september 29, 2006 announcements lightning and sunbird 0.3 rc1 test day!
... authors mark paruzel yi (eric) shen [| back to weekly summaries ] ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - september 29 - october 6, 2006 announcements sunbird and lightning 0.3rc1 available gordon announced the candidate (rc) builds for sunbird and lightning 0.3 are released.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - september 22-29, 2006 announcements bon echo 20060921 nightly to recieve "major update" offer mike beltnzer announced that 'users running the bon echo 20060921 nightly build will be offered the chance to upgrade to a "new version"' firefox start up performance boris zbarsky recently performed some profiling of firefox's start up - these are some of the details discussions problem handling dmg files on mac discussion about why sometimes dmg files are not mounted correctly after they are downloaded.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - september 30 - october 6, 2006 announcements vista compatibility lab mike schroepfer announced the current work being done testing mozilla products with vista.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 6, 2006 - october 13, 2006 announcements firefox vista compatible and versioning heads up robert strong describes the compatibility between windows vista and firefox, also about the versioning change.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 13, 2006 - october 20, 2006 announcements content filtering, manipulation, and control in firefox 3 an open invitation from myk melez to contribute to the brainstorming of new features for firefox 3 and future firefox releases.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-26 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 20, 2006 - october 26, 2006 announcements none this week.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 20, 2006 - october 27, 2006 announcements none this week.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 27, 2006 - november 3, 2006 announcements none this week.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-04 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 27, 2006 - november 3, 2006 announcements none this week.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - november 10, 2006 - november 17, 2006 announcements none this week.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.builds - september 22nd to 29th 2006 .mar packages peter weilbacher posted a question and asked: how does one go about creating a .mar package that can be used in updating firefox and thunderbird?
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.builds - september 30th to october 6th 2006 tb mozilla_1_8_branch build problem on mac os x (10.4.7, universal build) ludwig hügelschäfer stated that he has been encountering an error when he executes a "make export" operation on thunderbird (part of the mozilla_1_8_branch) since september 15th.
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.builds - october 14th to october 20th 2006 linux reference platform 1.8.1 october 18th: marcus is wondering about the linux platform that is currently used to compile both public releases of firefox and xulrunner.
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.builds - october 28th to november 3rd 2006 no such file or directory (build problem on winxp) november 2nd: kenoa complained that when he is compiling using cygwin on win32 he gets the following error no such file or directory1: /cygdrive/c/mozilla/mail/config/mozconfig client.mk:339: /cygdrive/c/mozilla/.mozconfig.mk: no such file or directory he claims that the file ".mozconfig" exists in /cygdrive/c/mozilla/mail/config/mozconfig the disable-crypto cause problem originally posted on november 2nd: gxk is building minimo using the code base from sept.
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.builds - november 4th to november 10th 2006 browser buttons november 4th: mojr wants to know if firefox has a similar feature that the new ie 6 has built in.
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.builds - november 10th to november 17th 2006 how to build in yellowdog linux 4.1?
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.builds - november 17th to november 24th 2006 trouble building xulrunner 1.8.4 on winxp using mingw32 november 20th: joe is trying to build xulrunner using the ming compiler on windowsxp.
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.builds - november 25th to december 1st 2006 any one else seeing this?
... summarized by: vanessa miranda & mohammad tirtashi ...
Extentsions FAQ - Archive of obsolete content
r-button[myexten-toolbar-button="off"] { list-style-image: url("chrome://myexten/skin/toolbar-button-off.png"); -moz-image-region: rect(0px 24px 24px 0px);} to implement a third i would simply change add an attribute and the corresponding css see http://www.w3.org/tr/rec-css2/cascade.html#cascade friday, october 13 - 20, 2006 (↑ top) how to get a refenece to the sidebar window assuming you have chrome privileges, this should work: var ci = components.interfaces; var toplevelwindow = window.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.nsidocshelltreeitem) .roottreeitem .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidomwindow) .queryinterface(ci.nsidomchromewindow); var ...
... friday, september 29 - october 6, 2006 (↑ top) how can we programmatically extract the subject, sender, date and the body of an e- mail when you are reading one (in thunderbird presumably)?
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.l10n - october 6, 2006 announcements english united states dictionary english united states dictionary for firefox 2.
...test resumt will be found here another lightning localization update with some bad news difference has been located between sunbird_0_3_branch (for sunbird 0.3) and mozilla_1_8_branch.
mozilla-dev-platform - Archive of obsolete content
about newsgroup summary for mozilla.dev.platform (google groups link) is for people working on the mozilla application framework ("mozilla-the-platform").
... summaries 2006-09-29 (sept 22 - sept 29) 2006-10-06 (sept 30 - oct 6) 2006-10-13 (oct 7 - oct 13) 2006-10-20 (oct 14 - oct 20) 2006-10-27 (oct 21 - oct 27) 2006-11-03 (oct 28 - nov 3) 2006-11-10 (nov 4 - nov 10) 2006-11-17 (nov 11 - nov 17) 2006-18-24 (nov 18 - nov 24) 2006-12-01 (nov 25 - dec 1) faq faq for mozilla.dev.platform ...
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.security - september 23, 2006 to september 29, 2006 return to mozilla-dev-security announcements none during this week.
... discussions file: vs resource: vs chrome: from a security point of view boris zbarsky gives a summary the current setup for checkloaduri (which type of security principal can load what) and asks for comments about whether that is the desired behaviour.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.security - november 11, 2006 to november 17, 2006 return to mozilla-dev-security announcements none during this week.
... extended validation certificates a note as to how opera is handling extended validation certificates http://labs.opera.com/news/2006/10/09/ fwd: re: mozilla questions regarding the ev standard gervase markham posted a summary of questions emailed to kelvin yiu about the extended validation certificates.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.tech.xul - nov 11-nov 17, 2006 return to mozilla-dev-tech-xul announcements processing instructions are now added to xul document's dom on november 12, 2006, nickolay ponomarev announces the results of the recently fixed bug 319654.
...for a summary of the changes and workarounds, read nickolay's post in the mozilla.dev.tech.xul newsgroup.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 6 - october 13, 2006 announcements sunbird and lightning 0.3rc2 available matthew willis announced the second release candidate builds for sunbird and lightning 0.3 are released.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 13 - october 20, 2006 announcements inter-operability test day on tuesday october 17 interoperability testing on tuesday, for calendar applications test on how sunbird works with published calendars that were generated.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 20 - october 27, 2006 announcements calendar test day october 31st a test date has been set for october 31st.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 27 - november 3, 2006 announcements test day results the calendar qa team had a successful test day on tuesday discussions storage format for events storage format of timestamps in lightning.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 3 - november 10, 2006 announcements calendar-qa team announces november 14th testday calendar-qa team celebrate some new functionality of calendar.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 10 - november 17, 2006 announcements no meeting for this week.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 24 - december 01, 2006 announcements december 5th test day coming up!
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
Monitoring plugins - Archive of obsolete content
summary a new component of the plugin system is now available to measure how long it takes plugins (e.g., adobe flash) to execute their calls.
...it is therefore technically incorrect to say that the runtime is a measure of cpu use, however, it is a good representation of overall resources being consumed by the plugin.
NPEvent - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents an event passed by npp_handleevent() to a windowless plug-in.
... suspend/resume events: sent to all instances in all windows.
NPN NewStream - Archive of obsolete content
summary requests the creation of a new data stream produced by the plug-in and consumed by the browser.
... description npn_newstream creates a new stream of data produced by the plug-in and consumed by the browser.
NPN_Write - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary pushes data into a stream produced by the plug-in and consumed by the browser.
... returns if successful, the function returns a positive integer representing the number of bytes written (consumed by the browser).
NPP_WriteReady - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary determines maximum number of bytes that the plug-in can consume.
...the npp_write function may pass a larger buffer, but the plug-in is required to consume only the amount of data returned by npp_writeready.
Getting Started - Archive of obsolete content
this tutorial assumes that you have some experience with html (or xml) and that you are comfortable with the basics ofmarkup .
... how to use this tutorial although each page in this tutorial has been written so that it can act as a "standalone" tutorial, it does assume you already possess the knowledge of the information taught in previous pages of this tutorial.
Introduction to SSL - Archive of obsolete content
the document assumes that you are familiar with the basic concepts of public-key cryptography, as summarized in "introduction to public-key cryptography." the ssl protocol the transmission control protocol/internet protocol (tcp/ip) governs the transport and routing of data over the internet.
...however, the steps involved can be summarized as follows (assuming the use of the cipher suites listed in "cipher suites with rsa key exchange"): the client sends the server the client's ssl version number, cipher settings, randomly generated data, and other information the server needs to communicate with the client using ssl.
Using SSH to connect to CVS - Archive of obsolete content
this document assumes that you already have a write-access cvs account to cvs.mozilla.org.
...assuming you use a shell script or batch file to set things up, just add the commands below to the end of your file.
Developing cross-browser and cross-platform pages - Archive of obsolete content
it requires from the web author to make assumptions about what will happen with future browsers or to decide to provide future browsers a safe fallback service.
... it assumes that web authors are able to correctly identify browsers and browser versions in the first place...
References - Archive of obsolete content
<- previous section: summary of changes you can learn more on using web standards from these sites (listed in no particular order): what are web standards and why should i use them?
... <- previous section: summary of changes ...
Using Web Standards in your Web Pages - Archive of obsolete content
the next-to-last section, summary of changes, outlines all the changes described in this article.
... contents benefits of using web standards making your page using web standards - how to using the w3c dom developing cross browser and cross platform pages using xmlhttprequest summary of changes references original document information author(s): mike cowperthwaite, marcio galli, jim ley, ian oeschger, simon paquet, gérard talbot last updated date: may 29, 2008 copyright information: portions of this content are © 1998–2008 by individual mozilla.org contributors; content available under a creative commons license | details.
-ms-scrollbar-arrow-color - Archive of obsolete content
div { width: 150px; height: 150px; overflow-y: scroll; border-style: solid; border-width: thin; font-family: sans-serif; float: left; margin-right: 10px; } .bluescrollbox { scrollbar-face-color: blue; scrollbar-arrow-color: blue; } .greenscrollbox { scrollbar-face-color: green; scrollbar-arrow-color: green; } <body> <div class="bluescrollbox"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="greenscrollbox"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
-ms-scrollbar-base-color - Archive of obsolete content
; height: 150px; border-style: solid; border-width: thin; overflow-y: scroll; font-family: sans-serif; float: left; margin-right: 10px; } .aquascroll { scrollbar-base-color: aqua; scrollbar-arrow-color: blue; border-color: blue; } .bisquescroll { scrollbar-base-color: bisque; scrollbar-arrow-color: red; border-color: red; } <body> <div class="aquascroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="bisquescroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
-ms-scrollbar-face-color - Archive of obsolete content
div { width: 150px; height: 150px; overflow-y: scroll; border-style: solid; border-width: thin; font-family: sans-serif; float: left; margin-right: 10px; } .bluescrollbox { scrollbar-face-color: blue; scrollbar-arrow-color: blue; } .greenscrollbox { scrollbar-face-color: green; scrollbar-arrow-color: green; } <body> <div class="bluescrollbox"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="greenscrollbox"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
-ms-scrollbar-highlight-color - Archive of obsolete content
t-family: sans-serif; float: left; margin-right: 10px; } .bluescroll { -ms-scrollbar-highlight-color: aqua; -ms-scrollbar-face-color: blue; -ms-scrollbar-arrow-color: blue; border-color: blue; } .redscroll { -ms-scrollbar-highlight-color: bisque; -ms-scrollbar-face-color: red; -ms-scrollbar-arrow-color: red; border-color: red; } <body> <div class="bluescroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="redscroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
-ms-scrollbar-track-color - Archive of obsolete content
-family: sans-serif; float: left; margin-right: 10px; } .bluescroll { -ms-scrollbar-highlight-color: aqua; -ms-scrollbar-face-color: blue; -ms-scrollbar-arrow-color: blue; border-color: blue; } .redscroll { -ms-scrollbar-highlight-color: bisque; -ms-scrollbar-face-color: red; -ms-scrollbar-arrow-color: red; border-color: red; } <body> <div class="bluescroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="redscroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
LiveConnect Overview - Archive of obsolete content
the chapter assumes you are familiar with java programming.
...all javascript access to java takes place with these objects, which are summarized in the following table.
JSObject - Archive of obsolete content
summary the public final class netscape.javascript.jsobject extends object.
... method summary the netscape.javascript.jsobject class has the following methods: call calls a javascript method.
Examples - Archive of obsolete content
d/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us"> <head> <title>problem 2 - comments in xhtml</title> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> <style type="text/css"> <!-- body {background-color: blue; color: yellow; } --> </style> <script type="text/javascript"> <!-- var i = 0; var sum = 0; for (i = 0; i < 10; ++i) { sum += i; } alert('sum = ' + sum); // --> </script> </head> <body> <h1>problem 2 - comments in xhtml</h1> <p> this document is valid xhtml 1.0 strict served as <code>application/xhtml+xml</code>.
...--> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us"> <head> <title>problem 3 - comments in xml</title> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> <script type="text/javascript"> var i; var sum = 0; for (i = 10; i > 0; --i) { sum += i; } </script> </head> <body> <h1>problem 3 - comments in xhtml</h1> <p> this document is not well formed xhtml due to the double dash contained in the comment.
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
<style type="text/css"> <!-- body {background-color: blue; color: yellow;} --> </style> <script type="text/javascript"> <!-- var i = 0; var sum = 0; for (i = 0; i < 10; ++i) { sum += i; } alert('sum = ' + sum); // --> </script> this example illustrates that a conformant browser can ignore content inside of comments.
... <script type="text/javascript"> <!-- var i; var sum = 0; for (i = 10; i > 0; --i) { sum += i; } // --> </script> using cdata instead of comments properly enclosing script contents inside of cdata sections can cause problems in downlevel browsers which do not understand xml.
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
summary: a classic reborn!
...(assuming the lights were on.) it was cool, it was funny, it was pretty amazing.
background-size - Archive of obsolete content
[i assume it's the same as safari, since they just backported a webkit patch into khtml.
... but we need facts, rather than assumptions.] btw, some time ago i'v listed opera in the property template table and removed netscape because netscape is gecko based and opera has a global market share of > 2% (> 40% in some european countries).
Windows Media in Netscape - Archive of obsolete content
examples in this article all assume that the user is running windows media player 7 and later, although netscape 7.1 supports the clsids of windows media player 6x and later.
...summary: cross browser use of windows media player in ie and netscape 7.1 don't use proprietary dom sniffs such as looking for document.all-- this will rule out netscape 7.1.
Archive of obsolete content
newsgroup summaries obsolete: xpcom-based scripting for npapi plugins plugins that used to take advantage of being scriptable via liveconnect in 4.x netscape browsers lost this possibility in the new world.
...for instructions on tamarin central, please see the basics of web services summary: a current hot topic on the web right now are web services.
Game monetization - Game development
it's normally up to you if you want to get all the money in a lump sum or get it per month.
... summary there are many ways to earn money — everything that applies to the "normal" aaa gaming world can be, more or less, applied to casual html5 games.
Game promotion - Game development
a further option is to publish monthly reports that summarize all your progress — it helps you see what you've accomplished throughout the month and what's still left to do, and it keeps reminding people that your game is coming out soon — building buzz is always good.
... summary any way of promoting your game is good.
3D collision detection - Game development
if we assume that px, py and pz are the point's coordinates, and bminx–bmaxx, bminy–bmaxy, and bminz–bmaxz are the ranges of each axis of the aabb, we can calculate whether a collision has occurred between the two using the following formula: f(p,b)=(px>=bminx∧px<=bmaxx)∧(py>=bminy∧py<=bmaxy)∧(pz>=bminz∧pz<=bmaxz)f(p,b)= (p_x >= b_{minx} \wedge p_x <= b_{maxx}) \wedge (p_y >= b_{miny} \wedge...
...what we need to test here is that the distance between the sphere's centers is less than or equal to the sum of their radii.
Audio for Web games - Game development
you can mix and match various music samples and assuming you can control the volume of your audio element you could cross-fade different musical pieces.
...// set loading to false el.dataset.loading = 'false'; // hide loading text loadtext.style.display = 'none'; // show button playbutton.style.display = 'inline-block'; // allow play on click playbutton.addeventlistener('click', function() { // check if context is in suspended state (autoplay policy) if (audioctx.state === 'suspended') { audioctx.resume(); } playtrack(track); playbutton.dataset.playing = true; }) }) }) note: you can see this demo in action here and view the source code here.
Desktop gamepad controls - Game development
after a certain threshold is reached we can assume the input is done deliberately by the user and can act accordingly.
... summary that's it!
Desktop mouse and keyboard controls - Game development
let's assume you'd like to shoot a bullet when the right half of the screen is clicked with a mouse — it would be something like this: if(this.game.input.mousepointer.isdown) { if(this.game.input.mousepointer.x > this.world.width*0.5) { // shoot } } if you'd like to differentiate the mouse buttons being pressed, there are three defaults you can pick from: this.game.input.mousepointer.lef...
... summary ok, we've dealt with touch, keyboard and mouse controls.
Implementing controls using the Gamepad API - Game development
nscache: [], 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.
... summary the gamepad api is very easy to develop with.
Square tilemaps implementation: Scrolling maps - Game development
note: when writing this article, we assumed previous reader knowledge of canvas basics such as how get a 2d canvas context, load images, etc., which is all explained in the canvas api tutorial, as well as the basic information included in our tilemaps introduction article.
...in this implementation, we are assuming that (x,y) points to the top left corner of visible portion of the map.
Square tilemaps implementation: Static maps - Game development
note: when writing this article, we assumed previous reader knowledge of canvas basics such as how get a 2d canvas context, load images, etc., which is all explained in the canvas api tutorial, as well as the basic information included in our tilemaps introduction article.
...this snippets assumes the following definitions: context: a 2d canvas context.
2D maze game with device orientation - Game development
managepause pauses and resumes the game.
... summary i hope this tutorial will help you dive into 2d game development and inspire you to create awesome games on your own.
Call stack - MDN Web Docs Glossary: Definitions of Web-related terms
when the current function is finished, the interpreter takes it off the stack and resumes execution where it left off in the last code listing.
... call stack list: empty in summary, then, we start with an empty call stack.
Prefetch - MDN Web Docs Glossary: Definitions of Web-related terms
prefetching is when content is downloaded in the background, this is based on the assumption that the content will likely be requested, enabling the content to load instantly if and when the user requests it.
... <link rel="dns-prefetch" href="https://example.com/"> link prefetching link prefetching is a performance optimization technique that works by assuming which links the user is likely to click, then downloading the content of those links.
CSS and JavaScript accessibility best practices - Learn web development
the following sections summarize the main html features to consider.
... summary we hope this article has given you a good amount of detail and understanding about the accessibility issues surrounding css and javascript use on web pages.
Mobile accessibility - Learn web development
summary of screenreader testing on android and ios the most common mobile platforms have fully functional screen readers.
... summary in this article, we have provided you with some details about common mobile accessibility-specific issues and how to overcome them.
Test your skills: HTML accessibility - Learn web development
assume that these inputs will be part of a larger form, and wrap them in an element that associates them all together as a single related group.
... give the group a description/title that summarises all of the information as personal data.
WAI-ARIA basics - Learn web development
instead, we will cover the most critical wai-aria features for you to know about; if we don't mention any support details, you can assume that the feature is well-supported.
... summary this article has by no means covered all that's available in wai-aria, but it should have given you enough information to understand how to use it, and know some of the most common patterns you will encounter that require it.
What is accessibility? - Learn web development
to summarize: consider accessibility from the start of a project, and test early and often.
... summary this article should have given you a useful high-level overview of accessibility, shown you why it's important, and looked at how you can fit it into your workflow.
Images, media, and form elements - Learn web development
you should therefore always assume that forms are going to look quite different for different visitors and test complex forms in a number of browsers.
... summary this lesson has highlighted some of the differences you will encounter when working with images, media, and other unusual elements in css.
Sizing items in CSS - Learn web development
understanding how big the different features in your design will be is important, and in this lesson we will summarize the various ways elements get a size via css and define a few terms around sizing that will help you in the future.
... summary this lesson has given you a rundown of some key issues that you might run into when sizing things on the web.
Styling tables - Learn web development
the markup looks like so: <table> <caption>a summary of the uk's most famous punk bands</caption> <thead> <tr> <th scope="col">band</th> <th scope="col">year formed</th> <th scope="col">no.
... summary with styling tables now behind us, we need something else to occupy our time.
The box model - Learn web development
if we assume that the box has the following css defining width, height, margin, border, and padding: .box { width: 350px; height: 150px; margin: 10px; padding: 25px; border: 5px solid black; } the space taken up by our box using the standard box model will actually be 410px (350 + 25 + 25 + 5 + 5), and the height 210px (150 + 25 + 25 + 5 + 5), as the padding and border are added to the width use...
... summary that's most of what you need to understand about the box model.
CSS values and units - Learn web development
you can use any available <color> values assuming they are supported by your browser.
... summary this has been a quick run through of the most common types of values and units you might encounter.
CSS building blocks - Learn web development
just looking at it, consuming the content.) a basic work environment set up as detailed in installing basic software, and an understanding of how to create and manage files, as detailed in dealing with files.
...understanding how big the different features in your design will be is important, and in this lesson, we will summarize the various ways elements get a size via css and define a few terms around sizing that will help you in the future.
Responsive design - Learn web development
they all assume that you are trying to create a flexible grid and give you easier ways to do so.
... summary responsive design refers to a site or application design that responds to the environment in which it is viewed.
How do I start to design my website? - Learn web development
summary when starting with a web project, many people focus on the technical side.
...in sales, for instance, it's far more important and time-consuming to handle supply, payment, and shipment than to build a website where people can place orders.
How do you upload your files to a web server? - Learn web development
summary if you have built a simple web page (see html basics for an example), you will probably want to put it online, on a web server.
...you can see the full list at the rsync man page (search for "options summary").
What is a URL? - Learn web development
summary with hypertext and http, url is one of the key concepts of the web.
... examples of relative urls to better understand the following examples, let's assume that the urls are called from within the document located at the following url: https://developer.mozilla.org/docs/learn sub-resources skills/infrastructure/understanding_urls because that url does not start with /, the browser will attempt to find the document in a sub-directory of the one containing the current resource.
Advanced form styling - Learn web development
bear in mind that some questions in this assessment series assume knowledge of the next article too, so you might want to work through that article first before attempting it.
... summary while there are still difficulties using css with html forms, there are ways to get around many of the problems.
The HTML5 input types - Learn web development
<label for="mydate">when are you available this summer?</label> <input type="date" name="mydate" min="2013-06-01" max="2013-08-31" step="7" id="mydate"> browser support for date/time inputs you should be warned that the date and time widgets don't have the best browser support.
... summary that brings us to the end of our tour of the html5 form input types.
The web and web standards - Learn web development
ok, that's a very simple summary of what happened, but i did promise you a brief summary.
...web browsers are the software programs people use to consume the web, and include firefox, chrome, opera, safari, and edge.
HTML Cheatsheet - Learn web development
notation this is <u>mispelled</u> this is mispelled text displayed lower than normal text h<sub>2</sub>o h2o small text used to represent the <small>small print </small>of a document used to represent the small print of a document used for an address <address>main street 67</address> main street 67 used for a textual cite <cite>lorem ipsum</cite> lorem ipsum text displayed higher than normal text x<sup>2</sup> x2 a short inline quotation <q>the q element indicates a short inline quotation.</q> the q element indicates a short inline quotation.
... aditional information <details><summary>html cheatsheet</summary><p>inline elements</p><p>block elements</p></details> html cheatsheet inline elements block elements an unordered list <ul> <li>i'm an item</li> <li>i'm another item</li> </ul> i'm an item i'm another item an ordered list <ol> <li>i'm the first item</li> <li>i'm t...
Tips for authoring fast-loading HTML pages - Learn web development
reduce the number of inline scripts inline scripts can be expensive for page loading since the parser must assume that an inline script could modify the page structure while parsing is in progress.
... note: even though these attributes do help a lot the first time a page is loaded, you should use them but not assume they will work in all browsers.
Images in HTML - Learn web development
summing up: if an image has meaning, in terms of your content, you should use an html image.
... summary that's all for now.
From object to iframe — other embedding technologies - Learn web development
if someone else made it, assume it's dangerous until proven otherwise." besides security, you should also be aware of intellectual property issues.
... summary the topic of embedding other content in web documents can quickly become very complex, so in this article, we've tried to introduce it in a simple, familiar way that will immediately seem relevant, while still hinting at some of the more advanced features of the involved technologies.
Structuring the web with HTML - Learn web development
just looking at it, consuming the content).
...this module covers basic table markup, along with more complex features such as implementing captions and summaries.
Introduction to web APIs - Learn web development
lement); next up we include a couple of event handlers that serve to toggle between play and pause when the button is pressed and reset the display back to the beginning when the song has finished playing: // play/pause audio playbtn.addeventlistener('click', function() { // check if context is in suspended state (autoplay policy) if (audioctx.state === 'suspended') { audioctx.resume(); } // if track is stopped, play it if (this.getattribute('class') === 'paused') { audioelement.play(); this.setattribute('class', 'playing'); this.textcontent = 'pause' // if track is playing, stop it } else if (this.getattribute('class') === 'playing') { audioelement.pause(); this.setattribute('class', 'paused'); this.textcontent ...
... summary at this point, you should have a good idea of what apis are, how they work, and what you can do with them in your javascript code.
Third-party APIs - Learn web development
(at the time of writing, it was called a "consumer key" on the site, and the key creation process also asked for an optional "callback url".
... summary this article has given you a useful introduction to using third-party apis to add functionality to your websites.
Storing the information you need — Variables - Learn web development
a variable is a container for a value, like a number we might use in a sum, or a string that we might use as part of a sentence.
... summary by now you should know a reasonable amount about javascript variables and how to create them.
What is JavaScript? - Learn web development
to summarize: async and defer both instruct the browser to download the script(s) in a separate thread, while the rest of the page (the dom, etc.) is downloading, so the page loading is not blocked by the scripts.
... summary so there you go, your first step into the world of javascript.
Inheritance in JavaScript - Learn web development
object member summary to summarize, you've got four types of property/method to worry about: those defined inside a constructor function that are given to object instances.
... summary this article has covered the remainder of the core oojs theory and syntax that we think you should know now.
Object prototypes - Learn web development
in this example, we have defined a constructor function, like so: function person(first, last, age, gender, interests) { // property and method definitions this.name = { 'first': first, 'last' : last }; this.age = age; this.gender = gender; //...see link in summary above for full definition } we have then created an object instance like this: let person1 = new person('bob', 'smith', 32, 'male', ['music', 'skiing']); if you type "person1." into your javascript console, you should see the browser try to auto-complete this with the member names available on this object: in this list, you will see the members defined on person1's constructor — perso...
... summary this article has covered javascript object prototypes, including how prototype object chains allow objects to inherit features from one another, the prototype property and how it can be used to add methods to constructors, and other related topics.
Aprender y obtener ayuda - Learn web development
it can be as simple as: "it'll take me 500 hours to learn what i need to know, and i have a year to do it, so if i assume 2 weeks' holiday i'll need to do work on this for 10 hours per week.
... also, it might be a good idea to have some sub-goals worked out to allow you to keep track of where you are more easily, for example: html and css basics learnt by summer javascript basics learnt by december example website project built by next april etc.
Measuring performance - Learn web development
they should be collected and measured in a consistent manner and analyzed in a format that can be consumed and understood by non-technical stakeholders.
... 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.
Introduction to client-side frameworks - Learn web development
the table in this section provides a glanceable summary of the current browser support offered by each framework, as well as the domain-specific languages with which it can be used.
... summary and that brings us to the end of our introduction to frameworks — we’ve not taught you any code yet, but hopefully we've given you a useful background on why you'd use frameworks in the first place and how to go about choosing one, and made you excited to learn more and get stuck in!
Framework main features - Learn web development
for instance, consider a function add(), which takes integers a and b and returns their sum.
...le("button"); expect(btn).tobeinthedocument(); expect(btn).tohavetextcontent("clicked 0 times"); }); it("increments the count when clicked", () => { const { getbyrole } = render(<counterbutton />); const btn = getbyrole("button"); fireevent.click(btn); expect(btn).tohavetextcontent("clicked 1 times"); fireevent.click(btn); expect(btn).tohavetextcontent("clicked 2 times"); }); summary at this point you should have more of an idea about the actual languages, features, and tools you'll be using as you create applications with frameworks.
Getting started with React - Learn web development
you may also use the yarn package manager as an alternative, but we'll assume you are using npm in this set of tutorials.
... summary this brings us to the end of our initial look at react, including how to install it locally, creating a starter app, and how the basics work.
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
it's a very common scenario that a component needs to expose some behavior or information to the consumer; let's see how to achieve it with svelte.
... repl to see the current state of the code in a repl, visit: https://svelte.dev/repl/d1fa84a5a4494366b179c87395940039?version=3.23.2 summary in this article we have finished adding all the required functionality to our app, plus we've taken care of a number of accessibility and usability issues.
Styling Vue components with CSS - Learn web development
update it as follows: <ul aria-labelledby="list-summary" class="stack-large"> adding scoped styles the last component we want to style is our todoitem component.
... summary our work is done on the styling of our sample app.
Handling common accessibility problems - Learn web development
ctrl (when vo is speaking) pause/resume speech.
... summary hopefully this article has given you a good grounding in the main accessibility problems you might encounter, and how to test and overcome them.
Implementing feature detection - Learn web development
generally, such tests are done via one of the following common patterns: summary of javascript feature detection techniques feature detection type explanation example if member in object check whether a certain method or property (typically an entry point into using the api or other feature you are detecting for) exists in its parent object.
... summary this article covered feature detection in a reasonable amount of detail, going through the main concepts and showing you how to both implement your own feature detection tests and use the modernizr library to implement tests more easily.
Handling common JavaScript problems - Learn web development
let's fix this problem by running the code once the load event has been fired — remove the console.log() line, and update this code block: let superheroes = request.response; populateheader(superheroes); showheroes(superheroes); to the following: request.onload = function() { let superheroes = request.response; populateheader(superheroes); showheroes(superheroes); } to summarize, anytime something is not working and a value does not appear to be what it is meant to be at some point in your code, you can use console.log() to print it out and see what is happening.
... summary so that's javascript.
Deploying our app - Learn web development
summary that's it for our sample case study, and for the module!
... let's summarise all the parts of the toolchain: code quality and maintenance are performed by eslint and prettier.
Accessibility information for UI designers and developers
your content can then be better consumed by users with low vision and people with color deficiencies.
...that way, users of screen readers and screen magnifiers can reliably make assumptions about them and skip over them.
Mozilla Plugin Accessibility
all browser keys unavailable when plugin has focus focused plugins currently have no choice but to consume all keyboard events.
...if the plugin needs those keystrokes, the can consume them and not pass them on.
Mozilla’s UAAG evaluation report
acronym element: supported abbr element: supported abbr attribute for td/th: not supported summary for table: supported title for frame: ?
... acronym element: supported abbr element: supported abbr attribute for td/th: not supported summary for table: supported title for frame: ?
Adding a new CSS property
this document assumes that you have a specifcation for the property available.
... (note that when the longhand property css_property_parse_value_list, the shorthand property parser would be assumed to be reusing the longhand parser once per item, not for a whole list, as for properties like background-image or transform-timing-function.) if the property takes a list of keywords other than inherit/initial/etc., auto, none, or normal (which can be expressed using the variant_* flags), you should use variant_keyword and add a keyword table to the nscssprops class.
What to do and what not to do in Bugzilla
changing the bug information fields summary you should change the summary if the current one is unclear or does not correctly describe the issue covered by the bug.
... you should not change the summary in order to morph the bug to describe a different issue.
Creating reftest-based unit tests
for example, it occurs to me that we assume that spaces between a element name and an attribute name have no effect, but do we know this is true?
...presumably, one was supposed to open the pages with a browser and look at them and see if they look right.
Configuring Build Options
this will also help when troubleshooting because people will want to know which build options you have selected and will assume that you have put them in your mozconfig file.
...this saves a considerable amount of time directly after a clobber build, so pulling in new updates and rebasing is less time-consuming.
The Firefox codebase: CSS Guidelines
other tips assume ="true" in attribute selectors.
... colors for common areas of the firefox interface (panels, toolbar buttons, etc.), mozilla-central often comes with some useful css variables that are adjusted with the correct values for different platform configurations, so using those css variables can definitively save some testing time, as you can assume they already work correctly.
Eclipse CDT Manual Setup
(this assumes that you already have a copy of the mozilla source, and that you have also built the source so that you have a pre-existing object directory.
... assuming everything went as expected, you should now find that eclipse's code assistance works a whole lot better.
Reviewer Checklist
assume that inputs will be too big, too short, empty, malformed, or malicious.
... documentation the commit message should describe what the patch is changing (not be a copy of the bug summary).
Cross Process Object Wrappers
converting synchronous code to be asynchronous can be difficult and time-consuming.
... message ordering cpows can violate assumptions you might make about message ordering.
mozbrowseractivitydone
the mozbrowseractivitydone event is fired when something inside the browser <iframe> triggers a web activity, and that web activity's message is consumed by the receiving app.
... if the activity has a returnvalue set to true, then the activity is consumed when postresult or posterror is invoked on the activity by the receiving app.
Getting Started with Chat
channels here is a list of channels you should be aware of as a member of the mozilla community: (remember to use irc.mozilla.org and port 6697 or 6667 for your server settings) #qa a channel for qa discussion #developers a channel for mozilla development discussion #sumo a channel for support with firefox for more information about the mozilla irc network and more channels, go here.
...the following are some helpful commands which can be used by firebot: bug ###### when a bug number is mentioned in a message, firebot automatically displays the link and summary from bugzilla for that bug.
IPDL Tutorial
a quick summary of the difference between rpc and sync semantics is that rpc allows "re-entrant" message handlers: while an actor is blocked waiting for an "answer" to an rpc "call", it can be unblocked to handle a new, incoming rpc call.
... given the simple protocols: // --- pexample.ipdl include protocol psubexample; async protocol pexample { manages psubexample; parent: async pchild(); }; // --- psubexample.ipdl include protocol pexample; async protocol psubexample { manager pexample; child: async __delete__(); }; we assume that there is a psubexampleparent/child pair in existence, such that some element now wishes to trigger the protocol's deletion from the parent side.
JavaScript-DOM Prototypes in Mozilla
all the methods that are supposed to show up on this jsobject are actually not properties of the object itself, but rather properties of the prototype of the jsobject for the wrapper (unless the c++ object's class info has the flag nsixpcscriptable::dont_share_prototype set, but lets assume that's not the case here).
...because of this, the following holds true (assuming img1 and img2 are two different image objects in the same document): img1.__proto__ === img2.__proto__ if img1 would come from one document and img2 from another document, then the above would not be true.
Promise
return value a new promise that is initially pending, then assumes a state that depends on the outcome of the invoked callback function: if the callback returns a value that is not a promise, including undefined, the new promise is fulfilled with this fulfillment value, even if the original promise was rejected.
... if the callback returns a promise, the new promise will eventually assume the same state as the returned promise.
PromiseWorker.jsm
summary a promiseworker is a chromeworker except instead of calling postmessage() to send a message, you call post(), which returns a promise.
...in summary, from a worker file, data can only be sent back as a response to a request from the main thread, it is not possible for a worker to send data to the main thread otherwise, this is a key difference between promiseworker worker file and all other types of workers.
Application Translation with Mercurial
in this example, we assume firefox for desktop shall be localized and that the localization branch is aurora.
... choose a meaningful bug summary which will be shown for searches etc.
L10n Checks
orwardmenu.tooltip +fullzoomenlargecmd.commandkey3 +fullzoomreducecmd.commandkey2 +fullzoomresetcmd.commandkey2 +organizebookmarks.label -showallbookmarkscmd2.label migration/migration.dtd -importfromfile.accesskey -importfromfile.label +importfromhtmlfile.accesskey +importfromhtmlfile.label you can assume changed strings when you see entities removed and added with a similar name.
...the output closes with a summary, giving the total counts of missing and obsolete strings and some statistics on how many strings are changed or not, excluding access and command keys.
Localization and Plurals
t plural form of a word based on the number * * @param anum * the number to decide which plural form to use * @param awords * a semi-colon (;) separated string of words to pick the plural form * @return the appropriate plural form of the word */ string pluralform get(int anum, string awords) here is an example of using this method: // load pluralform and for this example, assume english components.utils.import("resource://gre/modules/pluralform.jsm"); // pluralform.get expects a semi-colon separated list of words let downloads = "download;downloads"; // pretend this number came from somewhere else let num = 10; // display the correct plural form for 10 downloads: "you have 10 downloads.") print("you have " + num + " " + pluralform.get(num, downloads) + "."); // try a...
...gain with a different value: "you have 1 download." num = 1; print("you have " + num + " " + pluralform.get(num, downloads) + ".") the above example works, but is still difficult to localize, because we're concatenating strings assuming a particular grammatical structure.
Localizing with Mozilla Translator
let's assume you have a firefox product in mt with the directory layout present in language packs, as you probably would need for a initial localization.
... ; assuming we are in a directory containing mozilla-central/ $ mkdir locale-only $ cd locale-only $ mkdir -p browser extensions/reporter other-licenses/branding/firefox/ $ cd browser; ln -s ../../mozilla-central/browser/locales/; cd ..
QA phase
enter the following command: $ hg log -l 1 you should see an output similar to the one below: changeset: 0:7c543e8f3a6a tag: tip user: your name <email@example.com> date: mon nov 23 18:08:25 2009 +0100 summary: added search bar strings now compare the local repository on your machine with the remote hg repository by entering this command: $ hg outgoing http://hg.mozilla.org/l10n-central/x-testing the hg outgoing command compares the two repositories and lists all changesets that are present locally, but not in the remote repository.
...you can expect to see output like this: comparing with http://hg.mozilla.org/l10n-central/x-testing searching for changes changeset: 0:7c543e8f3a6a tag: tip user: your name <email@example.com> date: mon nov 23 18:08:25 2009 +0100 summary: added search bar strings let's now push this changeset.
Release phase
here's how that's done: run this command to see recent commits in your local clone: $ hg log -l 3 you should a list of the most recent commits, similar to this one: changeset: 0:7c543e8f3a6a tag: tip user: your name <email@example.com> date: mon nov 23 18:08:25 2009 +0100 summary: added search bar strings now run the hg outgoing command to compare the local repository on your machine with the remote repository on hg.mozilla.org.
...the output will look something like this: comparing with ssh://hg.mozilla.org/releases/l10n-central/x-testing searching for changes changeset: 0:7c543e8f3a6a tag: tip user: your name <email@example.com> date: mon nov 23 18:08:25 2009 +0100 summary: added search bar strings make sure this output is accurate before continuing.
Translation phase
support.mozilla.com (sumo) a portal for anyone who needs technical support for their mozilla applications.
... help localize the sumo user interface for everyone in your region.
Mozilla DOM Hacking Guide
prior knowledge of c++ and xpcom is assumed.
... let's assume nsdomimplementation now implements the nsidomhtmldomimplementation interface (look in bug 33871 if you want to know how to do that).
Mozilla Development Strategies
you can still land (assuming you get reviews) if the code isn't on by default.
... make sure you have the right fix when you go for reviews when tempted to do a first pass fix and fix the fallout later, do it right the first time; don't assume you'll be able to file a "fix it" bug and fix stuff you know about later -- chances are the reviewer will make you do the work anyway.
Gecko Profiler FAQ
for each thread, suspend it, walk its stack, resume it.
... a cleaner snapshot would stop all threads, walk all their stacks, and then resume all threads, especially on high-core systems.
Leak Gauge
results of processing log leak.log : summary: leaked 0 out of 11 dom windows leaked 0 out of 44 documents leaked 0 out of 3 docshells leaked content nodes in 0 out of 0 documents if there are leaks, output will look like the following.
...summary: leaked 13 out of 15 dom windows leaked 35 out of 46 documents leaked 4 out of 4 docshells leaked content nodes in 42 out of 53 documents if you see such a results, please file a bug.
Memory reporting
in this case it's often clearer to increment the numbers rather than assigning to them, especially if you're measuring multiple entities and summing their measurements.
...but often you'll have a singleton object that needs measuring, in which case it is usually better not to have a separate reporter object, but instead for the singleton object to implement nsimemoryreporter, and thus measure and report its own memory consumption.
A brief guide to Mozilla preferences
a preference is any value or defined behavior that can be set (presumably, one setting is preferable to another).
...for example, let's assume that nightly has a preference "some.preference" which defaults to true while developeredition defaults the same preference to false and the user desires the preference to have the value true in both channels.
NSPR's Position On Abrupt Thread Termination
abrupt termination has been available in the unix/c environment for some time (exit()), and i assume that the basic semantics defined there are applicable here.
...if they cannot, because of some state corruption, then they must assume that the corruption, like the state, is shared, and their only resource is for the process to terminate.
PR_CWait
the thread waiting on the monitor resumes execution when the monitor is notified (assuming the thread is the next in line to receive the notify) or when the interval specified in the timeout parameter has been exceeded.
... when the thread resumes execution, it is the caller's responsibility to test the state of the monitored data to determine the appropriate action.
PR_SetErrorText
if not null, and if text is zero, the string is assumed to be a null-terminated c string.
... otherwise the text is assumed to be the length specified and to possibly include null characters (as might occur in a multilingual string).
PR_WaitCondVar
timeout the value pr_interval_no_timeout requires that a condition be notified (or the thread interrupted) before it will resume from the wait.
... the value pr_interval_no_wait causes the thread to release the lock, possibly causing a rescheduling within the runtime, then immediately attempt to reacquire the lock and resume.
NSS Code Coverage
165 - tested blocks in all files in directory (sum of numbers generated by tcov).
... 227 - total blocks in all files in directory (sum of numbers generated by tcov).
NSS 3.34 release notes
sslchannelinfo has two new fields (bug 1396525) sslnamedgroup originalkeagroup holds the key exchange group of the original handshake, when the session was resumed.
... prbool resumed is pr_true when the session is resumed, and pr_false otherwise.
nss tech note3
if absent, the cert is assumed to be valid for all key usages.
...d_ext_key_usage_server_auth ssl_server ssl_ca sec_oid_ext_key_usage_client_auth ssl_client ssl_ca sec_oid_ext_key_usage_code_sign object_signing object_signing_ca sec_oid_ext_key_usage_time_stamp time_stamp time_stamp sec_oid_ocsp_responder ocsp_responder ocsp_responder sec_oid_ns_key_usage_govt_approved govt_approved govt_approved if the extended key usage extension is absent, the cert is assumed to have the cert types ssl_client, ssl_server and email, and if the cert is a ca cert (as indicated by the presence of a true basic constraints extension), the cert is also assumed to have the cert types ssl_ca, email_ca and status_responder.
NSS Tools sslstrength
sslstrength summary a simple command-line client which connects to an ssl-server, and reports back the encryption cipher and strength used.
... restricting ciphers by default, sslstrength assumes that all the preferences are on, so it will use any preferences in your policy.
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
(many nss based server products will use temporary session objects, even for "private key op only" tokens.) if a session key is unwrapped and stays on a hardware token, is it sufficient to support just the usual decryption mechanisms for it, or is it assumed that such a symmetric key will always be extractable from the token into the browser?
...is it safe to assume that nss never calls c_createobject for those persistent objects?
FC_GetSessionInfo
a user may call fc_getsessioninfo without logging into the token (to assume the nss user role).
...otherwise, it fills in the ck_session_info structure with the following information: state: the state of the session, i.e., no role is assumed, the user role is assumed, or the crypto officer role is assumed flags: bit flags that define the type of session ckf_rw_session (0x00000002): true if the session is read/write; false if the session is read-only.
NSS tools : pk12util
if the prefix sql: is not used, then the tool assumes that the given databases are in the old format.
... by default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type.
NSS Tools sslstrength
sslstrength summary a simple command-line client which connects to an ssl-server, and reports back the encryption cipher and strength used.
...restricting ciphers by default, sslstrength assumes that all the preferences are on, so it will use any preferences in your policy.
certutil
if the prefix sql: is not used, then the tool assumes that the given databases are in the old format.
... by default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type.
NSS tools : pk12util
if the prefix sql: is not used, then the tool assumes that the given databases are in the old format.
... by default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type.
NSS tools : signtool
the unix version of signtool assumes ~/.netscape unless told otherwise.
...blank lines are ignored, but white space on a line with keywords and values is assumed to be part of the keyword (if it comes before the equal sign) or part of the value (if it comes after the first equal sign).
NSS tools : signver
MozillaProjectsNSStoolssignver
if the prefix sql: is not used, then the tool assumes that the given databases are in the old format.
... by default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type.
Performance Hints
for example, you could rewrite function sum(a) { result = 0; for (i=0; i < a.length; i++) result += a[i]; return result; } as function sum(a) { var result = 0; for (var i=0; i < a.length; i++) result += a[i]; return result; } this is not equivalent code because the second version does not modify global variables result and i.
... however, if you don't intend for any other function to access these variables, then storing them globally is probably wrong anyway (what if you called another function that had a loop like the one in sum!).
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 syste...
...for example, assuming your local nspr has been installed to c:/mozilla-build/msys/local: /bin/sh ../configure.in --with-nspr-cflags="-ic:/mozilla-build/msys/local/include" \ --with-nspr-libs="c:/mozilla-build/msys/local/lib/libnspr4.a \ c:/mozilla-build/msys/local/lib/libplds4.a \ c:/mozilla-build/msys/local/lib/libplc4.a" if you get symbol ...
64-bit Compatibility
for example, consider this code: #define pointer_tagbits 3 static inline uintptr_t unmaskpointer(uintptr_t v) { return v & ~pointer_tagbits; } the value 3 will be inverted to 0xfffffffc, then zero-extended to 0x00000000fffffffc - a subtle and nasty bug, assuming it is unintended.
...the correct code is, assuming the index is unsigned: lir->insload(lir_ldp, lir->ins2(lir_piadd, arrayins, lir->ins_u2p(lir->ins2i(lir_mul, indexins, sizeof(int))) ), 0); what's pointer-width in tracerecorder?
Tracing JIT
some other terminology may be helpful when reading the code: the term guard denotes a condition that is checked by an executing trace to confirm that some assumptions made during recording still hold.
... if guard's condition fails to hold, the guard either jumps to an exit or, if the guard has been extended, jumps to a sub-trace that has been recorded under the opposite assumption as the guard was checking.
JSAPI Cookbook
/* jsapi */ if (!js_defineproperty(cx, obj, "prop", js::undefinedvalue(), getpropfunc, null, jsprop_shared | jsprop_native_accessors | jsprop_enumerate)) { return false; } working with the prototype chain defining a native read-only property on the string.prototype // javascript object.defineproperty(string.prototype, "md5sum", {get: getmd5func, enumerable: true}); the following trick couldn't work if someone has replaced the global string object with something.
...if (!js_defineproperty(cx, string_prototype, "md5sum", js::undefinedvalue(), getmd5func, null, jsprop_shared | jsprop_native_accessors | jsprop_enumerate)) return false; wanted simulating for and for each.
JS_NewGlobalObject
but this creates a problem for consumers that need to set slots on the global to put it in a consistent state.
... this api provides a way for consumers to set slots atomically (immediately after the global is created), before any debugger hooks are fired.
SpiderMonkey 1.8.5
you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz (md5 checksum: a4574365938222adca0a6bd33329cb32).
...edobjectroot js_addnamedstringroot js_addnamedvalueroot js_addobjectroot js_addstringroot js_addvalueroot js_alreadyhasownpropertybyid js_anchorptr js_beginjsonparse (removed in future releases, replaced with js_parsejson) js_compilefilehandleforprincipalsversion js_compilescriptforprincipalsversion js_compileucfunctionforprincipalsversion js_compileucscriptforprincipalsversion js_consumejsontext (removed in future releases, replaced with js_parsejson) js_decompilescriptobject js_deepfreezeobject js_definefunctionbyid js_defineownproperty js_definepropertybyid js_deletepropertybyid js_deletepropertybyid2 js_doubleisint32 js_encodestringtobuffer js_entercrosscompartmentcall js_evaluatescriptforprincipalsversion js_evaluateucscriptforprincipalsversion js_executeregexp ...
SpiderMonkey 1.8.7
you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz (md5 checksum: a4574365938222adca0a6bd33329cb32).
...edobjectroot js_addnamedstringroot js_addnamedvalueroot js_addobjectroot js_addstringroot js_addvalueroot js_alreadyhasownpropertybyid js_anchorptr js_beginjsonparse (removed in future releases, replaced with js_parsejson) js_compilefilehandleforprincipalsversion js_compilescriptforprincipalsversion js_compileucfunctionforprincipalsversion js_compileucscriptforprincipalsversion js_consumejsontext (removed in future releases, replaced with js_parsejson) js_decompilescriptobject js_deepfreezeobject js_definefunctionbyid js_defineownproperty js_definepropertybyid js_deletepropertybyid js_deletepropertybyid2 js_doubleisint32 js_encodestringtobuffer js_entercrosscompartmentcall js_evaluatescriptforprincipalsversion js_evaluateucscriptforprincipalsversion js_executeregexp ...
Feed content access API
var i; var theentry; var theurl; var info; for (i=0; i<numitems; i++) { theentry = itemarray.queryelementat(i, components.interfaces.nsifeedentry); if (theentry) { theurl = doc.write('<b><a href="' + theentry.link.resolve("") + '">' + theentry.title.text + '</a></b><br>'); if (theentry.summary) { info = theentry.summary.text + "<p><hr><p>"; } else { info = theentry.content.text + "<p><hr><p>"; } doc.write("<blockquote>" + info); doc.write("</blockquote><p>"); } } } // close the document; we're done!
...we build the contents of the document by looking at the title, link, summary, and content properties for each item.
The Publicity Stream API
publicizeactivity( <activity>, [ { [ onsuccess: <function> ], [ onerror: <function> ] } ]): applications should call this method when an user-initiated activity deemed attractive to potential consumers occurs.
...it is not recommended that applications consume the publicity stream in any way (please use your own server for any in-app social aspects).
Generic factory
summary most xpcom factories can be very simple.
... following: nsifactory* newcomponentfactory(nsirepository* repository) { nsigenericfactory* factory = null; nscid kgenericfactorycid = ns_genericfactory_cid; nsresult res = repository->createinstance(kgenericfactorycid, null, nsigenericfactory::iid(), &factory); if (res == ns_ok) { factory->setconstructor(&mycomponent::create); } return factory; } this example assumes that the xpcom repository is available as an interface (which it soon will be).
Building the WebLock UI
in this tutorial, focusing as it is on the weblock functionality (rather than the ui), we'll assume the strings we get from the ui itself are urls we actually want to write to the white list: function addthissite() { var tf = document.getelementbyid("dialog.input"); // weblock is global and declared above weblock.addsite(tf.value); } this javascript function can be called directly from the xul widget, where the input string is retrieved as the value property of the textbox element.
...(note: we include three images to represent the state of the weblock, but wlock.gif and wl-lock.gif are identical, since weblock is presumed to be unlocked when it's loaded.
Creating the Component Code
the component manager is an interface implemented by xpcom that encapsulates the creation of objects and provides summary information about all registered components.
...given the example above, someone could create the sample object via the component manager as follows: nsicomponentmanager* compmanager; // assume initialized nsisupports* sample; compmanager->createinstance(ksamplecid, nsnull, kisupportsiid, (void**)&sample); in the above snippet, we assume that the component manager has been initialized.
Preface
however, this book does not assume any prior knowledge of com - all of the basic com ideas will be introduced.
... this book assumes you are using the sdk rather than compiling in a mozilla source tree, though the difference between these two approaches is minimal.
How to build a binary XPCOM component using Visual Studio
the tutorial assumes the folder is called xulrunner-1.8.0.4, but you can call yours whatever you want.
...his together from some samples i found on the mdc site: #include "nsigenericfactory.h" #include "comp-impl.h" ns_generic_factory_constructor(cspecialthing) static nsmodulecomponentinfo components[] = { { specialthing_classname, specialthing_cid, specialthing_contractid, cspecialthingconstructor, } }; ns_impl_nsgetmodule("specialthingsmodule", components) assuming you have the right sdk and setup the include and lib folders correctly, the project should build your xpcom component.
Components.Constructor
summary creates a javascript function which can be used to create or construct new instances of xpcom components.
...om base principles with instance creation using components.constructor(); the latter is much easier to read than the former (particularly if you're creating instances of a component in many different places): var bis = components.classes["@mozilla.org/binaryinputstream;1"] .createinstance(components.interfaces.nsibinaryinputstream); bis.setinputstream(someinputstream); // assumes binaryinputstream was initialized previously var bis = new binaryinputstream(someinputstream); components.constructor() is purely syntactic sugar (albeit speedy and pretty syntactic sugar) for actions that can be accomplished using other common methods.
Components.utils.exportFunction
allowcrossoriginarguments: do not check that arguments to the exported function are subsumed by the caller: this allows the caller to pass objects with a different origin into the exported function, which can then use its privileged status to make cross-origin requests with them.
... unsafewindow, { defineas: "loguser" }); // less-privileged scope: for example, a page script function getuser() { return "bill"; } var test = document.getelementbyid("test"); test.addeventlistener("click", function() { window.loguser(getuser); }, false); cross-origin checking when the exported function is called each argument, including this, is checked to make sure that the caller subsumes that argument.
nsScriptableInputStream
« xpcom api reference summary a component implementing nsiscriptableinputstream.
... example code const nsiscriptableinputstream = 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.
Append
« xpcom api reference summary the append family of functions appends a value to the end of a string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
Assign
« xpcom api reference summary the assign family of functions sets the value of a string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
Insert
« xpcom api reference summary the insert family of functions inserts a value into a string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
Replace
« xpcom api reference summary the replace family of functions sets the value of a string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
Append
« xpcom api reference summary the append family of functions appends a value to the end of a string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
Assign
« xpcom api reference summary the assign family of functions sets the value of a string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
Insert
« xpcom api reference summary the insert family of functions inserts a value into a string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
Replace
« xpcom api reference summary the replace family of functions sets the value of a string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
nsCStringEncoding
« xpcom api reference summary the nscstringencoding enumeration describes the set of character encodings understood by the ns_cstringtoutf16 and ns_utf16tocstring functions.
... ns_cstring_encoding_ascii conversion between ascii and utf-16 assumes that all bytes in the source string are 7-bit ascii and can be inflated to utf-16 by inserting null bytes.
nsEmbedCString
« xpcom api reference summary constructors for nsembedcstring.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
nsEmbedString
« xpcom api reference summary constructors for nsembedstring.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
imgIDecoderObserver
in general, any presumed ordering between load and decode notifications should not be relied upon.
...unfortunately, this is currently the only way to signal decoding errors to consumers, and the only decoding errors that consumers care about (indeed, the only ones that they're prepared to hear about) are failures to instantiate the decoder (<img src="foo.html"> for example).
mozIPlacesAutoComplete
therefore, consumers must unregister or register themselves.
...therefore, consumers must unregister or register themselves.
mozIRegistry
summary clients will rely on nsrepository to create instances of a given class.
...those other components presumably implement particular xpcom interfaces.
mozIStorageProgressHandler
the mozistorageprogresshandler interface lets storage consumers receive callbacks during the execution of sqlite requests.
... storage/public/mozistorageprogresshandler.idlscriptable please add a summary to this article.
mozIStorageStatement
to initialize a statement, consumers should call mozistorageconnection.createstatement().
... note: consumers will have to use same escape char when doing statements such as: ...like '?1' escape '/'....
nsIAuthModule
unwrap() this method is used to unpack, decrypt, and verify the checksums on data returned by a server when security layers are in use.
...confidential if set to true, it will encrypt the data, otherwise data will just be integrity protected (checksummed).
nsIBrowserHistory
if aentiredomain is true, it will assume ahost is a domain, and remove all pages from the entire domain.
... aentiredomain if set to true, it will assume ahost is a domain, and remove all pages from the entire domain, including subdomains.
nsIChannel
load_retargeted_document_uri 17 if the end consumer for this load has been retargeted after discovering its content, this flag will be set: load_replace 18 this flag is set to indicate that this channel is replacing another channel.
... load_targeted 20 set (for example by the uriloader) to indicate whether or not the end consumer for this load has been determined.
nsICommandLineRunner
toolkit/components/commandlines/public/nsicommandlinerunner.idlscriptable please add a summary to this article.
...it assumes a native character set.
nsICompositionStringSynthesizer
sum of alength must be same as the length of astring of setstring().
... if appendclause() and/or setcaret() are not called properly, e.g., sum of alength of calls of appendclause() is not same as composition string set by setstring(), this throws an exception.
nsIDOMGeoGeolocation
summary the nsidomgeogeolocation interface provides access to geolocation information.
... dom/interfaces/geolocation/nsidomgeogeolocation.idlscriptable please add a summary to this article.
nsIFTPEventSink
netwerk/protocol/ftp/nsiftpchannel.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void onftpcontrollog(in boolean server, in string msg) methods onftpcontrollog allows a consumer to receive a log of the ftp control connection conversation.
nsIFeedEntry
summary nsifeedtextconstruct a summary of the feed entry's content.
... this is generated automatically using the entry's description, subtitle, summary, content, and appropriate extensions.
nsIMsgHeaderParser
summary file, address book.
...summary file, address book.
nsIMsgSearchSession
clearscopes(); [noscript] boolean scopeusescustomheaders(in nsmsgsearchscopevalue scope, in voidptr selection, in boolean forfilters); boolean isstringattribute(in nsmsgsearchattribvalue attrib); void addallscopes(in nsmsgsearchscopevalue attrib); void search(in nsimsgwindow awindow); void interruptsearch(); void pausesearch(); void resumesearch(); [noscript] nsmsgsearchtype setsearchparam(in nsmsgsearchtype type, in voidptr param); [noscript] void addresultelement(in nsmsgresultelement element); boolean matchhdr(in nsimsgdbhdr amsghdr, in nsimsgdatabase adatabase); void addsearchhit(in nsimsgdbhdr header, in nsimsgfolder folder); attributes attribute type description ...
... void pausesearch(); resumesearch() void resumesearch(); setsearchparam() [noscript] nsmsgsearchtype setsearchparam(in nsmsgsearchtype type, in voidptr param); parameters type param addresultelement() [noscript] void addresultelement(in nsmsgresultelement element); parameters element matchhdr() boolean matchhdr(in nsimsgdbhdr amsghdr, ...
nsIOutputStream
isnonblocking() note: writing to a blocking output stream will block the calling thread until all given data can be consumed by the stream.
... note: a non-blocking output stream may implement nsiasyncoutputstream to provide consumers with a way to wait for the stream to accept more data once its write() method is unable to accept any data without blocking.
nsIPermission
netwerk/base/public/nsipermission.idlscriptable please add a summary to this article.
...this string is specified by the consumer when adding a permission via nsipermissionmanager read only.
nsIPluginHost
dom/plugins/base/nsipluginhost.idlscriptable please add a summary to this article.
... void newpluginnativewindow( out nspluginnativewindowptr apluginnativewindow ); parameters apluginnativewindow native code only!parsepostbuffertofixheaders this method parses post buffer to find out case insensitive "content-length" string and cr or lf some where after that, then it assumes there is http headers in the input buffer and continue to search for end of headers (crlfcrlf or lflf).
nsIPrintingPrompt
returning ns_ok assumes that the printsettings object was correctly filled in and if it does not have valid fields for printer name, and so on.
... defaults for platform service: showprintdialog - displays a native dialog showpagesetup() - displays a xul dialog showprogress() - displays a xul dialog summary for windows embedders: stated once again: there is no "fallback" native platform support in gfx for the displaying of the native print dialog.
nsIProtocolProxyService
note: if pac is configured, and the pac file has not yet been loaded, then this method will return a nsiproxyinfo instance with a type of "unknown" to indicate to the consumer that asyncresolve should be used to wait for the pac file to finish loading.
... otherwise, the consumer may choose to treat the result as type "direct" if desired.
nsISelectionPrivate
tableselection_none 0 tableselection_cell 1 tableselection_row 2 tableselection_column 3 tableselection_table 4 tableselection_allcells 5 methods addselectionlistener() void addselectionlistener( in nsiselectionlistener newlistener ); parameters newlistener endbatchchanges() will resume user interface updates after a previous call to startbatchchanges().
...call endbatchchanges() to resume user interface updates.
nsIStreamListener
inherits from: nsirequestobserver last changed in gecko 1.0 classes which want to consume data from a nsichannel need to implement this interface.
...in other words, the sum of all previous count parameters.
nsIThreadInternal
the nsithreadinternal interface is implemented by the xpcom thread object to let consumers observe dispatch activity on a thread.
... xpcom/threads/nsithreadinternal.idlscriptable please add a summary to this article.
nsITransport
this interface allows the consumer of the stream to be notified when the stream can again be read.
...this interface allows the consumer of the stream to be notified when the stream can again accept more data.
nsIURI
password autf8string the optional password, assuming the prehost consists of "username:password".
... username autf8string the optional username, assuming the prehost consists of "username:password".
nsIURIFixupInfo
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description consumer nsisupports consumer that asked for the fixed up uri.
... preferreduri nsiuri best guess of what uri consumer expects.
nsIUpdate
ideally, this page is not the release notes but some other page that summarizes the differences between this update and the previous, which also links to the release notes.
...crc_error (4) a checksum error occurred.
nsIWebBrowser
note: the implementation should not refcount the supplied chrome object; it should assume that a non nsnull value is always valid.
...otherwise, the implementation should not refcount this interface; it should assume that a non null value is always valid.
nsIWebContentHandlerRegistrar
ar); method overview void registercontenthandler(in domstring mimetype, in domstring uri, in domstring title, in nsidomwindow contentwindow) void registerprotocolhandler(in domstring protocol,in domstring uri, in domstring title, in nsidomwindow contentwindow) methods registercontenthandler summary of registercontenthandler void registercontenthandler( in domstring mimetype, in domstring uri, in domstring title, in nsidomwindow contentwindow ); parameters mimetype the desired mime type as a string uri the uri to the handler as a string.
... registerprotocolhandler summary of registerprotocolhandler void registerprotocolhandler( in domstring protocol, in domstring uri, in domstring title, in nsidomwindow contentwindow ); parameters protocol the protocol the site wishes to handle, specified as a string.
nsIWebProgressListener
state_transferring 0x00000004 this flag indicates that data for a request is being transferred to an end consumer.
... /** * this example assumes that it's being run within the context of a browser * window, and uses a frame script that will be loaded into every * browser tab.
nsIWindowsRegKey
key hkey this attribute exposes the native hkey and is available to provide c++ consumers with the flexibility of making other windows registry api calls that are not exposed via this interface.
...in that case, it is the responsibility of the consumer setting the hkey to ensure that it is a valid hkey.
nsIXPCScriptable
js/src/xpconnect/idl/nsixpcscriptable.idlnot scriptable please add a summary to this article.
...rface 1 << 21 dont_ask_instance_for_scriptable 1 << 22 classinfo_interfaces_only 1 << 23 allow_prop_mods_during_resolve 1 << 24 allow_prop_mods_to_prototype 1 << 25 dont_share_prototype 1 << 26 dont_reflect_interface_names 1 << 27 want_equality 1 << 28 want_outer_object 1 << 29 want_inner_object 1 << 30 reserved 1 << 31 the high order bit is reserved for consumers of these flags.
XPCOM Interface Reference
ercryptonsiloginmanageriemigrationhelpernsiloginmanagerprompternsiloginmanagerstoragensiloginmetainfonsimimeinputstreamnsimacdocksupportnsimarkupdocumentviewernsimemorynsimemorymultireporternsimemorymultireportercallbacknsimemoryreporternsimemoryreportermanagernsimenuboxobjectnsimessagebroadcasternsimessagelistenernsimessagelistenermanagernsimessagesendernsimessagewakeupservicensimessengernsimicrosummarynsimicrosummarygeneratornsimicrosummaryobservernsimicrosummaryservicensimicrosummarysetnsimimeconverternsimimeheadersnsimodulensimsgaccountnsimsgaccountmanagerextensionnsimsgcompfieldsnsimsgcustomcolumnhandlernsimsgdbhdrnsimsgdbviewnsimsgdbviewcommandupdaternsimsgdatabasensimsgfilternsimsgfiltercustomactionnsimsgfilterlistnsimsgfoldernsimsgheaderparsernsimsgidentitynsimsgincomingservernsimsgme...
...rnsiprofilensiprofilelocknsiprofileunlockernsiprogramminglanguagensiprogresseventsinknsipromptnsipromptservicensipropertiesnsipropertynsipropertybagnsipropertybag2nsipropertyelementnsiprotocolhandlernsiprotocolproxycallbacknsiprotocolproxyfilternsiprotocolproxyservicensiproxyinfonsipushmessagensipushservicensipushsubscriptionnsiradiointerfacelayernsirandomgeneratornsirequestnsirequestobservernsiresumablechannelnsirunnablensishentrynsishistorynsishistorylistenernsisockssocketinfonsisslerrorlistenernsisslsocketcontrolnsiscreennsiscreenmanagernsiscripterrornsiscripterror2nsiscriptableionsiscriptableinputstreamnsiscriptableunescapehtmlnsiscriptableunicodeconverternsiscrollablensisearchenginensisearchsubmissionnsisecuritycheckedcomponentnsiseekablestreamnsiselectionnsiselection2nsiselection3nsisel...
XPCOM Interface Reference by grouping
ker nsifileprotocolhandler nsifilespec nsifilestreams nsifileutilities nsifileview memory nsimemory network channel nsichannel nsichanneleventsink nsirequest nsirequestobserver nsiresumablechannel nsidnsservice nsiftpchannel nsiftpeventsink nsihttpchannel nsihttpchannelinternal nsihttpheadervisitor nsiidnservice nsiprotocolhandler nsiprotocolproxycallback nsiprotocolproxyfilter nsiprotocolproxyservice nsiproxyinfo preferences nsiiniparse...
... nsimsgcompfields nsimsgcustomcolumnhandler nsimsgdatabase nsimsgdbhdr nsimsgdbview nsimsgdbviewcommandupdater nsimsgfolder nsimsgidentity nsimsgmessageservice nsimsgsendlater nsimsgthread nsimsgwindow nsimsgwindowcommands user history nsibrowserhistory nsibrowsersearchservice nsimicrosummary nsimicrosummarygenerator nsimicrosummaryobserver nsimicrosummaryservice nsimicrosummaryset ...
NS_CStringAppendData
« xpcom api reference summary the ns_cstringappenddata function appends data to the existing value of a nsacstring instance.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
NS_CStringInsertData
« xpcom api reference summary the ns_cstringinsertdata function appends data to the existing value of a nsacstring instance.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
NS_CStringSetData
« xpcom api reference summary the ns_cstringsetdata function copies data into the string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
NS_CStringSetDataRange
« xpcom api reference summary the ns_cstringsetdatarange function copies data into a section of the string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
NS_StringAppendData
« xpcom api reference summary the ns_stringappenddata function appends data to the existing value of a nsastring instance.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
NS_StringInsertData
« xpcom api reference summary the ns_stringinsertdata function appends data to the existing value of a nsacstring instance.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
NS_StringSetData
« xpcom api reference summary the ns_stringsetdata function copies data into the string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
NS_StringSetDataRange
« xpcom api reference summary the ns_stringsetdatarange function copies data into a section of the string's internal buffer.
...if equal to pr_uint32_max, then adata is assumed to be null-terminated.
Reference Manual
nscomptr<nsifoo> foo = bar; // ns_assertion: "queryinterface needed" // ...even assuming you can get the line to compile // (either by casting, or because the types are related by c ) this invariant is relaxed for nscomptr<nsisupports>.
...see code bloat [long, summary at top] for details, though the recommendations from that document are re-iterated here.
Using nsCOMPtr
this document is the sum total of everything written down about nscomptr.
... contents status, recent changes, and plans recent changes to nscomptr getting started guide introduction using nscomptr summary reference manual the basics initialization and assignment using an nscomptr<t> as a t* efficiency and correctness compiler annoyances frequently asked questions buildtime errors runtime errors how do i...
Using the Gecko SDK
introduction it is assumed that you already know something about xpcom component development.
...(<tt>about:buildconfig</tt> can be loaded in mozilla to reveal details about the compiler that was used.) for the remainder of this guide, we'll assume you are developing components under linux.
XPIDL
in addition to this list, nearly every idl file includes nsrootidl.idl in some fashion, which also defines the following types: table 2: types provided by nsrootidl.idl idl typedef c++ in parameter c++ out parameter js type notes prtime (xpidl unsigned long long typedef, 64 bits) number prtime is in microseconds, while js date assumes time in milliseconds nsresult (xpidl unsigned long typedef, 32 bits) number nsrefcnt (xpidl unsigned long typedef, 32 bits) number size_t (xpidl unsigned long typedef, 32 bits) number voidptr void* void* not allowed charptr char* char** not allowed unicharptr char16_t* char16_t** ...
... source and binary compatibility some consumers of idl interfaces create binary plugins that expect the interfaces to be stored in a specific way in memory.
Test-Info
data files are typically consumed by dashboards, like www.arewefissionyet.com.
...test-info has several sub-commands; the "report" sub-command is used by the test-info tasks mozilla-central$ mach help test-info report to reproduce test-info(all): mozilla-central$ mach test-info report --show-tests --show-summary --show-activedata running test-info on try to run these tasks on try, use something like: mach try fuzzy -q test-info contact information test-info is maintained by :gbrown.
Address Book examples
assuming you have the uri, then use the address book manager to get an nsiabdirectory representing the address book: let abmanager = components.classes["@mozilla.org/abmanager;1"] .getservice(components.interfaces.nsiabmanager); let oneaddressbook = abmanager.getdirectory(addressbookuri); how do i search for a particular contact property (name, email)?
... assuming you wish to search across multiple directories: let abmanager = components.classes["@mozilla.org/abmanager;1"] .getservice(components.interfaces.nsiabmanager); let alladdressbooks = abmanager.directories; while (alladdressbooks.hasmoreelements()) { let ab = alladdressbooks.getnext(); if (ab instanceof components.interfaces.nsiabdirectory && !ab.isremote) ...
LDAP Support
it assumes you are already familiar with configuring preferences for deployed builds in addition to setting up thunderbird to use an ldap directory.
... ldap schema the following table summarizes the schema used by thunderbird to map between ldap attributes and attributes within the the address book.
Mail composition back end
it is a simple interface that takes a consumer output stream for the quoted data.
... 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.
Working with windows in chrome code
it also handles window features a little differently, including always assuming the dialog feature is specified.
... accessing content documents assume you have a document loaded in a <tabbrowser>, <browser>, or <iframe> element inside your document.
Using COM from js-ctypes
win32event; void* waitfornotifyevent; void* getnotifyeventhandle; /* end inherit from ispnotifysource */ /* start inherit from ispeventsource */ void* setinterest; void* getevents; void* getinfo; /* end inherit from ispeventsource */ /* start ispvoice */ void* setoutput; void* getoutputobjecttoken; void* getoutputstream; void* pause; void* resume; void* setvoice; void* getvoice; hresult (__stdcall *speak)(struct myispvoice*, lpcwstr pwcs, dword dwflags, ulong* pulstreamnumber); void* speakstream; void* getstatus; void* skip; void* setpriority; void* getpriority; void* setalertboundary; void* getalertboundary; void* setrate; void* getrate; void* setvolume; ...
...ce // start inherit from ispeventsource { 'setinterest': ctypes.voidptr_t }, { 'getevents': ctypes.voidptr_t }, { 'getinfo': ctypes.voidptr_t }, // end inherit from ispeventsource // start ispvoice { 'setoutput': ctypes.voidptr_t }, { 'getoutputobjecttoken': ctypes.voidptr_t }, { 'getoutputstream': ctypes.voidptr_t }, { 'pause': ctypes.voidptr_t }, { 'resume': ctypes.voidptr_t }, { 'setvoice': ctypes.voidptr_t }, { 'getvoice': ctypes.voidptr_t }, { 'speak': ctypes.functiontype(callback_abi, hresult, // return [ ispvoice.ptr, lpcwstr, // *pwcs dword, // dwflags ulong // *pulstreamnumber ]).ptr }, { 'speakstream': ctypes.voi...
Drawing and Event Handling - Plugins
the browser is also responsible for sending the plug-in all events targeted to an instance, such as mouse clicks when the cursor is within the instance rectangle or suspend and resume events when the application is switched in and out.
...when the browser generates a paint message for the plug-in, it assumes that the plug-in is responsible for painting the entire area to be updated.
Plug-in Basics - Plugins
a plug-in consumes no resources other than disk space when it is not loaded.
...plug-ins consume no resources (other than disk space) when not loaded.
Plug-in Side Plug-in API - Plugins
plugin method summary npp_destroy deletes a specific instance of a plug-in.
... npp_writeready determines maximum number of bytes that the plug-in can consume.
Structures - Plugins
structure summary npanycallbackstruct contains information required during embedded mode printing.
... npstream represents a stream of data either produced by the browser and consumed by the plug-in, or produced by the plug-in and consumed by the browser.
Gecko Plugin API Reference - Plugins
npn_newstream requests the creation of a new data stream produced by the plug-in and consumed by the browser.
... npn_write pushes data into a stream produced by the plug-in and consumed by the browser.
DOM Inspector internals - Firefox Developer Tools
using modular overlays also allows for common xul to be shared across the various documents that make up the dom inspector's ui, although not all overlays are shared by multiple consumers.
... single-consumer overlays exist solely for organization.
Debugger.Object - Firefox Developer Tools
(this is always equal to obj.script.isgeneratorfunction, assuming obj.script is a debugger.script.) isasyncfunction if the referent is a debuggee function, returns true if the referent is an async function, defined with an async function expression or statement, or false if it is some other sort of function.
...(this is always equal to obj.script.isasyncfunction, assuming obj.script is a debugger.script.) ispromise true if the referent is a promise; false otherwise.
Debugger.Object - Firefox Developer Tools
if the object has a resume property, its value is taken as a resumption value, indicating how execution should proceed.
... (however, return resumption values are not supported.) if a given method is absent fromhandler, then events of that sort are ignored.
Network monitor toolbar - Firefox Developer Tools
a set of tool icons: pause (or resume) recording network log search the log request blocking an array of buttons to filter the network request list by type: by the content type of the response xhr requests websocket upgrades and messages (labeled ws) other requests a checkbox that allows you to disable caching.
... a summary of this page, including the number of requests, total size, and total time.
Network monitor recording - Firefox Developer Tools
you can pause and resume the monitoring of network traffic using the pause button.
... pausing and resume network traffic recording the network monitor has a button that pauses and resumes recording of the current page's network traffic.
Flame Chart - Firefox Developer Tools
the sort() code is just this: function sort(unsorted) { console.log(bubblesort(unsorted)); console.log(selectionsort(unsorted)); console.log(quicksort(unsorted)); } the markers labeled "bubb..." and colored olive-green are presumably bubblesort().
... the ones colored plain green are presumably the other sort functions.
about:debugging (before Firefox 68) - Firefox Developer Tools
three states are distinguished: "registering": this covers all states between the service worker's initial registration, and its assuming control of pages.
... that is, it subsumes the "installing", "activating", and "waiting" states.
about:debugging - Firefox Developer Tools
three states are possible: registering: this covers all states between the service worker's initial registration, and its assuming control of pages.
... that is, it subsumes the installing, activating, and waiting states.
AudioContext.suspend() - Web APIs
example the following snippet is taken from our audiocontext states demo (see it running live.) when the suspend/resume button is clicked, the audiocontext.state is queried — if it is running, suspend() is called; if it is suspended, resume() is called.
... susresbtn.onclick = function() { if(audioctx.state === 'running') { audioctx.suspend().then(function() { susresbtn.textcontent = 'resume context'; }); } else if(audioctx.state === 'suspended') { audioctx.resume().then(function() { susresbtn.textcontent = 'suspend context'; }); } } specifications specification status comment web audio apithe definition of 'close()' in that specification.
AudioWorkletProcessor.process - Web APIs
therefore, you must always check the size of the sample array rather than assuming a particular size.
... this size may even be allowed to change over time, so you mustn't look at just the first block and assume the sample buffers will always be the same size.
CSSMathValue - Web APIs
cssmathinvert cssmathmax cssmathmin cssmathnegate cssmathproduct cssmathsum properties cssmathvalue.operator indicates the operator that the current subtype represents.
... <div>has width</div> we assign a width with a calculation div { width: calc(30% - 20px); } we add the javascript const stylemap = document.queryselector('div').computedstylemap(); console.log( stylemap.get('width') ); // cssmathsum {values: cssnumericarray, operator: "sum"} console.log( stylemap.get('width').operator ); // 'sum' console.log( stylemap.get('width').values[1].value ); // -20 the cssmathvalue.operator returns 'sum' because stylemap.get('width').values[1].value ); is -20: adding a negative number.
CSSNumericValue.to() - Web APIs
return value a cssmathsum.
... typeerror indicates that the passed values cannot be summed.
CSSNumericValue - Web APIs
cssmathinvert cssmathmax cssmathmin cssmathnegate cssmathproduct cssmathsum cssmathvalue cssnumericarray cssperspective csspositionvalue cssrotate cssskew cssskeyx cssskeyw csstranslate cssunitvalue properties none.
... cssnumericvalue.tosum tbd cssnumericvalue.type tbd cssnumericvalue.parse allows a cssnumericvalue to be constructed directly from a string containing css.
Credential Management API - Web APIs
these capabilities allow users to sign in without typing passwords, see the federated account they used to sign in to a site, and resume a session without the explicit sign-in flow of an expired session.
...this give users capabilities such as seeing the federated account they used to sign on to a site, or resuming a session without the explicit sign-in flow of an expired session.
DOMPointInit.x - Web APIs
WebAPIDOMPointInitx
in general, positive values x mean to the right, and negative values of x means to the left, assuming that transforms have not altered the orientation of the axes.
... if this property is missing when the dompointinit object is passed into frompoint(), the value is assumed to be 0 by default.
Document.caretRangeFromPoint() - Web APIs
example basic demo: when clicking in a paragraph insert a line break at the caret position: html <p>lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
...stet clita kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet.</p> javascript function insertbreakatpoint(e) { let range; let textnode; let offset; if (document.caretpositionfrompoint) { range = document.caretpositionfrompoint(e.clientx, e.clienty); textnode = range.offsetnode; offset = range.offset; } else if (document.caretrangefrompoint) { range = document.caretrangefrompoint(e.clientx, e.clienty); textnode = range.startcontainer; offset = range.startoffset; } // only split text_nodes if (textnode && textnode.nodetype == 3) { let replacement = textnode.splittext(offset); let br = document.createelement('br'); textnode.parentnode.insertbefore(br, replacement);...
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
demo html content <p>lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
...stet clita kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet.</p> javascript content function insertbreakatpoint(e) { var range; var textnode; var offset; if (document.caretpositionfrompoint) { range = document.caretpositionfrompoint(e.clientx, e.clienty); textnode = range.offsetnode; offset = range.offset; } else if (document.caretrangefrompoint) { range = document.caretrangefrompoint(e.clientx, e.clienty); textnode = range.startcontainer; offset = range.startoffset; } // only split text_nodes if (textnode.nodetype == 3) { var replacement = textnode.splittext(offset); var br = document.createelement('br'); textnode.parentnode.insertbefore(br, replacement); ...
Events and the DOM - Web APIs
eventtarget.addeventlistener // assuming mybutton is a button element mybutton.addeventlistener('click', greet, false) function greet(event){ // print and have a look at the event object // always print arguments in case of overlooking any other arguments console.log('greet:', arguments) alert('hello world') } this is the method you should use in modern web pages.
... dom element properties // assuming mybutton is a button element mybutton.onclick = function(event){alert('hello world')} the function can be defined to take an event parameter.
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
inside this context, whitespace character processing can be summarized as follows: first, all spaces and tabs immediately before and after a line break are ignored so, if we take our example markup from before and apply this first rule, we get: <h1>◦◦◦hello⏎ <span>◦world!</span>⇥◦◦</h1> next, all tab characters are handled as space characters, so the example becomes: <h1>◦◦◦hello⏎ <span>◦world!</span>◦◦◦</h1> ...
... </div> </body> we can summarize how the whitespace here is handled as follows (the may be some slight differences in exact behavior between browsers, but this basically works): because we’re inside a block formatting context, everything must be a block, so our 3 text nodes also become blocks, just like the 2 <div>s.
File.getAsText() - Web APIs
WebAPIFilegetAsText
summary the getastext method provides the file's data interpreted as text using a given encoding.
...if this string is empty, utf-8 is assumed.
FileRequest.onprogress - Web APIs
summary this property specifies a callback function to be run repeatedly while the operation represented by a filerequest object is in progress.
... example // assuming 'request' which is a filerequest object request.onprogress = function (status) { var progress = document.queryselector('progress'); progress.value = status.loaded; progress.max = status.total; } specification not part of any current specification.
HTMLCanvasElement.getContext() - Web APIs
"high-performance": prioritizes rendering performance over power consumption.
... premultipliedalpha: boolean that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha.
HTMLTableElement - Web APIs
htmltableelement.summary is a domstring containing a description of the purpose or the structure of the table.
... it reflects the obsolete summary attribute.
HTML Drag and Drop API - Web APIs
this overview of html drag and drop includes a description of the interfaces, basic steps to add drag-and-drop support to an application, and an interoperability summary of the interfaces.
... the basics this section is a summary of the basic steps to add drag-and-drop functionality to an application.
IDBCursor.continuePrimaryKey() - Web APIs
a typical use case, is to resume the iteration where a previous cursor has been closed, without having to compare the keys one by one.
... example here’s how you can resume an iteration of all articles tagged with "javascript" since your last visit: let request = articlestore.index("tag").opencursor(); let count = 0; let unreadlist = []; request.onsuccess = (event) => { let cursor = event.target.result; if (!cursor) { return; } let lastprimarykey = getlastiteratedarticleid(); if (lastprimarykey > cursor.primarykey) { cursor.continueprimarykey...
Basic concepts - Web APIs
big concepts if you have assumptions from working with other types of databases, you might get thrown off when working with indexeddb.
...since such catastrophic events are rare, most consumers should not need to concern themselves further.
InputDeviceCapabilities API - Web APIs
to deal with this, developers make assumptions and use heuristics to normalize behavior on web pages.
...we can assume that if the touchstart event is triggered that the user's device has a touch interface.
compareVersion - Web APIs
if registryname is not found in the client version registry or if registryname does not have version, registryname is assumed to have a version of 0.0.0.0.
...if the file has been deleted, its version is assumed to be 0.0.0.0.
LockedFile.readAsText() - Web APIs
summary the readastext method is used to read the content of the lockedfile object and provide the result of that reading as a string.
...by default, utf-8 is assumed if this parameter is not specified.
MediaRecorder - Web APIs
mediarecorder.resume() resumes recording of media after having been paused.
... mediarecorder.onresume an eventhandler called to handle the resume event, which occurs when media recording resumes after being paused.
MediaStream Recording API - Web APIs
y: none"; a.href = url; a.download = "test.webm"; a.click(); window.url.revokeobjecturl(url); } // demo: to download after 9sec settimeout(event => { console.log("stopping"); mediarecorder.stop(); }, 9000); examining and controlling the recorder status you can also use the properties of the mediarecorder object to determine the state of the recording process, and its pause() and resume() methods to pause and resume recording of the source media.
... reference blobevent each time a chunk of media data is finished being recorded, it's delivered to consumers in blob form using a blobevent of type dataavailable.
NodeList - Web APIs
WebAPINodeList
for example, node.childnodes is live: const parent = document.getelementbyid('parent'); let child_nodes = parent.childnodes; console.log(child_nodes.length); // let's assume "2" parent.appendchild(document.createelement('div')); console.log(child_nodes.length); // outputs "3" static nodelists in other cases, the nodelist is static, where any changes in the dom does not affect the content of the collection.
... example it's possible to loop over the items in a nodelist using a for loop: for (let i = 0; i < mynodelist.length; i++) { let item = mynodelist[i]; } don't use for...in to enumerate the items in nodelists, since they will also enumerate its length and item properties and cause errors if your script assumes it only has to deal with element objects.
OfflineAudioContext - Web APIs
deprecated methods offlineaudiocontext.resume() resumes the progression of time in an audio context that has previously been suspended.
... note: the resume() method is still available — it is now defined on the baseaudiocontext interface (see baseaudiocontext.resume()) and thus can be accessed by both the audiocontext and offlineaudiocontext interfaces.
Pointer events - Web APIs
much of today's web content assumes the user's pointing device will be a mouse.
...consequently, even if a browser supports pointer events, the browser must still process mouse events so content that assumes mouse-only input will work as is without direct modification.
RTCConfiguration - Web APIs
if this value isn't included in the dictionary, "balanced" is assumed.
...if the policy isn't specified, all is assumed by default, allowing all candidates to be considered.
RTCOutboundRtpStreamStats - Web APIs
qpsum a 64-bit value containing the sum of the qp values for every frame encoded by this rtcrtpsender.
... totalencodedbytestarget a cumulative sum of the target frame sizes (the targeted maximum size of the frame in bytes when the codec is asked to compress it) for all of the frames encoded so far.
RTCPeerConnection() - Web APIs
if this value isn't included in the dictionary, "balanced" is assumed.
...if this isn't specified, "all" is assumed.
Using Service Workers - Web APIs
however, it made many assumptions about what you were trying to do and then broke horribly when your app didn’t follow those assumptions exactly.
... the below graphic shows a summary of the available service worker events: promises promises are a great mechanism for running async operations, with success dependant on one another.
SpeechSynthesisUtterance - Web APIs
resume fired when a paused utterance is resumed.
... also available via the onresume property.
SubtleCrypto - Web APIs
even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.
... the table below summarises which algorithms are suitable for which cryptographic operations: sign() verify() encrypt() decrypt() digest() derivebits() derivekey() wrapkey() unwrapkey() rsassa-pkcs1-v1_5 ✓ rsa-pss ✓ ecdsa ✓ hmac ✓...
TextMetrics - Web APIs
t(text); let y = 50 + index * 50; ctx.beginpath(); ctx.filltext(text, 0, y); let liney = y - math.abs(textmetrics[baseline]); if (baselinesbelowalphabetic.includes(baseline)) { liney = y + math.abs(textmetrics[baseline]); } ctx.moveto(0, liney); ctx.lineto(550, liney); ctx.stroke(); }); result measuring text width when measuring the x-direction of a piece of text, the sum of actualboundingboxleft and actualboundingboxright can be wider than the width of the inline box (width), due to slanted/italic fonts where characters overhang their advance width.
... it can therefore be useful to use the sum of actualboundingboxleft and actualboundingboxright as a more accurate way to get the absolute text width: const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const text = 'abcdefghijklmnop'; ctx.font = 'italic 50px serif'; const textmetrics = ctx.measuretext(text); console.log(textmetrics.width); // 459.8833312988281 console.log(math.abs(textmetrics.actualboundingboxleft) + math.abs(textmetrics.actualboundingboxright)); // 462.8833333333333 specifications specification html living standardthe definition of 'textmetrics' in that specification.
Touch.screenX - Web APIs
WebAPITouchscreenX
summary returns the x coordinate of the touch point relative to the screen, not including any scroll offset.
... in following simple code snippet, we assume the user initiates multiple touch contacts on an element with an id of source and then releases contacts with the surface.
Touch.target - Web APIs
WebAPITouchtarget
summary returns the element (eventtarget) on which the touch contact started when it was first placed on the surface, even if the touch point has since moved outside the interactive area of that element or even been removed from the document.
... in following simple code snippet, we assume the user initiates one or more touch contacts on the source element.
WebGLRenderingContext.isContextLost() - Web APIs
the webglrenderingcontext.iscontextlost() method returns a boolean indicating whether or not the webgl context has been lost and must be re-established before rendering can resume.
... usage notes there are several reasons why a webgl context may be lost, making it necessary to re-establish the context before resuming rendering.
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
this means rtp can be — but is not required to be — used atop udp for its performance as well as its multiplexing and checksum features.
... the transceiver's direction is set to "sendrecv", indicating that it should resume both sending and receiving audio.
Writing WebSocket servers - Web APIs
this article assumes you're already familiar with how http works, and that you have a moderate level of programming experience.
...for example, let's assume that your server is listening on example.com, port 8000, and your socket server responds to get requests at example.com/chat.
Advanced techniques: Creating and sequencing audio - Web APIs
one'; // remove loading screen dtmf = sample; // to be used in our playsample function playbutton.addeventlistener('click', function() { isplaying = !isplaying; if (isplaying) { // start playing // check if context is in suspended state (autoplay policy) if (audioctx.state === 'suspended') { audioctx.resume(); } currentnote = 0; nextnotetime = audioctx.currenttime; scheduler(); // kick off scheduling requestanimationframe(draw); // start the drawing loop.
... this.dataset.playing = 'true'; } else { window.cleartimeout(timerid); this.dataset.playing = 'false'; } }) }); summary we've now got an instrument inside our browser!
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.
... to use an audio worklet processor, you can use code similar to the following: let audiocontext = null; async function createmyaudioprocessor() { if (!audiocontext) { try { audiocontext = new audiocontext(); await audiocontext.resume(); await audiocontext.audioworklet.addmodule("module-url/module.js"); } catch(e) { return null; } } return new audioworkletnode(audiocontext, "processor-name"); } this createmyaudioprocessor() function creates and returns a new instance of audioworkletnode configured to use your audio processor.
Using the Web Audio API - Web APIs
// select our play button const playbutton = document.queryselector('button'); playbutton.addeventlistener('click', function() { // check if context is in suspended state (autoplay policy) if (audiocontext.state === 'suspended') { audiocontext.resume(); } // play or pause track depending on state if (this.dataset.playing === 'false') { audioelement.play(); this.dataset.playing = 'true'; } else if (this.dataset.playing === 'true') { audioelement.pause(); this.dataset.playing = 'false'; } }, false); we also need to take into account what to do when the track finishes playing.
... summary great!
XMLHttpRequest.overrideMimeType() - Web APIs
if the server doesn't specify a type, xmlhttprequest assumes "text/xml".
... note: if the server doesn't provide a content-type header, xmlhttprequest assumes that the mime type is "text/xml".
XRRigidTransform.position - Web APIs
example to create a reference space which can be used to place an object at eye level (assuming eye level is 1.5 meters): function onsessionstarted(xrsession) { xrsession.addeventlistener("end", onsessionended); gl = initgraphics(xrsession); let gllayer = new xrwebgllayer(xrsession, gl); xrsession.updaterenderstate({ baselayer: gllayer }); if (immersivesession) { xrsession.requestreferencespace("bounded-floor").then((refspace) => { refspacecreated(refspace); }...
...however, for inline sesions, we know we're in a space not automatically adjusted for floor level, so we request an offset reference space to shift the viewer's height to 1.5 meters above the presumed floor level of 0 meters.
Cognitive accessibility - Accessibility
it helps users with cognitive disabilities to provide a text summary (sometimes referred to as a tl;dr; [too long, didn't read]) at a low reading level.
...if multiple errors are present, provide a summary, with each error linking to the related input.
Accessibility documentation index - Accessibility
found 105 pages: # page tags and summary 1 accessibility accessibility, landing accessibility (often abbreviated to a11y—as in "a" then 11 characters then "y") in web development means enabling as many people as possible to use web sites, even when those people's abilities are limited in some way.
... 14 aria technique template accessibility no summary!
Keyboard-navigable JavaScript widgets - Accessibility
use onfocus to track the current focus don't assume that all focus changes will come via key and mouse events: assistive technologies such as screen readers can set the focus to any focusable element.
... for example: <span tabindex="-1" onkeydown="return handlekeydown();"> if handlekeydown() returns false, the event will be consumed, preventing the browser from performing any action based on the keystroke.
overflow-block - CSS: Cascading Style Sheets
examples html <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; nunc velit erat, tempus id rutrum sed, dapibus ut urna.
overflow-inline - CSS: Cascading Style Sheets
examples html <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; nunc velit erat, tempus id rutrum sed, dapibus ut urna.
Basic concepts of flexbox - CSS: Cascading Style Sheets
start and end lines another vital area of understanding is how flexbox makes no assumption about the writing mode of the document.
...modern layout methods encompass the range of writing modes and so we no longer assume that a line of text will start at the top left of a document and run towards the right hand side, with new lines appearing one under the other.
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
the css 2.1 specification, which details how normal flow behaves, assumes a horizontal writing mode.
... summary in most cases, flow layout works as you would expect it to when changing the writing mode of the document or parts of the document.
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
they prevent the browser being able to do the work to switch writing mode, as they make the assumption that the text is flowing left to right and top to bottom.
... logical properties and values logical properties and values do not make an assumption about text direction.
The stacking context - CSS: Cascading Style Sheets
the stacking context is a three-dimensional conceptualization of html elements along an imaginary z-axis relative to the user, who is assumed to be facing the viewport or the webpage.
... in summary: stacking contexts can be contained in other stacking contexts, and together create a hierarchy of stacking contexts.
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
{ color: white; background-color: brown; margin: 10px; width: 75px; } .four { color: white; background-color: brown; margin: 10px; width: 100px; } .five { background-color: brown; } we'll apply it to this html: <div> <div class="one">1:</div> <div class="two">2: text <span class="five">5 - more text</span></div> <input class="three"> <textarea class="four">4: lorem ipsum</textarea> </div> ...
...te; background-color: var(--main-bg-color); margin: 10px; width: 75px; } .four { color: white; background-color: var(--main-bg-color); margin: 10px; width: 100px; } .five { background-color: var(--main-bg-color); } <div> <div class="one"></div> <div class="two">text <span class="five">- more text</span></div> <input class="three"> <textarea class="four">lorem ipsum</textarea> </div> this leads to the same result as the previous example, yet allows for one canonical declaration of the desired property value; very useful if you want to change the value across the entire page later.
border-image-width - CSS: Cascading Style Sheets
html <p>lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
...stet clita kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet.</p> css p { border: 20px solid; border-image: url("/static/external/21/214842819586a8dd293c17b38d0fd0e26430146a86dd04294a53ecaeeea7d0e2.png") 30 round; border-image-width: 16px; padding: 40px; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-width' in that specification.
break-after - CSS: Cascading Style Sheets
html <article> <h1>main heading</h1> <h2>subheading</h2> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...curabitur a ipsum ac diam mattis volutpat ac ut elit.
break-before - CSS: Cascading Style Sheets
html <article> <h1>main heading</h1> <h2>subheading</h2> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...curabitur a ipsum ac diam mattis volutpat ac ut elit.
break-inside - CSS: Cascading Style Sheets
html <article> <h1>main heading</h1> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...curabitur a ipsum ac diam mattis volutpat ac ut elit.
font-size - CSS: Cascading Style Sheets
WebCSSfont-size
take the following html and css: html { font-size: 62.5%; /* font-size 1em = 10px on default browser settings */ } span { font-size: 1.6em; } <div> <span>outer <span>inner</span> outer</span> </div> the result is: assuming that the browser's default font-size is 16px, the words “outer” would be rendered at 16px, but the word “inner” would be rendered at 25.6px.
... html { font-size: 62.5%; /* font-size 1em = 10px on default browser settings */ } span { font-size: 1.6rem; } then we apply this css to the same html, which looks like this: <span>outer <span>inner</span> outer</span> in this example, the words “outer inner outer” are all displayed at 16px (assuming that the browser's font-size has been left at the default value of 10px).
grid-area - CSS: Cascading Style Sheets
WebCSSgrid-area
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-column-end - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-column-start - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-column - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-row-end - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-row-start - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid, corresponding to the search direction, are assumed to have that name for the purpose of counting this span.
grid-row - CSS: Cascading Style Sheets
WebCSSgrid-row
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
Inheritance - CSS: Cascading Style Sheets
only the root element of the document gets the initial value given in the property's summary.
... non-inherited properties when no value for a non-inherited property has been specified on an element, the element gets the initial value of that property (as specified in the property's summary).
text-indent - CSS: Cascading Style Sheets
&& each-line?where <length-percentage> = <length> | <percentage> examples simple indent html <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> css p { text-indent: 5em; background: powderblue; } result percentage indent html <p>lore...
...m ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> css p { text-indent: 30%; background: plum; } result specifications specification status comment css text module level 3the definition of 'text-indent' in that specification.
text-underline-position - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | from-font | [ under | [ left | right ] ] examples a simple example let's take a couple of simple example paragraphs: <p class="horizontal">lorem ipsum dolor sit amet, consectetur adipiscing elit.
...aliquam accumsan tellus ac erat posuere.</p> <p class="vertical">lorem ipsum dolor sit amet, consectetur adipiscing elit.
Event reference
criptexecute menu events dommenuitemactive dommenuiteminactive window events close popup events popuphidden popuphiding popupshowing popupshown tab events visibilitychange battery events chargingchange chargingtimechange dischargingtimechange levelchange call events alerting busy callschanged cfstatechange connecting dialing disconnected disconnecting error held, holding incoming resuming statechange voicechange sensor events compassneedscalibration devicemotion deviceorientation orientationchange smartcard events icccardlockerror iccinfochange smartcard-insert smartcard-remove stkcommand stksessionend cardstatechange sms and ussd events delivered received sent ussdreceived frame events mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowse...
... resume speechsynthesisevent web speech api a paused utterance is resumed.
Setting up adaptive streaming media sources - Developer guides
let's say you want to set up an adaptive streaming media source on a server, to be consumed inside an html5 media element.
... http live streaming overview mpeg-dash overview and references dynamic adaptive streaming over http dataset mpeg-dash and streaming reference and resources (msdn) dash adaptive streaming for html 5 video dynamic adaptive streaming over http: from content creation to consumption mpeg-dash tools dashencoder mp4box dash.js wiki dash.js google group akamai dash diagnostic player adaptive streaming examples itec – dynamic adaptive streaming over http mpeg dash media source demo ...
A hybrid approach - Developer guides
this can make it more time-consuming to develop than other approaches.
... summary no approach is a one-size-fits-all solution.
Separate sites for mobile and desktop - Developer guides
in fact, mozilla picked this strategy for the mobile versions of addons.mozilla.org (amo) and support.mozilla.org (sumo).
... if you’d like to see the source code behind an example of this approach in action, feel free to check out the github repository for amo or sumo.
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
controls if this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback.
... </p> </audio> mdn adding captions and subtitles to html5 video web video text tracks format (webvtt) webaim: captions, transcripts, and audio descriptions mdn understanding wcag, guideline 1.2 explanations understanding success criterion 1.2.1 | w3c understanding wcag 2.0 understanding success criterion 1.2.2 | w3c understanding wcag 2.0 technical summary content categories flow content, phrasing content, embedded content.
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
while this can provide additional information to the user, you should not assume that the user will ever see it: the user may only have keyboard or touchscreen.
... using the html title attribute – updated | the paciello group technical summary content categories flow content, phrasing content, embedded content, palpable content.
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
let's look at an example; here we've set minimum and maximum dates, and also made the field required: <form> <div> <label for="month">what month would you like to visit us (summer months only, please)?</label> <input id="month" type="month" name="month" min="2017-06" max="2017-09" required> <span class="validity"></span> </div> <div> <input type="submit" value="submit form"> </div> </form> if you try to submit the form without both the month and year specified (or with a date outside the set bounds), the browser displays an error.
...(summer months only, yyyy-mm)</label> <input id="month" type="month" name="month" min="2017-06" max="2017-09" required pattern="[0-9]{4}-[0-9]{2}"> <span class="validity"></span> </div> <div> <input type="submit" value="submit form"> </div> </form> if you try submitting it, you'll see that the browser now displays an error message (and highlights the input ...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
as web developers, it's important that we never assume that people will know all the things that we know.
... technical summary content categories flow content, listed, submittable, resettable, form-associated element, phrasing content.
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
description: a short and accurate summary of the content of the page.
...to prevent bandwidth consumption, use a robots.txt file.
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
summary this attribute defines an alternative text that summarizes the content of the table.
... mdn adding a caption to your table with <caption> caption & summary • tables • w3c wai web accessibility tutorials scoping rows and columns the scope attribute on header elements is redundant in simple contexts, because scope is inferred.
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
WebHTMLElementtfoot
the html <tfoot> element defines a set of rows summarizing the columns of the table.
... if this attribute is not set, the left value is assumed.
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
controls if this attribute is present, the browser will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback.
... mdn adding captions and subtitles to html5 video web video text tracks format (webvtt) webaim: captions, transcripts, and audio descriptions mdn understanding wcag, guideline 1.2 explanations understanding success criterion 1.2.1 | w3c understanding wcag 2.0 understanding success criterion 1.2.2 | w3c understanding wcag 2.0 technical summary content categories flow content, phrasing content, embedded content.
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
<tfoot> the html <tfoot> element defines a set of rows summarizing the columns of the table.
... <summary> the html disclosure summary element (<summary>) element specifies a summary, caption, or legend for a <details> element's disclosure box.
Link types - HTML: Hypertext Markup Language
this allows for bookmarking a single article in a page containing multiple articles, such as on a monthly summary blog page, or a blog aggregator.
...if the type is not set, the browser should assume it is a text/css stylesheet until further inspection.
Configuring servers for Ogg media - HTTP
in addition, gecko uses byte-range requests to seek to the end of the media (assuming you serve the content-length header) in order to determine the duration of the media.
...setting payload to auto tells the browser to automatically begin downloading the media as soon as the page is loaded, under the assumption that the user will play it.
Using HTTP cookies - HTTP
WebHTTPCookies
however, do not assume that secure prevents all access to sensitive information in cookies; for example, it can be read by someone with access to the client's hard disk.
... cookie-related regulations legislation or regulations that cover the use of cookies include: the general data privacy regulation (gdpr) in the european union the eprivacy directive in the eu the california consumer privacy act these regulations have global reach, because they apply to any site on the world wide web that is accessed by users from these jurisdictions (the eu and california, with the caveat that california's law applies only to entities with gross revenue over 25 million usd, among other things.) these regulations include requirements such as: notifying users that your site uses cookie...
Digest - HTTP
WebHTTPHeadersDigest
some of the supported algorithms, including unixsum and md5 are subject to collisions and are thus not suitable for applications in which collision-resistance is important.
... examples digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe= digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe=,unixsum=30637 specifications specification title draft-ietf-httpbis-digest-headers-latest resource digests for http this header was originally defined in rfc 3230, but the definition of "selected representation" in rfc 7231 made the original definition inconsistent with current http specifications.
Proxy Auto-Configuration (PAC) file - HTTP
otherwise, they are assumed to be in the local timezone.
...; // returns true monday through friday (gmt timezone) weekdayrange("sat"); // returns true on saturdays local time weekdayrange("sat", "gmt"); // returns true on saturdays gmt time weekdayrange("fri", "mon"); // returns true friday and monday only (note, order does matter!) daterange() syntax daterange(<day> | <month> | <year>, [gmt]) // ambiguity is resolved by assuming year is greater than 31 daterange(<day1>, <day2>, [gmt]) daterange(<month1>, <month2>, [gmt]) daterange(<year1>, <year2>, [gmt]) daterange(<day1>, <month1>, <day2>, <month2>, [gmt]) daterange(<month1>, <year1>, <month2>, <year2>, [gmt]) daterange(<day1>, <month1>, <year1>, <day2>, <month2>, <year2>, [gmt]) note: (before firefox 49) day1 must be less than day2, month1 must be less than month2...
HTTP range requests - HTTP
partial requests are useful for large media or downloading files with pause and resume functions, for example.
...artial content content-type: multipart/byteranges; boundary=3d6b6a416f9b5 content-length: 282 --3d6b6a416f9b5 content-type: text/html content-range: bytes 0-50/1270 <!doctype html> <html> <head> <title>example do --3d6b6a416f9b5 content-type: text/html content-range: bytes 100-150/1270 eta http-equiv="content-type" content="text/html; c --3d6b6a416f9b5-- conditional range requests when resuming to request more parts of a resource, you need to guarantee that the stored resource has not been modified since the last fragment has been received.
Expressions and operators - JavaScript
that means that (x = y) returns y, (x += y) returns the resulting sum x + y, (x **= y) returns the resulting power x ** y, and so on.
... the following table summarizes javascript's bitwise operators.
Using Promises - JavaScript
since most people are consumers of already-created promises, this guide will explain consumption of returned promises before explaining how to create them.
... the inner neutralizing catch statement only catches failures from dosomethingoptional() and dosomethingextranice(), after which the code resumes with morecriticalstuff().
Inheritance and the prototype chain - JavaScript
please note that the code below is free-standing (it is safe to assume there is no other javascript on the webpage other than the below code).
... summary of methods for extending the prototype chain here are all 4 ways and their pros/cons.
Memory Management - JavaScript
if the dom element holds a large amount of data (illustrated in the above example with the "lotsofdata" property), the memory consumed by this data will never be released and can lead to memory related issues such as the browser becoming increasingly slower.
... this algorithm assumes the knowledge of a set of objects called roots.
Deprecated and obsolete features - JavaScript
date methods getyear and setyear are affected by the year-2000-problem and have been subsumed by getfullyear and setfullyear.
... string.prototype.substr probably won't be removed anytime soon, but it's defined in annex b of the ecma-262 standard, whose introduction states: "… programmers should not use or assume the existence of these features and behaviours when writing new ecmascript code.
SyntaxError: "use strict" not allowed in function with non-simple parameters - JavaScript
examples function statement in this case, the function sum has default parameters a=1 and b=2: function sum(a = 1, b = 2) { // syntaxerror: "use strict" not allowed in function with default parameter 'use strict'; return a + b; } if the function should be in strict mode, and the entire script or enclosing function is also okay to be in strict mode, you can move the "use strict" directive outside of the function: 'use strict'; function sum(a = 1...
..., b = 2) { return a + b; } function expression a function expression can use yet another workaround: var sum = function sum([a, b]) { // syntaxerror: "use strict" not allowed in function with destructuring parameter 'use strict'; return a + b; }; this can be converted to the following expression: var sum = (function() { 'use strict'; return function sum([a, b]) { return a + b; }; })(); arrow function if an arrow function needs to access the this variable, you can use the arrow function as the enclosing function: var callback = (...args) => { // syntaxerror: "use strict" not allowed in function with rest parameter 'use strict'; return this.run(args); }; this can be converted to the following expression: var callback = (() => { 'use strict'; return (...
Array.prototype.reduce() - JavaScript
examples sum all the values of an array let sum = [0, 1, 2, 3].reduce(function (accumulator, currentvalue) { return accumulator + currentvalue }, 0) // sum is 6 alternatively written with an arrow function: let total = [ 0, 1, 2, 3 ].reduce( ( accumulator, currentvalue ) => accumulator + currentvalue, 0 ) sum of values in an object array to sum up, the values contained in an array of objects, you...
... let initialvalue = 0 let sum = [{x: 1}, {x: 2}, {x: 3}].reduce(function (accumulator, currentvalue) { return accumulator + currentvalue.x }, initialvalue) console.log(sum) // logs 6 alternatively written with an arrow function: let initialvalue = 0 let sum = [{x: 1}, {x: 2}, {x: 3}].reduce( (accumulator, currentvalue) => accumulator + currentvalue.x , initialvalue ) console.log(sum) // logs 6 flatten an array of arrays let flattened = [[0, 1], [2, 3], [4, 5]].reduce( function(accumulator, currentvalue) { return accumulator.concat(currentvalue) }, [] ) // flattened is [0, 1, 2, 3, 4, 5] alternatively written with an arrow function: let flattened = [[0, 1], [2, 3], [4, 5]].reduce( ( ...
Array.prototype.forEach() - JavaScript
example code let ratings = [5, 4, 5]; let sum = 0; let sumfunction = async function (a, b) { return a + b } ratings.foreach(async function(rating) { sum = await sumfunction(sum, rating) }) console.log(sum) // naively expected output: 14 // actual output: 0 examples no operation for uninitialized values (sparse arrays) const arraysparse = [1,3,,7] let numcallbackruns = 0 arraysparse.foreach((element) => { console.log(element) ...
...[2, 5, , 9].foreach(logarrayelements) // logs: // a[0] = 2 // a[1] = 5 // a[3] = 9 using thisarg the following (contrived) example updates an object's properties from each entry in the array: function counter() { this.sum = 0 this.count = 0 } counter.prototype.add = function(array) { array.foreach((entry) => { this.sum += entry ++this.count }, this) // ^---- note } const obj = new counter() obj.add([2, 5, 9]) obj.count // 3 obj.sum // 16 since the thisarg parameter (this) is provided to foreach(), it is passed to callback each time it's invoked.
Date.parse() - JavaScript
other examples: new date('foo-bar 2014').tostring(); // returns: "invalid date" date.parse('foo-bar 2014'); // returns: nan differences in assumed time zone this section contains implementation-specific behavior that can be inconsistent across implementations.
... given a non-standard date string of "march 7, 2014", parse() assumes a local time zone, but given a simplification of the iso 8601 calendar date extended format such as "2014-03-07", it will assume a time zone of utc (es5 and ecmascript 2015).
Date.prototype.toLocaleDateString() - JavaScript
the default value for each date-time component property is undefined, but if the weekday, year, month, day properties are all undefined, then year, month, and day are assumed to be "numeric".
...in order to get the format of the language used in the user interface of your application, make sure to specify that language (and possibly some fallback languages) using the locales argument: var date = new date(date.utc(2012, 11, 20, 3, 0, 0)); // formats below assume the local time zone of the locale; // america/los_angeles for the us // us english uses month-day-year order console.log(date.tolocaledatestring('en-us')); // → "12/19/2012" // british english uses day-month-year order console.log(date.tolocaledatestring('en-gb')); // → "20/12/2012" // korean uses year-month-day order console.log(date.tolocaledatestring('ko-kr')); // → "2012.
Date.prototype.toLocaleString() - JavaScript
but, if the weekday, year, month, and day properties are all undefined, then year, month, and day are assumed to be "numeric".
...in order to get the format of the language used in the user interface of your application, make sure to specify that language (and possibly some fallback languages) using the locales argument: let date = new date(date.utc(2012, 11, 20, 3, 0, 0)); // formats below assume the local time zone of the locale; // america/los_angeles for the us // us english uses month-day-year order and 12-hour time with am/pm console.log(date.tolocalestring('en-us')); // → "12/19/2012, 7:00:00 pm" // british english uses day-month-year order and 24-hour time without am/pm console.log(date.tolocalestring('en-gb')); // → "20/12/2012 03:00:00" // korean uses year-month-day order...
Date.prototype.toLocaleTimeString() - JavaScript
the default value for each date-time component property is undefined, but if the hour, minute, second properties are all undefined, then hour, minute, and second are assumed to be "numeric".
...in order to get the format of the language used in the user interface of your application, make sure to specify that language (and possibly some fallback languages) using the locales argument: var date = new date(date.utc(2012, 11, 20, 3, 0, 0)); // formats below assume the local time zone of the locale; // america/los_angeles for the us // us english uses 12-hour time with am/pm console.log(date.tolocaletimestring('en-us')); // → "7:00:00 pm" // british english uses 24-hour time without am/pm console.log(date.tolocaletimestring('en-gb')); // → "03:00:00" // korean uses 12-hour time with am/pm console.log(date.tolocaletimestring('ko-kr')); // → "오후...
Math.hypot() - JavaScript
the math.hypot() function returns the square root of the sum of squares of its arguments, that is: math.hypot(v1,v2,…,vn)=∑i=1nvi2=v12+v22+…+vn2\mathtt{\operatorname{math.hypot}(v_1, v_2, \dots, v_n)} = \sqrt{\sum_{i=1}^n v_i^2} = \sqrt{v_1^2 + v_2^2 + \dots + v_n^2} the source for this interactive example is stored in a github repository.
... return value the square root of the sum of squares of the given arguments.
WebAssembly.Memory() constructor - JavaScript
it then stores some values in that memory, then exports a function and uses it to sum some values.
... webassembly.instantiatestreaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(obj => { var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = obj.instance.exports.accumulate(0, 10); console.log(sum); }); creating a shared memory by default, webassembly memories are unshared.
WebAssembly.Memory.prototype.buffer - JavaScript
it then stores some values in that memory, then exports a function and uses it to sum some values.
... webassembly.instantiatestreaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(obj => { var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = obj.instance.exports.accumulate(0, 10); console.log(sum); }); specifications specification webassembly javascript interfacethe definition of 'buffer' in that specification.
WebAssembly.Memory - JavaScript
it then stores some values in that memory, then exports a function and uses it to sum some values.
... webassembly.instantiatestreaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(obj => { var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = obj.instance.exports.accumulate(0, 10); console.log(sum); }); creating a shared memory by default, webassembly memories are unshared.
eval() - JavaScript
in the function without the eval(), the object is being evaluated in the global scope, so it is safe for the browser to assume that date refers to window.date() instead of a local variable called date.
... but, in the code using eval(), the browser cannot assume this since what if your code looked like the following: function date(n){ return ["monday","tuesday","wednesday","thursday","friday","saturday","sunday"][n%7 || 0]; } function loosejsonparse(obj){ return eval("(" + obj + ")"); } console.log(loosejsonparse( "{a:(4-1), b:function(){}, c:new date()}" )) thus, in the eval() version of the code, the browser is forced to make the expensive lookup call to check to see if there are any local variables called date().
Expressions and operators - JavaScript
yield pause and resume a generator function.
... await pause and resume an async function and wait for the promise's resolution/rejection.
async function - JavaScript
await expressions suspend progress through an async function, yielding control and subsequently resuming progress only when an awaited promise-based asynchronous operation is either fulfilled or rejected.
... the purpose of async/await is to simplify the syntax necessary to consume promise-based apis.
export - JavaScript
, in another script, it is straightforward to import the default export: import cube from './my-module.js'; console.log(cube(3)); // 27 using export from let's take an example where we have the following hierarchy: childmodule1.js: exporting myfunction and myvariable childmodule2.js: exporting myclass parentmodule.js: acting as an aggregator (and doing nothing else) top level module: consuming the exports of parentmodule.js this is what it would look like using code snippets: // in childmodule1.js let myfunction = ...; // assign something useful to myfunction let myvariable = ...; // assign something useful to myvariable export {myfunction, myvariable}; // in childmodule2.js let myclass = ...; // assign something useful to myclass export myclass; // in parentmodule.js // only...
... aggregating the exports from childmodule1 and childmodule2 // to re-export them export { myfunction, myvariable } from 'childmodule1.js'; export { myclass } from 'childmodule2.js'; // in top-level module // we can consume the exports from a single module since parentmodule // "collected"/"bundled" them in a single source import { myfunction, myvariable, myclass } from 'parentmodule.js' specifications specification ecmascript (ecma-262)the definition of 'exports' in that specification.
for await...of - JavaScript
responsesize += chunk.length; } console.log(`response size: ${responsesize} bytes`); // expected output: "response size: 1071472" return responsesize; } getresponsesize('https://jsonplaceholder.typicode.com/photos'); iterating over sync iterables and generators for await...of loop also consumes sync iterables and generators.
...in such case for await...of throws when consuming rejected promise and doesn't call finally blocks within that generator.
var - JavaScript
the corollary, in non-strict mode, is that assignment to unqualified identifiers will, if there is no variable of the same name declared in the scope chain, assume you want to create a property with that name on the global object.
... foo = 'f' // in non-strict mode, assumes you want to create a property named `foo` on the global object globalthis.hasownproperty('foo') // true in ecmascript 5, this behavior was changed for strict mode.
Authoring MathML - MathML
\end{abstract} \section{first section} $$ \sum_{n=1}^{+\infty} \frac{1}{n^2} = \frac{\pi^2}{6} $$ \end{document} </div> ...
...</head> <body> <p>$\sqrt{a^2-3c}$</p> <p>$$ {\sum_{i=1}^n i} = \frac{n(n+1)}{2} $$</p> </body> </html> then to generate the html page input.html with tex expressions replaced by mathml expressions, just do cat input.html | itex2mml > output.html there are even more sophisticated tools to convert arbitrary latex documents into html+mathml.
<mstyle> - MathML
WebMathMLElementmstyle
examples using displaystyle and mathcolor to effect style changes in the layout of the whole sum.
... <math> <mstyle displaystyle="true" mathcolor="teal"> <mrow> <munderover> <mo stretchy="true" form="prefix">&sum;</mo> <mrow> <mi>i</mi> <mo form="infix">=</mo> <mn>1</mn> </mrow> <mi>n</mi> </munderover> <mstyle displaystyle="true"> <mfrac> <mn>1</mn> <mi>n</mi> </mfrac> </mstyle> </mrow> </mstyle> </math> specifications specification status comment mathml 3.0the definition of 'mstyle' in that specification.
Web audio codec guide - Web media technologies
assuming that lossless compression is our best option here (which it usually is, as long as the audio files are small), the three strongest candidates from a codec perspective are flac, apple lossless (alac), and mpeg-4 als.
... for the purposes of this example, we'll assume that all browsers have the same codec and container support as firefox (although this is far from true).
Digital audio concepts - Web media technologies
audio file size and network bandwidth once you know the size of a single audio frame and how many frames per second make up your audio data, you can easily calculate how much space the raw sound data itself will occupy (and therefore how much bandwidth it would consume on a network).
...the options tend to revolve around choosing the method by which the encoder performs the encoding and how much time and processor power it's allowed to consume in order to do so.
Media container formats (file types) - Web media technologies
3gp the 3gp or 3gpp media container is used to encapsulate audio and/or video that is specifically intended for transmission over cellular networks for consumption on mobile devices.
...ral purpose video, preferably in an open format webm (ideally with mp4 fallback) general purpose video mp4 (ideally with webm or ogg fallback) high compression optimized for slow connections 3gp (ideally with mp4 fallback) compatibility with older devices/browsers quicktime (ideally with avi and/or mpeg-2 fallback) these suggestions make a number of assumptions.
Web video codec guide - Web media technologies
this guide introduces the video codecs you're most likely to encounter or consider using on the web, summaries of their capabilities and any compatibility and utility concerns, and advice to help you choose the right codec for your project's video.
... assuming the frame rate is not reduced during encoding, higher frame rates cause larger compressed video sizes.
CSS and JavaScript animation performance - Web Performance
note: in nightly/developer edition, you should see that omta is enabled by default, so you might have to do the tests the other way around (test with it enabled first, then disable to test without omta.) summary browsers are able to optimize rendering flows.
... in summary, we should always try to create our animations using css transitions/animations where possible.
Performance fundamentals - Web Performance
as noted above, this can improve performance, but can also have memory consumption issues.
... use requestanimationframe() instead of setinterval() calls to window.setinterval() run code at a presumed frame rate that may or may not be possible under current circumstances.
The building blocks of responsive design - Progressive web apps (PWAs)
if you want a solution that works across general web apps, you could use the screen orientation api, and/or provide a message asking the user to rotate their screen if they are using the wrong orientation (for example, if window.innerwidth is larger than window.innerheight, assume the game is landscape mode and show a "please rotate" message.) viewport one last problem to mention for our example app is concerned with mobile browsers and media queries.
...instead, they render pages at a higher assumed viewport width (something approaching a laptop screen), and then shrink the result down to fit inside the mobile screen.
color-profile - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it only has an effect on the following element: <image> usage notes value auto | srgb | <name> | <iri> default value auto animatable yes auto all colors are presumed to be defined in the srgb color space unless a more precise embedded profile is specified within content data.
... srgb the source profile is assumed to be srgb.
divisor - SVG: Scalable Vector Graphics
WebSVGAttributedivisor
a divisor that is the sum of all the matrix values tends to have an evening effect on the overall color intensity of the result.
...link:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix1);"/> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix2); transform:translatex(220px);"/> </svg> usage notes value <number> default value sum of all values in kernelmatrix or 1 if sum is 0 animatable yes <number> this value defines the divisor.
transform - SVG: Scalable Vector Graphics
if y is not provided, it is assumed to be 0.
...if y is not provided, it is assumed to be equal to x.
<feConvolveMatrix> - SVG: Scalable Vector Graphics
the basic convolution formula which is applied to each color value for a given pixel is: colorx,y = ( sum i=0 to [ordery-1] { sum j=0 to [orderx-1] { source x-targetx+j, y-targety+i * kernelmatrixorderx-j-1, ordery-i-1 } } ) / divisor + bias * alphax,y where "orderx" and "ordery" represent the x and y values for the ‘order’ attribute, "targetx" represents the value of the ‘targetx’ attribute, "targety"...
...assuming the simplest case (where the input image's pixel grid aligns perfectly with the kernel's pixel grid) and assuming default values for attributes ‘divisor’, ‘targetx’ and ‘targety’, then resulting color value will be: (9* 0 + 8* 20 + 7* 40 + 6*100 + 5*120 + 4*140 + 3*200 + 2*220 + 1*240) / (9+8+7+6+5+4+3+2+1) usage context categoriesfilter primitive elementpermitted contentany ...
<foreignObject> - SVG: Scalable Vector Graphics
<polygon points="5,5 195,10 185,185 10,195" /> <!-- common use case: embed html text into svg --> <foreignobject x="20" y="20" width="160" height="160"> <!-- in the context of svg embedded in an html document, the xhtml namespace could be omitted, but it is mandatory in the context of an svg document --> <div xmlns="http://www.w3.org/1999/xhtml"> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...nullam magna ipsum, porta vel dui convallis, rutrum imperdiet eros.
Gradients in SVG - SVG: Scalable Vector Graphics
r="2" fill="white" stroke="white"/> <text x="38" y="40" fill="white" font-family="sans-serif" font-size="10pt">(fx,fy)</text> <text x="63" y="63" fill="white" font-family="sans-serif" font-size="10pt">(cx,cy)</text> </svg> screenshotlive sample if the focal point is moved outside the circle described earlier, it's impossible for the gradient to be rendered correctly, so the spot will be assumed to be within the edge of the circle.
... if the focal point isn't given at all, it's assumed to be at the same place as the center point.
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
s x2 y2, x y (or) s dx2 dy2, dx dy s produces the same type of curve as earlier—but if it follows another s command or a c command, the first control point is assumed to be a reflection of the one used previously.
...if not, then the control point is assumed to be the same as the previous point, and only lines will be drawn.
Using templates and slots - Web Components
ght",helvetica,arial} .name {font-weight: bold; color: #217ac0; font-size: 120%} h4 { margin: 10px 0 -8px 0; } h4 span { background: #217ac0; padding: 2px 6px 2px 6px } h4 span { border: 1px solid #cee9f9; border-radius: 4px } h4 span { color: white } .attributes { margin-left: 22px; font-size: 90% } .attributes p { margin-left: 16px; font-style: italic } </style> <details> <summary> <span> <code class="name">&lt;<slot name="element-name">need name</slot>&gt;</code> <i class="desc"><slot name="description">need description</slot></i> </span> </summary> <div class="attributes"> <h4><span>attributes</span></h4> <slot name="attributes"><p>none</p></slot> </div> </details> <hr> </template> that <template> element has ...
...weight: bold; color: #217ac0; font-size: 120%} h4 { margin: 10px 0 -8px 0; } h4 span { background: #217ac0; padding: 2px 6px 2px 6px } h4 span { border: 1px solid #cee9f9; border-radius: 4px } h4 span { color: white } .attributes { margin-left: 22px; font-size: 90% } .attributes p { margin-left: 16px; font-style: italic } </style> <details> <summary> <span> <code class="name">&lt;<slot name="element-name">need name</slot>&gt;</code> <i class="desc"><slot name="description">need description</slot></i> </span> </summary> <div class="attributes"> <h4><span>attributes</span></h4> <slot name="attributes"><p>none</p></slot> </div> </details> <hr...
Two Types of Scripts - Archive of obsolete content
api access for add-on code and content scripts the table below summarizes the apis that are available to each type of script.
page-mod - Archive of obsolete content
"sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*", contentscriptfile: data.url("show.js"), contentscriptoptions: { showoptions: true, numbers: [1, 2], greeting: "hello!" } }); the values are accessible to content scripts via the self.options property: // show.js if (self.options.showoptions) { window.alert(self.options.greeting); var sum = self.options.numbers[0] + self.options.numbers[1]; window.alert(sum); } the values can be any json-serializable value: a string, number, boolean, null, array of json-serializable values, or an object whose property values are themselves json-serializable.
request - Archive of obsolete content
tweet from the @mozhacks account: var request = require("sdk/request").request; var latesttweetrequest = request({ url: "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=mozhacks&count=1", oncomplete: function (response) { var tweet = response.json[0]; console.log("user: " + tweet.user.screen_name); console.log("tweet: " + tweet.text); } }); // be a good consumer and check for rate limiting before doing more.
/loader - Archive of obsolete content
provide an environment for loading commonjs style modules, which makes it possible to consume lots of interesting code that has already been developed.
test/httpd - Archive of obsolete content
}) }); this starts a server in background (assuming you're running this code in an application that has an event loop, such as firefox).
jpm-mobile - Archive of obsolete content
after that you can install jpm just as you would any other npm package: npm install jpm-mobile -g depending on your setup, you might need to run this as an administrator: sudo npm install jpm-mobile -g at the command prompt, type: jpm-mobile you should see a screen summarizing the available jpm-mobile commands.
package.json - Archive of obsolete content
it looks like this (assuming the add-on's directory is "my-addon"): { "name": "my-addon", "title": "my-addon", "id": "jid1-1fergv45e4f4f@jetpack", "description": "a basic add-on", "author": "", "license": "mpl-2.0", "version": "0.1" } if you are using the new jpm tool, you can easily access manifest data from package.json by requiring it like any other module: var title = require("./package.json").title; ...
Creating Event Targets - Archive of obsolete content
the guide to event-driven programming with the sdk describes how to consume events: that is, how to listen to events generated by event targets.
Getting Started (jpm) - Archive of obsolete content
summary in this tutorial we've built and packaged an add-on using three commands: jpm init to initialize an empty add-on template jpm run to run a new instance of firefox with the add-on installed, so we can try it out jpm xpi to package the add-on into an xpi file for distribution these are the three main commands you'll use when developing sdk add-ons.
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".
Bootstrapped extensions - Archive of obsolete content
there are several scenarios in which the startup() function may be called; for example: when the extension is first installed, assuming that it's both compatible with the application and is enabled.
Bookmarks - Archive of obsolete content
var thisuri = bmsvc.getbookmarkuri(newbkmkid); assuming you've run all the code samples previous to this one, this will output "http://google.com".
File I/O - Archive of obsolete content
navigating with nsifile get a file in given directory let us assume an nsifile file is pointing to some directory (for example a user profile directory).
HTML in XUL for rich tooltips - Archive of obsolete content
this example is what the final xul overlay could look like, assuming a javascript overlay titled overlay.js: <?xml version="1.0" encoding="utf-8"?> <overlay id="htmltip-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> <script type="application/x-javascript" src="overlay.js"/> <popup id="contentareacontextmenu"> <menuitem id="htmltip1" label="foo1" onmouseover="htmltip.onmousetooltip(event)" tooltip="myhtmltip" /> <menuitem id="htmltip...
Preferences - Archive of obsolete content
the effect of default preferences on get methods when one of the get methods of nsiprefbranch (assuming it's a branch of the tree with current values) is called, it does the following: checks whether the current tree has a value for the preference and whether or not the preference is locked.
Rosetta - Archive of obsolete content
ent-type" content="text/html; charset=utf-8" /> <title>rosetta c example</title> <script type="text/javascript" src="rosetta.js"></script> <script type="text/javascript" src="rosetta_c.js"></script> <script type="text/x-csrc"> #include <stdio.h> int main () { printf("hello world number 1!\n"); return 0; } </script> <script type="text/x-c" src="example.c"></script> </head> <body> <p>lorem ipsum</p> <script type="text/javascript"> rosetta.translateall(); </script> </body> </html> example.c: c example #include <stdio.h> int main () { printf("hello world number 2!\n"); return 0; } if creating a compiler for the c programming language, as in the example above, can really look a huge task, there are many dialects of ecmascript which could be easily translated to standard ecmascrip...
Scrollbar - Archive of obsolete content
example assumes a structure like this: app/chrome/chrome.manifest app/chrome/skin/global/ copy the scrollbars.css from xulrunner/chrome/classic.jar/skin/classic/global to app/chrome/skin/global/scrollbars.css open the app/chrome/chrome.manifest and add: skin app-global standard/1.0 skin/global/ override chrome://global/skin/xulscrollbars.css chrome://app-global/skin/scrollbars.css xulscrollbars.css are used for windows xp, and nativescrollbars.css on osx.
Tabbox - Archive of obsolete content
handling onclosetab event assuming the tabbox, tabs, and tabpanels widgets with id's the same as their nodename, this function will correctly remove the current tab and tab panel for the onclosetab tabs event: function removetab(){ var tabbox = document.getelementbyid("tabbox"); var currentindex = tabbox.selectedindex; if(currentindex>=0){ var tabs=document.getelementbyid("tabs"); var tabpanels=document.getelementbyid("tabpanels"); tabpanels.removechild(tabpanels.childnodes[currentindex]); tabs.removeitemat(currentindex); /*wo...
Toolbar - Archive of obsolete content
adding a toolbar button there are two tutorials available: an elaborate step by step tutorial for beginners: custom toolbar button a tutorial describing the steps needed to add a toolbar button assuming you already have a working extension and know the basics of extension development: creating toolbar buttons adding button by default when you create and deploy your extension and include a toolbar button for it by overlaying the customize toolbarpalette, it is not available by default.
getAttributeNS - Archive of obsolete content
function getattributenswrapper (thisitem, ns, nsatt) { if (thisitem === null) { return false; } if (thisitem.getattributens) { return thisitem.getattributens(ns, nsatt); } else if (ns === null) { return thisitem.getattribute(nsatt); } else if (ns === 'http://www.w3.org/xml/1998/namespace') { // this is assumed so don't try to get an xmlns for the 'xml' prefix return thisitem.getattribute('xml:'+nsatt); // prefix must be 'xml' per the specs } var attrs2, result; var attrs = thisitem.attributes; var prefixatt = new regexp('^(.*):'+nsatt.replace(/\./g, '\\.')+'$'); // e.g., xlink:href // find any prefixes with the local-name being searched (escape period since only character (be...
Enhanced Extension Installation - Archive of obsolete content
the types at the time of writing include: 2 - extension 4 - theme 8 - locale for backward compatibility the extension system will continue to assume an item is an extension by default, and a theme if the item has a <em:internalname> property, but extension and theme authors should be good citizens and upgrade their install manifests to include the type.
Install Manifests - Archive of obsolete content
note: starting in gecko 11.0, applications such as firefox will assume add-ons that have not been updated in a very long time are no longer compatible by default.
Chapter 1: Introduction to Extensions - Archive of obsolete content
this document was authored by hideyuki emura and was originally published in japanese for the firefox developers conference summer 2007.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
and was originally published in japanese for the firefox developers conference summer 2007.
Adding sidebars - Archive of obsolete content
to sum up both of these references: you can choose an obscure key combination that won't conflict with firefox, such as ctrl+shift+(some letter), but there's no way of knowing if any other extension uses that same combination as well.
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
you shouldn't perform very time-consuming operations here, at least not without telling users what is going on.
Custom XUL Elements with XBL - Archive of obsolete content
that is, you shouldn't assume that script x will be included somewhere, because not including it will cause the binding to fail.
Intercepting Page Loads - Archive of obsolete content
avoid heavy, time-consuming operations, or the user's browsing experience will become exasperating.
Mozilla Documentation Roadmap - Archive of obsolete content
but this also means that finding exactly what you need can be time-consuming, and often fruitless.
User Notifications and Alerts - Archive of obsolete content
cc["@mozilla.org/alerts-service;1"].getservice(ci.nsialertsservice); let title = this._bundle.getstring("xulschoolhello.greeting.title"); let message = this._bundle.getstring("xulschoolhello.greeting.label"); alertsservice.showalertnotification( "chrome://xulschoolhello/skin/hello-notification.png", title, message, true, "", this, "xulschool hello message"); we pass this as an argument, assuming that this is an object that implements nsiobserver.
XPCOM Objects - Archive of obsolete content
} }; finally, here's a table summarizing the types you will most likely encounter in xpcom interfaces, and how to handle them: js type idl types notes strings autf8string, string, wstring, char*, others historically there have been several string types in xpcom.
Setting up an extension development environment - Archive of obsolete content
this assumes you're using directories rather than jars.
Signing an extension - Archive of obsolete content
these instructions assume you're working on mac and you've already got a valid certificate from ca.
Promises - Archive of obsolete content
the downloads object provides a promise-based api for downloading remote files, with full support for progress tracking, pause and resume, and, optionally, integration with the download manager ui.
Updating addons broken by private browsing changes - Archive of obsolete content
nsidownload now has retry, cancel, remove, pause, and resume methods which should be used instead of deprecated similarly-named nsidownloadmanager methods.
Search Extension Tutorial (Draft) - Archive of obsolete content
the following file, for instance, would change the default keyword search engine, assuming that an engine with the name example engine is installed, as described below: // this is a localizable preference, so it must contain a url which // points at a properties file containing the preference name as a // property.
Underscores in class and ID Names - Archive of obsolete content
summary: the use of the underscore character in css can lead to major display problems in multiple browsers.
Beginner tutorials - Archive of obsolete content
creating reusable content with css and xblthis page illustrates how you can use css in mozilla to improve the structure of complex applications, making code and resources more easily reusable.underscores in class and id namessummary: the use of the underscore character in css can lead to major display problems in multiple browsers.
Case Sensitivity in class and id Names - Archive of obsolete content
summary: although css is itself case-insensitive, class and id names are defined to be case-sensitive in html 4.01.
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
// ie fix if(document.all) tagname="nde:"+tagname; articles=doc.getelementsbytagname(tagname); for(i=0;i<articles.length;i++) { article=articles.item(i); tagname="title"; // ie fix if(document.all) tagname="nde:"+tagname; valuee=article.getelementsbytagname(tagname).item(0).firstchild.nodevalue; tagname="summary"; // ie fix if(document.all) tagname="nde:"+tagname; paraa=article.getelementsbytagname(tagname).item(0).firstchild.nodevalue; linkk=article.getattribute("url"); strvalue="<div class='nde-blurb'><h3><a href='"+linkk+"'>"+valuee+"</a></h3><p>"+paraa+"</p></div>"; document.getelementbyid("container").innerhtml+=strvalue; } } ...
Install.js - Archive of obsolete content
it assumes the following structure of your xpi file: sampleext.xpi chrome\ sampleext.jar content\ sampleext\ locale\ (optional) en-us\ sampleext\ ...
No Proxy For configuration - Archive of obsolete content
or 10.0.* ip addresses with wildcards in quads 10.*.*.* preferences name network.proxy.no_proxies_on default value localhost, 127.0.0.1 by default "localhost" and "127.0.0.1" are excluded, since most people assume these should connect to the local system.
Visualizing an audio spectrum - Archive of obsolete content
audio.mozframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } fft.forward(signal); // clear the canvas before drawing spectrum ctx.clearrect(0,0, canvas.width, canvas.height); for (var i = 0; i < fft.spectrum.length; i++ ) { // multiply spectrum by a zoom valu...
Protecting Mozilla's registry.dat file - Archive of obsolete content
in summary, you can use the following series of commands in your logon script (usually stored in /home/samba/netlogon/startup.bat on the server): rem ================================================== rem mozilla rem ================================================== attrib -r -s "%userprofile%\application data\mozilla" >nul 2>nul attrib -r -s "%userprofile%\application data\mozilla\registry.dat" >nul ...
Structure of an installable bundle - Archive of obsolete content
for example, if a plugin vendor wanted to make a plugin available for consumer computers running linux(of the form: /platform/linux*/), macintosh(of the form: /platform/darwin*/), and windows(of the form: /platform/win*/), it would provide the following files: /platform/linux_x86-gcc3/plugins/libmyplugin.so /platform/winnt_x86-msvc/plugins/myplugin.dll /platform/darwin_ppc-gcc3/plugins/libmyplugin.dylib because xpt files are not platform-specific, any associated xpt fi...
Enabling the behavior - retrieving tinderbox status - Archive of obsolete content
in this case we use it to retrieve an html page containing a brief summary of the current tinderbox state.
Download Manager improvements in Firefox 3 - Archive of obsolete content
firefox 3 offers improvements to the download manager that allow multiple progress listeners, use of the storage api for data management, download resuming, and more.
Block and Line Layout Cheat Sheet - Archive of obsolete content
mmaximumwidth the maximum width that the frame would consume if it were reflowed with an unconstrained available width.
Content states and the style system - Archive of obsolete content
we then try matching the node against these selectors, with the assumption that both :hover and :not(:hover) match the node.
Documentation for BiDi Mozilla - Archive of obsolete content
improvements to lists with hebrew and arabic list-style-type summary of new classes class name xpcom interface (if applicable) implementation comments nsibidi intl\unicharutil\public\nsibidi.h intl\unicharutil\src\nsbidiimp.cpp implementation of the unicode bidi algorithm nsiubidiutils intl\unicharutil\public\nsiubidiutils.h intl\unicharutil\src\nsbidiutilsimp.cpp utilities for bidi processing, including: character classification symmetric swapping reo...
Layout FAQ - Archive of obsolete content
this function converts an nsastring to an nsacstring by assuming that all the 16-bit units are ascii and just dropping the high byte on them all.
Using microformats - Archive of obsolete content
microformats allow web sites to provide semantic data to the browser in order to make it possible to present summaries of the information on a page without having to know how to parse the document itself.
JavaScript Client API - Archive of obsolete content
update(record) the argument is a record which has been remotely modified; your store should locate the matching local item (presumably using the guid, which is available in record.id) and update it to the new values provided in record.
Creating a Help Content Pack - Archive of obsolete content
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.
Java in Firefox Extensions - Archive of obsolete content
// guid of extension getitemlocation("test@yoursite"); //the path logic would work if we include em:unpack for ff 4.x, for ff 3.x since things are unpacked by default things work // get path to the jar files (the following assumes your jars are within a // directory called "java" at the root of your extension's folder hierarchy) // you must add this utilities (classloader) jar to give your extension full privileges var extensionurl = "file:///" + extensionpath.path.replace(/\\/g,"/"); var classloaderjarpath = extensionurl + "/java/javafirefoxextensionutils.jar"; // add the paths for all the other jar files that you will ...
First run - Archive of obsolete content
otherwise, the value is assumed to be html, and it becomes the body of your first-run page.
First Run - Archive of obsolete content
otherwise, the value is assumed to be html, and it becomes the body of your first-run page.
Clipboard - Archive of obsolete content
if no other arguments are specified, the flavor of the content is assumed to 'plain'.string flavordata type.
Clipboard Test - Archive of obsolete content
if no other arguments are specified, the flavor of the content is assumed to 'plain'.string flavordata type.
Clipboard - Archive of obsolete content
if no other arguments are specified, the flavor of the content is assumed to 'plain'.string flavordata type.
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
(assume we've defined a getrecenttweets(), which invokes a callback with an array of strings.) when the menu is shown, it displays a "loading..." item.
slideBar - Archive of obsolete content
about status: in development instantiation: jetpack.future.import('slidebar') last update: v0.6 summary: slidebar is a reinvention of the old sidebar feature of browsers.
Clipboard - Archive of obsolete content
if no other arguments are specified, the flavor of the content is assumed to 'plain'.string flavordata type.
jspage - Archive of obsolete content
}return this;},cancel:function(){if(this.stoptimer()){this.oncancel(); }return this;},onstart:function(){this.fireevent("start",this.subject);},oncomplete:function(){this.fireevent("complete",this.subject);if(!this.callchain()){this.fireevent("chaincomplete",this.subject); }},oncancel:function(){this.fireevent("cancel",this.subject).clearchain();},pause:function(){this.stoptimer();return this;},resume:function(){this.starttimer(); return this;},stoptimer:function(){if(!this.timer){return false;}this.time=$time()-this.time;this.timer=$clear(this.timer);return true;},starttimer:function(){if(this.timer){return false; }this.time=$time()-this.time;this.timer=this.step.periodical(math.round(1000/this.options.fps),this);return true;}});fx.compute=function(c,b,a){return(b-c)*a+c; };fx.durations={"sh...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
for example, the following code assumes that the div node already exists in the dom by the time the script block executes: ...
New Security Model for Web Services - Archive of obsolete content
summary advantages the proposed declaration file places the server operator, not the client in control of access to his server by untrusted scripts.
Plug-n-Hack - Archive of obsolete content
ng proxy that can handle https traffic, the user must typically: configure their browser to proxy via the tool configure the tool to proxy via their corporate proxy import the tool’s ssl certificate into their browser if any of these steps are carried out incorrectly then the browser will typically fail to connect to any website – debugging such problems can be frustrating and time-consuming.
BundleLibrary - Archive of obsolete content
not the cleanest, but it got all my plugins at once) istylr: istylr.webapp online web design tool (full win installer bundled with prism is available here - thanks to lars eric for his nsis script) meebo: meebo.webapp miro guide: miroguide.webapp motor0: motor0.webapp useful webapp on maintenance and fuel consumptions managment pandora: pandora@prism.app.webapp internet radio that only plays music you like.
Prism - Archive of obsolete content
we can also benefit from operating system tools that lets us view the memory/cpu consumption of a specific application.
RDF Datasource How-To - Archive of obsolete content
// assume compmgr refers to the component manager rv = compmgr->registercomponent(kmydatasourcecid, "my data source", ns_rdf_datasource_progid_prefix "my-datasource", apath, pr_true, pr_true); ...
open - Archive of obsolete content
summary opens the file, specifying file mode and type.
File object - Archive of obsolete content
summary non-standard server-side object this object lets you work files and directories on the local filesystem, and create os pipelines.
Abc Assembler Tests - Archive of obsolete content
when run, the assembler tests include the abcasm/abs_helper.as file which defines the following functions: start(summary:string):void - start a new test section described by summary end():void - test section finished compare_stricteq(name:string, expected:*, actual:*):void - compare the results of a testcase where name is the testcase name compare_typeerror(name:string, expected:*, actual:*):void - special function for comparing typeerrors (runtimeerrors) - will only compare the first 22 chars of expected a...
Running Tamarin acceptance tests - Archive of obsolete content
can also be using in conjunction with --threads -f --forcerebuild force rebuild all test files -q --quiet : will print a period (.) for each test run regardless of results, then print the test run summary when finished --ascargs= : additional arguments to pass to asc.jar --vmargs= : additional arguments to pass to avmshell --random : run tests in random order --timeout : max time for testrun --verify : run a verify pass instead of running abcs --verifyonly : run a -dverifyonly pass: only checks test exitcode (only works with debugger vms) testing the android shell the instructions above appl...
Running Tamarin performance tests - Archive of obsolete content
vel.abc -x --exclude comma separated list of directories to skip -h --help display help and exit -t --notime do not generate timestamps (cleaner diffs) -f --forcerebuild force rebuild all test files -c --config sets the config string [default os-tvm] -q --quiet display minimum output during testrun -l --log also log all output to given logfile --summaryonly only display final summary --rebuildtests rebuild the tests only - do not run against vm --showtimes shows the time for each test --ascargs args to pass to asc on rebuild of test files --vmargs args to pass to vm --timeout max time to run all tests --testtimeout max time to let a test run, in sec (default -1 = never timeout) --html ...
Tamarin Build System Documentation - Archive of obsolete content
the list of smoke tests are located in the tamarin-repository, test/run-smokes.txt, assume the start directory is test format is cd testdir; command to run test above the test should be a # comment describing why the test in the smokes, when test failed, possibly a bugzilla bug the tests can be run by following the above instructions for running buildbot scripts locally and executing the all/run-smoke-tests.sh as a rule any test failure should be immediately added to the top of the sm...
Tamarin-central rev 703:2cee46be9ce0 - Archive of obsolete content
testing summary acceptance tests have passed on the following supported platforms: * windows, 32 & 64 bit * mac ox x ppc & intel, 32 bit * linux, 32 bit * windows mobile arm version asc-4200 of the actionscript compiler was used for all tests.
TraceVis - Archive of obsolete content
text summary python binlog.py /tmp/tracevis.log this prints a summary of the log.
Venkman Introduction - Archive of obsolete content
click the "pause" link again on the fishcam page to resume the demo.
Using Breakpoints in Venkman - Archive of obsolete content
normally, if the breakpoint script generates an exception, venkman assumes you made a mistake and stops execution after displaying the exception.
Venkman - Archive of obsolete content
source code the source code for venkman may be found in mercurial at the following url: http://hg.mozilla.org/venkman/summary community view mozilla forums...
copy - Archive of obsolete content
summary makes a queued copy of the specified file.
isDirectory - Archive of obsolete content
summary returns a boolean value indicating whether the specified filespecobject is a directory.
isFile - Archive of obsolete content
summary returns a boolean value indicating whether the given filespecobject is a file.
modDate - Archive of obsolete content
summary returns the last modified date of a specified file or directory.
modDateChanged - Archive of obsolete content
summary returns whether file has been modified since a certain date.
move - Archive of obsolete content
if the destination doesn't already exist a file name for the destination is assumed.
remove - Archive of obsolete content
summary deletes a specified file.
rename - Archive of obsolete content
summary renames a specified file in place.
size - Archive of obsolete content
summary return the size of the given file in bytes.
windowsGetShortName - Archive of obsolete content
summary returns a path that conforms to the windows 8.3 file naming convention.
windowsRegisterServer - Archive of obsolete content
summary windowsregisterserver registers installed dlls with the windows registry.
windowsShortcut - Archive of obsolete content
summary creates a windows shortcut to the installed software.
toString - Archive of obsolete content
summary converts an installversion init object to a string.
alert - Archive of obsolete content
summary the alert function displays a modal dialog box with a message representing the input.
cancelInstall - Archive of obsolete content
summary aborts installation of the software; performs cleanup of temporary files.
confirm - Archive of obsolete content
warning: do not make any assumptions on the button placement - the underlying implementation can freely decide where each of the three buttons is placed.
getFolder - Archive of obsolete content
summary returns an object representing one of the standard directories.
performInstall - Archive of obsolete content
summary performs the actual installation of the software.
registerChrome - Archive of obsolete content
example example assumes your xpi file is in plugins folder and rdf file is in resources subfolder of xpi.
writeString - Archive of obsolete content
summary changes a value in a .ini file.
setValueNumber - Archive of obsolete content
summary sets the value of a key, when that value is a number.
WinReg Object - Archive of obsolete content
this discussion assumes you are already familiar with the windows registry.
Directions of the Mozilla RDF engine - Archive of obsolete content
presentation download summary this presentation showed new developments in the mozilla rdf engine.
Extending Gecko with XBL and XTF - Archive of obsolete content
presentation view online download summary this session explored ways to extend mozilla/firefox to handle new xml tags and namespaces via drop-in extensions to the layout engine.
Mozilla E4X - Archive of obsolete content
presentation view online download summary "ecmascript for xml" (ecma-357), a new standard for writing and processing xml directly in javascript (ecma-262, iso-16262).
SVG And Canvas In Mozilla - Archive of obsolete content
presentation view online download summary today's web browsers offer somewhat limited graphics capabilities to web developers.
XUL - Mozilla's XML User Interface Language - Archive of obsolete content
presentation view online download summary ben goodger, lead engineer for mozilla firefox talked about xul, mozilla's xml user interface toolkit.
Dynamically modifying XUL-based user interface - Archive of obsolete content
we assume that the reader has basic knowledge of both xul and javascript.
Getting File Information - Archive of obsolete content
the value is a sum of three values, 4 for readable, 2 for writable and 1 for executable.
Moving, Copying and Deleting Files - Archive of obsolete content
in this case, we assume that 'source.txt' is a file.
Node - Archive of obsolete content
ArchiveMozillaXULNode
summary this is a scriptable interface corresponding to the nsidomnode xpcom interface.
ContextMenus - Archive of obsolete content
you should not assume that a user has used the mouse to open a context menu.
MenuButtons - Archive of obsolete content
presumably, when one is selected, the application view would be changed accordingly.
MenuItems - Archive of obsolete content
the example assumes that the showtoolbar() function might fail so if it returns false, the checked attribute is not modified.
Menus - Archive of obsolete content
the following is a brief summary of these elements, examples of each will be provided later.
OpenClose - Archive of obsolete content
for this reason, you should not assume that a user has used the mouse to open the context menu.
Positioning - Archive of obsolete content
the following assumes a left to right user interface.
Bindings - Archive of obsolete content
let assume though, that we are only going to add a description to one of the photos in the datasource; the other two photos will not have a description.
Filtering - Archive of obsolete content
let's assume that we've given an id of 'cond' to the query tag.
Multiple Rule Example - Archive of obsolete content
it is usually sufficient to assume that earlier rules are used to filter results much like an if-else construct in a programming language.
RDF Query Syntax - Archive of obsolete content
for this discussion, assume that so far we have a single potential result as above.
Result Generation - Archive of obsolete content
so, to summarize: start out with a one possible result as the seed iterate over the results determined so far and augment them with additional data add any new possible results remove any rejected results repeat steps 2 to 4 for each query statement once done, all remaining results become matches each possible result is made up of a set of variable-value pairs.
Rule Compilation - Archive of obsolete content
it would be rather time consuming to generate output for every item in a tree, even for those not displayed, so the template builder doesn't do so.
SQLite Templates - Archive of obsolete content
if no type is specified, a string is assumed.
Simple Query Syntax - Archive of obsolete content
this example assumes that the rule has been given an id of 'filterrule'.
Sorting Results - Archive of obsolete content
for more complex queries, this natural sorting will not work, because the sort service assumes that the starting ref resource is the container and the end results are the children.
Template Builder Interface - Archive of obsolete content
to summarize, the refresh method reloads the data, whereas the rebuild method reconstructs the content.
Template Logging - Archive of obsolete content
to summarize, the following forms of message may be logged: new active result for query 1 matching rule 2 a new data result has been added.
Advanced Rules - Archive of obsolete content
note that you do not need to put 'rdf:' at the beginning of the predicate, as that part is assumed.
Box Model Details - Archive of obsolete content
example 2 : source view <hbox flex="1" align="top"> <button label="left" style="min-width: 100px;" flex="1"/> <spacer flex="1"/> <button label="right" style="min-width: 100px;" flex="1"/> </hbox> summary of the box model to achieve complicated layouts, you will generally need to add nested boxes, specify minimum and maximum sizes on some elements, and make certain elements flexible.
Commands - Archive of obsolete content
example: controller implementation let's assume that we want to implement a listbox that handles the delete command.
Creating a Skin - Archive of obsolete content
this section assumes that you are starting with the classic skin.
Creating a Wizard - Archive of obsolete content
the following is a summary of attribute functions that are called when the user presses next, in the order that they will be checked.
Features of a Window - Archive of obsolete content
the user may still resize the window to another size, assuming that the window is resizable.
Introduction - Archive of obsolete content
most applications need to be developed using features of a specific platform making building cross-platform software time-consuming and costly.
Introduction to XBL - Archive of obsolete content
however, to summarize, it causes two buttons to be added automatically inside the box, one an ok button and the other a cancel button.
Manipulating Lists - Archive of obsolete content
since the select event fired we can assume that an item is selected.
More Menu Features - Archive of obsolete content
we'll assume that there's nothing to paste.
Templates - Archive of obsolete content
of course, this assumes that the datasource supplies the appropriate resources.
Toolbars - Archive of obsolete content
presumably, they would allow the user to save search results and re-open them later.
XUL Structure - Archive of obsolete content
to summarize the points made above: mozilla renders both html and xul using the same underlying engine and uses css to specify their presentation.
XUL Accesskey FAQ and Policies - Archive of obsolete content
look for dependencies of bug 129179 (the xul accesskey hookup meta bug), or look for bugs with "accesskey" or "mnemonic" in the summary, or look for dialogs where there are no elements with underlined letters.
XUL Questions and Answers - Archive of obsolete content
return to mozilla-dev-tech-xul summaries the frequently asked questions should be moved to xul faq (make sure they have a clear answer.) where can i get more information about creating mozsearch plugins?
XUL accessibility guidelines - Archive of obsolete content
transcripts can be time consuming to generate, but is the only way to make audio content accessible.
attribute.align - Archive of obsolete content
summary the align attribute specifies how child elements of the box are aligned, when the size of the box is larger than the total size of the children.
image - Archive of obsolete content
ArchiveMozillaXULimage
« xul reference home [ examples | attributes | properties | methods | related ] summary an element that displays an image, much like the html img element.
menupopup - Archive of obsolete content
attributes ignorekeys, left, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, top properties accessibletype, anchornode, popupboxobject, position, state, triggernode methods hidepopup, moveto, openpopup, openpopupatscreen, setconsumerollupevent, showpopup, sizeto examples the following example shows how a menupopup may be attached to a menulist.
triple - Archive of obsolete content
if such an assertion exists, the rule may match, assuming that all the conditions match.
Make your xulrunner app match the system locale - Archive of obsolete content
this article is going to assume a lot of knowledge of xpcom and will be written for someone using python, but the ideas should be adaptable.
Windows and menus in XULRunner - Archive of obsolete content
although i have not seen it mentioned yet, i am assuming that you can only have one <window> element per xul file.
application/http-index-format specification - Archive of obsolete content
do not present to the end-user 100: 101: the files in this directory are put forth for public 101: consumption and the provider make no guarentee as 101: as to the functionality of the data or programs 101: presented.
calIFileType - Archive of obsolete content
summary the califiletype interface provides information about a specific file type.
reftest opportunities files - Archive of obsolete content
it is not always clear why particular files were checked in, but one presumes that something needed to be checked.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.accessibility - oct 6, 2006 announcements legal precedent set for web accessibility us federal court rules that retailers may be sued if its website is inaccsessible.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.accessibility - oct 28-nov 10, 2006 announcements acm transactions on accessible computing "transactions on accessible computing (taccess) is a quarterly journal that publishes refereed articles addressing issues of computing as it impacts the lives of people with disabilities." read more...
mozilla-dev-accessibility - Archive of obsolete content
weekly summaries 2006-10-06 2006-11-10 frequently asked questions read frequently asked questions ...
mozilla-dev-apps-calendar - Archive of obsolete content
weekly summaries friday september 29, 2006 friday october 6, 2006 ...
mozilla-dev-apps-firefox - Archive of obsolete content
weekly summaries friday september 29, 2006 friday october 6, 2006 friday october 13, 2006 friday october 20, 2006 friday november 3, 2006 friday november 10, 2006 friday november 17, 2006 friday november 24, 2006 friday december 1, 2006 ...
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - september 22-29, 2006 announcements development for thunderjudge extension is put on hold the author of the thunderjudge extension is currently putting the development of the extension on hold due to several issues (more details available at the website).
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - september 30-october 06, 2006 announcements mac user needed scott macgregor announced that .mac support and a dynamically add isp account feature has been added to the thunderbird account manager, however, testing is required before release can be issued.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - october 7-13, 2006 announcements updated: thunderbird developer documentation eric shepherd has put together a checklist for the upcoming thunderbird developer documentation and is looking for feedback as well as contributors.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - october 14-20, 2006 announcements eudora goes open source both qualcomm and mozilla will participate in enhancing the capabilities and ease of use of both eudora and thunderbird.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - october 21-27, 2006 announcements none for this week.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - october 28 - november 03, 2006 announcements none for this week.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 4-10, 2006 announcements none for this week.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 10 - 17, 2006 announcements none for this week discussions how to fiter out mail for a particular recepient?
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 18 - 24, 2006 announcements none for this week discussions issues with 2.0 features there's renewed discussion on why certain features were removed in the 2.0 release, and the addition of support for s/mime and not pgp/gpg encryption.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 18 - 24, 2006 announcements none for this week discussions how to display toolbar button image within the customization palette?
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.builds - october 7th to october 13th 2006 cannot build ff 1.5.0.7 on linux x86_64 werner flamme cannot build firefox 1.5.0.7 on his suse linux 10.0 x86_64 box.
mozilla-dev-extensions - Archive of obsolete content
weekly summaries 2006-09-29 2006-10-06 2006-10-13 2006-10-20 2006-10-27 2006-11-03 2006-11-10 2006-11-17 2006-11-24 2006-12-01 2006-12-08 weekly faq week 2006-09-29 questions and answers from the newsgroup week 2006-10-06 questions and answers from the newsgroup week 2006-10-13 questions and answers from the newsgroup week 2006-10-20 questions and answers from the newsgroup week 2006-10-27 questions and answers from the newsgroup week 2006-11-03 questions and answers from the newsgroup week 2006-11-10 questions and answers from the newsgroup week 2006-11-17 questions and answers from the newsgroup week 2006-11-24 questions and answers from the newsgroup week 2006-12-01 questions and answers from the newsgroup week 2006-12-08 questions a...
2006-09-22 - Archive of obsolete content
summary: mozilla.dev.i18n - feb 2nd - sep 22nd, 2006 announcements testing a dummy greek bon echo nsis installer bug #69230: accelerators should not be affected by keyboard group/level proposal of code changes for l10n in firefox 3 discussions thai language support: how can we add thai as an official localized build?
mozilla-dev-i18n - Archive of obsolete content
weekly summaries 2006-09-22 ...
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.l10n - october 13, 2006 announcements seamonkey 1.0.5 he-il seamonkey 1.0.5 in hebrew was released a while ago firefox 2 rc2 is out firefox 2 rc2 is out, to download click here sunbird_0_3_release tag being created sunbird_0_3_release tag being created seamonkey 1.1 localization freeze and beta upcoming there are no open blockers left.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.l10n - october 20, 2006 announcements sign-off for zh-tw firefox 2 sign-off for zh-tw firefox 2 sign off of chinese simplified firefox 2.0 sign off of simplified chinese firefox 2 attention dictionary providers, or: warning, amo sucks there was at amo (addons.mozilla.org), which has been being fixed.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.l10n - october 27, 2006 announcements drafts of eulas for several lanugages available for review drafts of eulas for several lanugages available for review final ff release already announced a french site has already announced final ff 2.0 and gives download links on its own site.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.l10n - november 10, 2006 announcements seamonkey 1.0.5 in belarusian belarusian [be-by] localization for seamonkey 1.0.5 is available now.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.l10n - november 17, 2006 announcements seamonkey 1.1b in russian (ru-ru) seamonkey 1.1b in russian (ru-ru) is uploaded to ftp.mozilla.org seamonkey 1.0.6 in russian (ru-ru) seamonkey 1.0.6 in russian (ru-ru) is uploaded to ftp.mozilla.org seamonkey 1.0.6 in czech (cs-cz) seamonkey 1.0.6 in czech (cs-cz) is uploaded to ftp.mozilla.org seamonkey 1.0.6 he-il seamonkey 1.0.6 he-il is released.
2006-11-3 - Archive of obsolete content
summary: mozilla.dev.l10n - november 3, 2006 announcements mozip.net 1.2.0 released: the should have been 1.0 release mozip.net 1.2.0, a gui (graphic) version of piaip's mozip command line utility, is available here.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.l10n - december 1, 2006 announcements langpacks for sunbird nightly builds available for testing langpacks for sunbird nightly builds available for testing seamonkey 1.1 late string changes for mail content policy the fix to bug 360288 has landed.
2006-12-08 - Archive of obsolete content
summary: mozilla.dev.l10n - december 8, 2006 announcements mozilla sponsored server for l10n the server for mozilla sponsored server for l10n should be up and running soon.
mozilla-dev-l10n - Archive of obsolete content
weekly summaries 2006-10-06 2006-10-13 2006-10-20 2006-10-27 2006-11-3 2006-11-10 2006-11-17 2006-11-24 2006-12-01 2006-12-08 ...
2006-11-24 - Archive of obsolete content
others gave input on this as well meetings because of the firefox summit last week there is no project status meeting this week november 22 gecko 1.9/gran paradiso status meeting: (agenda) ...
2006-09-29 - Archive of obsolete content
summary of newsgroup moz.dev.platform summary: mozilla.dev.platform - september 22 - 29, 2006 announcements firefox 2 release candidate 1 is now available for download announcing that firefox 2 rc 1 is available for download discussions xulrunner fails without feedback on osx intel 10.4.7 will morton is trying to port a xul application to osx.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.platform - september 30th to october 6th 2006 announcements mike schroepfer is attending a vista compatibility lab with some other people this week.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.platform - october 7th to october 13th 2006 announcements no announcments this week other traffic javascript package system for 1.9/ff3 on sun, oct 8 2006 robert sayre inquires about the javascript package system for 1.9 for firefox 3, robert would like to know if there is any chance we'll get this?
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.platform - october 14th to october 20th 2006 announcements no announcements this week.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.platform - october 21st to october 27th 2006 announcements no announcments this week.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.platform - october 28th - november 3rd, 2006 announcements developer chat with brendan eich!
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.platform - november 4th - november 10th, 2006 announcements no announcements this week traffic beaufour moves the discussion about xulrunner unit-tests like xpcshell from mozilla.dev.platform to mozilla.dev.quality.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.platform - november 11th - november 17th, 2006 announcements no announcements this week traffic xulrunner: <browser> not allowing javascript popup windows b notes that when using xul elements <browser/> and <tabbrowser/> the javascript popup windows don't work out of the box and asks what needs to be implement.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.platform - november 25th - december 1st, 2006 announcements no announcements this week traffic alex vincent posts that he has started a xulrunner/mac faq here on mozdev.
2006-18-24 - Archive of obsolete content
summary: mozilla.dev.platform - november 18th - november 24th, 2006 announcements no announcements this week traffic xulrunner: <browser> not allowing javascript popup windows b notes that when using xul elements <browser/> and <tabbrowser/> the javascript popup windows don't work out of the box and asks what needs to be implement.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.quality - september 23-29, 2006 announcements litmus down because of hardware failure - we are working to fix it - the hardware that litmus runs on failed over the weekend, so litmus is still down.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.quality - september 30-october 6, 2006 announcements firefox 2 rc2 update - the minimum tests for rc2 are complete which includes smoke and bft tests.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.quality - october 6-october 13, 2006 announcements none discussions appropriate for me to assign a bug?
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.quality - october 13-october 20, 2006 announcements completed rc3 testing - the key testing activities for rc3 has been completed.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.quality - october 20-october 27, 2006 announcements firefox & thunderbird 1.5.0.8 candidate builds available for testing!
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.quality - october 27-november 3, 2006 announcements a change in tp2's numbers - rob helmer is going to be landing a patch that adam guthrie made to fix how tp2 reports its average pageload times.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.quality - november 4-november 10, 2006 announcements qmo blog at quality.mozilla.org - the mozilla qa team has decided to go with joomla!
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.quality - november 10-november 17, 2006 announcements none discussions none meetings none authors mark d'souza (mdsouza) mohamed attar (mojo) ...
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.quality - november 18-november 24, 2006 announcements none discussions firefox 1.5.0.7 on linux x86_64 - someone is having a problem with xhttprequest.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.quality - november 25-december 1, 2006 announcements need volunteers to maintain jssh for testing on firefox 2 branch - dave liebreich is looking for someone willing to take responsibility for maintaining jssh for testing purposes.
mozilla-dev-quality - Archive of obsolete content
weekly summaries september 29, 06 october 6, 2006 october 13, 2006 october 20, 2006 october 27, 2006 november 3, 2006 november 10, 2006 november 17, 2006 november 24, 2006 december 1, 2006 ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.security - september 30, 2006 to october 6, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.security - october 7, 2006 to october 13, 2006 return to mozilla-dev-security announcements none during this week.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.security - october 14, 2006 to october 20, 2006 return to mozilla-dev-security announcements none during this week.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.security - october 21, 2006 to october 27, 2006 return to mozilla-dev-security announcements none during this week.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.security - october 28, 2006 to november 3, 2006 return to mozilla-dev-security announcements none during this week.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.security - november 4, 2006 to november 10, 2006 return to mozilla-dev-security announcements none during this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.security - november 18, 2006 to november 24, 2006 return to mozilla-dev-security announcements none during this week.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.security - november 25, 2006 to december 1, 2006 return to mozilla-dev-security announcements none during this week.
mozilla-dev-security - Archive of obsolete content
weekly summaries september 29, 2006 october 6, 2006 october 13, 2006 october 20, 2006 october 27, 2006 november 3, 2006 november 10, 2006 november 17, 2006 november 24, 2006 december 1, 2006 ...
2006-09-29 - Archive of obsolete content
nothing to summarize this week as there was no summary and all questions were left unanswered.
2006-10-06 - Archive of obsolete content
nothing to summarize this week as there was no summary and all questions were left unanswered.
2006-10-13 - Archive of obsolete content
nothing to summarize this week, see faq instead.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.tech.layout - october 21 - october 27, 2006 announcements none this week.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.tech.layout - october 28 - november 3, 2006 announcements new reflow branch off of trunk l.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 4 - november 10, 2006 announcements none this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 17 - november 24, 2006 announcements none this week.
2006-12-24 - Archive of obsolete content
summary: mozilla.dev.tech.layout november 24 -december 1, 2006 announcements none this week.
2006-12- 02 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 24 2006 - december 2, 2006 announcements none this week.
2006-12- 08 - Archive of obsolete content
summary: mozilla.dev.tech.layout - december 2, 2006 - december 8, 2006 announcements none this week.
2006-09-06 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 06-13, 2006 announcements none during this week.
2006-09-22 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - sept 22-29, 2006 announcements none during this week.
2006-09-30 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - sept 30- oct 5, 2006 announcements build a xpcom component on mac os x benjamin smedberg confirmed that this tutorial http://www.iosart.com/firefox/xpcom/ is misleading as it uses the standalone glue (-dxpcom_glue) for components, which is not recommended.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 13-20, 2006 announcements none during this week.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 21-27, 2006 announcements none during this week.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 04-nov 10, 2006 announcements xptcall changes in process - ports owners needed if you maintain an xptcall port, you are needed to submit a patch to that bug 349002 with xptcall updates.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - nov 11-nov 17, 2006 announcements none during this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - nov 18-nov 24, 2006 announcements none during this week.
2006-11-3 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 28-nov 3, 2006 announcements none during this week.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - nov 25- dec 01, 2006 announcements none during this week.
2006-12-08 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - dec 02- dec 08, 2006 announcements none during this week.
2006-09-22 - Archive of obsolete content
summary: mozilla.dev.tech.xul - sept 22-29, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.tech.xul - sept 22-29, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.tech.xul - sept 29-oct 06, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.tech.xul - oct 07-oct 13, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.tech.xul - oct 14-oct 20, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.tech.xul - oct 21-oct 27, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.tech.xul - oct 28-nov 3, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.tech.xul - nov 4-nov 10, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.tech.xul - nov 18-nov 24, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.tech.xul - nov 25-dec 01, 2006 return to mozilla-dev-tech-xul announcements none during this week.
External resources for plugin creation - Archive of obsolete content
firefox, safari, opera, google chrome, qtwebkit and any other web browser that supports the "netscape plugin api", npapi articles, information, and tutorials npapi has been around a very long time, and there have been many attempts to distill down useful information on creating them: colonelpanic.net building a firefox plugin - part one: discusses the difference between npapi and npruntime and summarizes the basic apis needed to create a plugin building a firefox plugin - part two: discusses the basic lifecycle of a npapi plugin building a firefox plugin - part three: discusses npobjects and how to use them memory management in npapi: discusses how memory is managed in a npapi plugin browser plugins vs extensions (add-ons) -- the difference: discusses the oft-misunderstood difference betwe...
NPAnyCallbackStruct - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary note: this structure is only used on unix platforms.
NPByteRange - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents a particular range of bytes from a stream.
NPClass - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npclass is a structure that holds a set of pointers to functions that make up the behavior of an instance of an npclass (i.e.
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.
NPIdentifier - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary npidentifier is an opaque type used for method and property identifiers, such as strings or integers.
NPN_CreateObject - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary allocates a new npobject.
NPN_DestroyStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary closes and deletes a stream.
NPN_Enumerate - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary gets the names of the properties and methods of the specified npobject.
NPN_Evaluate - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary evaluates a script in the scope of the specified npobject.
NPN_ForceRedraw - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary asks the plugin host to immediately (synchronously) repaint invalid areas.
NPN_GetAuthenticationInfo - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary the function is called by plugins to get http authentication information from the browser.
NPN_GetIntIdentifier - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary returns an opaque identifier for the integer that is passed in.
NPN_GetProperty - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary gets the value of a property on the specified npobject.
NPN_GetStringIdentifier - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary returns an opaque identifier for the string that is passed in.
NPN_GetStringIdentifiers - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary returns an array of opaque identifiers for the names that are passed in.
NPN_GetURL - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary asks the browser to create a stream for the specified url.
NPN_GetURLNotify - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary requests creation of a new stream with the contents of the specified url; gets notification of the result.
NPN_GetValue - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary allows the plug-in to query the browser for information.
NPN_GetValueForURL - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary provides information to a plugin which is associated with a given url, for example the cookies or preferred proxy.
NPN_HasMethod - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary determines whether or not the specified npobject has a particular method.
NPN_HasProperty - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary determines whether or not the specified npobject has a particular property.
NPN_IdentifierIsString - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary determines whether or not an identifier is a string.
NPN_IntFromIdentifier - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary returns the integer value corresponding to the given integer identifier.
NPN_InvalidateRect - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary invalidates the specified portion of the plugin's drawing area, adding it to the region that needs to be redrawn when the plugin next repaints its contents.
NPN_InvalidateRegion - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary invalidates the specified drawing region prior to repainting or refreshing a windowless plug-in.
NPN_Invoke - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary invokes a method on the given npobject.
NPN_InvokeDefault - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary invokes the default method, if one exists, on the given npobject.
NPN_MemAlloc - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary allocates memory from the browser's memory space.
NPN_MemFlush - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary note: this function is only implemented on mac os x.
NPN_MemFree - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary deallocates a block of allocated memory.
NPN_PluginThreadAsyncCall - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary thread safe way to request that the browser calls a plug-in function on the browser or plugin thread (the thread on which the plug-in was initiated).
NPN_PostURL - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary posts data to a url.
NPN_PostURLNotify - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary posts data to a url, and receives notification of the result.
NPN_ReleaseObject - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary decrements the reference count of the given npobject.
NPN_ReleaseVariantValue - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npn_releasevariantvalue() releases the value in the given variant.
NPN_ReloadPlugins - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary reloads all of the installed plugins.
NPN_RemoveProperty - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary removes a property from the specified npobject.
NPN_RequestRead - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary requests a range of bytes from a seekable stream.
NPN_RetainObject - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary increments the reference count of the given npobject.
NPN_SetException - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary a plugin can call this function to indicate that a call to one of the plugin's npobjects generated an error.
NPN_SetProperty - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary sets the value of a property on the specified npobject.
NPN_SetValue - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary implemented by browsers.
NPN_SetValueForURL - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary allows a plugin to change the stored information associated with a url, in particular its cookies.
NPN_Status - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary lets a plug-in display a message on the browser's status line.
NPN_UTF8FromIdentifier - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary returns the utf-8 string corresponding to the given string identifier.
NPN_UserAgent - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary returns the browser's user agent field.
NPN_Version - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary lets plugins obtain version information, both of the plug-in api and of the browser itself.
NPObject - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npobject is a structure that holds a pointer to an npclass and an integer reference count, and possibly also implementation specific (i.e.
NPP - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents a single instance of a plug-in.
NPP_Destroy - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary deletes a specific instance of a plug-in.
NPP_DestroyStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary tells the plug-in that a stream is about to be closed or destroyed.
NPP_GetValue - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary allows the browser to query the plug-in for information.
NPP_HandleEvent - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary delivers a platform-specific window event to the instance.
NPP_New - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary creates a new instance of a plug-in.
NPP_NewStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary notifies a plug-in instance of a new data stream.
NPP_Print - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary requests a platform-specific print operation for an embedded or full-screen plug-in.
NPP_SetValue - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary implemented by plugins.
NPP_SetWindow - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary tells the plug-in when a window is created, moved, sized, or destroyed.
NPP_StreamAsFile - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides a local file name for the data from a stream.
NPP_URLNotify - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary notifies the plug-in instance of the completion of a url request.
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.
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.
NPRect - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary represents a rectangular area of a plug-in's content area.
NPRegion - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary represents a platform-defined region of a page.
NPSavedData - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary block of instance information saved after the plug-in instance is deleted; can be returned to the plug-in to restore the data in future instances of the plug-in.
NPSetWindowCallbackStruct - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary note: this structure is only used on unix platforms.
NPStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents a stream of data either produced by the browser and consumed by the plug-in, or produced by the plug-in and consumed by the browser.
NPString - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npstring is a struct that holds a pointer to a sequence of 8-bit units (nputf8) making up a utf-8 string, and the number of 8-bit units in the utf-8 string.
NPUTF8 - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary nputf8 is a byte representing an 8-bit unit of a utf-8 character.
NPVariant - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npvariant is a struct that holds a value and the type of that value.
NPVariantType - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npvarianttype is an enumeration that is used to identify the data type of an npvariant structure.
NPWindow - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary contains information about the target into which the plug-in instance can draw.
NP_GetValue - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary allows the browser to query the plug-in for information.
NP_Initialize - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides global initialization for a plug-in.
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.
NP_Shutdown - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides global deinitialization for a plug-in.
Adobe Flash - Archive of obsolete content
the description string is broken into an array of constituent strings based on an invocation of the match method with a regular expression that assumes that the string format will be in the format flash major rminor where major can be a major revision such as "5" or "6" and minor is the subsidiary version number.
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
it's recommended that you have a look at the gecko plugin api reference since this document will include information that assumes that you are already familiar with the way that plugins are currently hosted as well as the apis.
Plugins - Archive of obsolete content
this can be useful when trying to determine if a plug-in is consuming too many resources.
Why RSS Content Module is Popular - Including HTML Contents - Archive of obsolete content
for example, you could use it to include the entire contents of a blog post; or just a summary of it.
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
one could assume that the comment count was acurate at the moment in time specified in the <channel>'s <lastbuilddate> element, but that is a risky assumption given that no where is that mandated.
How RSS Works - Archive of obsolete content
the client end of rss syndication is the part of the system that consumes the rss feed.
SAX - Archive of obsolete content
below is an example of parsing from a string: xmlreader.parsefromstring("<f:a xmlns:f='g' d='1'><bbq/></f:a>", "text/xml"); this call results in the following output (assuming the content handler from the example above is used): startdocument startelement: namespace='g', localname='a', qname='f:a', attributes={d='1'} startelement: namespace='', localname='bbq', qname='bbq', attributes={} endelement: namespace='', localname='bbq', qname='bbq' endelement: namespace='g', localname='a', qname='f:a' enddocument ...
Confidentiality, Integrity, and Availability - Archive of obsolete content
so, in summary, a breach of confidentiality means that someone gains access to information who shouldn't have access to it.
Digital Signatures - Archive of obsolete content
once you have signed some data, it is difficult to deny doing so later, assuming that the private key has not been compromised or out of the owner's control.
TCP/IP Security - Archive of obsolete content
the integrity of data can be assured by generating a message authentication code (mac) value, which is a keyed cryptographic checksum of the data.
Threats - Archive of obsolete content
for example, someone could alter an order for goods or change a person's resume.
Table Reflow Internals - Archive of obsolete content
intro to paginated reflow special assumptions there are only initial and (possibly) resize reflows.
The Basics of Web Services - Archive of obsolete content
summary: a current hot topic on the web right now are web services.
Theme changes in Firefox 4 - Archive of obsolete content
iconsize value actual add-on toolbar button icon dimensions (assuming correct stylesheet and images) small 16x16 pixels large 24x24 pixels note: for stock buttons, the theme is free to use icons of any size.
Scratchpad - Archive of obsolete content
for example, if you type document.addeventlistener, then press ctrl + shift + space, you'll see a popup that shows a summary of the function's syntax and a short description: the "[docs]" link takes you to the mdn documentation for the symbol.
Using the W3C DOM - Archive of obsolete content
if neither is supported, it assumes support for basic dom 1 methods and uses those.
Browser Feature Detection - Archive of obsolete content
test summary standard netscape 7.0x firefox 1.5 safari 2 opera 7 / 8.5-9.0 internet explorer 6 / 7 dom core 1 100% 100% 100% 75% / 91% 75% / 75% dom core 2 100% 100% 100% 70% / 94% 58% / 58% dom 1 html 100% 100% 100% 100% / 100% 100% / 100% dom css 1 100% 100% 100% 100% / 100% 96% /...
E4X for templating - Archive of obsolete content
javascript 1.8 expression closure <output> {sort(fruits.*, function (a, b) a.text() > b.text() /* text() call may not be necessary */ )} </output>.toxmlstring() ); /* <output> <item>banana</item> <item>grapes</item> <item>pear</item> </output> */ the above utility also works if the input is an htmlcollection, an array of strings, an array of dom objects, or an array of e4x objects (assuming the comparison function is changed or adapted accordingly).
for each...in - Archive of obsolete content
the following snippet iterates over an object's properties, calculating their sum: var sum = 0; var obj = {prop1: 5, prop2: 13, prop3: 8}; for each (var item in obj) { sum += item; } console.log(sum); // logs "26", which is 5+13+8 specifications not part of any standard.
JavaArray - Archive of obsolete content
summary core object a wrapped java array accessed from within javascript code is a member of the type javaarray.
JavaClass - Archive of obsolete content
summary core object a javascript reference to a java class.
JavaObject - Archive of obsolete content
summary core object the type of a wrapped java object accessed from within javascript code.
JavaPackage - Archive of obsolete content
summary core object a javascript reference to a java package.
Packages - Archive of obsolete content
summary a top-level object used to access java classes from within javascript code.
java - Archive of obsolete content
summary core object a top-level object used to access any java class in the package java.*.
netscape - Archive of obsolete content
summary core object a top-level object used to access any java class in the package netscape.*.
sun - Archive of obsolete content
summary core object a top-level object used to access any java class in the package sun.*.
Window.importDialog() - Archive of obsolete content
summary because opening windows on mobile isn't necessarily appropriate, the firefox mobile team designed the importdialog() method to replace window.opendialog().
Writing JavaScript for XHTML - Archive of obsolete content
for example: var string = '<div xmlns="http://www.w3.org/999/xhtml"><h1>hello world!</h1></div>'; var parser = new domparser(); var documentfragment = parser.parsefromstring(string, "text/xml"); body.appendchild(documentfragment); // assuming 'body' is the body element but be aware that if your string is not well-formed xml (e.g., you have an & where it should not be), then this method will crash, leaving you with a parser error.
RFE to the Custom Controls Interfaces - Archive of obsolete content
value of the instance data node that the xforms element is bound to as well as getting the various states of that node nsixformsdelegate - used to obtain the nsixformsaccessors interface nsixformsuiwidget - used by the xforms processor to update the value/state of an xforms element when its bound node's value/state is changed our current mechanism that allows authors to build custom controls assumes that the controls will be bound to instance nodes of simple content type.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
summary as organizations expand product development across multiple devices and product families, integration and compatibility must be a key requirement.
Displaying a graphic with audio samples - Archive of obsolete content
zframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } // clear the canvas before drawing spectrum ctx.fillstyle = "rgb(0,0,0)"; ctx.fillrect (0,0, canvas.width, canvas.height); ctx.fillstyle = "rgb(255,255,255)"; for (var i = 0; i < signal.length; i++ )...
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
summary: an obscure bug in gecko causes list-item markers to be differently sizeed than the text of the list item, but there is a fix authors can use.
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
summary: when in quirks mode, gecko-based browsers will appear to ignore inheritance of font styles into tables from parent elements.
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
summary: thanks to long-standing limitations, we're used to thinking of hover styles as applying only to hyperlinks, which has led to some sloppy authoring practices that are now causing problems for some web sites.
Styling Abbreviations and Acronyms - Archive of obsolete content
summary: the html elements abbr and acronym are useful accessibility aids, but their styling can come as a surprise to authors.
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
(let's assume 'testplugin' as a plugin name-place holder.) compile nsitestplugin.idl with the idl compiler.
Common causes of memory leaks in extensions - Extensions
the following example shows how to unload your modules again (bootstrap.js): components.utils.import("resource://gre/modules/services.jsm"); function startup(data, reason) { // this assumes your add-on did register some chrome components.utils.import("chrome://myaddon/content/mymodule.jsm"); } function shutdown(data, reason) { // no need to do regular clean up when the application is closed // unless you need to break circular references that might negatively // impact the shutdown process.
Game distribution - Game development
summary distribution is the way to give the world access to your game.
Building up a basic demo with PlayCanvas editor - Game development
summary now you can check the playcanvas engine article if you haven't seen it yet, go back to the building up a basic demo with playcanvas page, or go back a level higher to the main 3d games on the web page.
Building up a basic demo with the PlayCanvas engine - Game development
summary now you can continue reading the playcanvas editor article, go back to the building up a basic demo with playcanvas page, or go back a level higher to the main 3d games on the web page.
Building up a basic demo with PlayCanvas - Game development
summary of course, it depends on your approach — designers may favor the online editor while programmers will prefer having the full control over the coding environment and will probably use the engine's source files.
WebVR — Virtual Reality for the Web - Game development
the future of webvr it's happening — consumer devices are reaching the market right now, and we already have javascript apis to support them on the web.
Mobile touch controls - Game development
summary that covers adding touch controls for mobile; in the next article we'll see how to add keyboard and mouse support.
Unconventional controls - Game development
summary i hope you liked the experiments — if you have any others that you think might interest other people, feel free to add details of them here.
Tiles and tilemaps overview - Game development
here are examples showing how to translate from world coordinates to screen coordinates and back again: // these functions assume that the camera points to the top left corner function worldtoscreen(x, y) { return {x: x - camera.x, y: y - camera.y}; } function screentoworld(x,y) { return {x: x + camera.x, y: y + camera.y}; } rendering a trivial method for rendering would just be to iterate over all the tiles (like in static tilemaps) and draw them, substracting the camera coordinates (like in the worldtoscreen() e...
asm.js - Game development
asm.js language summary asm.js is an intermediate programming language.
Randomizing gameplay - Game development
compare your code you can check the finished code for this lesson in the live demo below, and play with it to understand better how it works: summary you've finished all the lessons — congratulations!
Touch Event Horizon - Game development
this article is for touch event horizon and a game related to it touch gestures and events link the example game github repository live demo setting up the canvas counting the taps touchstart, touchend collecting the bonus touchmove future developments summary this tutorial shows how to use touch events to create a game on a <canvas>.
Gecko FAQ - Gecko Redirect 1
cko is expected to support the following recommended open internet standards fully except for the areas noted below and open bugs documented in bugzilla: html 4.0 - full support except for: elements: bdo, basefont attributes: shape attribute on the a element, abbr, axis, headers, scope-row, scope-col, scope-rowgroup, scope-colgroup, charoff, datasrc, datafld, dataformat, datapagesize, summary, event, dir, align on table columns, label attribute of option, alternate text of area elements, longdesc various metadata attributes: cite, datetime, lang, hreflang bidirectional text layout, which is only used in hebrew and arabic (ibm has begun work to add bidi support in a future release) style sheets css 1 - full support, except for: the application of styles ...
Plug-in Development Overview - Gecko Plugin API Reference
streams can be produced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser.
Accessibility tree (AOM) - MDN Web Docs Glossary: Definitions of Web-related terms
think checked/unchecked for checkboxes, or collapsed/expanded for the <summary> element.
Alignment container - MDN Web Docs Glossary: Definitions of Web-related terms
this is defined by the layout mode; it is usually the alignment subject’s containing block, and assumes the writing mode of the box establishing the containing block.
First contentful paint - MDN Web Docs Glossary: Definitions of Web-related terms
this is the first time users could start consuming page content.
Grid Lines - MDN Web Docs Glossary: Definitions of Web-related terms
the image below shows the line numbers of the grid, assuming the language is left-to-right.
JavaScript - MDN Web Docs Glossary: Definitions of Web-related terms
summary javascript (or "js") is a programming language used most often for dynamic client-side scripts on webpages, but it is also often used on the server-side, using a runtime such as node.js.
Latency - MDN Web Docs Glossary: Definitions of Web-related terms
latency can be a factor in any kind of data flow, but is most commonly discussed in terms of network latency (the time it takes for a packet of data to travel from source to destination) and media codec latency (the time it takes for the source data to be encoded or decoded and reach the consumer of the resulting data).
Metadata - MDN Web Docs Glossary: Definitions of Web-related terms
for example, an html document is data, but html can also contain metadata in its <head> element that describes the document — for example who wrote it, and its summary.
Packet - MDN Web Docs Glossary: Definitions of Web-related terms
when received at the destination, the checksum is recalculated, and compared with the one in the packet.
Page prediction - MDN Web Docs Glossary: Definitions of Web-related terms
although browser page prediction and prediction services enable faster page loads, they consume additional bandwidth.
Python - MDN Web Docs Glossary: Definitions of Web-related terms
it was created by guido van rossum as a successor to another language (called abc) between 1985 and 1990, and is currently used on a large array of domains like web development, desktop applications, data science, devops, and automation/productivity.
REST - MDN Web Docs Glossary: Definitions of Web-related terms
beginners can assume a rest api means an http service that can be called using standard web libraries and tools.
Recursion - MDN Web Docs Glossary: Definitions of Web-related terms
a recursive function can receive two inputs: a base case (ends recursion) or a recursive case (resumes recursion).
Responsive web design - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge summary and resources pros and cons of going responsive responsive web design ...
Semantics - MDN Web Docs Glossary: Definitions of Web-related terms
semantic elements these are some of the roughly 100 semantic elements available: <article> <aside> <details> <figcaption> <figure> <footer> <header> <main> <mark> <nav> <section> <summary> <time> learn more html element reference on mdn using html sections and outlines on mdn the meaning of semantics in computer science on wikipedia ...
Speed index - MDN Web Docs Glossary: Definitions of Web-related terms
the overall score, the above the fold metric, is a sum of the individual 10 times per second intervals of the percent of the screen that is not-visually complete.
Type - MDN Web Docs Glossary: Definitions of Web-related terms
comparison between structured types is not always an easy assumption, as even if the previous data structure is the same, there could be inherited structures inside of the prototype chain.
UDP (User Datagram Protocol) - MDN Web Docs Glossary: Definitions of Web-related terms
udp provides checksums for data integrity, and port numbers for addressing different functions at the source and destination of the datagram.
JPEG - MDN Web Docs Glossary: Definitions of Web-related terms
a discrete cosine transform expresses a finite sequence of data points in terms of a sum of cosine functions oscillating at different frequencies.
Assessment: Accessibility troubleshooting - Learn web development
the table the data table is not currently very accessible — it is hard for screenreader users to associate data rows and columns together, and the table also has no kind of summary to make it clear what it shows.
Test your skills: CSS and JavaScript accessibility - Learn web development
we'd like you to assume that the existing ruleset with the a selector is supplied by some cms, and that you can't change it — instead, you need to create new rules to make the links look and behave like links, and for the user to be able to tell where they are in the list.
Accessible multimedia - Learn web development
summary this chapter has provided a summary of accessibility concerns for multimedia content, along with some practical solutions.
Test your skills: WAI-ARIA - Learn web development
assuming you are not able to change the elements used, how can you allow screenreader users to recognize this as a list?
Advanced styling effects - Learn web development
summary we hope this article was fun — playing with shiny toys generally is, and it is always interesting to see what kinds of advanced styling tools are becoming available in modern browsers.
Backgrounds and borders - Learn web development
summary we have covered quite a lot here, and you can see that there is quite a lot to adding a background or a border to a box.
Cascade and inheritance - Learn web development
to summarize conflicting declarations will be applied in the following order, with later ones overriding earlier ones: declarations in user agent style sheets (e.g.
Handling different text directions - Learn web development
summary the concepts explained in this lesson are becoming increasingly important in css.
Flexbox - Learn web development
summary that concludes our tour of the basics of flexbox.
Beginner's guide to media queries - Learn web development
summary in this lesson you have learned about media queries, and also discovered how to use them in practice to create a mobile first responsive design.
Normal Flow - Learn web development
le (like this one containing text)</span>, or just go on to a new line if not, much like this image will do: <img src="https://udn.realityripple.com/samples/9e/6ff6af6fd4.jpg"></p> body { width: 500px; margin: 0 auto; } p { background: rgba(255,84,104,0.3); border: 2px solid rgb(255,84,104); padding: 10px; margin: 10px; } span { background: white; border: 1px solid black; } summary now that you understand normal flow, and how the browser lays things out by default, move on to understand how to change this default display to create the layout needed by your design.
Supporting older browsers - Learn web development
summary you now have the knowledge to confidently use techniques such as grid and flexbox, create fallbacks for older browsers, and make use of any new techniques that might come along in the future.
CSS first steps - Learn web development
looking at it, consuming the content.) a basic work environment set up as detailed in installing basic software, and an understanding of how to create and manage files, as detailed in dealing with files.
Fundamental text and font styling - Learn web development
summary we hoped you enjoyed playing with text in this article!
Styling links - Learn web development
summary we hope this article has provided you with all you'll need to know about links — for now!
Web fonts - Learn web development
summary now that you have worked through our articles on text styling fundamentals, it is time to test your comprehension with our assessment for the module, typesetting a community school homepage.
Learn to style HTML using CSS - Learn web development
before starting this topic, you should also be familiar with using computers and using the web passively (i.e., just looking at it, consuming the content).
What text editors are available? - Learn web development
summary a website consists mostly of text files, so for a fun, pleasant development experience you should choose your text editor wisely.
What do common web layouts contain? - Learn web development
summary there's a reason we talk about web design.
How can we design for all types of users? - Learn web development
summary when you're building a website, one top issue to consider is universal design: accommodating all users regardless of disability, technical constraints, culture, location, and so on.
How does the Internet work? - Learn web development
summary the internet is the backbone of the web, the technical infrastructure that makes the web possible.
What is the difference between webpage, website, web server, and search engine? - Learn web development
summary as with any area of knowledge, the web comes with a lot of jargon.
What are hyperlinks? - Learn web development
summary hyperlinks, usually called links, are a foundational concept behind the web.
What is a Domain Name? - Learn web development
summary domain names are a key part of the internet infrastructure.
What is a web server? - Learn web development
summary the term web server can refer to hardware or software, or both of them working together.
What is accessibility? - Learn web development
summary because of physical or technical limitations, maybe your visitors can't experience your website the way you hoped.
What software do I need to build a website? - Learn web development
summary you can download most of the programs you need for web development for free.
Basic native form controls - Learn web development
summary this article has covered the older input types — the original set introduced in the early days of html that is well supported in all browsers.
Client-side form validation - Learn web development
summary client-side form validation sometimes requires javascript if you want to customize styling and error messages, but it always requires you to think carefully about the user.
HTML forms in legacy browsers - Learn web development
to summarize, when it comes to styling form control widgets, the side effects of styling them with css can be unpredictable.
How to build custom form controls - Learn web development
.select { /* the computations are made assuming 1em == 16px which is the default value in most browsers.
How to structure a web form - Learn web development
summary you now have all the knowledge you'll need to properly structure your web forms.
Other form controls - Learn web development
summary as you'll have seen in the last few articles, there are a lot of different types of available form element.
CSS property compatibility table for form controls - Learn web development
the following compatibility tables try to summarize the state of css support for html forms.
Styling web forms - Learn web development
summary as you can see, as long as we want to build forms with just text fields and buttons, it's easy to style them using css.
UI pseudo-classes - Learn web development
summary this completes our look at ui pseudo-classes that relate to form inputs.
Your first form - Learn web development
summary congratulations, you've built your first web form.
CSS basics - Learn web development
note: the instructions above assume that you're using an image smaller than the width set on the body.
Advanced text formatting - Learn web development
summary that marks the end of our study of html text semantics.
Creating hyperlinks - Learn web development
summary that's it for links, for now anyway!
Debugging HTML - Learn web development
you will know when all your errors are fixed when you see the following banner in your output: summary so there we have it, an introduction to debugging html, which should give you some useful skills to count on when you start to debug css, javascript, and other types of code later on in your career.
Getting started with HTML - Learn web development
summary you made it to the end of the article!
HTML text fundamentals - Learn web development
summary that's it for now!
What’s in the head? Metadata in HTML - Learn web development
summary that marks the end of our quickfire tour of the html head — there's a lot more you can do in here, but an exhaustive tour would be boring and confusing at this stage, and we just wanted to give you an idea of the most common things you'll find in there for now!
Introduction to HTML - Learn web development
get started prerequisites before starting this module, you don't need any previous html knowledge, but you should have at least basic familiarity with using computers and using the web passively (i.e., just looking at it and consuming content).
Adding vector graphics to the Web - Learn web development
/ update the saved usercode every time the user updates the text area 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(); }; summary this article has provided you with a quick tour of what vector graphics and svg are, why they are useful to know about, and how to include svg inside your webpages.
Responsive images - Learn web development
summary that's a wrap for responsive images — we hope you enjoyed playing with these new techniques.
HTML table basics - Learn web development
LearnHTMLTablesBasics
summary that just about wraps up the basics of html tables.
HTML Tables - Learn web development
LearnHTMLTables
html table advanced features and accessibility this module looks at some more advanced features of html tables — such as captions/summaries and grouping your rows into table head, body and footer sections — as well as looking at the accessibility of tables for visually impaired users.
Making asynchronous programming easier with async and await - Learn web development
to actually consume the value returned when the promise fulfills, since it is returning a promise, we could use a .then() block: hello().then((value) => console.log(value)) or even just shorthand such as hello().then(console.log) like we saw in the last article.
General asynchronous programming concepts - Learn web development
in our simple-sync.html example (see it running live), we add a click event listener to a button so that when clicked, it runs a time-consuming operation (calculates 10 million dates then logs the final one to the console) and then adds a paragraph to the dom: const btn = document.queryselector('button'); btn.addeventlistener('click', () => { let mydate; for(let i = 0; i < 10000000; i++) { let date = new date(); mydate = date } console.log(mydate); let pelem = document.createelement('p'); pelem.textcontent = 'th...
Graceful asynchronous programming with Promises - Learn web development
as long as the app doesn't assume that streaming has begun, it can just keep on running.
Test your skills: Conditionals - Learn web development
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.
Client-side storage - Learn web development
summary that's it for now.
Drawing graphics - Learn web development
summary at this point, you should have a useful idea of the basics of graphics programming using canvas and webgl and what you can do with these apis, as well as a good idea of where to go for further information.
Fetching data from the server - Learn web development
summary this article shows how to start working with both xhr and fetch to fetch data from the server.
Manipulating documents - Learn web development
note: if you get really stuck, have a look at our finished shopping list (see it running live also.) summary we have reached the end of our study of document and dom manipulation.
Video and Audio APIs - Learn web development
summary i think we've taught you enough in this article.
Client-side web APIs - Learn web development
for this tutorial, we will assume that you are knowledgable about the core javascript language, and we will explore common web apis in a bit more detail.
Handling text — strings in JavaScript - Learn web development
try entering the following lines: let badstring = this is a test; let badstring = 'this is a test; let badstring = this is a test'; these lines don't work because any text without quotes around it is assumed to be a variable name, property name, a reserved word, or similar.
What went wrong? Troubleshooting JavaScript - Learn web development
summary so there we have it, the basics of figuring out errors in simple javascript programs.
JavaScript object basics - Learn web development
summary congratulations, you've reached the end of our first js objects article — you should now have a good idea of how to work with objects in javascript — including creating your own simple objects.
Working with JSON - Learn web development
summary in this article, we've given you a simple guide to using json in your programs, including how to create and parse json, and how to access data locked inside it.
Object-oriented JavaScript for beginners - Learn web development
summary this article has provided a simplified view of object-oriented theory — this isn't the whole story, but it gives you an idea of what we are dealing with here.
Object building practice - Learn web development
summary we hope you had fun writing your own real world random bouncing balls example, using various object and object-oriented techniques from throughout the module!
CSS performance optimization - Learn web development
<link rel="stylesheet" href="styles.css"> <!-- blocking --> <link rel="stylesheet" href="print.css" media="print"> <!-- not blocking --> <link rel="stylesheet" href="mobile.css" media="screen and (max-width: 480px)"> <!-- not blocking on large screens --> by default the browser assumes that each specified style sheet is render blocking.
Perceived performance - Learn web development
but, just because there's content, doesn't mean it's useful content or that the user has content to consume.
What is web performance? - Learn web development
to summarize, many features impact performance including latency, application size, the number of dom nodes, the number of resource requests made, javascript performance, cpu load, and more.
JavaScript performance - Learn web development
but javascript can also consume the main thread, the cpu, and the battery.
The "why" of web performance - Learn web development
reducing html/css/javascript and media file sizes reduces both the time to load and a site's power consumption (see performance budgets).
Client-Server Overview - Learn web development
summary at this point you should have a good overview of the operations that server-side code has to perform, and know some of the ways in which a server-side web framework can make this easier.
Introduction to the server side - Learn web development
summary congratulations, you've reached the end of the first article about server-side programming.
Server-side web frameworks - Learn web development
summary this article has shown that web frameworks can make it easier to develop and maintain server-side code.
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
summary that's enough for now.
Getting started with Ember - Learn web development
summary so far so good.
Ember interactivity: Events, classes and state - Learn web development
you should find that now the text submitted in the <input> is properly reflected in the ui: summary ok, so that's great progress for now.
Routing in Ember - Learn web development
summary congratulations!
Ember app structure and componentization - Learn web development
summary great!
Componentizing our React app - Learn web development
summary and that's it for this article — we've gone into some depth on how to break up your app nicely into components, end render them efficiently.
React interactivity: Events and state - Learn web development
summary that's enough for one article.
React interactivity: Editing, filtering, conditional rendering - Learn web development
summary so that's it — our app is now functionally complete.
Beginning our React todo list - Learn web development
summary now our todo list app actually looks a bit more like a real app!
Starting our Svelte Todo list app - Learn web development
repl to see the current state of the code in a repl, visit: https://svelte.dev/repl/c862d964d48d473ca63ab91709a0a5a0?version=3.23.2 summary with our markup and styling in place our todo list app is starting to take shape, and we have everything ready so that we can start to focus on the features we have to implement.
Componentizing our Svelte app - Learn web development
repl to see the current state of the code in a repl, visit: https://svelte.dev/repl/76cc90c43a37452e8c7f70521f88b698?version=3.23.2 summary now we have all of our app's required functionality in place.
Working with Svelte stores - Learn web development
repl to see the current state of the code in a repl, visit: https://svelte.dev/repl/378dd79e0dfe4486a8f10823f3813190?version=3.23.2 summary in this article we added two new features: an alert component and persisting todos to web storage.
Vue conditional rendering: editing existing todos - Learn web development
summary this article has been fairly intense, and we covered a lot here.
Creating our first Vue component - Learn web development
alse, type: boolean } }, data() { return { isdone: this.done, id: uniqueid('todo-') }; } }; next, bind the id to both our checkbox’s id attribute and the label’s for attribute, updating the existing id and for attributes as shown: <template> <div> <input type="checkbox" :id="id" :checked="isdone" /> <label :for="id">{{label}}</label> </div> </template> summary and that will do for this article.
Getting started with Vue - Learn web development
summary let's leave this here for now.
Adding a new todo form: Vue events, methods, and models - Learn web development
summary excellent.
Rendering a list of Vue components - Learn web development
summary and that brings us to the end of another article.
Handling common HTML and CSS problems - Learn web development
summary now you should be familiar with the main types of cross browser html and css problems that you'll meet in web development, and how to go about fixing them.
Setting up your own test automation environment - Learn web development
summary this module should have proven fun, and should have given you enough of an insight into writing and running automated tests for you to get going with writing your own automated tests.
Cross browser testing - Learn web development
introduction to automated testing manually running tests on several browsers and devices, several times per day, can get tedious and time-consuming.
Client-side tooling overview - Learn web development
summary that rounds off our gentle introduction to the topic of client-side web tooling, from a high level.
Learn web development
the aim of this area of mdn is not to take you from "beginner" to "expert" but to take you from "beginner" to "comfortable." from there, you should be able to start making your way, learning from the rest of mdn, and other intermediate to advanced resources that assume a lot of previous knowledge.
Chrome Worker Modules
is a secret"; let publickey = "this is public"; exports.key = publickey; // secretkey is not exported // publickey is exported with name "key" alternatively, if you prefer that style, you may write // variable |module| is a special global introduced by require() module.exports = { key: publickey }; once this is done, we may load the module and use the values that have been exported // assuming that mymodule.js is installed to resource://gre/modules/mymodule.js let module = require("resource://gre/modules/mymodule.js") foo(module.key); // module.key == "this is public"; // however, secretkey is not exported and cannot be used for the installation of resources, please see the documentation on moz.build (if your code is part of the platform) or on chrome manifests (if your code is pa...
Gecko info for Windows accessibility vendors
unique features role_table html: <table> dhtml: role="wairole:grid" (in this case state_focusable is set) accname is supported via <caption> first child of table or summary attribute role_columnheader xul: tree column headers html: <th> dhtml: role="wairole:colheader" role_rowheader dhtml: role="wairole:rowheader" role_column not supported.
Links and Resources
accessibility valet from webthing description and summary to be written.
Software accessibility: Where are we today?
these applications assumed that computer users could: read and react to text and images displayed on the screen.
Index
found 689 pages: # page tags and summary 1 add-ons add-ons, extension, extensions, landing, mozilla add-ons allow developers to extend and modify the functionality of firefox.
Choosing the right memory allocator
also, all consumers of the jsapi must use these routines for allocating memory they plan to pass to the javascript runtime.
Debugging OpenGL
you don't have to define more than one of these; for example, if you set moz_gl_debug_abort_on_error, the moz_gl_debug setting is assumed.
Simple Thunderbird build
assuming standard installation locations, copy these 17 files to c:\program files (x86)\windows kits\10\include\10.0.17134.0\shared.
pymake
type touch .profile using any appropriate text editor open .profile and add the following line in the file (assuming your mozilla-central is at c:/mozilla-central, if not, adjust your path accordingly.) alias pymake=c:/mozilla-central/build/pymake/make.py save your .profile edit and close the shell, then restart the shell.
Eclipse CDT
when the indexing is done, open the log using "window > show view > other > general > error log" and check the summary and look for exceptions.
Interface Compatibility
the rules which govern interface changes are different depending on the consumers and the languages involved.
Obsolete Build Caveats and Tips
note: starting in gecko 5.0, if you don't specify an application, --enable-application=browser is assumed, thereby building firefox.
mach
mach will colorize terminal output (on terminals that support it - typically most terminals except on windows) mach will scan build output for compiler warnings and will automatically record them to a database which can be queried with mach warnings-list and mach warnings-summary.
Displaying Places information using views
see querying places for information about obtaining and using nsinavhistoryresult objects, which this page assumes you are familiar with.
Error codes returned by Mozilla APIs
ns_error_port_access_not_allowed (0x804b0013) ns_error_net_reset (0x804b0014) ns_error_ftp_login (0x804b0015) ns_error_ftp_cwd (0x804b0016) ns_error_ftp_pasv (0x804b0017) ns_error_ftp_pwd (0x804b0018) ns_error_not_resumable (0x804b0019) ns_error_invalid_content_encoding (0x804b001b) the content encoding of the source document was incorrect, for example returning a plain html document advertised as content-encoding: gzip ns_error_ftp_list (0x804b001c) ns_error_unknown_host (0x804b001e) ns_error_redirect_loop (0x804b001f) ns_error_entity_changed (0x804b0020) ns_error_unknown_proxy_host (0x804...
Index
found 172 pages: # page tags and summary 1 firefox firefox, landing, mozilla here you can learn about how to contribute to the firefox project and you will also find links to information about the construction of firefox add-ons, using the developer tools in firefox, and other topics.
Frame script loading and lifetime
in fact, the message manager guarantees that loadframescript and broadcastasyncmessage are guaranteed to affect frame scripts in the order that they are called, so in this case "disable" will be received and consumed before the new frame scripts are loaded.
Storage access policy: Block cookies from trackers
network connections: tls sessions will not be resumed using a session ticket when an https connection is made to an embedded third-party resource that is classified as a tracker.
Security best practices for Firefox front-end engineers
the linter makes an exception for code that uses string literals that are hard coded in the source code, assuming benevolent developers.
Firefox and the "about" protocol
about:crashes lists all crashes, which happened during the runtime of firefox (in case the user enabled the crash reporter) about:credits lists all contributors to the firefox project about:debugging switches to the developer tools debugging page, which allows you to debug add-ons, tabs and service workers about:devtools summarizes the developer tools and provides links to documentation for each tool about:downloads displays all downloads done within firefox about:home start page of firefox when opening a new window about:license displays licensing information about:logo firefox logo about:memory provides a way to display memory usage, save it as report and ...
Firefox UI considerations for web developers
apple-touch-icon and apple-touch-icon-precomposed icons with no size attribute are assumed to be the standard classic iphone size of 57x57 pixels.
Browser API
the following new events can be listened for: mozbrowseractivitydone sent when something inside the browser <iframe> triggers a web activity, and that web activity's message is consumed by the receiving app.
ChromeWorker
summary if you're developing privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using chromeworker instead of the standard worker object.
How Mozilla determines MIME Types
this means that, for example, if mozilla encounters a <link type="text/css" rel="stylesheet" href="..."> element, a type of text/css will be assumed.
How to get a stacktrace with WinDbg
q: windbg tells me that it is unable to verify checksum for firefox.exe.
How to implement a custom autocomplete search component
* or asynchronously) of the result * * @param searchstring - the string to search for * @param searchparam - an extra parameter * @param previousresult - a previous result to use for faster searchinig * @param listener - a listener to notify when the search is complete */ startsearch: function(searchstring, searchparam, result, listener) { // this autocomplete source assumes the developer attached a json string // to the the "autocompletesearchparam" attribute or "searchparam" property // of the <textbox> element.
How to investigate Disconnect failures
from there use “signature” as summary for bugzilla bug.
IPDL Best Practices
following actor construction, the parent will send a kickoffquery message and presumably ignore the actor until it receives returnresult, at which point it will be deleted.
Introduction to Layout in Mozilla
may not be directly manipulated detailed walk-through setting up content model construction frame construction style resolution reflow painting setting up assume basic knowledge of embedding and network apis (doc shell, streams) content dll auto-registers a document loader factory (dlf) @mozilla.org/content-viewer-factory/view;1?type=text/html all mime types mapped to the same class, nscontentdlf nsdocshell receives inbound content via nsdsuricontentlistener invokes nsidlf::createinstance, passes mime type to dl...
Addon
api consumers should take care to verify the existence of these methods or properties before relying on them.
Assert.jsm
this report method only throws errors on assertion failures, as per spec, but consumers of this module (think: xpcshell-test, mochitest) may want to override this default implementation.
Dict.jsm
in firefox 19 and above, you may also pass a json string to initialize the dictionary: var somejson = '{key1: "foo", key2: {}}'; var newdict = new dict(somejson); note: any string you pass will be assumed to be json.
DownloadTarget
it currently indicates the size of the main file (such as the html document) rather than the sum of all of the files' sizes, but you must not rely upon this behavior, as it is subject to change.
OS.File for the main thread
ir) { // the path represents a directory } else { // the path represents a file, not a directory } }, function onfailure(reason) { if (reason instanceof os.file.error && reason.becausenosuchfile) { // the file does not exist } else { // some other error throw reason; } } ); example: copy a file by chunks the following snippet writes a (presumably large) buffer by chunks.
PopupNotifications.jsm
methods locationchange() the consumer can call this method to let the popup notification module know that the current browser's location has changed.
Deferred
* * @param {anything} value : this value is used to resolve the promise * if the value is a promise then the associated promise assumes the state * of promise passed as value.
Promise.jsm
it will eventually assume the same state as the provided promise.
Using JavaScript code modules
olhandler("resource") .queryinterface(components.interfaces.nsiresprotocolhandler); var aliasfile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); aliasfile.initwithpath("/some/absolute/path"); var aliasuri = services.io.newfileuri(aliasfile); resprot.setsubstitution("myalias", aliasuri); // assuming the code modules are in the alias folder itself notes custom modules and xpcom components note that prior to gecko 2.0 javascript xpcom components are loaded before chrome registration.
source-editor.jsm
mode string a string indicating the default syntax highlighting mode; by default, the content is assumed to be plain text.
Mozilla Content Localized in Your Language
localizers can assume that source content reaches 2/3 of the total available line space.
Localizing extension metadata on addons.mozilla.org
the localizable data fields of an extension are: name homepage summary description eula privacy policy version notes developer comments when you submit a new extension to amo, the process is divided into several steps.
Localizing without a specialized tool
assuming that you have installed mercurial, issue the following command: $ hg clone http://hg.mozilla.org/releases/mozilla-1.9.2 this will pull the mozilla 1.9.2 sources from the remote repository and create a mercurial clone in mozilla-1.9.2 inside your working directory.
Patching a Localization
prerequisites if you are to the point that you are patching existing localizations, we assume that you have the basic set of tools listed on the l10n prerequisites wiki page.
Setting up the infrastructure
first, make your project's file type decision (see localization formats for details): html/php .lang gettext (.po) assuming you chose gettext, you'll need to follow the steps below to set up the infrastructure for localizing your web application.
Writing localizable code
try not to assume grammar in composite strings splitting sentences into several keys often inadvertently presumes a grammar, a sentence structure, and such composite strings are often very difficult to translate.
Fonts for Mozilla 2.0's MathML engine
summation symbol) or by assembling glyphs for a few pieces of the character (e.g braces).
Mozilla MathML Project
for a quick overview, see the slides for the innovation fairs at mozilla summit 2013.
Mozilla projects on GitHub
kitsune kitsune is the platform that drives the mozilla support web site, sumo.
Mozilla Quirks Mode Behavior
maybe (firefox 3) when computing the minimum intrinsic width of an inline flow directly in a table cell (no blocks in between), it is assumed that it is not possible to break before and after an image (when otherwise it would be).
mozilla::CondVar
please see introduction_to_nspr for a high-level summary of its semantics.
mozilla::Monitor
please see introduction_to_nspr for a high-level summary of its semantics.
mozilla::Mutex
please see introduction_to_nspr for a high-level summary of its semantics.
BloatView
note that although this isn't necessarily the amount of memory consumed at any given time, it does give an indication of how much memory we're consuming.
Intel Power Gadget
specificially, the temperature is a proxy measurement that is affected by processor power consumption, rather than one that affects it, which makes it even less useful than most proxy measurements.
Leak-hunting strategies and tips
(or allocations?) all tier 1 platforms build with --enable-trace-malloc leak tools for simple objects and summary statistics tracemalloc all allocations all tier 1 platforms build with --enable-trace-malloc valgrind all allocations mac, linux build with --enable-valgrind and some other options lsan all allocations mac, linux any build apple tools ?
Memory Profiler
start - start profiling stop - stop profiling reset - clear profile data when profiler is stopped profile data is accumulated and resumed after start.
Profiling with the Gecko Profiler and Local Symbols on Windows
it looks like we consume too much memory when creating the symbol table for this to work in 32 bit firefox builds.
Refcount tracing and balancing
to aid in this process, you can create an "excludes file", that lists the name of functions that you want to exclude from the tree building process (presumably because you've matched them).
Scroll-linked effects
scroll customization: introduces a new api for content to dictate how a scroll delta is applied and consumed.
TimerFirings logging
this is useful because timer firings are a major cause of wakeups, which can cause high power consumption.
perf
for these reasons rapl is usually a better tool for measuring power consumption on linux.
Phishing: a short definition
services assuming responsibility technical solutions can be more efficient if implemented to protect millions of users automatically.
Crash reporting
finally, a set of mozilla employees have access to directly query the underlying data in either sql summary or using mapreduce on the storage cluster.
L20n HTML Bindings
consider the following source html: <p data-l10n-id="save"> <input type="submit"> <a href="/main" class="btn-cancel"></a> </p> assume the following malicious translation: <save """ <input value="save" type="text"> or <a href="http://myevilwebsite.com" onclick="alert('pwnd!')" title="back to the homepage">cancel</a>.
AsyncTestUtils extended framework
thanks to javascript enhancements available on the mozilla platform, it is possible for a function to yield control in such a way that the function stops running at the line where you use a yield statement and resumes execution on the next line when resumed.
MailNews automated testing
enhanced logging: supports generating rich json streams to disk or over the network for consumption by logsploder or other tools.
Index
found 1 pages: # page tags and summary 1 index found 1 pages: ...
Nonblocking IO In NSPR
this is not a serious constraint as one can assume that disk i/o never blocks.
Optimizing Applications For NSPR
if the spawned thread establishes and exits before the parent thread is resumed, the parent will be left with an invalid pointer to the child.
Dynamic Library Linking
this section summarizes these platform idiosyncrasies.
Monitors
when the calling thread resumes, it has the same entry count it had before the wait operation.
Named Shared Memory
no assumptions about the persistence of data in the named file should be made.
PRErrorCode
nspr assumes error numbers starting at -6000 (decimal) and progressing towards zero.
PRThreadScope
the process is assumed to be globally scheduled, but nspr can manipulate local threads without system intervention.
PR_Interrupt
it is assumed that a control point has been mutually arranged between the thread doing the interrupting and the thread being interrupted.
PR_NetAddrToString
description the network address to be converted (addr) may be either an ipv4 or ipv6 address structure, assuming that the nspr library and the host system are both configured to utilize ipv6 addressing.
PR_Now
you cannot assume that the values returned by pr_now() are monotonically increasing because the system clock of the computer may be reset.
PR_VersionCheck
compares the version of nspr assumed by the caller (the imported version) with the version being offered by the runtime (the exported version).
PR_Writev
therefore, the return value is equal to either the sum of all the buffer lengths (on success) or -1 (on failure).
Process Initialization
implicit initialization assumes that the initiator is the primordial thread and that the thread is a user thread of normal priority.
Building NSS
the file results.html summarizes the results, output.log captures all the test output.
NSS 3.16 release notes
it just verifies the signature, assuming that the certificate has been verified already.
NSS 3.19.2 release notes
consumers of nss are strongly encouraged to migrate to stronger cryptographic strengths as soon as possible.
NSS 3.22 release notes
enforce an external policy on nss from a config file (bug 1009429) you can now add a config= line to pkcs11.txt (assuming you are using sql databases), which will force nss to restrict the application to certain cryptographic algorithms and protocols.
NSS 3.24 release notes
new macros in pkcs11t.h ckm_tls12_mac in secoidt.h sec_oid_tls_ecdhe_psk - this oid governs the use of the tls_ecdhe_psk_with_aes_128_gcm_sha256 cipher suite, which is used only for session resumption in tls 1.3.
NSS 3.28 release notes
nss will now no longer assume that default signature schemes are supported by a peer if there was no commonly supported signature scheme.
NSS 3.41 release notes
367cb896198f1e3208dd926949dd8f5709a410f75b6292 bugs fixed in nss 3.41 bug 1412829, reject empty supported_signature_algorithms in certificate request in tls 1.2 bug 1485864 - cache side-channel variant of the bleichenbacher attack (cve-2018-12404) bug 1481271 - resend the same ticket in clienthello after helloretryrequest bug 1493769 - set session_id for external resumption tokens bug 1507179 - reject ccs after handshake is complete in tls 1.3 this bugzilla query returns all the bugs fixed in nss 3.41: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.41 compatibility nss 3.41 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.44 release notes
3.44 1501542 - implement checkarmsupport for android 1531244 - use __builtin_bswap64 in crypto_primitives.h 1533216 - cert_decodecertpackage() crash with netscape certificate sequences 1533616 - sdb_getattributevaluenolock should make at most one sql query, rather than one for each attribute 1531236 - provide accessor for certcertificate.dercert 1536734 - lib/freebl/crypto_primitives.c assumes a big endian machine 1532384 - in nss test certificates, use @example.com (not @bogus.com) 1538479 - post-handshake messages after async server authentication break when using record layer separation 1521578 - x25519 support in pk11pars.c 1540205 - freebl build fails with -dnss_disable_chachapoly 1532312 - post-handshake auth doesn't interoperate with openssl 1542741 - certutil -f crashes...
NSS 3.46 release notes
initialized warning in tls13esni.c bug 1561332 - ec.c:28 warning: comparison of integers of different signs: 'int' and 'unsigned long' bug 1564714 - print certutil commands during setup bug 1565013 - hacl image builder times out while fetching gpg key bug 1563786 - update hacl-star docker image to pull specific commit bug 1559012 - improve gcm perfomance using pmull2 bug 1528666 - correct resumption validation checks bug 1568803 - more tests for client certificate authentication bug 1564284 - support profile mobility across windows and linux bug 1573942 - gtest for pkcs11.txt with different breaking line formats bug 1575968 - add strsclnt option to enforce the use of either ipv4 or ipv6 bug 1549847 - fix nss builds on ios bug 1485533 - enable nss_ssl_tests on taskcluster this bu...
NSS 3.53 release notes
several root certificates in the mozilla program now set the cka_nss_server_distrust_after attribute, which nss consumers can query to further refine trust decisions.
NSS 3.54 release notes
bug 1642871 - enable ssl_sendsessionticket after resumption.
NSS API Guidelines
in short: header files for consumption outside nss start with "nss." header files with types have a trailing "t", header files with prototypes don't.
NSS Sample Code Sample1
// // the management scheme assumes that one host is primary.
NSS Sample Code sample4
nss sample code 4: pki encryption /* example code to illustrate pki crypto ops (encrypt with public key, * decrypt with private key) * * code assumes that you have set up a nss database with a certificate * and a private key.
EncDecMAC using token object - sample 3
encdecmac using token object example: <h2 id="nss_sample_code_3_hashing.">nss sample code 3: enc/dec/mac using token object id.</h2> <p class="summary">computes the hash of a file and saves it to another file, illustrates the use of nss message apis.</p> <pre class="brush: cpp"> /* this source code form is subject to the terms of the mozilla public * license, v.
NSS sources building testing
once the test suite has completed, a summary will be printed that shows the number of failures.
nss tech note2
a summary of performance data is dumped during nss shutdown.
Python binding for NSS
add certificate_summary_format_lines() utility to generate concise certificate identification info for output.
Migration to HG
however, below is a brief summary that shows how to checkout the source code and build both nspr and nss: mkdir workarea cd workarea hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss cd nss # set use_64=1 on 64 bit architectures # set build_opt=1 to get an optimized build make nss_build_all note that the jss project has been given a private copy of t...
FC_CloseAllSessions
(see pkcs #11 v2.20 section 11.17.1.) a user may call fc_closeallsessions without logging into the token (to assume the nss user role).
FC_CloseSession
a user may call fc_closesession without logging into the token (to assume the nss user role).
FC_CopyObject
a user must log into the token (to assume the nss user role) before copying a secret or private key object.
FC_CreateObject
a user must log into the token (to assume the nss user role) before calling fc_createobject.
FC_Decrypt
a user must log into the token (to assume the nss user role) before calling fc_decrypt.
FC_DecryptDigestUpdate
a user must log into the token (to assume the nss user role) before calling fc_decryptdigestupdate.
FC_DecryptFinal
a user must log into the token (to assume the nss user role) before calling fc_decryptfinal.
FC_DecryptInit
a user must log into the token (to assume the nss user role) before calling fc_decryptinit.
FC_DecryptUpdate
a user must log into the token (to assume the nss user role) before calling fc_decryptupdate.
FC_DecryptVerifyUpdate
a user must log into the token (to assume the nss user role) before calling fc_decryptverifyupdate.
FC_DeriveKey
a user must log into the token (to assume the nss user role) before calling fc_derivekey.
FC_DestroyObject
a user must log into the token (to assume the nss user role) before destroying a secret or private key object.
FC_Digest
a user may call fc_digest without logging into the token (to assume the nss user role).
FC_DigestEncryptUpdate
a user must log into the token (to assume the nss user role) before calling fc_digestencryptupdate.
FC_DigestFinal
a user may call fc_digestfinal without logging into the token (to assume the nss user role).
FC_DigestInit
a user may call fc_digestinit without logging into the token (to assume the nss user role).
FC_DigestKey
a user must log into the token (to assume the nss user role) before calling fc_digestkey.
FC_DigestUpdate
a user may call fc_digestupdate without logging into the token (to assume the nss user role).
FC_Encrypt
a user must log into the token (to assume the nss user role) before calling fc_encrypt.
FC_EncryptFinal
a user must log into the token (to assume the nss user role) before calling fc_encryptfinal.
FC_EncryptInit
a user must log into the token (to assume the nss user role) before calling fc_encryptinit.
FC_EncryptUpdate
a user must log into the token (to assume the nss user role) before calling fc_encryptupdate.
FC_FindObjectsInit
a user must log into the token (to assume the nss user role) before searching for secret or private key objects.
FC_GenerateKey
a user must log into the token (to assume the nss user role) before calling fc_generatekey.
FC_GenerateKeyPair
a user must log into the token (to assume the nss user role) before calling fc_generatekeypair.
FC_GenerateRandom
a user may call fc_generaterandom without logging into the token (to assume the nss user role).
FC_GetAttributeValue
a user must log into the token (to assume the nss user role) before getting the attribute values of a secret or private key object.
FC_GetFunctionList
a user may call fc_getfunctionlist without logging into the token (to assume the nss user role).
FC_GetInfo
a user may call fc_getinfo without logging into the token (to assume the nss user role).
FC_GetMechanismInfo
a user may call fc_getmechanisminfo without logging into the token (to assume the nss user role).
FC_GetMechanismList
a user may call fc_getmechanismlist without logging into the token (to assume the nss user role).
FC_GetObjectSize
a user must log into the token (to assume the nss user role) before getting the size of a secret or private key object.
FC_GetOperationState
therefore, a user may call fc_getoperationstate without logging into the token (to assume the nss user role).
FC_GetSlotInfo
a user may call fc_getslotinfo without logging into the token (to assume the nss user role).
FC_GetSlotList
a user may call fc_getslotlist without logging into the token (to assume the nss user role).
FC_GetTokenInfo
a user may call fc_gettokeninfo without logging into the token (to assume the nss user role).
FC_InitToken
(user certs are the certificates that have their associated private keys in the key database.) a user must be able to call fc_inittoken() without logging into the token (to assume the nss user role) because either the user's password hasn't been set yet or the user forgets the password and needs to blow away the password-encrypted private key database and start over.
FC_Initialize
summary fc_initialize - initialize the pkcs #11 library.
FC_OpenSession
(see pkcs #11 v2.20 section 11.17.1.) a user may call fc_opensession without logging into the token (to assume the nss user role).
FC_SeedRandom
a user may call fc_seedrandom() without logging into the token (to assume the nss user role).
FC_SetOperationState
therefore, a user may call fc_setoperationstate without logging into the token (to assume the nss user role).
FC_SetPIN
the user must log into the token (to assume the nss user role) before calling fc_setpin.
FC_Sign
a user must log into the token (to assume the nss user role) before calling fc_sign.
FC_SignEncryptUpdate
a user must log into the token (to assume the nss user role) before calling fc_signencryptupdate.
FC_SignFinal
a user must log into the token (to assume the nss user role) before calling fc_signfinal.
FC_SignInit
a user must log into the token (to assume the nss user role) before calling fc_signinit.
FC_SignRecover
a user must log into the token (to assume the nss user role) before calling fc_signrecover.
FC_SignRecoverInit
a user must log into the token (to assume the nss user role) before calling fc_signrecoverinit.
FC_SignUpdate
a user must log into the token (to assume the nss user role) before calling fc_signupdate.
FC_UnwrapKey
a user must log into the token (to assume the nss user role) before calling fc_unwrapkey.
FC_Verify
a user must log into the token (to assume the nss user role) before calling fc_verify.
FC_VerifyFinal
a user must log into the token (to assume the nss user role) before calling fc_verifyfinal.
FC_VerifyInit
a user must log into the token (to assume the nss user role) before calling fc_verifyinit.
FC_VerifyRecover
a user must log into the token (to assume the nss user role) before calling fc_verifyrecover.
FC_VerifyRecoverInit
a user must log into the token (to assume the nss user role) before calling fc_verifyrecoverinit.
FC_VerifyUpdate
a user must log into the token (to assume the nss user role) before calling fc_verifyupdate.
FC_WrapKey
a user must log into the token (to assume the nss user role) before calling fc_wrapkey.
NSS tools : certutil
by default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type.
NSS tools : ssltab
for example, assume your development machine is called intercept.
NSS tools : ssltap
for example, assume your development machine is called intercept.
troubleshoot.html
troubleshooting nss and jss builds newsgroup: mozilla.dev.tech.crypto this page summarizes information on troubleshooting the nss and jss build and test systems, including known problems and configuration suggestions.
gtstd.html
the instructions that follow assume you are using the certificate database tool to set up both the server and client databases for testing purposes.
NSS Tools modutil
if this attribute is omitted, a default of 777 is assumed.
NSS Tools ssltap
for example, assume your development machine is called intercept.
NSS tools : ssltap
MozillaProjectsNSStoolsssltap
for example, assume your development machine is called intercept.
Necko Architecture
to summarize, the nsiioservice creates url instances.
Necko Interfaces Overview
http) maps uri string to nsiuri instance via newuri method creates nsichannel instance from nsiuri instance via newchannel method nsistreamlistener : nsirequestobserver implemented by the consumer of a nsichannel instance passed to nsichannel::asyncopen method nsirequestobserver::onstartrequest - notifies start of async download nsistreamlistener::ondataavailable - notifies presence of downloaded data nsirequestobserver::onstoprequest - notifies completion of async download, possibly w/ error nsiloadgroup : nsirequest attribute of a nsirequest channel impl adds itself to its loa...
Necko walkthrough
nshttpconnection::activate this connection is passed the transaction nshttpconnection::onoutputstreamready nshttpconnection::onsocketwritable tries to write the request data from the current transaction (mtransaction) tells the transaction to now wait (`resumerecv) nshttpconnection::resumerecv nshttptransaction::readsegments readrequestsegment is passed to mrequeststream->readsegments - this function pointer is called and used to read the request bytes, which in turn calls ...
Small Footprint
debug information debug information in rhino classes consumes about 25% of code size and if you can live without that, you can recompile rhino to remove it.
Scripting Java
if that load fails, it assumes that java.myclass is a package name, and no error is reported: js> java.myclass [javapackage java.myclass] only if you attempt to use this object as a class will an error be reported.
Rhino shell
otherwise it is converted to string denoting the last argument and options objects assumed to be empty.
SpiderMonkey compartments
spidermonkey simply assumes that all objects referenced from outside the compartment are live, and then walks the object graph inside the compartment.
Creating JavaScript jstest reftests
performance tests or stress tests tests of spidermonkey's comformance to the ecmascript standard a brief history: in 2017, spidermonkey started comsuming test262, a comprehensive tests suite for ecmascript implementations.
GC Rooting Guide
summary use js::rooted<t> typedefs for local variables on the stack.
Hacking Tips
$ cgset -r memory.limit_in_bytes=$((512*1024*1024)) /benchmarks/mask $ cgset -r memory.memsw.limit_in_bytes=$((512*1024*1024)) /benchmarks/mask and finally, we run the program that we want to benchmark after the one which is consuming resources.
How to embed the JavaScript engine
for windows, the following steps will assume that you have installed the mozillabuild package.
Invariants
(one reason for this is that the object may have watchpoints set; the watchpoint machinery assumes that all objects with watched properties are native.
Self-hosted builtins in SpiderMonkey
this is to prevent accidentally calling content functions when assuming that content can't interfere with behavior.
Introduction to the JavaScript shell
these are summarized below.
JIT Optimization Strategies
this optimization makes the assumption that a property that has not changed after it was first assigned, is likely a constant property.
JSNewResolveOp
with only jsclass_new_resolve and no jsclass_new_resolve_gets_start, the hook can assume *objp is null on entry.
JSObjectPrincipalsFinder
description the javascript engine calls this callback to obtain principals for a jsprincipals.subsume check.
JSPrincipals
see also mxr id search for jsprincipals js_newglobalobject js_holdprincipals js_dropprincipals bug 715417 - removed getprincipalarray and globalprivilegesenabled bug 728250 - added dump method, removed codebase, destroy, and subsume properties bug 884676 - changed refcount type to mozilla::atomic ...
JSTraceOp
jstraceop implementation can assume that no other threads mutates object state.
JS_BeginRequest
any blocking native call, or lengthy computation that can race safely with the garbage collector, within a request, must be bracketed with js_suspendrequest and js_resumerequest.
JS_DeepFreezeObject
this will not recurse through non-extensible objects, on the assumption that those are already deep-frozen.
JS_DefineFunctions
normal jsapi consumers probably always want defineallproperties here.
JS_NewObject
if the parent is non-null, we assume it is part of a scope chain, walk to the end of that chain, and use the global object we find there.
JS_SetScriptStackQuota
these structures also consume heap space, so js_setthreadstacklimit does not bound their size.
JS_YieldRequest
the effect is the same as a call to js_suspendrequest immediately followed by a call to js_resumerequest.
JS_malloc
do not make assumptions based on this implementation detail.
JSAPI reference
js_beginrequest js_endrequest js_yieldrequest obsolete since jsapi 18 js_suspendrequest obsolete since jsapi 18 js_resumerequest obsolete since jsapi 18 js_getcontextthread obsolete since jsapi 8 js_setcontextthread obsolete since jsapi 8 js_clearcontextthread obsolete since jsapi 8 the following functions are always available, but in non-js_threadsafe builds, they do nothing: js_lockruntime obsolete since jsapi 12 js_unlockruntime obsolete since jsapi 12 js_lock obsolete since jsapi 12 js_unlock obsolet...
SpiderMonkey 1.8.8
you can download full source code here: insert-actual-link-when-the-release-happens (md5 checksum: insert-actual-hash-here).
SpiderMonkey 1.8
you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js-1.8.0-rc1.tar.gz (md5 checksum: eaad8815dcc66a717ddb87e9724d964e).
SpiderMonkey 17
you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/mozjs17.0.0.tar.gz (md5 checksum: 20b6f8f1140ef6e47daa3b16965c9202).
Split object
spidermonkey assumes that inner and outer objects are dangerous in two different and complementary ways.
TPS Bookmark Lists
within each folder, the second item in the list is assumed to be immediately after the first item, and so forth.
TPS Tests
phase implementation (mandatory) it's worth noting that some parts of tps assume that it can read the number off the end of the phase or profile to get to the next one, so try to stick to the convention established in the other tests.
Thread Sanitizer
manual build build prerequisites note: this section assumes you're using linux to build.
Secure Development Guidelines
rs char *ptr1 = null, *ptr2 = null; try { ptr1 = new char[1024]; do_something(); delete ptr1; do_something_else(); ptr2 = new char[-1] // oom } catch (...) { delete ptr1; delete ptr2; } new will throw an exception — ptr1 is already freed in the try block then freed again in the catch block freeing un-initialized data free data in the catch block assumption is that it’s initialized in the try block if the try block throws before the variable is initialized, the catch block will operate on un-intialized data freeing un-initialized data example: int main(){ char *ptr; try { ptr = new char[-1]; // oom } catch(...) { delete ptr; } } freeing un-initialized data: prevention be careful when freeing ...
Security and the jar protocol
prior to this change, specifying the jar: protocol caused firefox to assume that the file being retrieved is a jar file, regardless of its mime type (in other words, its mime type was assumed to be application/zip, regardless of what it actually was).
A Web PKI x509 certificate primer
assumptions: you are the domain owner of *.example.com and *.example.net.
Signing Mozilla apps for Mac OS X
once the application bundle is signed, this file will contain the hashes/checksums of all files that are included in the signature.
Gecko events
event_table_summary_changed a table's summary changed.
Gecko Roles
all objects sharing a single parent that have this attribute are assumed to be part of single mutually exclusive group.
Frecency algorithm
points for each sampled visit = (bonus / 100.0) * weight final frecency score for visited uri = ceiling(total visit count * sum of points for sampled visits / number of sampled visits) example this is an example of a frecency calculation for a uri that is bookmarked and has been visited twice recently (once yesterday, and once last week by clicking a link), and two other times more than 90 days ago: 0 default score +140 100 * (140/100.0) - first bucket weight and bookmarked bonus ...
Manipulating bookmarks using Places
var thisuri = bmsvc.getbookmarkuri(newbkmkid); assuming you've run all the code samples previous to this one, this will output "http://google.com".
Places Developer Guide
the service is uri-centric, meaning that consumers can tag uris directly, without first creating a bookmark.
Places utilities for JavaScript
bookmarks nsinavbookmarksservice history nsinavhistoryservice globalhistory nsibrowserhistory livemarks nsilivemarkservice annotations nsiannotationservice favicons nsifaviconservice microsummaries nsimicrosummaryservice tagging nsitaggingservice rdf nsirdfservice ptm nsiplacestransactionsservice clipboard nsiclipboard urifixup nsiurifixup special places these are essentially references to the id's of special folders within places.
Accessing the Windows Registry Using XPCOM
} wrk.close(); for simplicity, this example assumes the existence of the readregistryvalue() function defined above.
Aggregating the In-Memory Datasource
that is, you want to reflect the contents of something as an rdf graph (presumably so that it can be aggregated with other information or displayed as styled content).
Avoiding leaks in JavaScript XPCOM components
the requirements for such a memory allocation system are: memory should be returned to the heap when the program no longer needs it (or soon thereafter) so that the amount of memory consumed by the program does not increase.
Setting up the Gecko SDK
assuming you are using the example location for your project, these paths are the following: c:\gecko-sdk\embedstring\include c:\gecko-sdk\xpcom\include c:\gecko-sdk\nspr\include c:\gecko-sdk\string\include under the c++ language category, disable exception handling.
XPCOM hashtable guide
inserting/removing: o(n): adding and removing items from a large array can be time-consuming o(1): adding and removing items from hashtables is a quick operation wasted space: none: arrays are packed structures, so there is no wasted space.
Detailed XPCOM hashtable guide
inserting/removing: o(n): adding and removing items from a large array can be time-consuming o(1): adding and removing items from hashtables is a quick operation wasted space: none: arrays are packed structures, so there is no wasted space.
Interfacing with the XPCOM cycle collector
in general, assuming you are modifying class nsfoo with two nscomptr edges mbar and mbaz, the process can be distilled to a few simple modifications: include the header nscyclecollectionparticipant.h in both nsfoo.h and nsfoo.cpp.
Components.Exception
summary components.exception is a javascript constructor to create nsixpcexception objects.
Components.ID
summary components.id is a constructor that creates native objects that conform to the nsijsid interface.
Components.interfaces
for example, assume we have the following interface declaration: interface nsifoo : nsisupports { const pruint32 myflag = 5; }; the constant myflag can then be accessed using var myflag = components.interfaces.nsifoo.myflag; ...
Components.isSuccessCode
summary determines whether a given xpcom return code (that is, an nsresult value) indicates the success or failure of an operation, returning true or false respectively.
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
example of obtaining content principal from the window: var principal = gbrowser.selectedtab.linkedbrowser.contentprincipal; var sandbox = components.utils.sandbox(principal); expanded principal an expanded principal is specified as an array of the principals it subsumes.
Components.utils.evalInSandbox
the evaluated code is assumed to start at line 25 of the document at that url.
Components.utils.getGlobalForObject
ct whose corresponding global object is to be retrieved; non-optional, must be object-valued example var obj = {}; function foo() { } var global = this; var g1 = components.utils.getglobalforobject(foo); var g2 = components.utils.getglobalforobject(obj); // g1 === global, g2 === global, g1 === g2 // in a script in another window var global2 = this; function bar() { } var obj2 = {}; // then, assuming bar refers to the function defined in that other window: var o1 = components.utils.getglobalforobject(bar); var o2 = components.utils.getglobalforobject(obj2); // o1 === global2, o2 === global2 ...
Profiling XPCShell
a profile will look like this: file:///users/michiel/mozilla/tree1/...js/calutils.js [2,25420] createdatetime() {60-62} 579 {min 0, max 3, avg 0, sum 427, self 427} [2,56810] cp_qi() {860-866} 835 {min 0, max 1, avg 0, sum 950, self 950} the first line tells which file was profiled.
XPCShell Reference
for instance, assume that you have a file called test.js with the following contents: for (prop in arguments) { print(prop + "=" + arguments[prop]); } entering the following at the command line should produce the following output: $ xpcshell test.js this is a test 0=this 1=is 2=a 3=test xpcshell extensions once you execute xpcshell without a script you'll be at the js> command line.
nsCategoryManager
« xpcom api reference summary the xpcom category manager.
nsDirectoryService
« xpcom api reference summary the xpcom directory service.
nsLocalFile
« xpcom api reference summary a component implementing nsilocalfile.
NS_Alloc
« xpcom api reference summary infallibly allocates a block of memory using the xpcom memory manager.
NS_Free
« xpcom api reference summary frees a block of memory using the xpcom memory manager.
NS_GetComponentManager
« xpcom api reference summary the ns_getcomponentmanager function returns a reference to the xpcom component manager.
NS_GetComponentRegistrar
« xpcom api reference summary the ns_getcomponentregistrar function returns a reference to the xpcom component registrar.
NS_GetMemoryManager
« xpcom api reference summary the ns_getmemorymanager function returns a reference to the xpcom memory manager.
NS_GetServiceManager
« xpcom api reference summary the ns_getservicemanager function returns a reference to the xpcom service manager.
NS_InitXPCOM2
« xpcom api reference summary the ns_initxpcom2 function initiates use of xpcom in the calling process.
NS_InitXPCOM3
« xpcom api reference summary the ns_initxpcom3 function initiates use of xpcom in the calling process with support for statically defined xpcom modules.
NS_NewLocalFile
« xpcom api reference summary the ns_newlocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.
NS_NewNativeLocalFile
« xpcom api reference summary the ns_newnativelocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.
NS_Realloc
« xpcom api reference summary reallocates a block of memory using the xpcom memory manager.
NS_ShutdownXPCOM
« xpcom api reference summary the ns_shutdownxpcom function terminates use of xpcom in the calling process.
NS_POSTCONDITION
summary macro has the same effect as ns_assertion.
NS_PRECONDITION
summary macro has the same effect as ns_assertion.
BeginReading
« xpcom api reference summary the beginreading function returns a const pointer to the first element of the string's internal buffer.
Cut
« xpcom api reference summary the cut function removes a section of the string's internal buffer.
EndReading
« xpcom api reference summary the endreading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer.
Length
« xpcom api reference summary the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
operator=
« xpcom api reference summary this operator is a shortcut for the assign family of functions.
operator+=
« xpcom api reference summary this operator+= is a shortcut for the append family of functions.
nsACString
« xpcom api reference summary the nsacstring abstract class represents a character string composed of single-byte storage units.
BeginReading
« xpcom api reference summary the beginreading function returns a const pointer to the first element of the string's internal buffer.
Cut
« xpcom api reference summary the cut function removes a section of the string's internal buffer.
EndReading
« xpcom api reference summary the endreading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer.
Length
« xpcom api reference summary the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
operator=
« xpcom api reference summary this operator= is a shortcut for the append family of functions.
operator+=
« xpcom api reference summary this operator+= is a shortcut for the append family of functions.
nsAString
« xpcom api reference summary the nsastring abstract class represents a character string composed of double-byte storage units.
nsCOMPtr
« xpcom api reference summary this utility class simplifies managing xpcom interface references from c++ code.
get
« xpcom api reference summary the get function returns a const pointer to the string's null-terminated, internal buffer.
operator=
« xpcom api reference summary this operator is a shortcut for the inherited nsacstring::assign family of functions.
nsEmbedCString
« xpcom api reference summary the nsembedcstring concrete class provides a way to construct a nsacstring object that allocates null-terminated storage.
get
« xpcom api reference summary the get function returns a const pointer to the string's null-terminated, internal buffer.
operator=
« xpcom api reference summary this operator is a shortcut for the inherited nsastring::assign family of functions.
nsEmbedString
« xpcom api reference summary the nsembedstring concrete class provides a way to construct a nsastring object that allocates null-terminated storage.
Alloc
« xpcom api reference summary the alloc function allocates a block of memory of a particular size.
Clone
« xpcom api reference summary the clone function creates a copy of an existing memory block up to the size specified.
Free
« xpcom api reference summary the free function frees a block of memory that was allocated by xpcom's memory manager.
GetGlobalMemoryService
« xpcom api reference summary the getglobalmemoryservice function returns a reference to xpcom's global nsimemory object.
HeapMinimize
« xpcom api reference summary the heapminimize function attempts to shrink the size of the heap.
Realloc
« xpcom api reference summary the realloc function reallocates a block of memory to a new size.
nsMemory
« xpcom api reference summary the nsmemory class provides static helper routines to manage memory.
nsSupportsWeakReference
« xpcom api reference summary inherit from this c++ class to add canonical support for nsisupportsweakreference.
IAccessible2
other-licenses/ia2/accessible2.idlnot scriptable please add a summary to this article.
imgICache
image/public/imgicache.idlscriptable please add a summary to this article.
imgIEncoder
modules/libpr0n/public/imgiencoder.idlscriptable please add a summary to this article.
imgILoader
modules/libpr0n/public/imgiloader.idlscriptable please add a summary to this article.
jsdIStackFrame
js/jsd/idl/jsdidebuggerservice.idlscriptable please add a summary to this article.
mozIStorageBindingParams
storage/public/mozistoragebindingparams.idlscriptable please add a summary to this article.
mozIStorageBindingParamsArray
storage/public/mozistoragebindingparamsarray.idlscriptable please add a summary to this article.
mozIStorageCompletionCallback
storage/public/mozistoragecompletioncallback.idlscriptable please add a summary to this article.
mozIStorageError
storage/public/mozistorageerror.idlscriptable please add a summary to this article.
mozIStoragePendingStatement
storage/public/mozistoragependingstatement.idlscriptable please add a summary to this article.
mozIStorageResultSet
storage/public/mozistorageresultset.idlscriptable please add a summary to this article.
mozIStorageRow
storage/public/mozistoragerow.idlscriptable please add a summary to this article.
mozIStorageService
consumers should check mozistorageconnection.connectionready to ensure that they can use the database.
mozIStorageStatementCallback
storage/public/mozistoragestatementcallback.idlscriptable please add a summary to this article.
mozIStorageStatementWrapper
storage/public/mozistoragestatementwrapper.idlscriptable please add a summary to this article.
mozIStorageValueArray
storage/public/mozistoragevaluearray.idlscriptable please add a summary to this article.
mozITXTToHTMLConv
netwerk/streamconv/public/mozitxttohtmlconv.idlscriptable please add a summary to this article.
nsIAccessibilityService
accessible/public/nsiaccessibilityservice.idlscriptable please add a summary to this article.
Attributes
« nsiaccessible page summary attributes of accessible.
ChildCount
« nsiaccessible page summary number of accessible children.
Children
« nsiaccessible page summary array of all this node's children.
DefaultKeyBinding
« nsiaccessible page summary provides localized string of global keyboard accelerator for default action, such as ctrl+o for open file (ctrl + o).
Description
« nsiaccessible page summary accessible description -- long text associated with this node.
DoAction
« nsiaccessible page summary this method performs the accessible action at the given zero-based index.
ExtendSelection
« nsiaccessible page summary this method extends the current selection from its current accessible anchor node to this accessible.
FirstChild
« nsiaccessible page summary returns first child node in accessible tree.
FocusedChild
« nsiaccessible page summary focused accessible child of node.
GetAccessibleAbove
« nsiaccessible page summary this method returns an accessible node geometrically above this one.
GetAccessibleBelow
« nsiaccessible page summary this method returns an accessible node geometrically below this one.
GetAccessibleRelated
« nsiaccessible page summary this method returns an accessible related to this one by the given relation type.
GetAccessibleToLeft
« nsiaccessible page summary this method returns an accessible node geometrically to the left of this one.
GetAccessibleToRight
« nsiaccessible page summary this method returns an accessible node geometrically to the right of this one.
GetActionDescription
« nsiaccessible page summary this method retrieves the description (localized name) of the accessible action at the given zero-based index.
GetActionName
« nsiaccessible page summary this method retrieves the name of the accessible action at the given zero-based index.
GetBounds
« nsiaccessible page summary this method returns accessible's (x and y) coordinates relative to the screen and accessible's width and height.
GetChildAt
« nsiaccessible page summary this method returns nth accessible child using zero-based index.
GetChildAtPoint
« nsiaccessible page summary this method returns an accessible child which contains the coordinate at (x, y) in screen pixels.
GetKeyBindings
« nsiaccessible page summary this method provides array of localized string of global keyboard accelerator for the given action index supported by accessible.
GetRelation
« nsiaccessible page summary this method returns accessible relation for this accessible object by index.
GetRelations
« nsiaccessible page summary this method returns multiple accessible relations for this accessible object.
GetState
« nsiaccessible page summary this method retrieves states of the accessible.
GroupPosition
« nsiaccessible page summary this method returns grouping information.
Help
« nsiaccessible page summary help text associated with node.
IndexInParent
« nsiaccessible page summary the 0-based index of this accessible in its parent's list of children, or -1 if this accessible does not have a parent.
KeyboardShortcut
« nsiaccessible page summary provides localized string of accesskey name, such as alt+d (alt + d).
LastChild
« nsiaccessible page summary returns last child node in accessible tree.
Name
« nsiaccessible page summary accessible name -- the main text equivalent for this node.
NextSibling
« nsiaccessible page summary returns next sibling in accessible tree.
NumActions
« nsiaccessible page summary the number of accessible actions associated with this accessible.
Parent
« nsiaccessible page summary returns parent node in accessible tree.
PreviousSibling
« nsiaccessible page summary returns previous node in accessible tree.
RelationsCount
« nsiaccessible page summary returns the number of accessible relations for this object.
Role
« nsiaccessible page summary enumerated accessible role for the associated element.
SetSelected
« nsiaccessible page summary this method adds or remove this accessible to the current selection.
TakeFocus
« nsiaccessible page summary this method focuses this accessible node.
TakeSelection
« nsiaccessible page summary this method selects this accessible node only.
Value
« nsiaccessible page summary accessible value -- a number or a secondary text equivalent for this node.
nsIAccessibleCaretMoveEvent
accessible/public/nsiaccessibleevent.idlscriptable please add a summary to this article.
nsIAccessibleEvent
event_table_summary_changed 0x003e 0x003a a table's summary changed.
nsIAccessibleRole
all objects sharing a single parent that have this attribute are assumed to be part of single mutually exclusive group.
nsIAccessibleStateChangeEvent
accessible/public/nsiaccessibleevent.idlscriptable please add a summary to this article.
nsIAccessibleStates
accessible/public/nsiaccessiblestates.idlscriptable please add a summary to this article.
nsIAccessibleTableCell
accessible/public/nsiaccessibletable.idlscriptable please add a summary to this article.
nsIAccessibleTableChangeEvent
accessible/public/nsiaccessibleevent.idlscriptable please add a summary to this article.
nsIAccessibleText
accessible/public/nsiaccessibletext.idlscriptable please add a summary to this article.
nsIAccessibleTextChangeEvent
accessible/public/nsiaccessibleevent.idlscriptable please add a summary to this article.
nsIAccessibleTreeCache
accessible/public/nsiaccessibletreecache.idlnot scriptable please add a summary to this article.
nsIAccessibleValue
accessible/public/nsiaccessiblevalue.idlscriptable please add a summary to this article.
nsIAccessibleWin32Object
accessible/public/msaa/nsiaccessiblewin32object.idlscriptable please add a summary to this article.
nsIAlertsService
cookie optional a blind cookie the alert passes back to the consumer during alert listener callbacks.
nsIAnnotationObserver
toolkit/components/places/public/nsiannotationservice.idlscriptable please add a summary to this article.
nsIAsyncInputStream
xpcom/io/nsiasyncinputstream.idlscriptable please add a summary to this article.
nsIAsyncOutputStream
xpcom/io/nsiasyncoutputstream.idlscriptable please add a summary to this article.
nsIAsyncVerifyRedirectCallback
if this is ns_succeeded the redirect has been allowed by all consumers.
nsIAuthPrompt2
this way we prevent multiple dialogs shown to the user because consumer may fall back to synchronous prompt on synchronous failure of this method.
nsIAuthPromptWrapper
embedding/components/windowwatcher/public/nsiauthpromptwrapper.idlscriptable please add a summary to this article.
nsIAutoCompleteInput
consumerollupevent boolean if true, the event that rolls up the popup should be consumed by the popup itself.
nsIAutoCompleteItem
xpfe/components/autocomplete/public/nsiautocompleteresults.idlscriptable please add a summary to this article.
nsIAutoCompleteObserver
toolkit/components/autocomplete/public/nsiautocompletesearch.idlscriptable please add a summary to this article.
nsIBadCertListener2
return value the consumer shall return true if it wants to suppress the error message related to the bad cert (the connection will still get canceled).
nsIBinaryInputStream
xpcom/io/nsibinaryinputstream.idlscriptable this interface allows consumption of primitive data types from a "binary stream" containing untagged, big-endian binary data, that is as produced by an implementation of nsibinaryoutputstream.
nsIBlocklistService
xpcom/system/nsiblocklistservice.idlscriptable please add a summary to this article.
nsIBoxObject
layout/xul/base/public/nsiboxobject.idlscriptable please add a summary to this article.
nsIBrowserBoxObject
layout/xul/base/public/nsibrowserboxobject.idlscriptable please add a summary to this article.
nsIBrowserSearchService
netwerk/base/public/nsibrowsersearchservice.idlscriptable please add a summary to this article.
nsICRLManager
security/manager/ssl/public/nsicrlmanager.idlscriptable please add a summary to this article.
nsICache
netwerk/cache/public/nsicache.idlscriptable please add a summary to this article.
nsICachingChannel
netwerk/base/public/nsicachingchannel.idlscriptable please add a summary to this article.
nsICharsetResolver
intl/chardet/public/nsicharsetresolver.idlscriptable please add a summary to this article.
nsIClassInfo
reserved 1 << 31 the high order bit is reserved for consumers of these flags.
nsIClipboardOwner
widget/public/nsiclipboardowner.idlscriptable please add a summary to this article.
nsIContainerBoxObject
layout/xul/base/public/nsicontainerboxobject.idlscriptable please add a summary to this article.
nsIContentPrefService
dom/interfaces/base/nsicontentprefservice.idlscriptable please add a summary to this article.
nsIContentPrefService2
as a consumer of this interface, you might choose to let a global preference override all non- global preferences of the same name, for example, for whatever definition of "override" is appropriate for your use case.
nsICookie
netwerk/cookie/nsicookie.idlscriptable please add a summary to this article.
nsICookie2
netwerk/cookie/nsicookie2.idlscriptable please add a summary to this article.
nsICookieConsent
netwerk/cookie/public/nsicookieconsent.idlscriptable please add a summary to this article.
nsICookieManager
netwerk/cookie/nsicookiemanager.idlscriptable please add a summary to this article.
nsICookieManager2
netwerk/cookie/nsicookiemanager2.idlscriptable please add a summary to this article.
nsICookiePermission
the nsicookiepermission interface is used to test for cookie permissions netwerk/cookie/nsicookiepermission.idlscriptable please add a summary to this article.
nsICookiePromptService
extensions/cookie/nsicookiepromptservice.idlscriptable please add a summary to this article.
nsICookieStorage
modules/plugin/base/public/nsicookiestorage.idlnot scriptable please add a summary to this article.
nsICurrentCharsetListener
intl/uconv/idl/nsicurrentcharsetlistener.idlscriptable please add a summary to this article.
nsIDNSListener
netwerk/dns/nsidnslistener.idlscriptable please add a summary to this article.
nsIDNSRequest
netwerk/dns/nsidnsrequest.idlscriptable please add a summary to this article.
nsIDOMFile
content/base/public/nsidomfile.idlscriptable please add a summary to this article.
nsIDOMFileException
content/base/public/nsidomfileexception.idlscriptable please add a summary to this article.
nsIDOMFileReader
content/base/public/nsidomfilereader.idlscriptable please add a summary to this article.
nsIDOMGeoPositionCallback
dom/interfaces/geolocation/nsidomgeopositioncallback.idlscriptable please add a summary to this article.
nsIDOMGeoPositionCoords
dom/interfaces/geolocation/nsidomgeopositioncoords.idlscriptable please add a summary to this article.
nsIDOMGeoPositionError
dom/interfaces/geolocation/nsidomgeopositionerror.idlscriptable please add a summary to this article.
nsIDOMGeoPositionErrorCallback
dom/interfaces/geolocation/nsidomgeopositionerrorcallback.idlscriptable please add a summary to this article.
nsIDOMGeoPositionOptions
dom/interfaces/geolocation/nsidomgeopositionoptions.idlscriptable please add a summary to this article.
nsIDOMHTMLAudioElement
dom/interfaces/html/nsidomhtmlaudioelement.idlscriptable please add a summary to this article.
nsIDOMHTMLSourceElement
dom/interfaces/html/nsidomhtmlsourceelement.idlscriptable please add a summary to this article.
nsIDOMHTMLTimeRanges
dom/interfaces/html/nsidomhtmltimeranges.idlscriptable please add a summary to this article.
nsIDOMMozTouchEvent
dom/interfaces/events/nsidommoztouchevent.idlscriptable please add a summary to this article.
nsIDOMOfflineResourceList
dom/interfaces/offline/nsidomofflineresourcelist.idlscriptable please add a summary to this article.
nsIDOMOrientationEvent
dom/interfaces/events/nsidomorientationevent.idlscriptable please add a summary to this article.
nsIDOMSimpleGestureEvent
consumers should use event.preventdefault() to prevent default behavior when consuming events.
nsIDOMStorage2
dom/public/idl/storage/nsidomstorage2.idlscriptable please add a summary to this article.
nsIDOMXULSelectControlElement
dom/interfaces/xul/nsidomxulselectcntrlel.idlscriptable please add a summary to this article.
nsIDOMXULSelectControlItemElement
dom/interfaces/xul/nsidomxulselectcntrlitemel.idlscriptable please add a summary to this article.
nsIDebug
inherits from: nsisupports last changed in gecko 1.7 note: c/c++ consumers who are planning to use the nsidebug interface with the @mozilla.org/xpcom;1 contract should use ns_debugbreak() from xpcom glue instead, or alternatively the ns_abort, ns_assertion, ns_break, and ns_warning macros, which also call ns_debugbreak() if used in a debugging build.
nsIDialogCreator
embedding/base/nsidialogcreator.idlscriptable please add a summary to this article.
nsIDictionary
66 introduced gecko 1.0 obsolete gecko 1.9.1 inherits from: nsisummary last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) note: this interface was removed in firefox 3.5; use dict.jsm instead.
nsIDirectoryIterator
xpcom/obsolete/nsifilespec.idlscriptable please add a summary to this article.
getFiles
« xpcom api reference summary this method is called by the directory service to query an enumeration of file or directory locations.
nsIDiskCacheStreamInternal
netwerk/cache/nsidiskcachestreaminternal.idlscriptable please add a summary to this article.
nsIDispatchSupport
js/src/xpconnect/idl/nsidispatchsupport.idlnot scriptable please add a summary to this article.
nsIDownload
resumable boolean indicates if the download can be resumed after being paused or not.
nsIDownloadObserver
netwerk/base/public/nsidownloader.idlscriptable please add a summary to this article.
nsIDragDropHandler
content/base/public/nsidragdrophandler.idlscriptable please add a summary to this article.
nsIDroppedLinkHandler
dom/base/nsidroppedlinkhandler.idlscriptable please add a summary to this article.
nsIDroppedLinkItem
dom/base/nsidroppedlinkhandler.idlscriptable please add a summary to this article.
nsIEditorBoxObject
layout/xul/base/public/nsieditorboxobject.idlscriptable please add a summary to this article.
nsIEditorIMESupport
editor/idl/nsieditorimesupport.idlscriptable please add a summary to this article.
nsIEditorLogging
editor/idl/nsieditorlogging.idlscriptable please add a summary to this article.
nsIException
xpcom/base/nsiexception.idlscriptable please add a summary to this article.
nsIFTPChannel
netwerk/protocol/ftp/nsiftpchannel.idlscriptable please add a summary to this article.
nsIFaviconDataCallback
toolkit/components/places/public/nsifaviconservice.idlscriptable please add a summary to this article.
nsIFeedContainer
consumers can avoid normalization by checking the feed type and accessing specific fields.
nsIFileStreams
netwerk/base/public/nsifilestreams.idlscriptable please add a summary to this article.
nsIFocusManager
dom/interfaces/base/nsifocusmanager.idlscriptable please add a summary to this article.
nsIGSettingsCollection
xpcom/system/nsigsettingsservice.idlscriptable please add a summary to this article.
nsIGSettingsService
xpcom/system/nsigsettingsservice.idlscriptable please add a summary to this article.
nsIGlobalHistory3
this notification must be sent for history consumers for all non-redirect pages.
nsIHTMLEditor
editor/idl/nsihtmleditor.idlscriptable please add a summary to this article.
nsIHttpChannel
there are no assumptions made about the charset of the returned text.
nsIHttpChannelInternal
setcookie() helper method to set a cookie with a consumer-provided cookie header, but using the channel's other information (uri's, prompters, date headers and so on.).
nsIIFrameBoxObject
layout/xul/base/public/nsiiframeboxobject.idlscriptable please add a summary to this article.
nsIInstallLocation
any nsifile operations that assume a directory and plain files will fail in firefox 4, unless you specify <em:unpack>.
nsIJSIID
« xpcom api reference summary [scriptable, uuid(e08dcda0-d651-11d2-9843-006008962422)] interface nsijsiid : nsijsid {}; ...
nsIJumpListBuilder
widget/public/nsijumplistbuilder.idlscriptable please add a summary to this article.
nsIJumpListItem
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) note: to consumers: it's reasonable to expect we'll need support for other types of jump list items (an audio file, an email message, etc.).
nsILocalFileMac
xpcom/io/nsilocalfilemac.idlscriptable please add a summary to this article.
nsILoginInfo
toolkit/components/passwordmgr/public/nsilogininfo.idlscriptable please add a summary to this article.
nsILoginManagerCrypto
toolkit/components/passwordmgr/public/nsiloginmanagercrypto.idlscriptable please add a summary to this article.
nsILoginManagerPrompter
toolkit/components/passwordmgr/public/nsiloginmanagerprompter.idlscriptable please add a summary to this article.
nsIMacDockSupport
method summary void activateapplication(in boolean aignoreotherapplications); attributes attribute type description badgetext astring text to display in a badge on the application's dock icon.
nsIMemoryMultiReporter
attributes attribute type description explicitnonheap print64 the sum of all of this multi-reporter's measurements that have a path that starts with "explicit" and are of the kind kind_nonheap.
nsIMsgAccountManagerExtension
//github.com/realityripple/uxp/blob/master/mailnews/base/public/nsimsgaccountmanager.idlscriptable please add a summary to this article.
nsIMsgCompFields
« xpcom api reference summary the nsimsgcompfields interface provides properties for an composition of an outgoing message.
nsIMsgCustomColumnHandler
mailnews/base/public/nsimsgcustomcolumnhandler.idlscriptable please add a summary to this article.
nsIMsgDBView
this assumes that the key is somewhere in the displayed messages...
nsIMsgDBViewCommandUpdater
mailnews/base/public/nsimsgdbview.idl#349scriptable please add a summary to this article.
nsIMsgWindow
mailnews/base/public/nsimsgwindow.idlscriptable please add a summary to this article.
nsIMutableArray
inherits from: nsiarray last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) consumers of nsiarray should not queryinterface to nsimutablearray unless they own the array.
nsINavHistoryBatchCallback
toolkit/components/places/public/nsinavhistoryservice.idlscriptable please add a summary to this article.
nsINavHistoryObserver
both titles are always included in this notification, even though only one is changed each time it is called, since often consumers will want to display the user title if available, falling back to the title specified by the page's <title> element if there is no user title.
nsINetworkLinkService
if the link status is not currently known, we generally assume that it is up.
nsIPipe
this example presumes that the pipe is being filled asynchronously on some background thread.
Component; nsIPrefBranch
any consumer may hold a weak reference to it instead of a strong one.
nsIPrefBranch2
any consumer may hold a weak reference to it instead of a strong one.
nsIPrefService
note: few consumers will want to create default branch objects.
nsIPrinterEnumerator
widget/nsiprintoptions.idlscriptable please add a summary to this article.
nsIProperty
xpcom/ds/nsiproperty.idlscriptable please add a summary to this article.
nsIProxyInfo
netwerk/base/public/nsiproxyinfo.idlscriptable please add a summary to this article.
nsIRadioInterfaceLayer
speakerenabled bool constants call state constants constant value description call_state_unknown 0 call_state_dialing 1 call_state_alerting 2 call_state_busy 3 call_state_connecting 4 call_state_connected 5 call_state_holding 6 call_state_held 7 call_state_resuming 8 call_state_disconnecting 9 call_state_disconnected 10 call_state_incoming 11 datacall_state_unknown 0 datacall_state_connecting 1 datacall_state_connected 2 datacall_state_disconnecting 3 datacall_state_disconnected 4 call_state_ringing 2 obsolete since gecko 14.0 methods answercall() void answercall( in unsigned long callindex ); parameters callind...
nsISSLErrorListener
return value the consumer shall return true if it wants to suppress the error message related to the error (the connection will still get canceled).
nsIScriptableIO
network/base/public/nsiscriptableio.idlscriptable please add a summary to this article.
nsIScriptableInputStream
in particular, some bindings may convert the byte values into unicode code points, by assuming the byte values are encoded as iso-latin-1.
nsISearchEngine
netwerk/base/public/nsibrowsersearchservice.idlscriptable please add a summary to this article.
nsISearchSubmission
netwerk/base/public/nsibrowsersearchservice.idlscriptable please add a summary to this article.
nsISelection2
content/base/public/nsiselection2.idlscriptable please add a summary to this article.
nsISelection3
content/base/public/nsiselection3.idlscriptable please add a summary to this article.
nsISelectionController
content/base/public/nsiselectioncontroller.idlscriptable please add a summary to this article.
nsISelectionImageService
layout/base/nsiselectionimageservice.idlnot scriptable please add a summary to this article.
nsIServerSocket
netwerk/base/public/nsiserversocket.idlscriptable please add a summary to this article.
nsISessionStartup
resume_session 2 the previous session should be restored at startup.
nsISocketTransportService
notifywhencanattachsocket if the number of sockets reaches the limit, then consumers can be notified when the number of sockets becomes less than the limit.
nsIStackFrame
xpcom/base/nsiexception.idlscriptable please add a summary to this article.
nsIStandardURL
if null, then provide abaseuri implements this interface, the origin charset of abaseuri will be assumed, otherwise defaulting to utf-8 (that is, no charset transformation from aspec).
nsIStringEnumerator
xpcom/ds/nsistringenumerator.idlscriptable please add a summary to this article.
nsIStyleSheetService
layout/base/nsistylesheetservice.idlscriptable please add a summary to this article.
nsISupportsArray
xpcom/ds/nsisupportsarray.idlscriptable please add a summary to this article.
nsISyncJPAKE
services/crypto/component/nsisyncjpake.idlscriptable please add a summary to this article.
nsITelemetry
sum - sum of the counts array.
nsIThread
xpcom/threads/nsithread.idlscriptable please add a summary to this article.
nsIThreadEventFilter
xpcom/threads/nsithreadinternal.idlscriptable please add a summary to this article.
nsIThreadManager
xpcom/threads/nsithreadmanager.idlscriptable please add a summary to this article.
nsIThreadObserver
xpcom/threads/nsithreadinternal.idlscriptable please add a summary to this article.
nsIThreadPool
a listener will only receive notifications about threads created after the listener is set so it is recommended that the consumer set the listener before dispatching the first event.
nsIThreadPoolListener
xpcom/threads/nsithreadpool.idlscriptable please add a summary to this article.
nsITimer
xpcom/threads/nsitimer.idlscriptable please add a summary to this article.
nsITransaction
editor/txmgr/idl/nsitransaction.idlscriptable please add a summary to this article.
nsITransactionList
editor/txmgr/idl/nsitransactionlist.idlscriptable please add a summary to this article.
nsITreeBoxObject
/layout/xul/base/src/tree/public/nsitreeboxobject.idlscriptable please add a summary to this article.
nsITreeColumn
layout/xul/base/src/tree/public/nsitreecolumns.idlscriptable please add a summary to this article.
nsITreeColumns
layout/xul/base/src/tree/public/nsitreecolumns.idlscriptable please add a summary to this article.
nsITreeContentView
layout/xul/base/src/tree/public/nsitreecontentview.idlscriptable please add a summary to this article.
nsIUploadChannel
acontenttype if acontenttype is empty, the protocol will assume that no content headers are to be added to the uploaded stream and that any required headers are already encoded in the stream.
nsIUploadChannel2
netwerk/base/public/nsiuploadchannel2.idlscriptable please add a summary to this article.
nsIUserCertPicker
security/manager/ssl/public/nsiusercertpicker.idlscriptable please add a summary to this article.
nsIWeakReference
it allows a consumer to hold an indirect, non-owning reference to an xpcom object.
nsIWebNavigation
set with care, since setting incorrectly can cause us to assume that nothing was actually loaded in this object if the load ends up being handled by an external application.
nsIWebProgress
uriloader/base/nsiwebprogress.idlscriptable please add a summary to this article.
nsIWebProgressListener2
uriloader/base/nsiwebprogresslistener2.idlscriptable please add a summary to this article.
nsIWebappsSupport
toolkit/components/webapps/nsiwebappssupport.idlscriptable please add a summary to this article.
nsIWinAccessNode
accessible/public/msaa/nsiwinaccessnode.idlnot scriptable please add a summary to this article.
nsIWindowMediator
the implementation will assume a window's z level to be nsixulwindow.normalz until it has been informed of a different level.
nsIWindowsShellService
browser/components/shell/public/nsiwindowsshellservice.idlscriptable please add a summary to this article.
nsIWritablePropertyBag
xpcom/ds/nsiwritablepropertybag.idlscriptable please add a summary to this article.
nsIXFormsModelElement
though the script is assumed to have modified instance data prior to invoking recalculate, the dom mutations are not cached.
nsIXFormsNSInstanceElement
extensions/xforms/nsixformsnsinstanceelement.idlscriptable please add a summary to this article.
nsIXFormsNSModelElement
extensions/xforms/nsixformsnsmodelelement.idlscriptable please add a summary to this article.
nsIXPConnect
if this parameter is given then afilenameflags will not be calculated and will be assumed to be 0 unless another value is given.
nsIXSLTException
content/xslt/public/nsixsltexception.idlscriptable please add a summary to this article.
nsIXULTemplateQueryProcessor
as an example, if the reference aref is the variable ?count which holds the value 5, and the expression aexpr is the string '+2', the value of the variable avar would be 7, assuming the query processor considers the syntax '+2' to mean add two to the reference.
nsIXmlRpcClient
extensions/xml-rpc/idl/nsixmlrpcclient.idlscriptable please add a summary to this article.
nsIZipEntry
content/base/public/nsidomserializer.idlscriptable please add a summary to this article.
nsIZipReaderCache
modules/libjar/nsizipreader.idlscriptable please add a summary to this article.
NS_ADDREF
summary macro addrefs the argument.
NS_ASSERTION
summary macro throws an assertion failure if the first macro argument does not evaluate to true.
NS_ENSURE_ARG_POINTER
summary macro returns ns_error_invalid_pointer if the macro argument evaluates to false and shows a warning (ns_warning) in this case.
NS ENSURE SUCCESS
summary macro returns return-value if ns_failed(nsresult) evaluates to true, and shows a warning on stderr in that case.
NS ENSURE TRUE
summary macro returns return-value if expr evaluates to false.
NS_ERROR
summary macro throws a assertion (ns_assertion) with the text "error: (error text)", so writes this text to console (stderr) and to debug logs (nspr logging).
NS_IF_ADDREF
summary macro addrefs the argument, if it is non-null.
NS_IF_RELEASE
summary macro decrements the reference count of a pointer by one.
NS_RELEASE
summary macro decrements the reference count of a pointer by one.
NS_WARNING
summary macro shows a warning on the console (stderr) and in debug logs (nspr logging).
NS_CStringCloneData
« xpcom api reference summary the ns_cstringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.
NS_CStringContainerFinish
« xpcom api reference summary the ns_cstringcontainerfinish function releases any memory allocated by a nscstringcontainer instance.
NS_CStringContainerInit
« xpcom api reference summary the ns_cstringcontainerinit function initializes a nscstringcontainer instance for use as a nsacstring.
NS_CStringContainerInit2
« xpcom api reference summary the ns_cstringcontainerinit2 function initializes a nscstringcontainer instance for use as a nsacstring.
NS_CStringCopy
« xpcom api reference summary the ns_cstringcopy function copies the value from one nsacstring instance to another.
NS_CStringCutData
« xpcom api reference summary the ns_cstringcutdata function removes a section of the string's internal buffer.
NS_CStringGetData
« xpcom api reference summary the ns_cstringgetdata function gives the caller read access to the string's internal buffer.
NS_CStringGetMutableData
« xpcom api reference summary the ns_cstringgetmutabledata function gives the caller write access to the string's internal buffer.
NS_CStringToUTF16
« xpcom api reference summary the ns_cstringtoutf16 function converts the value of a nsacstring instance to utf-16 and stores the result in a nsastring instance.
NS_StringCloneData
« xpcom api reference summary the ns_stringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.
NS_StringContainerFinish
« xpcom api reference summary the ns_stringcontainerfinish function releases any memory allocated by a nsstringcontainer instance.
NS_StringContainerInit
« xpcom api reference summary the ns_stringcontainerinit function initializes a nsstringcontainer instance for use as a nsastring.
NS_StringCopy
removed by bug 1332639 « xpcom api reference summary the ns_stringcopy function copies the value from one nsastring instance to another.
NS_StringCutData
« xpcom api reference summary the ns_stringcutdata function removes a section of the string's internal buffer.
NS_StringGetData
« xpcom api reference summary the ns_stringgetdata function gives the caller access to the string's internal buffer.
NS_UTF16ToCString
« xpcom api reference summary the ns_utf16tocstring function converts the value of a nsastring instance from utf-16 to the specified multi-byte encoding and stores the result in a nsacstring instance.
nsGetModuleProc
summary this function prototype provides the xpcom entry-point into a module.
nsIAbCard/Thunderbird3
a value must be convertible to a string; if this convention is not followed, consumers of cards may fail unpredictably or return incorrect results.
nsICookie2 MOZILLA 1 8 BRANCH
netwerk/cookie/public/nsicookie2.idlscriptable please add a summary to this article.
nsMsgNavigationType
for example to move forward a message, you would call: // assuming gdbview is a global nsimsgdbview var resultid = new object(); var resultindex = new object(); var threadindex = new object(); gdbview.viewnavigate(components.interfaces.nsmsgnavigationtype.nextmessage, resultid, resultindex, threadindex, true); the nsmsgnavigationtype interface is defined as a global variable in thunderbird: var nsmsgviewcommandtype = components.interfaces.nsmsgviewcommandtype; mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
nsMsgViewCommandCheckState
mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
nsMsgViewCommandType
for example to mark a message read, you would call: // assuming gdbview is a global nsimsgdbview gdbview.docommand(components.interfaces.nsmsgviewcommandtype.markmessagesread); mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
nsMsgViewSortOrder
for example to sort by date you would pass a function the value: components.interfaces.nsmsgviewsortorder.ascending mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
nsMsgViewSortType
for example to sort by date you would pass a function the value: components.interfaces.nsmsgviewsorttype.bydate mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
nsStaticModuleInfo
summary this data structure is used by ns_initxpcom3 to specify static xpcom modules.
Storage
call mozistorageservice.backupdatabasefile() on a locked database, assuming this will leave your database locked.
Using the clipboard
we'll assume that we want to copy some text.
Weak reference
the following assumes that any nsiobserver that is passed in also implements nsisupportsweakreference.
Working with out parameters
assuming you have an object called transferable, you would invoke gettransferdata() as follows: var adata = {}; var adatalen = {}; transferable.gettransferdata("text/unicode", adata, adatalen); var data = adata.value; var datalen = adatalen.value; as you can see, after the call to gettransferdata(), the out values are then contained in the value properties of adata and adatalen.
wrappedJSObject
assuming the nsihelloworld interface defines the hello method, we can now call it: > comp.hello() hello world!
XPCOM
troubleshooting xpcom components registrationoften the first time you create an xpcom component, it may fail to register correctly.using nscomptrthis document is the sum total of everything written down about nscomptr.
Generating xpt on Windows
assuming you installed your xulrunner sdk at <mozsdkdir>, you then need to issue a command similar to c:\working-dir> <mozsdkdir>\sdk\bin\typelib.py <inputfile.idl> -o <outputfile.xpt> -i <mozsdkdir>\idl ...
pyxpidl
ked) -i add an entry to start of include path for #include "nsifoo.idl" -i (unchanged) -o specify the base name for output (-o /tmp/nsifoo for example) -o outputfile (this isn't just the base name, but needs to include the extension; for example -o /tmp/nsifoo.idl) -e specify an explicit output file name (-e /tmp/nsifoo.idl for example) n/a (this is subsumed by -o now) -d write dependencies (requires -e) -d (unchanged) -m specify output mode n/a (feature removed; use header.py or typelib.py specifically) it's worth noting that the old output mode options for generating documentation and java interfaces (-m doc and -m java) have no equivalents in pyxpidl.
Autoconfiguration in Thunderbird
it was added because we cannot assume that all big isps (including microsoft) will set up a configuration server for thunderbird.
Gloda examples
a) show all messages in a conversation regardless of the folder in which they are stored, b) search messages by subject assuming that you have a message (glodamessage) in the conversation already, this is straight forward using glodamessage.conversation.getmessagescollection() alistener = { /* called when new items are returned by the database query or freshly indexed */ onitemsadded: function _onitemsadded(aitems, acollection) { }, /* called when items that are already in our collection get re-indexed */ onitemsmodified: function _onitemsmodified(aitems, acollection) { }, /* called when item...
Mail client architecture overview
msgdb - a message database for a given folder is a summary of some of the key attributes in a folder such as the author and subject.
Mailbox
the mailbox protocol is also used to regenerate a summary file, in conjunction with nsmsgmailboxparser ...
Main Windows
i assume that customizetoolbars was originally not in the toolkit, but in firefox's chrome, or that there were some special changes wanted for thunderbird's implementation at some point.
Add Option to Context Menu
assuming this on chrome.manifest: overlay chrome://messenger/content/mailwindowoverlay.xul chrome://myext/content/thunderbird-overlay.xul add the next in thunderbird-overlay.xul.
Thunderbird developer reference docs
folder classes db views (message list) message summary database mailnews protocols mailnews filters ...
Thunderbird extensions
an overview of thunderbird components developer reference docs: folder classes db views (message list) message summary database mailnews protocols mailnews filters error reporting tools steel library (obsolete as of thunderbird 52, use https://github.com/protz/thunderbird-stdlib) developing new account types useful newsgroup discussions (anything that's very old should be regarded suspiciously, because there has been significant api rewrite over the pa...
Declaring types
the equivalent c code looks like this: typedef struct userrecord { char *name; int id; // assuming int is 32-bit here } userrecord; typedef userrecordptr *userrecord; ...
Working with ArrayBuffers
break; case 'openbsd': lib = ctypes.open('libc.so.61.0'); break; case 'android': case 'sunos': case 'netbsd': case 'dragonfly': lib = ctypes.open('libc.so'); break; case 'linux': lib = ctypes.open('libc.so.6'); break; case 'gnu/kfreebsd': lib = ctypes.open('libc.so.0.1'); break; default: //assume unix try { lib = ctypes.open(ctypes.libraryname('c')); } catch (ex) { throw new error('i dont know where to memcpy is defined on your operating system, "' + os.constants.sys.name + '"'); lib.close(); } } try { var memcpy = lib.declare('memcpy', os.constants.sys.name.tolowercase().indexof('win') == 0 ?
Working with data
note: the source c string is assumed to be utf-8, and is assumed to be null terminated.
Initialization and Destruction - Plugins
plug-ins consume no resources, other than disk space, if not referenced.
Plug-in Development Overview - Plugins
streams can be produced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser.
URLs - Plugins
the table below summarizes urls supported by gecko.
Plugin Roadmap for Firefox - Plugins
2020 in december 2020, flash support will be completely removed from consumer versions of firefox.
Ignore a source - Firefox Developer Tools
in modern web development, we often rely on libraries like jquery, ember, or angular, and 99% of the time we can safely assume that they “just work”.
Use watchpoints - Firefox Developer Tools
click play or press f8 to resume execution.
Debugger keyboard shortcuts - Firefox Developer Tools
close current file ctrl + w cmd + w ctrl + w search for a string in the current file ctrl + f cmd + f ctrl + f search for a string in all files ctrl + shift + f cmd + shift + f ctrl + shift + f find next in the current file ctrl + g cmd + g ctrl + g search for scripts by name ctrl + p cmd + p ctrl + p resume execution when at a breakpoint f8 f8 1 f8 step over f10 f10 1 f10 step into f11 f11 1 f11 step out shift + f11 shift + f11 1 shift + f11 toggle breakpoint on the currently selected line ctrl + b cmd + b ctrl + b toggle conditional breakpoint on the currently selected line ctrl + shift + b cmd + shift ...
Set event listener breakpoints - Firefox Developer Tools
in addition, you get a box overlaid on the viewport saying "paused on event breakpoint", with buttons to step over that line of code or resume execution.
UI Tour - Firefox Developer Tools
toolbar at the top of the right-hand pane, there's a toolbar: the toolbar consists of: four buttons to control the debugger's movement through the script: play/pause (f8): pauses or resumes execution of the script you're debugging.
Debugger.Script - Firefox Developer Tools
the hit method’s return value should be a resumption value, determining how execution should continue.
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
var dbg; // start measuring the selected tab's main window's memory // consumption.
All keyboard shortcuts - Firefox Developer Tools
close current file ctrl + w cmd + w ctrl + w search for a string in the current file ctrl + f cmd + f ctrl + f search for a string in all files ctrl + shift + f cmd + shift + f ctrl + shift + f find next in the current file ctrl + g cmd + g ctrl + g search for scripts by name ctrl + p cmd + p ctrl + p resume execution when at a breakpoint f8 f8 1 f8 step over f10 f10 1 f10 step into f11 f11 1 f11 step out shift + f11 shift + f11 1 shift + f11 toggle breakpoint on the currently selected line ctrl + b cmd + b ctrl + b toggle conditional breakpoint on the currently selected line ctrl + shift + b cmd + shift ...
Inspecting web sockets - Firefox Developer Tools
pausing web socket traffic you can use the pause/resume button in the network monitor toolbar to stop intercepting web socket traffic.
Performance Analysis - Firefox Developer Tools
it displays the results for each run side by side, or vertically if the browser window is narrow: the results for each run are summarised in a table and a pie chart.
Page inspector 3-pane mode - Firefox Developer Tools
feature summary from firefox 62 onwards, the page inspector has a new mode available — 3-pane mode.
Frame rate - Firefox Developer Tools
the frame rate graph is correlated with the waterfall summary directly above it, and there we can see that the first two drops in the frame rate are correlated with orange bars, which denote time spent executing javascript.
Intensive JavaScript - Firefox Developer Tools
the bottom half, which is correlated with the timeline summary in time, shows frame rate.
Tips - Firefox Developer Tools
network monitor click the request summary to compare performance of cache vs.
Console messages - Firefox Developer Tools
summary the http version, response code, and time taken to complete.
Web Console remoting - Firefox Developer Tools
conclusions as of this writing, this document is a dense summary of the work we did in bug 768096 and subsequent changes.
AbortController.abort() - Web APIs
this is able to abort fetch requests, consumption of any response body, and streams.
AbortController - Web APIs
this is able to abort fetch requests, consumption of any response body, and streams.
AbstractWorker - Web APIs
this code assumes that there's an <input> element represented by first; an event handler for the change event is established so that when the user changes the value of first, a message is posted to the worker to let it know.
Animation.play() - Web APIs
WebAPIAnimationplay
the play() method of the web animations api's animation interface starts or resumes playing of an animation.
Animation - Web APIs
WebAPIAnimation
animation.play() starts or resumes playing of an animation, or begins the animation again if it previously finished.
AnimationEvent.initAnimationEvent() - Web APIs
summary the animationevent.initanimationevent() method initializes an animation event created using the deprecated document.createevent("animationevent") method.
AnimationEvent.pseudoElement - Web APIs
summary the animationevent.pseudoelement read-only property is a domstring, starting with '::', containing the name of the pseudo-element the animation runs on.
Attr - Web APIs
WebAPIAttr
the assumption was that since you get an attr object from an element, you should already know the associated element.
AudioBuffer.copyFromChannel() - Web APIs
if not specified, a value of 0 (the beginning of the buffer) is assumed by default.
AudioContext - Web APIs
audiocontext.resume() resumes the progression of time in an audio context that has previously been suspended/paused.
AudioNode.channelInterpretation - Web APIs
the central channel (c) is summed with each lateral surround channel (sl or sr) and mixed to each lateral channel.
AudioTrack.enabled - Web APIs
note: this example assumes that there is only one of each kind of track in the video, but this is not necessarily the case.
Background Tasks API - Web APIs
example in this example, we'll take a look at how you can use requestidlecallback() to run time-consuming, low-priority tasks during time the browser would otherwise be idle.
BaseAudioContext - Web APIs
this occurs when the audiocontext's state changes, due to the calling of one of the state change methods (audiocontext.suspend, audiocontext.resume, or audiocontext.close).
Blob.text() - Web APIs
WebAPIBlobtext
the data is always presumed to be in utf-8 format.
Blob - Web APIs
WebAPIBlob
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).
Body.body - Web APIs
WebAPIBodybody
mentbyid('target'); // fetch the original image fetch('./tortoise.png') // retrieve its body as readablestream .then(response => response.body) .then(body => { const reader = body.getreader(); return new readablestream({ start(controller) { return pump(); function pump() { return reader.read().then(({ done, value }) => { // when no more data needs to be consumed, close the stream if (done) { controller.close(); return; } // enqueue the next data chunk into our target stream controller.enqueue(value); return pump(); }); } } }) }) .then(stream => new response(stream)) .then(response => response.blob()) .then(blob => url.createobjecturl(blob)) .then(url => conso...
CSSMathProduct - Web APIs
the cssmathproduct interface of the css typed object model api represents the result obtained by calling add(), sub(), or tosum() on cssnumericvalue.
CSSNumericValue.equals() - Web APIs
let cssmathsum = new cssmathsum(css.px(1), css.px(2)); let matchingcssmathsum = new cssmathsum(css.px(1), css.px(2)); // prints true console.log(cssmathsum.equals(matchingcssmathsum)); let othercssmathsum = cssmathsum(css.px(2), css.px(1)); // prints false console.log(cssmathsum.equals(othercssmathsum)); // also prints false console.log(css.cm("1").equal(css.in("0.393701"))); specifications specifi...
CSSNumericValue.mul() - Web APIs
examples let mathsum = css.px("23").mul(css.percent("4")).mul(css.cm("3")).mul(css.in("9")); // prints "calc(23px * 4% * 3cm * 9in)" console.log(mathsum.tostring()); specifications specification status comment css typed om level 1the definition of 'mul' in that specification.
CSSNumericValue.type - Web APIs
examples let mathsum = css.px("23").sub(css.percent("4")).sub(css.cm("3")).sub(css.in("9")); // returns an object with the structure: {length: 1, percenthint: "length"} let cssnumerictype = mathsum.type(); specifications specification status comment css typed om level 1the definition of 'type' in that specification.
Managing screen orientation - Web APIs
let's have an example with the following html code <ul id="toolbar"> <li>a</li> <li>b</li> <li>c</li> </ul> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
CSS Object Model (CSSOM) - Web APIs
css typed object model cssimagevalue csskeywordvalue cssmathinvert cssmathmax cssmathmin cssmathnegate cssmathproduct cssmathsum cssmathvalue cssmatrixcomponent cssnumericarray cssnumericvalue cssperspective csspositionvalue cssrotate cssscale cssskew cssskewx cssskewy cssstylevalue csstransformcomponent csstransformvalue csstranslate cssunitvalue cssunparsedvalue cssvariablereferencevalue stylepropertymap stylepropertymapreadonly obsolete cssom interfaces ...
Using the CSS properties and values API - Web APIs
when a property isn't registered, the browser doesn't know how to treat it, so it assumes that any value can be used and therefore can't animate it.
CSS Typed Object Model API - Web APIs
cssnumericvalue.tosum cssnumericvalue.type cssnumericvalue.parse - returns a number parsed from a css string csspositionvalue represents values for properties that take a position, for example object-position.
Cache.put() - Web APIs
WebAPICacheput
clone is needed because put() consumes the response body.
Cache - Web APIs
WebAPICache
// both fetch() and cache.put() "consume" the request, so we need to make a copy.
CacheStorage.match() - Web APIs
the last is necessary because put() consumes the response body.
Applying styles and colors - Web APIs
in the second gradient, we didn't assign the starting color (at position 0.0) since it wasn't strictly necessary, because it will automatically assume the color of the next color stop.
Content Index API - Web APIs
examples all the following examples assume a service worker has been registered.
Crypto.getRandomValues() - Web APIs
examples /* assuming that window.crypto.getrandomvalues is available */ var array = new uint32array(10); window.crypto.getrandomvalues(array); console.log("your lucky numbers:"); for (var i = 0; i < array.length; i++) { console.log(array[i]); } specification specification status comment web cryptography api recommendation initial definition ...
DOMPointInit.w - Web APIs
WebAPIDOMPointInitw
this value is assumed to be 1 by default if not included in the dompointinit object passed into frompoint().
DOMPointInit.y - Web APIs
WebAPIDOMPointInity
if this property is missing when the dompointinit object is passed into frompoint(), the value is assumed to be 0 by default.
DOMPointInit.z - Web APIs
WebAPIDOMPointInitz
if this property is missing when the dompointinit object is passed into frompoint(), the value is assumed to be 0 by default.
DOMPointInit - Web APIs
dompointinit.z an unrestricted floating-point value which gives the point's z-coordinate, which is (assuming no transformations that alter the situation) the depth coordinate; positive values are closer to the user and negative values retreat back into the screen.
DOMPointReadOnly.x - Web APIs
in general, positive values x mean to the right, and negative values of x means to the left, assuming no transforms have resulted in a reversal.
DOMPointReadOnly.y - Web APIs
in general, positive values of y mean downward, and negative values of y mean upward, assuming no transforms have resulted in a reversal.
DOMPointReadOnly.z - Web APIs
in general, positive values of z mean toward the user (out from the screen), and negative values of z mean away from the user (into the screen), assuming no transforms have resulted in a reversal.
DataTransfer.mozCursor - Web APIs
note: if any value other than default is set, auto is assumed.
Detecting device orientation - Web APIs
these are described in greater detail in the orientation and motion data explained article which is summarized below.
DeviceMotionEvent.accelerationIncludingGravity - Web APIs
unlike devicemotionevent.acceleration which compensates for the influence of gravity, its value is the sum of the acceleration of the device as induced by the user and the acceleration caused by gravity.
DeviceMotionEventAcceleration: x - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the x axis in a devicemotioneventacceleration object.
DeviceMotionEventAcceleration: y - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the y axis in a devicemotioneventacceleration object.
DeviceMotionEventAcceleration: z - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the z axis in a devicemotioneventacceleration object.
Document.createDocumentFragment() - Web APIs
html <ul id="ul"> </ul> javascript var element = document.getelementbyid('ul'); // assuming ul exists var fragment = document.createdocumentfragment(); var browsers = ['firefox', 'chrome', 'opera', 'safari', 'internet explorer']; browsers.foreach(function(browser) { var li = document.createelement('li'); li.textcontent = browser; fragment.appendchild(li); }); element.appendchild(fragment); result specifications specification status comment ...
Document.documentURIObject - Web APIs
syntax var uri = document.documenturiobject; example // check that the uri scheme of the current tab in firefox is 'http', // assuming this code runs in context of browser.xul let uriobj = content.document.documenturiobject; let uriport = uriobj.port; if (uriobj.schemeis('http')) { ...
Document.requestStorageAccess() - Web APIs
assuming all of the requirements above are satisfied, firefox will automatically grant storage access to the requesting origin on up to a threshold number of first-party origins in the current session for the duration of user’s session, up to a maximum of 24 hours.
DocumentOrShadowRoot.activeElement - Web APIs
lorem ipsum dolor sit amet, consectetur adipiscing elit.
Introduction to the DOM - Web APIs
const table = document.getelementbyid("table"); const tableattrs = table.attributes; // node/element interface for (let i = 0; i < tableattrs.length; i++) { // htmltableelement interface: border attribute if(tableattrs[i].nodename.tolowercase() == "border") table.border = "1"; } // htmltableelement interface: summary attribute table.summary = "note: increased border"; core interfaces in the dom this section lists some of the most commonly-used interfaces in the dom.
Element.clientLeft - Web APIs
syntax var left = element.clientleft; example padding-top lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Element.clientTop - Web APIs
WebAPIElementclientTop
padding-top lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
const name = "john"; // assuming 'el' is an html dom element el.innerhtml = name; // harmless in this case // ...
Element.runtimeStyle - Web APIs
summary element.runtimestyle is a proprietary property similar to htmlelement.style, except its styles, that have higher precedence and modification.
Element.scrollTop - Web APIs
WebAPIElementscrollTop
example padding-top if you can see this, scrolltop = 0 lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
EventTarget.removeEventListener() - Web APIs
if this parameter is absent, a default value of false is assumed.
Fetch basic concepts - Web APIs
when a request or response object is created, it has an associated headers object whose guard is set as summarized below: new object's type creating constructor guard setting of associated headers object request request() request request() with mode of no-cors request-no-cors response response() response error() or redirect() methods immutable a header's guard affects the set(), delete(), and append() methods which change ...
Using Fetch - Web APIs
the following example shows one way to do this by creating a line iterator (for simplicity, it assumes the text is utf-8, and doesn't handle fetch errors).
Using files from web applications - Web APIs
function handlefiles(files) { for (let i = 0; i < files.length; i++) { const file = files[i]; if (!file.type.startswith('image/')){ continue } const img = document.createelement("img"); img.classlist.add("obj"); img.file = file; preview.appendchild(img); // assuming that "preview" is the div output where the content will be displayed.
File.getAsBinary() - Web APIs
WebAPIFilegetAsBinary
summary the getasbinary method allows to access the file's data in raw binary format.
File.getAsDataURL() - Web APIs
WebAPIFilegetAsDataURL
summary the getasdataurl provides a data: url that encodes the entire contents of the referenced file.
File.name - Web APIs
WebAPIFilename
syntax var name = file.name; value a string, containing the name of the file without path, such as "my resume.rtf".
File.size - Web APIs
WebAPIFilesize
summary returns the size of a file in bytes.
File.type - Web APIs
WebAPIFiletype
it is assumed based on the file extension; a png image file renamed to .txt would give "text/plain" and not "image/png".
FileReader.readAsText() - Web APIs
by default, utf-8 is assumed if this parameter is not specified.
FileRequest.lockedFile - Web APIs
summary the lockedfile property represents the lockedfile object from which the request was started.
FileRequest - Web APIs
summary the filerequest interface extends the domrequest interface to provide some extra properties necessary for the lockedfile objects.
FileSystemEntry.isDirectory - Web APIs
you should not assume that any entry which isn't a directory is a file or vice-versa.
FileSystemEntry.isFile - Web APIs
you should not assume that any entry which isn't a file is a directory or vice-versa.
FileSystemEntry.toURL() - Web APIs
code that makes use of this might look like this: let img = document.createelement("img"); img.src = imagefileentry.tourl(); document.body.appendchild(img); assuming the scenario mentioned before the code, the result would be html that looks like this being appended to the end of the document: <img src="filesystem:http://my-awesome-website.woot/temporary/awesomesauce.jpg"> browser compatibility the compatibility table on this page is generated from structured data.
File and Directory Entries API support in Firefox - Web APIs
in broad strokes, those limitations can be summarized as follows: content scripts can't create file systems or initiate access to a file system.
FontFaceSet.load() - Web APIs
WebAPIFontFaceSetload
examples // returns a promise that will be fulfilled or rejected according the success to load myfont // the code in 'then' can assume the availability of that font.
Guide to the Fullscreen API - Web APIs
here is the table summarizing the prefixes and name differences between them: standard webkit (safari) / blink (chrome & opera) / edge gecko (firefox) internet explorer document.fullscreen webkitisfullscreen mozfullscreen - document.fullscreenenabled webkitfullscreenenabled mozfullscreenenabled msfullscreenenabled documentorshadowroot.fullscreenelem...
HTMLAnchorElement - Web APIs
until this discrepancy is resolved, you should still assume it is obsolete.
HTMLCollection - Web APIs
for example, assuming there is one <form> element in the document and its id is myform: var elem1, elem2; // document.forms is an htmlcollection elem1 = document.forms[0]; elem2 = document.forms.item(0); alert(elem1 === elem2); // shows: "true" elem1 = document.forms.myform; elem2 = document.forms.nameditem("myform"); alert(elem1 === elem2); // shows: "true" elem1 = document.forms["named.item.with.periods"];...
HTMLDetailsElement - Web APIs
htmldetailselement.open is a boolean reflecting the open html attribute, indicating whether or not the element’s contents (not counting the <summary>) is to be shown to the user.
HTMLFontElement.color - Web APIs
microsyntax description examples valid name color string nameofcolor (case insensitive) green green green valid hex color string in rgb format: #rrggbb #008000 rgb using decimal values rgb(x,x,x) (x in 0-255 range) rgb(0,128,0) syntax colorstring = fontobj.color; fontobj.color = colorstring; examples // assumes there is <font id="f"> element in the html var f = document.getelementbyid("f"); f.color = "green"; specifications the <font> tag is not supported in html5 and as a result neither is <font>.color.
HTMLFontElement.face - Web APIs
the format of the string must follow one of the following html microsyntax: microsyntax description examples list of one or more valid font family names a list of font names, that have to be present on the local system courier,verdana syntax facestring = fontobj.face; fontobj.face = facestring; examples // assumes there is <font id="f"> element in the html var f = document.getelementbyid("f"); f.face = "arial"; specifications the <font> tag is not supported in html5 and as a result neither is <font>.face .
HTMLFontElement.size - Web APIs
ntax description examples valid size number string integer number in the range of 1-7 6 relative size string +x or -x, where x is the number relative to the value of the size attribute of the <basefont> element (the result should be in the same range of 1-7) +2 -1 syntax sizestring = fontobj.size; fontobj.size = sizestring; examples // assumes there is <font id="f"> element in the html var f = document.getelementbyid("f"); f.size = "6"; specifications the <font> tag is not supported in html5 and as a result neither is <font>.size .
HTMLInputElement: invalid event - Web APIs
bubbles no cancelable yes interface event event handler property globaleventhandlers.oninvalid this event can be useful for displaying a summary of the problems with a form on submission.
HTMLLinkElement - Web APIs
until this discrepancy is resolved, you should still assume it is obsolete.
HTMLMediaElement.play() - Web APIs
for example, a site should not present a user interface that assumes playback has begun automatically, but should instead update their ui based on whether the returned promise is resolved or rejected.
HTMLMediaElement: timeupdate event - Web APIs
the event frequency is dependant on the system load, but will be thrown between about 4hz and 66hz (assuming the event handlers don't take longer than 250ms to run).
Option() - Web APIs
examples just add new options /* assuming we have the following html <select id='s'> </select> */ var s = document.getelementbyid('s'); var options = [four, five, six]; options.foreach(function(element,key) { s[key] = new option(element,key); }); append options with different parameters /* assuming we have the following html <select id="s"> <option>first</option> <option>second</option> <option>third</option> </s...
HTMLSelectElement - Web APIs
example get information about the selected option /* assuming we have the following html <select id='s'> <option>first</option> <option selected>second</option> <option>third</option> </select> */ var select = document.getelementbyid('s'); // return the index of the selected option console.log(select.selectedindex); // 1 // return the value of the selected option console.log(select.options[select.selectedindex].value) // second a better ...
HTMLTableElement.cellSpacing - Web APIs
any two cells are separated by the sum of the cellspacing of each of the two cells.
HTMLTextAreaElement - Web APIs
etc.&nbsp;]</p> <p><textarea name="mytxtarea" rows="10" cols="50">lorem ipsum dolor sit amet, consectetur adipiscing elit.
HTMLTimeElement.dateTime - Web APIs
pddthhmms.xs pddthhmms.xxs pddthhmms.xxxs pthhmmss pthhmms.xs pthhmms.xxs pthhmms.xxxs ww dd hh mm ss p12dt7h12m13s p12dt7h12m13.3s p12dt7h12m13.45s p12dt7h12m13.455s pt7h12m13s pt7h12m13.2s pt7h12m13.56s pt7h12m13.999s 7d 5h 24m 13s syntax datetimestring = timeelt.datetime; timeelt.datetime = datetimestring example // assumes there is <time id="t"> element in the html var t = document.getelementbyid("t"); t.datetime = "6w 5h 34m 5s"; specifications specification status comment html living standardthe definition of 'htmltimeelement' in that specification.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
program execution resumes with the next context found on the stack, which is greetuser(); this function resumes execution where it left off.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
the server will receive the json string, then will presumably decode it and process the messages it finds in the resulting array.
Drag Operations - Web APIs
this has the effect of inserting the dragged text where it was dropped, assuming that the drop target is an area of text such as a p or div element.
IDBDatabase.transaction() - Web APIs
since such catastrophic events are rare most consumers should not need to concern themselves further.
FileHandle.getFile() - Web APIs
summary the getfile method allows to retrieve a read-only snapshot of the handled file in the form of a file object.
FileHandle.name - Web APIs
summary provides the name of the file.
FileHandle.onabort - Web APIs
summary specifies an event listener to receive abort events.
FileHandle.onerror - Web APIs
summary specifies an event listener to receive error events.
FileHandle.open() - Web APIs
summary the open method returns a lockedfile object that allows to safely write in the file.
FileHandle.type - Web APIs
summary provides the mime type of the file.
IDBMutableFile - Web APIs
summary the idbmutablefile interface provides access in read or write mode to a file, dealing with all the necessary locks.
IDBTransaction - Web APIs
since such catastrophic events are rare, most consumers should not need to concern themselves further.
enabled - Web APIs
summary indicates whether or not software installation is enabled for this client machine.
install - Web APIs
summary installs one or more xpi files on the local machine.
startSoftwareUpdate - Web APIs
summary triggers the downloading and installation of the software at the specified url.
Intersection Observer API - Web APIs
it should operate as quickly as possible; if anything time-consuming needs to be done, use window.requestidlecallback().
Keyboard.lock() - Web APIs
WebAPIKeyboardlock
assuming a standard us qwerty layout, registering "keyw" ensures that "w", shift+"w", control+"w", control+shift+"w", and all other key modifier combinations with "w" are sent to the app.
KeyboardEvent.code - Web APIs
"back" updateposition(-moverate); break; case "keyw": case "arrowup": // handle "forward" updateposition(moverate); break; case "keya": case "arrowleft": // handle "turn left" angle -= turnrate; break; case "keyd": case "arrowright": // handle "turn right" angle += turnrate; break; } refresh(); // consume the event so it doesn't get handled twice event.preventdefault(); }, true); try it out to ensure that keystrokes go to the sample code, click inside the black game play field below before pressing keys.
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
for a given key press, the sequence of keyboardevents fired is as follows assuming that event.preventdefault is not called: a keydown event is first fired.
Keyboard API - Web APIs
assuming a standard united states qwerty layout, registering keyw ensures that "w", shift+"w", control+"w", control+shift+"w", and all other key modifier combinations with "w" are sent to the app.
LockedFile.abort() - Web APIs
WebAPILockedFileabort
summary the abort method is used to release the lock on the lockedfile object, making it inactive: its active property is set to false and all ongoing operations are canceled.
LockedFile.append() - Web APIs
WebAPILockedFileappend
summary the append method is used to write some data at the end of the file.
LockedFile.fileHandle - Web APIs
summary the filehandle property gives access to the filehandle object that produced the lockedfile object.
LockedFile.flush() - Web APIs
WebAPILockedFileflush
summary the flush method is used to ensure any change made to a file is properly written on disk.
LockedFile.getMetadata() - Web APIs
summary the getmetadata method allows to retrieve some metadata about the locked file.
LockedFile.location - Web APIs
summary the location property is a zero-based index representing the position of the read/write pointer within the file.
LockedFile.mode - Web APIs
WebAPILockedFilemode
summary the mode property provides the read/write status of the lockedfile file.
LockedFile.onabort - Web APIs
summary specifies an event listener to receive abort events.
LockedFile.oncomplete - Web APIs
summary specifies an event listener to receive complete events.
LockedFile.onerror - Web APIs
summary specifies an event listener to receive error events.
LockedFile.readAsArrayBuffer() - Web APIs
summary the readasarraybuffer method is used to read the content of the lockedfile object and provide the result of that reading as an arraybuffer.
LockedFile.truncate() - Web APIs
summary the truncate method is used to remove some data within the file.
LockedFile.write() - Web APIs
WebAPILockedFilewrite
summary the write method is used to write some data within the file.
LockedFile - Web APIs
summary the lockedfile interface provides tools to deal with a given file with all the necessary locks.
MediaDevices.getUserMedia() - Web APIs
if you've muted your camera (so-called "facemuting"), your camera's activity light goes out to indicate that the camera is not actively recording you, without discarding the permission to resume using the camera once muting is over.
MediaError - Web APIs
mediaerror.message a domstring object containing a human-readable string which provides specific diagnostic information to help the reader understand the error condition which occurred; specifically, it isn't simply a summary of what the error code means, but actual diagnostic information to help in understanding what exactly went wrong.
MediaRecorder.mimeType - Web APIs
mimetype: 'video/mp4; codecs="avc1.424028, mp4a.40.2"' assuming this configuration is acceptable to the user agent, the value returned later by m.mimetype would then be video/mp4; codecs="avc1.424028, mp4a.40.2".
MediaRecorder.onerror - Web APIs
invalidstateerror an attempt was made to stop or pause or an inactive recorder, start or resume an active recorder, or otherwise manipulate the mediarecorder while in the wrong state.
MediaRecorder.onpause - Web APIs
pause.onclick = function() { if(mediarecorder.state === "recording") { mediarecorder.pause(); // recording paused } else if(mediarecorder.state === "paused") { mediarecorder.resume(); // resume recording } } mediarecorder.onpause = function() { // do something in response to // recording being paused } mediarecorder.onresume = function() { // do something in response to // recording being resumed } ...
MediaRecorder.pause() - Web APIs
stop gathering data into the current blob, but keep it available so that recording can be resumed later on.
MediaRecorder.start() - Web APIs
then, each time that amount of media has been recorded, an event will be delivered to let you act upon the recorded media, while a new blob is created to record the next slice of the media assuming the mediarecorder's state is inactive, start() sets the state to recording, then begins capturing media from the input stream.
MediaRecorder.state - Web APIs
paused recording has been started, then paused, but not yet stopped or resumed.
MediaSession.playbackState - Web APIs
playback may be resumed.
MediaSession.setActionHandler() - Web APIs
play begins (or resumes) playback of the media.
Media Session action types - Web APIs
play begins (or resumes) playback of the media.
MediaSessionActionDetails.action - Web APIs
play begins (or resumes) playback of the media.
MediaSessionActionDetails - Web APIs
play begins (or resumes) playback of the media.
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.
MediaStreamTrackAudioSourceNode - Web APIs
this interface is similar to mediastreamaudiosourcenode, except it lets you specifically state the track to use, rather than assuming the first audio track on a stream.
MediaStream Image Capture API - Web APIs
the code below assumes that the first item in the mediastreamtrack array is the one to use.
MediaTrackConstraints.latency - Web APIs
in most cases, low latency is desirable for performance and user experience purposes, but when power consumption is a concern, or delays are otherwise acceptable, higher latency might be acceptable.
Transcoding assets for Media Source Extensions - Web APIs
summary with your video properly encoded and adaptive bitrate media generated, you're now ready to begin adaptive bitrate streaming on the web using dash and mse.
Media Capture and Streams API (Media Stream) - Web APIs
the output of the mediastream object is linked to a consumer.
msRealTime - Web APIs
low-latency playback is useful in communication and some gaming scenarios, but is more demanding on power consumption and less reliable for smooth media playback.
MutationObserverInit.attributes - Web APIs
if you set either attributefilter or attributeoldvalue to true, attributes is automatically assumed to be true, even if you don't expressly set it as such.
MutationObserverInit.characterData - Web APIs
if you set characterdataoldvalue to true, characterdata is automatically assumed to be true, even if you don't expressly set it as such.
MutationObserverInit.characterDataOldValue - Web APIs
if you set characterdataoldvalue to true, characterdata is automatically assumed to be true, even if you don't expressly set it as such.
NDEFRecord.data - Web APIs
WebAPINDEFRecorddata
it provides access to a raw content of the record and thus data consumer might need to decode it.
NDEFRecord.id - Web APIs
WebAPINDEFRecordid
web nfc does not sign the nfc content, thus record consumer should not make any assumptions about integrity or authenticity of the identifier or any other part of the records.
NavigatorID.userAgent - Web APIs
never assume that the value of this property will stay the same in future versions of the same browser.
Navigator.onLine - Web APIs
so while you can assume that the browser is offline when it returns a false value, you cannot assume that a true value necessarily means that the browser can access the internet.
Node.removeChild() - Web APIs
WebAPINoderemoveChild
in the second syntax form, however, there is no oldchild reference kept, so assuming your code has not kept any other reference to the node elsewhere, it will immediately become unusable and irretrievable, and will usually be automatically deleted from memory after a short time.
Node - Web APIs
WebAPINode
if callback is provided, and it returns boolean false when called, the current recursion level is aborted, and the function resumes execution at the last parent's level.
Notification.requestPermission() - Web APIs
possible values for this string are: granted denied default examples assume this basic html: <button onclick="notifyme()">notify me!</button> it's possible to send a notification as follows — here we present a fairly verbose and complete set of code you could use if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to send notifications, then request permission if required, before then sen...
Notification - Web APIs
examples assume this basic html: <button onclick="notifyme()">notify me!</button> it's possible to send a notification as follows — here we present a fairly verbose and complete set of code you could use if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to send notifications, then request permission if required, before then sen...
Using the Notifications API - Web APIs
tag example assume the following basic html: <button>notify me!</button> it's possible to handle multiple notifications this way: window.addeventlistener('load', function () { // at first, let's check if we have permission for notification // if not, let's ask for it if (window.notification && notification.permission !== "granted") { notification.requestpermission(function (status) { if (notific...
OffscreenCanvas.getContext() - Web APIs
premultipliedalpha: boolean that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha.
Page Visibility API - Web APIs
for example, if your web app is playing a video, it can pause the video when the user puts the tab into the background, and resume playback when the user returns to the tab.
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.
PaymentDetailsUpdate - Web APIs
make sure this equals the sum of all of the items in displayitems.
PaymentRequest: paymentmethodchange event - Web APIs
the code assumes the existence of a method detailsforshipping(), which returns a paymentdetailsupdate object containing the shipping options for the ground shipping method, in the form found in the paymentshippingoption dictionary.
PaymentRequestUpdateEvent.updateWith() - Web APIs
make sure this equals the sum of all of the items in displayitems.
Payment Request API - Web APIs
payment request concepts and usage many problems related to online shopping-cart abandonment can be traced to checkout forms, which can be difficult and time consuming to fill out and often require multiple steps to complete.
Performance Timeline - Web APIs
implementation status a summary of the interfaces' implementation status is provided below, including a link to more detailed information.
PointerEvent.pointerId - Web APIs
let id; // let's assume that this is a previously saved pointerid target.addeventlistener('pointerdown', function(event) { // compare previous event's id that was cached // to current event's id and handle accordingly if (id === event.pointerid) process_event(event); }, false); specifications specification status comment pointer events – level 2the definition of 'pointerid' in that s...
PositionOptions.enableHighAccuracy - Web APIs
note that this can result in slower response times or increased power consumption (with a gps chip on a mobile device for example).
PositionOptions - Web APIs
note that this can result in slower response times or increased power consumption (with a gps chip on a mobile device for example).
Web Push API Notifications best practices - Web APIs
this article provides a useful summary of best practices to keep in mind when developing web sites and applications that use push notifications for user engagement.
RTCConfiguration.bundlePolicy - Web APIs
if any other value is specified, no configuration is specified when creating the rtcpeerconnection, or if the bundlepolicy property isn't included in the rtcconfiguration object specified when creating the connection, balanced is assumed.
RTCDataChannel.negotiated - Web APIs
example the code snippet below checks the value of negotiated; if it's true, a function called shutdownremotechannel() is called with the channel's id; presumably this would be implemented to transmit a shutdown signal to the remote peer prior to terminating the connection.
RTCIceCandidatePairStats.availableIncomingBitrate - Web APIs
the higher the value, the more bandwidth you can assume is available for incoming data.
RTCIceCandidatePairStats.availableOutgoingBitrate - Web APIs
the higher the value, the more bandwidth you can assume is available for outgoing data.
RTCIceCandidateStats.address - Web APIs
otherwise, the address is presumed to be a fully-qualified domain name, which is resolved first using an aaaa record (assuming ipv6 is available), then using an a record (if no result is found or the device onlu supports ipv4).
RTCInboundRtpStreamStats.framesDecoded - Web APIs
this represents the number of frames that would have been displayed assuming no frames were skipped.
RTCInboundRtpStreamStats - Web APIs
qpsum a 64-bit value containing the sum of the qp values for every frame decoded by this rtp receiver.
RTCPeerConnection.addIceCandidate() - Web APIs
// this example assumes that the other peer is using a signaling channel as follows: // // pc.onicecandidate = event => { // if (event.candidate) { // signalingchannel.send(json.stringify({ice: event.candidate})); // "ice" is arbitrary // } else { // // all ice candidates have been sent // } // } signalingchannel.onmessage = receivedstring => { const message = json.parse(receivedstring); if (message...
RTCPeerConnection.createDataChannel() - Web APIs
examples this example shows how to create a data channel and set up handlers for the open and message events to send and receive messages on it (for brievity, the example assumes onnegotiationneeded is set up).
RTCRtpStreamStats.ssrc - Web APIs
you should not make any assumptions based on the value of ssrc other than that any two objects with the same ssrc value refer to the same source.
RTCRtpStreamStats - Web APIs
qpsum the sum of the quantization parameter (qp) values associated with every frame received to date on the video track described by this rtcrtpstreamstats object.
RTCStats.id - Web APIs
WebAPIRTCStatsid
the format of the id string is not defined by the specification, so you cannot reliably make any assumptions about the contents of the string, or assume that the format of the string will remain unchanged for a given object type.
ReadableStream.ReadableStream() - Web APIs
with this turned on, the stream implementation will automatically allocate an arraybuffer with a size of the given integer, and the consumer can also use a default reader.
ReadableStream.tee() - Web APIs
since a response body cannot be consumed more than once, you’d need two copies to do this.
ReadableStream - Web APIs
methods readablestream.cancel() cancels the stream, signaling a loss of interest in the stream by a consumer.
ReadableStreamBYOBReader.cancel() - Web APIs
the cancel() method of the readablestreambyobreader interface cancels the stream, signaling a loss of interest in the stream by a consumer.
ReadableStreamBYOBReader - Web APIs
methods readablestreambyobreader.cancel() cancels the stream, signaling a loss of interest in the stream by a consumer.
ReadableStreamDefaultReader.cancel() - Web APIs
the cancel() method of the readablestreamdefaultreader interface cancels the stream, signaling a loss of interest in the stream by a consumer.
ReadableStreamDefaultReader - Web APIs
methods readablestreamdefaultreader.cancel() cancels the stream, signaling a loss of interest in the stream by a consumer.
Selection.modify() - Web APIs
WebAPISelectionmodify
nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.</p> <label for="granularity">granularity:</label> <select id="granularity"> <option value="character">character</option> <option value="word">word</option> <option value="sentence">sentence</option> <option value="line">line</option> <option value="paragraph">paragraph</option> <option value="lineboundary">line boundary</option> <option value="sent...
Using server-sent events - Web APIs
for example, assuming the client script is on example.com: const evtsource = new eventsource("//api.example.com/ssedemo.php", { withcredentials: true } ); once you've instantiated your event source, you can begin listening for messages from the server by attaching a handler for the message event: evtsource.onmessage = function(event) { const newelement = document.createelement("li"); const eventlist = docume...
ServiceWorkerGlobalScope - Web APIs
developers should keep in mind that the serviceworker state is not persisted across the termination/restart cycle, so each event handler should assume it's being invoked with a bare, default global state.
Service Worker API - Web APIs
note: service workers win over previous attempts in this area such as; appcache because they don't make assumptions about what you are trying to do, and then break when those assumptions are not exactly right; you have granular control over everything.
SpeechSynthesis.paused - Web APIs
if utterances are then added to the utterance queue, they will not be spoken until the speechsynthesis object is unpaused, using speechsynthesis.resume().
SpeechSynthesis - Web APIs
speechsynthesis.resume() puts the speechsynthesis object into a non-paused state: resumes it if it was already paused.
Storage Access API - Web APIs
design properties unique to firefox are summarized here: if the embedded origin tracker.example has already obtained first-party storage access on the top-level origin foo.example, and the user visits a page from foo.example embedding a page from tracker.example again in less than 30 days, the embedded origin will have storage access immediately when loading.
Using writable streams - Web APIs
note: this article assumes that you understand the use cases of writable streams, and are aware of the high-level concepts.
Streams API - Web APIs
the examples are as follows: simple stream pump: this example shows how to consume a readablestream and pass its data to another.
TextEncoder.prototype.encodeInto() - Web APIs
however, in that case, it makes sense not to implement the usual multiplying by two of the already written buffer length, because in such a case if a second reallocation happened, it would always overallocate compared to the original length times three.the above advice assumes that you don't need to allocate space for a zero terminator.
Touch.clientX - Web APIs
WebAPITouchclientX
in this example, we assume the user initiates a touch on an element with an id of source, moves within the element or out of the element and then releases contact with the surface.
Touch.clientY - Web APIs
WebAPITouchclientY
in this example, we assume the user initiates a touch on an element with an id of source, moves within the element or out of the element and then releases contact with the surface.
Touch.pageX - Web APIs
WebAPITouchpageX
in following simple code snippet, we assume the user initiates one or more touch contacts on the source element, moves the touch points and then releases all contacts with the surface.
Touch.pageY - Web APIs
WebAPITouchpageY
in following simple code snippet, we assume the user initiates one or more touch contacts on the source element, moves the touch points and then releases all contacts with the surface.
Touch.radiusX - Web APIs
WebAPITouchradiusX
summary returns the x radius of the ellipse that most closely circumscribes the area of contact with the touch surface.
Touch.radiusY - Web APIs
WebAPITouchradiusY
summary returns the y radius of the ellipse that most closely circumscribes the area of contact with the touch surface.
Touch.rotationAngle - Web APIs
summary returns the rotation angle, in degrees, of the contact area ellipse defined by touch.radiusx and touch.radiusy.
Touch.screenY - Web APIs
WebAPITouchscreenY
summary returns the y coordinate of the touch point relative to the screen, not including any scroll offset.
TouchEvent.altKey - Web APIs
WebAPITouchEventaltKey
summary a boolean value indicating whether or not the alt (alternate) key is enabled when the touch event is created.
TouchEvent.ctrlKey - Web APIs
summary a boolean value indicating whether the control (control) key is enabled when the touch event is created.
TouchEvent.metaKey - Web APIs
summary a boolean value indicating whether or not the meta key is enabled when the touch event is created.
TouchEvent.shiftKey - Web APIs
summary a boolean value indicating whether or not the shift key is enabled when the touch event is created.
Supporting both TouchEvent and MouseEvent - Web APIs
consequently, even if a browser supports touch, the browser must still emulate mouse events so content that assumes mouse-only input will work as is without direct modification.
UserDataHandler - Web APIs
summary when associating user data with a key on a node, node.setuserdata() can also accept, in its third argument, a handler which will be called when the object is cloned, imported, deleted, renamed, or adopted.
Vibration API - Web APIs
ersistent vibration: var vibrateinterval; // starts vibration at passed in level function startvibrate(duration) { navigator.vibrate(duration); } // stops vibration function stopvibrate() { // clear interval and stop persistent vibrating if(vibrateinterval) clearinterval(vibrateinterval); navigator.vibrate(0); } // start persistent vibration at given duration and interval // assumes a number value is given function startpersistentvibrate(duration, interval) { vibrateinterval = setinterval(function() { startvibrate(duration); }, interval); } of course, the snippet above doesn't take into account the array method of vibration; persistent array-based vibration will require calculating the sum of the array items and creating an interval based on that number (w...
VideoPlaybackQuality.totalFrameDelay - Web APIs
the videoplaybackquality.totalframedelay read-only property returns a double containing the sum of the frame delay since the creation of the associated htmlvideoelement.
VideoPlaybackQuality - Web APIs
totalframedelay read only a double containing the sum of the frame delay since the creation of the associated htmlvideoelement.
WebGL2RenderingContext.getUniformBlockIndex() - Web APIs
examples // assuming a shader with the following declaration: // uniform ubodata { // mat4 foo; // } instancename; // use the block name, not the instance name: var blockindex = gl.getuniformblockindex(program, 'ubodata'); specifications specification status comment webgl 2.0the definition of 'getuniformblockindex' in that specification.
WebGL2RenderingContext.pauseTransformFeedback() - Web APIs
gl.resumetransformfeedback(); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'pausetransformfeedback' in that specification.
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.resumetransformfeedback() resumes a transform feedback operation.
WebGLRenderingContext.uniformMatrix[234]fv() - Web APIs
the values are assumed to be supplied in column major order.
WebGLTransformFeedback - Web APIs
bgl2renderingcontext are useful: webgl2renderingcontext.createtransformfeedback() webgl2renderingcontext.deletetransformfeedback() webgl2renderingcontext.istransformfeedback() webgl2renderingcontext.bindtransformfeedback() webgl2renderingcontext.begintransformfeedback() webgl2renderingcontext.endtransformfeedback() webgl2renderingcontext.pausetransformfeedback() webgl2renderingcontext.resumetransformfeedback() webgl2renderingcontext.transformfeedbackvaryings() webgl2renderingcontext.gettransformfeedbackvarying() examples creating a webgltransformfeedback object in this example, gl must be a webgl2renderingcontext.
Matrix math for the web - Web APIs
<div id='move-me' class='transformable'> <h2>move me with a matrix</h2> <p>lorem ipsum dolor sit amet, consectetur adipisicing elit...</p> </div> finally, for each of the examples we will generate a 4x4 matrix, then update the <div>'s style to have a transform applied to it, set to a matrix3d.
Getting started with WebGL - Web APIs
it's assumed that you already have an understanding of the mathematics involved in 3d graphics, and this article doesn't pretend to try to teach you 3d graphics concepts itself.
Using WebGL extensions - Web APIs
if you wish to work with the bleeding edge of extensions, and want to keep working on upon ratification (assuming, of course, that the extension doesn't change in incompatible ways), that you query the canonical extension name as well as the vendor extension name.
WebGL model view projection - Web APIs
it assumes a knowledge of basic matrix math using translation, scale, and rotation matrices.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
the code assumes that there's a signalingchannel class defined that is used to communicate with the signaling server.
Lifetime of a WebRTC session - Web APIs
this code should connect the tracks to its consumer, such as a <video> element.
Signaling and video calling - Web APIs
here's a summary of each of the event handlers we will be implementing: rtcpeerconnection.onicecandidate the local ice layer calls your icecandidate event handler, when it needs you to transmit an ice candidate to the other peer, through your signaling server.
WebSocket() - Web APIs
if you don't specify a protocol string, an empty string is assumed.
WebSocket.close() - Web APIs
WebAPIWebSocketclose
if this parameter is not specified, a default value of 1005 is assumed.
Writing WebSocket client applications - Web APIs
if you don't specify a protocol string, an empty string is assumed.
Using bounded reference spaces - Web APIs
this approximates human height, though it assumes we've previously transformed the coordinate system so that the value of each coordinate is no longer constrained to -1 to 1, while maintaining the definition that a value of 1 represents one meter).
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
note: most diagrams used in this article to show how the camera moves while performing standard movements was taken from an article on the filmmakeriq web site; namely, from this image which is found all over the web, however, and though we assume these are under a permissive license due to their frequent reuse, ownership is not certain.
Fundamentals of WebXR - Web APIs
assuming a person has two healthy eyes, their total field of view is about 200° to 220° wide.
Geometry and reference spaces in WebXR - Web APIs
this means that the time will usually step in 1/60th of a second intervals, assuming a 60 fps frame rate.
WebXR application life cycle - Web APIs
make sure the webxr api is available; if navigator.xr is undefined, you can assume the user's browser and/or device doesn't support webxr.
WebXR permissions and security - Web APIs
implicit user intent (implicit user consent) is assumed if either of the following scenarios is the case: the user has interacted with the document in some way which has in turn caused your request to occur.
WebXR Device API - Web APIs
the x and z components of the origin are typically presumed to be located at or near the center of the room or surface.
Basic concepts behind Web Audio API - Web APIs
the central channel (c) is summed with each lateral surround channel (sl or sr) and mixed to each lateral channel.
Migrating from webkitAudioContext - Web APIs
this article attempts to summarize the areas where developers are likely to encounter these problems and provide examples on how to port such code to standards based audiocontext, which will work across different browser engines.
Using IIR filters - Web APIs
-spacing+fontsize); // loop over our magnitude response data and plot our filter canvasctx.beginpath(); for(let i = 0; i < magresponseoutput.length; i++) { if (i === 0) { canvasctx.moveto(spacing, height-(magresponseoutput[i]*100)-spacing ); } else { canvasctx.lineto((width/totalarrayitems)*i, height-(magresponseoutput[i]*100)-spacing ); } } canvasctx.stroke(); summary that's it for our iirfilter demo.
Web audio spatialization basics - Web APIs
tion() { let direction = this.dataset.control; if (moving && moving.frameid) { window.cancelanimationframe(moving.frameid); } moving = moveboombox(direction); }, false); window.addeventlistener('mouseup', function() { if (moving && moving.frameid) { window.cancelanimationframe(moving.frameid); } }, false) }) summary hopefully, this article has given you an insight into how web audio spatialization works, and what each of the pannernode properties do (there are quite a few of them).
Web Crypto API - Web APIs
even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.
window.cancelIdleCallback() - Web APIs
summary the window.cancelidlecallback() method cancels a callback previously scheduled with window.requestidlecallback().
Window.defaultStatus - Web APIs
summary gets/sets the status bar text for the given window.
Window.directories - Web APIs
summary returned the window personalbar toolbar object.
Window.innerHeight - Web APIs
example assuming a frameset var intframeheight = window.innerheight; // or var intframeheight = self.innerheight; // will return the height of the frame viewport within the frameset var intframesetheight = parent.innerheight; // will return the height of the viewport of the closest frameset var intouterframesetheight = top.innerheight; // will return the height of the viewport of the outermost frameset f...
Window.mozInnerScreenX - Web APIs
summary gets the x coordinate of the top-left corner of the window's viewport, in screen coordinates.
Window.mozInnerScreenY - Web APIs
summary gets the y coordinate of the top-left corner of the window's viewport, in screen coordinates.
window.ondeviceorientation - Web APIs
summary an event handler for the deviceorientation event, which contains information about a relative device orientation change.
Window.ondeviceorientationabsolute - Web APIs
summary an event handler for the deviceorientationabsolute event containing information about an absolute device orientation change.
Window.ondragdrop - Web APIs
WebAPIWindowondragdrop
summary an event handler for drag and drop events sent to the window.
Window.onmozbeforepaint - Web APIs
summary an event handler for the mozbeforepaint event.
Window.orientation - Web APIs
summary returns the orientation in degrees (in 90-degree increments) of the viewport relative to the device's natural orientation.
Window.pkcs11 - Web APIs
WebAPIWindowpkcs11
summary returns the pkcs11 object, which is used to install drivers and other software associated with the pkcs11 protocol.
Window.releaseEvents() - Web APIs
summary releases the window from trapping events of a specific type.
Window.requestAnimationFrame() - Web APIs
this is a non-zero value, but you may not make any other assumptions about its value.
Window.updateCommands() - Web APIs
summary updates the state of commands of the current chrome window (ui).
WorkerGlobalScope.dump() - Web APIs
for example, on mac os x you'd run it using something like this (assuming you are inside the applications folder): ./firefox.app/contents/macos/firefox-bin -profile /tmp -no-remote now go into about:config and enable the browser.dom.window.dump.enabled pref.
WorkerGlobalScope.onclose - Web APIs
summary the onclose property of the workerglobalscope interface represents an eventhandler to be called when the close event occurs and bubbles through the worker.
HTML in XMLHttpRequest - Web APIs
also, this limitation avoids problems with legacy code that assumes that responsexml is null for http error pages (which often have a text/html response body).
XMLHttpRequest.send() - Web APIs
} } xhr.send("foo=bar&lorem=ipsum"); // xhr.send(new int8array()); // xhr.send(document); specifications specification status comment xmlhttprequestthe definition of 'send()' in that specification.
XMLHttpRequest.statusText - Web APIs
if the server response doesn't explicitly specify a status text, statustext will assume the default value "ok".
XRHandedness - Web APIs
assuming that's then valid, a function called myrenderhandobject() is called with the grip's pose and the value of handedness.
XRInputSource.handedness - Web APIs
assuming that's then valid, a function called myrenderhandobject() is called with the grip's pose and the value of handedness.
XRInputSource.targetRayMode - Web APIs
the direction is determined using platform-specific rules, though if no such rules exist, the direction is chosen by assuming the user is pointing their index finger straight out from their hand.
XRPermissionDescriptor.requiredFeatures - Web APIs
xrreferencespace usage notes examples in this example, permissions are checked to ensure that the user has granted permission for the site or app to use immersive augmented reality mode with the local-floor reference space (presumably since the user is unlikely to start to fly).
XRPermissionDescriptor - Web APIs
if the permissions api isn't available at all, this example simply assumes that webxr will report an appropriate error if permission isn't available, and tries to start up the webxr session using the same setupxr() function called by the granted case.
XRRigidTransform() - Web APIs
if this parameter is left out or is not compatible with dompointinit, the position used is assumed to be {x: 0, y: 0, z: 0, w: 1}.
XRSession.onsqueezeend - Web APIs
xrsession.onsqueezeend = event => { if (event.inputsource.handedness == user.handedness) { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace; if (user.heldobject) { cancelobjectdrag(user.heldobject); } } }; this code presumes that if the user actually intentionally completed the drag, user.heldobject will be null here.
XRSession.requestAnimationFrame() - Web APIs
} // assumed to be called by a user gesture event elsewhere in code.
XRSession: selectend event - Web APIs
the mybegintracking() function would presumably start the presentation of the object-dragging process, using the transform to perform a hit test, determining which object to pick up.
XRSession: selectstart event - Web APIs
the mybegintracking() function would presumably start the presentation of the object-dragging process, using the transform to perform a hit test, determining which object to pick up.
XRSession: squeezeend event - Web APIs
the mybegintracking() function would presumably start the presentation of the object-dragging process, using the transform to perform a hit test, determining which object to pick up.
XRSession: squeezestart event - Web APIs
the mybegintracking() function would presumably start the presentation of the object-dragging process, using the transform to perform a hit test, determining which object to pick up.
XRTargetRayMode - Web APIs
the direction is determined using platform-specific rules, though if no such rules exist, the direction is chosen by assuming the user is pointing their index finger straight out from their hand.
XRWebGLLayer.framebuffer - Web APIs
the xr compositor assumes that opaque framebuffers use colors with premultiplied allpha, regardless of whether or not the webgl context's premultipliedalpha context attribute is set.
Web APIs
WebAPI
bluetoothremotegattcharacteristic bluetoothremotegattdescriptor bluetoothremotegattserver bluetoothremotegattservice body broadcastchannel budgetservice budgetstate buffersource bytelengthqueuingstrategy bytestring c cdatasection css cssconditionrule csscounterstylerule cssgroupingrule cssimagevalue csskeyframerule csskeyframesrule csskeywordvalue cssmathproduct cssmathsum cssmathvalue cssmediarule cssnamespacerule cssnumericvalue cssomstring csspagerule csspositionvalue cssprimitivevalue csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule cssstylesheet cssstylevalue csssupportsrule cssunitvalue cssunparsedvalue cssvalue cssvaluelist cssvariablereferencevalue cache cachestorage canvascapturemediastreamtrack canvasgrad...
Using the group role - Accessibility
the group role is used to identify a set of user interface objects which, in contrast with a region, are not intended to be included in a table of contents or a page summary (such as the structures that are dynamically created by a script or assistive technologies); a group should not be considered a major perceivable section on a page.
ARIA annotations - Accessibility
as an example, let’s say you have a poll/voting ui widget that shows numbers of votes, but you want to summarize the purpose of the widget in a clear description because the ui does not make it clear: <section aria-description="choose your favourite fruit — the fruit with the highest number of votes will be added to the lunch options next week."> <p>pick your favourite fruit:</p> <form> <ul> <li><label>apple: <input type="radio" name="fruit" value="apple"></label></li> <li><labe...
How to file ARIA-related bugs - Accessibility
ari file webkit.org bugs google chrome file chromium bugs microsoft internet explorer file ie bugs microsoft edge file ms edge bugs view existing ms edge aria bugs mozilla firefox file firefox bugs use component: disability access apis opera file opera bugs use [aria] in the summary field js libraries dojo toolkit file dojo bug put accessibility in the component field yahoo user interface file yui bugs file against specific component in category combobox and include aria in summary field ...
ARIA: figure role - Accessibility
description any content that should be grouped together and consumed as a figure (which could include images, video, audio, code snippets, or other content) can be identified as a figure using role="figure".
ARIA: Region role - Accessibility
the region role should be reserved for sections of content sufficiently important that users will likely want to navigate to the section easily and to have it listed in a summary of the page.
ARIA: img role - Accessibility
<div role="img" aria-label="description of the overall image"> <img src="graphic1.png" alt=""> <img src="graphic2.png"> </div> description any set of content that should be consumed as a single image (which could include images, video, audio, code snippets, emojis, or other content) can be identified using role="img".
ARIA - Accessibility
using aria live regions to announce content changes a quick summary of live regions, by the makers of jaws screen reader software.
An overview of accessible web applications and widgets - Accessibility
here's a summary of how keyboard navigation should work in an aria-enabled web application: the tab key should provide focus to the widget as a whole.
Architecture - Accessibility
consumers can use this interface to determine the position of the object in the parent's text.
HTML To MSAA - Accessibility
ate_system_ multiselectable if multiselectable n/a n/a n/a select @size = 1 role_system_ combobox n/a name of focused option state_system_ expanded if combobox open state_system_ collapsed if combobox is collapsed state_system_ haspopup state_system_ focusable n/a "open"/"close" depending on state event_object_ valuechange when selected option is changed table role_system_ table from @summary attribute n/a described_by (0x100e) points to caption element n/a n/a td, th role_system_ cell n/a n/a n/a n/a n/a n/a thead role_system_ columnheader n/a n/a n/a n/a n/a n/a abbr, acronym, blockquote, form, frame, h1-h6, iframe bstr role n/a n/a n/a n/a n/a n/a ...
Accessibility Information for Web Authors - Accessibility
accessibility valet from webthing description and summary to be written.
Perceivable - Accessibility
guideline 1.3 — create content that can be presented in different ways this guideline refers to the ability of content to be consumed by users in multiple ways, accomodating their differing needs.
Understanding the Web Content Accessibility Guidelines - Accessibility
for this reason, we have summarised the practical steps you need to take to satisfy the different recommendations, with further links to more details where required.
-moz-float-edge - CSS: Cascading Style Sheets
formal definition initial valuecontent-boxapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax border-box | content-box | margin-box | padding-box examples html <div class="box"> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> </div> css .box { display: block; height: 5px; margin: 0.5em auto 0.5em auto; color: gray; -moz-float-edge: margin-box; box-sizing: border-box; } result specifications not part of any standard.
::-webkit-scrollbar - CSS: Cascading Style Sheets
vivamus consectetur ipsum a ornare blandit.
::after (:after) - CSS: Cascading Style Sheets
WebCSS::after
this shows how flexible ::before and ::after can be, though for the most accessible experience a semantic disclosure widget created in some other way (such as with details and summary elements) is likely to be more appropriate.
::first-letter (:first-letter) - CSS: Cascading Style Sheets
html <h2>my heading</h2> <p>lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
::marker - CSS: Cascading Style Sheets
WebCSS::marker
it works on any element or pseudo-element set to display: list-item, such as the <li> and <summary> elements.
:default - CSS: Cascading Style Sheets
WebCSS:default
syntax :default examples html <fieldset> <legend>favorite season</legend> <input type="radio" name="season" id="spring"> <label for="spring">spring</label> <input type="radio" name="season" id="summer" checked> <label for="summer">summer</label> <input type="radio" name="season" id="fall"> <label for="fall">fall</label> <input type="radio" name="season" id="winter"> <label for="winter">winter</label> </fieldset> css input:default { box-shadow: 0 0 2px 1px coral; } input:default + label { color: coral; } result specifications specification status comm...
:enabled - CSS: Cascading Style Sheets
WebCSS:enabled
html <form action="url_of_form"> <label for="firstfield">first field (enabled):</label> <input type="text" id="firstfield" value="lorem"><br> <label for="secondfield">second field (disabled):</label> <input type="text" id="secondfield" value="ipsum" disabled="disabled"><br> <input type="button" value="submit"> </form> css input:enabled { color: #2b2; } input:disabled { color: #aaa; } result specifications specification status comment html living standardthe definition of ':enabled' in that specification.
:target - CSS: Cascading Style Sheets
WebCSS:target
html <ul> <li><a href="#example1">open example #1</a></li> <li><a href="#example2">open example #2</a></li> </ul> <div class="lightbox" id="example1"> <figure> <a href="#" class="close"></a> <figcaption>lorem ipsum dolor sit amet, consectetur adipiscing elit.
@charset - CSS: Cascading Style Sheets
WebCSS@charset
assume that the document is utf-8 syntax @charset "utf-8"; @charset "iso-8859-15"; where: charset is a <string> denoting the character encoding to be used.
prefers-reduced-data - CSS: Cascading Style Sheets
the prefers-reduced-data css media feature is used to detect if the user has requested the web content that consumes less internet traffic.
@media - CSS: Cascading Style Sheets
WebCSS@media
name summary notes any-hover does any available input mechanism allow the user to hover over elements?
@supports - CSS: Cascading Style Sheets
WebCSS@supports
unsupported */ ul > li, ol > li { … /* the above expanded for browsers which don't support :is(…) */ } } @supports selector(:nth-child(1n of a, b)) { /* this rule needs to be inside the @supports block, otherwise it will be partially applied in browsers which don't support the `of` argument of :nth-child(…) is supported */ :is(:nth-child(1n of ul, ol) a, details > summary) { … /* css applied when the :is(…) selector and the `of` argument of :nth-child(…) are both supported */ } } specifications specification status comment css conditional rules module level 4the definition of '@supports' in that specification.
Detecting CSS animation support - CSS: Cascading Style Sheets
we assume that animation is not supported by setting animation to false.
Using CSS animations - CSS: Cascading Style Sheets
animation-play-state lets you pause and resume the animation sequence.
Mastering margin collapsing - CSS: Cascading Style Sheets
when negative margins are involved, the size of the collapsed margin is the sum of the largest positive margin and the smallest (most negative) negative margin.
Styling Columns - CSS: Cascading Style Sheets
summary this details all the current ways in which column boxes can be styled.
Using feature queries - CSS: Cascading Style Sheets
summary feature queries can help you start to use newer features by enhancing a simpler display of the site used for older browsers.
CSS Containment - CSS: Cascading Style Sheets
however browsers cannot guess at your intent and cannot assume that an article will be entirely self-contained.
Flow Layout and Overflow - CSS: Cascading Style Sheets
summary whether you are in continuous media on the web or in a paged media format such as print or epub, understanding how content overflows is useful when dealing with any layout method.
In Flow and Out of Flow - CSS: Cascading Style Sheets
summary in this guide we have covered the ways to take an element out of flow in order to achieve some very specific types of positioning.
Introduction to formatting contexts - CSS: Cascading Style Sheets
summary in this guide, we have looked in more detail at the block and inline formatting contexts and the important subject of creating a block formatting context (bfc).
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
in the example below we have three grid items, assuming you had set the parent with a class of grid to display: grid.
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
however, my suggestion is not to make assumptions based on how new specifications have been rolled out in browsers in the past.
Grid template areas - CSS: Cascading Style Sheets
as: "hd hd hd hd hd hd hd hd hd" "sd sd main main main main main ft ft"; } } <div class="wrapper"> <div class="header">header</div> <div class="sidebar">sidebar</div> <div class="content">content</div> <div class="footer">footer</div> </div> using grid-template-areas for ui elements many of the grid examples you will find online make the assumption that you will use grid for main page layout, however grid can be just as useful for small elements as those larger ones.
Subgrid - CSS: Cascading Style Sheets
as with any nested grid however, the size of content in the subgrid can change the track sizing, assuming a track sizing method is used that allows content to affect the size.
Implementing image sprites in CSS - CSS: Cascading Style Sheets
for example: #btn1 { background-position: -20px 0px; } #btn2 { background-position: -40px 0px; } this would move the element with the id 'btn1' 20 pixels to the left and the element with the id 'btn2' 40 pixels to the left (assuming they have the class toolbtn assigned and are affected by the image rule above).
Consistent list indentation - CSS: Cascading Style Sheets
this is why, in every browser except internet explorer for windows, markers are placed outside any border set for an <li> element, assuming the value of list-style-position is outside.
Logical properties for floating and positioning - CSS: Cascading Style Sheets
they assume a horizontal writing-mode, with a left-to-right direction.
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
in the table below i have given these mapped values assuming that the writing-mode in use is horizontal-tb — with a left to right direction.
Logical properties for sizing - CSS: Cascading Style Sheets
these mappings assume that you are in a horizontal-tb writing mode, such as english or arabic, in which case width would be mapped to inline-size.
CSS Scrollbars - CSS: Cascading Style Sheets
.scroller { width: 300px; height: 100px; overflow-y: scroll; scrollbar-color: rebeccapurple green; scrollbar-width: thin; } html <div class="scroller"> veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic.
Using CSS transitions - CSS: Cascading Style Sheets
before we look at code snippets, you might want to take a look at the live demo (assuming your browser supports transitions).
CSS data types - CSS: Cascading Style Sheets
WebCSSCSS Types
index the data types defined by the set of css specifications include the following: <angle> <angle-percentage> <angular-color-hint> <angular-color-stop> <attr-fallback> <attr-name> <basic-shape> <blend-mode> <calc-product> <calc-sum> <calc-value> <color> <color-stop> <color-stop-angle> <counter-style> <custom-ident> <dimension> <filter-function> <flex> <frequency> <frequency-percentage> <gradient> <ident> <image> <integer> <length> <length-percentage> <number> <number-percentage> <percentage> <position> <quote> <ratio> <resolution> <shape-box> <shape-radius> <string> <time> <time-percentage> <ti...
Questions about CSS - CSS: Cascading Style Sheets
WebCSSFAQ
an imported style sheet, using the css @import notation to automatically import and merge an external style sheet with the current style sheet style attributes specified by the viewer to the browser the default style sheet assumed by the browser in general, the web page creator's style sheet takes precedence, but it's recommended that browsers provide ways for the viewer to override the style attributes in some respects.
Testing media queries programmatically - CSS: Cascading Style Sheets
this makes our listener perform adjustments based on the current device orientation; otherwise, our code might assume the device is in portrait mode at startup, even if it's actually in landscape mode.
Using media queries - CSS: Cascading Style Sheets
name summary notes any-hover does any available input mechanism allow the user to hover over elements?
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
the algorithm, in summary the algorithm can for the most part be summarized by these four rules.
Value definition syntax - CSS: Cascading Style Sheets
summary sign name description example combinators juxtaposition components are mandatory and should appear in that order solid <length> && double ampersand components are mandatory but may appear in any order <length> && <string> || double bar at least one of the components must be present, and they may appear in any ...
WebKit CSS extensions - CSS: Cascading Style Sheets
if a pseudo-element (but not pseudo-class) has a -webkit- prefix, as of firefox 63, blink, webkit and gecko browsers assume it is valid, not invalidating the selector list.
animation-play-state - CSS: Cascading Style Sheets
resuming a paused animation will start the animation from where it left off at the time it was paused, rather than starting over from the beginning of the animation sequence.
backdrop-filter - CSS: Cascading Style Sheets
= <number> | <angle> examples css .box { background-color: rgba(255, 255, 255, 0.3); border-radius: 5px; font-family: sans-serif; text-align: center; line-height: 1; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); max-width: 50%; max-height: 50%; padding: 20px 40px; } html, body { height: 100%; width: 100%; } body { background-image: url(https://picsum.photos/id/1080/6858/4574), linear-gradient(rgb(219, 166, 166), rgb(0, 0, 172)); background-position: center center; background-repeat: no-repeat; background-size: cover; } .container { align-items: center; display: flex; justify-content: center; height: 100%; width: 100%; } html <div class="container"> <div class="box"> <p>backdrop-filter: blur(10px)</p> </div> </div> ...
background-color - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples html <div class="exampleone"> lorem ipsum dolor sit amet, consectetuer </div> <div class="exampletwo"> lorem ipsum dolor sit amet, consectetuer </div> <div class="examplethree"> lorem ipsum dolor sit amet, consectetuer </div> css .exampleone { background-color: teal; color: white; } .exampletwo { background-color: rgb(153,102,153); color: rgb(255,255,204); } .examplethree { background-color: #777799; color: #ffffff;...
background-position - CSS: Cascading Style Sheets
if only one value is specified, the second value is assumed to be center.
border-spacing - CSS: Cascading Style Sheets
the border-spacing value is also used along the outside edge of the table, where the distance between the table's border and the cells in the first/last column or row is the sum of the relevant (horizontal or vertical) border-spacing and the relevant (top, right, bottom, or left) padding on the table.
box-shadow - CSS: Cascading Style Sheets
values inset if not specified (default), the shadow is assumed to be a drop shadow (as if the box were raised above the content).
calc() - CSS: Cascading Style Sheets
WebCSScalc
formal syntax calc( <calc-sum> )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) accessibility concerns when calc() is used for controlling text size, be sure that one of the values includes a relative length unit, for example: h1 { font-size: calc(1.5rem +...
clip-path - CSS: Cascading Style Sheets
WebCSSclip-path
ass="container viewbox"> <svg viewbox="0 0 192 192"> <g class="none"> <rect x="24" y="24" width="144" height="144" /> <text x="96" y="91">i love</text> <text x="96" y="109" class="em">clipping</text> </g> </svg> </div> </div> </div> <div class="note">clip-path: url(#mypath)<br><br> assuming the following clippath definition: <pre> &lt;svg&gt; &lt;clippath id="mypath" clippathunits="objectboundingbox"&gt; &lt;path d="m0.5,1 c 0.5,1,0,0.7,0,0.3 a 0.25,0.25,1,1,1,0.5,0.3 a 0.25,0.25,1,1,1,1,0.3 c 1,0.7,0.5,1,0.5,1 z" /&gt; &lt;/clippath&gt; &lt;/svg&gt;</pre> </div> <div class="row"> <div class="cell"> <span>html</span> <di...
column-width - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toblock containers except table wrapper boxesinheritednocomputed valuethe absolute length, zero or largeranimation typea length formal syntax <length> | auto examples setting column width in pixels html <p class="content-box"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
<display-inside> - CSS: Cascading Style Sheets
these keywords specify the element’s inner display type, which defines the type of formatting context that lays out its contents (assuming it is a non-replaced element).
display - CSS: Cascading Style Sheets
WebCSSdisplay
inside <display-inside> these keywords specify the element’s inner display type, which defines the type of formatting context that its contents are laid out in (assuming it is a non-replaced element).
flex - CSS: Cascading Style Sheets
WebCSSflex
one-value syntax: the value must be one of: a <number>: in this case it is interpreted as flex: <number> 1 0; the <flex-shrink> value is assumed to be 1 and the <flex-basis> value is assumed to be 0.
float - CSS: Cascading Style Sheets
WebCSSfloat
html <section> <div class="left">1</div> <div class="left">2</div> <div class="right">3</div> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
grid-auto-flow - CSS: Cascading Style Sheets
if neither row nor column is provided, row is assumed.
hanging-punctuation - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | [ first | [ force-end | allow-end ] | last ] examples setting opening and closing quotes to hang html <p>“lorem ipsum dolor sit amet, consectetur adipiscing elit.
<length> - CSS: Cascading Style Sheets
WebCSSlength
in the cases where it is impossible or impractical to determine the measure of the “0” glyph, it must be assumed to be 0.5em wide by 1em tall.
list-style-type - CSS: Cascading Style Sheets
only a few elements (<li> and <summary>) have a default value of display: list-item.
margin-left - CSS: Cascading Style Sheets
this table summarizes the different cases: value of display value of float value of position computed value of auto comment inline, inline-block, inline-table any static or relative 0 inline layout mode block, inline, inline-block, block, table, inline-table, list-item, table-caption any static or relative 0, except if both m...
margin-right - CSS: Cascading Style Sheets
this table summarizes the different cases: value of display value of float value of position computed value of auto comment inline, inline-block, inline-table any static or relative 0 inline layout mode block, inline, inline-block, block, table, inline-table, list-item, table-caption any static or relative 0, except if both m...
max() - CSS: Cascading Style Sheets
WebCSSmax
formal syntax max( <calc-sum># )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) examples setting a minimum size for a font another use case for css functions is allow a font size to grow while ensuring it is at least a mimum size, enabling responsive font si...
min() - CSS: Cascading Style Sheets
WebCSSmin
formal syntax min( <calc-sum># )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) accessibility concerns when using min() to set a maximum font size, ensure that the font can still be scaled at least 200% for readability (without assistive technology like a z...
offset-position - CSS: Cascading Style Sheets
if only one value is specified, the second value is assumed to be center.
outline-style - CSS: Cascading Style Sheets
the outline-width is the sum of the two lines and the space between them.
overscroll-behavior - CSS: Cascading Style Sheets
if only one value is specified, both x and y are assumed to have the same value.
place-content - CSS: Cascading Style Sheets
examples placing content in a flex container html <div id="container"> <div class="small">lorem</div> <div class="small">lorem<br/>ipsum</div> <div class="large">lorem</div> <div class="large">lorem<br/>impsum</div> <div class="large"></div> <div class="large"></div> </div> <code>writing-mode:</code><select id="writingmode"> <option value="horizontal-tb" selected>horizontal-tb</option> <option value="vertical-rl">vertical-rl</option> <option value="vertical-lr">vertical-lr</option> <option value="sideways-rl">si...
repeating-conic-gradient() - CSS: Cascading Style Sheets
like in non-repeating gradients, the first and last color stops are assumed to be 0 and either 100% or 360deg if not explicitly declared.
scrollbar-color - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples coloring overflow scrollbars css .scroller { width: 300px; height: 100px; overflow-y: scroll; scrollbar-color: rebeccapurple green; } html <div class="scroller">veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic.
scrollbar-width - CSS: Cascading Style Sheets
| w3c understanding wcag 2.1 formal definition initial valueautoapplies toscrolling boxesinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | thin | none examples sizing overflow scrollbars css .scroller { width: 300px; height: 100px; overflow-y: scroll; scrollbar-width: thin; } html <div class="scroller">veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic.
shape-margin - CSS: Cascading Style Sheets
h> | <percentage> examples adding a margin to a polygon html <section> <div class="shape"></div> we are not quite sure of any one thing in biology; our knowledge of geology is relatively very slight, and the economic laws of society are uncertain to every one except some individual who attempts to set them forth; but before the world was fashioned the square on the hypotenuse was equal to the sum of the squares on the other two sides of a right triangle, and it will be so after this world is dead; and the inhabitant of mars, if he exists, probably knows its truth as we know it.</section> css section { max-width: 400px; } .shape { float: left; width: 150px; height: 150px; background-color: maroon; clip-path: polygon(0 0, 150px 150px, 0 150px); shape-outside: polygon(0 0, 1...
text-emphasis-position - CSS: Cascading Style Sheets
the informative table below summarizes the preferred emphasis mark positions for chinese, mongolian and japanese: preferred emphasis mark and ruby position language preferred position illustration horizontal vertical japanese over right korean mongolian chinese under right note: the text-emphasis-position cannot be set, and ther...
text-orientation - CSS: Cascading Style Sheets
formal definition initial valuemixedapplies toall elements, except table row groups, rows, column groups, and columnsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax mixed | upright | sideways examples html <p>lorem ipsum dolet semper quisquam.</p> css p { writing-mode: vertical-rl; text-orientation: upright; } result specifications specification status comment css writing modes module level 3the definition of 'text-orientation' in that specification.
text-overflow - CSS: Cascading Style Sheets
required for text-overflow */ white-space: nowrap; overflow: hidden; } .overflow-visible { white-space: initial; } .overflow-clip { text-overflow: clip; } .overflow-ellipsis { text-overflow: ellipsis; } .overflow-string { /* not supported in most browsers, see the 'browser compatibility' section below */ text-overflow: " [..]"; } html <p class="overflow-visible">lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> <p class="overflow-clip">lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> <p class="overflow-ellipsis">lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> <p class="overflow-string">lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> result note: live results in the following table may be shown incorrectly due...
matrix3d() - CSS: Cascading Style Sheets
html <div class="foo"> lorem ipsum dolor sit amet, consectetur adipisicing elit.
rotate3d() - CSS: Cascading Style Sheets
if, as specified, the vector is not normalized (i.e., if the sum of the square of its three coordinates is not 1), the user agent will normalize it internally.
will-change - CSS: Cascading Style Sheets
some of the stronger optimizations that are likely to be tied to will-change end up using a lot of a machine’s resources, and when overused like this can cause the page to slow down or consume a lot of resources.
Demos of open web technologies
5js 3d on 2d canvas minipaint: image editor (source code) zen photon garden (source code) multi touch in canvas demo (source code) svg bubblemenu (visual effects and interaction) html transformations using foreignobject (visual effects and transforms) phonetics guide (interactive) 3d objects demo (interactive) blobular (interactive) video embedded in svg (or use the local download) summer html image map creator (source code) video video 3d animation "mozilla constantly evolving" video 3d animation "floating dance" streaming anime, movie trailer and interview billy's browser firefox flick virtual barber shop transformers movie trailer a scanner darkly movie trailer (with built in controls) events firing and volume control dragable and sizable videos 3d graphics w...
Index - Event reference
WebEventsIndex
found 2 pages: # page tags and summary 1 event reference event, overview, reference dom events are sent to notify code of interesting things that have taken place.
Getting Started - Developer guides
simple timed xhr example another simple example follows — here we are loading a text file via xhr, the structure of which is assumed to be like this: time: 312.05 time: 312.07 time: 312.10 time: 312.12 time: 312.14 time: 312.15 once the text file is loaded, we split() the items into an array at each newline character (\n — basically where each line break is in the text file), and then print the complete list of timestamps, and the last timestamp, onto the page.
Adding captions and subtitles to HTML5 video - Developer guides
modifications to the html and css this section summarises the modifications made to the previous article's code in order to facilitate the addition of subtitles to the video.
Cross-browser audio basics - Developer guides
waiting the waiting event is triggered when playback has stopped due to lack of media data, although it is expected to resume once data becomes available.
Live streaming web audio and video - Developer guides
note: time shifting is the process of consuming a live stream sometime after it happened.
Video player styling basics - Developer guides
preliminary modifications from the original example this section summarises the modifications that were made to the original video player example to make the styling task easier, before the bulk of the work was started.
Audio and Video Delivery - Developer guides
setting up adaptive streaming media sources let's say you want to set up an adaptive streaming media source on a server, to be consumed inside an html5 media element.
Media events - Developer guides
canplaythrough sent when the readystate changes to have_enough_data, indicating that the entire media can be played without interruption, assuming the download rate remains at least at the current level.
Orientation and motion data explained - Developer guides
summary when using orientation and motion events, it's important to understand what the values you're given by the browser mean.
Overview of events and handlers - Developer guides
this overview of events and event handling explains the code design pattern used to react to incidents occurring when a browser accesses a web page, and it summarizes the types of such incidents modern web browsers can handle.
Using device orientation with 3D transforms - Developer guides
here's a simple code snippet to sum it up: var elem = document.getelementbyid("view3d"); window.addeventlistener("deviceorientation", function(e) { // remember to use vendor-prefixed transform property elem.style.transform = "rotatez(" + ( e.alpha - 180 ) + "deg) " + "rotatex(" + e.beta + "deg) " + "rotatey(" + ( -e.gamma ) + "deg)"; }); orientation compensation compensating the orientation of the device can be...
Event developer guide - Developer guides
WebGuideEvents
the overview page provides an introduction to the design pattern and a summary of the types of incidents which are defined and reacted to by modern web browsers.
Rich-Text Editing in Mozilla - Developer guides
qf9vj414wzwibxmorpqbmpgjudclfaezxsa0cb/i1+3yitha7prkiphvbups+/fvrvv8/f///////////////////////////////////////////////yh5baeaab8alaaaaaawabyaaawn4ceozgmeakqubgsuspvbsyfjjvds6njlb0khr4akbcmfscgbqaocwjf5gwquvyksfbwze+awibv0ghfog2ewidchjwriqo9e2fx4xd5r+b0ddaenbxbhbhn2dgwdaqfjjyvhcqyrfgoidgiqjawtcqmriwwmfgicnvcaaamoak+blaortluyt7i5uiuhads=" /> </div> <div id="textbox" contenteditable="true"><p>lorem ipsum</p></div> <p id="editmode"><input type="checkbox" name="switchmode" id="switchbox" onchange="setdocmode(this.checked);" /> <label for="switchbox">show html</label></p> <p><input type="submit" value="send" /></p> </form> </body> </html> note: if you want to see how to standardize the creation and the insertion of your editor in your page, please see our more complete rich-text editor example.
Making content editable - Developer guides
qf9vj414wzwibxmorpqbmpgjudclfaezxsa0cb/i1+3yitha7prkiphvbups+/fvrvv8/f///////////////////////////////////////////////yh5baeaab8alaaaaaawabyaaawn4ceozgmeakqubgsuspvbsyfjjvds6njlb0khr4akbcmfscgbqaocwjf5gwquvyksfbwze+awibv0ghfog2ewidchjwriqo9e2fx4xd5r+b0ddaenbxbhbhn2dgwdaqfjjyvhcqyrfgoidgiqjawtcqmriwwmfgicnvcaaamoak+blaortluyt7i5uiuhads=" /> </div> <div id="textbox" contenteditable="true"><p>lorem ipsum</p></div> <p id="editmode"><input type="checkbox" name="switchmode" id="switchbox" onchange="setdocmode(this.checked);" /> <label for="switchbox">show html</label></p> <p><input type="submit" value="send" /></p> </form> </body> </html> note: if you want to see how to standardize the creation and the insertion of your editor in your page, please see our more complete rich-text editor example.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
background-color: hsl(0.15turn, 90%, 75%);">&nbsp;</td> </tr> <tr> <td><code>hsl(0.15turn, 90%, 50%)</code></td> <td style="background-color: hsl(0.15turn, 90%, 50%);">&nbsp;</td> </tr> <tr> <td><code>hsl(270deg, 90%, 50%)</code></td> <td style="background-color: hsl(270deg, 90%, 50%);">&nbsp;</td> </tr> </tbody> </table> note that when you omit the hue's unit, it's assumed to be in degrees (deg).
HTML attribute: multiple - HTML: Hypertext Markup Language
however, since we are sumbitting multipart form data, we much use post.
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
when included in a <link>, browsers may assume that document will be fetched next, and treat it as a resource hint.
HTML attribute reference - HTML: Hypertext Markup Language
summary <table> tabindex global attribute overrides the browser's default tab order and follows the one specified instead.
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
let's assume we're serving our site using apache.
Date and time formats used in HTML - HTML: Hypertext Markup Language
no information about the time zone is included in the string; the date and time is presumed to be in the user's local time zone.
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
<h1>heading elements</h1> <h2>summary</h2> <p>some text here...</p> <h2>examples</h2> <h3>example 1</h3> <p>some text here...</p> <h3>example 2</h3> <p>some text here...</p> <h2>see also</h2> <p>some text here...</p> here is the result of this code: accessibility concerns navigation a common navigation technique for users of screen reading software is jumping from heading to heading to quickly determine the content of t...
<acronym> - HTML: Hypertext Markup Language
WebHTMLElementacronym
summary the html acronym element (<acronym>) allows authors to clearly indicate a sequence of characters that compose an acronym or abbreviation for a word.
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
WebHTMLElementb
usage notes use the <b> for cases like keywords in a summary, product names in a review, or other spans of text whose typical presentation would be boldfaced (but not including any special importance).
<br>: The Line Break element - HTML: Hypertext Markup Language
WebHTMLElementbr
technical summary content categories flow content, phrasing content.
<col> - HTML: Hypertext Markup Language
WebHTMLElementcol
if there are none, the left value is assumed.
<colgroup> - HTML: Hypertext Markup Language
WebHTMLElementcolgroup
if this attribute is not set, the left value is assumed.
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
WebHTMLElementembed
this context shift can be confusing and time-consuming, especially if the embed element contains interactive content like video or audio.
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
WebHTMLElementfieldset
<form action="#"> <fieldset disabled> <legend>disabled fieldset</legend> <div> <label for="name">name: </label> <input type="text" id="name" value="chris"> </div> <div> <label for="pwd">archetype: </label> <input type="password" id="pwd" value="wookie"> </div> </fieldset> </form> technical summary content categories flow content, sectioning root, listed, form-associated element, palpable content.
<font> - HTML: Hypertext Markup Language
WebHTMLElementfont
summary the html font element (<font>) defines the font size, color and face for its content.
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
this context shift can be confusing and time-consuming, especially for pages with multiple <iframe>s and/or if embeds contain interactive content like video or audio.
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
this is helpful (assuming the time input is fully supported by the user agent), but you can't entirely rely on the value to be a proper time string, since it might be an empty string (""), which is allowed.
<isindex> - HTML: Hypertext Markup Language
WebHTMLElementisindex
summary <isindex> was an obsolete html element that put a text field in a page for querying the document.
<label> - HTML: Hypertext Markup Language
WebHTMLElementlabel
technical summary content categories flow content, phrasing content, interactive content, form-associated element, palpable content.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
technical summary content categories metadata content.
<listing> - HTML: Hypertext Markup Language
WebHTMLElementlisting
summary the html listing element (<listing>) renders text between the start and end tags without interpreting the html in between and using a monospaced font.
<nextid>: The NeXT ID element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementnextid
example the user enters four section headings into the table of contents (and presumably also writing paragraph material within these sections).
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
technical summary content categories flow content, phrasing content, interactive content, listed, labelable, resettable, and submittable form-associated element permitted content zero or more <option> or <optgroup> elements.
<slot> - HTML: Hypertext Markup Language
WebHTMLElementslot
arial, sans-serif } .name {font-weight: bold; color: #217ac0; font-size: 120% } h4 { margin: 10px 0 -8px 0; background: #217ac0; color: white; padding: 2px 6px; border: 1px solid #cee9f9; border-radius: 4px; } .attributes { margin-left: 22px; font-size: 90% } .attributes p { margin-left: 16px; font-style: italic } </style> <details> <summary> <code class="name">&lt;<slot name="element-name">need name</slot>&gt;</code> <i class="desc"><slot name="description">need description</slot></i> </summary> <div class="attributes"> <h4>attributes</h4> <slot name="attributes"><p>none</p></slot> </div> </details> <hr> </template> note: you can see this complete example in action at element-details (se...
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
<!doctype html> <html> <head> <style> p { color: white; background-color: blue; padding: 5px; border: 1px solid black; } </style> <style media="all and (max-width: 500px)"> p { color: blue; background-color: yellow; } </style> </head> <body> <p>this is my paragraph.</p> </body> </html> technical summary content categories metadata content, and if the scoped attribute is present: flow content.
<tbody>: The Table Body element - HTML: Hypertext Markup Language
WebHTMLElementtbody
if this attribute is not set, the left value is assumed.
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
<textarea name="textarea" rows="5" cols="30" disabled>i am a disabled textarea</textarea> <textarea name="textarea" rows="5" cols="30" readonly>i am a readonly textarea</textarea> technical summary content categories flow content, phrasing content, interactive content, listed, labelable, resettable, and submittable form-associated element.
<thead>: The Table Head element - HTML: Hypertext Markup Language
WebHTMLElementthead
if this attribute is not set, the left value is assumed.
<title>: The Document Title element - HTML: Hypertext Markup Language
WebHTMLElementtitle
this is because navigating into a page to determine its content can be a time consuming and potentially confusing process.
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
technical summary content categories none permitted content zero or more <td> and/or <th> elements; script-supporting elements (<script> and <template>) are also allowed tag omission start tag is mandatory.
<xmp> - HTML: Hypertext Markup Language
WebHTMLElementxmp
summary the html example element (<xmp>) renders text between the start and end tags without interpreting the html in between and using a monospaced font.
Preloading content with rel="preload" - HTML: Hypertext Markup Language
note: there's more detail about these values and the web features they expect to be consumed by in the preload spec — see link element extensions.
Using the application cache - HTML: Hypertext Markup Language
in the example above, there is no section header, so all data lines are assumed to be in the explicit (cache) section, meaning that the browser should cache all the listed resources in the application cache.
HTML: Hypertext Markup Language
WebHTML
this module covers basic table markup, along with more complex features such as implementing captions and summaries.
Evolution of HTTP - HTTP
there were no status or error codes: in case of a problem, a specific html file was send back with the description of the problem contained in it, for human consumption.
MIME types (IANA media types) - HTTP
even if it really means "unknown textual file," browsers assume they can display it.
Content Security Policy (CSP) - HTTP
WebHTTPCSP
in summary, this is done to prevent leaking sensitive information about cross-origin resources.
Accept-Ranges - HTTP
in presence of an accept-ranges header, the browser may try to resume an interrupted download, rather than to start it from the start again.
Connection - HTTP
except for the standard hop-by-hop headers (keep-alive, transfer-encoding, te, connection, trailer, upgrade, proxy-authorization and proxy-authenticate), any hop-by-hop headers used by the message must be listed in the connection header, so that the first proxy knows it has to consume them and not forward them further.
Expect - HTTP
WebHTTPHeadersExpect
expect: 100-continue directives 100-continue informs recipients that the client is about to send a (presumably large) message body in this request and wishes to receive a 100 (continue) interim response.
If-Range - HTTP
WebHTTPHeadersIf-Range
the most common use case is to resume a download, to guarantee that the stored resource has not been modified since the last fragment has been received.
Index - HTTP
WebHTTPHeadersIndex
found 122 pages: # page tags and summary 1 http headers http, http header, networking, overview, reference http headers allow the client and the server to pass additional information with the request or the response.
Firefox user agent string reference - HTTP
however, if you use ua sniffing to target content to a device form factor, please look for mobi (to include opera mobile, which uses "mobi") for the phone form factor and do not assume any correlation between "android" and the device form factor.
Want-Digest - HTTP
some of the supported algorithms, including unixsum and md5 are subject to collisions and are thus not suitable for applications in which collision-resistance is important.
HTTP headers - HTTP
WebHTTPHeaders
for example, this header standard allows a client to change from http 1.1 to http 2.0, assuming the server decides to acknowledge and implement the upgrade header field.
HEAD - HTTP
WebHTTPMethodsHEAD
if it has one anyway, that body must be ignored: any entity headers that might describe the erroneous body are instead assumed to describe the response which a similar get request would have received.
308 Permanent Redirect - HTTP
WebHTTPStatus308
for example, google drive uses a 308 resume incomplete response to indicate to the client when an incomplete upload stalled.[1] status 308 permanent redirect specifications specification title rfc 7538, section 3: 308 permanent redirect the hypertext transfer protocol status code 308 (permanent redirect) ...
406 Not Acceptable - HTTP
WebHTTPStatus406
it is assumed that even if the user won't be completely happy, they will prefer this to an error code.
416 Range Not Satisfiable - HTTP
WebHTTPStatus416
content-range: bytes */12777 faced with this error, browsers usually either abort the operation (for example, a download will be considered as non-resumable) or ask for the whole document again.
Control flow and error handling - JavaScript
if no default clause is found, the program resumes execution at the statement following the end of switch.
Functions - JavaScript
to summarize: the inner function can be accessed only from statements in the outer function.
Grammar and types - JavaScript
if the const keyword is omitted, the identifier is assumed to represent a variable.
Introduction - JavaScript
what you should already know this guide assumes you have the following basic background: a general understanding of the internet and the world wide web (www).
Loops and iteration - JavaScript
(if the condition expression is omitted entirely, the condition is assumed to be true.) the statement executes.
Meta programming - JavaScript
handlers and traps the following table summarizes the available traps available to proxy objects.
Regular expressions - JavaScript
for example, assume you have this script: var myre = /d(b+)d/g; var myarray = myre.exec('cdbbdbsbz'); console.log('the value of lastindex is ' + myre.lastindex); // "the value of lastindex is 5" however, if you have this script: var myarray = /d(b+)d/g.exec('cdbbdbsbz'); console.log('the value of lastindex is ' + /d(b+)d/g.lastindex); // "the value of lastindex is 0" the occurrences of /d(b+)d/g in the two ...
Text formatting - JavaScript
the following table summarizes the methods of string objects.
SyntaxError: return not in function - JavaScript
the return and yield statements must be in a function, because they end (or pause and resume) function execution and specify a value to be returned to the function caller.
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
examples deprecated syntax var num = 15; string.replace(num, /5/, '2'); standard syntax var num = 15; string(num).replace(/5/, '2'); shim the following is a shim to provide support to non-supporting browsers: /*globals define*/ // assumes all supplied string instance methods already 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] === 'func...
Arrow function expressions - JavaScript
var arr = [5, 6, 13, 0, 1, 18, 23]; var sum = arr.reduce((a, b) => a + b); // 66 var even = arr.filter(v => v % 2 == 0); // [6, 0, 18] var double = arr.map(v => v * 2); // [10, 12, 26, 0, 2, 36, 46] // more concise promise chains promise.then(a => { // ...
Array.prototype.reduceRight() - JavaScript
if (arguments.length >= 2) { value = arguments[1]; } else { while (k >= 0 && !(k in t)) { k--; } if (k < 0) { throw new typeerror('reduce of empty array with no initial value'); } value = t[k--]; } for (; k >= 0; k--) { if (k in t) { value = callback(value, t[k], k, t); } } return value; }; } examples sum up all values within an array var sum = [0, 1, 2, 3].reduceright(function(a, b) { return a + b; }); // sum is 6 flatten an array of arrays var flattened = [[0, 1], [2, 3], [4, 5]].reduceright(function(a, b) { return a.concat(b); }, []); // flattened is [4, 5, 2, 3, 0, 1] run a list of asynchronous functions with callbacks in series each passing their results to the next const waterf...
Array.prototype.every() - JavaScript
this algorithm is exactly the one specified in ecma-262, 5th edition, assuming object and typeerror have their original values, and that callbackfn.call evaluates to the original value of function.prototype.call.
Array.prototype.filter() - JavaScript
this algorithm is exactly equivalent to the one specified in ecma-262, 5th edition, assuming that fn.call evaluates to the original value of function.prototype.bind(), and that array.prototype.push() has its original value.
Array.from() - JavaScript
polyfill notes: this algorithm is exactly as specified in ecma-262 6th edition (assuming object and typeerror have their original values and that callback.call() evaluates to the original value of function.prototype.call()).
Array.prototype.indexOf() - JavaScript
this algorithm matches the one specified in ecma-262, 5th edition, assuming typeerror and math.abs() have their original values.
Array.prototype.lastIndexOf() - JavaScript
this algorithm is exactly the one specified in ecma-262, 5th edition, assuming object, typeerror, number, math.floor, math.abs, and math.min have their original values.
Array.prototype.map() - JavaScript
this algorithm is exactly the one specified in ecma-262, 5th edition, assuming object, typeerror, and array have their original values and that callback.call evaluates to the original value of function.prototype.call.
Array.prototype.some() - JavaScript
this algorithm is exactly the one specified in ecma-262, 5th edition, assuming object and typeerror have their original values and that fun.call evaluates to the original value of function.prototype.call().
BigInt.prototype.toString() - JavaScript
if the radix is not specified, the preferred radix is assumed to be 10.
Date.prototype[@@toPrimitive] - JavaScript
examples returning date primitives const testdate = new date(1590757517834); // "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" testdate[symbol.toprimitive]('string'); // returns "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" testdate[symbol.toprimitive]('number'); // returns "1590757517834" testdate[symbol.toprimitive]('default'); // returns "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" specifications specification ecmascript (ecma-262)the definition of 'd...
Date.prototype.toString() - JavaScript
date.prototype.tostring() returns a string representation of the date in the format specified in ecma-262 which can be summarised as: week day: 3 letter english week day name, e.g.
Error.prototype.stack - JavaScript
<!doctype html> <meta charset="utf-8"> <title>stack trace example</title> <body> <script> function trace() { try { throw new error('myerror'); } catch(e) { alert(e.stack); } } function b() { trace(); } function a() { b(3, 4, '\n\n', undefined, {}); } a('first call, firstarg'); </script> assuming the above markup is saved as c:\example.html on a windows file system it produces an alert message box with the following text: starting with firefox 30 and later containing the column number: trace@file:///c:/example.html:9:17 b@file:///c:/example.html:16:13 a@file:///c:/example.html:19:13 @file:///c:/example.html:21:9 firefox 14 to firefox 29: trace@file:///c:/example.html:9 b@file:///c:...
Error.prototype.toString() - JavaScript
its semantics are as follows (assuming object and string have their original values): error.prototype.tostring = function() { 'use strict'; var obj = object(this); if (obj !== this) { throw new typeerror(); } var name = this.name; name = (name === undefined) ?
Function() constructor - JavaScript
// example can be run directly in your javascript console // create a function that takes two arguments, and returns the sum of those arguments const adder = new function('a', 'b', 'return a + b'); // call the function adder(2, 6); // 8 the arguments "a" and "b" are formal argument names that are used in the function body, "return a + b".
Function.name - JavaScript
if you rely on function.name, like in the example above, make sure your build pipeline doesn't change function names, or don't assume a function to have a particular name.
Generator.prototype.throw() - JavaScript
the throw() method resumes the execution of a generator by throwing an error into it and returns an object with two properties done and value.
Intl.Collator.supportedLocalesOf() - JavaScript
examples using supportedlocalesof assuming a runtime that supports indonesian and german but not balinese in collation, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is not used with indonesian and a specialized german for indonesia is unlikely to be supported.
Intl.DateTimeFormat() constructor - JavaScript
possible values are: "long" (e.g., british summer time) "short" (e.g., gmt+1) the default value for each date-time component property is undefined, but if all component properties are undefined, then year, month, and day are assumed to be "numeric".
Intl.DateTimeFormat.supportedLocalesOf() - JavaScript
examples using supportedlocalesof assuming a runtime that supports indonesian and german but not balinese in date and time formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to date and time formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Intl.DisplayNames.supportedLocalesOf() - JavaScript
examples using supportedlocalesof assuming a runtime that supports indonesian and german but not balinese in date and time formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to date and time formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Intl.ListFormat.supportedLocalesOf() - JavaScript
examples using supportedlocalesof assuming a runtime that supports indonesian and german but not balinese in date and time formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to date and time formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Intl.NumberFormat.supportedLocalesOf() - JavaScript
examples using supportedlocalesof assuming a runtime that supports indonesian and german but not balinese in number formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to number formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Intl.PluralRules.supportedLocalesOf() - JavaScript
examples using supportedlocalesof() assuming a runtime that supports indonesian and german but not balinese in plural formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to plural formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Intl.RelativeTimeFormat.supportedLocalesOf() - JavaScript
examples using supportedlocalesof assuming a runtime that supports indonesian and german but not balinese in date and time formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to date and time formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Math - JavaScript
math.hypot([x[, y[, …]]]) returns the square root of the sum of squares of its arguments.
Number.prototype.toString() - JavaScript
if the radix is not specified, the preferred radix is assumed to be 10.
Object.prototype.constructor - JavaScript
summary: manually updating or setting the constructor can lead to differrent and sometimes confusing consequences.
Object.defineProperties() - JavaScript
polyfill assuming a pristine execution environment with all names and properties referring to their initial values, object.defineproperties is almost completely equivalent (note the comment in iscallable) to the following reimplementation in javascript: function defineproperties(obj, properties) { function converttodescriptor(desc) { function hasproperty(obj, prop) { return object.prototype.hasownp...
Object.prototype.hasOwnProperty() - JavaScript
note that the for...in loop is already only iterating enumerable items, so one should not assume based on the lack of non-enumerable properties shown in the loop that hasownproperty itself is confined strictly to enumerable items (as with object.getownpropertynames()).
Object.prototype.toLocaleString() - JavaScript
e: const testarray = [4, 7, 10]; let europrices = testarray.tolocalestring('fr', { style: 'currency', currency: 'eur'}); // "4,00 €,7,00 €,10,00 €" date tolocalestring() override on date objects, tolocalestring() is used to print out date displays more suitable for specific locales: for example: const testdate = new date(date.now()); // "date fri may 29 2020 18:04:24 gmt+0100 (british summer time)" let dedate = testdate.tolocalestring('de'); // "29.5.2020, 18:04:24" var frdate = testdate.tolocalestring('fr'); //"29/05/2020 à 18:04:24" number tolocalestring() override on number objects, tolocalestring() is used to print out number displays more suitable for specific locales, e.g.
Promise.any() - JavaScript
unlike promise.all(), which returns an array of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills).
Proxy - JavaScript
handler functions are sometimes called traps, presumably because they trap calls to the target object.
RegExp.prototype.exec() - JavaScript
for example, assume you have this script: let myre = /ab*/g; let str = 'abbcdefabh'; let myarray; while ((myarray = myre.exec(str)) !== null) { let msg = 'found ' + myarray[0] + '.
RegExp.prototype.test() - JavaScript
(regexp.prototype.exec() also advances the lastindex property.) further calls to test(str) will resume searching str starting from lastindex.
String.prototype.split() - JavaScript
(use, for example, esrever instead.) const str = 'résumé' const strreverse = str.split(/(?:)/u).reverse().join('') // => "́emuśer" bonus: use === operator to test if the original string was a palindrome.
TypedArray.prototype.reduce() - JavaScript
examples sum up all values within an array var total = new uint8array([0, 1, 2, 3]).reduce(function(a, b) { return a + b; }); // total == 6 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.reduce' in that specification.
TypedArray.prototype.reduceRight() - JavaScript
examples sum up all values within an array var total = new uint8array([0, 1, 2, 3]).reduceright(function(a, b) { return a + b; }); // total == 6 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.reduceright' in that specification.
TypedArray.prototype.set() - JavaScript
if this value is omitted, 0 is assumed (that is, the source array will overwrite values in the target array starting at index 0).
escape() - JavaScript
… … programmers should not use or assume the existence of these features and behaviours when writing new ecmascript code.
unescape() - JavaScript
… … programmers should not use or assume the existence of these features and behaviours when writing new ecmascript code.
Iteration protocols - JavaScript
doing so allows an iterator to be consumed by the various syntaxes expecting iterables.
Addition (+) - JavaScript
the addition operator (+) produces the sum of numeric operands or string concatenation.
Addition assignment (+=) - JavaScript
syntax operator: x += y meaning: x = x + y examples using addition assignment // assuming the following variables // foo = 'foo' // bar = 5 // baz = true // number + number -> addition bar += 2 // 7 // boolean + number -> addition baz += 1 // 2 // boolean + boolean -> addition baz += false // 1 // number + string -> concatenation bar += 'foo' // "5foo" // string + boolean -> concatenation foo += false // "foofalse" // string + string -> concatenation foo += 'bar' // "fooba...
Assignment (=) - JavaScript
syntax operator: x = y examples simple assignment and chaining // assuming the following variables // x = 5 // y = 10 // z = 25 x = y // x is 10 x = y = z // x, y and z are all 25 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Division assignment (/=) - JavaScript
syntax operator: x /= y meaning: x = x / y examples using division assignment // assuming the following variable // bar = 5 bar /= 2 // 2.5 bar /= 'foo' // nan bar /= 0 // infinity specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Equality (==) - JavaScript
this can be roughly summarised as follows: if the operands are both objects, return true only if both operands reference the same object.
Exponentiation assignment (**=) - JavaScript
syntax operator: x **= y meaning: x = x ** y examples using exponentiation assignment // assuming the following variable // bar = 5 bar **= 2 // 25 bar **= 'foo' // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Greater than (>) - JavaScript
see the documentation for the less than operator for a summary of this algorithm.
Greater than or equal (>=) - JavaScript
see the documentation for the less than operator for a summary of this algorithm.
Less than (<) - JavaScript
syntax x < y description the operands are compared using the abstract relational comparison algorithm, which is roughly summarised below: first, objects are converted to primitives using symbol.toprimitive.
Less than or equal (<=) - JavaScript
see the documentation for the less than operator for a summary of this algorithm.
Multiplication assignment (*=) - JavaScript
syntax operator: x *= y meaning: x = x * y examples using multiplication assignment // assuming the following variable // bar = 5 bar *= 2 // 10 bar *= 'foo' // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Remainder assignment (%=) - JavaScript
syntax operator: x %= y meaning: x = x % y examples using remainder assignment // assuming the following variable // bar = 5 bar %= 2 // 1 bar %= 'foo' // nan bar %= 0 // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Spread syntax (...) - JavaScript
when merging 2 objects together with the spread operator, it is assumed another iterating function is used when the merging occurs.
Subtraction assignment (-=) - JavaScript
syntax operator: x -= y meaning: x = x - y examples using subtraction assignment // assuming the following variable // bar = 5 bar -= 2 // 3 bar -= 'foo' // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
new.target - JavaScript
in ordinary functions, it refers to the function itself, assuming it was invoked via the new operator; otherwise new.target is undefined.
this - JavaScript
function sum() { return this.a + this.b + this.c; } var o = { a: 1, b: 2, c: 3, get average() { return (this.a + this.b + this.c) / 3; } }; object.defineproperty(o, 'sum', { get: sum, enumerable: true, configurable: true}); console.log(o.average, o.sum); // 2, 6 as a constructor when a function is used as a constructor (with the new keyword), its this is bound to the new object being...
typeof - JavaScript
description the following table summarizes the possible return values of typeof.
function* - JavaScript
calling the next() method with an argument will resume the generator function execution, replacing the yield expression where an execution was paused with the argument from next().
with - JavaScript
javascript assumes the math object for these references.
Proving the Pythagorean theorem - MathML
we will now prove the pythagorean theorem: statement: in a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.
MathML documentation index - MathML
WebMathMLIndex
found 40 pages: # page tags and summary 1 mathml landing, mathml, reference, web, xml mathematical markup language (mathml) is a dialect of xml for describing mathematical notation and capturing both its structure and content.
MathML
for a quick overview, see the slides for the innovation fairs at mozilla summit 2013.
Digital video concepts - Web media technologies
in bt.709 (used for hdtv), for example, the luma value is the weighted sum of the gamma-corrected red, green, and blue components of the pixel, using the formula y' = 0.2126r' + 0.7152g' + 0.0722b'.
Guide to streaming audio and video - Web media technologies
for example, because many web sites' mobile-specific content assume that mobile browsers support hls, firefox for android does as well, in order to avoid strange compatibility errors from occurring due to this assumption being incorrect.
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
summary so there you have it — eliminating another piece of jank from web layout!
OpenSearch description format
<opensearchdescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/"> <shortname>[snk]</shortname> <description>[search engine full name and summary]</description> <inputencoding>[utf-8]</inputencoding> <image width="16" height="16" type="image/x-icon">[https://example.com/favicon.ico]</image> <url type="text/html" template="[searchurl]"> <param name="[key name]" value="{searchterms}"/> <!-- other params if you need them… --> <param name="[other key name]" value="[parameter value]"/> </url> <url type="application/x...
Animation performance and frame rate - Web Performance
these animations can consume cpu and/or cause jank.
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
rum monitors actual use cases, not the synthetic, assumed use cases predefined by an engineer, pm, or marketing team.
Web Performance
in summary, we should always try to create our animations using css transitions/animations where possible.
How to make PWAs installable - Progressive web apps (PWAs)
summary in this article, we learned about how we can make pwas installable with a properly-configured web manifest, and how the user can then install the pwa with the "add to home screen" feature of their browser.
Introduction to progressive web apps - Progressive web apps (PWAs)
early stage emerging startups like couponmoto have also started using progressive web apps to drive more consumer engagement, showing that they can help small as well as big companies to (re-)engage users more effectively.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
summary in this article we took a simple look at how you can make your pwa work offline with service workers.
Mobile first - Progressive web apps (PWAs)
cle> <nav> <ul> <li><a href="#">home</a></li> <li><a href="#">articles</a></li> <li><a href="#">videos</a></li> <li><a href="#">work</a></li> <li><a href="#">about</a></li> <li><a href="#">contact</a></li> </ul> </nav> <header> <a id="top" href="#bottom">jump to menu</a> <h1>my article</h1> </header> <div class="main"> <p>lorem ipsum … </p> <a id="bottom" href="#top">back to top</a> </div> </article> <button id="install-btn">install</button> default mobile css for the css, i first added some styles into our app.css stylesheet to provide a reasonable narrow-screen layout.
accumulate - SVG: Scalable Vector Graphics
four elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> usage notes value none | sum default value none animatable no sum specifies that each repeat iteration after the first builds upon the last value of the previous iteration.
additive - SVG: Scalable Vector Graphics
four elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> usage notes value replace | sum default value replace animatable no sum specifies that the animation will add to the underlying value of the attribute and other lower priority animations.
color-rendering - SVG: Scalable Vector Graphics
for example, assume color-rendering: optimizespeed and color-interpolation-filters: linearrgb.
operator - SVG: Scalable Vector Graphics
lighter this value indicates that the sum of the source graphic defined in the in attribute and the destination graphic defined in the in2 attribute is displayed.
pathLength - SVG: Scalable Vector Graphics
stroke-dasharray, for example, will assume the start of the path being 0 and the end point the value defined in the pathlength attribute.
pointsAtZ - SVG: Scalable Vector Graphics
the pointsatz attribute represents the y location in the coordinate system established by attribute primitiveunits on the <filter> element of the point at which the light source is pointing, assuming that, in the initial local coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y.
vector-effect - SVG: Scalable Vector Graphics
when this vector effect and the transform property are defined at the same time, that property is consumed for this effect.
widths - SVG: Scalable Vector Graphics
WebSVGAttributewidths
if the range is omitted, a range of u+0-7fffffff is assumed which covers all characters and their glyphs.
z - SVG: Scalable Vector Graphics
WebSVGAttributez
the z attribute defines the location along the z-axis for a light source in the coordinate system established by the primitiveunits attribute on the <filter> element, assuming that, in the initial coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y.
Content type - SVG: Scalable Vector Graphics
if not provided, the angle value is assumed to be in degrees.
<feColorMatrix> - SVG: Scalable Vector Graphics
r' = r1*r + r2*g + r3*b + r4*a + r5 g' = g1*r + g2*g + g3*b + g4*a + g5 b' = b1*r + b2*g + b3*b + b4*a + b5 a' = a1*r + a2*g + a3*b + a4*a + a5 take the amount of red in the new pixel, or r': it is the sum of r1 times the old pixel's red r, r2 times the old pixel's green g, r3 times of the old pixel's blue b, r4 times the old pixel's alpha a, plus a shift r5.
<feSpecularLighting> - SVG: Scalable Vector Graphics
the filter primitive assumes that the viewer is at infinity in the z direction.
Example - SVG: Scalable Vector Graphics
idget.setattributens(null,'cx',mouse_x); widget.setattributens(null,'cy',mouse_y); } document.onmousemove = onmousemove; // determine (x,y) of the cursor function cursor() { return [mouse_x, mouse_y]; } // determine average (x,y) of the swarm function averagemoteposition() { if( !motes ) return [0,0]; if( motes.length == 0 ) return [0,0]; var i; var sum_x=0, sum_y=0; for(i=0; i<motes.length; i++) { sum_x += motes[i].x; sum_y += motes[i].y; } return [sum_x/motes.length, sum_y/motes.length]; } // a nicer, integer random function rand(modulo) { return math.round( math.random() * (modulo-1)); } // class mote function mote() { // dimensions of drawing area.
Same-origin policy - Web security
for example, assume a script from the document at http://store.company.com/dir/other.html executes the following: document.domain = "company.com"; afterward, the page can pass the same-origin check with http://company.com/dir/page.html (assuming http://company.com/dir/page.html sets its document.domain to "company.com" to indicate that it wishes to allow that - see document.domain for more).
Transport Layer Security - Web security
tls 1.3 supports forward-secure modes only, unless the connection is resumed or it uses a pre-shared key.
Types of attacks - Web security
the browser executes the code because it assumes the response is from a "trusted" server which the user has already interacted with.
Tutorials
this module covers basic table markup, along with more complex features such as implementing captions and summaries.
Using shadow DOM - Web Components
high-level view this article assumes you are already familiar with the concept of the dom (document object model) — a tree-like structure of connected nodes that represents the different elements and strings of text appearing in a markup document (usually an html document in the case of web documents).
XML Index - XML: Extensible Markup Language
WebXMLIndex
found 4 pages: # page tags and summary 1 xml: extensible markup language draft, landing, web, xml the extensible markup language is a strict serialisation of the document object model.
Functions - XPath
cument() 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() substring-after() substring-before() sum() system-property() xslt-specific translate() true() unparsed-entity-url() xslt-specific (not supported) ...
XPath snippets - XPath
sample usage assume we have the following xml document (see also how to create a dom tree and parsing and serializing xml): example: an xml document to use with the custom evaluatexpath() utility function <?xml version="1.0"?> <people> <person first-name="eric" middle-initial="h" last-name="jung"> <address street="321 south st" city="denver" state="co" country="usa"/> <address street="123 main st" city...
XPath
this extensive introduction to xslt and xpath assumes no prior knowledge of the technologies, and guides the reader through background, context, structure, concepts, and introductory terminology.
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElement
for example, assume that a variable "image-dir" is defined as follows: <xsl:variable name="image-dir">/images</xsl:variable> the expression to be evaluated is placed inside curly brackets: <img src="{$image-dir}/mygraphic.jpg"/> this would result in the following: <img src="/images/mygraphic.jpg"/> the element annotations that follow include a description, a syntax listing, a list of required and optional att...
An Overview - XSLT: Extensible Stylesheet Language Transformations
the examples in this article all assume the use of the xsl prefix.
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
rted) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) not() (supported) number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (supported) string-length() (supported) substring() (supported) substring-after() (supported) substring-before() (supported) sum() (supported) system-property() (supported) translate() (supported) true() (supported) unparsed-entity-url() (not supported) ...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) not() (supported) number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (supported) string-length() (supported) substring() (supported) substring-after() (supported) substring-before() (supported) sum() (supported) system-property() (supported) translate() (supported) true() (supported) unparsed-entity-url() (not supported) for further reading books online the world wide web consortium portals articles tutorials/examples mailing lists/newsgroups resources index original document information copyright information: copyright © 2001-2003 netscape.
JavaScript/XSLT Bindings - XSLT: Extensible Stylesheet Language Transformations
assuming that the dom to be processed is contained by an element with the id example, that dom can be "cloned" using the in-memory xml document's document.importnode() method.
XSLT: Extensible Stylesheet Language Transformations
WebXSLT
this extensive introduction to xslt and xpath assumes no prior knowledge of the technologies and guides the reader through background, context, structure, concepts and introductory terminology.
WebAssembly Concepts - WebAssembly
summary this article has given you an explanation of what webassembly is, why it is so useful, how it fits into the web, and how you can make use of it.
Index - WebAssembly
found 12 pages: # page tags and summary 1 webassembly landing, webassembly, wasm webassembly is a new type of code that can be run in modern web browsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages such as c/c++ with a compilation target so that they can run on the web.
Loading and running WebAssembly code - WebAssembly
again, assuming our module is called simple.wasm: create a new xmlhttprequest() instance, and use its open() method to open a request, setting the request method to get, and declaring the path to the file we want to fetch.