Search completed in 0.94 seconds.
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
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 cssmath
sum() constructor creates a new cssmath
sum object which creates a new csskeywordvalue object which represents the result obtained by calling add(), sub(), or to
sum() on cssnumericvalue.
... syntax var cssmath
sum = new cssmath
sum() parameters values one or more double integers or cssnumericvalue objects.
... specifications specification status comment css typed om level 1the definition of 'cssmath
sum()' in that specification.
nsIMicrosummaryService
toolkit/components/places/public/nsimicro
summaryservice.idlscriptable this interface provides methods for managing installed micro
summaries, 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: micro
summary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) implemented by: @mozilla.org/micro
summary/service;1 as a service: var micro
summaryservice = components.classes["@mozilla.org/micro
summary/service;1"] .getservice(components.interfaces.nsimicro
summaryservice); method overview void addgenerator(in nsiuri generatoruri); nsimicro
summary createmicro
summary(in nsiuri pageuri, in nsiuri generatoruri); nsisimpleenumerator getbookmarks(); nsimicro
summarygenerator getgenerator(in nsiuri generatoruri); nsimicro
summaryset getmi...
...cro
summaries(in nsiuri pageuri, in long long bookmarkid); nsimicro
summary getmicro
summary(in long long bookmarkid); boolean hasmicro
summary(in long long bookmarkid); nsimicro
summarygenerator installgenerator(in nsidomdocument xmldefinition); boolean ismicro
summary(in long long bookmarkid, in nsimicro
summary micro
summary); nsimicro
summary refreshmicro
summary(in long long bookmarkid); void removemicro
summary(in long long bookmarkid); void setmicro
summary(in long long bookmarkid, in nsimicro
summary micro
summary); methods addgenerator() install the micro
summary generator from the resource at the supplied uri.
...And 40 more matches
Microsummary XML grammar reference - Archive of obsolete content
a micro
summary 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: micro
summary 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 micro
summary generators, describing each element and their attributes.
... for an introduction to how to create a micro
summary, read the article creating a micro
summary.
...And 27 more matches
Creating a Microsummary - Archive of obsolete content
warning: micro
summary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) a micro
summary generator is a set of instructions for creating a micro
summary from the content of a page.
... web pages can reference generators via <link rel="micro
summary"> elements in their <head> elements.
... in this tutorial we're going to create a micro
summary 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/nsimicro
summaryservice.idlscriptable this interface defines attributes and methods for dealing with micro
summaries generated by an nsimicro
summarygenerator.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: micro
summary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void addobserver(in nsimicro
summaryobserver observer); boolean equals(in nsimicro
summary aother); void removeobserver(in nsimicro
summaryobserver observer); void update(); attributes attribute type description content astring the content of the micro
summary.
... generator nsimicro
summarygenerator the generator that generates this micro
summary.
...And 14 more matches
Microsummary topics - Archive of obsolete content
warning: micro
summary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) programmatically installing a micro
summary generator to programmatically install a micro
summary generator -- for example, in an extension that helps users create custom generators for their favorite sites -- obtain a reference to the nsimicro
summaryservice interface implemented by the nsimicro
summaryservice component, then call its installgenerator() method, passing it an xml document containing the generator.
... for example, the following code snippet installs the micro
summary generator from the creating a micro
summary tutorial: var generatortext = ' \ <?xml version="1.0" encoding="utf-8"?> \ <generator xmlns="http://www.mozilla.org/micro
summaries/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 micro
summaryservice = components.classes["@mozilla.org/micro
summary/service;1"].
...And 11 more matches
nsIMicrosummaryGenerator
toolkit/components/places/public/nsimicro
summaryservice.idlscriptable this interface provides access to a micro
summary 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: micro
summary 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 nsimicro
summarygenerator aother); astring generatemicro
summary(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 micro
summary generator.
...And 10 more matches
Implementing Download Resuming
this document describes how an embedder or other gecko/necko-using application can implement download re
suming.
...this means that if a download was interrupted, it can be re
sumed from that point on, rather than regetting the whole file.
... the interface re
suming is done using the nsire
sumablechannel interface.
...And 9 more matches
nsIResumableChannel
netwerk/base/public/nsire
sumablechannel.idlscriptable this interface is meant to be implemented by the channels that support re
suming 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 nsire
sumableentityid entityid); obsolete since gecko 1.8 void re
sumeat(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_re
sumable if this load is not re
sumable.
...And 7 more matches
DownloadSummary
a reference to a download
summary object can be obtained using the downloads.get
summary() 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/nsimicro
summaryservice.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: micro
summary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void oncontentloaded(in nsimicro
summary micro
summary); void onelementappended(in nsimicro
summary micro
summary); void onerror(in nsimicro
summary micro
summary); methods oncontentloaded() called when an observed micro
summary updates its content.
... since an observer might watch multiple micro
summaries at the same time, the micro
summary whose content has been updated gets passed to this handler.
...And 6 more matches
nsIMicrosummarySet
toolkit/components/places/public/nsimicro
summaryservice.idlscriptable this interface provides access to sets of micro
summaries returned from the nsimicro
summaryservice.
... 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: micro
summary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void addobserver(in nsimicro
summaryobserver observer); nsisimpleenumerator enumerate(); void removeobserver(in nsimicro
summaryobserver observer); methods addobserver() add a micro
summary observer to this micro
summary set.
... adding an observer to a set is the equivalent of adding it to each constituent micro
summary.
...And 6 more matches
CSSMathSum - Web APIs
the cssmath
sum interface of the css typed object model api represents the result obtained by calling add(), sub(), or to
sum() on cssnumericvalue.
... a cssmath
sum is the object type returned when the stylepropertymapreadonly.get() method is used on a css property whosevalue is created with a calc() function.
... constructor cssmath
sum.cssmath
sum() creates a new cssmath
sum object.
...And 3 more matches
MediaRecorder.onresume - Web APIs
the mediarecorder.onre
sume event handler (part of the mediarecorder api) handles the re
sume event, allowing you to run code in response to the media recording being re
sumed after pausing.
... the re
sume event is thrown as a result of the mediarecorder.re
sume() method being invoked.
... syntax mediarecorder.onre
sume = function(event) { ...
...And 3 more matches
MediaRecorder.resume() - Web APIs
the mediarecorder.re
sume() method (part of the mediarecorder api) is used to re
sume media recording when it has been previously paused.
... when the re
sume() 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 re
sume event.
...And 3 more matches
Creating regular expressions for a microsummary generator - Archive of obsolete content
warning: micro
summary 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.
...micro
summary 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 micro
summary generator, see creating a micro
summary.
...And 2 more matches
AudioContext.resume() - Web APIs
the re
sume() method of the audiocontext interface re
sumes the progression of time in an audio context that has previously been suspended.
... syntax completepromise = audiocontext.re
sume(); parameters none.
... return value a promise that resolves when the context has re
sumed.
...And 2 more matches
RTCRtpStreamStats.qpSum - Web APIs
the qp
sum 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 qp
sum = rtcrtpstreamstats.qp
sum; 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 con
sumeoutsideclicks type: boolean controls whether or not the event that caused the popup to be automatically dismissed (or "rolled up") should be con
sumed or be dispatched as a normal event.
...if it set to true the rollup event is con
sumed.
... if set to false, the rollup event is not con
sumed.
... this attribute should be used instead of setcon
sumerollupevent.
RTCInboundRtpStreamStats.qpSum - Web APIs
the qp
sum 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 qp
sum = rtcinboundrtpstreamstats.qp
sum; 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.qp
sum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.qp
sum' in that specification.
RTCOutboundRtpStreamStats.qpSum - Web APIs
the qp
sum 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 qp
sum = rtcoutboundrtpstreamstats.qp
sum; 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.qp
sum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.qp
sum' in that specification.
WebGL2RenderingContext.resumeTransformFeedback() - Web APIs
the webgl2renderingcontext.re
sumetransformfeedback() method of the webgl 2 api re
sumes a transform feedback operation.
... syntax void gl.re
sumetransformfeedback(); parameters none.
...gl.re
sumetransformfeedback(); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 're
sumetransformfeedback' in that specification.
... opengl es 3.0the definition of 'glre
sumetransformfeedback' 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 as
sumes the caller will do file locking, so two processes or threads writing to the same database can corrupt it.
CSSNumericValue.toSum() - Web APIs
the to
sum() method of the cssnumericvalue interface converts the object's value to a cssmath
sum object to values of the specified unit.
... syntax var cssmath
sum = cssnumericvalue.to
sum(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.to
sum("px", "percent").tostring() // => "calc(1000.39px + 4%)" specifications specification status comment css typed om level 1the definition of 'to
sum' in that specification.
OfflineAudioContext.resume() - Web APIs
the re
sume() method of the offlineaudiocontext interface re
sumes the progression of time in an audio context that has been suspended.
... syntax offlineaudiocontext.re
sume().then(function() { ...
... specifications specification status comment web audio apithe definition of 're
sume()' in that specification.
SpeechSynthesis.resume() - Web APIs
the re
sume() method of the speechsynthesis interface puts the speechsynthesis object into a non-paused state: re
sumes it if it was already paused.
... syntax speechsynthesisinstance.re
sume(); 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.re
sume() // re
sumes speaking specifications specification status comment web speech apithe definition of 're
sume()' in that specification.
SpeechSynthesisUtterance.onresume - Web APIs
the onre
sume property of the speechsynthesisutterance interface represents an event handler that will run when a paused utterance is re
sumed (when the re
sume event fires.) this occurs when the speechsynthesis.re
sume() method is invoked on a paused speech synthesis instance.
... syntax speechsynthesisutteranceinstance.onre
sume = 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.onre
sume = function(event) { console.log('speech re
sumed after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onre
sume' in that specification.
sum - XPath
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
the cssmath
sum.values read-only property of the cssmath
sum interface returns a cssnumericarray object which contains one or more cssnumericvalue objects.
... syntax var cssnumericarray = cssmath
sum.values; value a cssnumericarray.
CSSNumericValue.sum() - Web APIs
syntax var cssmath
sum = cssnumericvalue.sub(number); parameters number either a number or a cssmath
sum return value a cssmath
sum exceptions typeerror indicates that an invalid type was passed to the method.
... examples let math
sum = css.px("23").
sum(css.percent("4")).
sum(css.cm("3")).
sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(math
sum.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 re
sume event of the web speech api speechsynthesisutterance object is fired when a paused utterance is re
sumed.
... bubbles no cancelable no interface speechsynthesisevent event handler property onre
sume examples you can use the re
sume event in an addeventlistener method: utterthis.addeventlistener('re
sume', function(event) { console.log('speech re
sumed after ' + event.elapsedtime + ' milliseconds.'); }); or use the onre
sume event handler property: utterthis.onre
sume = function(event) { console.log('speech re
sumed 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
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
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
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, con
sumption 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 re
sumeindex) stack: gen ⇒ rval, gen, re
sumekind suspend the current generator and return to the caller.
...later, when re
suming execution, rval, gen and re
sumekind will receive the values passed in by jsop::re
sume.
... re
sumekind is the generatorre
sumekind 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...integer ligula ip
sum, 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 ip
sum 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 con
sumer 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++ con
sumers: functions at loadcontextinfo.h exported header js con
sumers: 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 con
sumer (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 ip
sum dolor sit amet, consectetur adipiscing elit.
...integer ligula ip
sum, 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...And 16 more matches
Power profiling overview
it is equivalent to an amount of energy con
sumed 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 con
sumption of the mobile device.
...reducing) the power con
sumption caused by firefox and firefox os.
...And 16 more matches
window.location - Web APIs
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 ip
sum dolor sit amet, consectetur adipiscing elit.
...nam turpis nunc, suscipit a hendrerit vitae, volutpat non ip
sum.</p> <p>duis lobortis sapien quis nisl luctus porttitor.
...etiam congue, elit vitae egestas mollis, ip
sum 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 adisplaycon
sumer, 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 adisplaycon
sumer, 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 adisplaycon
sumer, 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 acon
sumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in boolean aconvertdata, in string aadditionalheader); nsiuri streamheaders(in string amessageuri, in nsist...
...reamlistener acon
sumer, 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++ con
sumers may use the type-specific methods.
...for other types, only c++ con
sumers may use the type-specific methods.
...for other types, only c++ con
sumers 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 sub
suming.
... to establish the security relationship between two compartments a and b, gecko asks: does the security principal for compartment a sub
sume the security principal for compartment b, and vice versa?
... sub
sumes a sub
sumes 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 con
sumed 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 as
sumed as 0.
...And 12 more matches
<details>: The Details disclosure element - HTML: Hypertext Markup Language
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 as
sume animations require frame-by-frame control.
...let us as
sume that your game's functions and variables are built on a namespace that you called mygame.
...* * let us also as
sume 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...integer ligula ip
sum, 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...And 10 more matches
Introduction to NSPR
nspr as
sumes 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 re
sumption value, which determines how the debuggee should continue.
...most handler functions can return a re
sumption value indicating how the debuggee’s execution should proceed.
... this handler method should return a re
sumption 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 as
sumption 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, as
suming 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 as
sume 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>≤</mo> <mi>i</mi> <mo>≤</mo> <mi>m</mi> </mrow> <mrow> <mn>0</mn> <mo><</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 as
sumes that you understand the use cases of readable streams, and are aware of the high-level concepts.
... browser support you can con
sume fetch body objects as streams and create your own custom readable streams in firefox 65+ and chrome 42+ (and equivalent chromium-based browsers).
... con
suming 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 as
sume 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 con
sumer 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.
...con
sumers 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 re
sume 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 (re
sume/rewind).
... inter-thread non-determinism is handled by first as
suming 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 getpccountscript
summary(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 re
sumetimeouts(); 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...
... getpccountscript
summary() 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 con
sumers.
... type a unique, case-sensitive ascii string identifying the con
sumer.
...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 as
suming 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 as
suming 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 pre
sume these events will happen with any particular amount of time between them.
...And 7 more matches
Details of the object model - JavaScript
this chapter as
sumes that you are already somewhat familiar with javascript and that you have used javascript functions to create simple objects.
...for example, as
sume 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 as
sumes that each area it is told about is present in every browser window.
...if con
sumers 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 con
sumer 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 micro
summary a micro
summary generator is a set of instructions for creating a micro
summary from the content of a page.
... web pages can reference generators via <link rel="micro
summary"> elements in their <head> elements.
... creating regular expressions for a micro
summary 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 as
sumed 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 as
sumed to be responsible for the server at a particular network address).
...figure 4 as
sumes 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-con
suming calculations.
... syntax jsrefcount js_suspendrequest(jscontext *cx); void js_re
sumerequest(jscontext *cx, jsrefcount savedepth); name type description cx jscontext * the context whose current request is to be suspended or re
sumed.
... savedepth jsrefcount (only in js_re
sumerequest) the valued returned by the matching js_suspendrequest call.
...And 5 more matches
nsIPrincipal
boolean sub
sumes(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 sub
sumes() returns whether the other principal is equal to or weaker than this principal.
...a principal always sub
sumes itself.
...And 5 more matches
Debugger.Frame - Firefox Developer Tools
older the next-older visible frame, in which control will re
sume when this frame completes.
...the function should return a re
sumption value specifying how the debuggee’s execution should proceed.
...if any onstep handler forces the frame to return early (by returning a re
sumption 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 as
sumptions: it as
sumed that all user agent strings that include the substring "chrome" are chrome.
... it as
sumed that the lookbehind feature would always be available if the browser was chrome.
... most importantly, it as
sumed no other browsers would support the feature.
...And 5 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 re
sume a session begun by another socket.
... when this socket's session is finished, no other socket will be able to re
sume the session begun by this socket.
...And 4 more matches
nsIRequest
method overview void cancel(in nsresult astatus); boolean ispending(); void re
sume(); 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 as
sumptions made by the server and confuse users.
... re
sume() re
sumes the current request.
...And 4 more matches
Writing forward-compatible websites - Developer guides
as a simple example, don't as
sume that any browser in which "filter" in body.style tests true must be microsoft internet explorer and therefore e.g.
...don't as
sume 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 as
sume 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 as
sumption that none of the player spawned threads create gc'd things.
...this is a lot to ask from our c++ developers, so instead, mmgc as
sumes that every memory location might potentially contain a gc pointer.
...when the gc encounters a false positive, it has to as
sume 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 as
sumptions that permit the software to provide beneficial features, while also introducing the possibility of someone violating the trust as
sumptions to compromise security.
...one of the trust as
sumptions in the design of the html content rendering feature was that users would not receive malicious hyperlinks and click on them.
...trust as
sumptions 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 micro
summary-related css changes.
... browser/bookmarks/bookmarksproperties.css new file; includes micro
summary-related css.
... browser/browser.css needs to be updated to include new css for micro
summaries, 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 as
suming 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 as
sume that you installed firefox to the default location, and that drive c: is your windows startup disk.
...the commands listed here as
sume a bash-compatible shell.
...And 3 more matches
Embedding the editor
(the current nseditorshell makes as
sumptions 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 as
sumption 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 as
sume 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<download
summary> get
summary(atype); constants constant description public work on downloads that were not started from a private browsing window.
... get
summary() retrieves the specified type of download
summary 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 con
sumption of different programs.
...using the high-performance gpu can greatly increase power con
sumption, and should be avoided whenever possible.
... "energy impact" is a hybrid proxy measure of power con
sumption.
...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 re
sumed 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 re
sumes when the monitor is notified or when the timeout specified by the ticks parameter elapses.
... the re
sumption 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 sub
sumes another if its set bits are a superset of the other's.
... thus, a principal of 0 sub
sumes nothing, while a principals of ~0 sub
sumes all other principals.
... the absence of a principal is treated as if its bits were 0xffff, for sub
sumption purposes.
...And 3 more matches
Introduction to XPCOM for the DOM
important note: this document as
sumes 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 as
sume 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 decrementanimationcon
sumers(); imgirequest getstaticrequest(); void incrementanimationcon
sumers(); 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 decrementanimationcon
sumers() 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 re
sumenative(); 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.
... re
sumenative() re
sumes the use of additional platform-specific methods to run() gecko events on the main application thread.
... calls to suspendnative() and re
sumenative may be nested.
...And 3 more matches
Streams - Plugins
streams can be produced by the browser and con
sumed by a plug-in instance, or produced by an instance and con
sumed 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 con
sume.
...this maximum is only a promise to con
sume 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(); // cssmath
sum example let btnwidth = allcomputedstyles.get('width') console.log( btnwidth ); // cssmath
sum 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 cssmath
sum 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 cssmath
sum returned.
...And 3 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
</div> <h1>javascript typewriter</h1> <div id="article"> <p>lorem ip
sum dolor sit amet, consectetur adipiscing elit.
...nam turpis nunc, suscipit a hendrerit vitae, volutpat non ip
sum.</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 ip
sum 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 ip
sum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... example 2 html <div id="wid"> lorem ip
sum 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 ip
sum 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 re
suming 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 re
suming a download.
...although there is a response/request round-trip that con
sumes 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 as
sumed 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 ip
sum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
...</p> <p> lorem ip
sum 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 ip
sum 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
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
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 micro
summary 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 micro
summary 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 micro
summary topics micro
summary 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 as
sumed.
...in order to achieve aggregation of data, a content node implementation cannot make any as
sumptions about what kind of children it holds.
...well, let's take this problem to the natural extreme, and as
sume that there are n total possible representations for the same group of data.
...And 2 more matches
panel - Archive of obsolete content
attributes backdrag, close, con
sumeoutsideclicks, 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 ...
... con
sumeoutsideclicks type: boolean controls whether or not the event that caused the popup to be automatically dismissed (or "rolled up") should be con
sumed or be dispatched as a normal event.
...if it set to true the rollup event is con
sumed.
...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 con
sumers 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 as
sumptions 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 as
sumption, 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 as
sumptions 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 as
sumes 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...integer ligula ip
sum, 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...And 2 more matches
Positioning - Learn web development
sticky positioning example <h1>sticky positioning</h1> <p> lorem ip
sum dolor sit amet, consectetur adipiscing elit.
...integer ligula ip
sum, tristique sit amet orci vel, viverra egestas ligula.
...cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> <p> lorem ip
sum 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...vivamus varius libero at ip
sum mattis efficitur ut nec nisl.
...nulla facilisi.</p> </article> <article> <h2>the second tab</h2> <p>this tab hasn't got any lorem ip
sum 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 ip
sum dolor sit amet, consectetur adipisicing elit.
...set sit amet ip
sum mauris.
...lorem ip
sum 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, con
suming makefiles.
...if you wanted to create a con
sumer 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 con
sumer.
...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 con
sumes 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 re
sumerefreshuris(); void setchildoffset(in unsigned long offset); native code only!
...this is not refcounted and is as
sumed to be nulled out by the parent when the parent is going away.
...re
sumerefreshuris() 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 re
sumedownload(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 con
sumers 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 con
sumers to react to the removal.
...And 2 more matches
Getting Started Guide
in the example above, there is no reason to as
sume 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 as
sumption is that it does the same thing when assigning out.
... // incorrect as
sumptions 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); // as
suming 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...
... // as
suming 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...
...// as
suming 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 as
sumed to be encoded as utf-8.
... 8-bit strings are as
sumed 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 as
sumes 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 as
sumption 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 as
sumes you are familiar with.
... implementing download re
suming this document describes how an embedder or other gecko/necko-using application can implement download re
suming.
...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 as
sume 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 con
sumption.
... web developers need to know their pages’ actual memory con
sumption 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 con
sumed 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 re
sume 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 as
sume 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...lorem ip
sum 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(); // con
sume the key event } break; case "k": if (!event.getmodifierstate("shift")) { // handle accel + k event.preventdefault(); // con
sume 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(); // con
sume the key event break; case "arrowleft": case "left": // hack for ie and old gecko // do something different if scrolllock is locked.
... event.preventdefault(); // con
sume 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
fetch("some.json", {cache: "no-store"}) .then(function(response) { /* con
sume 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) { /* con
sume 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) { /* con
sume 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 pre
sumes 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 re
sume 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 re
sumes.
...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 pre
sumed 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 as
sume 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
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 ip
sum 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 ip
sum dolor sit amet, consectetur adipiscing elit.</blockquote> phasellus eget velit sagittis.
... all:unset <blockquote id="quote">lorem ip
sum 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...cras eu elementum dui.</p> <p class="auto"><code>text-justify: auto</code> —<br>lorem ip
sum dolor sit amet, consectetur adipiscing elit.
...cras eu elementum dui.</p> <p class="dist"><code>text-justify: distribute</code> —<br>lorem ip
sum dolor sit amet, consectetur adipiscing elit.
...And 2 more matches
HTTP Index - HTTP
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 re
sume a generator function (function* or legacy generator function).
... rv optional retrieves the optional value passed to the generator's next() method to re
sume its execution.
...each time the generator's next() method is called, the generator re
sumes 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 as
sume 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 pre
sumed 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
}); con
suming 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 async
sum = promised(
sum); var c =
sum(a, b); var casync = async
sum(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 con
sume 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 as
sumes 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 con
sumes the return value of the function that follows.
...our hash // function will just parse the last name, as our naive // implementation as
sumes 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; // as
sume 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 mat
sumoto, the developer behind the ruby scripting language, published a “free software license diagnostic” in his personal blog.
... the title hints at mat
sumoto’s diagnostic approach, since it mentions “free software.” this is slightly different from open source.
... (mat
sumoto 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 re
sume execution.
...fixme: not sure we should talk about this tool installation windows users can take advantage of a self-contained version created by soutaro mat
sumoto 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-su
sumu/ 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 as
sume it’s at c:\extensions\helloworld .
...as
suming 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 as
sumes 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 re
sumed automatically the next time firefox is run; 1 indicates that the downloads should be paused but will not automatically re
sume when the application is restarted; and 2 indicates that the downloads will be canceled on quit.
... default value is 0 (re
sume on next launch).
... browser.download.manager.re
sumeonwakedelay an integer value indicating the number of milliseconds to wait after the system wakes up from sleep before re
suming 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 as
sumes 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 as
sume 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 as
sumed 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 as
sumptions 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, as
sume 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 as
sumes 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 as
sumption 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 check
sum stored in the gdiff file, patch returns an error without applying the patch.
... after patch applies a patch, it compares a check
sum.of the resulting file against a check
sum stored in the gdiff file.
... if the check
sums 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
pre
sumably 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, as
suming 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 as
sume that the elements are xbl, not understand them, and your elements won't work correctly.
...for example, take this xul fragment, as
suming 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 pre
sumes 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 as
sume you want to skin the xul file, xulnote_sample1.xul.
...not only is the production of such interfaces democratized, in other words; the con
sumption 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 con
sumed by the browser.
... npn_write pushes data into a stream produced by the plug-in and con
sumed 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 con
sume.
... npstream represents a stream of data either produced by the browser and con
sumed by the plug-in, or produced by the plug-in and con
sumed by the browser.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
it is as
sumed that you have already downloaded, extracted, and con
sumed 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 con
suming xml via javascript.
...</comments> now that we've created this simple xml feed, we can now also con
sume it using the code from listing 11.
... listing 11 - con
suming 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 as
sumed 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 ip
sum, tristique sit amet orci vel, viverra egestas ligula.
...integer ligula ip
sum, tristique sit amet orci vel, viverra egestas ligula.
...integer ligula ip
sum, 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.
...as
suming you've used the post method, the following example just takes the data and displays it to the user.
...don't as
sume 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, as
suming 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, as
suming 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 con
sumer?
...now we want the con
sumers 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="list
summary" tabindex="-1">{{list
summary}}</h2> note: tabindex is a really powerful tool for handling certian accessibility problems.
...at the end of deletetodo(), use the list
summary 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.list
summary.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-con
suming.
...the only difference between their premium and their freemium plan is on the amount of con
sumption.
...the dashboard will provide you details related to how many minutes you have con
sumed, 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 con
suming 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 con
suming 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 as
sume) unix-based systems, but not to worry — they are available on most systems.
...all the operating systems (as
suming 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.
...as
suming 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 con
sumption.
...pnpm and yarn can con
sume 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> pre
sumably 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 as
sumed that this notification causes neither query content events nor composition events.
...if ime con
sumes an event, widget should return ns_success_event_con
sumed from nsiwidget::notifyime().
... note that if a mousedown event or a mouseup event is con
sumed 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 con
sumed and prevented by ime.
DMD
as
suming 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 con
sumption and should be avoided if possible.
...results in lower power con
sumption — 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 con
sumption 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 check
sum files required for the nss softoken to operate in fips 140 mode.
... the new check
sum file is called libsoftokn3.chk on unix/linux and softokn3.chk on windows.
...the libsoftokn3.chk/softokn3.chk file contains a check
sum for the softoken.
... when in fips 140 mode, the softoken is required to compute its check
sum 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 as
sumes 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 as
sumes 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 re
sume.
... 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 re
sume 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 re
sume until the current function returns or a breakpoint is hit.
... go to re
sume 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 re
sume 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"} }} as
sume 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 as
sumes that any destroyed pointer was pointing to an object that was part of the initial snapshot.
...as
sume that an incremental gc has already started, and a and b have been marked.
...now let's as
sume, 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
values are merely an opaque sequence of bytes, so their actual content is dependent on the mork con
sumer.
... hex = [0-9a-fa-f]+ name = [a-za-z_?:] [a-za-z_?:+-]* value is a string terminated by ')' (not con
sumed) 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 as
sumed default value; if the scope component is not present, it as
sumes this default value.
Starting WebLock
as
suming 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(); // as
sume 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 as
sumption 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 con
sumers.
... it allows con
sumers 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 as
sume that the variable dbconn is an opened mozistorageconnection.
mozIStorageFunction
this is an interface that must be implemented by con
sumers.
... it allows con
sumers 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 as
sume 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 "con
sumer" of the data to be read.
... example con
sume all data from an input stream using read().
... nsresult con
sumestream(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; } con
sume all data from an input stream using readsegments().
... nsacstring* pbuf = (nsacstring*) aclosure; pbuf->append(afromsegment, acount); // indicate that we have con
sumed 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 update
summarytotals(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); update
summarytotals() void update
summarytotals(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 as
suming it's encoded in acharset and return the converted string in utf-8.
...if not, convert it to utf-8, as
suming it's encoded in acharset, and return the result.
...no valid spec going around in mozilla code would break this as
sumption.
nsIXULWindow
xpfe/appshell/nsixulwindow.idlscriptable please add a
summary to this article.
... void as
sumechromeflagsarefrozen(); 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 ...
... as
sumechromeflagsarefrozen() begin as
suming chromeflags do not change hereafter, and assert if they do change.
... void as
sumechromeflagsarefrozen(); 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 con
sumption when selecting a latency value.
...this is likely to require increased power con
sumption.
... "playback" the user agent should select a latency that will maximize playback time by minimizing power con
sumption at the expense of latency.
... example this example instantiates an audio context for music playback (optimized for power con
sumption over latency), with the sample rate 48,000 hz.
Element.scrollHeight - Web APIs
example padding-top lorem ip
sum 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...praesent dictum ip
sum aliquet erat eleifend sit amet sollicitudin felis tempus.
...morbi feugiat, ip
sum 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, as
suming 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 con
sumers should not need to concern themselves further.
...when the request is finished you'll get a dom event and, as
suming 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, as
suming 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
re
sumes 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 con
sumption 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 re
sumes recording media.
... the values below are derived in part form a number of con
sumer 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 con
sumer.
...since a response body cannot be con
sumed 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 con
sumer by querying the readablestreamdefaultcontroller.desiredsize property on the controller.
... if later on the con
sumer 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 as
suming 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 as
sume 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 as
suming 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 as
sume 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...quisque vel turpis justo.</p> <h2 id="overview">overview</h2> <p>lorem ip
sum dolor sit amet, consectetur adipiscing elit.
...mauris efficitur tellus massa, id ullamcorper ip
sum fermentum eu.
...integer euismod lectus a ip
sum 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
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 ip
sum dolor sit amet, consectetuer adipiscing elit.
...suspendisse eget dolor.</p> <p class="red">lorem ip
sum 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 ip
sum dolor sit amet, consectetuer adipiscing elit.
...suspendisse eget dolor.</p> <p class="red">lorem ip
sum 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 ip
sum dolor sit amet, consectetuer adipiscing elit.
...fusce pulvinar lacus ac dui.</p> <p class="red">lorem ip
sum 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 ip
sum 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 ip
sum 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 ip
sum 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 ip
sum 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 ip
sum 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 ip
sum 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 ip
sum 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 ip
sum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
position - CSS: Cascading Style Sheets
html <div class="outer"> <p> lorem ip
sum dolor sit amet, consectetur adipiscing elit.
... vestibulum ante ip
sum primis in faucibus orci luctus et ultrices posuere cubilia curae; nam ac dolor augue.
... </p> <p> lorem ip
sum dolor sit amet, consectetur adipiscing elit.
... vestibulum ante ip
sum 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 ip
sum dolor sit amet, consectetur adipisicing elit.
...saepe optio accusamus doloribus sint facilis itaque ab nulla, dolor molestiae as
sumenda 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 ip
sum 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 ip
sum 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 ip
sum dolor sit amet, consectetur adipisicing elit, ...</strong> </p> <p>text-transform: none <strong><span>lorem ip
sum 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 ip
sum dolor sit amet, consectetur adipisicing elit, ...</strong> </p> <p>text-transform: capitalize <strong><span>lorem ip
sum 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 ip
sum dolor sit amet, consectetur adipisicing elit, ...</strong> </p> <p>text-transform: uppercase <strong><span>lorem ip
sum 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 ip
sum dolor sit amet, consectetur adipisicing elit, ...</strong> </p> <p>text-transform: lowercase <strong><span>lorem ip
sum 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 con
sumption.
Iterators and generators - JavaScript
done this is true if the last value in the sequence has already been con
sumed.
...iterating over an iterator is said to con
sume the iterator, because it is generally only possible to do once.
...arrays must be allocated in their entirety, but iterators are con
sumed only as necessary.
...when a value is con
sumed 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 re
sume execution of the async function after fulfillment.
... when re
sumed, 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 re
sume 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 re
suming execution of that caller.
Strict mode - JavaScript
assignments, which would accidentally create global variables, instead throw an error in strict mode: 'use strict'; // as
suming 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 as
sume 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, as
suming there are no dramatic changes in network performance or bandwidth.
... the play event is sent both when the media is re
sumed after being paused and when autoplay occurs.
...that could happen if the video is paused and re
sumed by the user or automatically by the browser when the document is in a background tab.
Index - XPath
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 = get
summary(jsonresponse); var element = document.getelementbyid("forecast_
summary"); element.textcontent =
summary; }; request.send(); }); function get
summary(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 as
sumes that you are already familiar with building an extension.
... coding practices namespace conflicts there are many namespaces which extensions often must share with other con
sumers, be they other add-ons, web code, or the browser itself.
...for example, "does an action in the browser." documentation as
sume 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 as
sumed 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 as
sume 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 as
suming a minimum version of firefox 17+ (or other gecko 17+ application) which you should remember to state explicitly in your install.rdf.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
however, these techniques may be relevant when the developer cannot as
sume 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-- as
suming that the image is the only thing that occupies that table cell.
... lorem ip
sum, 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 con
sumer 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 con
sumer versions of windows.
...or pehaps we should as
sume 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 as
sumed that there is a one-to-one correspondence between a presentation shell and a presentation context.
...pre
sumably 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 pre
sumably 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 as
sumptions are made when a particular jit code is generated.
... hence, guards are needed to prevent certain erroneous behaviour that might result from the as
sumptions 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 as
sumes 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 as
sumes 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 as
sumes 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 nsire
sumablechannel used to implement the download channel.
... this information is used to re
sume the download after it's been paused.
... autore
sume integer 0 if the file should not automatically re
sume 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 as
sume 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 con
sume 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 con
sume available space inside its window.
Multiple Rules - Archive of obsolete content
thus, you can as
sume that earlier rules handled earlier matches.
... for instance, if the first rule matched all folders, then the remaining rules can as
sume that any results that get past the first rule are not folders.
...we as
sume 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 micro
summary/feed/other stuff indicator suggestion about making the favicon create a bookmark for the page with a micro
summary.
... 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 micro
summary w/ script a user created patch that will allow script to run in a sandbox during the update of a micro
summary.
... 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 micro
summary generator questions and discussion surrounding micro
summaries 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, as
suming 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 micro
summaries.
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 micro
summaryresource 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 (con
sumed by the instance).
...a plug-in must con
sume at least as many bytes as indicated in the npp_writeready call.
0.90 - Archive of obsolete content
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.) con
sumers 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 as
sumed to be 0.
...if this attribute is omitted, then it is as
sumed to be the value of start + 20.
...if this attribute is omitted, then it is as
sumed 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) {}, onre
sume: function(asink) {}, onendload: function(asink) { asink.removexmlsinkobserver(this); alert("done!"); }, onerror: function(asink, astatus, aerrormsg) { alert("error!
...</window> as
suming 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 = /* as
sume we got this somehow!
The Business Benefits of Web Standards - Archive of obsolete content
as
sumptions 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 con
sumption by images.
... the development process: working in teams a common challenge for web developers when as
suming management of existing sites is the code written by other developers.
Bounding volume collision detection with THREE.js - Game development
it is as
sumed that before reading this you have read our 3d collision detection introductory article first, and have basic knowledge about three.js.
...we as
sume 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 as
sume 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 con
sumed 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 con
sumed 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 as
sumes that you are managing the potential for overflow.
...they largely work without as
sumptions 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 con
sumes.
...if you con
sume 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 con
sume videos, so you don't have to worry about the enormous bandwidth con
sumption.
...note that the third assessment question in this test as
sumes 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 con
sumer 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 con
suming users bandwidth and slowing down page load.
... let's take a look at video optimization, tackling the next 20% of bandwidth con
sumption.
Website security - Learn web development
the requests may simply be numerous, or they may individually con
sume large amounts of resource (e.g., slow reads or uploading of large files).
...always as
sume 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 as
sume 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 con
sumers 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 con
sumers of the component.
...this will be used if the component's con
sumer 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 as
sume they are capable.
... educated guesses you could call these "as
sumptions", 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 con
sume 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 con
sume 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 as
sumptions 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 as
sumptions, although there are a number of common characteristics.
...we cannot as
sume 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 as
sumes 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 as
sumes 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 pre
sumably the user isn’t doing something.
... for now, it is up to you as the con
sumer of this api to not accidentally write to the dom within the promisedocumentflushed callback.
...as
suming 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 con
sumed don't need to involve a mutex on each modification.
...that method is responsible for moving back to con
suming 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 re
sume the con
sumption of data from the network.
Geckoview-Junit Tests
tests can also be conditionally skipped using junit's as
sume or as
sumethat methods.
... for example: import org.junit.as
sume.as
sumethat ...
... as
sumethat(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 con
sume data from the input stream passed to the callback.
... example this example shows the basic code con
sumers would need to implement to be correct.
... if (!components.issuccesscode(aresult)) { // handle error return; } // con
sume 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 as
sumes the state of the promise returned by the callback.
...newpromise.then(null, components.utils.reporterror); note: more examples for con
suming promises are available in the promise object documentation.
... warning: when con
suming 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); sourcemapcon
sumer a sourcemapcon
sumer 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 sourcemapcon
sumer(rawsourcemap) the only parameter is the raw source map (either as a string which can be json.parse'd, or an object).
... sourcemapcon
sumer.prototype.originalpositionfor(generatedposition) returns the original source, line, and column information for the generated source's line and column positions provided.
Sqlite.jsm
con
sumers of this api can call the cancel function should they want to immediately abort the execution of the statement.
...as
sume 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 (as
suming the inserts proceed without error, of course).
Localization content best practices
create localizable strings don't as
sume 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 as
sumptions as to what those structures will be: instead, let locales/localizers decide.
... splitting splitting sentences into several keys often inadvertently pre
sumes 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.
...as
suming 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 as
sume 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 as
sumes that the given databases are in the old format.
...if this attribute is omitted, a default of 777 is as
sumed.
... by default, the tools (certutil, pk12util, modutil) as
sume that the given security databases follow the more common legacy type.
NSS tools : modutil
if the prefix sql: is not used, then the tool as
sumes that the given databases are in the old format.
...if this attribute is omitted, a default of 777 is as
sumed.
... by default, the tools (certutil, pk12util, modutil) as
sume 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 con
sumers 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 con
sumed.
... 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 con
sumes 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 re
sumes.
... to understand how this barrier works, first as
sume 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 jssub
sumesop sub
sumes; // 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 ...
... sub
sumes jssub
sumesop a pointe to the function which returns whether the first principal sub
sumes 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 jssub
sumesop bug 957688 - removed checkobjectaccess bug 924905 - added sub
sumes 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-con
suming calculations.
...this means that any potentially long-running operation in a native must be bracketed with calls to js_suspendrequest() and js_re
sumerequest().
... rc = js_suspendrequest(cx); read_size = recv(socket, buf, size, flags); js_re
sumerequest(cx, rc); ...
WebReplayRoadmap
this is time con
suming, 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 re
sumes 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 as
sume 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 con
suming 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 con
sumption.
... how much space could this con
sume 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 sha512
sums 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 .check
sums 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.check
sums 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 check
sum by running the following command, which should work in linux, macos, or windows in the mozillabuild environment: sha
sum --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 as
suming here that the charset of the url string is utf-8, and also as
suming 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); // as
sume 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 (as
suming it wasn't nsnull).
...next, it calls another method on an object that is pre
sumed to exist in this context.
XPCOM Stream Guide
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 con
sume.
... most streams are asynchronous: they make no as
sumptions that all the data a resource provides is available immediately.
... * * also, baseinputstream has been completely con
sumed 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 as
sume that the uri has uri_loadable_by_anyone set, but this will not work starting with the mozilla 2 platform.
... uri_loadable_by_sub
sumers 1<<14 the uris for this protocol can be loaded only by callers with a principal that sub
sumes this uri.
...if this is null, then utf-8 encoding is as
sumed 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>, as
suming the template builder creates real dom content.
... /xul/templates/public/nsixultemplatebuilder.idlscriptable please add a
summary to this article.
...this element pre
sumably 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 con
sumed by the browser.
... npn_write pushes data into a stream produced by the plug-in and con
sumed by the browser.
AudioContextLatencyCategory - Web APIs
values value description "balanced" the user agent should balance audio output latency and power con
sumption when selecting a latency value.
...this is likely to require increased power con
sumption.
... "playback" the user agent should select a latency that will maximize playback time by minimizing power con
sumption at the expense of latency.
CSSMathValue.operator - Web APIs
for example, if the current cssmathvalue subtype is cssmath
sum, this property will return the string "
sum".
... interface value cssmath
sum "
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') ); // cssmath
sum {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 cssmath
sum = cssnumericvalue.add(double | cssnumericvalue); parameters number either a number or a cssnumericvalue.
... return value a cssmath
sum exceptions typeerror indicates that an invalid type was passed to the method.
... examples let math
sum = css.px("23").add(css.percent("4")).add(css.cm("3")).add(css.in("9")); // prints "calc(23px + 4% + 3cm + 9in)" console.log(math
sum.tostring()); specifications specification status comment css typed om level 1the definition of 'add' in that specification.
CSSNumericValue.sub() - Web APIs
syntax var cssmath
sum = cssnumericvalue.sub(number); parameters number either a number or a cssmath
sum.
... return value a cssmath
sum exceptions typeerror indicates that an invalid type was passed to the method.
... examples let math
sum = css.px("23").
sum(css.percent("4")).
sum(css.cm("3")).
sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(math
sum.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 as
sume 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 con
sumption because there is only one handler function created.
... actually, regarding memory con
sumption, 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 loremip
sum = "<p>lorem ip
sum dolor sit amet, consectetur adipiscing" + " elit.
...etiam rutrum faucibus sem, vitae mattis ip
sum ullamcorper" + " eu.
...aliquam sed magna aliquam, vestibulum nisi at," + " cursus nunc.</p>"; function buildcontents() { for (let i=0; i<5; i++) { contentbox.appendchild(createarticle(loremip
sum)); if (!(i % 2)) { loadrandomad(); } } } the variable loremip
sum 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 as
sumed 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 as
sume 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(); con
sume 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 as
sume you can use thirty texture samplers per shader just because it works on your machine!
...this requires estimating the number of bytes con
sumed by each texture, for example.
...as
sume 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
as
suming 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, as
suming that the polyfill has been included or loaded using a prior <script> tag.
...pre
sumably 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 re
sume 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 re
sume() 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.re
sume(); } }, false); you might instead be working with an offlineaudiocontext, in which case you can re
sume the suspended audio context with the startrendering() method.
Web Authentication API - Web APIs
as
suming 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.
...as
suming 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.
...as
suming the validation is successful, the server will note that the user is now authenticated.
Window.openDialog() - Web APIs
window.opendialog() finds it useful because of its different default as
sumptions.
... default behavior the chrome and dialog features are always as
sumed 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 as
sumed "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, as
suming 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, as
suming // 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!" // as
suming 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
in other words, don't as
sume 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 as
sumptions 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 as
sume 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 as
sume 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 con
sume the content.
... for all of this to work, ats intercept almost all keyboard input and con
sume 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 con
suming and potentially confusing process.
...(this as
sumes 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 as
sumes 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 con
sume 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
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 ip
sum dolor sit amet, consectetur adipiscing elit.
...fusce iaculis, libero quis elementum viverra, nulla ante accumsan lectus, sit amet convallis lacus ip
sum 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 ip
sum 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 ip
sum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Index - Developer guides
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 con
sumed 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
html <p>the <strong>html definition element</strong> (<strong><dfn id="definition-dfn"><dfn></dfn></strong>) is used to indicate the term being defined within the context of a definition phrase or sentence.</p> <p>lorem ip
sum dolor sit amet, consectetur adipiscing elit.
...scrupulum, inquam, abeunti; </p> <p>negare non pos
sum.
...quid enim pos
sumus hoc agere divinius?
HTML documentation index - HTML: Hypertext Markup Language
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-con
suming operation.
... the tcp handshake itself is time-con
suming, 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 con
sume server resources, and under heavy load, dos attacks can be conducted.
parseInt() - JavaScript
if radix is undefined, 0, or unspecified, javascript as
sumes the following: if the input string begins with "0x" or "0x" (a zero, followed by lowercase or uppercase x), radix is as
sumed 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 as
sumed to be 8 (octal) or 10 (decimal).
...if radix is undefined or 0, it is as
sumed to be 10 except when the number begins with the character pairs 0x or 0x, in which case a radix of 16 is as
sumed.
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 as
sumption 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 as
sumed 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 as
sumed to be 0.
...if the second number is omitted, it is as
sumed 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 sha
sum using a command invocation such as this: sha
sum -b -a 384 filename.js | awk '{ print $1 }' | xxd -r -p | base64 notes: the pipe-through-xxd step takes the hexadecimal output from sha
sum and converts it to binary.
... the pipe-through-awk step is necessary because sha
sum 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, as
sume 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 ip
sum dolor sit amet"); var contents = clipboard.get(); set the clipboard contents to some html.
... var clipboard = require("sdk/clipboard"); clipboard.set("<blink>lorem ip
sum 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 }" }); // as
suming 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 }" }); // as
suming 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 as
sumed to be utf-8.
... if mode is not given, "r" is as
sumed, and the file is opened in read-only text mode.
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; }, re
sume: function() { console.log('re
suming...'); }, 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.re
sume(); 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.
...as
suming 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 as
sumed 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); // as
sume 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 as
sumptions are about the window structure, but it matched the values i got from spy++.
Miscellaneous - Archive of obsolete content
using string bundles from javascript as
suming 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; //as
sume 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: (as
suming 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: (as
suming 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 as
suming 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 as
suming <tr...
...for example, as
suming 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 sha1
sum, sha256
sum and so on.
...there are also gnu ports for win (besides usual suspects like cygwin), which are good for non-interactive use: sha256
sum 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...
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 as
sumptions 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 as
sumptions 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 as
sume 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 con
sume additional memory and add an extra layer of complexity to all property accesses and method calls.
Connecting to Remote Content - Archive of obsolete content
as
sume 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 as
sume 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 as
sume everything will work the same as with a single window.
...well, only if con
sumers of the class play nice and don't change anything they shouldn't.
Signing an XPI - Archive of obsolete content
*as
sumes you have a zip utility available on your system path.
... this procedure as
sumes 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).
Using Dependent Libraries In Extension Components - Archive of obsolete content
// as
sume 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...
... // as
sume 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 as
sume, however, that you are developing your extension using xul and javascript only.
...it as
sumes 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 "tooltip" above images, but that's not how it was meant to be used.
...this as
sumes 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 as
sume 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 as
sume 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
as
suming 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 as
suming 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 as
sumed 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 con
sumers 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 con
sumer devices.
Stress testing - Archive of obsolete content
tools for microsoft windows con
sume.exe from the windows server 2003 resource kit tools can con
sume 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 con
sume.
Table Cellmap - Archive of obsolete content
79 // this union relies on the as
sumption 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 as
sumes 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*" as
sume 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 as
sumptions that programmers make regarding ascii strings; the typical as
sumption being that they will never need to interoperate with code that as
sumes ucs2 strings.
... this as
sumption 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 as
sumes 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 as
sumes that os is your nsioutputstream // your_string here is the string you want to write.
Anonymous Content - Archive of obsolete content
as
suming that all explicit children have valid insertion points, the anonymous content is generated underneath the bound element.
...style rules can be written with the as
sumption 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 as
sumed 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 as
sume that all properties will be accessible on the binding.
Elements - Archive of obsolete content
if no phase is specified, a default of bubbling is as
sumed.
... [editor's note: a forthcoming dom events specification will pre
sumably 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 re
sumes.
Return Codes - Archive of obsolete content
patch_bad_check
sum_target -221 the check
sum generated for the source file does not match the check
sum in the xpi file.
... patch_bad_check
sum_result -222 the check
sum of the patched file failed.
XTech 2006 Presentations - Archive of obsolete content
micro
summaries in firefox and on the web - myk melez micro
summaries are regularly-updated compilations of the most important and timely information on web pages.
... this talk demonstrates how firefox will incorporate micro
summaries 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 as
sumed.
... locale/ us-en/ navigator.dtd the default directory underneath each of these main package subdirectories is as
sumed in the chrome url (i.e.
RDF Modifications - Archive of obsolete content
let's as
sume 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...
...as
suming 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.
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
we as
sume 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 as
sumed to fail in any future version of the application.
...the extension is as
sumed 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, as
suming 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 as
sume 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, as
suming 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 (as
suming 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 as
sumed 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
as
suming 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...
...as
sume you have an entity okbutton.label defined in file common.dtd.
Using nsIXULAppInfo - Archive of obsolete content
example 1: checking firefox version // as
suming 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 as
suming 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 as
sume 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 ...
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 as
suming 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 pre
sumably)?
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 re
sumt 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 con
sumed 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/re
sume 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 con
sumed by the browser.
... description npn_newstream creates a new stream of data produced by the plug-in and con
sumed 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 con
sumed by the browser.
... returns if successful, the function returns a positive integer representing the number of bytes written (con
sumed 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 con
sume.
...the npp_write function may pass a larger buffer, but the plug-in is required to con
sume only the amount of data returned by npp_writeready.
Getting Started - Archive of obsolete content
this tutorial as
sumes 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 as
sume you already possess the knowledge of the information taught in previous pages of this tutorial.
Introduction to SSL - Archive of obsolete content
the document as
sumes 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 (as
suming 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.
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 ip
sum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="greenscrollbox"> lorem ip
sum 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 ip
sum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="bisquescroll"> lorem ip
sum 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 ip
sum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="greenscrollbox"> lorem ip
sum 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 ip
sum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="redscroll"> lorem ip
sum 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 ip
sum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="redscroll"> lorem ip
sum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
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.
background-size - Archive of obsolete content
[i as
sume it's the same as safari, since they just backported a webkit patch into khtml.
... but we need facts, rather than as
sumptions.] 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 as
sume 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 as
sume 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 as
suming 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.re
sume(); } playtrack(track); playbutton.dataset.playing = true; }) }) }) note: you can see this demo in action here and view the source code here.
Desktop mouse and keyboard controls - Game development
let's as
sume 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 as
sume 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 as
sumed 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 as
suming 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 as
sumed 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 as
sumes the following definitions: context: a 2d canvas context.
Prefetch - MDN Web Docs Glossary: Definitions of Web-related terms
prefetching is when content is downloaded in the background, this is based on the as
sumption 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 as
suming which links the user is likely to click, then downloading the content of those links.
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
as
sume 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 as
sume 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 as
sume 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 as
sume 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 as
suming 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, con
suming 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 as
sume 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-con
suming to handle supply, payment, and shipment than to build a website where people can place orders.
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 as
sume 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 as
sume 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 con
sume 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 ip
sum</cite> lorem ip
sum 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 as
sume 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 as
sume they will work in all browsers.
From object to iframe — other embedding technologies - Learn web development
if someone else made it, as
sume 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.
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.re
sume(); } // 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 "con
sumer 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.
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 as
sume 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 con
sumed 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 as
sume 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 con
sumer; 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.
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.
Mozilla Plugin Accessibility
all browser keys unavailable when plugin has focus focused plugins currently have no choice but to con
sume all keyboard events.
...if the plugin needs those keystrokes, the can con
sume 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 as
sumes 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 as
sumed 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 as
sume that spaces between a element name and an attribute name have no effect, but do we know this is true?
...pre
sumably, 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 as
sume 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-con
suming.
The Firefox codebase: CSS Guidelines
other tips as
sume ="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 as
sume they already work correctly.
Eclipse CDT Manual Setup
(this as
sumes 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.
... as
suming everything went as expected, you should now find that eclipse's code assistance works a whole lot better.
Reviewer Checklist
as
sume 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-con
suming.
... message ordering cpows can violate as
sumptions 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 con
sumed by the receiving app.
... if the activity has a returnvalue set to true, then the activity is con
sumed 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 as
sume 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 as
sume that's not the case here).
...because of this, the following holds true (as
suming 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 as
sumes 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 as
sume 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 as
sume 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 as
sume 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, as
sume 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 as
suming a particular grammatical structure.
Localizing with Mozilla Translator
let's as
sume you have a firefox product in mt with the directory layout present in language packs, as you probably would need for a initial localization.
... ; as
suming 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 as
sumed.
... let's as
sume 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 (as
suming 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 as
sume 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, re
sume it.
... a cleaner snapshot would stop all threads, walk all their stacks, and then re
sume 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 con
sumption.
A brief guide to Mozilla preferences
a preference is any value or defined behavior that can be set (pre
sumably, one setting is preferable to another).
...for example, let's as
sume 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 as
sume that the basic semantics defined there are applicable here.
...if they cannot, because of some state corruption, then they must as
sume 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 re
sumes execution when the monitor is notified (as
suming 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 re
sumes 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 as
sumed to be a null-terminated c string.
... otherwise the text is as
sumed 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 re
sume 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 re
sume.
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 re
sumed.
... prbool re
sumed is pr_true when the session is re
sumed, and pr_false otherwise.
nss tech note3
if absent, the cert is as
sumed 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 as
sumed 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 as
sumed 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 as
sumes that all the preferences are on, so it will use any preferences in your policy.
PKCS11 FAQ
(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 as
sumed that such a symmetric key will always be extractable from the token into the browser?
...is it safe to as
sume that nss never calls c_createobject for those persistent objects?
FC_GetSessionInfo
a user may call fc_getsessioninfo without logging into the token (to as
sume 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 as
sumed, the user role is as
sumed, or the crypto officer role is as
sumed 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 as
sumes that the given databases are in the old format.
... by default, the tools (certutil, pk12util, modutil) as
sume 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 as
sumes 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 as
sumes that the given databases are in the old format.
... by default, the tools (certutil, pk12util, modutil) as
sume that the given security databases follow the more common legacy type.
NSS tools : pk12util
if the prefix sql: is not used, then the tool as
sumes that the given databases are in the old format.
... by default, the tools (certutil, pk12util, modutil) as
sume that the given security databases follow the more common legacy type.
NSS tools : signtool
the unix version of signtool as
sumes ~/.netscape unless told otherwise.
...blank lines are ignored, but white space on a line with keywords and values is as
sumed 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
if the prefix sql: is not used, then the tool as
sumes that the given databases are in the old format.
... by default, the tools (certutil, pk12util, modutil) as
sume 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 (as
suming 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) con
sume 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, as
suming 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, as
suming it is unintended.
...the correct code is, as
suming 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 as
sumptions 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 as
sumption 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, "md5
sum", {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, "md5
sum", 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 con
sumers that need to set slots on the global to put it in a consistent state.
... this api provides a way for con
sumers 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 check
sum: 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_con
sumejsontext (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 check
sum: 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_con
sumejsontext (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 con
sumers occurs.
...it is not recommended that applications con
sume 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 as
sumes 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 as
sume 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 pre
sumed 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; // as
sume initialized nsisupports* sample; compmanager->createinstance(ksamplecid, nsnull, kisupportsiid, (void**)&sample); in the above snippet, we as
sume that the component manager has been initialized.
Preface
however, this book does not as
sume any prior knowledge of com - all of the basic com ideas will be introduced.
... this book as
sumes 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 as
sumes 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) as
suming 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); // as
sumes 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 sub
sumed 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 sub
sumes that argument.
nsScriptableInputStream
« xpcom api reference
summary a component implementing nsiscriptableinputstream.
... example code const nsiscriptableinputstream = components.interfaces.nsiscriptableinputstream; function con
sumestream(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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumes 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 as
sumed to be null-terminated.
nsEmbedString
« xpcom api reference
summary constructors for nsembedstring.
...if equal to pr_uint32_max, then adata is as
sumed to be null-terminated.
imgIDecoderObserver
in general, any pre
sumed ordering between load and decode notifications should not be relied upon.
...unfortunately, this is currently the only way to signal decoding errors to con
sumers, and the only decoding errors that con
sumers 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, con
sumers must unregister or register themselves.
...therefore, con
sumers must unregister or register themselves.
mozIRegistry
summary clients will rely on nsrepository to create instances of a given class.
...those other components pre
sumably implement particular xpcom interfaces.
mozIStorageProgressHandler
the mozistorageprogresshandler interface lets storage con
sumers receive callbacks during the execution of sqlite requests.
... storage/public/mozistorageprogresshandler.idlscriptable please add a
summary to this article.
mozIStorageStatement
to initialize a statement, con
sumers should call mozistorageconnection.createstatement().
... note: con
sumers 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 check
sums 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 (check
summed).
nsIBrowserHistory
if aentiredomain is true, it will as
sume ahost is a domain, and remove all pages from the entire domain.
... aentiredomain if set to true, it will as
sume ahost is a domain, and remove all pages from the entire domain, including subdomains.
nsIChannel
load_retargeted_document_uri 17 if the end con
sumer 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 con
sumer for this load has been determined.
nsICommandLineRunner
toolkit/components/commandlines/public/nsicommandlinerunner.idlscriptable please add a
summary to this article.
...it as
sumes 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 con
sumer 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.
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 re
sumesearch(); [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(); re
sumesearch() void re
sumesearch(); 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 con
sumed by the stream.
... note: a non-blocking output stream may implement nsiasyncoutputstream to provide con
sumers 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 con
sumer 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 as
sumes there is http headers in the input buffer and continue to search for end of headers (crlfcrlf or lflf).
nsIPrintingPrompt
returning ns_ok as
sumes 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 con
sumer that asyncresolve should be used to wait for the pac file to finish loading.
... otherwise, the con
sumer 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 re
sume user interface updates after a previous call to startbatchchanges().
...call endbatchchanges() to re
sume user interface updates.
nsIStreamListener
inherits from: nsirequestobserver last changed in gecko 1.0 classes which want to con
sume 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 con
sumers observe dispatch activity on a thread.
... xpcom/threads/nsithreadinternal.idlscriptable please add a
summary to this article.
nsITransport
this interface allows the con
sumer of the stream to be notified when the stream can again be read.
...this interface allows the con
sumer of the stream to be notified when the stream can again accept more data.
nsIURI
password autf8string the optional password, as
suming the prehost consists of "username:password".
... username autf8string the optional username, as
suming the prehost consists of "username:password".
nsIURIFixupInfo
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description con
sumer nsisupports con
sumer that asked for the fixed up uri.
... preferreduri nsiuri best guess of what uri con
sumer 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 check
sum error occurred.
nsIWebBrowser
note: the implementation should not refcount the supplied chrome object; it should as
sume that a non nsnull value is always valid.
...otherwise, the implementation should not refcount this interface; it should as
sume 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 con
sumer.
... /** * this example as
sumes 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++ con
sumers 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 con
sumer 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 con
sumers of these flags.
XPCOM Interface Reference
ercryptonsiloginmanageriemigrationhelpernsiloginmanagerprompternsiloginmanagerstoragensiloginmetainfonsimimeinputstreamnsimacdocksupportnsimarkupdocumentviewernsimemorynsimemorymultireporternsimemorymultireportercallbacknsimemoryreporternsimemoryreportermanagernsimenuboxobjectnsimessagebroadcasternsimessagelistenernsimessagelistenermanagernsimessagesendernsimessagewakeupservicensimessengernsimicro
summarynsimicro
summarygeneratornsimicro
summaryobservernsimicro
summaryservicensimicro
summarysetnsimimeconverternsimimeheadersnsimodulensimsgaccountnsimsgaccountmanagerextensionnsimsgcompfieldsnsimsgcustomcolumnhandlernsimsgdbhdrnsimsgdbviewnsimsgdbviewcommandupdaternsimsgdatabasensimsgfilternsimsgfiltercustomactionnsimsgfilterlistnsimsgfoldernsimsgheaderparsernsimsgidentitynsimsgincomingservernsimsgme...
...rnsiprofilensiprofilelocknsiprofileunlockernsiprogramminglanguagensiprogresseventsinknsipromptnsipromptservicensipropertiesnsipropertynsipropertybagnsipropertybag2nsipropertyelementnsiprotocolhandlernsiprotocolproxycallbacknsiprotocolproxyfilternsiprotocolproxyservicensiproxyinfonsipushmessagensipushservicensipushsubscriptionnsiradiointerfacelayernsirandomgeneratornsirequestnsirequestobservernsire
sumablechannelnsirunnablensishentrynsishistorynsishistorylistenernsisockssocketinfonsisslerrorlistenernsisslsocketcontrolnsiscreennsiscreenmanagernsiscripterrornsiscripterror2nsiscriptableionsiscriptableinputstreamnsiscriptableunescapehtmlnsiscriptableunicodeconverternsiscrollablensisearchenginensisearchsubmissionnsisecuritycheckedcomponentnsiseekablestreamnsiselectionnsiselection2nsiselection3nsisel...
XPCOM Interface Reference by grouping
ker nsifileprotocolhandler nsifilespec nsifilestreams nsifileutilities nsifileview memory nsimemory network channel nsichannel nsichanneleventsink nsirequest nsirequestobserver nsire
sumablechannel 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 nsimicro
summary nsimicro
summarygenerator nsimicro
summaryobserver nsimicro
summaryservice nsimicro
summaryset ...
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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed to be null-terminated.
Reference Manual
nscomptr<nsifoo> foo = bar; // ns_assertion: "queryinterface needed" // ...even as
suming 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 as
sumed 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 as
sume 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 as
sumes 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 con
sumers 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 con
sumed 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
as
suming 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)?
... as
suming 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 as
sumes 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 con
sumer output stream for the quoted data.
... ns_imethod quotemessage( const prunichar *msguri, - the uri of the message to be quoted nsioutputstream *outstream) = 0; - the con
sumer 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 as
suming the dialog feature is specified.
... accessing content documents as
sume 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* re
sume; 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 }, { 're
sume': 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 re
sume events when the application is switched in and out.
...when the browser generates a paint message for the plug-in, it as
sumes that the plug-in is responsible for painting the entire area to be updated.
Plug-in Basics - Plugins
a plug-in con
sumes no resources other than disk space when it is not loaded.
...plug-ins con
sume 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 con
sume.
Structures - Plugins
structure
summary npanycallbackstruct contains information required during embedded mode printing.
... npstream represents a stream of data either produced by the browser and con
sumed by the plug-in, or produced by the plug-in and con
sumed by the browser.
Gecko Plugin API Reference - Plugins
npn_newstream requests the creation of a new data stream produced by the plug-in and con
sumed by the browser.
... npn_write pushes data into a stream produced by the plug-in and con
sumed 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 con
sumers.
... single-con
sumer overlays exist solely for organization.
Debugger.Object - Firefox Developer Tools
(this is always equal to obj.script.isgeneratorfunction, as
suming 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, as
suming 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 re
sume property, its value is taken as a re
sumption value, indicating how execution should proceed.
... (however, return re
sumption 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 re
sume) 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 re
sume the monitoring of network traffic using the pause button.
... pausing and re
sume network traffic recording the network monitor has a button that pauses and re
sumes 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 pre
sumably bubblesort().
... the ones colored plain green are pre
sumably the other sort functions.
about:debugging - Firefox Developer Tools
three states are possible: registering: this covers all states between the service worker's initial registration, and its as
suming control of pages.
... that is, it sub
sumes 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/re
sume button is clicked, the audiocontext.state is queried — if it is running, suspend() is called; if it is suspended, re
sume() is called.
... susresbtn.onclick = function() { if(audioctx.state === 'running') { audioctx.suspend().then(function() { susresbtn.textcontent = 're
sume context'; }); } else if(audioctx.state === 'suspended') { audioctx.re
sume().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 as
suming a particular size.
... this size may even be allowed to change over time, so you mustn't look at just the first block and as
sume the sample buffers will always be the same size.
CSSMathValue - Web APIs
cssmathinvert cssmathmax cssmathmin cssmathnegate cssmathproduct cssmath
sum 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') ); // cssmath
sum {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 - Web APIs
cssmathinvert cssmathmax cssmathmin cssmathnegate cssmathproduct cssmath
sum cssmathvalue cssnumericarray cssperspective csspositionvalue cssrotate cssskew cssskeyx cssskeyw csstranslate cssunitvalue properties none.
... cssnumericvalue.to
sum 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 re
sume 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 re
suming a session without the explicit sign-in flow of an expired session.
DOMPointInit.x - Web APIs
in general, positive values x mean to the right, and negative values of x means to the left, as
suming 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 as
sumed 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 ip
sum 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 ip
sum 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 ip
sum 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 ip
sum 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 // as
suming 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 // as
suming 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
summary the getastext method provides the file's data interpreted as text using a given encoding.
...if this string is empty, utf-8 is as
sumed.
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 // as
suming '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 con
sumption.
... premultipliedalpha: boolean that indicates that the page compositor will as
sume 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 re
sume the iteration where a previous cursor has been closed, without having to compare the keys one by one.
... example here’s how you can re
sume 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 as
sumptions from working with other types of databases, you might get thrown off when working with indexeddb.
...since such catastrophic events are rare, most con
sumers should not need to concern themselves further.
InputDeviceCapabilities API - Web APIs
to deal with this, developers make as
sumptions and use heuristics to normalize behavior on web pages.
...we can as
sume 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 as
sumed to have a version of 0.0.0.0.
...if the file has been deleted, its version is as
sumed 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 as
sumed if this parameter is not specified.
MediaRecorder - Web APIs
mediarecorder.re
sume() re
sumes recording of media after having been paused.
... mediarecorder.onre
sume an eventhandler called to handle the re
sume event, which occurs when media recording re
sumes 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 re
sume() methods to pause and re
sume recording of the source media.
... reference blobevent each time a chunk of media data is finished being recorded, it's delivered to con
sumers in blob form using a blobevent of type dataavailable.
NodeList - Web APIs
for example, node.childnodes is live: const parent = document.getelementbyid('parent'); let child_nodes = parent.childnodes; console.log(child_nodes.length); // let's as
sume "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 as
sumes it only has to deal with element objects.
OfflineAudioContext - Web APIs
deprecated methods offlineaudiocontext.re
sume() re
sumes the progression of time in an audio context that has previously been suspended.
... note: the re
sume() method is still available — it is now defined on the baseaudiocontext interface (see baseaudiocontext.re
sume()) and thus can be accessed by both the audiocontext and offlineaudiocontext interfaces.
Pointer events - Web APIs
much of today's web content as
sumes 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 as
sumes mouse-only input will work as is without direct modification.
RTCConfiguration - Web APIs
if this value isn't included in the dictionary, "balanced" is as
sumed.
...if the policy isn't specified, all is as
sumed by default, allowing all candidates to be considered.
RTCOutboundRtpStreamStats - Web APIs
qp
sum 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.
Using Service Workers - Web APIs
however, it made many as
sumptions about what you were trying to do and then broke horribly when your app didn’t follow those as
sumptions 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.
SubtleCrypto - Web APIs
even as
suming 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
summary returns the x coordinate of the touch point relative to the screen, not including any scroll offset.
... in following simple code snippet, we as
sume 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
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 as
sume 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 re
sume.
... usage notes there are several reasons why a webgl context may be lost, making it necessary to re-establish the context before re
suming rendering.
Writing WebSocket servers - Web APIs
this article as
sumes you're already familiar with how http works, and that you have a moderate level of programming experience.
...for example, let's as
sume 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.re
sume(); } 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 as
suming 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.re
sume(); 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.re
sume(); } // 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 as
sumes "text/xml".
... note: if the server doesn't provide a content-type header, xmlhttprequest as
sumes 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 (as
suming 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 pre
sumed 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 as
sume 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 con
sumed, preventing the browser from performing any action based on the keystroke.
overflow-block - CSS: Cascading Style Sheets
examples html <p>lorem ip
sum dolor sit amet, consectetur adipiscing elit.
...vestibulum ante ip
sum 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...vestibulum ante ip
sum 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 as
sumption about the writing mode of the document.
...modern layout methods encompass the range of writing modes and so we no longer as
sume 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, as
sumes 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.
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 as
sumed 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 ip
sum</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 ip
sum</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 ip
sum 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 ip
sum 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...curabitur a ip
sum ac diam mattis volutpat ac ut elit.
break-before - CSS: Cascading Style Sheets
html <article> <h1>main heading</h1> <h2>subheading</h2> <p>lorem ip
sum dolor sit amet, consectetur adipiscing elit.
...curabitur a ip
sum ac diam mattis volutpat ac ut elit.
font-size - CSS: Cascading Style Sheets
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: as
suming 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 (as
suming that the browser's font-size has been left at the default value of 10px).
grid-area - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed 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 as
sumed to have that name for the purpose of counting this span.
grid-row - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are as
sumed 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 as
sumed 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 ip
sum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> <p>lorem ip
sum 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 ip
sum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> <p>lorem ip
sum 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...aliquam accumsan tellus ac erat posuere.</p> <p class="vertical">lorem ip
sum 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 re
suming 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...
... re
sume speechsynthesisevent web speech api a paused utterance is re
sumed.
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 con
sumed 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 con
sumption 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 ...
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
controls if this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/re
sume 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
while this can provide additional information to the user, you should not as
sume 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
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 ...
<table>: The Table element - HTML: Hypertext Markup Language
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.
<video>: The Video Embed element - HTML: Hypertext Markup Language
controls if this attribute is present, the browser will offer controls to allow the user to control video playback, including volume, seeking, and pause/re
sume 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
<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 as
sume 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 (as
suming 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 as
sumption that the user will play it.
Using HTTP cookies - HTTP
however, do not as
sume 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 con
sumer 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
some of the supported algorithms, including unix
sum 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=,unix
sum=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 as
sumed 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 as
suming 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 re
sume 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 re
suming 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 con
sumers of already-created promises, this guide will explain con
sumption 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 re
sumes with morecriticalstuff().
Inheritance and the prototype chain - JavaScript
please note that the code below is free-standing (it is safe to as
sume 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 con
sumed by this data will never be released and can lead to memory related issues such as the browser becoming increasingly slower.
... this algorithm as
sumes 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 sub
sumed 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 as
sume 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 as
sumed 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() as
sumes a local time zone, but given a simplification of the iso 8601 calendar date extended format such as "2014-03-07", it will as
sume 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 as
sumed 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 as
sume 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 as
sumed 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 as
sume 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 as
sumed 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 as
sume 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 as
sume that date refers to window.date() instead of a local variable called date.
... but, in the code using eval(), the browser cannot as
sume 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().
async function - JavaScript
await expressions suspend progress through an async function, yielding control and subsequently re
suming 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 con
sume 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: con
suming 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 con
sume 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 con
sumes sync iterables and generators.
...in such case for await...of throws when con
suming 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, as
sume you want to create a property with that name on the global object.
... foo = 'f' // in non-strict mode, as
sumes 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
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
as
suming 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 as
sume 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 con
sume 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 con
sume 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 con
sumption 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 as
sumptions.
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.
... as
suming 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 con
sumption issues.
... use requestanimationframe() instead of setinterval() calls to window.setinterval() run code at a pre
sumed 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, as
sume 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 as
sumed 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 pre
sumed to be defined in the srgb color space unless a more precise embedded profile is specified within content data.
... srgb the source profile is as
sumed to be srgb.
divisor - SVG: Scalable Vector Graphics
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.
<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"...
...as
suming the simplest case (where the input image's pixel grid aligns perfectly with the kernel's pixel grid) and as
suming 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 ip
sum dolor sit amet, consectetur adipiscing elit.
...nullam magna ip
sum, 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 as
sumed to be within the edge of the circle.
... if the focal point isn't given at all, it's as
sumed to be at the same place as the center point.
Paths - SVG: Scalable Vector Graphics
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 as
sumed to be a reflection of the one used previously.
...if not, then the control point is as
sumed 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"><<slot name="element-name">need name</slot>></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"><<slot name="element-name">need name</slot>></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...
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 con
sumer 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 con
sume lots of interesting code that has already been developed.
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 (as
suming 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; ...
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".
File I/O - Archive of obsolete content
navigating with nsifile get a file in given directory let us as
sume 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, as
suming 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 (as
suming 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 ip
sum</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 as
sumes 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 as
suming 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 as
suming 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 as
sumed 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 as
sume 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.
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.
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, as
suming 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.
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 re
sume, and, optionally, integration with the download manager ui.
Search Extension Tutorial (Draft) - Archive of obsolete content
the following file, for instance, would change the default keyword search engine, as
suming 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.
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 names
summary: the use of the underscore character in css can lead to major display problems in multiple browsers.
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; } } ...
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 as
sume 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++ ) { // as
suming 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 con
sumer 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...
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...
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 (pre
sumably using the guid, which is available in record.id) and update it to the new values provided in record.
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 as
sumes 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 ...
Menu - Archive of obsolete content
(as
sume 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.
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;},re
sume: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...
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-con
suming.
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 con
sumptions managment pandora: pandora@prism.app.webapp internet radio that only plays music you like.
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, as
sume 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...
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...
image - Archive of obsolete content
« 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, setcon
sumerollupevent, showpopup, sizeto examples the following example shows how a menupopup may be attached to a menulist.
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-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-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?
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.
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-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 ...
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 ...
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.
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.
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.
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.
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 con
sumed by the plug-in, or produced by the plug-in and con
sumed 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.
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.
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 as
sumes 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.
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 (as
suming 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 ...
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.
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 (as
suming 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.
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); // as
suming '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 as
sumes that the controls will be bound to instance nodes of simple content type.
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++ ) { // as
suming 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++ )...
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 as
sumes 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.
Tiles and tilemaps overview - Game development
here are examples showing how to translate from world coordinates to screen coordinates and back again: // these functions as
sume 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...
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 ...
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 con
sumer of the resulting data).
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 ...
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.
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, con
suming 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.
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.
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.
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 con
suming 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.
HTML Tables - Learn web development
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.
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-con
suming 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...
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.
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 as
sumed to be a variable name, property name, a reserved word, or similar.
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.
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 // as
suming 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.
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.
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 as
sumed.
Simple Thunderbird build
as
suming 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 (as
suming 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 con
sumers 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 as
sumed, 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.
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_re
sumable (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 con
sumed before the new frame scripts are loaded.
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 ...
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 con
sumed 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 as
sumed.
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 as
sumes the developer attached a json string // to the the "autocompletesearchparam" attribute or "searchparam" property // of the <textbox> element.
IPDL Best Practices
following actor construction, the parent will send a kickoffquery message and pre
sumably 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 as
sume 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 con
sumers 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 con
sumers 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 as
sumed 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 (pre
sumably large) buffer by chunks.
PopupNotifications.jsm
methods locationchange() the con
sumer 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 as
sumes the state * of promise passed as value.
Promise.jsm
it will eventually as
sume 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); // as
suming 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 as
sumed to be plain text.
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
as
suming 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 as
sume 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) as
suming 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 as
sume grammar in composite strings splitting sentences into several keys often inadvertently pre
sumes a grammar, a sentence structure, and such composite strings are often very difficult to translate.
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 as
sumed 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 con
sumed at any given time, it does give an indication of how much memory we're con
suming.
Intel Power Gadget
specificially, the temperature is a proxy measurement that is affected by processor power con
sumption, 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 re
sumed after start.
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 (pre
sumably 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 con
sumed.
TimerFirings logging
this is useful because timer firings are a major cause of wakeups, which can cause high power con
sumption.
perf
for these reasons rapl is usually a better tool for measuring power con
sumption on linux.
Phishing: a short definition
services as
suming 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> as
sume 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 re
sumes execution on the next line when re
sumed.
MailNews automated testing
enhanced logging: supports generating rich json streams to disk or over the network for con
sumption by logsploder or other tools.
Index
found 1 pages: # page tags and
summary 1 index found 1 pages: ...
Optimizing Applications For NSPR
if the spawned thread establishes and exits before the parent thread is re
sumed, the parent will be left with an invalid pointer to the child.
Monitors
when the calling thread re
sumes, it has the same entry count it had before the wait operation.
Named Shared Memory
no as
sumptions about the persistence of data in the named file should be made.
PRErrorCode
nspr as
sumes error numbers starting at -6000 (decimal) and progressing towards zero.
PRThreadScope
the process is as
sumed to be globally scheduled, but nspr can manipulate local threads without system intervention.
PR_Interrupt
it is as
sumed 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, as
suming that the nspr library and the host system are both configured to utilize ipv6 addressing.
PR_Now
you cannot as
sume 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 as
sumed 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 as
sumes 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, as
suming that the certificate has been verified already.
NSS 3.19.2 release notes
con
sumers 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 (as
suming 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 re
sumption in tls 1.3.
NSS 3.28 release notes
nss will now no longer as
sume 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 re
sumption 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 as
sumes 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 re
sumption 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 con
sumers can query to further refine trust decisions.
NSS API Guidelines
in short: header files for con
sumption outside nss start with "nss." header files with types have a trailing "t", header files with prototypes don't.
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 as
sumes 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 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 as
sume the nss user role).
FC_CloseSession
a user may call fc_closesession without logging into the token (to as
sume the nss user role).
FC_CopyObject
a user must log into the token (to as
sume the nss user role) before copying a secret or private key object.
FC_CreateObject
a user must log into the token (to as
sume the nss user role) before calling fc_createobject.
FC_Decrypt
a user must log into the token (to as
sume the nss user role) before calling fc_decrypt.
FC_DecryptDigestUpdate
a user must log into the token (to as
sume the nss user role) before calling fc_decryptdigestupdate.
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 con
sumer 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 (`re
sumerecv) nshttpconnection::re
sumerecv 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 con
sumes 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 as
sumes 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 as
sumed to be empty.
SpiderMonkey compartments
spidermonkey simply as
sumes 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 com
suming 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 con
suming resources.
Invariants
(one reason for this is that the object may have watchpoints set; the watchpoint machinery as
sumes that all objects with watched properties are native.
JIT Optimization Strategies
this optimization makes the as
sumption 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 as
sume *objp is null on entry.
JSObjectPrincipalsFinder
description the javascript engine calls this callback to obtain principals for a jsprincipals.sub
sume 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 sub
sume properties bug 884676 - changed refcount type to mozilla::atomic ...
JSTraceOp
jstraceop implementation can as
sume 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_re
sumerequest.
JS_DeepFreezeObject
this will not recurse through non-extensible objects, on the as
sumption that those are already deep-frozen.
JS_NewObject
if the parent is non-null, we as
sume 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 con
sume 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_re
sumerequest.
JS_malloc
do not make as
sumptions based on this implementation detail.
JSAPI reference
js_beginrequest js_endrequest js_yieldrequest obsolete since jsapi 18 js_suspendrequest obsolete since jsapi 18 js_re
sumerequest 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 check
sum: 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 check
sum: eaad8815dcc66a717ddb87e9724d964e).
SpiderMonkey 17
you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/mozjs17.0.0.tar.gz (md5 check
sum: 20b6f8f1140ef6e47daa3b16965c9202).
Split object
spidermonkey as
sumes 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 as
sumed to be immediately after the first item, and so forth.
TPS Tests
phase implementation (mandatory) it's worth noting that some parts of tps as
sume 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 as
sumes 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 as
sumption 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 as
sume that the file being retrieved is a jar file, regardless of its mime type (in other words, its mime type was as
sumed to be application/zip, regardless of what it actually was).
Signing Mozilla apps for Mac OS X
once the application bundle is signed, this file will contain the hashes/check
sums 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 as
sumed 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); as
suming 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 con
sumers 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 micro
summaries nsimicro
summaryservice 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.
Aggregating the In-Memory Datasource
that is, you want to reflect the contents of something as an rdf graph (pre
sumably 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 con
sumed by the program does not increase.
Setting up the Gecko SDK
as
suming 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-con
suming 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-con
suming 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, as
suming 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, as
sume 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() (as
suming 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 sub
sumes.
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, as
suming 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, as
sume 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.
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, con
sumers of cards may fail unpredictably or return incorrect results.
nsMsgNavigationType
for example to move forward a message, you would call: // as
suming 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.
nsMsgViewCommandType
for example to mark a message read, you would call: // as
suming 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, as
suming this will leave your database locked.
Weak reference
the following as
sumes that any nsiobserver that is passed in also implements nsisupportsweakreference.
Working with out parameters
as
suming 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
as
suming 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
as
suming 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 sub
sumed 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 as
sume 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 as
suming 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 as
sume 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
as
suming this on chrome.manifest: overlay chrome://messenger/content/mailwindowoverlay.xul chrome://myext/content/thunderbird-overlay.xul add the next in thunderbird-overlay.xul.
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; // as
suming 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: //as
sume 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 as
sumed to be utf-8, and is as
sumed to be null terminated.
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 re
sume 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 ...
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 re
sumes execution of the script you're debugging.
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 re
sume 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 ...
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.
AbstractWorker - Web APIs
this code as
sumes 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
the play() method of the web animations api's animation interface starts or re
sumes playing of an animation.
Animation - Web APIs
animation.play() starts or re
sumes playing of an animation, or begins the animation again if it previously finished.
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
the as
sumption was that since you get an attr object from an element, you should already know the associated element.
AudioContext - Web APIs
audiocontext.re
sume() re
sumes the progression of time in an audio context that has previously been suspended/paused.
AudioTrack.enabled - Web APIs
note: this example as
sumes 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-con
suming, 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.re
sume, or audiocontext.close).
Blob - Web APIs
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 (as
suming the data contains an image, of course).
Body.body - Web APIs
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 con
sumed, 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 to
sum() on cssnumericvalue.
CSSNumericValue.equals() - Web APIs
let cssmath
sum = new cssmath
sum(css.px(1), css.px(2)); let matchingcssmath
sum = new cssmath
sum(css.px(1), css.px(2)); // prints true console.log(cssmath
sum.equals(matchingcssmath
sum)); let othercssmath
sum = cssmath
sum(css.px(2), css.px(1)); // prints false console.log(cssmath
sum.equals(othercssmath
sum)); // also prints false console.log(css.cm("1").equal(css.in("0.393701"))); specifications specifi...
CSSNumericValue.mul() - Web APIs
examples let math
sum = css.px("23").mul(css.percent("4")).mul(css.cm("3")).mul(css.in("9")); // prints "calc(23px * 4% * 3cm * 9in)" console.log(math
sum.tostring()); specifications specification status comment css typed om level 1the definition of 'mul' in that specification.
CSSNumericValue.type - Web APIs
examples let math
sum = 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 = math
sum.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 ip
sum dolor sit amet, consectetur adipiscing elit.
CSS Object Model (CSSOM) - Web APIs
css typed object model cssimagevalue csskeywordvalue cssmathinvert cssmathmax cssmathmin cssmathnegate cssmathproduct cssmath
sum cssmathvalue cssmatrixcomponent cssnumericarray cssnumericvalue cssperspective csspositionvalue cssrotate cssscale cssskew cssskewx cssskewy cssstylevalue csstransformcomponent csstransformvalue csstranslate cssunitvalue cssunparsedvalue cssvariablereferencevalue stylepropertymap stylepropertymapreadonly obsolete cssom interfaces ...
CSS Typed Object Model API - Web APIs
cssnumericvalue.to
sum 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 - Web APIs
// both fetch() and cache.put() "con
sume" the request, so we need to make a copy.
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 as
sume the color of the next color stop.
Crypto.getRandomValues() - Web APIs
examples /* as
suming 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
this value is as
sumed to be 1 by default if not included in the dompointinit object passed into frompoint().
DOMPointInit.y - Web APIs
if this property is missing when the dompointinit object is passed into frompoint(), the value is as
sumed to be 0 by default.
DOMPointInit.z - Web APIs
if this property is missing when the dompointinit object is passed into frompoint(), the value is as
sumed to be 0 by default.
DOMPointInit - Web APIs
dompointinit.z an unrestricted floating-point value which gives the point's z-coordinate, which is (as
suming 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, as
suming 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, as
suming 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), as
suming no transforms have resulted in a reversal.
Document.createDocumentFragment() - Web APIs
html <ul id="ul"> </ul> javascript var element = document.getelementbyid('ul'); // as
suming 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', // as
suming 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
as
suming 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.
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 ip
sum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Element.clientTop - Web APIs
padding-top lorem ip
sum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Element.innerHTML - Web APIs
const name = "john"; // as
suming '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
example padding-top if you can see this, scrolltop = 0 lorem ip
sum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
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 as
sumes 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); // as
suming that "preview" is the div output where the content will be displayed.
File.name - Web APIs
syntax var name = file.name; value a string, containing the name of the file without path, such as "my re
sume.rtf".
File.type - Web APIs
it is as
sumed based on the file extension; a png image file renamed to .txt would give "text/plain" and not "image/png".
FileRequest - Web APIs
summary the filerequest interface extends the domrequest interface to provide some extra properties necessary for the lockedfile objects.
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); as
suming 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.
FontFaceSet.load() - Web APIs
examples // returns a promise that will be fulfilled or rejected according the success to load myfont // the code in 'then' can as
sume 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...
HTMLCollection - Web APIs
for example, as
suming 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 // as
sumes 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 // as
sumes 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 // as
sumes 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.
HTMLMediaElement.play() - Web APIs
for example, a site should not present a user interface that as
sumes playback has begun automatically, but should instead update their ui based on whether the returned promise is resolved or rejected.
Option() - Web APIs
examples just add new options /* as
suming 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 /* as
suming 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 /* as
suming 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 ...
HTMLTextAreaElement - Web APIs
etc. ]</p> <p><textarea name="mytxtarea" rows="10" cols="50">lorem ip
sum 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 // as
sumes 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.
Drag Operations - Web APIs
this has the effect of inserting the dragged text where it was dropped, as
suming that the drop target is an area of text such as a p or div element.
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 con
sumers should not need to concern themselves further.
enabled - Web APIs
summary indicates whether or not software installation is enabled for this client machine.
Keyboard.lock() - Web APIs
as
suming 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(); // con
sume 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
for a given key press, the sequence of keyboardevents fired is as follows as
suming that event.preventdefault is not called: a keydown event is first fired.
Keyboard API - Web APIs
as
suming 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
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.location - Web APIs
summary the location property is a zero-based index representing the position of the read/write pointer 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 re
sume 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"' as
suming 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 re
sume 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.re
sume(); // re
sume recording } } mediarecorder.onpause = function() { // do something in response to // recording being paused } mediarecorder.onre
sume = function() { // do something in response to // recording being re
sumed } ...
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 as
suming the mediarecorder's state is inactive, start() sets the state to recording, then begins capturing media from the input stream.
NDEFRecord.id - Web APIs
web nfc does not sign the nfc content, thus record con
sumer should not make any as
sumptions about integrity or authenticity of the identifier or any other part of the records.
Navigator.onLine - Web APIs
so while you can as
sume that the browser is offline when it returns a false value, you cannot as
sume that a true value necessarily means that the browser can access the internet.
Node.removeChild() - Web APIs
in the second syntax form, however, there is no oldchild reference kept, so as
suming 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
if callback is provided, and it returns boolean false when called, the current recursion level is aborted, and the function re
sumes execution at the last parent's level.
Notification.requestPermission() - Web APIs
possible values for this string are: granted denied default examples as
sume 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 as
sume 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 as
sume 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...
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 re
sume 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 as
sumed 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.
PaymentRequest: paymentmethodchange event - Web APIs
the code as
sumes 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.
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 con
suming 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 as
sume 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 - Web APIs
note that this can result in slower response times or increased power con
sumption (with a gps chip on a mobile device for example).
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 as
sumed.
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; pre
sumably this would be implemented to transmit a shutdown signal to the remote peer prior to terminating the connection.
RTCIceCandidateStats.address - Web APIs
otherwise, the address is pre
sumed to be a fully-qualified domain name, which is resolved first using an aaaa record (as
suming ipv6 is available), then using an a record (if no result is found or the device onlu supports ipv4).
RTCPeerConnection.addIceCandidate() - Web APIs
// this example as
sumes 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 as
sumes onnegotiationneeded is set up).
RTCRtpStreamStats.ssrc - Web APIs
you should not make any as
sumptions 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
qp
sum 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
the format of the id string is not defined by the specification, so you cannot reliably make any as
sumptions about the contents of the string, or as
sume 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 con
sumer can also use a default reader.
ReadableStream - Web APIs
methods readablestream.cancel() cancels the stream, signaling a loss of interest in the stream by a con
sumer.
Selection.modify() - Web APIs
nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas as
sumenda 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, as
suming 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 as
sume 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 as
sumptions about what you are trying to do, and then break when those as
sumptions 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.re
sume().
SpeechSynthesis - Web APIs
speechsynthesis.re
sume() puts the speechsynthesis object into a non-paused state: re
sumes 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.
Streams API - Web APIs
the examples are as follows: simple stream pump: this example shows how to con
sume 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 as
sumes that you don't need to allocate space for a zero terminator.
Touch.clientX - Web APIs
in this example, we as
sume 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
in this example, we as
sume 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
in following simple code snippet, we as
sume 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
in following simple code snippet, we as
sume 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
summary returns the x radius of the ellipse that most closely circumscribes the area of contact with the touch surface.
Touch.radiusY - Web APIs
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
summary returns the y coordinate of the touch point relative to the screen, not including any scroll offset.
TouchEvent.altKey - Web APIs
summary a boolean value indicating whether or not the alt (alternate) key is enabled when the touch event is created.
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 // as
sumes 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 - 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 // as
suming 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.
WebGLTransformFeedback - Web APIs
bgl2renderingcontext are useful: webgl2renderingcontext.createtransformfeedback() webgl2renderingcontext.deletetransformfeedback() webgl2renderingcontext.istransformfeedback() webgl2renderingcontext.bindtransformfeedback() webgl2renderingcontext.begintransformfeedback() webgl2renderingcontext.endtransformfeedback() webgl2renderingcontext.pausetransformfeedback() webgl2renderingcontext.re
sumetransformfeedback() 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 ip
sum 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 as
sumed 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 (as
suming, 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.
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.
Using bounded reference spaces - Web APIs
this approximates human height, though it as
sumes 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 as
sume these are under a permissive license due to their frequent reuse, ownership is not certain.
WebXR permissions and security - Web APIs
implicit user intent (implicit user consent) is as
sumed 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 pre
sumed to be located at or near the center of the room or surface.
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 as
suming 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.innerHeight - Web APIs
example as
suming 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.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
summary returns the pkcs11 object, which is used to install drivers and other software associated with the pkcs11 protocol.
WorkerGlobalScope.dump() - Web APIs
for example, on mac os x you'd run it using something like this (as
suming 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 as
sumes 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=ip
sum"); // xhr.send(new int8array()); // xhr.send(document); specifications specification status comment xmlhttprequestthe definition of 'send()' in that specification.
XRHandedness - Web APIs
as
suming 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 as
suming 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 (pre
sumably since the user is unlikely to start to fly).
XRPermissionDescriptor - Web APIs
if the permissions api isn't available at all, this example simply as
sumes 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 as
sumed 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 pre
sumes that if the user actually intentionally completed the drag, user.heldobject will be null here.
XRSession: selectend event - Web APIs
the mybegintracking() function would pre
sumably 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 pre
sumably 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 pre
sumably 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 pre
sumably 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 as
suming the user is pointing their index finger straight out from their hand.
XRWebGLLayer.framebuffer - Web APIs
the xr compositor as
sumes that opaque framebuffers use colors with premultiplied allpha, regardless of whether or not the webgl context's premultipliedalpha context attribute is set.
Web APIs
bluetoothremotegattcharacteristic bluetoothremotegattdescriptor bluetoothremotegattserver bluetoothremotegattservice body broadcastchannel budgetservice budgetstate buffersource bytelengthqueuingstrategy bytestring c cdatasection css cssconditionrule csscounterstylerule cssgroupingrule cssimagevalue csskeyframerule csskeyframesrule csskeywordvalue cssmathproduct cssmath
sum 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 con
sumed 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 con
sumed 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.
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 ...
Perceivable - Accessibility
guideline 1.3 — create content that can be presented in different ways this guideline refers to the ability of content to be con
sumed by users in multiple ways, accomodating their differing needs.
-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 ip
sum 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.
::after (:after) - CSS: Cascading Style Sheets
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.
:default - CSS: Cascading Style Sheets
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
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="ip
sum" 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
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 ip
sum dolor sit amet, consectetur adipiscing elit.
@charset - CSS: Cascading Style Sheets
as
sume 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.
@supports - CSS: Cascading Style Sheets
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.
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 as
sumption 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, as
suming 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 (as
suming they have the class toolbtn assigned and are affected by the image rule above).
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 es
sum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic.
CSS data types - CSS: Cascading Style Sheets
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
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 as
sumed 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.
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 ...
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://pic
sum.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 ip
sum dolor sit amet, consectetuer </div> <div class="exampletwo"> lorem ip
sum dolor sit amet, consectetuer </div> <div class="examplethree"> lorem ip
sum 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;...
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.
calc() - CSS: Cascading Style Sheets
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
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> as
suming the following clippath definition: <pre> <svg> <clippath id="mypath" clippathunits="objectboundingbox"> <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" /> </clippath> </svg></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 ip
sum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
display - CSS: Cascading Style Sheets
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 (as
suming it is a non-replaced element).
flex - CSS: Cascading Style Sheets
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 as
sumed to be 1 and the <flex-basis> value is as
sumed to be 0.
float - CSS: Cascading Style Sheets
html <section> <div class="left">1</div> <div class="left">2</div> <div class="right">3</div> <p>lorem ip
sum dolor sit amet, consectetur adipiscing elit.
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 ip
sum dolor sit amet, consectetur adipiscing elit.
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
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
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...
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/>ip
sum</div> <div class="large">lorem</div> <div class="large">lorem<br/>imp
sum</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...
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 es
sum 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 es
sum 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 ip
sum 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 ip
sum dolor sit amet, consectetur adipisicing elit.</p> <p class="overflow-clip">lorem ip
sum dolor sit amet, consectetur adipisicing elit.</p> <p class="overflow-ellipsis">lorem ip
sum dolor sit amet, consectetur adipisicing elit.</p> <p class="overflow-string">lorem ip
sum dolor sit amet, consectetur adipisicing elit.</p> result note: live results in the following table may be shown incorrectly due...
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 con
sume 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
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 as
sumed 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.
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.
Media events - Developer guides
canplaythrough sent when the readystate changes to have_enough_data, indicating that the entire media can be played without interruption, as
suming the download rate remains at least at the current level.
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
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 ip
sum</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 ip
sum</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%);"> </td> </tr> <tr> <td><code>hsl(0.15turn, 90%, 50%)</code></td> <td style="background-color: hsl(0.15turn, 90%, 50%);"> </td> </tr> <tr> <td><code>hsl(270deg, 90%, 50%)</code></td> <td style="background-color: hsl(270deg, 90%, 50%);"> </td> </tr> </tbody> </table> note that when you omit the hue's unit, it's as
sumed to be in degrees (deg).
<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...
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
<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.
<slot> - HTML: Hypertext Markup Language
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"><<slot name="element-name">need name</slot>></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
<!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.
<textarea> - HTML: Hypertext Markup Language
<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.
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 con
sumption.
Accept-Ranges - HTTP
in presence of an accept-ranges header, the browser may try to re
sume 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 con
sume them and not forward them further.
Expect - HTTP
expect: 100-continue directives 100-continue informs recipients that the client is about to send a (pre
sumably large) message body in this request and wishes to receive a 100 (continue) interim response.
If-Range - HTTP
the most common use case is to re
sume a download, to guarantee that the stored resource has not been modified since the last fragment has been received.
Index - HTTP
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 as
sume any correlation between "android" and the device form factor.
Want-Digest - HTTP
some of the supported algorithms, including unix
sum and md5 are subject to collisions and are thus not suitable for applications in which collision-resistance is important.
HTTP headers - HTTP
for example, this header standard allows a client to change from http 1.1 to http 2.0, as
suming the server decides to acknowledge and implement the upgrade header field.
HEAD - HTTP
if it has one anyway, that body must be ignored: any entity headers that might describe the erroneous body are instead as
sumed to describe the response which a similar get request would have received.
308 Permanent Redirect - HTTP
for example, google drive uses a 308 re
sume 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
it is as
sumed that even if the user won't be completely happy, they will prefer this to an error code.
416 Range Not Satisfiable - HTTP
content-range: bytes */12777 faced with this error, browsers usually either abort the operation (for example, a download will be considered as non-re
sumable) or ask for the whole document again.
Functions - JavaScript
to
summarize: the inner function can be accessed only from statements in the outer function.
Introduction - JavaScript
what you should already know this guide as
sumes you have the following basic background: a general understanding of the internet and the world wide web (www).
Regular expressions - JavaScript
for example, as
sume 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 ...
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*/ // as
sumes 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, as
suming 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, as
suming 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 (as
suming object and typeerror have their original values and that callback.call() evaluates to the original value of function.prototype.call()).
Array.prototype.lastIndexOf() - JavaScript
this algorithm is exactly the one specified in ecma-262, 5th edition, as
suming 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, as
suming 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, as
suming object and typeerror have their original values and that fun.call evaluates to the original value of function.prototype.call().
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> as
suming 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 (as
suming 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 as
sume a function to have a particular name.
Intl.Collator.supportedLocalesOf() - JavaScript
examples using supportedlocalesof as
suming 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 as
sumed to be "numeric".
Intl.DateTimeFormat.supportedLocalesOf() - JavaScript
examples using supportedlocalesof as
suming 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 as
suming 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 as
suming 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 as
suming 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() as
suming 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 as
suming 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.
Object.defineProperties() - JavaScript
polyfill as
suming 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 as
sume 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 (as
suming at least one promise fulfills).
Proxy - JavaScript
handler functions are sometimes called traps, pre
sumably because they trap calls to the target object.
RegExp.prototype.exec() - JavaScript
for example, as
sume you have this script: let myre = /ab*/g; let str = 'abbcdefabh'; let myarray; while ((myarray = myre.exec(str)) !== null) { let msg = 'found ' + myarray[0] + '.
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.
escape() - JavaScript
… … programmers should not use or as
sume the existence of these features and behaviours when writing new ecmascript code.
unescape() - JavaScript
… … programmers should not use or as
sume the existence of these features and behaviours when writing new ecmascript code.
Addition assignment (+=) - JavaScript
syntax operator: x += y meaning: x = x + y examples using addition assignment // as
suming 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 // as
suming 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 // as
suming 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 // as
suming the following variable // bar = 5 bar **= 2 // 25 bar **= 'foo' // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
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.
Multiplication assignment (*=) - JavaScript
syntax operator: x *= y meaning: x = x * y examples using multiplication assignment // as
suming 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 // as
suming 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 as
sumed another iterating function is used when the merging occurs.
Subtraction assignment (-=) - JavaScript
syntax operator: x -= y meaning: x = x - y examples using subtraction assignment // as
suming 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, as
suming 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 re
sume the generator function execution, replacing the yield expression where an execution was paused with the argument from next().
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
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 as
sume that mobile browsers support hls, firefox for android does as well, in order to avoid strange compatibility errors from occurring due to this as
sumption being incorrect.
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...
Web Performance
in
summary, we should always try to create our animations using css transitions/animations where possible.
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 ip
sum … </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.
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.
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, as
suming that, in the initial local coordinate system, the positive z-axis comes out towards the person viewing the content and as
suming that one unit along the z-axis equals one unit in x and y.
z - SVG: Scalable Vector Graphics
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, as
suming that, in the initial coordinate system, the positive z-axis comes out towards the person viewing the content and as
suming that one unit along the z-axis equals one unit in x and y.
<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.
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, as
sume 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 (as
suming 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).
Types of attacks - Web security
the browser executes the code because it as
sumes 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 as
sumes 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
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 as
sume 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 as
sumes 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
for example, as
sume 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...