Search completed in 1.22 seconds.
MediaTrackSettings.channelCount - Web APIs
the mediatracksettings dictionary's channel
count property is an integer indicating how many audio channel the mediastreamtrack is currently configured to have.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.channel
count property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.channel
count as returned by a call to mediadevices.getsupportedconstraints().
...And 2 more matches
PaymentAddress.country - Web APIs
the
country read-only property of the paymentaddress interface is a string identifying the address's
country using the iso 3166-1 alpha-2 standard.
... some examples of valid
country values: "us", "gb", "cn", or "jp".
... syntax var payment
country = paymentaddress.
country; value a domstring which contains the iso3166-1 alpha-2 code identifying the
country in which the address is located, or an empty string if no
country is available, which frequently can be assumed to mean "same
country as the site owner." usage notes if the payment handler validates the address and determines that the value of
country is invalid, a call to paymentrequestupdateevent.updatewith() will be made with a details object containing a shippingaddresserrors field.
...And 2 more matches
RTCRtpStreamStats.firCount - Web APIs
the fir
count property of the rtcrtpstreamstats dictionary indicates the number of full intra request (fir) packets have been sent by the receiver to the sender.
... syntax var fir
count = rtcrtpstreamstats.fir
count; value an integer value indicating how many fir packets have been received by the sender during the current connection.
... the higher fir
count is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data.
...And 2 more matches
RTCRtpStreamStats.sliCount - Web APIs
the sli
count property of the rtcrtpstreamstats dictionary indicates how many slice loss indication (sli) packets were received by the sender.
... syntax var sli
count = rtcrtpstreamstats.sli
count; value an unsigned long integer indicating the number of sli packets the sender received from the receiver due to lost runs of macroblocks.
... a high value of sli
count may be an indication of an unreliable network.
...And 2 more matches
column-count - CSS: Cascading Style Sheets
the column-
count css property breaks an element's content into the specified number of columns.
... syntax /* keyword value */ column-
count: auto; /* <integer> value */ column-
count: 3; /* global values */ column-
count: inherit; column-
count: initial; column-
count: unset; values auto the number of columns is determined by other css properties, such as column-width.
... formal definition initial valueautoapplies toblock containers except table wrapper boxesinheritednocomputed valueas specifiedanimation typean integer formal syntax <integer> | auto examples splitting a paragraph across three columns html <p class="content-box"> this is a bunch of text split into three columns using the css `column-
count` property.
...And 2 more matches
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
one of the quirks of slashdot is that it includes a comments
count, a humorous department, a hit parade, and a section with every blog post.
...(using either of these 2 rss modules is out of the scope of this article.) in reality, an item's comments
count could change at any given time.
...and thus the comments
count that the <slash:comments> element provides is only a snapshot; it was only the comment
count at a moment in time.
...one could assume that the comment
count was acurate at the moment in time specified in the <channel>'s <lastbuilddate> element, but that is a risky assumption given that no where is that mandated.
Account Provisioner
the ac
count provisioner is the dialog that first comes up when starting thunderbird.
... the ac
count provisioner gives the user the chance to search for and order a vanity email ac
count from a list of partner providers.
... if the user already has an email ac
count, the user can switch to the original ac
count setup wizard.
... debugging the ac
count provisioner dialog logs most if not all of its activities, which is useful for debugging.
AddressErrors.country - Web APIs
an object based on addresserrors includes a
country property if during validation of the address the specified value of
country was determined to be invalid.
... syntax var
countryerror = addresserrors.
country; value if an error occurred during validation of the address due to the
country property having an invalid value, this property is set to a domstring providing a human-readable error message explaining the validation error.
... if the paymentaddress object's
country property was determined to be valid, this property is not included in the dictionary.
... specifications specification status comment payment request apithe definition of 'addresserrors.
country' in that specification.
AnalyserNode.frequencyBinCount - Web APIs
the frequencybin
count read-only property of the analysernode interface is an unsigned integer half that of the analysernode.fftsize.
... syntax var arraylength = analysernode.frequencybin
count; value an unsigned integer, equal to the number of values that analysernode.getbytefrequencydata() and analysernode.getfloatfrequencydata() copy into the provided typedarray.
... analyser.fftsize = 256; var bufferlength = analyser.frequencybin
count; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5 - 1; var barheight; var x = 0; for(v...
...ar i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth; } }; draw(); specifications specification status comment web audio apithe definition of 'frequencybin
count' in that specification.
DataTransfer.mozItemCount - Web APIs
the datatransfer.mozitem
count property returns the number of items being dragged.
... syntax datatransfer.mozitem
count; return value a number representing the number of items being dragged.
... example this example shows the use of the mozitem
count property.
... function drop_handler(event) { var files = []; var dt = event.datatransfer; for (var i = 0; i < dt.mozitem
count; i++) files.push(dt.mozgetdataat("application/x-moz-file", i)); } specifications this property is not defined in any web standard.
EXT_disjoint_timer_query.queryCounterEXT() - Web APIs
the ext_disjoint_timer_query.query
counterext() method of the webgl api records the current time into the corresponding query object.
... syntax void ext.query
counterext(query, target); parameters query a webglquery object for which to record the current time.
... examples var ext = gl.getextension('ext_disjoint_timer_query'); var startquery = ext.createqueryext(); var endquery = ext.createqueryext(); ext.query
counterext(startquery, ext.timestamp_ext); // ...
... ext.query
counterext(endquery, ext.timestamp_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
RTCInboundRtpStreamStats.firCount - Web APIs
the fir
count property of the rtcinboundrtpstreamstats dictionary indicates the number of full intra request (fir) packets have been sent by the receiver to the sender.
... syntax var fir
count = rtcinboundrtpstreamstats.fir
count; value an integer value indicating how many fir packets have been received by the sender during the current connection.
... the higher fir
count is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.fir
count' in that specification.
RTCInboundRtpStreamStats.sliCount - Web APIs
the sli
count property of the rtcinboundrtpstreamstats dictionary indicates how many slice loss indication (sli) packets the rtcrtpreceiver for which this object provdes statistics sent to the remote rtcrtpsender.
... syntax var sli
count = rtcinboundrtpstreamstats.sli
count; value an unsigned integer indicating the number of sli packets this receiver sent to the remote sender due to lost runs of macroblocks.
... a high value of sli
count may be an indication of an unreliable network.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.sli
count' in that specification.
RTCOutboundRtpStreamStats.firCount - Web APIs
the fir
count property of the rtcoutboundrtpstreamstats dictionary indicates the number of full intra request (fir) that the remote rtcrtpreceiver has sent to this rtcrtpsender.
... syntax var fir
count = rtcoutboundrtpstreamstats.fir
count; value an integer value indicating how many fir packets have been received by the sender during the current connection.
... the higher fir
count is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.fir
count' in that specification.
RTCOutboundRtpStreamStats.sliCount - Web APIs
the sli
count property of the rtcoutboundrtpstreamstats dictionary indicates how many slice loss indication (sli) packets the rtcrtpsender received from the remote rtcrtpreceiver for the rtp stream described by this object.
... syntax var sli
count = rtcoutboundrtpstreamstats.sli
count; value an unsigned integer indicating the number of sli packets the sender received from the receiver due to lost runs of macroblocks.
... a high value of sli
count may be an indication of an unreliable network.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.sli
count' in that specification.
RTCRtpStreamStats.nackCount - Web APIs
the nack
count property of the rtcrtpstreamstats dictionary is a numeric value indicating the number of times the receiver sent a nack packet to the sender.
... syntax var nack
count = rtcrtpstreamstats.nack
count; value an integer value indicating how many times the receiver sent a nack packet to the sender after detecting that one or more packets were lost during transport.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: nack
count' in that specification.
... identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: nack
count' in that specification.
RTCRtpStreamStats.pliCount - Web APIs
the pli
count property of the rtcrtpstreamstats dictionary states the number of times the stream's receiving end sent a picture loss indication (pli) packet to the sender.
... syntax var pli
count = rtcrtpstreamstats.pli
count; value an integer value indicating the number of times a pli packet was sent by the stream's receiver to the sender.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: pli
count' in that specification.
... identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: pli
count' in that specification.
animation-iteration-count - CSS: Cascading Style Sheets
the animation-iteration-
count css property sets the number of times an animation sequence should be played before stopping.
... syntax /* keyword value */ animation-iteration-
count: infinite; /* <number> values */ animation-iteration-
count: 3; animation-iteration-
count: 2.4; /* multiple values */ animation-iteration-
count: 2, 0, infinite; the animation-iteration-
count property is specified as one or more comma-separated values.
... formal definition initial value1applies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-iteration-
count>#where <single-animation-iteration-
count> = infinite | <number> examples see css animations for examples.
... specifications specification status comment css animationsthe definition of 'animation-iteration-
count' in that specification.
RangeError: repeat count must be non-negative - JavaScript
the javascript exception "repeat
count must be non-negative" occurs when the string.prototype.repeat() method is used with a
count argument that is a negative number.
... message rangeerror: argument out of range rangeerror: repeat
count must be non-negative (firefox) rangeerror: invalid
count value (chrome) error type rangeerror what went wrong?
...it has a
count parameter indicating the number of times to repeat the string.
... examples invalid cases 'abc'.repeat(-1); // rangeerror valid cases 'abc'.repeat(0); // '' 'abc'.repeat(1); // 'abc' 'abc'.repeat(2); // 'abcabc' 'abc'.repeat(3.5); // 'abcabcabc' (
count will be converted to integer) ...
RangeError: repeat count must be less than infinity - JavaScript
the javascript exception "repeat
count must be less than infinity" occurs when the string.prototype.repeat() method is used with a
count argument that is infinity.
... message rangeerror: argument out of range (edge) rangeerror: repeat
count must be less than infinity and not overflow maximum string size (firefox) rangeerror: invalid
count value (chrome) error type rangeerror what went wrong?
...it has a
count parameter indicating the number of times to repeat the string.
... examples invalid cases 'abc'.repeat(infinity); // rangeerror 'a'.repeat(2**28); // rangeerror valid cases 'abc'.repeat(0); // '' 'abc'.repeat(1); // 'abc' 'abc'.repeat(2); // 'abcabc' 'abc'.repeat(3.5); // 'abcabcabc' (
count will be converted to integer) ...
repeatCount - SVG: Scalable Vector Graphics
the repeat
count attribute indicates the number of times an animation will take place.
... five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 220 150" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeat
count="5"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeat
count="indefinite"/> </rect> </svg> usage notes value <number> | indefinite default value none animatable no <number> this value specifies the number of iterations.
... specifications specification status comment svg animations level 2the definition of 'repeat
count' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'repeat
count' in that specification.
CSS Counter Styles - Web APIs
the css
counter styles module allows to define custom
counter styles, which can be used for css list-marker and generated-content
counters.
... interfaces css
counterstylerule represents an @
counter-style rule.
... specifications specification status comment css
counter styles level 3 candidate recommendation initial definition ...
CountQueuingStrategy.size() - Web APIs
the size() method of the
countqueuingstrategy interface always returns 1, so that the total queue size is a
count of the number of chunks in the queue.
... syntax var size =
countqueuingstrategy.size(); parameters none.
... examples const queuingstrategy = new
countqueuingstrategy({ highwatermark: 1 }); const writablestream = new writablestream({ // implement the sink write(chunk) { ...
MediaTrackSupportedConstraints.channelCount - Web APIs
the mediatracksupportedconstraints dictionary's channel
count property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the channel
count constraint.
... syntax channel
countconstraintsupported = supportedconstraintsdictionary.channel
count; value this property is present in the dictionary (and its value is always true) if the user agent supports the channel
count constraint.
... example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().channel
count) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'channel
count' in that specification.
PerformanceNavigationTiming.redirectCount - Web APIs
the redirect
count property returns a timestamp representing the number of redirects since the last non-redirect navigation under the current browsing context.
... syntax perfentry.redirect
count; return value a number representing the number of redirects since the last non-redirect navigation under the current browsing context.
...entstart)); console.log("dom complete = " + p.domcomplete); console.log("dom interactive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirect
count = " + p.redirect
count); } } specifications specification status comment navigation timing level 2the definition of 'redirect
count' in that specification.
RTCIceCandidatePairStats.circuitBreakerTriggerCount - Web APIs
the rtcicecandidatepairstats property circuitbreakertrigger
count indicates the number of times the circuit-breaker has been triggered to indicate a connection timeout or other unexpected connection abort on this specific connection configuration.
... syntax cbt
count = rtcicecandidatepairstats.circuitbreakertrigger
count; value an integer value indicating the number of times the circuit-breaker has been triggered for the 5-tuple used by this connection.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.circuitbreakertrigger
count' in that specification.
RTCInboundRtpStreamStats.nackCount - Web APIs
the nack
count property of the rtcinboundrtpstreamstats dictionary is a numeric value indicating the number of times the receiver sent a nack packet to the sender.
... syntax var nack
count = rtcinboundrtpstreamstats.nack
count; value an integer value indicating how many times the receiver sent a nack packet to the sender after detecting that one or more packets were lost during transport.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.nack
count' in that specification.
RTCInboundRtpStreamStats.pliCount - Web APIs
the pli
count property of the rtcinboundrtpstreamstats dictionary states the number of times the rtcrtpreceiver described by these statistics sent a picture loss indication (pli) packet to the sender.
... syntax var pli
count = rtcinboundrtpstreamstats.pli
count; value an integer value indicating the number of times a pli packet was sent by the rtcrtpreceiver to the sender.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.pli
count' in that specification.
RTCOutboundRtpStreamStats.nackCount - Web APIs
the nack
count property of the rtcoutboundrtpstreamstats dictionary is a numeric value indicating the number of times the rtcrtpsender described by this object received a nack packet from the remote receiver.
... syntax var nack
count = rtcoutboundrtpstreamstats.nack
count; value an integer value indicating how many times the sender received a nack packet from the receiver, indicating the loss of one or more packets.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.nack
count' in that specification.
RTCOutboundRtpStreamStats.pliCount - Web APIs
the pli
count property of the rtcoutboundrtpstreamstats dictionary states the number of times the remote peer's rtcrtpreceiver sent a picture loss indication (pli) packet to the rtcrtpsender for which this object provides statistics.
... syntax var pli
count = rtcoutboundrtpstreamstats.pli
count; value an integer value indicating the number of times a pli packet was sent to this sender by the remote peer's rtcrtpreceiver.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.pli
count' in that specification.
Index - Web APIs
2 angle_instanced_arrays api, reference, webgl, webgl extension the angle_instanced_arrays extension is part of the webgl api and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive
count and type.
... 32 addresserrors.
country api, addresserrors, error, payment request, payment request api, property, reference, validation,
country, payment an object based on addresserrors includes a
country property if during validation of the address the specified value of
country was determined to be invalid.
... 54 analysernode.frequencybin
count api, analysernode, property, reference, web audio api, frequencybin
count the frequencybin
count read-only property of the analysernode interface is an unsigned integer half that of the analysernode.fftsize.
...And 66 more matches
nsIDOMWindowUtils
viewid aid); void focus(in nsidomelement aelement); void forceupdatenativemenuat(in astring indexstring); void garbagecollect([optional] in nsicyclecollectorlistener alistener); short getcursortype(); astring getdocumentmetadata(in astring aname); nsidomwindow getouterwindowwithid(in unsigned long long aouterwindowid); long getpc
countscript
count(); astring getpc
countscriptsummary(in long ascript); astring getpc
countscriptcontents(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 loadsheet(in nsiuri sheeturi, in unsigned long type); nsidomnodelist nodesfromrect(in float ax, in float ay, in float atopsize, in float arightsize, in float abottomsize, in float aleftsize, in boolean aignorerootscrollframe, in boolean aflushlayout); void processupdates(); obsolete since gecko 13.0 void purgepc
counts(); unsigned long redraw([optional] in unsigned long a
count); void renderdocument(in nsconstrect arect, in pruint32 aflags, in nscolor abackgroundcolor, in gfxcontext athebescontext); native code only!
...keycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault); obsolete since gecko 15.0 boolean sendkeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in unsigned long aadditionalflags); deprecated since gecko 38.0 void sendmouseevent(in astring atype, in float ax, in float ay, in long abutton, in long aclick
count, in long amodifiers, [optional] in boolean aignorerootscrollframe); void sendmouseeventtowindow(in astring atype, in float ax, in float ay, in long abutton, in long aclick
count, in long amodifiers, [optional] in boolean aignorerootscrollframe); void sendmousescrollevent(in astring atype, in float ax, in float ay, in long abutton, in long ascrollflags, in long adelta, in long a...
...And 36 more matches
system - CSS: Cascading Style Sheets
the system descriptor specifies the algorithm to be used for converting the integer value of a
counter to a string representation.
... it is used in a @
counter-style to define the behavior of the defined style.
... if the algorithm specified in the system descriptor is unable to construct the representation for a particular
counter value, then that value's representation will be constructed using the fallback system provided.
...And 36 more matches
MMgc - Archive of obsolete content
} }; rcobject base class: gcfinalizedobject this is a reference-
counted, garbage collected object.
...class mymanagedclass : public mmgc::gcobject { // mymanagedclass is a gcobject, and // avmplus::hashtable is a gcobject, so use dwb dwb(avmplus::hashtable*) mytable; }; drc drc stands for deferred reference
counted.
...class myunmanagedclass { // myunmanagedclass is not a gcobject, and // avmplus::stringp is a rcobject, so use drc drc(stringp) mystring; }; drcwb drcwb stands for deferred reference
counted, with write barrier.
...And 28 more matches
Index - Archive of obsolete content
447 firefox ac
counts firefox ac
counts, identity, landing, mozilla, fxa firefox ac
counts (fxa) is an identity provider that provides authentication and user profile data for mozilla cloud services.
... over the long term we envision that non-mozilla services and applications will also be able to delegate authentication to firefox ac
counts.
... 448 apis attached to firefox ac
counts as a fxa relier, after a user has logged in to her firefox ac
count with our oauth 2.0 api, you can access a collection of apis attached to the user's ac
count.
...And 23 more matches
Filtering - Archive of obsolete content
function applyfilter(
country) { var cond = document.getelementbyid("cond"); var triple = document.getelementbyid("filtertriple"); if (
country) { if (!triple) { triple = document.createelement("triple"); triple.id = "filtertriple"; triple.setattribute("subject", "?photo"); triple.setattribute("predicate", "http://www.xulplanet.com/rdf/
country"); } triple.setattribute("object",
count...
...ry); cond.appendchild(triple); } else if (triple) { cond.removechild(triple); } document.getelementbyid("photoslist").builder.rebuild(); } the '
country' argument to the applyfilter function holds the value to filter by.
...for example, the resulting triple for the netherlands might be: <triple subject="?photo" predicate="http://www.xulplanet.com/rdf/
country" object="http://www.daml.org/2001/09/
countries/iso#nl"/> this triple is then appended to the query.
...And 18 more matches
Index
this mechanism doesn't ac
count for any native (c++) xpcom objects hanging off javascript objects though.
...whatever it points to has been addrefed,
counting the nscomptr as one of its `owners'.
... 251 child
count number of accessible children.
...And 18 more matches
nsIMsgCloudFileProvider
inherits from: nsisupports method overview void init(in string aac
countkey); void uploadfile(in nsilocalfile afile, in nsirequestobserver acallback); acstring urlforfile(in nsilocalfile afile); void cancelfileupload(in nsilocalfile afile); void refreshuserinfo(in boolean awithui, in nsirequestobserver acallback); void deletefile(in nsilocalfile afile, in nsirequestobserver acallback); void createnewac
count(in acstring aemailaddress, in acstring apassword, in acstring afirstname, in acstring alastname, in nsirequestobserver acallback); void createexistingac
count(in nsireq...
... ac
countkey acstring readonly: the unique identifier for the ac
count associated with an instance of an nsimsgcloudfileprovider.
... settingsurl acstring readonly: a chrome url for an xhtml page displayed in the ac
count setup dialog window, used for displaying and setting provider-specific settings.
...And 16 more matches
The HTML autocomplete attribute - HTML: Hypertext Markup Language
"username" a username or ac
count name.
...when creating a new ac
count or changing passwords, this should be used for an "enter your new password" or "confirm new password" field, as opposed to a general "enter your current password" field that might be present.
...this can be multiple lines of text, and should fully identify the location of the address within its second administrative level (typically a city or town), but should not include the city name, zip or postal code, or
country name.
...And 15 more matches
XPCOM Objects - Archive of obsolete content
void getchildlist(in string astartingat, out unsigned long a
count,[array, size_is(a
count), retval] out string achildarray); this method returns an array of strings.
...note the metadata included in the square brackets, indicating that the parameter is an array, and that its size is determined by the a
count parameter.
... } }; finally, here's a table summarizing the types you will most likely en
counter 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.
...And 13 more matches
Tree View Details - Archive of obsolete content
first, the simple functions: { treebox: null, selection: null, get row
count() { return this.visibledata.length; }, settree: function(treebox) { this.treebox = treebox; }, getcelltext: function(idx, column) { return this.visibledata[idx][0]; }, iscontainer: function(idx) { return this.visibledata[idx][1]; }, iscontaineropen: function(idx) { return this.visibledata[idx][2]; }, iscontainerempty: function(idx) { return fal...
...se; }, isseparator: function(idx) { return false; }, issorted: function() { return false; }, iseditable: function(idx, column) { return false; }, } the row
count function will return the length of the visibledata array.
...so, at first, only three items are visible and the row
count should be three, even though six rows are hidden.
...And 13 more matches
Modularization techniques - Archive of obsolete content
nsisupports provides two key features, interface interrogation and reference
counting.
... reference
counting is performed using the addref() and release() methods.
... an objects reference
count generally starts at zero.
...And 12 more matches
Looping code - Learn web development
he might use the following loop to achieve this: a loop usually has one or more of the following features: a
counter, which is initialized with a certain value — this is the starting point of the loop ("start: i have no food", above).
... a condition, which is a true/false test to determine whether the loop continues to run, or stops — usually when the
counter reaches a certain value.
... an iterator, which generally increments the
counter by a small amount on each successive loop, until the condition is no longer true.
...And 12 more matches
A first splash into JavaScript - Learn web development
your javascript goes here let randomnumber = math.floor(math.random() * 100) + 1; const guesses = document.queryselector('.guesses'); const lastresult = document.queryselector('.lastresult'); const loworhi = document.queryselector('.loworhi'); const guesssubmit = document.queryselector('.guesssubmit'); const guessfield = document.queryselector('.guessfield'); let guess
count = 1; let resetbutton; function checkguess() { let userguess = number(guessfield.value); if (guess
count === 1) { guesses.textcontent = 'previous guesses: '; } guesses.textcontent += userguess + ' '; if (userguess === randomnumber) { lastresult.textcontent = 'congratulations!
... you got it right!'; lastresult.style.backgroundcolor = 'green'; loworhi.textcontent = ''; setgameover(); } else if (guess
count === 10) { lastresult.textcontent = '!!!game over!!!'; loworhi.textcontent = ''; setgameover(); } else { lastresult.textcontent = 'wrong!'; lastresult.style.backgroundcolor = 'red'; if(userguess < randomnumber) { loworhi.textcontent = 'last guess was too low!' ; } else if(userguess > randomnumber) { loworhi.textcontent = 'last guess was too high!'; } } guess
count++; guessfield.value = ''; } guesssubmit.addeventlistener('click', checkguess); function setgameover() { guessfield.disabled = true; guesssubmit.dis...
...abled = true; resetbutton = document.createelement('button'); resetbutton.textcontent = 'start new game'; document.body.append(resetbutton); resetbutton.addeventlistener('click', resetgame); } function resetgame() { guess
count = 1; const resetparas = document.queryselectorall('.resultparas p'); for(let i = 0 ; i < resetparas.length ; i++) { resetparas[i].textcontent = ''; } resetbutton.parentnode.removechild(resetbutton); guessfield.disabled = false; guesssubmit.disabled = false; guessfield.value = ''; guessfield.focus(); lastresult.style.backgroundcolor = 'white'; randomnumber = math.floor(math.random() * 100) + 1; } </script> </body> </html> have a go at playing it — familiar...
...And 12 more matches
Background Tasks API - Web APIs
</p> <div class="container"> <div class="label">decoding quantum filament tachyon emissions...</div> <progress id="progress" value="0"></progress> <div class="button" id="startbutton"> start </div> <div class="label
counter"> task <span id="currenttasknumber">0</span> of <span id="totaltask
count">0</span> </div> </div> <div class="logbox"> <div class="logheader"> log </div> <div id="log"> </div> </div> the progress box uses a <progress> element to show the progress, along with a label with sections that are changed to present numeric information about the progress.
...der-bottom: 1px solid black; border-radius: 6px 6px 0 0; } #log { font: 12px "courier", monospace; padding: 6px; overflow: auto; overflow-y: scroll; width: 388px; height: 460px; } .container { width: 400px; padding: 6px; border-radius: 6px; border: 1px solid black; box-shadow: 4px 4px 2px black; display: block; overflow: auto; } .label { display: inline-block; } .
counter { text-align: right; padding-top: 4px; float: right; } .button { padding-top: 2px; padding-bottom: 4px; width: 100px; display: inline-block; float: left; border: 1px solid black; cursor: pointer; text-align: center; margin-top: 0; color: white; background-color: darkgreen; } #progress { width: 100%; padding-top: 6px; } javascript content now that the documen...
... variable declarations let tasklist = []; let totaltask
count = 0; let currenttasknumber = 0; let taskhandle = null; these variables are used to manage the list of tasks that are waiting to be performed, as well as status information about the task queue and its execution: tasklist is an array of objects, each representing one task waiting to be run.
...And 12 more matches
Closures - JavaScript
var
counter = (function() { var private
counter = 0; function changeby(val) { private
counter += val; } return { increment: function() { changeby(1); }, decrement: function() { changeby(-1); }, value: function() { return private
counter; } }; })(); console.log(
counter.value()); // 0.
...
counter.increment();
counter.increment(); console.log(
counter.value()); // 2.
...
counter.decrement(); console.log(
counter.value()); // 1.
...And 12 more matches
Creating a Microsummary - Archive of obsolete content
in this tutorial we're going to create a microsummary generator for the spread firefox home page that displays the current firefox download
count along with the label fx downloads; for example: 174475447 fx downloads.
...then just link to the microsummaries from within the pages themselves using a <link rel="microsummary"> element, f.e.: <head> <link rel="microsummary" href="index.php?view=microsummary"> </head> when firefox en
counters a <link rel="microsummary"> element, it loads the url in the href attribute.
...since our generator will be creating microsummaries displaying the firefox download
count, let's give it the name "firefox download
count": <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download
count"> </generator> adding an xslt transform sheet generators must include an xslt transform sheet (also known as an xslt stylesheet) which transforms the page content into its microsummary.
...And 11 more matches
Additional Navigation - Archive of obsolete content
in this case, we will categorize each photo by
country where the photo was taken using a
country predicate.
... <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/palace.jpg"/> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/canal.jpg"/> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg"/> </rdf:seq> <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/palace.jpg" dc:title="palace from above"> <r:
country resource="http://www.daml.org/2001/09/
countries/iso#it"/> </rdf:description> <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/canal.jpg" dc:title="canal"> <r:
country resource="http://www.daml.org/2001/09/
countries/iso#nl"/> </rdf:description> <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg" ...
...dc:title="obelisk"> <r:
country resource="http://www.daml.org/2001/09/
countries/iso#it"/> </rdf:description> <rdf:description about="http://www.daml.org/2001/09/
countries/iso#it" dc:title="italy"/> <rdf:description about="http://www.daml.org/2001/09/
countries/iso#nl" dc:title="netherlands"/> </rdf:rdf> a new
country predicate has been added to each photo pointing to another resource.
...And 11 more matches
Index - Learn web development
10 wai-aria basics aria, accessibility, article, beginner, codingscripting, guide, html, javascript, learn, wai-aria, semantics 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 en
counter that require it.
... 54 introducing asynchronous javascript beginner, codingscripting, guide, introducing, javascript, learn, promises, async, asynchronous, await, callbacks in this article we briefly recap the problems associated with synchronous javascript, and take a first look at some of the different asynchronous techniques you'll en
counter, showing how they can help us solve such problems.
... 56 client-side web apis api, articles, beginner, codingscripting, dom, graphics, javascript, landing, learn, media, module, webapi, data when writing client-side javascript for web sites or applications, you will quickly en
counter application programming interfaces (apis).
...And 11 more matches
JSPrincipals
properties name type description ref
count mozilla::atomic<int32_t> reference
count.
...obsolete since jsapi 12 destroy void (*)(jscontext *, jsprincipals *) pointer to the function that decrements the reference
count and possibly frees the principals if they are no longer in use.
... jsprincipals has ref
count property that is the reference
count.
...And 11 more matches
An Overview of XPCOM
object ownership in xpcom, since components may implement any number of different interfaces, components must be reference
counted.
... when a component gets created, an integer inside the component tracks the number of clients who have an interface to the components -- also known as the reference
count.
... the reference
count is incremented automatically when the client instantiates the component; over the course of the component's life, the reference
count goes up and down.
...And 11 more matches
Introduction to XPCOM for the DOM
i will introduce nscomptr's, interfaces, reference
counting, and the nsisupports interface.
... reference
counting basics xpcom uses a reference
counting mechanism (ref
count in short) to make sure that no object is deleted while interface pointers still point at that object.
...that is why each time a pointer to an interface is assigned the address of an object, we have to increase the reference
count of that object by one.
...And 11 more matches
content - CSS: Cascading Style Sheets
e; /* <image> values */ content: url("http://www.example.com/test.png"); content: linear-gradient(#e66465, #9198e5); /* alt text for generated content, added in the level 3 specification */ content: url("http://www.example.com/test.png") / "this is the alt text"; /* values below can only be applied to generated content using ::before and ::after */ /* <string> value */ content: "prefix"; /* <
counter> values */ content:
counter(chapter_
counter); content:
counters(section_
counter, "."); /* attr() value linked to the html attribute value */ content: attr(value string); /* language- and position-dependent keywords */ content: open-quote; content: close-quote; content: no-open-quote; content: no-close-quote; /* except for normal and none, several values can be used simultaneously */ content:...
... open-quote chapter_
counter; /* global values */ content: inherit; content: initial; content: unset; syntax values none the pseudo-element is not generated.
... <
counter>() the value of a css
counter, generally a number.
...And 11 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
all users have a personal ac
count on a windows server (ad) and an ldap ac
count for linux authentication.
... autoconfig directives here we want to set users central mail preferences: create one ac
count from their login name, get their email address from an ldap request and set the enterprise imap and smtp servers.
... thunderbird.cfg (version 1) here's the complete file, first we get the user login name from environment variables, then configure the ldap address book, create an email ac
count, and configure imap and smtp: [root@calaz /usr/lib/thunderbird] $ cat thunderbird.cfg //put everything in a try/catch try { // 1) env variables if(getenv("user") != "") { // *nix settings var env_user = getenv("user"); var env_home = getenv("home"); } else { // windows settings var env_user = getenv("username"); var env_home = getenv("homepath"); } var env_mozdebug= getenv("mozilla_debug"); // var env_user = prompt("indiquez votre login", toto); // 2) lock general preferences //ldap addres...
...And 10 more matches
Tutorial: Embedding Rhino
context initializing standard objects collecting the arguments evaluating a script printing the result exiting the context expose java apis using java apis implementing interfaces adding java objects using javascript objects from java using javascript variables calling javascript functions javascript host objects defining host objects
counter example
counter's constructors class name dynamic properties defining javascript "methods" adding
counter to runscript runscript: a simple embedding about the simplest embedding of rhino possible is the runscript example.
...
counter example the
counter example is a simple host object.
...(note that because the java -jar option preempts the rest of the classpath, we can't use that and access the
counter class.) $ java -cp "js.jar;examples" org.mozilla.javascript.tools.shell.main js> defineclass("
counter") js> c = new
counter(7) [object
counter] js> c.
count 7 js> c.
count 8 js> c.
count 9 js> c.reset
count() js> c.
count 0
counter's constructors the zero-argument constructor is used by rhino runtime to create instances.
...And 10 more matches
Avoiding leaks in JavaScript XPCOM components
there are no calls to malloc and free and no reference
counting.
...but it's even easier in this environment because some of the objects you're dealing with are reference-
counted behind the scenes.
... reference
counting reference
counting is a simple solution to the problem of allowing multiple owners to influence the lifetime of an object.
...And 10 more matches
nsIMsgProtocolInfo
the nsimsgprotocolinfo interface describes the capabilities of an ac
count type.
... inherits from: nsisupports implemented by: @mozilla.org/messenger/protocol/info;1?type=acct, where acct is the ac
count type that are you are interested in.
... method overview long getdefaultserverport(in boolean issecure); attributes attribute type description candelete boolean true if an ac
count of this type may be deleted.
...And 10 more matches
nsIProcess
to create an instance, use: var process = components.classes["@mozilla.org/process/util;1"] .createinstance(components.interfaces.nsiprocess); method overview void init(in nsifile executable); void initwithpid(in unsigned long pid); obsolete since gecko 1.9.2 void kill(); void run(in boolean blocking, [array, size_is(
count)] in string args, in unsigned long
count); void runasync([array, size_is(
count)] in string args, in unsigned long
count, [optional] in nsiobserver observer, [optional] in boolean holdweak); void runw(in boolean blocking, [array, size_is(
count)] in wstring args, in unsigned long
count); void runwasync([array, size_is(
count)] in wstring args, in unsigned long
count, [op...
... void run( in boolean blocking, [array, size_is(
count)] in string args, in unsigned long
count ); parameters blocking if true, this method will block until the process terminates; if false, the method returns immediately.
... args an array of
count arguments, using the native character set, to be passed to the executable on its command line.
...And 10 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
if you execute code like settimeout(fn, 0) but then immediately after run a loop that
counts from 1 to 10 billion, your callback will be executed after a few seconds.
...from the second
counter, you can work out each of these.
...to reset it, you'll want to set the
counter back to 0, clear the interval, and then immediately update the display.
...And 9 more matches
Shell global objects
starttimingmutator() start ac
counting time to mutator vs gc.
... stoptimingmutator() stop ac
counting time to mutator vs gc and dump the results.
...the name is one of: maxbytes maxmallocbytes gcbytes gcnumber mode unusedchunks totalchunks slicetimebudget markstacklimit highfrequencytimelimit highfrequencylowlimit highfrequencyhighlimit highfrequencyheapgrowthmax highfrequencyheapgrowthmin lowfrequencyheapgrowth dynamicheapgrowth dynamicmarkslice allocationthreshold minemptychunk
count maxemptychunk
count compactingenabled refreshframeslicesenabled relazifyfunctions(...) perform a gc and allow relazification of functions.
...And 9 more matches
XPCOM array guide
nscomarray<t> - a c++ class which provides a typesafe, reference-
counted container for pointers to a single type of com object.
... ownership nsiarray xpcom object yes no no no reference
counted, weak/strong nsimutablearray xpcom object yes no yes no reference
counted, weak/strong nscomarray<t> xpcom object no yes yes* no reference
counted, strong nstarray<t> any that has a default constructor and copy constructor no yes yes* no can hold objects directly, in which case it owns them.
... nsisupportsarray xpcom object yes no yes* no reference
counted, strong (*) note: concrete c++ arrays can be made read-only by declaring them const.
...And 9 more matches
nsIOutputStream
method overview void close(); void flush(); boolean isnonblocking(); unsigned long write(in string abuf, in unsigned long a
count); unsigned long writefrom(in nsiinputstream afromstream, in unsigned long a
count); unsigned long writesegments(in nsreadsegmentfun areader, in voidptr aclosure, in unsigned long a
count); native code only!
... unsigned long write( in string abuf, in unsigned long a
count ); parameters abuf the buffer containing the data to be written.
... a
count the size of the buffer, or the maximum number of bytes to copy from the buffer.
...And 9 more matches
AesCtrParams - Web APIs
this extra block is called the "
counter block".
... a given
counter block value must never be used more than once with the same key: given a message n blocks long, a different
counter block must be used for every block.
... if the same key is used to encrypt more than one message, a different
counter block must be used for all blocks across all messages.
...And 9 more matches
:nth-last-child() - CSS: Cascading Style Sheets
the :nth-last-child() css pseudo-class matches elements based on their position among a group of siblings,
counting from the end.
... /* selects every fourth element among any group of siblings,
counting backwards from the last one */ :nth-last-child(4n) { color: lime; } note: this pseudo-class is essentially the same as :nth-child, except it
counts items backwards from the end, not forwards from the beginning.
... syntax the nth-last-child pseudo-class is specified with a single argument, which represents the pattern for matching elements,
counting from the end.
...And 9 more matches
Using CSS animations - CSS: Cascading Style Sheets
animation-iteration-
count configures the number of times the animation should repeat; you can specify infinite to repeat the animation indefinitely.
... making it repeat to make the animation repeat itself, simply use the animation-iteration-
count property to indicate how many times to repeat the animation.
... in this case, let’s use infinite to have the animation repeat indefinitely: p { animation-duration: 3s; animation-name: slidein; animation-iteration-
count: infinite; } adding it to the existing code: @keyframes slidein { from { margin-left: 100%; width: 300%; } to { margin-left: 0%; width: 100%; } } <p>the caterpillar and alice looked at each other for some time in silence: at last the caterpillar took the hookah out of its mouth, and addressed her in a languid, sleepy voice.</p> making it move back and forth that made it repeat, but it’s very odd having it jump back to the start each time it begins animating.
...And 9 more matches
Basic Concepts of Multicol - CSS: Cascading Style Sheets
the properties defined by the specification are: column-width column-
count columns column-rule-color column-rule-style column-rule-width column-rule column-span column-fill column-gap by adding column-
count or column-width to an element, that element becomes a multi-column container, or multicol container for short.
... defining columns to create a multicol container you must use at least one of the column-* properties, these being column-
count and column-width.
... the column-
count property the column-
count property specifies the number of columns that you would like the content to be displayed as.
...And 9 more matches
Introduction to automated testing - Learn web development
note: one problem with our watch command above is that our csslint/autoprefixer combination throws full-blown errors when a css error is en
countered, which stops the watch working.
... you'll have to restart the watch once a css error is en
countered, or find another way to do this.
... note: unlike other cloud-based cross browser testing service providers, lambdatest offers a freemium ac
count where you get lifetime access to their platform.
...And 8 more matches
NS_ConvertUTF16toUTF8
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 8 more matches
NS_LossyConvertUTF16toASCII
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 8 more matches
nsAdoptingCString
at tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 8 more matches
nsCAutoString
placesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 8 more matches
nsCString
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 8 more matches
nsDependentCString
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 8 more matches
nsFixedCString
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 8 more matches
nsPromiseFlatCString
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 8 more matches
nsXPIDLCString
at tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 8 more matches
nsILoginManagerStorage
method overview void addlogin(in nsilogininfo alogin); unsigned long
countlogins(in astring ahostname, in astring aactionurl, in astring ahttprealm); void findlogins(out unsigned long
count, in astring ahostname, in astring aactionurl, in astring ahttprealm, [retval, array, size_is(
count)] out nsilogininfo logins); void getalldisabledhosts([optional] out unsigned long
count, [retval, array, size_is(
count)] out wstring hostnames); void getallencryptedlogins([option...
...al] out unsigned long
count, [retval, array, size_is(
count)] out nsilogininfo logins); void getalllogins([optional] out unsigned long
count, [retval, array, size_is(
count)] out nsilogininfo logins); boolean getloginsavingenabled(in astring ahost); void init(); void initwithfile(in nsifile ainputfile, in nsifile aoutputfile); void modifylogin(in nsilogininfo oldlogin, in nsisupports newlogindata); void removealllogins(); void removelogin(in nsilogininfo alogin); void searchlogins(out unsigned long
count, in nsipropertybag matchdata, [retval, array, size_is(
count)] out nsilogininfo logins); void setloginsavingenabled(in astring ahost, in boolean isenabled); attributes attribute type description uibusy boolean true when a master password prompt is being shown.
...
countlogins() implement this method to return the number of logins matching the specified criteria.
...And 8 more matches
nsINavHistoryQuery
this is important because, if the user has their profile on a networked drive, query latency can be non-negligible method overview nsinavhistoryquery clone(); void getfolders([optional ]out unsigned long
count, [retval,array,size_is(
count)] out long long folders); void gettransitions([optional] out unsigned long
count, [retval,array,size_is(
count)] out unsigned long transitions); void setfolders([const,array, size_is(folder
count)] in long long folders, in unsigned long folder
count); void settransitions([const,array, size_is(
count)] in unsigned long transitions, in unsigned long
count); attr...
... folder
count long read only:
count of folders.
...the default value is "-1", and in that case all items are matched regardless of their visit
count.
...And 8 more matches
speak-as - CSS: Cascading Style Sheets
the speak-as descriptor specifies how a
counter symbol constructed with a given @
counter-style will be represented in the spoken form.
... for example, an author can specify a
counter symbol to be either spoken as its numerical value or just represented with an audio cue.
... syntax /* keyword values */ speak-as: auto; speak-as: bullets; speak-as: numbers; speak-as: words; speak-as: spell-out; /* @
counter-style name value */ speak-as: <
counter-style-name>; values auto if the value of speak-as is specified as auto, then the effective value of speak-as will be determined based on the value of the system descriptor: if the value of system is alphabetic, the effective value of speak-as will be spell-out.
...And 8 more matches
NSS API Guidelines
usually, every public routine has a private
counterpart, and the implementation of the public routine looks like this: nssimplement rv * nsstype_method ( nsstype *t, nssfoo *arg1, nssbar *arg2 ) { nss_clearerrorstack(); #ifdef debug if( !nssfoo_verifypointer(arg1) ) return (rv *)null; if( !nssbar_verifypointer(arg2) ) return (rv *)null; #endif /* debug ...
...for some data structures, this problem can be removed by protected reference
counting.
...be sure to increment the reference
count, on the returned object, before unlocking.
...And 7 more matches
imgIContainer
as a service: var imgicontainer = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.imgicontainer); method overview void addrestoredata([array, size_is(a
count), const] in char data, in unsigned long a
count); native code only!
... loop
count long number of times to loop the image.
...void addrestoredata( [array, size_is(a
count), const] in char data, in unsigned long a
count ); parameters data missing description a
count missing description exceptions thrown missing exception missing description native code only!appendframe obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete.
...And 7 more matches
nsIAnnotationService
ong long aitemid, in autf8string aname, out long aflags, out unsigned short aexpiration, out autf8string amimetype, out unsigned short atype); pruint16 getpageannotationtype(in nsiuri auri, in autf8string aname); pruint16 getitemannotationtype(in long long aitemid, in autf8string aname); void getpageswithannotation(in autf8string name, [optional] out unsigned long result
count, [retval, array, size_is(result
count)] out nsiuri results); void getitemswithannotation(in autf8string name, [optional] out unsigned long result
count, [retval, array, size_is(result
count)] out long long results); void getpageannotationnames(in nsiuri auri, [optional] out unsigned long
count, [retval, array, size_is(
count)] out nsivariant result); void getitemannotationn...
...ames(in long long aitemid, [optional] out unsigned long
count, [retval, array, size_is(
count)] out nsivariant result); boolean pagehasannotation(in nsiuri auri, in autf8string aname); boolean itemhasannotation(in long long aitemid, in autf8string aname); void removepageannotation(in nsiuri auri, in autf8string aname); void removeitemannotation(in long long aitemid, in autf8string aname); void removepageannotations(in nsiuri auri); void removeitemannotations(in long long aitemid); void copypageannotations(in nsiuri asourceuri, in nsiuri adesturi, in boolean aoverwritedest); void copyitemannotations(in long long asourceitemid, in long long adestitemid, in boolean aoverwritedest); void addobserver(in nsiannotationobse...
... void getpageswithannotation( in autf8string name, [optional] out unsigned long result
count, [retval, array, size_is(result
count)] out nsiuri results ); parameters name the annotation name.
...And 7 more matches
nsIInputStream
method overview unsigned long available();deprecated since gecko 17.0 unsigned long long available(); void close(); boolean isnonblocking(); unsigned long read(in charptr abuf, in unsigned long a
count); native code only!
... unsigned long readsegments(in nswritesegmentfun awriter, in voidptr aclosure, in unsigned long a
count); native code only!
... unsigned long read( in charptr abuf, in unsigned long a
count ); parameters abuf the buffer into which the data from the stream is copied.
...And 7 more matches
nsILoginManager
stance, use: var loginmanager = components.classes["@mozilla.org/login-manager;1"] .getservice(components.interfaces.nsiloginmanager); method overview void addlogin(in nsilogininfo alogin); nsiautocompleteresult autocompletesearch(in astring asearchstring, in nsiautocompleteresult apreviousresult, in nsidomhtmlinputelement aelement); unsigned long
countlogins(in astring ahostname, in astring aactionurl, in astring ahttprealm); boolean fillform(in nsidomhtmlformelement aform); void findlogins(out unsigned long
count, in astring ahostname, in astring aactionurl, in astring ahttprealm, [retval, array, size_is(
count)] out nsilogininfo logins); void getalldisabledhosts([optional] out unsigned long
count, [retval, array, si...
...ze_is(
count)] out wstring hostnames); void getalllogins([optional] out unsigned long
count, [retval, array, size_is(
count)] out nsilogininfo logins); boolean getloginsavingenabled(in astring ahost); void modifylogin(in nsilogininfo oldlogin, in nsisupports newlogindata); void removealllogins(); void removelogin(in nsilogininfo alogin); void searchlogins(out unsigned long
count, in nsipropertybag matchdata, [retval, array, size_is(
count)] out nsilogininfo logins); void setloginsavingenabled(in astring ahost, in boolean isenabled); methods addlogin() stores a new login in the login manager.
... nsiautocompleteresult autocompletesearch( in astring asearchstring, in nsiautocompleteresult apreviousresult, in nsidomhtmlinputelement aelement ); parameters asearchstring missing description apreviousresult missing description aelement missing description return value missing description
countlogins() returns the number of logins matching the specified criteria.
...And 7 more matches
nsIMsgDBView
method overview void open(in nsimsgfolder folder, in nsmsgviewsorttypevalue sorttype, in nsmsgviewsortordervalue sortorder, in nsmsgviewflagstypevalue viewflags, out long
count); void openwithhdrs(in nsisimpleenumerator aheaders, in nsmsgviewsorttypevalue asorttype, in nsmsgviewsortordervalue asortorder, in nsmsgviewflagstypevalue aviewflags, out long a
count); void close(); void init(in nsimessenger amessengerinstance, in nsimsgwindow amsgwindow, in nsimsgdbviewcommandupdater acommandupdater); void sort(in nsmsgviewsorttypevalue sortt...
...dex index); nsimsgdbhdr getmsghdrat(in nsmsgviewindex index); nsimsgfolder getfolderforviewindex(in nsmsgviewindex index); acstring geturiforviewindex(in nsmsgviewindex index); nsimsgdbview clonedbview(in nsimessenger amessengerinstance, in nsimsgwindow amsgwindow, in nsimsgdbviewcommandupdater acommandupdater); void geturisforselection([array, size_is(
count)] out string uris, out unsigned long
count); void getindicesforselection([array, size_is(
count)] out nsmsgviewindex indices, out unsigned long
count); void loadmessagebymsgkey(in nsmsgkey amsgkey); void loadmessagebyviewindex(in nsmsgviewindex aindex); void loadmessagebyurl(in string aurl); void reloadmessage(); void reloadmessagewithallparts(...
... void open(in nsimsgfolder folder, in nsmsgviewsorttypevalue sorttype, in nsmsgviewsortordervalue sortorder, in nsmsgviewflagstypevalue viewflags, out long
count); parameters folder the nsimsgfolder to open.
...And 7 more matches
nsINavHistoryService
nsiuri areferringuri, in long atransitiontype, in boolean aisredirect, in long long asessionid); obsolete since gecko 22.0 nsinavhistoryquery getnewquery(); nsinavhistoryqueryoptions getnewqueryoptions(); nsinavhistoryresult executequery(in nsinavhistoryquery aquery, in nsinavhistoryqueryoptions options); nsinavhistoryresult executequeries([array,size_is(aquery
count)] in nsinavhistoryquery aqueries, in unsigned long aquery
count, in nsinavhistoryqueryoptions options); void querystringtoqueries(in autf8string aquerystring, [array, size_is(aresult
count)] out nsinavhistoryquery aqueries, out unsigned long aresult
count, out nsinavhistoryqueryoptions options); autf8string queriestoquerystring([array, size_is(aquery
count)] in nsinavhistoryquery aq...
...ueries, in unsigned long aquery
count, in nsinavhistoryqueryoptions options); void addobserver(in nsinavhistoryobserver observer, in boolean ownsweak); void removeobserver(in nsinavhistoryobserver observer); void runinbatchmode(in nsinavhistorybatchcallback acallback, in nsisupports aclosure); void importhistory(in nsifile file); astring getcharsetforuri(in nsiuri auri); astring setcharsetforuri(in nsiuri auri, in astring acharset); attributes attribute type description hashistoryentries boolean true if there is any history.
...this is much better than using browserhistory.
count since that can be very slow if there is a lot of history (it must enumerate each item).
...And 7 more matches
Index
2 ac
count provisioner the ac
count provisioner is the dialog that first comes up when starting thunderbird.
... the ac
count provisioner gives the user the chance to search for and order a vanity email ac
count from a list of partner providers.
... if the user already has an email ac
count, the user can switch to the original ac
count setup wizard.
...And 7 more matches
Demo Addon
demo 1 - iterate over all the ac
counts this demo is implemented in demo1.html in the content folder.
... it lists all your email ac
counts with their ac
count type - either pop3 or imap - and the associated email addresses.
... let data = []; for each (let ac
count in fixiterator(mailservices.ac
counts.ac
counts, ci.nsimsgac
count)) { let info = { server: null, type: null, emails: [], name: null, }; let server = ac
count.incomingserver; if (server) { info.server = server.prettyname; info.type = server.type; } for each (let id in fixiterator(ac
count.identities, ci.nsimsgidentity)) { // we're only interested in identities that have a real email.
...And 7 more matches
list-style-type - CSS: Cascading Style Sheets
the list-style-type css property sets the marker (such as a disc, character, or custom
counter style) of a list item element.
... syntax /* partial list of types */ list-style-type: disc; list-style-type: circle; list-style-type: square; list-style-type: decimal; list-style-type: georgian; list-style-type: trad-chinese-informal; list-style-type: kannada; /* <string> value */ list-style-type: '-'; /* identifier matching an @
counter-style rule */ list-style-type: custom-
counter-style; /* keyword value */ list-style-type: none; /* global values */ list-style-type: inherit; list-style-type: initial; list-style-type: unset; the list-style-type property may be defined as any one of: a <custom-ident> value a symbols() value a <string> value the keyword none.
... values <custom-ident> a identifier matching the value of a @
counter-style or one of the predefined styles: symbols() defines an anonymous style of the list.
...And 7 more matches
Simple Query Syntax - Archive of obsolete content
for example: <label value="rdf:http://purl.org/dc/elements/1.1/title http://www.xulplanet.com/rdf/
country"/> the 'rdf:' form is really equivalent to the <binding> tag in the full syntax.
...for instance, you may filter results that have a certain category or
country.
...for example, to filter for photos with a specific
country: <hbox id="photoslist" datasources="template-guide-photos4.rdf" ref="http://www.xulplanet.com/rdf/myphotos" xmlns:r="http://www.xulplanet.com/rdf/"> <template> <rule r:
country="http://www.daml.org/2001/09/
countries/iso#it"> <vbox class="box-padded" uri="rdf:*"> <image src="rdf:*"/> <label value="rdf:http://purl.org/dc/elements/1.1/title"/> </vbox> ...
...And 6 more matches
BloatView
if it finds leaks, you can use ref
count tracing and balancing to discover the root cause.
... reading individual bloat logs full bloatview output contains per-class statistics on allocations and ref
counts, and provides gross numbers on the amount of memory being leaked broken down by class.
...(should be zero!) objects total - the total
count of objects allocated of a given class.
...And 6 more matches
TPS Tests
a test file may contain an arbitrary number of sections, each involving the same or different profiles, so that one test file may be used to test the effect of syncing and modifying a common set of data (from a single sync ac
count) over a series of different events and clients.
... set up an environment and run a test to run tps, you should create a new firefox ac
count using a restmail.net email address (strictly speaking, restmail isn't required, but it will allow tps to automatically do ac
count confirmation steps for you.
... even if you opt not to use restmail, do not use your personal firefox ac
count, as tps will delete and replace the data in it many times, not to mention the first run is very likely to fail, since it expects a clean start).
...And 6 more matches
NS_ConvertASCIItoUTF16
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 a
count print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase...
...And 6 more matches
NS_ConvertUTF8toUTF16
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 a
count print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase...
...And 6 more matches
nsAdoptingString
at tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 a
count print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase...
...And 6 more matches
nsAutoString
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 a
count print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase...
...And 6 more matches
nsDependentString
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 a
count print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase...
...And 6 more matches
nsFixedString
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 a
count print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase...
...And 6 more matches
nsPromiseFlatString
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 a
count print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase...
...And 6 more matches
nsString
r mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 a
count print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase...
...And 6 more matches
nsXPIDLString
at tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last
countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operato...
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoffset tells us where in this string to start searching @param a
count tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 a
count print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 a
count print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 a
count print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 a
count rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase...
...And 6 more matches
nsIMessenger
entity aidentity, in astring amsgfilename); void openattachment(in acstring contenttpe, in acstring url, in acstring displayname, in acstring messageuri, in boolean isexternalattachment); void saveattachment(in acstring contenttpe, in acstring url, in acstring displayname, in acstring messageuri, in boolean isexternalattachment); void saveallattachments(in unsigned long
count, [array, size_is(
count)] in string contenttypearray, [array, size_is(
count)] in string urlarray, [array, size_is(
count)] in string displaynamearray, [array, size_is(
count)] in string messageuriarray); void saveattachmenttofile(in nsifile afile, in acstring aurl, in acstring amessageuri, in acstring acontenttype, in nsiurllistener alistener); void detachattachment(in string conte...
...nttpe, in string url, in string displayname, in string messageuri, in boolean savefirst, [optional] in boolean withoutwarning); void detachallattachments(in unsigned long
count, [array, size_is(
count)] in string contenttypearray, [array, size_is(
count)] in string urlarray, [array, size_is(
count)] in string displaynamearray, [array, size_is(
count)] in string messageuriarray, in boolean savefirst, [optional] in boolean withoutwarning); nsilocalfile saveattachmenttofolder(in acstring contenttype, in acstring url, in acstring displayname, in acstring messageuri, in nsilocalfile adestfolder); nsimsgmessageservice messageservicefromuri(in acstring auri); nsimsgdbhdr msghdrfromuri(in acstring auri); acstring getmsguriatnavigatepos(in long apos); ac...
...string getfolderuriatnavigatepos(in long apos); void getnavigatehistory(out unsigned long acurpos, out unsigned long a
count, [array, size_is(a
count)] out string ahistory); note: prior to gecko 8.0, all references to nsidomwindow used in this interface were nsidomwindow.
...And 6 more matches
Getting Started Guide
xpcom basics: ownership and reference
counting this is a quick refresher on some fundamental issues of xpcom.
...each interface is (at least conceptually) separately `reference
counted'.
... that is, the interface keeps a
count of the number of clients holding references to it.
...And 6 more matches
Mail event system
for example, when a folder gets a new message, its total message
count increases.
... the folder pane needs to know that this changed so that it can update the message
count so the user can see it.
...in this example, there is a dialog open that shows properties for this folder including the message
count.
...And 6 more matches
AddressErrors - Web APIs
country a domstring which, if present, indicates that the
country property of the paymentaddress could not be validated.
... examples snippet: limiting destination
countries this first example is just a snippet showing an implementation of the event handler for the shippingaddresschange event which checks to be sure the chosen address is located within one of a limited number of
countries.
... function handleaddresschange(ev) { const valid
countries = ["us", "ca", "gb", "jp", "cn", "mx"]; const genericaddresserror = "unable to ship to the given address.
...And 6 more matches
Index - Archive of obsolete content
498 getresult
count needshelp, xul methods, xul reference no summary!
... 500 getrow
count xul methods, xul reference no summary!
... 673 customtoolbar
count needshelp, xul properties, xul reference no summary!
...And 5 more matches
Visual typescript game engine - Game development
for main ac
count session staff like login, register etc.
... client config if you want web app without any networking then setup: appusenetwork: boolean = false; you want to use communication for multiplayer but you don't want to use server database ac
count sessions.
...appuseac
countssystem: boolean = false; networking is disabled by default.
...And 5 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
increasingly, though, teams and hosting ac
counts don't allow ftp and instead rely on a version control system like git.
... you will still find it used on older hosting ac
counts, but it is safe to say that ftp is no longer considered best practice.
... 141 falsy codingscripting, glossary, javascript a falsy (sometimes written falsey) value is a value that is considered false when en
countered in a boolean context.
...And 5 more matches
Multiple-column layout - Learn web development
we switch on multicol by using one of two properties column-
count or column-width.
... the column-
count property will create as many columns as the value you give it, so if you add the following css to your stylesheet and reload the page, you will get three columns: .container { column-
count: 3; } the columns that you create have flexible widths — the browser works out how much space to assign each column.
... column-
count example body { width: 90%; max-width: 900px; margin: 2em auto; font: .9em/1.2 arial, helvetica, sans-serif; } <div class="container"> <h1>simple multicol example</h1> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...And 5 more matches
Initial setup
here we'll go over the ac
counts you need as well as the tools and their configurations you need to set up before contributing.
... ac
counts there are a handful of ac
counts that you need to be aware of as you begin.
...these ac
counts will store your code, contributions, and help you produce an official localization.
...And 5 more matches
Redis Tips
counters set, incr, incrby list manipulation lpush, rpush, lpop, rpop, llen, linsert, lindex, etc.
... event logging lists, zsets, pubsub queues lists (rpush, blpop, blpoprpush, etc.) priority queues zsets membership sets, bitstrings state hashes heartbeats zsets hit
counters zsets message broadcast pubsub search reverse indexes (never use keys in production) documentation redis has fantastic documentation.
... but some commands only work with numbers (like incr); for these, if your key can't be parsed as a number, it's an error: redis> set foo pie ok redis> incr foo (error) err value is not an integer or out of range atomic
counters i guess that sounds like geiger
counters.
...And 5 more matches
Using the Places history service
this entry contained the url, title, visit
count, last visit date, first visit date, host name, last referrer, flags for typed, hidden, and gecko flags (gecko flags is trunk only).
...the main url table stores the information about the page: url, host name, title, visit
count, hidden, and typed.
... modifying pages in history nsiglobalhistory2.setpagetitle: called by gecko when the <title> element is en
countered.
...And 5 more matches
nsITreeSelection
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void adjustselection(in long index, in long
count); void clearrange(in long startindex, in long endindex); void clearselection(); void getrangeat(in long i, out long min, out long max); long getrange
count(); void invalidateselection(); void invertselection(); boolean isselected(in long index); void rangedselect(in long startindex, in long endindex, in boolean augment); void select(in long index); void selectall(); void timedselect(in long index, in ...
...long delay); void toggleselect(in long index); attributes attribute type description
count long the number of rows currently selected in this tree.
... methods adjustselection() called when the row
count changes to adjust selection indices.
...And 5 more matches
ARIA: table role - Accessibility
<div role="table" aria-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-row
count="81"> <div id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none">aria role</span> <span role="columnheader" aria-sort="none">semantic element</span> </div> </div> <div role="rowgroup"> <div role="row" aria-rowindex="11"> <span role="cell">header</span> <span role="cell">h1</span> </div> <div role="row"...
...if any rows or columns are hidden, the aria-col
count or aria-row
count should be included indicating the total number of columns or rows, respectively, along with the aria-colindex or aria-rowindex on each cell.
... aria-col
count attribute this attribute is only required if the columns are not present in the dom all the time.
...And 5 more matches
negative - CSS: Cascading Style Sheets
when defining custom
counter styles, the negative descriptor lets you alter the representations of negative
counter values, by providing a way to specify symbols to be appended or prepended to the
counter representation when the value is negative.
... syntax /* <symbol> values */ negative: "-"; /* prepends '-' if value is negative */ negative: "(" ")"; /* surrounds value by '(' and ')' if it is negative */ values first <symbol> this symbol will be prepended to the representation when the
counter is negative.
... second <symbol> if present, this symbol will be appended to the representation when the
counter is negative.
...And 5 more matches
Using multi-column layouts - CSS: Cascading Style Sheets
using columns column
count and width two css properties control whether and how many columns will appear: column-
count and column-width.
... the column-
count property sets the number of columns to a particular number.
... </p> </div> css #col { column-
count: 2; } result will display the content in two columns (if you're using a multi-column compliant browser): the column-width property sets the minimum desired column width.
...And 5 more matches
animation - CSS: Cascading Style Sheets
it is a shorthand for animation-name, animation-duration, animation-timing-function, animation-delay, animation-iteration-
count, animation-direction, animation-fill-mode, and animation-play-state.
... /* @keyframes duration | timing-function | delay | iteration-
count | direction | fill-mode | play-state | name */ animation: 3s ease-in 1s 2 reverse both paused slidein; /* @keyframes name | duration | timing-function | delay */ animation: 3s linear 1s slidein; /* @keyframes name | duration */ animation: slidein 3s; <div class="grid"> <div class="col"> <div class="note"> given the following animation: <pre>@keyframes slidein { from { transform: scalex(0); } to { transform: scalex(1); } }</pre> </div> <div class="row"> <div clas...
... constituent properties this property is a shorthand for the following css properties: animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-
count animation-name animation-play-state animation-timing-function syntax the animation property is specified as one or more single animations, separated by commas.
...And 5 more matches
Math.clz32() - JavaScript
description "clz32" is short for
countleadingzeroes32.
...
count leading ones and beyond at present, there is no math.clon for "
count leading ones" (named "clon", not "clo", because "clo" and "clz" are too similar especially for non-english-speaking people).
...thus, inversing the bits will inverse the measured quantity of 0's (from math.clz32), thereby making math.clz32
count the number of ones instead of
counting the number of zeros.
...And 5 more matches
JavaScript Object Management - Archive of obsolete content
this message has been shown 5 times." keep the
counter as a variable in the browseroverlay object, and increment it every time the message is going to be shown.
...what will the
count be this time?
... you probably didn't expect this, but the
count was reset in the new window.
...And 4 more matches
Space Manager Detailed Design - Archive of obsolete content
the '
count' member of the band data struct * indicates how large the array of trapezoids needs to be */ nsresult getbanddata(nscoord ayoffset, const nssize& amaxsize, nsbanddata& abanddata) const; /** * add a rectangular region of unavailable space.
... nsbanddata& aavailablespace) const; nsiframe* const mframe; // frame associated with the space manager nscoord mx, my; // translation from local to global coordinate space bandlist mbandlist; // header/sentinel for circular linked list of band rects frameinfo* mframeinfomap; nsintervalset mfloatdamage; static print32 scachedspacemanager
count; static void* scachedspacemanagers[ns_space_manager_cache_size]; nsspacemanager(const nsspacemanager&); // no implementation void operator=(const nsspacemanager&); // no implementation }; public api life cycle the constructor requires a presentation shell, used for arena allocations mostly, and a frame that this space manager is rooted on.
...the '
count' member of the band data struct * indicates how large the array of trapezoids needs to be */ nsresult getbanddata(nscoord ayoffset, const nssize& amaxsize, nsbanddata& abanddata) const; /** * add a rectangular region of unavailable space.
...And 4 more matches
Framework main features - Learn web development
as an example, consider a button that
counts how many times it has been clicked.
... this component should be responsible for tracking its own
count state, and could be written like this: function
counterbutton() { const [
count] = usestate(0); return ( <button>clicked {
count} times</button> ); } usestate() is a react hook which, given an initial data value, will keep track of that value as it is updated.
... the code will be initially rendered like so in the browser: <button>clicked 0 times</button> the usestate() call keeps track of the
count value in a robust way across the app, without you needing to write code to do that yourself.
...And 4 more matches
Sqlite.jsm
this returns an integer
count of the number of cached statements that were discarded.
...with positional arguments, it is simple to modify the parameter
count or positions without fixing all users of the statement.
... let ac
counts = []; let ac
countid, username; let statement = "select ac
count_id, username from ac
counts order by username asc"; try { const result = await conn.executecached(statement, null, function(row, cancel) { ac
countid = row.getresultbyname("ac
count_id"); username = row.getresultbyname("username"); ac
counts.push({ ac
countid: ac
countid, username: username }); // if the cancel func...
...And 4 more matches
source-editor.jsm
boolean canundo(); void endcompoundchange(); boolean redo(); void resetundo(); void startcompoundchange(); boolean undo(); display management operations void focus(); number gettopindex(); boolean hasfocus(); void settopindex(number atopindex); content management operations number getchar
count(); string getindentationstring(); string getlinedelimiter(); number getline
count(); number getlineend(number alineindex, boolean aincludedelimiter); number getlinestart(number alineindex); string getmode(); string gettext([optional] number astart, [optional] number aend); string getselectedtext(); void setmode(str...
... getchar
count() returns the number of characters in the editor's content.
... number getchar
count(); parameters none.
...And 4 more matches
Investigating leaks using DMD heap scan mode
when combined with cycle collector logging, this can be used to investigate leaks of ref
counted cycle collected objects, by figuring out what holds a strong reference to a leaked object.
...dmd heap scan mode is a "tool of last resort" that should only be used when all other avenues have been tried and failed, except possibly ref
count logging.
...however, in that case it may be easier to use ref
count logging, or rr with a conditional breakpoint set on calls to release() for the leaking object, to see what object actually does the release that causes the leaked object to go away.
...And 4 more matches
JS::PerfMeasurement
it is a stopwatch profiler -- that is, it
counts events that occur while code of interest is running; it does not do call traces or sampling.
... the current implementation can measure eleven different types of low-level hardware and software events: events that can be measured bitmask passed to constructor
counter variable what it measures perfmeasurement::cpu_cycles .cpu_cycles raw cpu clock cycles ::instructions .instructions total instructions executed ::cache_references .cache_references total number of memory accesses ::cache_misses .cache_misses memory accesses that missed the cache ::branch_instructions .branch_instructions branch instructions executed ::branch_misses .branch_misses branch instructions that were not predicted correctly ::bus_cycles .bus_cycles total memory bus cycles ::page...
... all the
counter variables for events that are not being measured will have the fixed value (uint64)-1.
...And 4 more matches
Memory reporting
each reporter implements a collectreports function which takes a nsimemoryreportercallback argument; for each measurement the reporter must pass in several values, including: a path (which identifies the report); an amount (the most important thing); a unit (most commonly bytes, but sometimes a unitless
count or percentage); a description of what is measured.
...
counter-based reporters maintain a
counter that is incremented on each relevant allocation and decremented on each relevant deallocation.
...we've had multiple bugs in the past with
counter-based reporters.
...And 4 more matches
AsyncTestUtils extended framework
(see the bottom of this page for links to the source files.)
count: 10 the number of messages that should be in the set.
...(we will probably auto-correct that in the future.) if your set definition was {
count: 3, age: {days: 7}, age_incr: {days: -1}}, then you would generate messages from 7, 6, and 5 days ago.
...for example, {
count: 1, subject: "my suitcase"} would result in a single message with the subject "my suitcase" with a random sender and random recipient.
...And 4 more matches
Python binding for NSS
nss.certificate.check_ocsp_status nss.pk11slot.list_certs nss.certverifylognode.format_lines nss.certverifylog.format_lines nss.crldistributionpts.format_lines the following class properties were added: nss.certverifylognode.certificate nss.certverifylognode.error nss.certverifylognode.depth nss.certverifylog.
count the following module functions were added: nss.x509_cert_type nss.key_usage_flags nss.list_certs nss.find_certs_from_email_addr nss.find_certs_from_nickname nss.nss_get_version nss.nss_version_check nss.set_shutdown_callback nss.get_use_pkix_for_validation nss.set_use_pkix_for_validation nss.enab...
... certificate_new_from_certcertificate now takes add_reference parameter to properly reference
count certs, should fix shutdown busy problems.
... fix reference
counting bug in pk11_password_callback() which contributed to nss not being able to shutdown due to resources still in use.
...And 4 more matches
amIWebInstallListener
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview boolean onwebinstallblocked(in nsidomwindow awindow, in nsiuri auri, [array, size_is(a
count)] in nsivariant ainstalls, [optional] in pruint32 a
count); void onwebinstalldisabled(in nsidomwindow awindow, in nsiuri auri, [array, size_is(a
count)] in nsivariant ainstalls, [optional] in pruint32 a
count); boolean onwebinstallrequested(in nsidomwindow awindow, in nsiuri auri, [array, size_is(a
count)] in nsivariant ainstalls, [optional] in pruint32 a
count); note: prior ...
...boolean onwebinstallblocked( in nsidomwindow awindow, in nsiuri auri, [array, size_is(a
count)] in nsivariant ainstalls, in pruint32 a
count optional ); parameters awindow the window that triggered the installs.
... a
count optional the number of addoninstalls.
...And 4 more matches
nsIAccessibleTable
column
count long the number of columns in the table.
...obsolete since gecko 1.9.2 row
count long the number of rows in the table.
...obsolete since gecko 1.9.2 selectedcell
count unsigned long the total number of selected cells.
...And 4 more matches
nsISessionStore
, in astring akey); void deletewindowvalue(in nsidomwindow awindow, in astring akey); nsidomnode duplicatetab(in nsidomwindow awindow, in nsidomnode atab); nsidomnode forgetclosedtab(in nsidomwindow awindow, in unsigned long aindex); nsidomnode forgetclosedwindow(in unsigned long aindex); astring getbrowserstate(); unsigned long getclosedtab
count(in nsidomwindow awindow); astring getclosedtabdata(in nsidomwindow awindow); unsigned long getclosedwindow
count(); astring getclosedwindowdata(); astring gettabstate(in nsidomnode atab); astring gettabvalue(in nsidomnode atab, in astring akey); astring getwindowstate(in nsidomwindow awindow); astring getwindowvalue(in nsidomwindow ...
... getclosedtab
count() returns the number of restorable tabs for a given window.
... unsigned long getclosedtab
count( in nsidomwindow awindow ); parameters awindow the window whose restorable tab
count should be returned.
...And 4 more matches
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
plot(log); } function handleuncaughtexception(ex) { console.log('debugger hook threw:'); console.log(ex.tostring()); console.log('stack:'); console.log(ex.stack); }; function plot(log) { // given the log, compute a map from allocation sites to // allocation
counts.
... var
counts = new map; for (let site of log) { // this is a kludge, necessary for now.
... site = components.utils.waivexrays(site.frame); if (!
counts.has(site))
counts.set(site, 0);
counts.set(site,
counts.get(site) + 1); } // walk from each site that allocated something up to the // root, computing allocation totals that include // children.
...And 4 more matches
AudioWorkletNodeOptions - Web APIs
outputchannel
count optional an array defining the number of channels for each output.
... for example, outputchannel
count: [n, m] specifies the number of channels in the first output to be n and the second output to be m.
...if the length of the outputchannel
count array doesn't match numberofoutputs, an indexsizeerror will be thrown.
...And 4 more matches
RTCInboundRtpStreamStats - Web APIs
this
counter may also be incremented when fec packets arrive in-band along with media content; this can happen with opus, for example.
... fir
count an integer value which indicates the total number of full intra request (fir) packets which this receiver has sent to the sender.
... nack
count an integer value indicating the total number of negative acknolwedgement (nack) packets this receiver has sent.
...And 4 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
[important] get_accchild
count: get the number of children of an iaccessible.
...here are some of it's quirks and some solutions/workarounds: msaa can be crash prone problem: many of msaa's crash occur because more than one process is ref
counting the same objects, and because pointers are being shared between processes.
...it is impossible to know if and when the 3rd party assistive technology will use one of these signals to release the objects of yours that is is ref
counting.
...And 4 more matches
range - CSS: Cascading Style Sheets
when defining custom
counter styles, the range descriptor lets the author specify a range of
counter values over which the style is applied.
... if a
counter value is outside the specified range, then the fallback style will be used to construct the representation of that marker.
... syntax /* keyword value */ range: auto; /* range values */ range: 2 5; range: infinite 10; range: 6 infinite; range: infinite infinite; /* multiple range values */ range: 2 5, 8 10; range: infinite 6, 10 infinite; values auto the range depends on the
counter system: for cyclic, numeric, and fixed systems, the range is negative infinity to positive infinity.
...And 4 more matches
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.
...npobjects are reference
counted objects, so callers need to be careful to properly release acquired references to them.
... to aid with the reference
counting and ownership management in general, the functions npn_createobject(), npn_retainobject(), npn_releaseobject(), and npn_releasevariantvalue() are provided as part of this api.
...And 3 more matches
Command line crash course - Learn web development
we’ve already looked at ls, which outputs the contents of the current directory: ls but what if we wanted to quickly
count the number of files and directories inside the current directory?
...this
counts the number of words, lines, characters, or bytes of whatever is inputted into it.
... this can be a text file — the below example outputs the number of lines in myfile.txt: wc -l myfile.txt but it can also
count the number of lines of whatever output is piped into it.
...And 3 more matches
Extending a Protocol
managing child actors with reference
counting.
... include protocol pwindowglobal; namespace mozilla { namespace dom { async ref
counted protocol pecho { manager pwindowglobal; parent: async echo(nscstring data) returns (nscstring aresult); async __delete__(); }; } // namespace dom } // namespace mozilla now, edit "./dom/ipc/moz.build" file and add 'pecho.ipdl', to the ipdl_sources array.
... async ref
counted protocol pecho {....} - this protocol is "async", meaning we are going to use mozpromises.
...And 3 more matches
Localizing with Mercurial
for the eager and quick, below you'll find instructions on installing and configuring mercurial, instructions on receiving an hg ac
count commit priviledges, as well as a few tasks you can complete without ac
count priviledges.
... to update your local l10n repo after your first clone, run this command from your local l10n directory: hg pull -u creating l10n patches another thing you can do with hg without needing ac
count priviledges is creating l10n patches of your work for someone else to commit to your remote l10n repo on the mozilla servers.
... mercurial ac
count priviledges eventually, you or your team leader will need hg ac
count priviledges.
...And 3 more matches
Leak-hunting strategies and tips
strategy for finding leaks when trying to make a particular testcase not leak, i recommend focusing first on the largest object graphs (since these entrain many smaller objects), then on smaller reference-
counted object graphs, and then on any remaining individual objects or small object graphs that don't entrain other objects.
... tool finds platforms requires leak tools for large object graphs leak gauge windows, documents, and docshells only all platforms any build gc and cc logs js objects, dom objects, many other kinds of objects all platforms any build leak tools for medium-size object graphs bloatview, ref
count tracing and balancing objects that implement nsisupports or use moz_
count_{ctor,dtor} all tier 1 platforms debug build (or build opt with --enable-logrefcnt) leaksoup (part of tracemalloc) all objects?
... build with --enable-trace-malloc common leak patterns when trying to find a leak of reference-
counted objects, there are a number of patterns that could cause the leak: ownership cycles.
...And 3 more matches
Monitors
the first time the thread enters a monitor, it acquires the monitor's lock and the thread's entry
count is incremented to 1.
... each subsequent time the thread successfully enters the same monitor, the thread's entry
count is incremented again, and each time the thread exits the monitor, the thread's entry
count is decremented.
... when the entry
count for a thread reaches zero, the thread releases the monitor's lock, and other threads that were blocked while trying to enter the monitor will be rescheduled.
...And 3 more matches
Index
those handles are reference
counted.
...instead of simply verifying that the requester of a certificate is in control of an administrative email address at the desired web site's domain, it's required that the ca performs a verification of real world identity documents (such as a company registration document with the
country's authority), and it's also required that a browser software performs a revocation check with the ca, prior to granting validity to the certificate.
...id encryption algorithm: pkcs #12 v2 pbe with sha-1 and 3key triple des-cbc parameters: salt: 45:2e:6a:a0:03:4d:7b:a1:63:3c:15:ea:67:37:62:1f iteration
count: 1 (0x1) certificate: data: version: 3 (0x2) serial number: 13 (0xd) signature algorithm: pkcs #1 sha-1 with rsa encryption issuer: "e=personal-freemail@thawte.com,cn=thawte personal freemail c a,ou=certification services division,o=thawte consulting,l=cape t own,st=western cape,c=za" ....
...And 3 more matches
Tracing JIT
the trace monitor maintains some book-keeping information, as well as the collection of recorded fragments, held in a hashtable keyed by the interpreter's program
counter and global object shape at the time of recording.
...every timespidermonkey interprets a backward-jump bytecode, the monitor makes note of the number of times the jump-target program-
counter (pc) value has been jumped-to.
... this number is called the hit
count for the pc.
...And 3 more matches
Using XPCOM Utilities to Make Things Easier
unless you have very special requirements for managing reference
counting or handling interface discovery, theimplementation macros that xpcom provides can be used.
... smart pointers all of the interfaces that you've seen so far are reference
counted.
... ns_release(value); // release our reference } a method returns an nsisupports interface pointer that has been reference
counted before it is returned (assuming it wasn't nsnull).
...And 3 more matches
IAccessibleTable
x, [out] long columnindex ); [propget] hresult iscolumnselected([in] long column, [out] boolean isselected ); [propget] hresult isrowselected([in] long row, [out] boolean isselected ); [propget] hresult isselected([in] long row, [in] long column, [out] boolean isselected ); [propget] hresult modelchange([out] ia2tablemodelchange modelchange ); [propget] hresult ncolumns([out] long column
count ); [propget] hresult nrows([out] long row
count ); [propget] hresult nselectedchildren([out] long cell
count ); [propget] hresult nselectedcolumns([out] long column
count ); [propget] hresult nselectedrows([out] long row
count ); [propget] hresult rowcolumnextentsatindex([in] long index, [out] long row, [out] long column, [out] long rowextents, [out] long columnextents, [out] boolean issele...
...[propget] hresult ncolumns( [out] long column
count ); parameters column
count number of columns in table (including columns outside the current viewport) return value s_ok.
...[propget] hresult nrows( [out] long row
count ); parameters row
count number of rows in table (including rows outside the current viewport) return value s_ok.
...And 3 more matches
IAccessibleTable2
n] long column, [out] iunknown cell ); [propget] hresult columndescription([in] long column, [out] bstr description ); [propget] hresult iscolumnselected([in] long column, [out] boolean isselected ); [propget] hresult isrowselected([in] long row, [out] boolean isselected ); [propget] hresult modelchange([out] ia2tablemodelchange modelchange ); [propget] hresult ncolumns([out] long column
count ); [propget] hresult nrows([out] long row
count ); [propget] hresult nselectedcells([out] long cell
count ); [propget] hresult nselectedcolumns([out] long column
count ); [propget] hresult nselectedrows([out] long row
count ); [propget] hresult rowdescription([in] long row, [out] bstr description ); hresult selectcolumn([in] long column ); [propget] hresult selectedcells([out, size_is(,...
...[propget] hresult ncolumns( [out] long column
count ); parameters column
count number of columns in table (including columns outside the current viewport) return value s_ok.
...[propget] hresult nrows( [out] long row
count ); parameters row
count number of rows in table (including rows outside the current viewport) return value s_ok.
...And 3 more matches
nsIConsoleService
inherits from: nsisupports last changed in gecko 19 (firefox 19 / thunderbird 19 / seamonkey 2.16) implemented by: @mozilla.org/consoleservice;1 as a service: var consoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); method overview void getmessagearray([array, size_is(
count)] out nsiconsolemessage messages, out uint32_t
count);obsolete since gecko 19 void getmessagearray([optional] out uint32_t
count, [retval, array, size_is(
count)] out nsiconsolemessage messages); void logmessage(in nsiconsolemessage message); void logstringmessage(in wstring message); void registerlistener(in nsiconsolelistener listener); void reset(); ...
... void getmessagearray( [array, size_is(
count)] out nsiconsolemessage messages, out pruint32
count ); parameters messages an array of logged messages.
...
count the number of messages in the array.
...And 3 more matches
nsICookieManager2
rface: components.utils.import("resource://gre/modules/services.jsm"); var cookieservice = services.cookies; method overview void add(in autf8string ahost, in autf8string apath, in acstring aname, in acstring avalue, in boolean aissecure, in boolean aishttponly, in boolean aissession, in print64 aexpiry); boolean cookieexists(in nsicookie2 acookie); unsigned long
countcookiesfromhost(in autf8string ahost); boolean findmatchingcookie(in nsicookie2 acookie, out unsigned long a
countfromhost); obsolete since gecko 1.9 nsisimpleenumerator getcookiesfromhost(in autf8string ahost); void importcookies(in nsifile acookiefile); methods add() adds a cookie.
...
countcookiesfromhost() returns the number of cookies that would be returned to a given host.
...therefore, if the specified host is "weather.yahoo.com", host or domain cookies for "weather.yahoo.com" and "yahoo.com" would both be
counted, while a cookie for "my.weather.yahoo.com" would not.
...And 3 more matches
nsIMsgDatabase
nsisimpleenumerator enumeratemessages(); nsisimpleenumerator enumeratethreads(); void sync
counts; nsimsgthread getthreadcontainingmsghdr(in nsimsgdbhdr msghdr); void markhdrread(in nsimsgdbhdr msghdr, in boolean bread, in nsidbchangelistener instigator); void markhdrreplied(in nsimsgdbhdr msghdr, in boolean breplied, in nsidbchangelistener instigator); void markhdrmarked(in nsimsgdbhdr msghdr, in boolean mark,in nsidbchangelistener instigator); void markmdnneeded(in nsmsgkey key, ...
... void getnewlist(out unsigned long
count, array, size_is(
count) out nsmsgkey newkeys); nsisimpleenumerator getcachedhits(in string asearchfolderuri); void refreshcache(in string asearchfolderuri, in unsigned long anumkeys, array, size_is (anumkeys) in nsmsgkey anewhits, out unsigned long anumbadhits, array, size_is(anumbadhits) out nsmsgkey astalehits); void updatehdrincache(in string asearchfolderuri, in nsimsgdbhdr ahdr, in bool...
... void addnewhdrtodb(in nsimsgdbhdr newhdr, in boolean notify); copyhdrfromexistinghdr() nsimsgdbhdr copyhdrfromexistinghdr(in nsmsgkey key, in nsimsgdbhdr existinghdr, in boolean addhdrtodb); listallkeys() [noscript] void listallkeys(in nsmsgkeyarrayref outputkeys); enumeratemessages() nsisimpleenumerator enumeratemessages(); enumeratethreads() nsisimpleenumerator enumeratethreads(); sync
counts()
count the total and unread msgs, and adjust global
count if needed.
...And 3 more matches
nsITelemetry
{ name1: {data1}, name2:{data2}...} where data consists of the following properties: min - minimal bucket size max - maximum bucket size histogram_type - histogram_exponential or histogram_linear
counts - an array representing the values of buckets in the histogram.
... sum - sum of the
counts array.
... histogram_flag 3 for storing a single value; its
count is always == 1.
...And 3 more matches
nsIVariant
nsresult getasarray(out pruint16 type, out nsiid iid, out pruint32
count, out voidptr ptr); violates the xpcom interface guidelines astring getasastring(); native code only!
... violates the xpcom interface guidelines getasarray() nsresult getasarray( out pruint16 type, out nsiid iid, out pruint32
count, out voidptr ptr ); parameters type the type of the array elements.
...
count the number of elements in the array.
...And 3 more matches
Autoconfiguration in Thunderbird
author: ben bucksch please do not change this document without consulting the author thunderbird 3.1 and later (and 3.0 to some degree) includes mail ac
count autoconfiguration functionality.
...in many cases, people should be able to download and install thunderbird, enter their real name, email address and password in the ac
count setup wizard and have a fully functioning mail client and get and send their mail as securely as possible.
... see also: for instructions for users, see automatic ac
count configuration on the thunderbird knowledge base.
...And 3 more matches
Aggregate view - Firefox Developer Tools
for example, in the screenshot above you can see that javascript objects ac
count for most memory, followed by strings.
... the "total
count" column shows you the number of objects of each category that are currently allocated.
... for example, in the screenshot above, you can see that: there are four array objects that ac
count for 15% of the total heap.
...And 3 more matches
How to create a DOM tree - Web APIs
dynamically creating a dom tree consider the following xml document: <?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="arlington" state="ma"
country="usa"/> </person> <person first-name="jed" last-name="brown"> <address street="321 north st" city="atlanta" state="ga"
country="usa"/> <address street="123 west st" city="seattle" state="wa"
country="usa"/> <address street="321 south avenue" city="denver" state="co"
country="usa"/> </person> </peopl...
...onelem1 = doc.createelement("person"); personelem1.setattribute("first-name", "eric"); personelem1.setattribute("middle-initial", "h"); personelem1.setattribute("last-name", "jung"); var addresselem1 = doc.createelement("address"); addresselem1.setattribute("street", "321 south st"); addresselem1.setattribute("city", "denver"); addresselem1.setattribute("state", "co"); addresselem1.setattribute("
country", "usa"); personelem1.appendchild(addresselem1); var addresselem2 = doc.createelement("address"); addresselem2.setattribute("street", "123 main st"); addresselem2.setattribute("city", "arlington"); addresselem2.setattribute("state", "ma"); addresselem2.setattribute("
country", "usa"); personelem1.appendchild(addresselem2); var personelem2 = doc.createelement("person"); personelem2.setattribute...
...("first-name", "jed"); personelem2.setattribute("last-name", "brown"); var addresselem3 = doc.createelement("address"); addresselem3.setattribute("street", "321 north st"); addresselem3.setattribute("city", "atlanta"); addresselem3.setattribute("state", "ga"); addresselem3.setattribute("
country", "usa"); personelem2.appendchild(addresselem3); var addresselem4 = doc.createelement("address"); addresselem4.setattribute("street", "123 west st"); addresselem4.setattribute("city", "seattle"); addresselem4.setattribute("state", "wa"); addresselem4.setattribute("
country", "usa"); personelem2.appendchild(addresselem4); var addresselem5 = doc.createelement("address"); addresselem5.setattribute("street", "321 south avenue"); addresselem5.setattribute("city", "denver"); addresselem5.setattribute("state"...
...And 3 more matches
PaymentAddress - Web APIs
the exact size and content varies by
country or location and can include, for example, a street name, house number, apartment number, rural delivery route, descriptive instructions, or post office box number.
... paymentaddress.
country read only a domstring specifying the
country in which the address is located, using the iso-3166-1 alpha-2 standard.
...some examples of valid
country values: "us", "gb", "cn", or "jp".
...And 3 more matches
SubtleCrypto.encrypt() - Web APIs
exceptions the promise is rejected when the following exceptions are en
countered: invalidaccesserror raised when the requested operation is not valid for the provided key (e.g.
...the web crypto api supports three different aes modes: ctr (
counter mode) cbc (cipher block chaining) gcm (galois/
counter mode) it's strongly recommended to use authenticated encryption, which includes checks that the ciphertext has not been modified by an attacker.
... aes-ctr this represents aes in
counter mode, as specified in nist sp800-38a.
...And 3 more matches
CSS reference - CSS: Cascading Style Sheets
--webkit-line-clampa:activeadditive-symbols (@
counter-style)::after (:after)align-contentalign-itemsalign-selfall<an-plus-b><angle><angle-percentage>animationanimation-delayanimation-directionanimation-durationanimation-fill-modeanimation-iteration-
countanimation-nameanimation-play-stateanimation-timing-function@annotationannotation()attr()b::backdropbackdrop-filterbackface-visibilitybackgroundbackground-attachmentbackground-blend-modebackground-c...
...rt-start-radiusborder-styleborder-topborder-top-colorborder-top-left-radiusborder-top-right-radiusborder-top-styleborder-top-widthborder-widthbottom@bottom-centerbox-decoration-breakbox-shadowbox-sizingbreak-afterbreak-beforebreak-insidebrightness()ccalc()caption-sidecaret-colorch@character-variantcharacter-variant()@charset:checkedcircle()clamp()clearclipclip-pathcm<color>colorcolor-adjustcolumn-
countcolumn-fillcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-spancolumn-widthcolumnsconic-gradient()containcontentcontrast()<
counter>
counter-increment
counter-reset
counter-set@
counter-style
counters()cross-fade()cubic-bezier()::cue::cue-regioncursor<custom-ident>d:defaultdeg<dimension>:dirdirection:disableddisplay<display-box><display-inside><display-internal><display-le...
...gacy><display-listitem><display-outside>dpcmdpidppxdrop-shadow()eelement()ellipse()em:emptyempty-cells:enabledenv()exffallback (@
counter-style)filter<filter-function>:first:first-child::first-letter (:first-letter)::first-line (:first-line):first-of-typefit-content()<flex>flexflex-basisflex-directionflex-flowflex-growflex-shrinkflex-wrapfloat:focusfont@font-facefont-familyfont-family (@font-face)font-feature-settingsfont-feature-settings (@font-face)@font-feature-valuesfont-kerningfont-language-overridefont-optical-sizingfont-sizefont-size-adjustfont-stretchfont-stretch (@font-face)font-stylefont-style (@font-face)font-synthesisfont-variantfont-variant (@font-face)font-variant-alternatesfont-variant-capsfont-variant-east-asianfont-variant-ligaturesfont-variant-numericfont-variant-positionfont-v...
...And 3 more matches
<custom-ident> - CSS: Cascading Style Sheets
counter-reset
counter-increment forbids the global css values (unset, initial, and inherit), as well as none.
... @
counter-style list-style-type forbids the global css values (unset, initial, and inherit), as well as the values none, inline, and outside.
... css
counter styles level 3the definition of '<custom-ident> for list-style-type' in that specification.
...And 3 more matches
Details of the object model - JavaScript
you could use the following definition for employee: var id
counter = 1; function employee(name, dept) { this.name = name || ''; this.dept = dept || 'general'; this.id = id
counter++; } with this definition, when you create a new employee, the constructor assigns it the next id in sequence and then increments the global id
counter.
...however, id
counter gets incremented every time an employee object is created, for whatever purpose.
...suppose you have the following code: var id
counter = 1; function employee(name, dept) { this.name = name || ''; this.dept = dept || 'general'; this.id = id
counter++; } function manager(name, dept, reports) {...} manager.prototype = new employee; function workerbee(name, dept, projs) {...} workerbee.prototype = new employee; function engineer(name, projs, mach) {...} engineer.prototype = new workerbee; function salesperson(name, projs, quota) {...} salesperson.prototype = new workerbee; var mac = new engineer('wood, mac'); further assume that the definitions omitted here have the base property and call the constructor above them in the protot...
...And 3 more matches
Array.prototype.copyWithin() - JavaScript
if negative, target will be
counted from the end.
...if negative, start will be
counted from the end.
...if negative, end will be
counted from the end.
...And 3 more matches
String.prototype.repeat() - JavaScript
syntax str.repeat(
count) parameters
count an integer between 0 and +infinity, indicating the number of times to repeat the string.
... exceptions rangeerror: repeat
count must be non-negative.
... rangeerror: repeat
count must be less than infinity and not overflow maximum string size.
...And 3 more matches
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:number> element
counts things sequentially.
... syntax <xsl:number
count=expression level="single" | "multiple" | "any" from=expression value=expression format=format-string lang=xml:lang-code letter-value="alphabetic" | "traditional" grouping-separator=character grouping-size=number /> required attributes none.
... optional attributes
count specifies what in the source tree should be numbered sequentially.
...And 3 more matches
places/history - Archive of obsolete content
example let { search } = require("sdk/places/history"); // simple query search( { url: "https://developers.mozilla.org/*" }, { sort: "visit
count" } ).on("end", function (results) { // results is an array of objects containing // data about visits to any site on developers.mozilla.org // ordered by visit
count }); // complex query // the query objects are or'd together // let's say we want to retrieve all visits from before a week ago // with the query of 'ruby', but from last week onwards, we want // all results with 'javascript' i...
... options : object optional options: name type
count number the number of bookmark items to return.
...possible options are 'title', 'date', 'url', 'visit
count', 'keyword', 'dateadded' and 'lastmodified'.
...And 2 more matches
Handling Preferences - Archive of obsolete content
pref("extensions.xulschoolhello.message.
count", 0); this defines a preference we'll use to keep track of the amount of times we have displayed a greeting message to the user.
...get
count() { return this._prefservice.getintpref("extensions.xulschoolhello.message.
count"); }, increment : function() { let current
count = this._prefservice.getintpref("extensions.xulschoolhello.message.
count"); this._prefservice.setintpref("extensions.xulschoolhello.message.
count", current
count + 1); } one important thing to keep in mind is that the "get" methods of the service can throw a...
...in order to have this button enabled in your extension you need to add the following line to install.rdf: <em:optionsurl>chrome://xulschoolhello/content/preferenceswindow.xul</em:optionsurl> if you want to open this window from a different place in the ui, such as a menu item or a button in a toolbar, you need to take into ac
count that the opening behavior of a preferences window is different depending on the operating system.
...And 2 more matches
JXON - Archive of obsolete content
jpg">red</color_swatch> <color_swatch image="burgundy_cardigan.jpg">burgundy</color_swatch> </size> <size description="large"> <color_swatch image="red_cardigan.jpg">red</color_swatch> <color_swatch image="burgundy_cardigan.jpg">burgundy</color_swatch> </size> </catalog_item> <catalog_item gender="women's"> <item_number>rrx9856</item_number> <dis
count_until>dec 25, 1995</dis
count_until> <price>42.50</price> <size description="medium"> <color_swatch image="black_cardigan.jpg">black</color_swatch> </size> </catalog_item> </product> <script type="text/javascript"><![cdata[function matchwo(a,b) { if (a < b && a < 0) { return 1; } else { return 0; } }]]></script> </catalog> first, create a dom tree like the pr...
... jxontree.prototype.valueof = function () { return this.keyvalue; }; jxontree.prototype.tostring = function () { return string(this.keyvalue); }; jxontree.prototype.getitem = function (nitem) { if (nlength === 0) { return null; } var n
count = 0; for (var skey in this) { if (n
count === nitem) { return this[skey]; } n
count++; } return null; }; jxontree.prototype.getattribute = function (nattrid) { if (nattrlen === 0 || nattrid + 1 > nattrlen) { return null; } var nattr = 0; for (var sattrname in this.keyattributes) { if (nattr === nattrid) { return this.keyattributes[sattrname]; } nattr++; } return null; }; jxontree.protot...
...: "burgundy_cardigan.jpg" } }], "purchased": { "keyvalue": null }, "keyvalue": null, "keyattributes": { "description": "large" } }], "keyvalue": null, "keyattributes": { "gender": "men's" } }, { "item_number": { "keyvalue": "rrx9856" }, "dis
count_until": { "keyvalue": new date(1995, 11, 25) }, "price": { "keyvalue": 42.5 }, "size": { "color_swatch": { "keyvalue": "black", "keyattributes": { "image": "black_cardigan.jpg" } }, "keyvalue": null, "keyattributes": { "description": "medium" } ...
...And 2 more matches
Table Cellmap - Archive of obsolete content
in this low level cellmap the row
count begins every time with 0.
... a typical code segment to come from the table level down to the rowgroup level nscellmap* map = mfirstmap; while (map) { if (map->getrow
count() > rowindex) { // add your action here } rowindex -= map->getrow
count(); map = map->getnextsibling(); } data entry the usual way to populate the cellmap is via nstableframe::insertrows.
... insertrowsbefore firstrow=0 ***start table dump*** mcolwidths= row(0)=02763344 cell(0)=02763528 cell(0)=0276381c row(0)=02763940 cell(0)=02763990 cell(0)=02763ab4 ***** start table cell map dump ***** 023566b0 cols array orig/span-> 023566b0 ***** start group cell map dump ***** 023565b0 maprow
count=0 tablerow
count=0 ***** end group cell map dump ***** ***** end table cell map dump ***** ***end table dump*** insertrowsafter ***start table dump*** mcolwidths=-1 -1 row(0)=02763344 cell(0)=02763528 cell(1)=0276381c row(1)=02763940 cell(0)=02763990 cell(1)=02763ab4 ***** start table cell map dump ***** 023566b0 cols array orig/span-> 023566b00=2/0 1=2/0 ***** start group cell map dump *****...
...And 2 more matches
Static Content - Archive of obsolete content
<menulist datasources="template-guide-photos4.rdf" ref="http://www.daml.org/2001/09/
countries/
country-ont#
country" oncommand="applyfilter(event.target.value);"> <menupopup> <menuitem label="all"/> </menupopup> <template> <query> <content uri="?start"/> <triple subject="?
country" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="?start"/> <triple subject="?
country" predicate="http://pu...
...rl.org/dc/elements/1.1/title" object="?
countrytitle"/> </query> <action> <menupopup> <menuitem uri="?
country" label="?
countrytitle" value="?
country"/> </menupopup> </action> </template> </menulist> the only difference between the previous example and this one is that the menulist element has some additional content added before the template.
...the template generates two results as before, one for each
country, and appends a menuitem for each one.
...And 2 more matches
Tree Selection - Archive of obsolete content
child items are included in the
count just after their parents.
...the rows that are not displayed are not included in the index
count.
...because the selected items in a multiple selection tree are not necessarily contiguous, you can retrieve each block of contigous selections using the getrange
count() and getrangeat() functions.
...And 2 more matches
listbox - Archive of obsolete content
attributes disabled, disablekeynavigation, preference, rows, seltype, suppressonselect, tabindex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, item
count, listboxobject, selected
count, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrow
count, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, re...
...to get the actual number of rows in the element, use the getrow
count method.
... item
count type: integer read only property holding the number of child items.
...And 2 more matches
Collision detection - Game development
for better readability of the code we will define the b variable for storing the brick object in every loop of the collision detection: function collisiondetection() { for(var c=0; c<brickcolumn
count; c++) { for(var r=0; r<brickrow
count; r++) { var b = bricks[c][r]; // calculations } } } if the center of the ball is inside the coordinates of one of our bricks, we'll change the direction of the ball.
... let's write that down in code: function collisiondetection() { for(var c=0; c<brickcolumn
count; c++) { for(var r=0; r<brickrow
count; r++) { var b = bricks[c][r]; if(x > b.x && x < b.x+brickwidth && y > b.y && y < b.y+brickheight) { dy = -dy; } } } } add the above block to your code, below the keyuphandler() function.
...update the following part of the code as indicated by the highlighted line: var bricks = []; for(var c=0; c<brickcolumn
count; c++) { bricks[c] = []; for(var r=0; r<brickrow
count; r++) { bricks[c][r] = { x: 0, y: 0, status: 1 }; } } next we'll check the value of each brick's status property in the drawbricks() function before drawing it — if status is 1, then draw it, but if it's 0, then it was hit by the ball and we don't want it on the screen anymore.
...And 2 more matches
CSS values and units - Learn web development
let's have a look at some of the types of value and unit you may frequently en
counter, with examples so that you can try out different possible values.
... ems and rems em and rem are the two relative lengths you are likely to en
counter most frequently when sizing anything from boxes to text.
... hexadecimal rgb values the next type of color value you are likely to en
counter is hexadecimal codes.
...And 2 more matches
How CSS works - Learn web development
prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, and html basics (study introduction to html.) objective: to understand the basics of how css and html are parsed by the browser, and what happens when a browser en
counters css it does not understand.
... what happens if a browser en
counters css it doesn't understand?
...given that css is being developed all the time, and is therefore ahead of what browsers can recognise, you might wonder what happens if a browser en
counters a css selector or declaration it doesn't recognise.
...And 2 more matches
Styling lists - Learn web development
controlling list
counting sometimes you might want to
count differently on an ordered list — e.g.
... starting from a number other than 1, or
counting backwards, or
counting in steps of more than 1.
... start the start attribute allows you to start the list
counting from a number other than 1.
...And 2 more matches
Third-party APIs - Learn web development
requiring a key enables the api provider to hold users of the api ac
countable for their actions.
... next, you need to go to the mapquest developer site, create an ac
count, and then create a developer key to use with your example.
...for google apis in general, you need to create a google ac
count and log into the google cloud platform console to create api keys, etc., and the process is fairly complex.
...And 2 more matches
Adding features to our bouncing balls demo - Learn web development
finally, we want to add a score
counter to track the number of balls left to capture.
... implementing the score
counter to implement the score
counter, follow the following steps: in your html file, add a <p> element just below the <h1> element containing the text "ball
count: ".
... keep a
count of the number of balls on screen in some way.
...And 2 more matches
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
here we'll get the todo
counter to update to show the correct number of todos still to complete, and correctly apply styling to completed todos (i.e.
... connecting the behavior in the footer to get the footer working, we need to implement the following thre areas of functionality: a pending todo
counter.
... get todo
countisone() { return this.incomplete.length === 1; } then go back over to footer.hbs and update the previous template section we edited to the following: <strong>{{this.todos.incomplete.length}}</strong> {{#if this.todos.todo
countisone}} todo {{else}} todos {{/if}} left now save and test, and you'll see the correct pluralization used when you only have one todo item present!
...And 2 more matches
Strategies for carrying out testing - Learn web development
previous overview: cross browser testing next this article starts the module off by providing an overview of the topic of (cross) browser testing, answering questions such as "what is cross-browser testing?", "what are the most common types of problems you'll en
counter?", and "what are the main approaches for testing, identifying, and fixing problems?" prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high level principles of cross-browser testing.
...certain
countries, or locales), then you will probably have different common browsers to test.
...there are a number of sites that provide such stats, for example: netmarketshare stat
counter these are both very north america-centric, and not particularly accurate, but they can give you an idea of broad trends.
...And 2 more matches
Mozilla accessibility architecture
this tree traversal is accomplished via toolkit-specific calls which end up as calls into nsiaccessible methods getaccparent(), getaccnextsibling(), getaccprevioussibling(), getaccfirstchild(), getacclastchild(), getaccchild
count() and getchildat(childnum).
...to make this less expensive, once the child
count or any child of an accessible is asked for, both the child
count and the children are calculated at the same time and then cached, so that we can avoid doing these expensive operations more than once.
... in all of these accessible implementations we override nsiaccessible::getaccchild
count(), ::getaccfirstchild() and ::getacclastchild().
...And 2 more matches
Phishing: a short definition
the login portal might resemble the trusted website's login page very closely, and convince users to enter their credentials, letting others hijack their ac
count.
... past and current
countermeasures various technical, and social approaches, exist to combat phishing attacks.
... shifting blame to users some quick-to-implement, and cost-effective solutions, hold users ac
countable for their actions instead of restricting what’s technically possible.
...And 2 more matches
Enc Dec MAC Output Public Key as CSR
e; goto cleanup; } rv = sec_dersigndata(arena, &result, encoding->data, encoding->len, privk, signalgtag); if (rv) { pr_fprintf(pr_stderr, "signing of data failed\n"); rv = secfailure; goto cleanup; } /* encode request in specified format */ if (ascii) { char *obuf; char *name, *email, *org, *state, *
country; secitem *it; int total; it = &result; obuf = btoa_convertitemtoascii(it); total = pl_strlen(obuf); name = cert_getcommonname(subject); if (!name) { name = strdup("(not specified)"); } email = cert_getcertemailaddress(subject); if (!email) email = strdup("(not specified)"); org =...
... cert_getorgname(subject); if (!org) org = strdup("(not specified)"); state = cert_getstatename(subject); if (!state) state = strdup("(not specified)");
country = cert_get
countryname(subject); if (!
country)
country = strdup("(not specified)"); pr_fprintf(outfile, "\ncertificate request generated by netscape certutil\n"); pr_fprintf(outfile, "common name: %s\n", name); pr_fprintf(outfile, "email: %s\n", email); pr_fprintf(outfile, "organization: %s\n", org); pr_fprintf(outfile, "state: %s\n", state); pr_fprintf(outfile, "
country: %s\n\n",
country); pr_fprintf(outfile, "%s\n", ns_certreq_header); numbytes = pr_write(outfile, obuf, total...
...ivitem, secitem *paditem) { secstatus rv; unsigned char decbuf[64]; unsigned int decbuflen; unsigned char ptext[blocksize]; unsigned int ptextlen = 0; unsigned char ctext[64]; unsigned int ctextlen; unsigned char newmac[digestsize]; unsigned int newmaclen = 0; unsigned int newptextlen = 0; unsigned int
count = 0; unsigned int temp = 0; unsigned int blocknumber = 0; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned char iv[blocksize]; unsigned int ivlen = ivitem->len; unsigned int paddinglength; int j; memcpy(iv, ivitem->data, ivitem->...
...And 2 more matches
sslcrt.html
instead, it takes ac
count of the following rules governing the construction of common names in ssl server certificates: * matches anything ?
... description the cert_dupcertificate function increments the reference
count for the certificate passed in the c parameter.
...when an application makes a copy of a particular certificate or key structure that already exists in memory, ssl makes a shallow copy--that is, it increments the reference
count for that object rather than making a whole new copy.
...And 2 more matches
JSPRINCIPALS_HOLD
increment or decrement the reference
count of a jsprincipals object.
...they are reference
counted, not garbage collected.
...jsprincipals_hold(cx, principals) increments the reference
count of principals by 1.
...And 2 more matches
Places Developer Guide
foldernode.containeropen = true; for (var i=0; i < foldernode.child
count; ++i) { var childnode = foldernode.getchild(i); // some item properties.
...resultcontainernode.containeropen = true; for (var i=0; i < resultcontainernode.child
count; ++i) { var childnode = resultcontainernode.getchild(i); // accessing properties of matching bookmarks var title = childnode.title; var uri = childnode.uri; } updating bookmark items for all items: setitemtitle(aitemid, atitle) - changes an item's title.
...var historyservice = components.classes["@mozilla.org/browser/nav-history-service;1"] .getservice(components.interfaces.nsinavhistoryservice); var query = historyservice.getnewquery(); var options = historyservice.getnewqueryoptions(); options.sortingmode = options.sort_by_visit
count_descending; options.maxresults = 10; // execute the query var result = historyservice.executequery(query, options); // iterate over the results result.root.containeropen = true; var
count = result.root.child
count; for (var i = 0; i <
count; i++) { var node = result.root.getchild(i); // do something with the node properties...
...And 2 more matches
Starting WebLock
you can then use the service manager to add the component to the category: nsresult rv; nscomptr<nsiservicemanager> servman = do_queryinterface((nsisupports*)acompmgr, &rv); if (ns_failed(rv)) return rv; do_queryinterface the previous code uses the special nscomptr function do_queryinterface that lets you queryinterface without having to worry about reference
counting, error handling, and other overhead.
... */ void getkeys(out pruint32
count, [array, size_is(
count), retval] out string keys); }; directory service hierarchy there are two steps involved to find directories or files with the directory service (nsidirectoryservice).
...internally, the object knows the number of elements it has in its enumeration, and every time a client calls getnext, it decrements a
counter - or adjusts a pointer to the next element.
...And 2 more matches
Mozilla internal string guide
all string classes support the following three ownership models dynamically: reference
counted, copy-on-write, buffers (the default) adopted buffers (a buffer that the string class owns, but is not reference
counted, because it came from somewhere else) dependent buffers, that is, an underlying buffer that the string class does not own, but that the caller that constructed the string guarantees will outlive the string instance in addition, there is a special string class, ns[c]autost...
...ring, that additionally contains an internal 64-unit buffer (intended primarily for use on the stack), leading to a fourth ownership model: storage within an auto string's stack buffer auto strings will prefer reference
counting an existing reference-
counted buffer over their stack buffer, but will otherwise use their stack buffer for anything that will fit in it.
...utf-16 value void foo::getunicodevalue(nsastring& result) { copyutf8toutf16(mlocalutf8value, result); } appendutf8toutf16(const nsacstring&, nsastring&) - converts and appends: // return a utf-16 value void foo::getunicodevalue(nsastring& result) { result.assignliteral("prefix:"); appendutf8toutf16(mlocalutf8value, result); } utf8tonewunicode(const nsacstring&, pruint32* autf16
count = nsnull) - (avoid if possible) allocates and converts (the optional parameter will contain the number of 16-byte units upon return, if non-null): void foo::getutf16value(char16_t** result) { *result = utf8tonewunicode(mlocalutf8value); } copyutf16toutf8(const nsastring&, nsacstring&) - converts and copies: // return a utf-8 value void foo::getutf8value(nsacstring& result) { copyutf...
...And 2 more matches
Interfacing with the XPCOM cycle collector
this is the idle stage of the collector's operation, in which special variants of nsautorefcnt register and unregister themselves very rapidly with the collector, as they pass through a "suspicious" ref
count event (from n+1 to n, for nonzero n).
... if the collector finds a group of objects that all refer back to one another, and establishes that the objects' reference
counts are all ac
counted for by internal pointers within the group, it considers that group cyclical garbage, which it then attempts to free.
...if it en
counters an unknown edge during its traversal, it gives up on that edge; this means that every edge involved in a cycle must be participating, otherwise the cycle will not be found.
...And 2 more matches
mozISpellCheckingEngine
method overview void adddirectory(in nsifile dir); boolean check(in wstring word); void getdictionarylist([array, size_is(
count)] out wstring dictionaries, out pruint32
count); void removedirectory(in nsifile dir); void suggest(in wstring word,[array, size_is(
count)] out wstring suggestions, out pruint32
count); attributes attribute type description copyright wstring a string indicating the copyright of the engine.
...void getdictionarylist( [array, size_is(
count)] out wstring dictionaries, out pruint32
count ); parameters dictionaries a list of dictionaries supported by this spell checker.
...
count the length of dictionaries.
...And 2 more matches
nsIAccessible
nsiaccessible.parent to get the parent accessible nsiaccessible.nextsibling, nsiaccessible.previoussibling to get sibling accessibles nsiaccessible.firstchild, nsiaccessible.lastchild to get first and last child nsiaccessible.children, nsiaccessible.getchildat(), nsiaccessible.child
count to navigate through the children by index accessible position you can use nsiaccessible.indexinparent to get accessible index in its parent.
...you can get related accessibles by methods nsiaccessible.getaccessiblerelated() nsiaccessible.getrelations() nsiaccessible.getrelation() and nsiaccessible.relations
count.
...the following methods are intended for this nsiaccessible.action
count, nsiaccessible.getactionname(), nsiaccessible.getactiondescription() and nsiaccessible.doaction().
...And 2 more matches
nsIBrowserSearchService
overview void addengine(in astring engineurl, in long datatype, in astring iconurl, in boolean confirm, [optional] in nsisearchinstallcallback callback); void addenginewithdetails(in astring name, in astring iconurl, in astring alias, in astring description, in astring method, in astring url); void getdefaultengines([optional] out unsigned long engine
count, [retval, array, size_is(engine
count)] out nsisearchengine engines); nsisearchengine getenginebyalias(in astring alias); nsisearchengine getenginebyname(in astring aenginename); void getengines([optional] out unsigned long engine
count, [retval, array, size_is(engine
count)] out nsisearchengine engines); void getvisibleengines([optiona...
...l] out unsigned long engine
count, [retval, array, size_is(engine
count)] out nsisearchengine engines); void init([optional] in nsibrowsersearchinitobserver observer); void moveengine(in nsisearchengine engine, in long newindex); void removeengine(in nsisearchengine engine); void restoredefaultengines(); attributes attribute type description currentengine nsisearchengine the currently active search engine.
...void getdefaultengines( [optional] out unsigned long engine
count, [retval, array, size_is(engine
count)] out nsisearchengine engines ); parameters engine
count the number of default search engines.
...And 2 more matches
nsIEventListenerService
method overview void geteventtargetchainfor(in nsidomeventtarget aeventtarget, [optional] out unsigned long a
count, [retval, array, size_is(a
count)] out nsidomeventtarget aoutarray); void getlistenerinfofor(in nsidomeventtarget aeventtarget, [optional] out unsigned long a
count, [retval, array, size_is(a
count)] out nsieventlistenerinfo aoutarray); boolean haslistenersfor(in nsidomeventtarget aeventtarget, in domstring atype); void addsystemeventlistener(in nsido...
...void geteventtargetchainfor( in nsidomeventtarget aeventtarget, [optional] out unsigned long a
count, [retval, array, size_is(a
count)] out nsidomeventtarget aoutarray ); parameters aeventtarget the nsidomeventtarget for which to return the event target chain.
... a
count on return, contains the number of elements in the returned array.
...And 2 more matches
nsINavBookmarksService
obsolete since gecko 1.9 void getbookmarkidsforuri(in nsiuri auri, [optional] out unsigned long
count, [array, retval, size_is(
count)] out long long bookmarks); note: renamed from getbookmarkfolders in gecko 1.9 void getbookmarkidsforuritarray(in nsiuri auri, in print64array aresult); native code only!
...for js or from other components, just please be very careful to close the batch, especially when en
countering an error and returning early.
... void getbookmarkidsforuri( in nsiuri auri, out unsigned long
count, optional [array, retval, size_is(
count)] out long long bookmarks ); parameters auri the uri whose list of bookmark ids is to be retrieved.
...And 2 more matches
nsIPluginHost
void getplugin
count(out unsigned long aplugin
count); obsolete since gecko 1.8 nsiplugin getpluginfactory(in string amimetype); native code only!
... void getplugintags([optional] out unsigned long aplugin
count, [retval, array, size_is(aplugin
count)] out nsiplugintag aresults); void handlebadplugin(in prlibraryptr alibrary, in nsiplugininstance instance); native code only!
... attributes attribute type description plugin
count unsigned long read only.
...And 2 more matches
nsIScriptableInputStream
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview unsigned long available(); void close(); void init(in nsiinputstream ainputstream); string read(in unsigned long a
count); acstring readbytes(in unsigned long a
count); methods available() return the number of bytes currently available in the stream.
...string read( in unsigned long a
count ); parameters a
count the maximum number of bytes to read from the stream.
...acstring readbytes( in unsigned long a
count ); parameters a
count the maximum number of bytes to read.
...And 2 more matches
nsIStreamListener
method overview void ondataavailable(in nsirequest arequest, in nsisupports acontext, in nsiinputstream ainputstream, in unsigned long aoffset, in unsigned long a
count); methods ondataavailable() this method is called when the next chunk of data for the ongoing request may be read without blocking the calling thread.
...note: your implementation of this method must read exactly a
count bytes of data before returning.
... void ondataavailable( in nsirequest arequest, in nsisupports acontext, in nsiinputstream ainputstream, in unsigned long aoffset, in unsigned long a
count ); parameters arequest an nsirequest indicating the source of the data.
...And 2 more matches
nsITransport
method overview void close(in nsresult areason); nsiinputstream openinputstream(in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegment
count); nsioutputstream openoutputstream(in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegment
count); void seteventsink(in nsitransporteventsink asink, in nsieventtarget aeventtarget); constants open flags.
...nsiinputstream openinputstream( in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegment
count ); parameters aflags optional transport specific flags.
...asegment
count if open_unbuffered is not set, then this parameter specifies the maximum number of buffer segments (pass 0 to use default value).
...And 2 more matches
nsITreeBoxObject
ecolumn col); long getrowat(in long x, in long y); void getcellat(in long x, in long y, out long row, out nsitreecolumn col, out acstring childelt); void getcoordsforcellitem(in long row, in nsitreecolumn col, in acstring element, out long x, out long y, out long width, out long height); boolean iscellcropped(in long row, in nsitreecolumn col); void row
countchanged(in long index, in long
count); void beginupdatebatch(); void endupdatebatch(); void clearstyleandimagecaches(); attributes attribute type description columns nsitreecolumns readonly: obtain the columns.
... boolean iscellcropped(in long row, in nsitreecolumn col); parameters row the index of the row col the nsitreecolumn row
countchanged() notify the tree that the number of rows changed.
... void row
countchanged(in long index, in long
count); parameters index the position at which the new rows were added or at which rows were removed.
...And 2 more matches
nsIXPConnect
void debugdumpevalinjsstackframe(in pruint32 aframenumber, in string asourcetext); void debugdumpjsstack(in prbool showargs, in prbool showlocals, in prbool showthisprops); void debugdumpobject(in nsisupports acomobj, in short depth); [noscript,notxpcom] prbool definedomquickstubs(in jscontextptr cx, in jsobjectptr proto, in pruint32 flags, in pruint32 interface
count, [array, size_is(interface
count)] in nsiidptr interfacearray); jsval evalinsandboxobject(in astring source, in jscontextptr cx, in nsixpconnectjsobjectholder sandbox, in prbool returnstringonly); native code only!
... [noscript,notxpcom] prbool definedomquickstubs( in jscontextptr cx, in jsobjectptr proto, in pruint32 flags, in pruint32 interface
count, [array, size_is(interface
count)] in nsiidptr interfacearray ); parameters cx a context.
... interface
count the number of interfaces the class implements.
...And 2 more matches
Filelink Providers
the ac
count setup dialog the ac
count setup dialog allows the user to select what ac
count type they would like to create from a menulist.
... some providers require thunderbird to do very little in order to connect a user to their ac
count.
...the button to set up the ac
count will only become enabled once the checkvalidity method for the form returns true.
...And 2 more matches
Mail and RDF
overview of mail rdf graph the root resource for all ac
counts, folders and messages is the rdf resource named msgac
counts:/.
... msgac
counts:/ +-- http://home.netscape.com/nc-rdf#child --> | imap://alecf@imap.mywork.com | +-- http://home.netscape.com/nc-rdf#isserver --> "true" | +-- http://home.netscape.com/nc-rdf#child --> | imap://alecf@imap.mywork.com/inbox | +-- http://home.netscape.com/nc-rdf#totalmessages --> "4" | +-- http://home.netscape.com/nc-rdf#isserver --> "false" | +-- http://home.netscape.com/nc-rdf#messagechild ...
... datasources we have a few primary datasources used in mail: nsmsgac
countdatasource - answers queries about arcs coming out of msgac
counts:/.
...And 2 more matches
Plug-in Basics - Plugins
like a plug-in, the browser starts a helper application when the browser en
counters a mime type that is mapped to it.
... when the browser en
counters a mime type, it always searches for a registered plug-in first.
... the following stages outline the life of a plug-in from loading to deletion: when gecko en
counters data of a mime type registered for a plug-in (either embedded in an html page or in a separate file), it dynamically loads the plug-in code into memory, if it hasn't been loaded already, and it creates a new instance of the plug-in.
...And 2 more matches
Debugger.Memory - Firefox Developer Tools
it can compute a census of items belonging to the debuggee, categorizing items in various ways, and yielding item
counts.
...it produces a
count of those items, broken down by various criteria.
... strings spidermonkey has three representations of strings: normal: the string’s text is
counted in its size.
...And 2 more matches
AudioNodeOptions - Web APIs
syntax var audionodeoptions = { "channel
count" : 2, "channel
countmode" : "max", "channelinterpretation" : "discrete" } properties channel
count optional represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node.
... (see audionode.channel
count for more information.) its usage and precise definition depend on the value of audionodeoptions.channel
countmode.
... channel
countmode optional represents an enumerated value describing the way channels must be matched between the node's inputs and outputs.
...And 2 more matches
CSSPrimitiveValue - Web APIs
css_
counter the value is a
counter or
counters function.
... the value can be obtained by using the get
countervalue() method.
... methods cssprimitivevalue.get
countervalue() this method is used to get the
counter value.
...And 2 more matches
HTMLElement: animationiteration event - Web APIs
this event does not occur at the same time as the animationend event, and therefore does not occur for animations with an animation-iteration-
count of one.
... bubbles yes cancelable no interface animationevent event handler property onanimationiteration examples this code uses animationiteration to keep track of the number of iterations an animation has completed: const animated = document.queryselector('.animated'); let iteration
count = 0; animated.addeventlistener('animationiteration', () => { iteration
count++; console.log(`animation iteration
count: ${iteration
count}`); }); the same, but using the onanimationiteration event handler property: const animated = document.queryselector('.animated'); let iteration
count = 0; animated.onanimationiteration = () => { iteration
count++; console.log(`animation iteration
count: ${iteration
count}`); }; live example html <div class="anima...
...night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event-log"></div> </div> css .container { height: 3rem; } .event-log { width: 25rem; height: 2rem; border: 1px solid black; margin: 0.2rem; padding: 0.2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation-iteration-
count: 2; } @keyframes slidein { from { transform: translatex(100%) scalex(3); } to { transform: translatex(0) scalex(1); } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iteration
count = 0; animat...
...And 2 more matches
Basic concepts behind Web Audio API - Web APIs
note: to get a time in seconds from a frame
count, simply divide the number of frames by the sample rate.
... to get a number of frames from a number of samples, simply divide by the channel
count.
...the surround channels are slightly attenuated and the regular lateral channels are power-compensated to make them
count as a single channel by multiplying by √2/2.
...And 2 more matches
Migrating from webkitAudioContext - Web APIs
this article attempts to summarize the areas where developers are likely to en
counter these problems and provide examples on how to port such code to standards based audiocontext, which will work across different browser engines.
... removal of audiocontext.activesource
count the activesource
count attribute has been removed from audiocontext.
... if you need to
count the number of playing source nodes, you can maintain the
count by handling the ended event on the source nodes, as shown above.
...And 2 more matches
Visualizations with Web Audio API - Web APIs
we return the analysernode.frequencybin
count value, which is half the fft, then call uint8array() with the frequencybin
count as its length argument — this is how many data points we will be collecting, for that fft size.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybin
count; var dataarray = new uint8array(bufferlength); to actually retrieve the data and copy it into our array, we then call the data collection method we want, with the array passed as it's argument.
... creating a waveform/oscilloscope to create the oscilloscope visualisation (hat tip to soledad penadés for the original code in voice-change-o-matic), we first follow the standard pattern described in the previous section to set up the buffer: analyser.fftsize = 2048; var bufferlength = analyser.frequencybin
count; var dataarray = new uint8array(bufferlength); next, we clear the canvas of what had been drawn on it before to get ready for the new visualization display: canvasctx.clearrect(0, 0, width, height); we now define the draw() function: function draw() { in here, we use requestanimationframe() to keep looping the drawing function once it has been started: var drawvisual = requestanimationframe...
...And 2 more matches
Web Authentication API - Web APIs
many websites already have pages that allow users to register new ac
counts or sign in to an existing ac
count, and the web authentication api acts as a replacement or supplement to those on those existing webpages.
... similar to the other forms of the credential management api, the web authentication api has two basic methods that correspond to register and login: navigator.credentials.create() - when used with the publickey option, creates new credentials, either for registering a new ac
count or for associating a new asymmetric key pair credentials with an existing ac
count.
...assuming that the checks pan out, the server will store the new public key associated with the user's ac
count for future use -- that is, whenever the user desires to use the public key for authentication.
...And 2 more matches
ARIA: tab role - Accessibility
some assistive technology will provide a
count of the number of tab role elements inside a tablist, and inform users of which tab they currently have targeted.
...then, if the right arrow is being pressed, we increase our tab focus
counter by one.
... if the
counter is greater than the number of tab elements we have, we circle back to the first tab by setting that
counter to 0.
...And 2 more matches
symbols - CSS: Cascading Style Sheets
the symbols css descriptor is used to specify the symbols that the specified
counter system will use to construct
counter representations.
... values <symbol> represents a symbol used within the
counter system.
...it is used within the @
counter-style at-rule.
...And 2 more matches
Constraint validation - Developer guides
constraint combining several fields: postal code validation the postal code format varies from one
country to another.
... not only do most
countries allow an optional prefix with the
country code (like d- in germany, f- in france or switzerland), but some
countries have postal codes with only a fixed number of digits; others, like the uk, have more complex structures, allowing letters at some specific positions.
... as an example, we will add a script checking the constraint validation for this simple form: <form> <label for="zip">zip : </label> <input type="text" id="zip"> <label for="
country">
country : </label> <select id="
country"> <option value="ch">switzerland</option> <option value="fr">france</option> <option value="de">germany</option> <option value="nl">the netherlands</option> </select> <input type="submit" value="validate"> </form> this displays the following form: first, we write a function checking the constraint itself: function checkzip() { // for each
country, defines the pattern that the zip has to follow var constr...
...And 2 more matches
<input type="tel"> - HTML: Hypertext Markup Language
<input id="telno" name="telno" type="tel" size="20" minlength="9" maxlength="14"> note: the above attributes do affect validation — the above example's inputs will
count as invalid if the length of the value is less than 9 characters, or more than 14.
... examples in this example, we present a simple interface with a <select> element that lets the user choose which
country they're in, and a set of <input type="tel"> elements to let them enter each part of their phone number; there is no reason why you can't have multiple tel inputs.
... <form> <div> <label for="
country">choose your
country:</label> <select id="
country" name="
country"> <option>uk</option> <option selected>us</option> <option>germany</option> </select> </div> <div> <p>enter your telephone number: </p> <span class="areadiv"> <input id="areano" name="areano" type="tel" required placeholder="area code" pattern="[0-9]{3}" aria-label="area code"> <span class="validity"></span> </span> <span ...
...And 2 more matches
Microformats - HTML: Hypertext Markup Language
for example if they wanted to identify themselves they could use an h-card such as: html example <a class="h-card" href="http://alice.example.com">alice blogger</a> when a parser en
counters this data, it will know that this page contains a "card" which describes a person or organization named alice blogger with a url of http://alice.example.com/.
...ty any element can carry example h-card <p class="h-card"> <img class="u-photo" src="http://example.org/photo.png" alt="" /> <a class="p-name u-url" href="http://example.org">joe bloggs</a> <a class="u-email" href="mailto:joebloggs@example.com">joebloggs@example.com</a>, <span class="p-street-address">17 austerstræti</span> <span class="p-locality">reykjavík</span> <span class="p-
country-name">iceland</span> </p> property description p-name the full/formatted name of the person or organization.
... u-email email address u-photo a photo of the person or organization u-url home page or other url representing the person or organization u-uid universally unique identifier, preferably canonical url p-street-address street number + name p-locality city/town/village p-
country-name
country name nested h-card example <div class="h-card"> <a class="p-name u-url" href="http://blog.lizardwrangler.com/" >mitchell baker</a> (<a class="p-org h-card" href="http://mozilla.org/" >mozilla foundation</a>) </div> parsed json: { "items": [{ "type": ["h-card"], "properties": { "name": ["mitchell baker"], "url": ["http://blog.lizardwrangler.com/"], "org": [{ "value": "mozilla fo...
...And 2 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
if you query a non-existent array index, you'll get a value of undefined in return: typeof a[90]; // undefined if you take the above about [] and length into ac
count, you can iterate over an array using the following for loop: for (var i = 0; i < a.length; i++) { // do something with a[i] } es2015 introduced the more concise for...of loop for iterable objects such as arrays: for (const currentvalue of a) { // do something with currentvalue } you could also iterate over an array using a for...in loop, however this does not iterate over the array eleme...
... a.splice(start, del
count[, item1[, ...[, itemn]]]) lets you modify an array by deleting a section and replacing it with more items.
... function
countchars(elm) { if (elm.nodetype == 3) { // text_node return elm.nodevalue.length; } var
count = 0; for (var i = 0, child; child = elm.childnodes[i]; i++) {
count +=
countchars(child); } return
count; } this highlights a potential problem with anonymous functions: how do you call them recursively if they don't have a name?
...And 2 more matches
Array.prototype.splice() - JavaScript
syntax let arrdeleteditems = array.splice(start[, delete
count[, item1[, item2[, ...]]]]) parameters start the index at which to start changing the array.
... delete
count optional an integer indicating the number of elements in the array to remove from start.
... if delete
count is omitted, or if its value is equal to or larger than array.length - start (that is, if it is equal to or greater than the number of elements left in the array, starting at start), then all the elements from start to the end of the array will be deleted.
...And 2 more matches
SVG animation with SMIL - SVG: Scalable Vector Graphics
<svg width="300" height="100"> <title>attribute animation with smil</title> <rect x="0" y="0" width="300" height="100" stroke="black" stroke-width="1" /> <circle cx="0" cy="50" r="15" fill="blue" stroke="black" stroke-width="1"> <animate attributename="cx" from="0" to="500" dur="5s" repeat
count="indefinite" /> </circle> </svg> animating the transform attributes the <animatetransform> element let you animate transform attributes.
...eight="100"> <title>svg smil animate with transform</title> <rect x="0" y="0" width="300" height="100" stroke="black" stroke-width="1" /> <rect x="0" y="50" width="15" height="34" fill="blue" stroke="black" stroke-width="1"> <animatetransform attributename="transform" begin="0s" dur="20s" type="rotate" from="0 60 60" to="360 100 60" repeat
count="indefinite" /> </rect> </svg> animation following a path the <animatemotion> element lets you animate an element position and rotation according to a path.
...by setting the value of the repeat
count attribute to indefinite, we indicate that the animation should loop forever, as long as the svg image exists.
...And 2 more matches
CSS3 - Archive of obsolete content
css multi-column layout module working draft adds support for easy multi-column layouts using the css columns, column-
count, column-fill, column-gap, column-rule, column-rule-color, column-rule-style, column-rule-width, column-span, column-width, break-after, break-before, and break-inside.
... css
counter styles level 3 candidate recommendation testing modules css images module level 3 candidate recommendation defines the <image> data type.
... css animations working draft allows the definition of animations effects by adding the css animation, animation-delay,animation-direction, animation-duration, animation-fill-mode, animation-iteration-
count, animation-name, animation-play-state, and animation-timing-function properties, as well as the @keyframes at-rule.
... css box alignment module level 3 working draft selectors level 4 working draft css lists module level 3 working draft extends the list
counter mechanism so that list markers can be styled and web developers can define new list
counter schemes.
Property - Archive of obsolete content
collapsed color columns command commandmanager completedefaultindex container contentdocument contentprincipal contenttitle contentview contentvieweredit contentviewerfile contentwindow contextmenu control controller controllers crop current currentindex currentitem currentnotification currentpage currentpane currentset currenturi customtoolbar
count database datasources date dateleadingzero datevalue decimalplaces decimalsymbol defaultbutton defaultvalue description dir disableautocomplete disableautocomplete disableautoselect disabled disablekeynavigation dlgtype docshell documentcharsetinfo editable editingcolumn editingrow editingsession editor editortype emptytext deprecated since geck...
...blecolumndrag eventnode firstordinalcolumn firstpermanentchild flex focused focuseditem forcecomplete group handlectrlpageupdown handlectrltab hasuservalue height hidden hideseconds highlightnonmatches homepage hour hourleadingzero id ignoreblurwhilesearching image increment inputfield inverted is24hourclock ispm issearching iswaiting item
count label labelelement lastpermanentchild lastselected left linkedpanel listboxobject locked markupdocumentviewer max maxheight maxlength maxrows maxwidth menu menuboxobject menupopup min minheight minresultsforpopup minwidth minute minuteleadingzero mode month monthleadingzero name next nomatch notificationshidden object observes onfi...
...rstpage onlastpage open ordinal orient pack page
count pageid pageincrement pageindex pagestep parentcontainer palette persist persistence placeholder pmindicator popup popupboxobject popupopen position predicate preferenceelements preferencepanes preferences priority radiogroup readonly readonly ref resource resultspopup scrollboxobject scrollincrement scrollheight scrollwidth searchbutton search
count searchlabel searchparam searchsessions second secondleadingzero securityui selected selectedbrowser selected
count selectedindex selecteditem selecteditems selectedpanel selectedtab selectionend selectionstart selstyle seltype session
count sessionhistory showcommentcolumn showpop...
...abpanels tag textlength textvalue timeout title toolbarname toolbarset tooltip tooltiptext top treeboxobject type uri useraction value valuenumber view webbrowserefind webnavigation webprogress width wizardpages wraparound year yearleadingzero related dom element properties dom:element.attributes dom:element.baseuri dom:element.childelement
count dom:element.childnodes dom:element.children dom:element.clientheight dom:element.clientleft dom:element.clienttop dom:element.clientwidth dom:element.clonenode dom:element.firstchild dom:element.firstelementchild dom:element.lastchild dom:element.lastelementchild dom:element.localname dom:element.namespaceuri dom:element.nextelementsibling dom:element.nextsibling d...
Textbox (XPFE autocomplete) - Archive of obsolete content
ing, timeout, type, useraction, value properties accessible, alwaysopenpopup, autofill, autofillaftermatch, completedefaultindex, crop, disableautocomplete, disabled, editable, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, issearching, iswaiting, label, maxlength, maxrows, minresultsforpopup, nomatch, open, popup, popupopen, resultspopup, search
count, searchparam, searchsessions, selectionend, selectionstart, session
count, showcommentcolumn, showpopup, size, tabindex, tabscrolling, textlength, textvalue, timeout, type, useraction, value methods addsession, clearresults, getdefaultsession, getresultat, getresult
count, getresultvalueat, getsession, getsessionbyname, getsessionresultat, getsessionstatusat, getsessionvalueat, remo...
... search
count new in thunderbird 15 requires seamonkey 2.12 type: integer returns the number of search components used.
... session
count type: integer holds the number of sessions.
... getresult
count( session ) returns the number of results, holded by the current session.
Tree Box Objects - Archive of obsolete content
redrawing the tree we already saw the row
countchanged() function of the tree box object in the previous section.
...you don't need to call the row
countchanged() function when a row has simply changed in some way, for example if a cell's label changes.
... note that in firefox 1.0 and mozilla 1.7 and earlier, the getpagelength() function is called getpage
count() instead.
...lumn.value != "string") column.value = column.value.id; document.getelementbyid("row").value = row.value; document.getelementbyid("column").value = column.value; document.getelementbyid("part").value = part.value; } </script> <tree id="thetree" flex="1" onmousemove="updatefields(event);"> <treecols> <treecol id="utensil" label="utensil" primary="true" flex="1"/> <treecol id="
count" label="
count" flex="1"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="fork"/> <treecell label="5"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="knife"/> <treecell label="2"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="spoon"/> <treecell lab...
richlistbox - Archive of obsolete content
attributes disabled, disablekeynavigation, preference, seltype, suppressonselect, tabindex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, item
count, scrollboxobject, selected
count, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrow
count, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, ...
... item
count type: integer read only property holding the number of child items.
... selected
count type: integer returns the number of items that are currently selected.
... getrow
count() return type: integer returns the total number of rows in the element, regardless of how many rows are displayed.
tree - Archive of obsolete content
to get the actual number of rows in the element, use the getrow
count method.
...w(odd) { background-color: #eeeeee; } treechildren::-moz-tree-row(odd, selected) { background-color: #ffffaa; } treechildren::-moz-tree-cell-text(selected) { color: #000000; } treechildren::-moz-tree-cell-text(odd, selected) { color: #000000; } if using a content tree view, use the following to get the value of the id attribute for each of the selected rows of a tree: var idlist = []; var range
count = tree.view.selection.getrange
count(); for (var i = 0; i < range
count; i++) { var start = {}; var end = {}; tree.view.selection.getrangeat(i, start, end); for (var c = start.value; c <= end.value; c++) { idlist.push(tree.view.getitematindex(c).firstchild.id); } } the following returns a array of the indicies of the rows where the value is checked in a checkbox type column: functi...
...on getcellchecked(tree, columnid) { var arr = []; var column = tree.columns.getnamedcolumn(columnid); for (var i = 0; i < tree.view.row
count; i++) { if (tree.view.getcellvalue(i, column) == 'true') arr.push(i); } return arr; } to get the text value for a specific column (for example column 'age') from the currently focused row in the tree: var t = document.getelementbyid('mytree'); document.title = t.view.getcelltext(t.currentindex,t.columns.getnamedcolumn('age')); to select the checkbox and display the cell's text value, you can use code like the following.
...dren::-moz-tree-cell-text(odd, selected) { color: #000000; } treechildren::-moz-tree-row(hover) {background-color: #ffffaa !important;} treechildren:-moz-tree-column { border-right:1px solid rgb(220,220,220) !important; } the javascript to get the text for the selected row/rows: function getrowcellvalues() { var tree = document.getelementbyid('mytree'); for (var i = 0; i < tree.view.row
count; i++) { if (tree.view.getcellvalue(i, tree.columns.getcolumnat(0)) == 'true'){ alert(tree.view.getcelltext(i, tree.columns.getnamedcolumn("name"))); } } } this way, you can get the tree cell values of the selected checkbox of the corresponding row.
NPAPI plugin reference - Archive of obsolete content
npn_releaseobject decrements the reference
count of the given npobject.
... if the reference
count reaches 0, the npobject is deallocated by calling its deallocate function if one is provided; if one is not provided, free() is used.
... npn_retainobject increments the reference
count of the given npobject.
... npobject npobject is a structure that holds a pointer to an npclass and an integer reference
count, and possibly also implementation specific (i.e.
Introduction to Public-Key Cryptography - Archive of obsolete content
for the rest of the session, the client presents the user's certificate to authenticate the user to each new server it en
counters.
... examples: a bank gives a customer a client ssl certificate that allows the bank's servers to identify that customer and authorize access to the customer's ac
counts.
... for example, this might be a typical dn for an employee of example corp: uid=doe,e=doe@example.net,cn=john doe,o=example corp.,c=us the abbreviations before each equal sign in this example have these meanings: uid: user id e: email address cn: the user's common name o: organization c:
country dns may include a variety of other name-value pairs.
...if you live in some other state or
country, the requirements for various kinds of licenses will differ.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
ger.getconnection( "jdbc:mysql://localhost/rhino", "urhino", "prhino" ); // create a statement handle var stmt = conn.createstatement(); // get a resultset var rs = stmt.executequery( "select * from employee" ); // get the metadata from the resultset var meta = rs.getmetadata(); // loop over the records, dump out column names and values while( rs.next() ) { for( var i = 1; i <= meta.getcolumn
count(); i++ ) { print( meta.getcolumnname( i ) + ": " + rs.getobject( i ) + "\n" ); } print( "----------\n" ); } // cleanup rs.close(); stmt.close(); conn.close(); this code starts off by using a rhino function named importpackage which is just like using the import statement in java.
...the appropriate database driver for mysql is loaded and the connection string to a database named rhino on my local machine is configured using the user ac
count urhino with the password of prhino.
... id: 1 first_name: sammy last_name: hamm department: it title: network administrator ---------- id: 2 first_name: nigel last_name: bitters department: finance title: ac
counting manager ...
...this ac
counts for added simplicity and promotes rapid development methodologies.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
memos, time cards, and ac
counting procedures are all standardized across groups.
...sure, there are other reasons -– ac
countability, checkpoints, and scheduling, for example.
...for example, in the ac
counting arena there is fasb (financial ac
counting standards board) and iasb (international ac
counting standards board).
...(internet research task force ) iso (international standards organization ) itu (international telecommunication union ) oasis (organization for the advancement of structured information standards ) oma (open mobile alliance ), uni (unicode consortium ) w3c (world wide web consortium ) iana (internet assigned numbers authority ) ecma international like the processes and standards that ac
countants and project managers must follow, the above-mentioned standards organizations provide focus and direction for the development engineering community.
The Business Benefits of Web Standards - Archive of obsolete content
dynamic effects such as those created by javascript are not taken into ac
count, and text rendered with graphics cannot be read and parsed either.
...the message to ac
countants, executives and shareholders alike should be irresistible.
... mandated accessibility being accessible is mandatory in many
countries for government agencies (us, uk, canada), and --in some
countries like australia-- for every organization.
...geeks, marketers and bean-
counters can all benefit from a standard-based web site.
Build the brick field - Game development
var brickrow
count = 3; var brickcolumn
count = 5; var brickwidth = 75; var brickheight = 20; var brickpadding = 10; var brickoffsettop = 30; var brickoffsetleft = 30; here we've defined the number of rows and columns of bricks , their width and height, the padding between the bricks so they won't touch each other and a top and left offset so they won't start being drawn right from the edge of the canvas.
...add the following just below your variables: var bricks = []; for(var c=0; c<brickcolumn
count; c++) { bricks[c] = []; for(var r=0; r<brickrow
count; r++) { bricks[c][r] = { x: 0, y: 0 }; } } the code above will loop through the rows and columns and create the new bricks.
...our code might look like this: function drawbricks() { for(var c=0; c<brickcolumn
count; c++) { for(var r=0; r<brickrow
count; r++) { bricks[c][r].x = 0; bricks[c][r].y = 0; ctx.beginpath(); ctx.rect(0, 0, brickwidth, brickheight); ctx.fillstyle = "#0095dd"; ctx.fill(); ctx.closepath(); } } } again, we're looping through the rows and columns to set the x and y position of each brick, and we're also painting a brick on the canvas — size brickwidth x brickheight — with each loop i...
... the final version of the drawbricks() function, after assigning the brickx and bricky values as the coordinates instead of (0,0) each time, will look like this — add this into your code below the drawpaddle() function: function drawbricks() { for(var c=0; c<brickcolumn
count; c++) { for(var r=0; r<brickrow
count; r++) { var brickx = (c*(brickwidth+brickpadding))+brickoffsetleft; var bricky = (r*(brickheight+brickpadding))+brickoffsettop; bricks[c][r].x = brickx; bricks[c][r].y = bricky; ctx.beginpath(); ctx.rect(brickx, bricky, brickwidth, brickheight); ctx.fillstyle = "#0095dd...
Track the score and win - Game development
destroying the bricks is really cool, but to be even more awesome the game could award points for every brick a user hits, and keep
count of the total score.
...
counting the score if you can see your score throughout the game, eventually you can impress your friends.
...add the following highlighted line to your code: function collisiondetection() { for(var c=0; c<brickcolumn
count; c++) { for(var r=0; r<brickrow
count; r++) { var b = bricks[c][r]; if(b.status == 1) { if(x > b.x && x < b.x+brickwidth && y > b.y && y < b.y+brickheight) { dy = -dy; b.status = 0; score++; } } } } } calling drawscore() from the draw() function keeps...
...add the following highlighted section into your collisiondetection() function: function collisiondetection() { for(var c=0; c<brickcolumn
count; c++) { for(var r=0; r<brickrow
count; r++) { var b = bricks[c][r]; if(b.status == 1) { if(x > b.x && x < b.x+brickwidth && y > b.y && y < b.y+brickheight) { dy = -dy; b.status = 0; score++; if(score == brickrow
count*brickcolumn
count) { alert("you ...
Build the brick field - Game development
to begin with we've included the brickinfo object, as this will come in handy very soon: function initbricks() { brickinfo = { width: 50, height: 20,
count: { row: 3, col: 7 }, offset: { top: 50, left: 60 }, padding: 10 }; } this brickinfo object will hold all the information we need: the width and height of a single brick, the number of rows and columns of bricks we will see on screen, the top and left offset (the location on the canvas where we shall start to dra...
... now, let's start creating the bricks themselves — add an empty group first to contain the bricks, by adding the following line at the bottom of the initbricks() function: bricks = game.add.group(); we can loop through the rows and columns to create new brick on each iteration — add the following nested loop below the previous line of code: for(c=0; c<brickinfo.
count.col; c++) { for(r=0; r<brickinfo.
count.row; r++) { // create new brick and add it to the group } } this way we will create the exact number of bricks we need and have them all contained in a group.
...fill in the contents as shown below: for(c=0; c<brickinfo.
count.col; c++) { for(r=0; r<brickinfo.
count.row; r++) { var brickx = 0; var bricky = 0; newbrick = game.add.sprite(brickx, bricky, 'brick'); game.physics.enable(newbrick, phaser.physics.arcade); newbrick.body.immovable = true; newbrick.anchor.set(0.5); bricks.add(newbrick); } } here we're looping through the rows and columns to create the new bricks and place them on the screen.
... checking the initbricks() code here is the complete code for the initbricks() function: function initbricks() { brickinfo = { width: 50, height: 20,
count: { row: 3, col: 7 }, offset: { top: 50, left: 60 }, padding: 10 } bricks = game.add.group(); for(c=0; c<brickinfo.
count.col; c++) { for(r=0; r<brickinfo.
count.row; r++) { var brickx = (c*(brickinfo.width+brickinfo.padding))+brickinfo.offset.left; var bricky = (r*(brickinfo.h...
2D maze game with device orientation - Game development
ball.game = function(game) {}; ball.game.prototype = { create: function() {}, initlevels: function() {}, showlevel: function(level) {}, update
counter: function() {}, managepause: function() {}, manageaudio: function() {}, update: function() {}, wallcollision: function() {}, handleorientation: function(e) {}, finishlevel: function() {} }; the create and update functions are framework-specific, while others will be our own creations: initlevels initializes the level data.
... update
counter updates the time spent playing each level and records the total time spent playing the game..
...we have this printed out on the screen, but it would be good to update the values every second: this.time.events.loop(phaser.timer.second, this.update
counter, this); this loop, also in the create function, will execute the update
counter function every single second from the beginning of the game, so we can apply the changes accordingly.
... this is how the complete update
counter function looks: update
counter: function() { this.timer++; this.timertext.settext("time: "+this.timer); this.totaltimetext.settext("total time: "+(this.totaltimer+this.timer)); }, as you can see we’re incrementing the this.timer variable and updating the content of the text objects with the current values on each iteration, so the player sees the elapsed time.
What is accessibility? - Learn web development
providing accessible sites is part of the law in some
countries, which can open up some significant markets that otherwise would not be able to use your services or buy your products.
... your
country may also have specific legislation governing the need for websites serving their population to be accessible — for example en 301 549 in the eu, section 508 of the rehabilitation act in the us, federal ordinance on barrier-free information technology in germany, the accessibility regulations 2018 in the uk, accessibilità in italy, the disability discrimination act in australia, etc.
... the w3c keeps a list of web accessibility laws & policies by
country.
... so while the wcag is a set of guidelines, your
country will probably have laws governing web accessibility, or at least the accessibility of services available to the public (which could include websites, television, physical spaces, etc.) it is a good idea to find out what your laws are.
Pseudo-classes and pseudo-elements - Learn web development
all the odd ones.) :nth-last-child matches elements from a list of siblings,
counting backwards from the end.
...all the odd ones,
counting from the end.) :nth-last-of-type matches elements from a list of siblings that are of a certain type (e.g.
... <p> elements),
counting backwards from the end.
...all the odd ones,
counting from the end.) :only-child matches an element that has no siblings.
How CSS is structured - Learn web development
specificity you may en
counter scenarios where two selectors select the same html element.
...for example, @import imports a stylesheet into another css stylesheet: @import 'styles2.css'; one common @rule that you are likely to en
counter is @media, which is used to create media queries.
... body { background-color: pink; } @media (min-width: 30em) { body { background-color: blue; } } you will en
counter other @rules throughout these tutorials.
... lines of code: padding-top: 10px; padding-right: 15px; padding-bottom: 15px; padding-left: 5px; this one line: background: red url(bg-graphic.png) 10px 10px repeat-x fixed; is equivalent to these five lines: background-color: red; background-image: url(bg-graphic.png); background-position: 10px 10px; background-repeat: repeat-x; background-attachment: fixed; later in the course, you will en
counter many other examples of shorthand properties.
Introduction to the server side - Learn web development
banks use server-side programming to store ac
count information and allow only authorized users to view and make transactions.
...log in to your ac
count — what additional information can you see and modify?
...pick almost any large site that you are interested in (google, amazon, instagram, etc.) and create a new ac
count using your email address.
... you will shortly receive an email confirming your registration, or requiring acknowledgment to activate your ac
count.
React interactivity: Events and state - Learn web development
</button> note: this may seem
counter-intuitive regarding best-practice advice that tends to advise against use of inline event handlers on html, but remember that jsx is actually part of your javascript.
...in fact, react will give you a warning in your devtools console — "warning: en
countered two children with the same key..." we need to fix this.
... detour:
counting tasks now that we can add new tasks, you may notice a problem: our heading reads 3 tasks remaining, no matter how many tasks we have!
... we can fix this by
counting the length of tasklist and changing the text of our heading accordingly.
Deployment and next steps - Learn web development
register for an ac
count with vercel.
...do this by running the following commands: > git add public/index.html > git add .gitlab-ci.yml > git commit -m "added .gitlab-ci.yml file and fixed index.html absolute paths" > git push
counting objects: 5, done.
... @sveltejs: the official twitter ac
count.
... @sveltesociety: svelte community twitter ac
count.
HTML parser threading
(the same runnable is used repeatedly in order to avoid cross-thread ref
counting issues.) memory management when crossing the thread boundary the tree ops hold various heap-allocated objects that end up crossing the thread boundary.
...the backing nsstringbuffers are thread-safely ref
counted appropriately when the nsstring goes away.
...nodes created by tree ops are owned by the parser for the lifetime of the parser, so for ref
counting purposes, the parser owns each nsicontent object it creates by one reference no matter how many copies of the content handle for the node exist inside the parser.
...speculative loads when the tree builder on the parser thread en
counters html script, stylesheet link, video (with a poster frame), base or img or svg script, style or image elements, preload operations are appended to a speculative load queue.
NetUtil.jsm
iew nsiasyncstreamcopier asynccopy(nsiinputstream asource, nsioutputstream asink, [optional] acallback) void asyncfetch(asource, acallback) nsichannel newchannel(awhattoload, [optional] aorigincharset, [optional] nsiuri abaseuri) nsiuri newuri(atarget, [optional] aorigincharset, [optional] nsiuri abaseuri) string readinputstreamtostring(ainputstream, a
count, aoptions) attributes attribute type description ioservice nsiioservice returns a reference to nsiioservice.
... string readinputstreamtostring( ainputstream, a
count, aoptions ); parameters ainputstream the input stream from which to read the data.
... a
count the number of bytes to read from the stream.
... ns_error_failure there aren't at least a
count bytes available to read from the stream.
Bootstrapping a new locale
first, you should specify your locale's language identifier in ab-cd format, where "ab" is the iso 639 language code, and cd is the iso 3166
country code.
... the "-cd" part is only necessary to differentiate between versions of a language that are subtly different from
country to
country, such as in "en-us" and "en-gb" for united states english and british english.
...you will need to create an ac
count so you can access the service.
... once you have that ac
count, send the l10n-drivers the details to be added as a "writer".
Extras
rgb(255,255,255); stop-opacity:1;"/> <stop offset="100%" style="stop-color:rgb(255,0,0); stop-opacity:.8;"/> </radialgradient> </defs> <g transform="translate(15,15)"> <g> <animatetransform attributename="transform" attributetype="xml" type="rotate" from="360" to="0" dur="15s" repeat
count="indefinite"/> <g transform="translate(-15, -15)"> <path fill="url(#radgrad1)" d="m 15 0 l 20 10 l 30 15 l 20 20 l 15 30 l 10 20 l 0 15 l 10 10"/> </g> </g> </g> </svg> </mtext> </mpadded> </msqrt> <mo>=</mo> <msubsup> <mo>∫</mo> <mn>0</mn> <mfrac> <mi>π</mi> <mn>2</mn> </mfrac> </msubsup> <msup> <mi>θ</mi> <mtext> <svg width="15px" height="15px"...
..."radgrad2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop offset="0%" style="stop-color:rgb(255,255,255); stop-opacity:1;"/> <stop offset="100%" style="stop-color:rgb(0,0,255); stop-opacity:.9;"/> </radialgradient> </defs> <g> <animatemotion path="m0,0 l3,0 l2,5 l5,5 l0,4 l5,2 z" begin="0s" dur="0.5s" repeat
count="indefinite"/> <circle fill="url(#radgrad2)" r="5px" cx="5px" cy="5px"/> </g> </svg> </mtext> </msup> <mrow> <mo>ⅆ</mo> <mi>θ</mi> </mrow> </math> <div style="width: 300px; margin-left: auto; margin-right: auto;"> <svg width="300px" height="250px"> <defs> <lineargradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%"> <stop offset="0%" style="stop-color:rgb(0,0,255);stop-opacity:1"/> <stop offs...
...stop-color:rgb(0,255,255);stop-opacity:1"/> <stop offset="100%" style="stop-color:rgb(255,255,255);stop-opacity:.8"/> </radialgradient> </defs> <rect width="300" height="250" fill="url(#grad1)"/> <g transform="translate(150,125)"> <g> <animatetransform attributename="transform" attributetype="xml" type="rotate" from="0" to="360" dur="6s" repeat
count="indefinite"/> <g transform="translate(-50,-35)"> <rect width="100" height="70" fill="url(#grad2)"/> <switch> <foreignobject width="100" height="70" requiredextensions="http://www.w3.org/1998/math/mathml"> <math display="block"> <mrow> <mo>(</mo> <mtable> <mtr> <mtd><mi>cos</mi><mi>θ</mi></mtd> <mtd><mo>−</mo><mi>sin</mi><mi>θ</mi></mtd> </mtr> <mtr> <mtd><mi>sin</...
...mi><mi>θ</mi></mtd> <mtd><mi>cos</mi><mi>θ</mi></mtd> </mtr> </mtable> <mo>)</mo> </mrow> </math> </foreignobject> <text>rotation matrix</text> </switch> </g></g></g> <g> <animatemotion path="m 32,69 c 64,121 100,27 152,42 203,56 239,257 275,161 295,109 144,221 88,214 -2,202 11,35 32,69 z" begin="0s" dur="20s" repeat
count="indefinite"/> <animatetransform attributename="transform" attributetype="xml" type="scale" values="1;2;.5;1" keytimes="0;.25;.75;1" dur="20s" repeat
count="indefinite"/> <circle fill="url(#grad3)" r="30"/> <g transform="translate(-30,-30)"> <switch> <foreignobject width="60" height="60" requiredextensions="http://www.w3.org/1998/math/mathml"> <math display="block"> <mrow> <munderover> <mo>∑</mo> <mrow> <m...
TraceMalloc
bloatblame accumulates allocation
counts and ignores free calls.
...this file can be post-processed by tools in mozilla/tools/trace-malloc as follows: histogram.pl, which produces a type histogram that can be diffed with histogram-diff.sh to produce output that looks like this: ---- base ---- ---- incr ---- ----- difference ---- type
count bytes
count bytes
count bytes %total total 48942 4754774 76136 6566453 27194 1811679 100.00 nstokenallocator 17 110007 60 388260 43 278253 15.36 nsimagegtk 476 2197708 341 2366564 -135 168856 9.32 nsmemcacherecord 843 45767 2328 124767 1485 79000 4.36 nstextnode 209...
...because this log includes the contents of heap blocks, leaksoup can analyze the graph of live objects and determine which allocations are roots (within that graph, of course -- stack allocations and global variables don't
count).
... leaksoup also finds sets of objects that are rooted by a cycle (i.e., a set of reference
counted objects that own references to each other in a cycle).
powermetrics
user%: percentage of that cpu time spent in user space (as opposed to kernel mode.) deadlines (<2 ms, 2-5 ms): these two columns
count how many "short" timers woke up threads in the process, per second, during the sample period.
... wakeups (intr, pkg idle): these two columns
count how many wakeups occurred, per second, during the sample period.
... the first column
counts interrupt-level wakeups that resulted in a thread being dispatched in the process.
... the second column
counts "package idle exit" wakeups, which wake up the entire package as opposed to just a single core; such wakeups are particularly expensive, and this
count is a subset of the first column's
count.
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
goto cleanup; } rv = sec_dersigndata(arena, &result, encoding->data, encoding->len, privk, signalgtag); if (rv) { pr_fprintf(pr_stderr, "signing of data failed\n"); rv = secfailure; goto cleanup; } /* encode request in specified format */ if (ascii) { char *obuf; char *name, *email, *org, *state, *
country; secitem *it; int total; it = &result; obuf = btoa_convertitemtoascii(it); total = pl_strlen(obuf); name = cert_getcommonname(subject); if (!name) { name = strdup("(not specified)"); } email = cert_getcertemailaddress(subject); if (!email) email = strdup("(not specified)"); ...
... org = cert_getorgname(subject); if (!org) org = strdup("(not specified)"); state = cert_getstatename(subject); if (!state) state = strdup("(not specified)");
country = cert_get
countryname(subject); if (!
country)
country = strdup("(not specified)"); pr_fprintf(outfile, "\ncertificate request generated by netscape certutil\n"); pr_fprintf(outfile, "common name: %s\n", name); pr_fprintf(outfile, "email: %s\n", email); pr_fprintf(outfile, "organization: %s\n", org); pr_fprintf(outfile, "state: %s\n", state); pr_fprintf(outfile, "
country: %s\n\n",
country); pr_fprintf(outfile, "%s\n", ns_certreq_header); numbytes = pr_write...
... const char *encryptedfilename, const char *outfilename) { secstatus rv; prfiledesc *encfile = null; prfiledesc *outfile = null; seckeyprivatekey *pvtkey = null; unsigned int infilelength = 0; unsigned int paddinglength = 0; unsigned int
count = 0; unsigned int temp = 0; unsigned char ctext[modblocksize]; unsigned char decbuf[modblocksize]; unsigned int ctextlen; unsigned int decbuflen; secitem paditem; secitem data; secitem signature; certcertificate *cert = null; /* read certificat...
...reading */ encfile = pr_open(encryptedfilename, pr_rdonly, 0); if (!encfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for reading.\n", encryptedfilename); rv = secfailure; goto cleanup; } /* read the encrypt file, decrypt and write to out file */ while ((ctextlen = pr_read(encfile, ctext, sizeof(ctext))) > 0) {
count += ctextlen; rv = pk11_pubdecryptraw(pvtkey, decbuf, &decbuflen, sizeof(decbuf), ctext, ctextlen); if (rv != secsuccess) { fprintf(stderr, "couldn't decrypt\n"); goto cleanup; } if (decbuflen == 0) { break; } if (
count == infilelength) { decbuflen = decbuflen - paddinglength; } ...
sample2
gnalgtag == sec_oid_unknown) { pr_fprintf(pr_stderr, "unknown key or hash type\n"); rv = secfailure; goto cleanup; } rv = sec_dersigndata(arena, &result, encoding->data, encoding->len, privk, signalgtag); if (rv) { pr_fprintf(pr_stderr, "signing of data failed\n"); rv = secfailure; goto cleanup; } /* encode request in specified format */ if (ascii) { char *obuf; char *name, *email, *org, *state, *
country; secitem *it; int total; it = &result; obuf = btoa_convertitemtoascii(it); total = pl_strlen(obuf); name = cert_getcommonname(subject); if (!name) { name = strdup("(not specified)"); } email = cert_getcertemailaddress(subject); if (!email) email = strdup("(not specified)"); org = cert_getorgname(subject); if (!org) org = strdup("(not specified)"); state = cert_getstatename(subject); if (!state)...
... state = strdup("(not specified)");
country = cert_get
countryname(subject); if (!
country)
country = strdup("(not specified)"); pr_fprintf(outfile, "\ncertificate request generated by netscape certutil\n"); pr_fprintf(outfile, "common name: %s\n", name); pr_fprintf(outfile, "email: %s\n", email); pr_fprintf(outfile, "organization: %s\n", org); pr_fprintf(outfile, "state: %s\n", state); pr_fprintf(outfile, "
country: %s\n\n",
country); pr_fprintf(outfile, "%s\n", ns_certreq_header); numbytes = pr_write(outfile, obuf, total); if (numbytes != total) { pr_fprintf(pr_stderr, "write error\n"); return secfailure; } pr_fprintf(outfile, "\n%s\n", ns_certreq_trailer); } else { numbytes = pr_write(outfile, result.data, result.len); if (numbytes != (int)result.len) { pr_fprintf(pr_stderr, "write error\n"); r...
...*/ secstatus findkeyanddecrypt(pk11slotinfo *slot, secupwdata *pwdata, const char *headerfilename, const char *encryptedfilename, const char *outfilename) { secstatus rv; prfiledesc *encfile = null; prfiledesc *outfile = null; seckeyprivatekey *pvtkey = null; unsigned int infilelength = 0; unsigned int paddinglength = 0; unsigned int
count = 0; unsigned int temp = 0; unsigned char ctext[modblocksize]; unsigned char decbuf[modblocksize]; unsigned int ctextlen; unsigned int decbuflen; secitem paditem; secitem data; secitem signature; certcertificate *cert = null; /* read certificate from header file */ rv = readfromheaderfile(headerfilename, certenc, &data, pr_true); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not read certi...
...", outfilename); rv = secfailure; goto cleanup; } /* open the encrypted file for reading */ encfile = pr_open(encryptedfilename, pr_rdonly, 0); if (!encfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for reading.\n", encryptedfilename); rv = secfailure; goto cleanup; } /* read the encrypt file, decrypt and write to out file */ while ((ctextlen = pr_read(encfile, ctext, sizeof(ctext))) > 0) {
count += ctextlen; rv = pk11_pubdecryptraw(pvtkey, decbuf, &decbuflen, sizeof(decbuf), ctext, ctextlen); if (rv != secsuccess) { fprintf(stderr, "couldn't decrypt\n"); goto cleanup; } if (decbuflen == 0) { break; } if (
count == infilelength) { decbuflen = decbuflen - paddinglength; } /* write the plain text to out file */ temp = pr_write(outfile, decbuf, decbuflen); if (temp != decbuflen) { pr_fprintf(...
nss tech note2
hreadid[nsprthreadid]: argn = 0xaaaaaaaa osthreadid[nsprthreadid]: rv = 0xyyyyyyyy for example, 1024[805ef10]: c_initialize 1024[805ef10]: pinitargs = 0x4010c938 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getinfo 1024[805ef10]: pinfo = 0xbffff340 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getslotlist 1024[805ef10]: tokenpresent = 0x0 1024[805ef10]: pslotlist = 0x0 1024[805ef10]: pul
count = 0xbffff33c 1024[805ef10]: *pul
count = 0x2 1024[805ef10]: rv = 0x0 note that when a pkcs #11 function takes a pointer argument for which it will set a value (c_getslotlist above), this mode will display the value upon return.
...for example, 1024[805ef10]: c_findobjectsinit 1024[805ef10]: hsession = 0x1000001 1024[805ef10]: ptemplate = 0xbffff410 1024[805ef10]: ul
count = 3 1024[805ef10]: cka_label = localhost.nyc.rr.com [20] 1024[805ef10]: cka_token = ck_true [1] 1024[805ef10]: cka_class = cko_certificate [4] 1024[805ef10]: rv = 0x0 1024[805ef10]: c_findobjects 1024[805ef10]: hsession = 0x1000001 1024[805ef10]: phobject = 0x806d810 1024[805ef10]: ulmaxobject
count = 16 1024[805ef10]: pulobject
count = 0xbffff38c 1024[805ef10]: *pulobject
count = 0x1 1024[805ef10]: ph...
...object[0] = 0xf6457d04 1024[805ef10]: rv = 0x0 1024[805ef10]: c_findobjectsfinal 1024[805ef10]: hsession = 0x1000001 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getattributevalue 1024[805ef10]: hsession = 0x1000001 1024[805ef10]: hobject = 0xf6457d04 1024[805ef10]: ptemplate = 0xbffff2d0 1024[805ef10]: ul
count = 2 1024[805ef10]: cka_token = 0 [1] 1024[805ef10]: cka_label = 0 [20] 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getattributevalue 1024[805ef10]: hsession = 0x1000001 1024[805ef10]: hobject = 0xf6457d04 1024[805ef10]: ptemplate = 0xbffff2d0 1024[805ef10]: ul
count = 2 1024[805ef10]: cka_token = ck_true [1] 1024[805ef10]: cka_label = localhost.nyc.rr.com [20] 1024[805ef10]: rv = 0x0 4.
...the number of calls to each pkcs #11 function will be
counted, and the time spent in each function as well.
FC_FindObjects
name fc_findobjects - search for one or more objects syntax ck_rv fc_findobjects( ck_session_handle hsession, ck_object_handle_ptr phobject, ck_ulong usmaxobject
count, ck_ulong_ptr pusobject
count ); parameters hsession [in] session handle.
...usmaxobject
count [in] maximum number of handles to retrieve.
... pusobject
count [out] pointer to location to receive the number of returned handles.
... description fc_findobjects returns the next set of object handles matching the criteria set up by the previous call to fc_findobjectsinit and sets the object
count variable to their number or to zero if there are none.
sslerr.html
-12283 (unused) ssl_error_bad_client -12282 "the server has en
countered bad data from the client." this error code should occur only on sockets that are acting as servers.
... ssl_error_bad_server -12281 "the client has en
countered bad data from the server." this error code should occur only on sockets that are acting as clients.
... ssl_error_unsupported_certificate_type -12280 "unsupported certificate type." the operation en
countered a certificate that was not one of the well known certificate types handled by the certificate library.
...if en
countered repeatedly on a server socket, this can indicate that the server is actively under a "million question" attack.
Introduction to the JavaScript shell
countheap([start[, kind]]) added in spidermonkey 1.8
count the number of live gc things in the heap, or things reachable from start when it is given and is not null.
... kind is either 'all' (default) to
count all things or one of 'object', 'double', 'string', 'function', 'qname', 'namespace', 'xml' to
count only things of that kind.
... line2pc([function, ] line) returns the program
counter value corresponding to the specified line of code.
...if you specify a program
counter offset into the function, the line number of the line of code containing that offset is returned.
JSObjectOps.newObjectMap
syntax typedef jsobjectmap * (*jsnewobjectmapop)(jscontext *cx, jsref
count nrefs, jsobjectops *ops, jsclass *clasp, jsobject *obj); name type description cx jscontext * pointer to the js context in which the new object is being created.
... nrefs jsref
count the initial reference
count for the new jsobjectmap.
... jsobjectmaps are reference-
counted by generic code in the engine.
... usually, the nrefs parameter to jsobjectops.newobjectmap will be 1, to
count the ref returned to the caller on success.
JS_GetGCParameter
nks, jsgc_slice_time_budget, jsgc_mark_stack_limit, jsgc_high_frequency_time_limit, jsgc_high_frequency_low_limit, jsgc_high_frequency_high_limit, jsgc_high_frequency_heap_growth_max, jsgc_high_frequency_heap_growth_min, jsgc_low_frequency_heap_growth, jsgc_dynamic_heap_growth, jsgc_dynamic_mark_slice, jsgc_allocation_threshold, jsgc_min_empty_chunk_
count, jsgc_max_empty_chunk_
count, jsgc_compaction_enabled, jsgc_allocation_threshold_factor, jsgc_allocation_threshold_factor_avoid_interrupt, jsgc_nursery_free_threshold_for_idle_collection, jsgc_pretenure_threshold, jsgc_pretenure_group_threshold, jsgc_nursery_free_threshold_for_idle_collection_percent, jsgc_min_nursery_bytes, jsgc_min_last_ditch_gc_period, } ...
... additionally if a zone expands beyond the threshold without this factor, then it will be collected non-incrementally jsgc_allocation_threshold_factor_avoid_interrupt / "allocationthresholdfactoravoidinterrupt" jsgc_min_empty_chunk_
count / "minemptychunk
count" we try to keep at least this many unused chunks in the free chunk pool at all times, even after a shrinking gc.
... jsgc_max_empty_chunk_
count / "maxemptychunk
count" we never keep more than this many unused chunks in the free chunk pool.
...gh_frequency_low_limit jsgc_high_frequency_high_limit jsgc_high_frequency_heap_growth_max jsgc_high_frequency_heap_growth_min jsgc_low_frequency_heap_growth jsgc_dynamic_heap_growth jsgc_dynamic_mark_slice bug 800063 jsgc_allocation_threshold bug 871005 jsgc_decommit_threshold this option is no-longer exists bug 1017141 jsgc_min_empty_chunk_
count jsgc_max_empty_chunk_
count ...
Secure Development Guidelines
sql injection occurs when un-trusted input is mixed with a sql string sql is a language used to interact with databases code injection attack that is similar to xss but targeted at sql rather than html and javascript if input is mixed with sql, it could itself become an sql instruction and be used to: query data from the database (passwords) insert value into the database (a user ac
count) change application logic based on results returned by the database sql injection: example snprintf(str, sizeof(str), "select * from ac
count where name ='%s'", name); sqlite3_exec(db, str, null, null, null); sql injection: prevention use parameterized queries insert a marker for every piece of dynamic content so data does not get mixed with sql instructions example: ...
...sqlite3_stmt *stmt; char *str = "select * from ac
count where name='?'"; sqlite3_prepare_v2(db, str, strlen(str), &stmt, null); sqlite3_bind_text(stmt, 1, name, strlen(name), sqlite_transient); sqlite3_step(stmt); sqlite3_finalize(p_stmt); writing secure code: arithmetic issues integer overflows/underflows overflows occur when an arithmetic operation attempts to create a numeric value that is larger than can be represented within the available storage space max + 1 will be 0 and 0 – 1 will be max!
... memory leaks example: void *p; size_t new_size; p = realloc(p, new_size); if (p == null) { /* handle error */ } memory leaks: prevention tools like valgrind can help detect memory leaks writing secure code: object management reference
counting issues real-life example (bug 440230) void addref() { ++mrefcnt; ns_log_addref(this, mrefcnt, "nscssvalue::array", sizeof(*this)); } void release() { --mrefcnt; ns_log_release(this, mrefcnt, "nscssvalue::array"); if (mrefcnt == 0) delete this; } reference
counting issues: prevention use the largest data type available on your platform for your re...
...ference
counter use a hard limit constructor/destructor issues if a constructor fails the destructor never gets called this can lead to memory leaks constructor/destructor issues example class foo { private: char *ptr; public: foo() {} ~foo() { if (ptr) free(ptr); } }; constructor/destructor issues: prevention initialize the data members of an object in the constructor writing secure code: miscellaneous file i/o a lot can go wrong because a lot can be done with file input and output filenames permissions file handles and descriptors file i/o: filename divided in directories, subdirectories, and the file itself ‘/’ is separator; in windows ‘\’ would work too int open...
Signing Mozilla apps for Mac OS X
for release creating a developer id requires a paid apple developer ac
count.
...if the "developer id" radio button is greyed out you probably have a group ac
count.
... these types of ac
counts only allow for the "agent" role to create developer ids.
... contact the person who created your group apple developer ac
count if you get stuck here.
Querying Places
attribute long maxvisits attribute boolean onlybookmarked attribute boolean domainishost attribute autf8string domain readonly attribute boolean hasdomain attribute boolean uriisprefix attribute nsiuri uri readonly attribute boolean hasuri attribute boolean annotationisnot attribute autf8string annotation readonly attribute boolean hasannotation readonly attribute unsigned long folder
count basic query configuration options const unsigned short group_by_day = 0 const unsigned short group_by_host = 1 const unsigned short group_by_domain = 2 const unsigned short group_by_folder = 3 const unsigned short sort_by_none = 0 const unsigned short sort_by_title_ascending = 1 const unsigned short sort_by_title_descending = 2 const unsigned short sort_by_date_ascending = 3 const un...
...signed short sort_by_date_descending = 4 const unsigned short sort_by_uri_ascending = 5 const unsigned short sort_by_uri_descending = 6 const unsigned short sort_by_visit
count_ascending = 7 const unsigned short sort_by_visit
count_descending = 8 const unsigned short sort_by_keyword_ascending = 9 const unsigned short sort_by_keyword_descending = 10 const unsigned short sort_by_dateadded_ascending = 11 const unsigned short sort_by_dateadded_descending = 12 const unsigned short sort_by_lastmodified_ascending = 13 const unsigned short sort_by_lastmodified_descending = 14 const unsigned short sort_by_annotation_ascending = 15 const unsigned short sort_by_annotation_descending = 16 const unsigned short results_as_uri = 0 const unsigned short results_as_visit = 1 const unsigned short res...
... example of serializing and deserializing two queries and an options object: let querystring = placesutils.history.queriestoquerystring([query1, query2], 2, options); let queriesref = { }; let query
countref = { }; let optionsref = { }; placesutils.history.querystringtoqueries(querystring, queriesref, query
countref, optionsref); // now use queriesref.value, optionsref.value see places query uris for more information about the terms available for "place:" uris.
....history.getnewqueryoptions(); // execute the query // see : https://developer.mozilla.org/en/nsinavhistoryservice#executequery() var result = placesutils.history.executequery(query, options); // using the results by traversing a container // see : https://developer.mozilla.org/en/nsinavhistorycontainerresultnode var cont = result.root; cont.containeropen = true; for (var i = 0; i < cont.child
count; i ++) { var node = cont.getchild(i); // "node" attributes contains the information (e.g.
Accessing the Windows Registry Using XPCOM
this can be very important when dealing with non-administrator ac
counts with restricted privileges.
...the nsiwindowsregkey interface provides the child
count, getchildname(), value
count, and getvaluename() properties and methods for enumerating keys and values respectively.
... var wrk = components.classes["@mozilla.org/windows-registry-key;1"] .createinstance(components.interfaces.nsiwindowsregkey); wrk.open(wrk.root_key_local_machine, "software\\microsoft\\windows\\currentversion\\run", wrk.access_read); for (var i=0; i<wrk.value
count; i++) { var name = wrk.getvaluename(i); var value = readregistryvalue(wrk, name); // do something interesting here...
... function removechildrenrecursive(wrk) { // we
count backwards because we're removing them as we go for (var i = wrk.child
count - 1; i >= 0; i--) { var name = wrk.getchildname(i); var subkey = wrk.openchild(name, wrk.access_all); removechildrenrecursive(subkey); subkey.close(); wrk.removechild(name); } } var wrk = components.classes["@mozilla.org/windows-registry-key;1"] .createinstance(components.inte...
RefPtr
refptr (formerly known as nsrefptr, see bug 1207245) is a general class to implement reference
counting pointers for objects.
... like with nscomptr, it is the responsibility of the object itself to implement reference
counting.
... this is done using the functions addref() and release(), which respectively modify a variable of type nsautorefcnt, which basically is a wrapper around a
count of the number of references refering to the class.
... so for xpcom interfaces: nscomptr<nsisupports> a; nscomptr<nsifoo> foo; and for concrete classes: refptr<nsfoo> foo; // class that implements nsifoo; refptr<bar> bar; // some random class that i want ref-
counted but has nothing to do with xpcom: // just implement addref() and release() and it will work with refptr it is important that nscomptr is not used to hold a pointer to a concrete class since this can cause compile time errors or runtime errors.
XPCOM glue classes
esent unicode character arrays.nsastring (external)class declarationnsastring_internalclass declarationnsautorefnsautoref<t> is a template class implementing an object that holds a handle to a resource that must be released, typically on destruction of the object.</t>nsautoreftraitsnsautoreftraits<t> is a template class describing traits of resources held by objects of class nsautoref<t> and/or ns
countedref<t>.</t>nsautostringclass declarationnsautostring (external)class declarationnscautostringclass declarationnscautostring (external)class declarationnscomptrthis utility class simplifies managing xpcom interface references from c++ code.ns
countedrefns
countedref<t> is a template class implementing an object that takes a strong reference to a reference-
counted resource that must be released, typ...
...these routines allow easy access to xpcom's global nsimemory implementation without having to go through the service manager to get it.nspromiseflatcstringclass declarationnspromiseflatstringclass declarationnsrefptrrefptr (formerly known as nsrefptr, see bug 1207245) is a general class to implement reference
counting pointers for objects.
... like with nscomptr, it is the responsibility of the object itself to implement reference
counting.
... this is done using the functions addref() and release(), which respectively modify a variable of type nsautorefcnt, which basically is a wrapper around a
count of the number of references refering to the class.nsstringclass declarationnsstring externalclass declarationnsstringcontainer (external)class declarationnssupportsweakreferenceinherit from this c++ class to add canonical support for nsisupportsweakreference.nsxpidlcstringclass declarationnsxpidlstringclass declarationpromiseflatcstring (external)class declarationpromiseflatstring (external)class declaration ...
inIDOMUtils
licit_jscontext] jsval colornametorgb(in domstring acolorname); nsiarray getbindingurls(in nsidomelement aelement); nsidomnodelist getchildrenfornode(in nsidomnode anode, in boolean ashowinganonymouscontent); unsigned long long getcontentstate(in nsidomelement aelement); void getcsspropertynames([optional] in unsigned long aflags, [optional] out unsigned long a
count, [retval, array, size_is(a
count)] out wstring aprops); nsisupportsarray getcssstylerules(in nsidomelement aelement, [optional] in domstring apseudo); nsidomnode getparentfornode(in nsidomnode anode, in boolean ashowinganonymouscontent); unsigned long getruleline(in nsidomcssstylerule arule); unsigned long getrulecolumn(in nsidomcssstylerule arule); un...
...signed long getselector
count(in nsidomcssstylerule arule); astring getselectortext(in nsidomcssstylerule arule, in unsigned long aselectorindex); unsigned long long getspecificity(in nsidomcssstylerule arule, in unsigned long aselectorindex); nsidomfontfacelist getusedfontfaces(in nsidomrange arange); bool haspseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); boolean isignorablewhitespace(in nsidomcharacterdata adatanode); bool isinheritedproperty(in astring apropertyname); void parsestylesheet(in nsidomcssstylesheet asheet, in domstring ainput); void removepseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); astring rgbtocolorname(in octet ar, in octet ag, in octet ab); ...
... getcsspropertynames() get a list of all our supported property names void getcsspropertynames( in unsigned long aflags, optional out unsigned long a
count, optional [retval, array, size_is(a
count)] out wstring aprops ); parameters aflags optional shorthands can be excluded or property aliases included.
... a
count optional
count aprops properties getcssstylerules() returns an array of the css style rules on the specified element.
nsIDOMGeoPositionAddress
dom/interfaces/geolocation/nsidomgeopositionaddress.idlscriptable this interface describes the geographical address of a location, including street, city, and
country information, for example.
...
country domstring the
country.
...
countrycode obsolete since gecko 11 domstring removed in firefox 11, since it isn't defined in the specification; use
country instead.
...
county domstring the
county.
nsINavHistoryResultObserver
unsigned long anewstate); void invalidatecontainer(in nsinavhistorycontainerresultnode acontainernode); void nodeannotationchanged(in nsinavhistoryresultnode anode, in autf8string aannoname); void nodedateaddedchanged(in nsinavhistoryresultnode anode, in prtime anewvalue); void nodehistorydetailschanged(in nsinavhistoryresultnode anode, in prtime anewvisitdate, in unsigned long anewaccess
count); void nodeiconchanged(in nsinavhistoryresultnode anode); void nodeinserted(in nsinavhistorycontainerresultnode aparent, in nsinavhistoryresultnode anode, in unsigned long anewindex); void nodekeywordchanged(in nsinavhistoryresultnode anode, in autf8string anewkeyword); void nodelastmodifiedchanged(in nsinavhistoryresultnode anode, in prtime anewvalue); void nodemoved(in nsinavhistoryre...
... nodehistorydetailschanged() called right after a node's time property or access
count property, or both, have changed.
... void nodehistorydetailschanged( in nsinavhistoryresultnode anode, in prtime anewvisitdate, in unsigned long anewaccess
count ); parameters anode the node whose details have changed.
...anewaccess
count the new access
count value for the node.
nsINavHistoryResultViewer
void nodeannotationchanged(in nsinavhistoryresultnode anode, in autf8string aannoname); void nodedateaddedchanged(in nsinavhistoryresultnode anode, in prtime anewvalue); void nodelastaddedchanged(in nsinavhistoryresultnode anode, in prtime anewvalue); void nodehistorydetailschanged(in nsinavhistoryresultnode anode, in prtime anewvisitdate, in unsigned long anewaccess
count); void nodeiconchanged(in nsinavhistoryresultnode anode); void nodekeywordchanged(in nsinavhistoryresultnode anode, in autf8string anewkeyword); void nodemoved(in nsinavhistoryresultnode anode, in nsinavhistorycontainerresultnode aoldparent, in unsigned long aoldindex, in nsinavhistorycontainerresultnode anewparent, in unsigned long anewindex); void nodetitl...
... nodehistorydetailschanged() called right after a node's last access time or access
count has changed.
... void nodehistorydetailschanged( in nsinavhistoryresultnode anode, in prtime anewvisitdate, in unsigned long anewaccess
count ); parameters anode the node whose details have changed.
... anewaccess
count the new access
count value for the node.
Component; nsIPrefBranch
boolean getboolpref(in string aprefname, requires gecko 54 [optional] in boolean adefaultvalue); string getcharpref(in string aprefname,requires gecko 54 [optional] in string adefaultvalue); requires gecko 58 utf8tring getstringpref(in string aprefname, [optional] in utf8string adefaultvalue); void getchildlist(in string astartingat, [optional] out unsigned long a
count, [array, size_is(a
count), retval] out string achildarray); void getcomplexvalue(in string aprefname, in nsiidref atype, [iid_is(atype), retval] out nsqiresult avalue); long getintpref(in string aprefname,requires gecko 54 [optional] in long adefaultvalue); long getpreftype(in string aprefname); void lockpref(in string aprefname); boolean prefhasuserval...
... (to call from javascript use children = nsiprefbranch.getchildlist("",obj), which will fill in obj.value with the
count and return an array of keys!
... (it is not void in javascript) void getchildlist( in string astartingat, out unsigned long a
count, [array, size_is(a
count), retval] out string achildarray ); parameters astartingat the point on the branch at which to start enumerating the child preferences.
... a
count optional from gecko 2.0 receives the number of elements in the array.
nsIProcess2
to create an instance, use: var process2 = components.classes["@mozilla.org/process/util;1"] .createinstance(components.interfaces.nsiprocess2); method overview void runasync([array, size_is(
count)] in string args, in unsigned long
count, [optional] in nsiobserver observer, [optional] in boolean holdweak); methods runasync() asynchronously runs the process with which the object was initialized, optionally calling an observer when the process finishes running.
... void runasync( [array, size_is(
count)] in string args, in unsigned long
count, in nsiobserver observer, optional in boolean holdweak optional ); parameters args an array of arguments to pass into the process, using the native character set.
... this array must have
count entries.
...
count the number of arguments passed in the args array.
nsIPromptService
, in wstring atext, inout wstring ausername, inout wstring apassword, in wstring acheckmsg, inout boolean acheckstate); boolean promptpassword(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, inout wstring apassword, in wstring acheckmsg, inout boolean acheckstate); boolean select(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, in pruint32 a
count, [array, size_is(a
count)] in wstring aselectlist, out long aoutselection); constants the following flags are combined to form the abuttonflags parameter passed to confirmex.
...a delay can be useful not only to give the user more time to think before acting, but also as a
countermeasure against malicious web sites that intentionally create a race condition whereby the user intends to click or type a key responding, for example, to the web site's prompt but the security dialog pops up unexpectedly and its button is unintentionally activated.
...boolean select( in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, in pruint32 a
count, [array, size_is(a
count)] in wstring aselectlist, out long aoutselection ); aparent the parent window for the dialog.
... a
count length of the aselectlist array parameter.
ANGLE_instanced_arrays.drawArraysInstancedANGLE() - Web APIs
syntax void ext.drawarraysinstancedangle(mode, first,
count, prim
count); parameters mode a glenum specifying the type primitive to render.
...
count a glsizei specifying the number of indices to be rendered.
... prim
count a glsizei specifying the number of instances of the range of elements to execute.
... if first,
count or prim
count are negative, a gl.invalid_value error is thrown.
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
syntax void ext.drawelementsinstancedangle(mode,
count, type, offset, prim
count); parameters mode a glenum specifying the type primitive to render.
...
count a glsizei specifying the number of elements to be rendered.
... prim
count a glsizei specifying the number of instances of the set of elements to execute.
... if
count or prim
count are negative, a gl.invalid_value error is thrown.
AnalyserNode.getByteFrequencyData() - Web APIs
if the array has fewer elements than the analysernode.frequencybin
count, excess elements are dropped.
... syntax var audioctx = new audiocontext(); var analyser = audioctx.createanalyser(); var dataarray = new uint8array(analyser.frequencybin
count); // uint8array should be the same length as the frequencybin
count void analyser.getbytefrequencydata(dataarray); // fill the uint8array with data returned from getbytefrequencydata() parameters array the uint8array that the frequency domain data will be copied to.
... if the array has fewer elements than the analysernode.frequencybin
count, excess elements are dropped.
... analyser.fftsize = 256; var bufferlength = analyser.frequencybin
count; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i...
AnalyserNode.getFloatFrequencyData() - Web APIs
syntax var audioctx = new audiocontext(); var analyser = audioctx.createanalyser(); var dataarray = new float32array(analyser.frequencybin
count); // float32array should be the same length as the frequencybin
count void analyser.getfloatfrequencydata(dataarray); // fill the float32array with data returned from getfloatfrequencydata() parameters array the float32array that the frequency domain data will be copied to.
... if the array has fewer elements than the analysernode.frequencybin
count, excess elements are dropped.
... example const audioctx = new audiocontext(); const analyser = audioctx.createanalyser(); // float32array should be the same length as the frequencybin
count const mydataarray = new float32array(analyser.frequencybin
count); // fill the float32array with data returned from getfloatfrequencydata() analyser.getfloatfrequencydata(mydataarray); drawing a spectrum the following example shows basic usage of an audiocontext to connect a mediaelementaudiosourcenode to an analysernode.
...microphone input const audioele = new audio(); audioele.src = 'my-audio.mp3';//insert file name here audioele.autoplay = true; audioele.preload = 'auto'; const audiosourcenode = audioctx.createmediaelementsource(audioele); //create analyser node const analysernode = audioctx.createanalyser(); analysernode.fftsize = 256; const bufferlength = analysernode.frequencybin
count; const dataarray = new float32array(bufferlength); //set up audio node network audiosourcenode.connect(analysernode); analysernode.connect(audioctx.destination); //create 2d canvas const canvas = document.createelement('canvas'); canvas.style.position = 'absolute'; canvas.style.top = 0; canvas.style.left = 0; canvas.width = window.innerwidth; canvas.height = window.innerheight; document.body.ap...
AudioNode - Web APIs
audionode.channel
count represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node.
... its usage and precise definition depend on the value of audionode.channel
countmode.
... audionode.channel
countmode represents an enumerated value describing the way channels must be matched between the node's inputs and outputs.
...s of such usage on any of the examples linked to on the web audio api landing page (for example violent theremin.) const audioctx = new audiocontext(); const oscillator = new oscillatornode(audioctx); const gainnode = new gainnode(audioctx); oscillator.connect(gainnode).connect(audioctx.destination); oscillator.context; oscillator.numberofinputs; oscillator.numberofoutputs; oscillator.channel
count; specifications specification status comment web audio apithe definition of 'audionode' in that specification.
AudioWorkletNode() - Web APIs
outputchannel
count optional an array defining the number of channels for each output.
... for example, outputchannel
count: [n, m] specifies the number of channels in the first output to be n and the second output to be m.
... exceptions notsupportederror the specified options.outputchannel
count is 0 or larger than the current implementation supports.
... indexsizeerror the length of options.outputchannel
count array does not match options.numberofoutputs.
AuthenticatorAssertionResponse.authenticatorData - Web APIs
the authenticatordata property of the authenticatorassertionresponse interface returns an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature
counter, test of user presence, user verification flags, and any extensions processed by the authenticator.
... sign
count (4 bytes) - a signature
count from the authenticator.
... the server will use this
counter to detect authenticator cloning.
...this public key will be stored on the server associated with a user's ac
count and be used for future authentications.
HTMLVideoElement - Web APIs
gecko-specific properties htmlvideoelement.mozparsedframes read only returns an unsigned long with the
count of video frames that have been parsed from the media resource.
... htmlvideoelement.mozdecodedframes read only returns an unsigned long with the
count of parsed video frames that have been decoded into images.
... htmlvideoelement.mozpresentedframes read only returns an unsigned long with the
count of decoded frames that have been presented to the rendering pipeline for painting.
... htmlvideoelement.mozpaintedframes read only returns an unsigned long with the
count of presented frames which were painted on the screen.
Dragging and Dropping Multiple Items - Web APIs
to check if multiple files are being dragged, check the mozitem
count property.
... function ondrop(event) { var files = []; var dt = event.datatransfer; for (var i = 0; i < dt.mozitem
count; i++) files.push(dt.mozgetdataat("application/x-moz-file", i)); } you may also wish to check if the desired format exists using the moztypesat method.
... <html> <head> <script> function dodrop(event) { var dt = event.datatransfer; var
count = dt.mozitem
count; output("items: " +
count + "\n"); for (var i = 0; i <
count; i++) { output(" item " + i + ":\n"); var types = dt.moztypesat(i); for (var t = 0; t < types.length; t++) { output(" " + types[t] + ": "); try { var data = dt.mozgetdataat(types[t], i); output("(" + (typeof data) + ") : <" + data + " >\n"); } catch (ex) { out...
...it checks the mozitem
count property to check how many items have been dropped and iterates over them.
IDBObjectStore.getAll() - Web APIs
the
count() method with the same key, which will return 1 if the row exists and 0 if it doesn't.
... syntax var request = objectstore.getall(); var request = objectstore.getall(query); var request = objectstore.getall(query,
count); parameters query optional a key or idbkeyrange to be queried.
...
count optional specifies the number of values to return if more than one is found.
... a typeerror exception is thrown if the
count parameter is not between 0 and 232-1 included.
Timing element visibility with the Intersection Observer API - Web APIs
the intersection observer api doesn't take this into ac
count when detecting intersection, since intersection isn't affected by page visibility.
...then, for each of the ads that are being suspended, we call our updateadtimer() function, which handles updating the ad's total visible time
counter, then we set their dataset.lastviewstarted property to 0, which indicates that the tab's timer isn't running.
... updating an ad's visibility timer previously (see handling document visibility changes and handling periodic actions), we've seen that when we need to update an ad's "total visible time"
counter, we call a function named updateadtimer() to do so.
... diff = currenttime - laststarted; adbox.dataset.totalviewtime = parsefloat(adbox.dataset.totalviewtime) + diff; } adbox.dataset.lastviewstarted = currenttime; } to track an element's visible time, we use two custom data attributes (see data-*) on every ad: lastviewstarted the time in milliseconds, relative to the time at which the document was created, at which the ad's visibility
count was last updated, or the ad last became visible.
PaymentAddress.region - Web APIs
the read-only region property of the paymentaddress interface returns a string containing the top-level administrative subdivision of the
country in which the address is located.
... syntax var paymentregion = paymentaddress.region; value a domstring specifying the top-level administrative subdivision within the
country in which the address is located.
... this region has different names in different
countries, such as: state, province, oblast, prefecture, or
county.
... usage notes in some
countries, like belgium, it's uncommon for people to provide a region as part of their postal address.
performance.clearMarks() - Web APIs
function logmark
count() { console.log( "found this many entries: " + performance.getentriesbytype("mark").length ); } // create a bunch of marks.
... performance.mark("squirrel"); performance.mark("squirrel"); performance.mark("monkey"); performance.mark("monkey"); performance.mark("dog"); performance.mark("dog"); logmark
count() // "found this many entries: 6" // delete just the "squirrel" performancemark entries.
... performance.clearmarks('squirrel'); logmark
count() // "found this many entries: 4" // delete all of the performancemark entries.
... performance.clearmarks(); logmark
count() // "found this many entries: 0" specifications specification status comment user timing level 2the definition of 'clearmarks()' in that specification.
performance.clearMeasures() - Web APIs
function logmeasure
count() { console.log( "found this many entries: " + performance.getentriesbytype("measure").length ); } // create a bunch of measures.
... performance.measure("from navigation"); performance.mark("a"); performance.measure("from mark a", "a"); performance.measure("from navigation"); performance.measure("from mark a", "a"); performance.mark("b"); performance.measure("between a and b", "a", "b"); logmeasure
count() // "found this many entries: 5" // delete just the "from navigation" performancemeasure entries.
... performance.clearmeasures("from navigation"); logmeasure
count() // "found this many entries: 3" // delete all of the performancemeasure entries.
... performance.clearmeasures(); logmeasure
count() // "found this many entries: 0" specifications specification status comment user timing level 2the definition of 'clearmeasures()' in that specification.
PublicKeyCredentialCreationOptions.user - Web APIs
the user property of the publickeycredentialcreationoptions dictionary is an object describing the user ac
count for which the credentials are generated (via navigator.credentials.create()).
... syntax userac
count = publickeycredentialcreationoptions.user properties displayname a domstring which is human readable and intended for display.
...this an opaque identifier which can be used by the authenticator to link the user ac
count with its corresponding credentials.
..."jdoe@example.com").this property is intended for display and may be use to distinguish different ac
count with the same displayname.
RTCIceCandidatePairStats - Web APIs
this does not take into ac
count the size of the ip overhead, nor any other transport layers such as tcp or udp.
...this does not take into ac
count the size of the ip overhead, nor any other transport layers such as tcp or udp.
... circuitbreakertrigger
count optional an integer value indicating the number of times the circuit-breaker has been triggered for this particular 5-tuple (the set of five values comprising a tcp connection: source ip address, source port number, destination ip address, destination port number, and protocol).
...a retransmission is a connectivity check request whose transaction_transmit_
counter attribute's req field is greater than 1.
RTCOutboundRtpStreamStats - Web APIs
fir
count an integer value which indicates the total number of full intra request (fir) packets which this rtcrtpsender has sent to the remote rtcrtpreceiver.
... nack
count an integer value indicating the total number of negative acknolwedgement (nack) packets this rtcrtpsender has received from the remote rtcrtpreceiver.
... pli
count an integer specifying the number of times the remote receiver has notified this rtcrtpsender that some amount of encoded video data for one or more frames has been lost, using picture loss indication (pli) packets.
... sli
count an integer indicating the number of times this sender received a slice loss indication (sli) frame from the remote peer, indicating that one or more consecutive video macroblocks have been lost or corrupted.
RTCRtpStreamStats - Web APIs
fir
count a
count of the total number of full intra request (fir) packets received by the sender.
... nack
count the number of times the receiver notified the sender that one or more rtp packets has been lost by sending a negative acknowledgement (nack, also called "generic nack") packet to the sender.
... pli
count the number of times the receiving end of the stream sent a picture loss indiciation (pli) packet to the sender, indicating that it has lost some amount of encoded video data for one or more frames.
... sli
count the number of times the receiver notified the sender that one or more consecutive (in scan order) encoded video macroblocks have been lost or corrupted; this notification is sent by the receiver to the sender using a slice loss indication (sli) packet.
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
syntax void gl.drawelementsinstanced(mode,
count, type, offset, instance
count); parameters mode a glenum specifying the type primitive to render.
...
count a glsizei specifying the number of elements to be rendered.
... instance
count a glsizei specifying the number of instances of the set of elements to execute.
... if
count or instance
count are negative, a gl.invalid_value error is thrown.
A basic 2D WebGL animation example - Web APIs
let gl = null; let glcanvas = null; // aspect ratio and coordinate system // details let aspectratio; let currentrotation = [0, 1]; let currentscale = [1.0, 1.0]; // vertex information let vertexarray; let vertexbuffer; let vertexnumcomponents; let vertex
count; // rendering data shared with the // scalers.
...glcanvas.width/glcanvas.height; currentrotation = [0, 1]; currentscale = [1.0, aspectratio]; vertexarray = new float32array([ -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5 ]); vertexbuffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, vertexbuffer); gl.bufferdata(gl.array_buffer, vertexarray, gl.static_draw); vertexnumcomponents = 2; vertex
count = vertexarray.length/vertexnumcomponents; currentangle = 0.0; rotationrate = 6; animatescene(); } after getting the webgl context, gl, we need to begin by building the shader program.
... with the vertex data now provided to webgl, we set vertexnumcomponents to the number of components in each vertex (2, since they're 2d vertexes) and vertex
count to the number of vertexes in the vertex list.
...tationvector, currentrotation); gl.uniform4fv(uglobalcolor, [0.1, 0.7, 0.2, 1.0]); gl.bindbuffer(gl.array_buffer, vertexbuffer); avertexposition = gl.getattriblocation(shaderprogram, "avertexposition"); gl.enablevertexattribarray(avertexposition); gl.vertexattribpointer(avertexposition, vertexnumcomponents, gl.float, false, 0, 0); gl.drawarrays(gl.triangles, 0, vertex
count); window.requestanimationframe(function(currenttime) { let deltaangle = ((currenttime - previoustime) / 1000.0) * degreespersecond; currentangle = (currentangle + deltaangle) % 360; previoustime = currenttime; animatescene(); }); } the first thing that needs to be done in order to draw a frame of the animation is to clear the background to the desired color.
Background audio processing using AudioWorklet - Web APIs
thus, given the input list inputlist: const numberofinputs = inputlist.length; const firstinput = inputlist[0]; const firstinputchannel
count = firstinput.length; const firstinputfirstchannel = firstinput[0]; // (or inputlist[0][0]) const firstchannelbyte
count = firstinputfirstchannel.length; const firstbyteoffirstchannel = firstinputfirstchannel[0]; // (or inputlist[0][0][0]) the output list is structured in exactly the same way; it's an array of outputs, each of which is an array of channels, each of which is an array of float32ar...
...or you can process each input independently, applying an algorithm to the incoming data on each channel of each input and writing the results into the corresponding outputs' channels (keeping in mind that the number of inputs and outputs may differ, and the channel
counts on those inputs and outputs may also differ).
... process(inputlist, outputlist, parameters) { const sourcelimit = math.min(inputlist.length, outputlist.length); for (let inputnum = 0; inputnum < sourcelimit; inputnum++) { let input = inputlist[inputnum]; let output = outputlist[inputnum]; let channel
count = math.min(input.length, output.length); for (let channelnum = 0; channelnum < channel
count; channelnum++) { let sample
count = input[channelnum].length; for (let i = 0; i < sample
count; i++) { let sample = input[channelnum][i]; /* manipulate the sample */ output[channelnum][i] = sample; } } }; return true; } note that when determining...
... process(inputlist, outputlist, parameters) { const sourcelimit = math.min(inputlist.length, outputlist.length); for (let inputnum = 0; inputnum < sourcelimit; inputnum++) { let input = inputlist[inputnum]; let output = outputlist[0]; let channel
count = math.min(input.length, output.length); for (let channelnum = 0; channelnum < channel
count; channelnum++) { let sample
count = input[channelnum].length; for (let i = 0; i < sample
count; i++) { let sample = output[channelnum][i] + input[channelnum][i]; if (sample > 1.0) { sample = 1.0; } else if (sample < -1.0) { sample = -1.0;...
WritableStream.WritableStream() - Web APIs
note: you could define your own custom queuingstrategy, or use an instance of bytelengthqueuingstrategy or
countqueuingstrategy for this object value.
... if no queuingstrategy is supplied, the default used is the same as a
countqueuingstrategy with a high water mark of 1.
... defaultwriter.ready .then(() => { defaultwriter.close(); }) .then(() => { console.log("all chunks written"); }) .catch((err) => { console.log("stream error:", err); }); } const decoder = new textdecoder("utf-8"); const queuingstrategy = new
countqueuingstrategy({ highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li')...
... the highwatermark property, which is set when creating the
counting strategy (line 35), sets the maximum amount of data that the writablestream instance will handle in a single write() operation.
pad - CSS: Cascading Style Sheets
the pad descriptor can be used with custom
counter style definitions when you need the marker representations to have a minimum length.
... syntax pad: 3 "0"; values <integer> && <symbol> the <integer> specifies a minimum length that all
counter representations must reach.
... formal definition related at-rule@
counter-styleinitial value0 ""computed valueas specified formal syntax <integer> && <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...| <angle><linear-color-stop> = <color> <color-stop-length>?<linear-color-hint> = <length-percentage><length-percentage> = <length> | <percentage><angular-color-stop> = <color> && <color-stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples padding a
counter html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @
counter-style pad-example { system: numeric; symbols: "0" "1" "2" "3" "4" "5"; pad: 2 "0"; } .list { list-style: pad-example; } result specifications specification status comment css
counter styles level 3the definition of 'pad' in that s...
prefix - CSS: Cascading Style Sheets
the prefix descriptor of the @
counter-style rule specifies content that will be prepended to the marker representation.
... formal definition related at-rule@
counter-styleinitial value"" (the empty string)computed valueas specified formal syntax <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...near-color-stop> = <color> <color-stop-length>?<linear-color-hint> = <length-percentage><length-percentage> = <length> | <percentage><angular-color-stop> = <color> && <color-stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples adding a prefix to a
counter html <ul class="index"> <li>the boy who lived</li> <li>the vanishing glass</li> <li>the letters from no one</li> <li>the keeper of the keys</li> <li>diagon alley</li> </ul> css @
counter-style chapters { system: numeric; symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"; prefix: 'chapter '; } .index { list-style: chapters; padding-left: 15ch; } result specifications ...
... specification status comment css
counter styles level 3the definition of 'prefix' in that specification.
Box-shadow generator - CSS: Cascading Style Sheets
t('div'); var stack = document.createelement('div'); s.classname = 'container'; stack.classname = 'stack'; title.classname = 'title'; title.textcontent = subject.getattribute('data-title'); s.appendchild(title); s.appendchild(stack); this.id = subject.id; this.container = s; this.stack = stack; this.subject = subject; this.order = []; this.uid = 0; this.
count = 0; this.layer = null; this.layerid = 0; } stack.prototype.addlayer = function addlayer() { if (tool.addshadow(this.layerid) == -1) return; var uid = this.getuid(); var layer = this.createlayer(uid); if (this.layer === null && this.stack.children.length >= 1) this.layer = this.stack.children[0]; this.stack.insertbefore(layer, this.layer); this.order.splice...
...(this.layerid, 0, uid); this.
count++; this.setactivelayer(layer); } stack.prototype.createlayer = function createlayer(uid) { var layer = document.createelement('div'); var del = document.createelement('span'); layer.classname = 'node'; layer.setattribute('data-shid', uid); layer.setattribute('data-type', 'layer'); layer.textcontent = 'shadow ' + uid; del.classname = 'delete'; del.setattribute('data-type', 'delete'); layer.appendchild(del); return layer; } stack.prototype.getuid = function getuid() { return this.uid++; } // solve ie bug stack.prototype.movelayer = function movelayer(direction) { if (this.
count <= 1 || this.layer === null) return; if (direction === -1 && this.layerid === (this.
count - 1) ) return; if (di...
...rection === 1 && this.layerid === 0 ) return; if (direction === -1) { var before = null; tool.swapshadow(this.layerid, this.layerid + 1); this.swaporder(this.layerid, this.layerid + 1); this.layerid += 1; if (this.layerid + 1 !== this.
count) before = this.stack.children[this.layerid + 1]; this.stack.insertbefore(this.layer, before); tool.setactiveshadow(this.layerid, false); } if (direction === 1) { tool.swapshadow(this.layerid, this.layerid - 1); this.swaporder(this.layerid, this.layerid - 1); this.layerid -= 1; this.stack.insertbefore(this.layer, this.stack.children[this.layerid]); tool.setactiveshadow(this.layerid, false); } } stack.prototype.swaporder = function swaporder(pos1, pos2) { var x = this.order[pos1];...
... this.order[pos1] = this.order[pos2]; this.order[pos2] = x; } stack.prototype.deletelayer = function deletelayer(node) { var shadowid = node.getattribute('data-shid') | 0; var index = this.order.indexof(shadowid); this.stack.removechild(this.stack.children[index]); this.order.splice(index, 1); this.
count--; tool.deleteshadow(index); if (index > this.layerid) return; if (index == this.layerid) { if (this.
count >= 1) { this.layerid = 0; this.setactivelayer(this.stack.children[0], true); } else { this.layer = null; this.show(); } } if (index < this.layerid) { this.layerid--; tool.setactiveshadow(this.layerid, true); } } stack.prototype.setactivelayer = function setactivelayer(node) { elements.
CSS Containment - CSS: Cascading Style Sheets
with height: auto), then the browser may need to ac
count for its size changing).
...the main use case is to prevent situations where a css
counter could be changed in an element, which could then affect the rest of the tree.
... using contain: style would ensure that the
counter-increment and
counter-set properties created new
counters scoped to that subtree only.
... special values there are two special values of contain: content strict we en
countered the first in the example above.
columns - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: column-
count column-width syntax /* column width */ columns: 18em; /* column
count */ columns: auto; columns: 2; /* both column width and
count */ columns: 2 auto; columns: auto 12em; columns: auto auto; /* global values */ columns: inherit; columns: initial; columns: unset; the columns property may be specified as one or two of the values listed below, in any order.
... <'column-
count'> the ideal number of columns into which the element's content should be flowed, defined as an <integer> or the keyword auto.
...see column-
count.
... formal definition initial valueas each of the properties of the shorthand:column-width: autocolumn-
count: autoapplies toblock containers except table wrapper boxesinheritednocomputed valueas each of the properties of the shorthand:column-width: the absolute length, zero or largercolumn-
count: as specifiedanimation typeas each of the properties of the shorthand:column-width: a lengthcolumn-
count: an integer formal syntax <'column-width'> | <'column-
count'> examples setting three equal columns html <p class="content-box"> this is a bunch of text split into three columns using the css `columns` property.
grid-area - CSS: Cascading Style Sheets
if a negative integer is given, it instead
counts in reverse, starting from the end edge of the explicit grid.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of
counting this span.
grid-column-end - CSS: Cascading Style Sheets
if a negative integer is given, it instead
counts in reverse, starting from the end edge of the explicit grid.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of
counting this span.
grid-column-start - CSS: Cascading Style Sheets
if a negative integer is given, it
counts in reverse, starting from the end edge of the explicit grid.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of
counting this span.
grid-column - CSS: Cascading Style Sheets
if a negative integer is given, it instead
counts in reverse, starting from the end edge of the explicit grid.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of
counting this span.
grid-row-end - CSS: Cascading Style Sheets
if a negative integer is given, it instead
counts in reverse, starting from the end edge of the explicit grid.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of
counting this span.
grid-row-start - CSS: Cascading Style Sheets
if a negative integer is given, it instead
counts in reverse, starting from the end edge of the explicit grid.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid, corresponding to the search direction, are assumed to have that name for the purpose of
counting this span.
grid-row - CSS: Cascading Style Sheets
if a negative integer is given, it instead
counts in reverse, starting from the end edge of the explicit grid.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if a name is given as a <custom-ident>, only lines with that name are
counted.
... if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of
counting this span.
symbols() - CSS: Cascading Style Sheets
the symbols() css function lets you define
counter styles inline, directly as the value of a property such as list-style.
... unlike @
counter-style, symbols() is anonymous (i.e., it can only be used once).
... although less powerful, it is shorter and easier to write than @
counter-style.
... examples html <ol> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ol> css ol { list-style: symbols(cyclic "*" "†" "‡"); } result specifications specification status comment css
counter styles level 3the definition of 'symbols()' in that specification.
Iterators and generators - JavaScript
its final return value is the size of the sequence it created, tracked by the variable iteration
count.
... function makerangeiterator(start = 0, end = infinity, step = 1) { let nextindex = start; let iteration
count = 0; const rangeiterator = { next: function() { let result; if (nextindex < end) { result = { value: nextindex, done: false } nextindex += step; iteration
count++; return result; } return { value: iteration
count, done: true } } }; return rangeiterator; } using the iterator then looks like this: const it = makerangeiterator(1, 10, 2); let result = it.next(); while (!result.done) { console.log(result.value); // 1 3 5 7 9 result = it.next(); } console.log("iterated over sequence of size: ", result.value); // [5 numbers returned, that took interval...
...when a value is consumed by calling the generator's next method, the generator function executes until it en
counters the yield keyword.
... function* makerangeiterator(start = 0, end = 100, step = 1) { let iteration
count = 0; for (let i = start; i < end; i += step) { iteration
count++; yield i; } return iteration
count; } iterables an object is iterable if it defines its iteration behavior, such as what values are looped over in a for...of construct.
Loops and iteration - JavaScript
this expression usually initializes one or more loop
counters, but the syntax allows an expression of any degree of complexity.
... example in the example below, the function contains a for statement that
counts the number of selected options in a scrolling list (a <select> element that allows multiple selections).
...if continue is en
countered, the program terminates the current iteration of checkj and begins the next iteration.
... each time continue is en
countered, checkj reiterates until its condition returns false.
Memory Management - JavaScript
reference-
counting garbage collection this is the most naive garbage collection algorithm.
...however, the reference-
counting algorithm will not consider them reclaimable since each of the two objects has at least one reference pointing to them, resulting in neither of them being marked for garbage collection.
... function f() { var x = {}; var y = {}; x.a = y; // x references y y.a = x; // y references x return 'azerty'; } f(); real-life example internet explorer 6 and 7 are known to have reference-
counting garbage collectors for dom objects.
...if the property is not explicitly removed or nulled, a reference-
counting garbage collector will always have at least one reference intact and will keep the dom element in memory even if it was removed from the dom tree.
Intl.NumberFormat() constructor - JavaScript
possible values are: "symbol" to use a localized currency symbol such as €, this is the default value, "narrowsymbol" to use a narrow format symbol ("$100" rather than "us$100"), "code" to use the iso currency code, "name" to use a localized currency name such as "dollar", currencysign in many locales, ac
counting format means to wrap the number with parentheses instead of appending a minus sign.
... you can enable this formatting by setting the currencysign option to "ac
counting".
... let amount = -3500; new intl.numberformat('en-us', {style: 'currency', currency: 'usd'}).format(amount); // → '-$3,500.00' new intl.numberformat('bn', { style: 'currency', currency: 'usd', currencydisplay: 'name' }).format(amount); // → '-3,500.00 us dollars' new intl.numberformat('bn', { style: 'currency', currency: 'usd', currencysign: 'ac
counting' }).format(amount); // → '($3,500.00)' scientific, engineering or compact notations scientific and compact notation are represented by the notation option and can be formatted like this: new intl.numberformat('en-us', { notation: "scientific" }).format(987654321); // → 9.877e8 new intl.numberformat('pt-pt', { notation: "scientific" }).format(987654321); // → 9,877e8 new intl.numbe...
... }).format(987654321); // → 988 millions new intl.numberformat('en-gb', { notation: "compact", compactdisplay: "short" }).format(987654321); // → 988m displaying signs display a sign for positive and negative numbers, but not zero: new intl.numberformat("en-us", { style: "percent", signdisplay: "exceptzero" }).format(0.55); // → '+55%' note that when the currency sign is "ac
counting", parentheses might be used instead of a minus sign: new intl.numberformat('bn', { style: 'currency', currency: 'usd', currencysign: 'ac
counting', signdisplay: 'always' }).format(-3500); // → '($3,500.00)' specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.numberformat constructor' in that specification.
Promise - JavaScript
it creates a promise that will be fulfilled, using window.settimeout(), to the promise
count (number starting from 1) every 1-3 seconds, at random.
... "use strict"; var promise
count = 0; function testpromise() { let thispromise
count = ++promise
count; let log = document.getelementbyid('log'); // begin log.insertadjacenthtml('beforeend', thispromise
count + ') started (sync code started)'); // we make a new promise: we promise a numeric
count of this promise, starting from 1 (after waiting 3s) let p1 = new promise((resolve, reject) => { // the executor function is called with the ability to resolve or reject the promise log.insertadjacenthtml('beforeend', this...
...promise
count + ') promise started (async code started)'); // this is only an example to create asynchronism window.settimeout(function() { // we fulfill the promise !
... resolve(thispromise
count); }, math.random() * 2000 + 1000); }); // we define what to do when the promise is resolved with the then() call, // and what to do when the promise is rejected with the catch() call p1.then(function(val) { // log the fulfillment value log.insertadjacenthtml('beforeend', val + ') promise fulfilled (async code terminated)'); }).catch((reason) => { // log the rejection reason console.log(`handle rejected promise (${reason}) here.`); }); // end log.insertadjacenthtml('beforeend', thispromise
count + ') promise made (sync code terminated)'); } if ("promise" in window) { let btn = document.getelementbyid("btn"); btn.addeventlistener("click",testpromise); } else { log = document.getelementbyid('log'); log.innerhtml = "l...
delete operator - JavaScript
adminname = 'xyz'; // creates the property emp
count on the global scope.
...var emp
count = 43; employeedetails = { name: 'xyz', age: 5, designation: 'developer' }; // adminname is a property of the global scope.
...delete adminname; // returns true // on the contrary, emp
count is not configurable // since var was used.
... delete emp
count; // returns false // delete can be used to remove properties from objects.
Content type - SVG: Scalable Vector Graphics
the grammar for clock values is repeated here: clock-val ::= full-clock-val | partial-clock-val | time
count-val full-clock-val ::= hours ":" minutes ":" seconds ("." fraction)?
...time
count-val ::= time
count ("." fraction)?
...metric ::= "h" | "min" | "s" | "ms" hours ::= digit+; any positive number minutes ::= 2digit; range from 00 to 59 seconds ::= 2digit; range from 00 to 59 fraction ::= digit+ time
count ::= digit+ 2digit ::= digit digit digit ::= [0-9] for time
count values, the default metric suffix is "s" (for seconds).
... the following are examples of legal clock values: full clock values: 02:30:03 = 2 hours, 30 minutes and 3 seconds 50:00:10.25 = 50 hours, 10 seconds and 250 milliseconds partial clock value: 02:33 = 2 minutes and 33 seconds 00:10.5 = 10.5 seconds = 10 seconds and 500 milliseconds time
count values: 3.2h = 3.2 hours = 3 hours and 12 minutes 45min = 45 minutes 30s = 30 seconds 5ms = 5 milliseconds 12.467 = 12 seconds and 467 milliseconds fractional values are just (base 10) floating point definitions of seconds.
Introduction to using XPath in JavaScript - XPath
numbervalue stringvalue booleanvalue example the following uses the xpath expression
count(//p) to obtain the number of <p> elements in an html document: var paragraph
count = document.evaluate( '
count(//p)', document, null, xpathresult.any_type, null ); alert( 'this document contains ' + paragraph
count.numbervalue + ' paragraph elements' ); although javascript allows us to convert the number to a string for display, the xpath interface will not automatically convert the numerical r...
...esult if the stringvalue property is requested, so the following code will not work: var paragraph
count = document.evaluate('
count(//p)', document, null, xpathresult.any_type, null ); alert( 'this document contains ' + paragraph
count.stringvalue + ' paragraph elements' ); instead, it will return an exception with the code ns_dom_type_error.
... <?xml version="1.0"?> <people xmlns:xul = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" > <person> <name first="george" last="bush" /> <address street="1600 pennsylvania avenue" city="washington"
country="usa"/> <phonenumber>202-456-1111</phonenumber> </person> <person> <name first="tony" last="blair" /> <address street="10 downing street" city="london"
country="uk"/> <phonenumber>020 7925 0918</phonenumber> </person> </people> to make the contents of the xml document available within the extension, we create an xmlhttprequest object to load the document synchronously, the variable ...
...this is useful for example, in an xpath expression using the
count() function.
l10n - Archive of obsolete content
globals functions get(identifier,
count, placeholder1...n) this function takes a string parameter which it uses as an identifier to look up and return a localized string in the locale currently set for firefox.
...
count : integer optional parameter.
...if you do not include the
count parameter, you can supply one or more placeholder strings that are to be inserted into the translated string at locations defined by the translator.
Extension Versioning, Update and Compatibility - Archive of obsolete content
(note the button caption is changed to hide information) problems you may en
counter a problem where the content will not be displayed.
...unfortunately, i've en
counter cases where adding the mime type to the server didnt help either.
...to enable the log: set the value of extensions.logging.enabled to true (using url about:config) run firefox from command with option -console if you en
counter problems, search the output in console for your extension id, and see if failures were logged.
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
for example, imagine a web form where users have to choose their city, by first selecting
country then state.
... for example, imagine a web form where users have to choose their city, by first selecting
country then state.
...in general, when a webmail ac
count has more than a few messages, clicking 'next page' sends a request to the server.
Mozilla Crypto FAQ - Archive of obsolete content
you do not need to provide such notification in any case, but you may need to take other actions to comply with laws and regulations in your own
country concerning encryption technologies.
...the latest in a series of annual surveys of government policies relating to encryption, covering over a hundred
countries.
...an in-depth (but badly outdated) discussion of the legal framework for regulation of cryptography in various
countries around the world, including the u.s.
The new nsString class implementation (1999) - Archive of obsolete content
static void ensurecapacity(nsstrimpl& astring,pruint32 anewlength); static void growcapacity(nsstrimpl& astring,pruint32 anewlength); static void append(nsstrimpl& adest,const nsstrimpl& asource,pruint32 anoffset,print32 a
count); static void appendcstring(nsstrimpl& adest,const char* asource,pruint32 anoffset,print32 a
count); static void assign(nsstrimpl& adest,const nsstrimpl& asource,pruint32 anoffset,print32 a
count); static void assigncstring(nsstrimpl& adest,const char* asource,pruint32 anoffset,print32 a
count); // assign a char or a substring into the existing string...
... static void insert(nsstrimpl& adest,pruint32 adestoffset, const nsstrimpl& asource,pruint32 asrcoffset,print32 a
count); static void insertcstring(nsstrimpl& adest,pruint32 adestoffset, const char* asource,pruint32 asrcoffset,print32 a
count); static void insertchar(nsstrimpl& adest,pruint32 adestoffset,char thechar); static void insertchar(nsstrimpl& adest,pruint32 adestoffset,prunichar theunichar); static void insertchar(nsstrimpl& adest,pruint32 adestoffset,print32 thequadchar); static void delete(nsstrimpl& adest,pruint32 adestoffset,pruint32 a
count); static void truncate(nsstrimpl& adest,pruint32 adestoffset); static print32 compare(const nsstrimpl& adest,const nsstrimpl& asource, print32 a
count,pr...
...this is the most generic approach, but offers reference
counted strings.
Using addresses of stack variables with NSPR threads on win16 - Archive of obsolete content
the simplest demonstration of the problem is as follows: typedef struct shareddata { prlock *ml; prcondvar *cv; print32
counter; } shareddata; static void forkedthread(void *arg) { shareddata *shared = (shareddata*)arg; while (--shared->
counter > 0) pr_waitcondvar(shared->cv, pr_interval_no_timeout); return; } /* forkedthread */ printn main(printn argc, char **argv) { prthread *thread; shareddata shared; shared.ml = pr_newlock(); shared.cv = pr_newcondvar(shared.ml); shared.cou...
...nter = 10; thread = pr_createthread( pr_user_thread, forkedthread, &shared, pr_priority_normal, pr_local_thread, pr_joinable_thread, 0); do { pr_sleep(pr_secondstointerval(1)); pr_lock(shared.ml); if (0 == shared.
counter) break; pr_notifycondvar(shared.cv); pr_unlock(shared.ml); } while (pr_true); rv = pr_jointhread(thread); return (pr_success == rv) ?
...it's difficult to tell exaclty where the updated <tt>
counter</tt> is being stored.
Elements - Archive of obsolete content
d phase (capturing|bubbling|target) #implied button (1|2|3) #implied modifiers cdata #implied keycode cdata #implied key cdata #implied charcode cdata #implied click
count (1|2|3) #implied command id #implied preventdefault false|true #implied > the handler element describes a single event handler.
... click
count - the click
count attribute imposes a filter on the handler.
...the event handler will only be matched if the value of the click
count field in the dom mouse event object matches the value of the attribute.
Custom Tree Views - Archive of obsolete content
row
count this property should be set to the total number of rows in the tree.
... here is an example of defining such as object, which can be called whatever you want: //moz 1.8 var treeview = { row
count : 10000, getcelltext : function(row,column){ if (column.id == "namecol") return "row "+row; else return "february 18"; }, settree: function(treebox){ this.treebox = treebox; }, iscontainer: function(row){ return false; }, isseparator: function(row){ return false; }, issorted: function(){ return false; }, getlevel: function(row){ return 0; }, getimagesrc...
... example custom tree source <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window title="tree example" id="tree-window" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="setview();"> <script> //moz 1.8 var treeview = { row
count : 10000, getcelltext : function(row,column){ if (column.id == "namecol") return "row "+row; else return "february 18"; }, settree: function(treebox){ this.treebox = treebox; }, iscontainer: function(row){ return false; }, isseparator: function(row){ return false; }, issorted: function(){ return false; }, getlevel: function(row){ return 0; }, getimagesrc...
calICalendarView - Archive of obsolete content
ender; attribute calicalendarviewcontroller controller; void showdate(in calidatetime adate); void setdaterange(in calidatetime astartdate, in calidatetime aenddate); readonly attribute calidatetime startdate; readonly attribute calidatetime enddate; readonly attribute boolean supportsdisjointdates; readonly attribute boolean hasdisjointdates; void setdatelist(in unsigned long a
count, [array,size_is(a
count)] in calidatetime adates); void getdatelist(out unsigned long a
count, [array,size_is(a
count),retval] out calidatetime adates); attribute caliitembase selecteditem; attribute calidatetime selectedday; attributes displaycalendar the displaycalendar is an implementation of the calicalendar interface.
...(for instance, calendar-month-view will show all dates from the start of the week of astartdate to the end of the week of aenddate.) setdatelist void setdatelist(in unsigned long a
count, [array,size_is(a
count)] in calidatetime adates); this function can only be called if supportsdisjointdates is true and will throw an error if it is not.
... getdatelist void getdatelist(out unsigned long a
count, [array,size_is(a
count),retval] out calidatetime adates); this function returns a list of all dates currently being shown in the view.
NPClass - Archive of obsolete content
deallocate called by npn_releaseobject() when an object's reference
count reaches zero.
...ef npobject *(*npallocatefunctionptr)(npp npp, npclass *aclass); typedef void (*npdeallocatefunctionptr)(npobject *npobj); typedef void (*npinvalidatefunctionptr)(npobject *npobj); typedef bool (*nphasmethodfunctionptr)(npobject *npobj, npidentifier name); typedef bool (*npinvokefunctionptr)(npobject *npobj, npidentifier name, const npvariant *args, uint32_t arg
count, npvariant *result); typedef bool (*npinvokedefaultfunctionptr)(npobject *npobj, const npvariant *args, uint32_t arg
count, npvariant *result); typedef bool (*nphaspropertyfunctionptr)(npobject *npobj, npidentifier name); typedef bool ...
... typedef bool (*npsetpropertyfunctionptr)(npobject *npobj, npidentifier name, const npvariant *value); typedef bool (*npremovepropertyfunctionptr)(npobject *npobj, npidentifier name); typedef bool (*npenumerationfunctionptr)(npobject *npobj, npidentifier **value, uint32_t *
count); typedef bool (*npconstructfunctionptr)(npobject *npobj, const npvariant *args, uint32_t arg
count, npvariant *result); see also npobject ...
NPN_ReleaseObject - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary decrements the reference
count of the given npobject.
... if the reference
count reaches 0, the npobject is deallocated by calling its deallocate function if one is provided; if one is not provided, free() is used.
... syntax #include <npruntime.h> void npn_releaseobject(npobject *npobj); parameters the function has the following parameter: <tt>npobj</tt> the npobject whose reference
count should be decremented.
Theme changes in Firefox 4 - Archive of obsolete content
overriding the default values themes can override the value of the iconsize attribute on each toolbar by specifying a special value for the
counter-reset css property on the toolbar itself.
... css property on the toolbar element value forced on the iconsize attribute
counter-reset: largeicons; large
counter-reset: smallicons; small for toolbars in the upper part of the window, the
counter-reset property can be set using a css rule that is applied depending on the user preference in the toolbar customization palette.
...thus, it includes this rule in browser.css: #nav-bar {
counter-reset: smallicons; } to use large icons for add-on buttons in the bookmarks toolbar when the related user preference is set: #navigator-toolbox[iconsize="large"] > #personaltoolbar {
counter-reset: largeicons; } to use large icons everywhere, including the menu bar, regardless of the user preference: #navigator-toolbox > toolbar, #addon-bar {
counter-reset: largeicons; } creating a ...
Anatomy of a video game - Game development
high resolution time, on the other hand,
counts the number of milliseconds since navigationstart (when the previous document is unloaded).
...this (non-web) case study made a few assumptions and tradeoffs: each frame of animation ac
counts for user input.
... you can
count on all users updating non-cosmetic variables at the same constant frequency minus hiccups.
Audio for Web games - Game development
this means you will have to structure your audio playback to take ac
count of that.
...the "
countdown.mp3" mp3 file consists of a number being spoken every 2 seconds, the idea being that we play back that number when the corresponding button is pressed.
...you'll need to take ac
count of the time between creating an audio context and when the first audio track starts playing.
The box model - Learn web development
when you move on to learn about css layout in more detail, you will en
counter flex, and various other inner values that your boxes can have, for example grid.
... you will en
counter things like flex layout later in these lessons; the key thing to remember for now is that changing the value of the display property can change whether the outer display type of a box is block or inline, which changes the way it displays alongside other elements in the layout.
... note: the margin is not
counted towards the actual size of the box — sure, it affects the total space that the box will take up on the page, but only the space outside the box.
Responsive design - Learn web development
multicol the oldest of these layout methods is multicol — when you specify a column-
count, this indicates how many columns you want your content to be split into.
... .container { column-
count: 3; } if you instead specify a column-width, you are specifying a minimum width.
...by changing the values for flex-grow and flex-shrink you can indicate how you want the items to behave when they en
counter more or less space around them.
What is a Domain Name? - Learn web development
for example: local tlds such as .us, .fr, or .se can require the service to be provided in a given language or hosted in a certain
country — they are supposed to indicate a resource in a particular language or
country.
...registrar iana id: 292 whois server: referral url: domain status: clientdeleteprohibited domain status: clienttransferprohibited domain status: clientupdateprohibited registrant id:mmr-33684 registrant name:dns admin registrant organization:mozilla foundation registrant street: 650 castro st ste 300 registrant city:mountain view registrant state/province:ca registrant postal code:94041 registrant
country:us registrant phone:+1.6509030800 as you can see, i can't register mozilla.org because the mozilla foundation has already registered it.
...make sure you fill it properly, since in some
countries registrars may be forced to close the domain if they cannot provide a valid address.
Client-side form validation - Learn web development
forcing our users to enter secure passwords makes it easier to protect their ac
count information.
... different types of client-side validation there are two different types of client-side validation that you'll en
counter on the web: built-in form validation uses html5 form validation features, which we've discussed in many places throughout this module.
...a better user experience than just using maxlength is to also provide character
count feedback in an accessible manner and let them edit their content down to size.
Basic math in JavaScript — numbers and operators - Learn web development
you may have en
countered these numbers before when setting colors in css.
...we used ++ in our "guess the number" game back in our first splash into javascript article, when we added 1 to our guess
count variable to keep track of how many guesses the user has left after each turn.
... guess
count++; note: these operators are most commonly used in loops, which you'll learn about later on in the course.
Using Vue computed properties - Learn web development
previous overview: client-side javascript frameworks next in this article we'll add a
counter that displays the number of completed todo items, using a feature of vue called computed properties.
... using computed properties the aim here is to add a summary
count of our to-do list.
... adding a summary
counter add the following code to your app component object, below the methods property.
Handling common accessibility problems - Learn web development
there are a few other considerations you should take into ac
count.
... finding help there are many other issues you'll en
counter with accessibility; the most important thing to know really is how to find answers online.
... summary hopefully this article has given you a good grounding in the main accessibility problems you might en
counter, and how to test and overcome them.
Handling common HTML and CSS problems - Learn web development
if a browser en
counters a declaration or rule it doesn't understand, it just skips it completely without applying it or throwing an error.
...you can find a detailed ac
count of such practices in the building blocks of responsive design.
... finding help there are many other issues you'll en
counter with html and css, making knowledge of how to find answers online invaluable.
Handling common JavaScript problems - Learn web development
javascript is not as permissive as html and css however — if the javascript engine en
counters mistakes or unrecognized syntax, more often than not it will throw errors.
... note: again, there are many different ways to make use of the different polyfills you will en
counter — consult each polyfill's individual documentation.
... finding help there are many other issues you'll en
counter with javascript; the most important thing to know really is how to find answers online.
Deploying our app - Learn web development
we've not en
countered branches at all, but the (terribly named) "master" branch is the default place for our work and it's what git starts on.
... depending on whether you authorized netlify before, you might need to authorize netlify with github, and choose what ac
count you want to authorize it for (if you have multiple github ac
counts or orgs).
... since we've connected netlify to our github ac
count and given it access to deploy the project repository, netlify will ask how to prepare the project for deployment and what to deploy.
Introducing a complete toolchain - Learn web development
you will need to create ac
counts with each of github and netlify if you wish to complete the tutorial.
... once you've signed up for github (click the sign up link on the homepage if you don't already have an ac
count, and follow the instructions), you can use your github ac
count for authentication on netlify (click sign up, then choose github from the "sign up with one of the following" list), so technically you only need to create one new ac
count.
... later on you'll need to connect your netlify ac
count to your github repository to deploy this project; we'll see how to do that in the next chapter.
Gecko info for Windows accessibility vendors
iaccessible methods that we support: get_accparent get_accchild
count get_accchild get_accname get_accvalue get_accdescription get_accrole get_accstate get_accfocus get_accdefaultaction acclocation accselect acchittest accdodefaultaction accnavigate get_acckeyboardshortcut msaa support: iaccessible events and unique id's what msaa events do we support?
...this makes it important to check the state_readonly flag when en
countering a role_list, because the html list form element also uses role_list, but without state_readonly set.
... dhtml accessibility is supported this means that you may en
counter roles that are not typically in html content.
Multiprocess on Windows
this index must take into ac
count the vtable(s) of parent interfaces.
...as you should already know, you can't directly touch a com object's reference
count unless you're already inside the apartment which contains that object.
... interceptortargetptr<t> no-op deleter: used to annotate pointers whose reference
counts must never be touched.
Eclipse CDT
to rebuild for changes in an individual directory (for example, to take ac
count of some changes that you yourself made) select "index > freshen all files" on that directory.
... headers are only parsed once for performance reasons, eclipse only processes header files that have include guards once, using the compiler options for the first source file it en
counters that includes that header (eclipse bug 380511).
... troubleshooting here is a list of problems people have en
countered, and suggestions for solutions.
Message manager overview
its most important functions and attributes are: child
count : contains the number of children (typically, browser windows) getchildat() : get the child at the given index loadframescript() : load a frame script into every tab in the browser broadcastasyncmessage() : send a message to frame scripts addmessagelistener() : start listening to a specific message from all frame scripts removemessagelistener() : stop listening to a speci...
... its most important functions and attributes are: child
count : contains the number of children (typically, browser tabs) getchildat() : get the child at the given index loadframescript() : load a frame script into every tab in this window broadcastasyncmessage() : send a message to all frame scripts in this window addmessagelistener() : start listening to a specific message from frame scripts removemessagelistener() : stop listenin...
... its most important functions and attributes are: child
count : contains the number of children (child processes, plus the in-content child) getchildat() : get the child at the given index loadprocessscript() : load a process script into every content process broadcastasyncmessage() : send a message to all process scripts addmessagelistener() : start listening to a specific message from process scripts removemessagelistener() : stop...
IPDL Best Practices
implement (preferably reference
counted) classes to wrap the shared data instead of letting several objects reference surfacedescriptors or their content directly.
... reference
counting protocol actors is tricky here is the easiest way to get it right the first time (lessons learned from the http channel and geolocation protocols): allocpprotocol calls addref deallocpprotocol calls release this ensures that the actor will not disappear from under ipdl, and that you won't get bizarre crashes at other times if ipdl deletes the protocol tree.
...calling ipdl functions willy-nilly let's say you have an object that implements an ipdl interface, but it also outlives it (case in point: reference-
counted).
IPDL Tutorial
}; in some cases, however, external code may hold references to actor implementations which require ref
counting or other lifetime strategies.
...here is an example of ref
counting: class examplechild : public nsiobserver, public pexamplechild { ...
...xamplechild*> actor = new examplechild(); return actor.forget(); } virtual bool toplevelchild::deallocpexample(pexamplechild* actor) { ns_release(static_cast<examplechild*>(actor)); return true; } if an object that implements a protocol can't be constructed inside allocpfoo, has been previously constructed and doesn't require an ipdl connection throughout its lifetime, or implements a ref
counted protocol where the first form of constructor is not available, there is a second form of sendpfooconstructor which can be used: class examplechild { public: void dosomething() { amanagerchild->sendpexampleconstructor(this, ...); } }; internally, the first constructor form simply calls pexample(parent|child)* actor = allocpexample(...); sendpexampleconstructor(actor, ...); re...
Internationalized Domain Names (IDN) Support in Mozilla Browsers
icann = internet corporation for assigned names and numbers.) the guideline allows domain name registrars in each
country to limit the use of characters for domain names.
... since the unicode repertoire contains characters no longer used in any living languages and there are also living characters in most languages that are not suitable for uri/url creation, the icann guideline allows the governing body of each
country's domain registrars to set appropriate limitations on the use of characters.
...some
country will complete the conversion quickly, e.g.
Release phase
this should be your mozilla ldap ac
count name.
... add the following lines to your ~/.ssh/config file, replacing user@host.domain with your mozilla ldap ac
count name: host hg.mozilla.org user user@host.domain if you have already cloned the remote repository using the http protocol using this command: $ hg clone http://hg.mozilla.org/releases/l10n-central/x-testing then you will need to edit the .hg/hgrc file (inside the x-testing local clone) to tell mercurial to push using ssh.
...this should be your mozilla ldap ac
count name.
Mozilla projects on GitHub
getting started you can look at code on github without an ac
count.
...to do more—to contribute to the code, or to fork it and start your own project based on mozilla-related code—you need a github ac
count.
... to learn more about setting up a github ac
count, visit the github website.
Power profiling overview
these values are computed using a power model that uses processor-internal
counts as inputs, and they have been verified as being fairly accurate.
... standard performance profiling tools that measure cpu usage or proxies of cpu usage (such as instruction
counts) typically provide high-context measurements.
... for high wakeup
counts, use dtrace or perf or timerfirings logging.
dtrace
sudo dtrace -n 'mach_kernel::wakeup { @[ustack()] =
count(); }' -p $firefox_pid > $output_file let's break that down further.
... the above code
counts unique stack traces when wakeups occur; ustack is short for "user stack", i.e.
...dtrace will then print to the output file a number of stack traces, along with a wakeup
count for each one.
A guide to searching crash reports
the columns show each group's rank, signature, size (both a
count and a proportion of matching crash reports), and finally a list of bugs that have been marked as relating to this signature.
...the first group has over 100,000 crash reports, which ac
counts for 7.77% of all matching crashes.
... in this example the top 10 groups ac
count for less than 12% of all crashes, and there is an extremely long tail.
Leak And Bloat Tests
results printed on tinderbox output, these consist of: mail rlk reference
count leaks mail lk total bytes malloc'ed and not free'd mail mh maximum heap size mail a allocations - number of calls to malloc and friends.
...les (used to drive the tests): bloat/bloataddroverlay.js bloat/bloatcomposeoverlay.js bloat/bloatmainoverlay.js preference settings (used to provide a defined profile, see below): common/mailnewstestprefs.js python scripts (used to set up the profile and run the test): bloat/setupbloattest.py bloat/runtest.py common/setupcommonmailnews.py pre-defined profile initial setup: one pop3 ac
count (mails tbd) one identity one smtp server defined (not used) future requirements/possibilities: one address book where pab has ~1000 entries large message folders imap nntp server and subscribed newsgroup.
...user_pref("mail.ac
count.ac
count1.server", "server1"); user_pref("mail.ac
count.ac
count2.identities", "id1"); user_pref("mail.ac
count.ac
count2.server", "server2"); user_pref("mail.ac
countmanager.ac
counts", "ac
count1,ac
count2"); user_pref("mail.ac
countmanager.defaultac
count", "ac
count2"); user_pref("mail.ac
countmanager.localfoldersserver", "server1"); user_pref("mail.identity.id1.fullname", "tinderbox"); user_pref("mail.identity.id1.smtpserver", "smtp1"); user_pref("mail.identity.id1.useremail", "tinderbox@invalid.com"); user_pref("mail.identity.id1.valid", true); user_pref("mail.root.none-rel", "[profd]mail"); user_pre...
Interval Timing
conceptually, they are based on free-running
counters that increment at a fixed rate without possibility of outside influence (as might be observed if one was using a time-of-day clock that gets reset due to some administrative action).
... the
counters have no fixed epoch and have a finite period.
... to make use of these
counters, the application must declare a point in time, the epoch, and an amount of time elapsed since that epoch, the interval.
PR_CExitMonitor
decrement the entry
count associated with a cached monitor.
... description using the value specified in the address parameter to find a monitor in the monitor cache, pr_cexitmonitor decrements the entry
count associated with the monitor.
... if the decremented entry
count is zero, the monitor is exited.
PR_EnterMonitor
if the monitor's entry
count is greater than zero and the calling thread is recognized as the holder of the lock, pr_entermonitor increments the entry
count by one and returns.
... if the entry
count is greater than zero and the calling thread is not recognized as the holder of the lock, the thread is blocked until the entry
count reaches zero.
... when the entry
count reaches zero (or if it is already zero), the entry
count is incremented by one and the calling thread is recorded as the lock's holder.
NSS Code Coverage
numbers in total
count example: total: 42% (574/1351).
... these numbers doesn't
count blocks in files which are not tested (marked with red color), because we don't know number of blocks there.
... total
count at the end of report
counts blocks in all tested files in all directories.
Encrypt Decrypt MAC Keys As Session Objects
rfiledesc* infile; prfiledesc* outfile; unsigned char decbuf[64]; unsigned int decbuflen; unsigned char ptext[blocksize]; unsigned int ptextlen = 0; unsigned char ctext[64]; unsigned int ctextlen; unsigned char newmac[digestsize]; unsigned int newmaclen = 0; unsigned int newptextlen = 0; unsigned int
count = 0; unsigned int temp = 0; unsigned int blocknumber = 0; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned char iv[blocksize]; unsigned int ivlen = ivitem->len; unsigned int filelength; unsigned int paddinglength; int j; memc...
... pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", outfilename); return secfailure; } rv = macinit(ctxmac); if (rv != secsuccess) goto cleanup; ctxenc = decryptinit(ek, iv, ivlen, ckm_aes_cbc); filelength = filesize(encryptedfilename); while ((ctextlen = pr_read(infile, ctext, sizeof(ctext))) > 0) {
count += ctextlen; /* decrypt cipher text buffer using cbc and iv */ rv = decrypt(ctxenc, decbuf, &decbuflen, sizeof(decbuf), ctext, ctextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "decrypt failure\n"); goto cleanup; } if (decbuflen == 0) break; rv = macupdate(ctxmac, decbuf, decbuflen); i...
...f (rv != secsuccess) { goto cleanup; } if (
count == filelength) { decbuflen = decbuflen-paddinglength; } /* write the plain text to out file */ temp = pr_write(outfile, decbuf, decbuflen); if (temp != decbuflen) { pr_fprintf(pr_stderr, "write error\n"); rv = secfailure; break; } /* save last block of ciphertext */ memcpy(iv, decbuf, decbuflen); ivlen = decbuflen; blocknumber++; } if (rv != secsuccess) { goto cleanup; } rv = macfinal(ctxmac, newmac, &newmaclen, sizeof(newmac)); if (rv != secsuccess) { goto cleanup; } if (port_memcmp(macitem->data, newmac, newmaclen) == 0) { rv = secsuccess; } else { pr_fprintf(pr_stderr, "che...
Encrypt and decrypt MAC using token
rfiledesc* infile; prfiledesc* outfile; unsigned char decbuf[64]; unsigned int decbuflen; unsigned char ptext[blocksize]; unsigned int ptextlen = 0; unsigned char ctext[64]; unsigned int ctextlen; unsigned char newmac[digestsize]; unsigned int newmaclen = 0; unsigned int newptextlen = 0; unsigned int
count = 0; unsigned int temp = 0; unsigned int blocknumber = 0; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned char iv[blocksize]; unsigned int ivlen = ivitem->len; unsigned int filelength; unsigned int paddinglength; int j; memc...
... pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", outfilename); return secfailure; } rv = macinit(ctxmac); if (rv != secsuccess) goto cleanup; ctxenc = decryptinit(ek, iv, ivlen, ckm_aes_cbc); filelength = filesize(encryptedfilename); while ((ctextlen = pr_read(infile, ctext, sizeof(ctext))) > 0) {
count += ctextlen; /* decrypt cipher text buffer using cbc and iv */ rv = decrypt(ctxenc, decbuf, &decbuflen, sizeof(decbuf), ctext, ctextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "decrypt failure\n"); goto cleanup; } if (decbuflen == 0) break; rv = macupdate(ctxmac, decbuf, decbuflen); i...
...f (rv != secsuccess) { goto cleanup; } if (
count == filelength) { decbuflen = decbuflen-paddinglength; } /* write the plain text to out file */ temp = pr_write(outfile, decbuf, decbuflen); if (temp != decbuflen) { pr_fprintf(pr_stderr, "write error\n"); rv = secfailure; break; } /* save last block of ciphertext */ memcpy(iv, decbuf, decbuflen); ivlen = decbuflen; blocknumber++; } if (rv != secsuccess) { goto cleanup; } rv = macfinal(ctxmac, newmac, &newmaclen, sizeof(newmac)); if (rv != secsuccess) { goto cleanup; } if (port_memcmp(macitem->data, newmac, newmaclen) == 0) { rv = secsuccess; } else { pr_fprintf(pr_stderr, "che...
NSS 3.48 release notes
because using an iteration
count higher than 1 with the legacy dbm (key3.db) storage creates files that are incompatible with previous versions of nss, applications that wish to enable it for key3.db are required to set environment variable nss_allow_legacy_dbm_iteration_
count=1.
... applications may set environment variable nss_min_mp_pbe_iteration_
count to request a higher iteration
count than the library's default, or nss_max_mp_pbe_iteration_
count to request a lower iteration
count for test environments.
...cates_token bug 1566126 - power ghash vector acceleration bug 1589073 - use of new pr_assert_arg in certdb.c bug 1590495 - fix a crash in pk11_makecertfromhandle bug 1591742 - ensure des iv length is valid before usage from pkcs#11 bug 1588567 - enable mozilla::pkix gtests in nss ci bug 1591315 - update nsc_decrypt length in constant time bug 1562671 - increase nss mp kdf default iteration
count, by default for modern key4 storage, optionally for legacy key3.db storage bug 1590972 - use -std=c99 rather than -std=gnu99 bug 1590676 - fix build if arm doesn't support neon bug 1575411 - enable tls extended master secret by default bug 1590970 - ssl_settimefunc has incomplete coverage bug 1590678 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1588244 - nss changes for delegat...
Encrypt Decrypt_MAC_Using Token
rfiledesc* infile; prfiledesc* outfile; unsigned char decbuf[64]; unsigned int decbuflen; unsigned char ptext[blocksize]; unsigned int ptextlen = 0; unsigned char ctext[64]; unsigned int ctextlen; unsigned char newmac[digestsize]; unsigned int newmaclen = 0; unsigned int newptextlen = 0; unsigned int
count = 0; unsigned int temp = 0; unsigned int blocknumber = 0; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned char iv[blocksize]; unsigned int ivlen = ivitem->len; unsigned int filelength; unsigned int paddinglength; int j; memc...
... pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", outfilename); return secfailure; } rv = macinit(ctxmac); if (rv != secsuccess) goto cleanup; ctxenc = decryptinit(ek, iv, ivlen, ckm_aes_cbc); filelength = filesize(encryptedfilename); while ((ctextlen = pr_read(infile, ctext, sizeof(ctext))) > 0) {
count += ctextlen; /* decrypt cipher text buffer using cbc and iv.
... */ rv = decrypt(ctxenc, decbuf, &decbuflen, sizeof(decbuf), ctext, ctextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "decrypt failure\n"); goto cleanup; } if (decbuflen == 0) break; rv = macupdate(ctxmac, decbuf, decbuflen); if (rv != secsuccess) { goto cleanup; } if (
count == filelength) { decbuflen = decbuflen-paddinglength; } /* write the plain text to out file.
NSS Sample Code Sample_3_Basic Encryption and MACing
rfiledesc* infile; prfiledesc* outfile; unsigned char decbuf[64]; unsigned int decbuflen; unsigned char ptext[blocksize]; unsigned int ptextlen = 0; unsigned char ctext[64]; unsigned int ctextlen; unsigned char newmac[digestsize]; unsigned int newmaclen = 0; unsigned int newptextlen = 0; unsigned int
count = 0; unsigned int temp = 0; unsigned int blocknumber = 0; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned char iv[blocksize]; unsigned int ivlen = ivitem->len; unsigned int filelength; unsigned int paddinglength; int j; memc...
... pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", outfilename); return secfailure; } rv = macinit(ctxmac); if (rv != secsuccess) goto cleanup; ctxenc = decryptinit(ek, iv, ivlen, ckm_aes_cbc); filelength = filesize(encryptedfilename); while ((ctextlen = pr_read(infile, ctext, sizeof(ctext))) > 0) {
count += ctextlen; /* decrypt cipher text buffer using cbc and iv */ rv = decrypt(ctxenc, decbuf, &decbuflen, sizeof(decbuf), ctext, ctextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "decrypt failure\n"); goto cleanup; } if (decbuflen == 0) break; rv = macupdate(ctxmac, decbuf, decbuflen); i...
...f (rv != secsuccess) { goto cleanup; } if (
count == filelength) { decbuflen = decbuflen-paddinglength; } /* write the plain text to out file */ temp = pr_write(outfile, decbuf, decbuflen); if (temp != decbuflen) { pr_fprintf(pr_stderr, "write error\n"); rv = secfailure; break; } /* save last block of ciphertext */ memcpy(iv, decbuf, decbuflen); ivlen = decbuflen; blocknumber++; } if (rv != secsuccess) { goto cleanup; } rv = macfinal(ctxmac, newmac, &newmaclen, sizeof(newmac)); if (rv != secsuccess) { goto cleanup; } if (port_memcmp(macitem->data, newmac, newmaclen) == 0) { rv = secsuccess; } else { pr_fprintf(pr_stderr, "che...
NSS Sample Code Utilities_1
return pw; case pw_plaintext: return pl_strdup(pwdata->data); default: break; } pr_fprintf(pr_stderr, "password check failed: no password found.\n"); return null; } /* * generaterandom */ secstatus generaterandom(unsigned char *rbuf, int rsize) { char meter[] = { "\r| |" }; int fd,
count; int c; secstatus rv = secsuccess; cc_t orig_cc_min; cc_t orig_cc_time; tcflag_t orig_lflag; struct termios tio; fprintf(stderr, "to generate random numbers, " "continue typing until the progress meter is full:\n\n"); fprintf(stderr, "%s", meter); fprintf(stderr, "\r|"); /* turn off ec...
...ho on stdin & return on 1 char instead of nl */ fd = fileno(stdin); tcgetattr(fd, &tio); orig_lflag = tio.c_lflag; orig_cc_min = tio.c_cc[vmin]; orig_cc_time = tio.c_cc[vtime]; tio.c_lflag &= ~echo; tio.c_lflag &= ~icanon; tio.c_cc[vmin] = 1; tio.c_cc[vtime] = 0; tcsetattr(fd, tcsaflush, &tio); /* get random noise from keyboard strokes */
count = 0; while (
count < rsize) { c = getc(stdin); if (c == eof) { rv = secfailure; break; } *(rbuf +
count) = c; if (
count == 0 || c != *(rbuf +
count -1)) {
count++; fprintf(stderr, "*"); } } rbuf[
count] = '\0'; fprintf(stderr, "\n\nfinished.
... if (c == eof) rv = secfailure; fprintf(stderr, "\n"); /* set back termio the way it was */ tio.c_lflag = orig_lflag; tio.c_cc[vmin] = orig_cc_min; tio.c_cc[vtime] = orig_cc_time; tcsetattr(fd, tcsaflush, &tio); return rv; } /* * seedfromnoisefile */ secstatus seedfromnoisefile(const char *noisefilename) { char buf[2048]; prfiledesc *fd; print32
count; fd = pr_open(noisefilename, pr_rdonly, 0); if (!fd) { fprintf(stderr, "failed to open noise file."); return secfailure; } do {
count = pr_read(fd,buf,sizeof(buf)); if (
count > 0) { pk11_randomupdate(buf,
count); } } while (
count > 0); pr_close(fd); return secsuccess; } /* * filesize */ long filesize(const char* ...
Utilities for nss samples
return pw; case pw_plaintext: return pl_strdup(pwdata->data); default: break; } pr_fprintf(pr_stderr, "password check failed: no password found.\n"); return null; } /* * generaterandom */ secstatus generaterandom(unsigned char *rbuf, int rsize) { char meter[] = { "\r| |" }; int fd,
count; int c; secstatus rv = secsuccess; cc_t orig_cc_min; cc_t orig_cc_time; tcflag_t orig_lflag; struct termios tio; fprintf(stderr, "to generate random numbers, " "continue typing until the progress meter is full:\n\n"); fprintf(stderr, "%s", meter); fprintf(stderr, "\r|"); /* turn off ec...
...ho on stdin & return on 1 char instead of nl */ fd = fileno(stdin); tcgetattr(fd, &tio); orig_lflag = tio.c_lflag; orig_cc_min = tio.c_cc[vmin]; orig_cc_time = tio.c_cc[vtime]; tio.c_lflag &= ~echo; tio.c_lflag &= ~icanon; tio.c_cc[vmin] = 1; tio.c_cc[vtime] = 0; tcsetattr(fd, tcsaflush, &tio); /* get random noise from keyboard strokes */
count = 0; while (
count < rsize) { c = getc(stdin); if (c == eof) { rv = secfailure; break; } *(rbuf +
count) = c; if (
count == 0 || c != *(rbuf +
count -1)) {
count++; fprintf(stderr, "*"); } } rbuf[
count] = '\0'; fprintf(stderr, "\n\nfinished.
... if (c == eof) rv = secfailure; fprintf(stderr, "\n"); /* set back termio the way it was */ tio.c_lflag = orig_lflag; tio.c_cc[vmin] = orig_cc_min; tio.c_cc[vtime] = orig_cc_time; tcsetattr(fd, tcsaflush, &tio); return rv; } /* * seedfromnoisefile */ secstatus seedfromnoisefile(const char *noisefilename) { char buf[2048]; prfiledesc *fd; print32
count; fd = pr_open(noisefilename, pr_rdonly, 0); if (!fd) { fprintf(stderr, "failed to open noise file."); return secfailure; } do {
count = pr_read(fd,buf,sizeof(buf)); if (
count > 0) { pk11_randomupdate(buf,
count); } } while (
count > 0); pr_close(fd); return secsuccess; } /* * filesize */ long filesize(const char* ...
FC_GenerateKeyPair
name fc_generatekeypair - generate a new public/private key pair syntax ck_rv fc_generatekeypair( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_attribute_ptr ppublickeytemplate, ck_ulong uspublickeyattribute
count, ck_attribute_ptr pprivatekeytemplate, ck_ulong usprivatekeyattribute
count, ck_object_handle_ptr phpublickey, ck_object_handle_ptr phprivatekey ); parameters hsession [in] session handle.
...uspublickeyattribute
count [in] number of attributes in the public key template.
...usprivatekeyattribute
count [in] number of attributes in the private key template.
NSS Key Functions
when an application makes a copy of a particular certificate or key structure that already exists in memory, ssl makes a shallow copy--that is, it increments the reference
count for that object rather than making a whole new copy.
... when you call cert_destroycertificate or seckey_destroyprivatekey, the function decrements the reference
count and, if the reference
count reaches zero as a result, both frees the memory and sets all the bits to zero.
... the use of the word "destroy" in function names or in the description of a function implies reference
counting.
NSS functions
later cert_getcerttrust mxr 3.2 and later cert_getcertuid mxr 3.2 and later cert_getclassicocspdisabledpolicy mxr 3.12 and later cert_getclassicocspenabledhardfailurepolicy mxr 3.12 and later cert_getclassicocspenabledsoftfailurepolicy mxr 3.12 and later cert_getcommonname mxr 3.2 and later cert_get
countryname mxr 3.2 and later cert_getdbcontentversion mxr 3.2 and later cert_getdefaultcertdb mxr 3.2 and later cert_getdomaincomponentname mxr 3.2 and later cert_getfirstemailaddress mxr 3.7 and later cert_getlocalityname mxr 3.2 and later cert_getnextemailaddress mxr 3.7 and later cert_getnextgen...
...opeddata_addrecipient mxr 3.2 and later nss_cmsenvelopeddata_create mxr 3.2 and later nss_cmsenvelopeddata_destroy mxr 3.2 and later nss_cmsenvelopeddata_getcontentinfo mxr 3.2 and later nss_cmsmessage_contentlevel mxr 3.2 and later nss_cmsmessage_contentlevel
count mxr 3.2 and later nss_cmsmessage_copy mxr 3.2 and later nss_cmsmessage_create mxr 3.2 and later nss_cmsmessage_createfromder mxr 3.2 and later nss_cmsmessage_destroy mxr 3.2 and later nss_cmsmessage_getcontent mxr 3.2 and later nss...
...eddata_getsignerinfo mxr 3.2 and later nss_cmssigneddata_hasdigests mxr 3.2 and later nss_cmssigneddata_importcerts mxr 3.2 and later nss_cmssigneddata_setdigests mxr 3.2 and later nss_cmssigneddata_setdigestvalue mxr 3.4 and later nss_cmssigneddata_signerinfo
count mxr 3.2 and later nss_cmssigneddata_verifycertsonly mxr 3.2 and later nss_cmssigneddata_verifysignerinfo mxr 3.2 and later nss_cmssignerinfo_addmssmimeenckeyprefs mxr 3.6 and later nss_cmssignerinfo_addsmimecaps mxr 3.2 and later nss_cmssignerinfo_addsmimeenc...
sslkey.html
when an application makes a copy of a particular certificate or key structure that already exists in memory, ssl makes a shallow copy--that is, it increments the reference
count for that object rather than making a whole new copy.
... when you call cert_destroycertificate or seckey_destroyprivatekey, the function decrements the reference
count and, if the reference
count reaches zero as a result, both frees the memory and sets all the bits to zero.
... the use of the word "destroy" in function names or in the description of a function implies reference
counting.
ssltyp.html
when an application makes a copy of a particular certificate structure that already exists in memory, ssl makes a shallow copy--that is, it increments the reference
count for that object rather than making a whole new copy.
... when you call cert_destroycertificate, the function decrements the reference
count and, if the reference
count reaches zero as a result, frees the memory.
... the use of the word "destroy" in function names or in the description of a function often implies reference
counting.
Index
29 js::callargs jsapi reference, reference, référence(2), spidermonkey js::callargs is helper class encapsulating access to the callee, this value, arguments, and argument
count for a function call.
...er's job is to clean up any resources allocated by the instance which wouldn't normally be cleaned up by the garbage collector (private data stored in the object by the application, file handles, etc.) 108 jsfreeop jsapi reference, reference, référence(2), spidermonkey various finalization api takes not jscontext * but rather either jsfreeop structure or its library-private
counterpart freeop.
... 507 js_updatemalloc
counter jsapi reference, reference, référence(2), spidermonkey js_updatemalloc
counter decrements malloc
counter of gc and the zone of the context.
Bytecode Descriptions
its use
count of 2 is a lie to make the stack depth math work for this very odd control flow instruction.
...it jumps to the finally block, where jsop::finally again does nothing to the stack, but with a bogus def
count of 2, restoring balance to the ac
counting.
...this has a def
count of 2, but the values are already on the stack (they're actually left on the stack by jsop::gosub).
JS::CompileOptions
to
counter this attack, html5 specifies that script errors should be sanitized ("muted") when the script is not same-origin with the global for which it is loaded.
...the code declaring the instance guarantees that such option values will outlive the compileoptions itself: objects are otherwise rooted; principals have had their reference
counts bumped; strings will not be freed until the compileoptions goes out of scope.
... owningcompileoptions roots / copies / reference
counts of all its values, and unroots / frees / releases them when it is destructed.
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 ...
... +84 70 * (120/100.0) - second bucket weight and followed-link bonus +14 10 * (140/100.0) - fifth bucket weight and bookmarked bonus +14 10 * (140/100.0) - fifth bucket weight and bookmarked bonus -- 252 (4 * 252 / 4) - final frecency score notes the number of sampled visits is min(10 most recent visits pref, total visit
counts).
... the total visit
count includes embedded, undefined, etc visits (does not exclude invalid or embedded visits).
Retrieving part of the bookmarks tree
var rootnode = result.root; rootnode.containeropen = true; // iterate over the immediate children of this folder and dump to console for (var i = 0; i < rootnode.child
count; i ++) { var node = rootnode.getchild(i); dump("child: " + node.title + "\n"); } // close a container after using it!
... rootnode.containeropen = false; if you en
counter a node with a type of result_type_folder or another type of container, you can open these folders and descend into the hierarchy.
... .getservice(components.interfaces.nsinavbookmarksservice); var toolbarfolder = bookmarksservice.toolbarfolder; query.setfolders([toolbarfolder], 1); var result = historyservice.executequery(query, options); var rootnode = result.root; rootnode.containeropen = true; // iterate over the immediate children of this folder and dump to console for (var i = 0; i < rootnode.child
count; i ++) { var node = rootnode.getchild(i); dump("child: " + node.title + "\n"); } // close a container after using it!
Component Internals
it is possible that xpcom will return an error if you access the nsiservicemanager at that point, for example, so you may have to keep a reference-
counted pointer to the service you are interested in using during this notification.
...at last
count there were over 1300 interfaces defined in xpidl.
... the smart pointer class, nscomptr, for example, which makes reference
counting less tedious and error-prone, is not actually frozen, and neither is nsdebug, a class for aiding in tracking down bugs, nor is nsmemory, a class to ensure that everyone uses the same heap, generic factory, and module.
XPCOM hashtable guide
data type hashtable class none (for a hash set) nsthashtable simple types (numbers, booleans, etc) nsdatahashtable structs or classes (nsstring, custom defined structs or classes that are not reference-
counted) nsclasshashtable reference-
counted concrete classes nsrefptrhashtable interface pointers nsinterfacehashtable each of these classes is a template with two parameters.
... key type hashkey class strings nsstringhashkey/nscstringhashkey integers nsuint32hashkey/nsuint64hashkey pointers nsptrhashkey<t> owned interface pointers nsisupportshashkey reference-
counted concrete classes nsrefptrhashkey there are a number of more esoteric hashkey classes in nshashkeys.h, and you can always roll your own if none of these fit your needs (make sure you're not duplicating an existing hashkey class though!) once you've determined what hashtable and hashkey classes you need, you can put it all together.
... a few examples: a hashtable that maps utf-8 origin names to a dom window - nsinterfacehashtable<nscstringhashkey, nsidomwindow> a hashtable that maps 32 bit integers to floats - nsdatahashtable<nsuint32hashkey, float> a hashtable that maps nsisupports pointers to reference
counted cacheentrys - nsrefptrhashtable<nsisupportshashkey, cacheentry> a hashtable that maps jscontext pointers to a contextinfo struct - nsclasshashtable<nsptrhashkey<jscontext>, contextinfo> a hashset of strings - nsthashtable<nsstringhashkey> hashtable api the hashtable classes all expose the same basic api.
XPCOM Stream Guide
if you have an input stream called nativestream, you can use code like this: var stream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); stream.init(nativestream); the stream provides .read(
count), .available(), and .close() methods.
...from the nsistreamlistener interface, the .ondataavailable(request, context, inputstream, offset,
count) method gives you the input stream and the number of bytes available.
... the stream listener must read exactly
count bytes before exiting.
nsAutoRefTraits
nsautoreftraits<t> is a template class describing traits of resources held by objects of class nsautoref<t> and/or ns
countedref<t>.
...addref(t*) is necessary for ns
countedref<t> but not for nsautoref<t>.
...see also nsautoref, ns
countedref ...
amIWebInstallPrompt
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void confirm(in nsidomwindow awindow, in nsiuri auri, [array, size_is(a
count)] in nsivariant ainstalls, [optional] in pruint32 a
count); prior to gecko 8.0, all references to nsidomwindow used in this interface were nsidomwindow.
...void confirm( in nsidomwindow awindow, in nsiuri auri, [array, size_is(a
count)] in nsivariant ainstalls, in pruint32 a
count optional ); parameters awindow the window that triggered the installs.
... a
count optional the number of addoninstalls.
amIWebInstaller
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview boolean installaddonsfromwebpage(in astring amimetype, in nsidomwindow awindow, in nsiuri areferer, [array, size_is(ainstall
count)] in wstring auris, [array, size_is(ainstall
count)] in wstring ahashes, [array, size_is(ainstall
count)] in wstring anames, [array, size_is(ainstall
count)] in wstring aicons, [optional] in amiinstallcallback acallback, [optional] in pruint32 ainstall
count); boolean isinstallenabled(in astring amimetype, in nsiuri areferer); note: prior to gecko 8.0, all references to nsidomwindow ...
...boolean installaddonsfromwebpage( in astring amimetype, in nsidomwindow awindow, in nsiuri areferer, [array, size_is(ainstall
count)] in wstring auris, [array, size_is(ainstall
count)] in wstring ahashes, [array, size_is(ainstall
count)] in wstring anames, [array, size_is(ainstall
count)] in wstring aicons, in amiinstallcallback acallback, optional in pruint32 ainstall
count optional ); parameters amimetype the mimetype for the add-ons.
... ainstall
count optional an optional argument including the number of add-ons to install.
imgIDecoder
method overview void close(); void flush(); void init(in imgiload aload); unsigned long writefrom(in nsiinputstream instr, in unsigned long
count); methods close() closes the stream.
...unsigned long writefrom( in nsiinputstream instr, in unsigned long
count ); parameters instr the stream from which to read the encoded image data.
...
count the maximum number of bytes to write to the image.
mozIPersonalDictionary
ellchecker/personaldictionary;1"] .getservice(components.interfaces.mozipersonaldictionary); method overview void addcorrection(in wstring word,in wstring correction, in wstring lang); void addword(in wstring word, in wstring lang); boolean check(in wstring word, in wstring lang); void endsession(); void getcorrection(in wstring word, [array, size_is(
count)] out wstring words, out pruint32
count); void ignoreword(in wstring word); void load(); void removecorrection(in wstring word,in wstring correction, in wstring lang); void removeword(in wstring word, in wstring lang); void save(); attributes attribute type description wordlist nsistringenumerator get the (lexicographically sorted) list of words.
...void getcorrection( in wstring word, [array, size_is(
count)] out wstring words, out pruint32
count ); parameters word the word to get the list of corrections for.
...
count the number of corrections in the list.
mozIStorageStatement
dex); void bindblobparameter(in unsigned long aparamindex, [array,const,size_is(avaluesize)] in octet avalue, in unsigned long avaluesize); mozistoragependingstatement executeasync(mozistoragestatementcallback acallback); boolean executestep(); boolean step(); void execute(); attributes attribute type description column
count unsigned long number of columns returned.
... parameter
count unsigned long number of parameters.
...finalize will be called for you when the reference
count on the statement goes to zero.
nsIAccessibleTreeCache
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview nsiaccessible getcachedtreeitemaccessible(in long arow, in nsitreecolumn acolumn); void invalidatecache(in long arow, in long a
count); void treeviewchanged(); void treeviewinvalidated(in long astartrow, in long aendrow, in long astartcol, in long aendcol); methods getcachedtreeitemaccessible() returns the tree item from the cache for the cell in the specified row and column; the nsiaccessible is created if it doesn't already exist in the cache.
...void invalidatecache( in long arow, in long a
count ); parameters arow row index the invalidation starts from.
... a
count the number of treeitem accessibles to invalidate, the number sign specifies whether rows have been inserted (plus) or removed (minus) treeviewchanged() invalidates children created for the previous tree view.
nsIApplicationCache
method overview void activate(); void addnamespaces(in nsiarray namespaces); void discard(); void gatherentries(in pruint32 typebits, out unsigned long
count, [array, size_is(
count)] out string keys); nsiapplicationcachenamespace getmatchingnamespace(in acstring key); unsigned long gettypes(in acstring key); void initashandle(in acstring groupid, in acstring clientid); void markentry(in acstring key, in unsigned long typebits); void unmarkentry(in acstring key, in unsigned long typebits); attributes attribute type description active...
...void gatherentries( in pruint32 typebits, out unsigned long
count, [array, size_is(
count)] out string keys ); parameters typebits a bit field indicating the types against which to match.
...
count on return, indicates how many matching entries were found.
nsIApplicationUpdateService
ecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void adddownloadlistener(in nsirequestobserver listener); astring downloadupdate(in nsiupdate update, in boolean background); void pausedownload(); void removedownloadlistener(in nsirequestobserver listener); nsiupdate selectupdate([array, size_is(update
count)] in nsiupdate updates, in unsigned long update
count); attributes attribute type description backgroundchecker nsiupdatechecker the update checker being used for background update checking.
...nsiupdate selectupdate( [array, size_is(update
count)] in nsiupdate updates, in unsigned long update
count ); parameters updates an array of updates that are available to install.
... update
count the number of updates in the updates array.
nsIAsyncInputStream
method overview void asyncwait(in nsiinputstreamcallback acallback, in unsigned long aflags, in unsigned long arequested
count, in nsieventtarget aeventtarget); void closewithstatus(in nsresult astatus); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the oninputstreamready notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due...
...void asyncwait( in nsiinputstreamcallback acallback, in unsigned long aflags, in unsigned long arequested
count, in nsieventtarget aeventtarget ); parameters acallback this object is notified when the stream becomes ready.
...arequested
count wait until at least this many bytes can be read.
nsIAsyncOutputStream
method overview void asyncwait(in nsioutputstreamcallback acallback, in unsigned long aflags, in unsigned long arequested
count, in nsieventtarget aeventtarget); void closewithstatus(in nsresult reason); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the onoutputstreamready notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due...
...void asyncwait( in nsioutputstreamcallback acallback, in unsigned long aflags, in unsigned long arequested
count, in nsieventtarget aeventtarget ); parameters acallback this object is notified when the stream becomes ready.
...arequested
count wait until at least this many bytes can be written.
nsIBlocklistPrompt
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void prompt([array, size_is(a
count)] in nsivariant aaddons, [optional] in pruint32 a
count); methods prompt() prompt the user about newly blocked addons.
...void prompt( [array, size_is(a
count)] in nsivariant aaddons, in pruint32 a
count optional ); parameters aaddons an array of addons and plugins that are blocked.
...objects with properties: name - the plugin or extension name version - the version of the extension or plugin icon - the plugin or extension icon disable - can be used by the nsiblocklistprompt to allows users to decide whether a soft-blocked add-on should be disabled blocked - true if the item is hard-blocked, false otherwise item - the nsiplugintag or addon object a
count optional the number of addons.
nsIClassInfo
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsisupports gethelperforlanguage(in pruint32 language); void getinterfaces(out pruint32
count, [array, size_is(
count), retval] out nsiidptr array); attributes attribute type description classdescription string a human readable string naming the class, or null.
... if this method is not supported by an implementation, then it should return 0 for
count and null for array.
... void getinterfaces( out pruint32
count, [array, size_is(
count), retval] out nsiidptr array ); parameters
count the length of the resulting array.
nsICollection
inherits from: nsiserializable last changed in gecko 1.7 method overview void appendelement(in nsisupports item); void clear(); pruint32
count(); nsienumerator enumerate(); nsisupports getelementat(in pruint32 index); void queryelementat(in pruint32 index, in nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result); void removeelement(in nsisupports item); void setelementat(in pruint32 index, in nsisupports item); methods appendelement() appends a new item to the collection.
...
count() returns the number of items in the collection.
... pruint32
count(); parameters none.
nsIControllers
an instance, use: var controllers = components.classes["@mozilla.org/xul/xul-controllers;1"] .createinstance(components.interfaces.nsicontrollers); method overview void appendcontroller(in nsicontroller controller); nsicontroller getcontrollerat(in unsigned long index); nsicontroller getcontrollerbyid(in unsigned long controllerid); unsigned long getcontroller
count(); nsicontroller getcontrollerforcommand(in string command); unsigned long getcontrollerid(in nsicontroller controller); void insertcontrollerat(in unsigned long index, in nsicontroller controller); void removecontroller(in nsicontroller controller); nsicontroller removecontrollerat(in unsigned long index); attributes attribute type description commanddispatcher nsidomxulcommand...
... getcontroller
count() returns the current number of controllers.
... unsigned long getcontroller
count(); parameters none.
nsICycleCollectorListener
uced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the order of calls will be call to begin(); then for every node in the graph a call to noteobject() and calls to noteedge() for every edge starting at that node; then a call to begindescriptions(); then for every black node in the cycle collector graph a call to either describeref
countedobject() or to describegcedobject(); and then a call to end().
...method overview void begin(); void begindescriptions(); void describegcedobject(in unsigned long long aaddress, in boolean amarked); void describeref
countedobject(in unsigned long long aaddress, in unsigned long aknownedges, in unsigned long atotaledges); void end(); void noteedge(in unsigned long long afromaddress, in unsigned long long atoaddress, in string aedgename); void noteobject(in unsigned long long aaddress, in string aobjectdescription); methods begin() void begin(); parameters none.
...describegcedobject() void describegcedobject( in unsigned long long aaddress, in boolean amarked ); parameters aaddress amarked describeref
countedobject() void describeref
countedobject( in unsigned long long aaddress, in unsigned long aknownedges, in unsigned long atotaledges ); parameters aaddress aknownedges atotaledges end() void end(); parameters none.
nsIDOMChromeWindow
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void beginwindowmove(in nsidomevent mousedownevent); void getattention(); void getattentionwithcycle
count(in long acycle
count); void maximize(); void minimize(); void notifydefaultbuttonloaded(in nsidomelement defaultbutton); void restore(); void setcursor(in domstring cursor); attributes attribute type description browserdomwindow nsibrowserdomwindow the related nsibrowserdomwindow instance which provides access to yet another layer of utility functions by chrome script.
...getattentionwithcycle
count() same as getattention method excepting that this can specify the maximum number of times to animate the window per system conventions.
... void getattentionwithcycle
count( in long acycle
count ); parameters acycle
count the maximum number of times to animate the window per system conventions.
nsIDroppedLinkHandler
in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean candroplink(in nsidomdragevent aevent, in prbool aallowsamedocument); astring droplink(in nsidomdragevent aevent, out astring aname, [optional] in boolean adisallowinherit); void droplinks(in nsidomdragevent aevent, [optional] in boolean adisallowinherit, [optional] out unsigned long a
count, [retval, array, size_is(a
count)] out nsidroppedlinkitem alinks); methods candroplink() determines if a link being dragged can be dropped.
... void droplinks( in nsidomdragevent aevent, [optional] in boolean adisallowinherit, [optional] out unsigned long a
count, [retval, array, size_is(a
count)] out nsidroppedlinkitem alinks ); parameters aevent a drop event.
... adisallowinherit a
count receives the
count of alinks array alinks recives an array of objects with nsidroppedlinkitem interface return value nothing.
nsIEditorSpellCheck
.interfaces.nsieditorspellcheck); method overview void addwordtodictionary(in wstring word); boolean canspellcheck(); void checkcurrentdictionary(); boolean checkcurrentword(in wstring suggestedword); boolean checkcurrentwordnosuggest(in wstring suggestedword); astring getcurrentdictionary(); void getdictionarylist([array, size_is(
count)] out wstring dictionarylist, out pruint32
count); wstring getnextmisspelledword(); void getpersonaldictionary(); wstring getpersonaldictionaryword(); wstring getsuggestedword(); void ignorewordalloccurrences(in wstring word); void initspellchecker(in nsieditor editor, in boolean enableselectionchecking); void removewordfromdictionary...
...void getdictionarylist( [array, size_is(
count)] out wstring dictionarylist, out pruint32
count ); parameters dictionarylist an array into which the list of dictionary name strings are placed.
...
count on return, contains the number of entries in the dictionarylist array.
nsIFrameLoader
void activateremoteframe(); void destroy(); void loadframe(); void loaduri(in nsiuri auri); void sendcrossprocesskeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault); void sendcrossprocessmouseevent(in astring atype, in float ax, in float ay, in long abutton, in long aclick
count, in long amodifiers, [optional] in boolean aignorerootscrollframe); void updatepositionandsize(in nsiframe aiframe); native code only!
... void sendcrossprocessmouseevent( in astring atype, in float ax, in float ay, in long abutton, in long aclick
count, in long amodifiers, [optional] in boolean aignorerootscrollframe ); parameters atype the type of mouse event to send.
... aclick
count the number of clicks comprising the mouse button event, if any.
nsILoginManagerPrompter
se: var loginmanagerprompter = components.classes["@mozilla.org/login-manager/prompter;1"] .getservice(components.interfaces.nsiloginmanagerprompter); method overview void init(in nsidomwindow awindow); void prompttochangepassword(in nsilogininfo aoldlogin, in nsilogininfo anewlogin); void prompttochangepasswordwithusernames([array, size_is(
count)] in nsilogininfo logins, in pruint32
count, in nsilogininfo anewlogin); void prompttosavepassword(in nsilogininfo alogin); methods init() initialize the prompter.
... void prompttochangepasswordwithusernames( [array, size_is(
count)] in nsilogininfo logins, in pruint32
count, in nsilogininfo anewlogin ); parameters logins an array of existing logins.
...
count (length of the array) anewlogin the new login.
nsIMemoryReporter
as of gecko 6.0, the path should start with "explicit/" if the memory report ac
counts for all memory reported under sub-paths.
... units_
count 1 the amount is an instantaneous
count of things currently in existence.
... units_
count_cumulative 2 the amount contains the number of times some event has occurred since the application started up.
nsIMsgHeaderParser
ring aname, in astring aaddress); string makefulladdressstring(in string aname, in string aaddress); wstring makefulladdresswstring(in wstring name, in wstring addr); obsolete since gecko 1.9 void parseheaderaddresses(in string line, out string names, out string addresses, out pruint32 numaddresses); void parseheaderswitharray(in wstring aline, [array, size_is(
count)] out wstring aemailaddresses, [array, size_is(
count)] out wstring anames, [array, size_is(
count)] out wstring afullnames, [retval] out unsigned long
count); void reformatheaderaddresses(in string line, out string reformattedaddress); wstring reformatunquotedaddresses(in wstring line); void removeduplicateaddresses(in string addrs, in string other_addrs, in prbool remov...
... exceptions thrown missing exception missing description parseheaderswitharray() void parseheaderswitharray( in wstring aline, [array, size_is(
count)] out wstring aemailaddresses, [array, size_is(
count)] out wstring anames, [array, size_is(
count)] out wstring afullnames, [retval] out unsigned long
count ); parameters aline the header line to parse.
... aemailaddresses missing description anames missing description afullnames missing description
count missing description exceptions thrown missing exception missing description native code only!reformatheaderaddresses given a string which contains a list of header addresses, returns a new string with the same data, but inserts missing commas, parses and reformats it, and wraps long lines with newline-tab.
nsINavHistoryQueryResultNode
method overview void getqueries([optional] out unsigned long query
count, [retval,array,size_is(query
count)] out nsinavhistoryquery queries); attributes attribute type description folderitemid long long for both simple folder nodes and simple-folder-query nodes, this is set to the concrete itemid of the folder.
... void getqueries( out unsigned long query
count, optional from gecko 2.0 [retval,array,size_is(query
count)] out nsinavhistoryquery queries ); parameters query
count optional from gecko 2.0 the number of queries in the queries array.
...there are query
count elements in the array.
nsIParentalControlsService
i asource, [optional] in nsifile atarget); boolean requesturioverride(in nsiuri atarget, [optional] in nsiinterfacerequestor awindowcontext); boolean requesturioverrides(in nsiarray atargets, [optional] in nsiinterfacerequestor awindowcontext); attributes attribute type description blockfiledownloadsenabled boolean true if the current user ac
count's parental controls restrictions include the blocking of all file downloads.
... loggingenabled boolean true if the current user ac
count has parental controls logging enabled.
... parentalcontrolsenabled boolean true if the current user ac
count has parental controls restrictions enabled.
nsIPipe
inherits from: nsisupports last changed in gecko 1.6 method overview void init(in boolean nonblockinginput, in boolean nonblockingoutput, in unsigned long segmentsize, in unsigned long segment
count, in nsimemory segmentallocator); attributes attribute type description inputstream nsiasyncinputstream the pipe's input end, which also implements nsisearchableinputstream.
...void init( in boolean nonblockinginput, in boolean nonblockingoutput, in unsigned long segmentsize, in unsigned long segment
count, in nsimemory segmentallocator ); parameters nonblockinginput true specifies non-blocking input stream behavior.
... segmentsize specifies the segment size in bytes (pass 0 to use default value) segment
count specifies the max number of segments (pass 0 to use default value).
nsISelection2
method overview void getrangesforinterval(in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, out pruint32 result
count, [retval, array, size_is(result
count)] out nsidomrange results); void getrangesforintervalcomarray(in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, in rangearray results); native code only!
... void getrangesforinterval( in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, out pruint32 result
count, [retval, array, size_is(result
count)] out nsidomrange results ); parameters beginnode beginoffset endnode endoffset these four parameters represent the range to compare against the selection.
... result
count returns the number of ranges that overlap (or touch) the input range.
nsISelectionPrivate
void getrangesforinterval(in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, out pruint32 result
count, [retval, array, size_is(result
count)] out nsidomrange results); void getrangesforintervalarray(in nsinode beginnode, in print32 beginoffset, in nsinode endnode, in print32 endoffset, in boolean allowadjacent, in rangearray results); native code only!
... void getrangesforinterval( in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, out pruint32 result
count, [retval, array, size_is(result
count)] out nsidomrange results ); parameters beginnode beginoffset endnode endoffset these four parameters represent the range to compare against the selection.
... result
count returns the number of ranges that overlap (or touch) the input range.
nsIUpdateCheckListener
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void oncheckcomplete(in nsixmlhttprequest request, [array, size_is(update
count)] in nsiupdate updates, in unsigned long update
count); void onerror(in nsixmlhttprequest request, in nsiupdate update); void onprogress(in nsixmlhttprequest request, in unsigned long position, in unsigned long totalsize); methods oncheckcomplete() called when the update check is completed.
... void oncheckcomplete( in nsixmlhttprequest request, [array, size_is(update
count)] in nsiupdate updates, in unsigned long update
count ); parameters request the nsixmlhttprequest object handling the update check.
...update
count the number of updates in the updates array.
LDAP Support
some notes about the relationship: there is a many to one relationship between ldap attributes and its address book
counterpart.
... there is a one to one relationship between a address book attribute and its ldap
counterpart.
... pagernumber pagerphone cellularnumber mobile cellularnumber cellphone cellularnumber carphone workaddress postofficebox workaddress streetaddress workcity l workcity locality workstate st workstate region workzipcode postalcode workzipcode zip work
country
countryname jobtitle title department ou department orgunit department department department departmentnumber company o company company work
country
countryname _aimscreenname nscpaimscreenname webpage1 workurl webpage2 homeurl birthyear birthyear ...
Mail client architecture overview
this includes management of ac
counts, folders and messages.
... the base module consists of the following basic building blocks ac
count management - the ac
count manager is the root object of the server/folder/message hierarchy.
... it manages individual ac
counts on mail servers and the identity of users as used to send mail.
Activity Manager examples
nsiam); let process = components.classes["@mozilla.org/activity-process;1"].createinstance(nsiap); // assuming folder is an instance of nsimsgfolder interface // localization is omitted, initiator is not provided process.init("processing folder: " + folder.prettiestname, null); // note that we don't define a custom icon, default process icon // will be used process.contexttype = "ac
count"; // group this activity by ac
count process.contextobj = folder.server; // ac
count in question gactivitymanager.addactivity(process); // step 2: showing some progress let percent = 50; process.setprogress(percent, "junk processing 25 of 50 messages", 25, 50); // step 3: removing the process and adding an event using process' attributes process.state = components.interfaces.nsiactivitypro...
...isupports(reinterpret_cast<nsisupports*>(imapfolder)); copyevent->addsubject(srcfolder); copyevent->init(ns_literal_string("message copy event"), initiator, ns_literal_string("completed successfully"), pr_now() / pr_usec_per_msec, // start time pr_now() / pr_usec_per_msec); // completion time // do not forget to increase the ref
counter if needed copyevent->setundohandler(undohandler); //////////////////////////////////////////////////////////////// //// adding the event into activity manager nscomptr<nsiactivitymanager> activitymgr(do_getservice("@mozilla.org/activity-manager;1")); pruint32 id; activitymgr->addactivity(copyevent, &id); adding an activity with a custom context type this sample shows how to provide a cust...
...as a result, all junk processing activities (assuming that we process ac
counts in parallel) dealing with messages coming from the same sender will be grouped together.
WebIDL bindings
if your object is not ref
counted then the return value of functions that return it should return an nsautoptr.
...the class involved must either be ref
counted or must be explicitly annotated in bindings.conf as being directly owned by the js object.
...this allows the binding code to avoid extra reference-
counting of the string buffer in many cases, and allows it to take a faster codepath even if it does end up having to addref the nsstringbuffer.
Allocations - Firefox Developer Tools
it includes the following columns: self
count: the number of allocation-samples that were taken in this function (also shown as a percentage of the total) self bytes: the total number of bytes allocated in the allocation-samples in this function (also shown as a percentage of the total) rows are sorted by the "self bytes" column.
...both these functions have 0 in self
count, meaning that no allocations were seen directly in these functions.
... however, removeinner() has 8901 in total
count, while setselectioninner() has just 3 in total
count.
AnalyserNode - Web APIs
number of inputs 1 number of outputs 1 (but may be left unconnected) channel
count mode "max" channel
count 2 channel interpretation "speakers" inheritance this interface inherits from the following parent interfaces: <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute;...
... analysernode.frequencybin
count read only is an unsigned long value half that of the fft size.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybin
count; var dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // get a canvas defined with id "oscilloscope" var canvas = document.getelementbyid("oscilloscope"); var canvasctx = canvas.getcontext("2d"); // draw an oscilloscope of the current audio source function draw() { requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fil...
AudioBuffer.getChannelData() - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, frame
count, audioctx.samplerate); var nowbuffering = myarraybuffer.getchanneldata(channel); parameters channel the channel property is an index representing the particular channel to get data for.
... var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var button = document.queryselector('button'); var pre = document.queryselector('pre'); var myscript = document.queryselector('script'); pre.innerhtml = myscript.innerhtml; // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var frame
count = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, frame
count, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(ch...
...annel); for (var i = 0; i < frame
count; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } // get an audiobuffersourcenode.
AudioDestinationNode - Web APIs
the number of channels in the input must be between 0 and the maxchannel
count value or an exception is raised.
... number of inputs 1 number of outputs 0 channel
count mode "explicit" channel
count 2 channel interpretation "speakers" properties inherits properties from its parent, audionode.
... audiodestinationnode.maxchannel
count is an unsigned long defining the maximum number of channels that the physical device can handle.
AudioNode.channelInterpretation - Web APIs
the surround channels are slightly attenuated and the regular lateral channels are power-compensated to make them
count as a single channel by multiplying by √2/2.
... fill each output channel with its input
counterpart, that is the input channel with the same index.
... fill each output channel with its input
counterpart, that is the input channel with the same index.
BasicCardResponse - Web APIs
dick straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "
country" : "gb", // etc.
... 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true) and the dom.payments.request.supportedregions preference (needs to be set to a comma-delineated list of one or more 2-character iso
country codes indicating the
countries in which to support payments (for example, us,ca.).
... 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true) and the dom.payments.request.supportedregions preference (needs to be set to a comma-delineated list of one or more 2-character iso
country codes indicating the
countries in which to support payments (for example, us,ca.).
CSSRule - Web APIs
e.font_face_rule 5 cssfontfacerule cssrule.page_rule 6 csspagerule cssrule.keyframes_rule 7 csskeyframesrule cssrule.keyframe_rule 8 csskeyframerule reserved for future use 9 should be used to define color profiles in the future cssrule.namespace_rule 10 cssnamespacerule cssrule.
counter_style_rule 11 css
counterstylerule cssrule.supports_rule 12 csssupportsrule cssrule.document_rule 13 cssdocumentrule cssrule.font_feature_values_rule 14 cssfontfeaturevaluesrule cssrule.viewport_rule 15 cssviewportrule cssrule.region_style_rule 16 cssregionstylerule cssrule.u...
... css
counter styles level 3the definition of 'cssrule' in that specification.
... candidate recommendation added value
counter_style_rule.
ChannelSplitterNode - Web APIs
channel
count mode "explicit" older implementations, as per earlier versions of the spec use "max".
... channel
count fixed to the number of outputs.
... older implementations, as per earlier versions of the spec use 2 (not used in the default
count mode).
CustomElementRegistry.define() - Web APIs
customized built-in element the following code is taken from our word-
count-web-component example (see it live also).
... // create a class for the element class word
count extends htmlparagraphelement { constructor() { // always call super first in constructor super(); //
count words in element's parent element var wcparent = this.parentnode; function
countwords(node){ var text = node.innertext || node.textcontent return text.split(/\s+/g).length; } var
count = 'words: ' +
countwords(wcparent); // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create text node and add word
count to it var text = document.createelement('span'); text.textcontent =
count; // append it to the shadow root shadow.appendchild(text); // update
count when element content changes setinterval(function() { var
count = 'words:...
... ' +
countwords(wcparent); text.textcontent =
count; }, 200) } } // define the new element customelements.define('word-
count', word
count, { extends: 'p' }); <p is="word-
count"></p> specifications specification status comment html living standardthe definition of 'customelements.define()' in that specification.
CustomElementRegistry - Web APIs
examples the following code is taken from our word-
count-web-component example (see it live also).
... // create a class for the element class word
count extends htmlparagraphelement { constructor() { // always call super first in constructor super(); //
count words in element's parent element var wcparent = this.parentnode; function
countwords(node){ var text = node.innertext || node.textcontent return text.split(/\s+/g).length; } var
count = 'words: ' +
countwords(wcparent); // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create text node and add word
count to it var text = document.createelement('span'); text.textcontent =
count; // append it to the shadow root shadow.appendchild...
...(text); // update
count when element content changes setinterval(function() { var
count = 'words: ' +
countwords(wcparent); text.textcontent =
count; }, 200) } } // define the new element customelements.define('word-
count', word
count, { extends: 'p' }); note: the customelementregistry is available through the window.customelements property.
DataTransfer - Web APIs
deprecated properties datatransfer.mozitem
count read only gives the number of items in the drag operation.
...mozsetdataat() may only be called with an index argument less than mozitem
count in which case an existing item is modified, or equal to mozitem
count in which case a new item is added, and the mozitem
count is incremented by one.
... living standard mozcursor, mozitem
count, mozsourcenode, mozusercancelled, addelement(), mozcleardataat(), mozgetdataat(), mozsetdataat() and moztypesat are gecko specific.
EXT_disjoint_timer_query.getQueryEXT() - Web APIs
must be ext.current_query_ext or ext.query_
counter_bits_ext.
... if pname is ext.query_
counter_bits_ext: a glint indicating the number of bits used to hold the query result for the given target.
... examples var ext = gl.getextension('ext_disjoint_timer_query'); var startquery = ext.createqueryext(); ext.query
counterext(startquery, ext.timestamp_ext); var currentquery = ext.getqueryext(ext.timestamp_ext, ext.current_query_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
Element.attachShadow() - Web APIs
examples the following example is taken from our word-
count-web-component demo (see it live also).
... // create a class for the element class word
count extends htmlparagraphelement { constructor() { // always call super first in constructor super(); //
count words in element's parent element var wcparent = this.parentnode; function
countwords(node){ var text = node.innertext || node.textcontent return text.trim().split(/\s+/g).length; } var
count = 'words: ' +
countwords(wcparent); // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create text node and add word
count to it var text = document.createelement('span'); text.textcontent =
count; // append it to...
... the shadow root shadow.appendchild(text); // update
count when element content changes setinterval(function() { var
count = 'words: ' +
countwords(wcparent); text.textcontent =
count; }, 200) } } // define the new element customelements.define('word-
count', word
count, { extends: 'p' }); specifications specification status comment domthe definition of 'attachshadow()' in that specification.
Element: click event - Web APIs
this
counter resets after a short interval without any clicks occurring; the specifics of how long that interval is may vary from browser to browser and across platforms.
... html <button>click</button> javascript const button = document.queryselector('button'); button.addeventlistener('click', event => { button.innerhtml = `click
count: ${event.detail}`; }); result try making rapid, repeated clicks on the button to increase the click
count.
... if you take a break between clicks, the
count will reset.
Using FormData Objects - Web APIs
creating a formdata object from scratch you can build a formdata object yourself, instantiating it then appending fields to it by calling its append() method, like this: var formdata = new formdata(); formdata.append("username", "groucho"); formdata.append("ac
countnum", 123456); // number 123456 is immediately converted to a string "123456" // html file input, chosen by user formdata.append("userfile", fileinputelement.files[0]); // javascript file-like object var content = '<a id="a"><b id="b">hey!</b></a>'; // the body of the new file...
...the number assigned to the field "ac
countnum" is immediately converted into a string by the formdata.append() method (the field's value can be a blob, file, or a string: if the value is neither a blob nor a file, the value is converted to a string).
... this example builds a formdata instance containing values for fields named "username", "ac
countnum", "userfile" and "webmasterfile", then uses the xmlhttprequest method send() to send the form's data.
HTMLElement: animationcancel event - Web APIs
night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event-log"></div> </div> css .container { height: 3rem; } .event-log { width: 25rem; height: 2rem; border: 1px solid black; margin: 0.2rem; padding: 0.2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation-iteration-
count: 2; } @keyframes slidein { from { transform: translatex(100%) scalex(3); } to { transform: translatex(0) scalex(1); } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iteration
count = 0; animat...
...ion.addeventlistener('animationstart', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iteration
count++; animationeventlog.textcontent = `${animationeventlog.textcontent}'animation iterations: ${iteration
count}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('activ...
...e'); animationeventlog.textcontent = ''; iteration
count = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationend event - Web APIs
d night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event-log"></div> </div> css .container { height: 3rem; } .event-log { width: 25rem; height: 2rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation-iteration-
count: 2; } @keyframes slidein { from { margin-left: 100%; width: 300%; } to { margin-left: 0%; width: 100%; } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iteration
count = 0; animation.
...addeventlistener('animationstart', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iteration
count++; animationeventlog.textcontent = `${animationeventlog.textcontent}'animation iterations: ${iteration
count}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active');...
... animationeventlog.textcontent = ''; iteration
count = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationstart event - Web APIs
night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event-log"></div> </div> css .container { height: 3rem; } .event-log { width: 25rem; height: 2rem; border: 1px solid black; margin: 0.2rem; padding: 0.2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation-iteration-
count: 2; } @keyframes slidein { from { transform: translatex(100%) scalex(3); } to { transform: translatex(0) scalex(1); } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iteration
count = 0; animat...
...ion.addeventlistener('animationstart', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iteration
count++; animationeventlog.textcontent = `${animationeventlog.textcontent}'animation iterations: ${iteration
count}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('activ...
...e'); animationeventlog.textcontent = ''; iteration
count = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
IDBIndex.getAll() - Web APIs
syntax var getallkeysrequest = idbindex.getall(); var getallkeysrequest = idbindex.getall(query); var getallkeysrequest = idbindex.getall(query,
count); parameters query optional a key or an idbkeyrange identifying the records to retrieve.
...
count optional the number records to return.
... a typeerror exception is thrown if the
count parameter is not between 0 and 232-1 included.
IDBIndex.getAllKeys() - Web APIs
syntax var allkeysrequest = idbindex.getallkeys(); var allkeysrequest = idbindex.getallkeys(query); var allkeysrequest = idbindex.getallkeys(query,
count); parameters query optional a key or an idbkeyrange identifying the keys to retrieve.
...
count optional the number records to return.
... a typeerror exception is thrown if the
count parameter is not between 0 and 232-1 included.
Using IndexedDB - Web APIs
function displaypublist(store) { console.log("displaypublist"); if (typeof store == 'undefined') store = getobjectstore(db_store_name, 'readonly'); var pub_msg = $('#pub-msg'); pub_msg.empty(); var pub_list = $('#pub-list'); pub_list.empty(); // resetting the iframe so that it doesn't display previous content newviewerframe(); var req; req = store.
count(); // requests are executed in the order in which they were made against the // transaction, and their results are returned in the same order.
... // thus the
count text below will be displayed before the actual pub list // (not that it is algorithmically important in this case).
...'mouseenter', function(evt) { setinviewer(evt.target.getattribute('href')); }); list_item.append(' / '); list_item.append(link); } else { list_item.append(" / no attached file"); } pub_list.append(list_item); }; // move on to the next object in store cursor.continue(); // this
counter serves only to create distinct ids i++; } else { console.log("no more entries"); } }; } function newviewerframe() { var viewer = $('#pub-viewer'); viewer.empty(); var iframe = $('<iframe />'); viewer.append(iframe); return iframe; } function setinviewer(key) { console.log("setinviewer:", arguments); key = number(key); if ...
Intersection Observer API - Web APIs
the code snippet below shows a callback which keeps a
counter of how many times elements transition from not intersecting the root to intersecting by at least 75%.
...the snippet thus first checks that the transition is a positive one, then determines whether intersectionratio is above 75%, in which case it increments the
counter.
... intersectioncallback(entries) => { entries.foreach(entry => { if (entry.isintersecting) { let elem = entry.target; if (entry.intersectionratio >= 0.75) { intersection
counter++; } } }); } interfaces intersectionobserver the primary interface for the intersection observer api.
Capabilities, constraints, and settings - Web APIs
applying constraints the first and most common way to use constraints is to specify them when you call getusermedia(): navigator.mediadevices.getusermedia({ video: { width: { min: 640, ideal: 1920 }, height: { min: 400, ideal: 1080 }, aspectratio: { ideal: 1.7777777778 } }, audio: { samplesize: 16, channel
count: 2 } }).then(stream => { videoelement.srcobject = stream; }).catch(handleerror); in this example, constraints are applied at getusermedia() time, asking for an ideal set of options with fallbacks for the video.
...ding-top: 2px; padding-bottom: 4px; color: white; background-color: darkgreen; } .wrapper { margin-bottom: 10px; width: 600px; } .trackrow { height: 200px; } .leftside { float: left; width: calc(calc(100%/2) - 10px); } .rightside { float: right; width: calc(calc(100%/2) - 10px); } textarea { padding: 8px; } h3 { margin-bottom: 3px; } #supportedconstraints { column-
count: 2; -moz-column-
count: 2; } #log { padding-top: 10px; } javascript content now let's take a look at the javascript code that makes everything work.
... let videodefaultconstraintstring = '{\n "width": 320,\n "height": 240,\n "framerate": 30\n}'; let audiodefaultconstraintstring = '{\n "samplesize": 16,\n "channel
count": 2,\n "echocancellation": false\n}'; these defaults ask for a pretty common camera configuration, but don't insist on any property being of special importance.
PaymentAddress.regionCode - Web APIs
the code is derived from the iso 3166-2 standard, which defines codes for identifying the subdivisions (e.g., states, provinces, autonomous regions, etc.) of all
countries in the world.
... if the browser can't determine the region code, or the
country doesn't use regions for postal addresses, it returns an empty string.
...the string is empty if the region code couldn't be determined, isn't needed for the address's
country, or was not provided.
PaymentMethodChangeEvent.methodDetails - Web APIs
example this example uses the paymentmethodchange event to watch for changes to the payment method selected for apple pay, in order to compute a dis
count if the user chooses to use a visa card as their payment method.
... // methoddetails contains the card information const result = calculatedis
count(ev.methoddetails); object.assign(newstuff, result); break; } } // finally...
... ev.updatewith(newstuff); }; const response = await request.show(); note that the methoddetails property is being used by the calculatedis
count() function to compute any payment dis
count, then updatewith() is called to update the event with the computed update.
PaymentRequest.PaymentRequest() - Web APIs
this property is commonly used to add a dis
count or surcharge line item indicating the different amount in details.modifiers.total.
...this is typically used when details.modifiers.additionalitems adds a dis
count or a surchase to the request.
...for example, in english speaking
countries you would say "pizza delivery" not "pizza shipping".
Using server-sent events - Web APIs
the php code for the example we're using here follows: date_default_timezone_set("america/new_york"); header("cache-control: no-cache"); header("content-type: text/event-stream"); $
counter = rand(1, 10); while (true) { // every second, send a "ping" event.
... $
counter--; if (!$
counter) { echo 'data: this is a message at time ' .
..."\n\n"; $
counter = rand(1, 10); } ob_end_flush(); flush(); sleep(1); } the code above generates an event every second, with the event type "ping".
SubtleCrypto.decrypt() - Web APIs
exceptions the promise is rejected when the following exceptions are en
countered: invalidaccesserror raised when the requested operation is not valid for the provided key (e.g.
...note that
counter must match the value that was used for encryption.
... function decryptmessage(key, ciphertext) { return window.crypto.subtle.decrypt( { name: "aes-ctr",
counter, length: 64 }, key, ciphertext ); } aes-cbc this code decrypts ciphertext using aes in cbc mode.
SubtleCrypto.importKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions is en
countered: syntaxerror raised when keyusages is empty but the unwrapped key is of type secret or private.
... you are most likely to en
counter this object in pem format.
... again, you are most likely to en
counter this object in pem format.
UIEvent.detail - Web APIs
the uievent.detail read-only property, when non-zero, provides the current (or next, depending on the event) click
count.
... for click or dblclick events, uievent.detail is the current click
count.
... for mousedown or mouseup events, uievent.detail is 1 plus the current click
count.
WebGL2RenderingContext.drawArraysInstanced() - Web APIs
syntax void gl.drawarraysinstanced(mode, first,
count, instance
count); parameters mode a glenum specifying the type primitive to render.
...
count a glsizei specifying the number of indices to be rendered.
... instance
count a glsizei specifying the number of instances of the range of elements to execute.
WebGL2RenderingContext.drawRangeElements() - Web APIs
syntax void gl.drawrangeelements(mode, start, end,
count, type, offset); parameters mode a glenum specifying the type primitive to render.
...
count a glsizei specifying the number of elements to be rendered.
... if
count is negative, a gl.invalid_value error is thrown.
WebGLRenderingContext.drawArrays() - Web APIs
syntax void gl.drawarrays(mode, first,
count); parameters mode a glenum specifying the type primitive to render.
...
count a glsizei specifying the number of indices to be rendered.
... if first or
count are negative, a gl.invalid_value error is thrown.
WebGLRenderingContext.drawElements() - Web APIs
syntax void gl.drawelements(mode,
count, type, offset); parameters mode a glenum specifying the type primitive to render.
...
count a glsizei specifying the number of elements to be rendered.
... if
count is negative, a gl.invalid_value error is thrown.
Lighting in WebGL - Web APIs
then we update the vertex shader to adjust the color of each vertex, taking into ac
count the ambient lighting as well as the effect of the directional lighting given the angle at which it's striking the face.
... the fragment shader the fragment shader now needs to be updated to take into ac
count the lighting value computed by the vertex shader: const fssource = ` varying highp vec2 vtexturecoord; varying highp vec3 vlighting; uniform sampler2d usampler; void main(void) { highp vec4 texelcolor = texture2d(usampler, vtexturecoord); gl_fragcolor = vec4(texelcolor.rgb * vlighting, texelcolor.a); } `; here we fetch the color of the texel, just like we...
... did in the previous example, but before setting the color of the fragment, we multiply the texel's color by the lighting value to adjust the texel's color to take into ac
count the effect of our light sources.
Rendering and the WebXR frame animation callback - Web APIs
this ensures we get into the queue right away, allowing the rest of the time spent in this iteration of the mydrawframe() function to
count toward the timing of drawing the next frame.
...in the next section, we look at an altered approach that reduces these state changes substantially, providing a potentially much faster rendering approach, especially as your object
count goes up.
... for example, to reduce the frame rate by 50%, just skip every other frame: let tick = 0; function drawframe(time, frame) { animationframerequestid = frame.session.requestanimationframe(drawframe); if (!(tick % 2)) { /* draw the scene */ } tick++; } this version of the frame callback maintains a tick
counter.
Web APIs
aambient light eventsbbackground tasksbattery api beaconbluetooth apibroadcast channel apiccss
counter stylescss font loading api cssomcanvas apichannel messaging apiconsole apicredential management apiddomeencoding apiencrypted media extensionsffetch apifile system api frame timing apifullscreen apiggamepad api geolocation apihhtml drag and drop apihigh resolution timehistory apiiimage capture apiindexeddbintersection observer apillong tasks api mmedia capabilities api media capture and st...
...ernode blob blobbuilder blobevent bluetooth bluetoothadvertisingdata bluetoothcharacteristicproperties bluetoothdevice bluetoothremotegattcharacteristic bluetoothremotegattdescriptor bluetoothremotegattserver bluetoothremotegattservice body broadcastchannel budgetservice budgetstate buffersource bytelengthqueuingstrategy bytestring c cdatasection css cssconditionrule css
counterstylerule cssgroupingrule cssimagevalue csskeyframerule csskeyframesrule csskeywordvalue cssmathproduct cssmathsum cssmathvalue cssmediarule cssnamespacerule cssnumericvalue cssomstring csspagerule csspositionvalue cssprimitivevalue csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule cssstylesheet cssstylevalue csssupportsrule cssunitvalue cssunparsedv...
...remediastreamtrack canvasgradient canvasimagesource canvaspattern canvasrenderingcontext2d caretposition channelmergernode channelsplitternode characterdata childnode client clients clipboard clipboardevent clipboarditem closeevent comment compositionevent constantsourcenode constrainboolean constraindomstring constraindouble constrainulong contentindex contentindexevent convolvernode
countqueuingstrategy crashreportbody credential credentialscontainer crypto cryptokey cryptokeypair customelementregistry customevent d domconfiguration domerror domexception domhighrestimestamp domimplementation domimplementationlist domlocator dommatrix dommatrixreadonly domobject domparser dompoint dompointinit dompointreadonly domquad domrect domrectreadonly domstring domst...
ARIA: row role - Accessibility
<div role="table" aria-label="populations" aria-describedby="
country_population_desc"> <div id="
country_population_desc">world populations by
country</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="descending">
country</span> <span role="columnheader"aria-sort="none">population</span> </div> </div> <div role="rowgroup"> <div role="row"> <span role="cell">finland</span> <span role="cell">5.5 million</span> </div> <div role="row"> <span role="cell">f...
... examples <div role="table" aria-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-row
count="81"> <div id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none">aria role</span> <span role="columnheader" aria-sort="none">semantic element</span> </div> </div> <div role="rowgroup"> <div role="row" aria-rowindex="11"> <span role="cell...
... <table role="table" aria-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-row
count="81"> <caption id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</caption> <thead role="rowgroup"> <tr role="row"> <th role="columnheader" aria-sort="none">aria role</th> <th role="columnheader" aria-sort="none">semantic element</th> </tr> </thead> <tbody role="rowgroup"> <tr role="row" aria-rowindex...
ARIA: rowgroup role - Accessibility
<div role="table" aria-label="populations" aria-describedby="
country_population_desc"> <div id="
country_population_desc">world populations by
country</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="descending">
country</span> <span role="columnheader"aria-sort="none">population</span> </div> </div> <div role="rowgroup"> <div role="row"> <span role="cell">finland</span> <span role="cell">5.5 million</span> </div> <div role="row"> <span role="cell">france</span> <span ro...
... examples <div role="table" aria-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-row
count="81"> <div id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none">aria role</span> <span role="columnheader" aria-sort="none">semantic element</span> </div> </div> <div role="rowgroup"> <div role="row" aria-rowindex="11"> <span role="cell...
... <table role="table" aria-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-row
count="81"> <caption id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</caption> <thead role="rowgroup"> <tr role="row"> <th role="columnheader" aria-sort="none">aria role</th> <th role="columnheader" aria-sort="none">semantic element</th> </tr> </thead> <tbody role="rowgroup"> <tr role="row" aria-rowindex...
Accessibility documentation index - Accessibility
77 aria: timer role aria, aria role, aria widget, reference, role timer the timer role indicates to assistive technologies that an element is a numerical
counter the amount of elapsed time from a starting point or the remaining time until an end point.
...while this results in a widget that looks like its desktop
counterpart, there usually isn't enough semantic information in the markup to be usable by an assistive technology.
...these widgets are typically composed of <div> and <span> elements that do not, by nature, offer the same keyboard functionality that their desktop
counterparts do.
:nth-last-of-type() - CSS: Cascading Style Sheets
the :nth-last-of-type() css pseudo-class matches elements of a given type, based on their position among a group of siblings,
counting from the end.
... /* selects every fourth <p> element among any group of siblings,
counting backwards from the last one */ p:nth-last-of-type(4n) { color: lime; } note: this pseudo-class is essentially the same as :nth-of-type, except it
counts items backwards from the end, not forwards from the beginning.
... syntax the nth-last-of-type pseudo-class is specified with a single argument, which represents the pattern for matching elements,
counting from the end.
additive-symbols - CSS: Cascading Style Sheets
the additive-symbols descriptor lets you specify symbols when the value of a
counter system descriptor is additive.
... formal definition related at-rule@
counter-styleinitial valuen/acomputed valueas specified formal syntax [ <integer> && <symbol> ]#where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...ercentage><angular-color-stop> = <color> && <color-stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples specifying additive symbols html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @
counter-style additive-symbols-example { system: additive; additive-symbols: v 5, iv 4, i 1; } .list { list-style: additive-symbols-example; } result specifications specification status comment css
counter styles level 3the definition of 'additive-symbols' in that specification.
fallback - CSS: Cascading Style Sheets
the fallback descriptor can be used to specify a
counter style to fall back to if the current
counter style cannot create a marker representation for a particular
counter value.
... a couple of scenarios where a fallback style will be used are: when the range descriptor is specified for a
counter style, the fallback style will be used to represent values that fall outside the range.
... formal definition related at-rule@
counter-styleinitial valuedecimalcomputed valueas specified formal syntax <
counter-style-name>where <
counter-style-name> = <custom-ident> examples specifying a fallback
counter style html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @
counter-style fallback-example { system: fixed; symbols: "\24b6" "\24b7" "\24b8"; fallback: upper-alpha; } .list { list-style: fallback-example; } result specifications specification status comment css
counter styles level 3the definition of 'fallback' in that spe...
suffix - CSS: Cascading Style Sheets
the suffix descriptor of the@
counter-style rule specifies content that will be appended to the marker representation.
... formal definition related at-rule@
counter-styleinitial value".
...ear-color-stop> = <color> <color-stop-length>?<linear-color-hint> = <length-percentage><length-percentage> = <length> | <percentage><angular-color-stop> = <color> && <color-stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples setting a suffix for a
counter html <ul class="choices"> <li>one</li> <li>two</li> <li>three</li> <li>none of the above</li> </ul> css @
counter-style options { system: fixed; symbols: a b c d; suffix: ") "; } .choices { list-style: options; } result specifications specification status comment css
counter styles level 3the definition of 'suffix' in that specification.
CSS Multi-column Layout - CSS: Cascading Style Sheets
basic example in the following example the column-
count property has been applied to the element with a class of container.
... as the value of column-
count is 3, the content is arranged into 3 columns of equal size.
... reference multiple-column layout properties column-
count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns related css fragmentation properties break-after break-before break-inside orphans widows guides basic concepts of multicol an overview of the multiple-column layout specification styling columns how to use column rules and manage the spacing betwe...
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
counting backwards we can also
count backwards from the block and inline end of the grid, for english that would be the right hand column line and final row line.
... these lines can be addressed as -1, and you can
count back from there – so the penultimate line is -2.
... it is worth noting that the final line is the final line of the explicit grid, the grid defined by grid-template-columns and grid-template-rows, and does not take into ac
count any rows or columns added in the implicit grid outside of that.
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
mappings for margins, borders, and padding the specification details mappings for each logical value to a physical
counterpart.
... margin examples the mapped margin properties of margin-inline-start, margin-inline-end, margin-block-start, and margin-inline-end can be used instead of their physical
counterparts.
... padding examples the mapped padding properties of padding-inline-start, padding-inline-end, padding-block-start, and padding-inline-end can be used instead of their physical
counterparts.
Specificity - CSS: Cascading Style Sheets
but selectors placed into the pseudo-class
count as normal selectors when determining the
count of selector types.
...in the following case, the selector *[id="foo"]
counts as an attribute selector for the purpose of determining the selector's specificity, even though it selects an id.
...will render as: this is because the two declarations have equal selector type
counts, but the html h1 selector is declared last.
WebKit CSS extensions - CSS: Cascading Style Sheets
a -webkit-align-content -webkit-align-items -webkit-align-self -webkit-animation -webkit-animation-delay -webkit-animation-direction -webkit-animation-duration -webkit-animation-fill-mode -webkit-animation-iteration-
count -webkit-animation-name -webkit-animation-play-state -webkit-animation-timing-function b -webkit-backface-visibility -webkit-background-clip -webkit-background-origin -webkit-background-size -webkit-border-bottom-left-radius -webkit-border-bottom-right-radius -webkit-border-image -webkit-border-radius -webkit-border-top-left-radius -webkit-border-top-right-radius -webkit-box-deco...
...ration-break -webkit-box-shadow -webkit-box-sizing c -webkit-clip-path -webkit-column-
count -webkit-column-fill -webkit-column-gap -webkit-column-rule -webkit-column-rule-color -webkit-column-rule-style -webkit-column-rule-width -webkit-column-span -webkit-column-width -webkit-columns f -webkit-filter -webkit-flex -webkit-flex-basis -webkit-flex-direction -webkit-flex-flow -webkit-flex-grow -webkit-flex-shrink -webkit-flex-wrap -webkit-font-feature-settings -webkit-font-kerning -webkit-font-variant-ligatures g-j -webkit-grid -webkit-grid-area -webkit-grid-auto-columns -webkit-grid-auto-flow -webkit-grid-auto-rows -webkit-grid-column -webkit-grid-column-end -webkit-grid-column-gap -webkit-grid-column-start -webkit-grid-gap -webkit-grid-row -webkit-...
... a -webkit-align-content -webkit-align-items -webkit-align-self -webkit-animation -webkit-animation-delay -webkit-animation-direction -webkit-animation-duration -webkit-animation-fill-mode -webkit-animation-iteration-
count -webkit-animation-name -webkit-animation-play-state -webkit-animation-timing-function -webkit-appearance* b -webkit-backface-visibility -webkit-background-clip -webkit-background-origin -webkit-background-size -webkit-border-bottom-left-radius -webkit-border-bottom-right-radius -webkit-border-image -webkit-border-radius -webkit-box-align**, *** -webkit-box-direction**, *** -web...
is - HTML: Hypertext Markup Language
examples the following code is taken from our word-
count-web-component example (see it live also).
... // create a class for the element class word
count extends htmlparagraphelement { constructor() { // always call super first in constructor super(); // constructor contents ommitted for brevity ...
... } } // define the new element customelements.define('word-
count', word
count, { extends: 'p' }); <p is="word-
count"></p> specifications specification status comment html living standardthe definition of 'is' in that specification.
Intl - JavaScript
a unicode bcp 47 locale identifier consists of a language code, (optionally) a script code, (optionally) a region (or
country) code, (optionally) one or more variant codes, and (optionally) one or more extension sequences, with all present components separated by hyphens.
... for example: "hi": hindi (language) "de-at": german (language) as used in austria (region) "zh-hans-cn": chinese (language) written in simplified characters (script) as used in china (region) "en-emodeng": english (language) in the "early modern english" dialect (variant) the subtags identifying languages, scripts, regions (including
countries), and (rarely used) variants in unicode bcp 47 locale identifiers are registered in the iana language subtag registry.
... examples formatting dates and numbers you can use intl to format dates and numbers in a form that's conventional for a specific language and region: const
count = 26254.39; const date = new date("2012-05-24"); function log(locale) { console.log( `${new intl.datetimeformat(locale).format(date)} ${new intl.numberformat(locale).format(
count)}` ); } log("en-us"); // expected output: 5/24/2012 26,254.39 log("de-de"); // expected output: 24.5.2012 26.254,39 specifications specification ecmascript internationalization api (ec...
JSON.stringify() - JavaScript
if any such values are en
countered during conversion they are either omitted (when found in an object) or changed to null (when found in an array).
... note: if you wish the replacer to distinguish an initial object from a key with an empty string property (since both would give the empty string as key and potentially an object as value), you will have to keep track of the iteration
count (if it is beyond the first iteration, it is a genuine empty string key).
... var a = json.stringify({ foo: "bar", baz: "quux" }) //'{"foo":"bar","baz":"quux"}' var b = json.stringify({ baz: "quux", foo: "bar" }) //'{"baz":"quux","foo":"bar"}' console.log(a !== b) // true // some memoization functions use json.stringify to serialize arguments, // which may cause a cache miss when en
countering the same object like above example of using json.stringify() with localstorage in a case where you want to store an object created by your user and allowing it to be restored even after the browser has been closed, the following example is a model for the applicability of json.stringify(): // creating an example of json var session = { 'screens': [], 'state': true }; session.screens.
String.prototype.slice() - JavaScript
let str = 'the morning is upon us.' str.slice(-3) // returns 'us.' str.slice(-3, -1) // returns 'us' str.slice(0, -1) // returns 'the morning is upon us' this example
counts backwards from the end of the string by 11 to find the start index and forwards from the start of the string by 16 to find the end index.
... console.log(str.slice(-11, 16)) // => "is u" here it
counts forwards from the start by 11 to find the start index and backwards from the end by 7 to find the end index.
... console.log(str.slice(11, -7)) // => " is u" these arguments
count backwards from the end by 5 to find the start index and backwards from the end by 1 to find the end index.
String.prototype.substr() - JavaScript
description substr() extracts length characters from a str,
counting from the start index.
... if start is a positive number, the index starts
counting at the start of the string.
... if start is a negative number, the index starts
counting from the end of the string.
String - JavaScript
for example: let s1 = '2 + 2' // creates a string primitive let s2 = new string('2 + 2') // creates a string object console.log(eval(s1)) // returns the number 4 console.log(eval(s2)) // returns the string "2 + 2" for these reasons, the code may break when it en
counters string objects when it expects a primitive string instead, although generally, authors need not worry about the distinction.
... a string object can always be converted to its primitive
counterpart with the valueof() method.
... string.prototype.repeat(
count) returns a string consisting of the elements of the object repeated
count times.
yield - JavaScript
function*
countapplesales () { let salelist = [3, 7, 5] for (let i = 0; i < salelist.length; i++) { yield salelist[i] } } once a generator function is defined, it can be used by constructing an iterator as shown.
... let applestore =
countapplesales() // generator { } console.log(applestore.next()) // { value: 3, done: false } console.log(applestore.next()) // { value: 7, done: false } console.log(applestore.next()) // { value: 5, done: false } console.log(applestore.next()) // { value: undefined, done: true } you can also send a value with next(value) into the generator.
... 'step' evaluates as a return value in this syntax [rv] = yield [expression] function*
counter(value) { let step; while (true) { step = yield ++value; if (step) { value += step; } } } const generatorfunc =
counter(0); console.log(generatorfunc.next().value); // 1 console.log(generatorfunc.next().value); // 2 console.log(generatorfunc.next().value); // 3 console.log(generatorfunc.next(10).value); // 14 console.log(generatorfunc.next().value); // 15 console.log(generatorfunc.next(10).value); // 26 specifications specification ecmascript (ecma-262)the definition of 'yield' in that specification.
switch - JavaScript
when break is en
countered, the program breaks out of switch and executes the statement following switch.
... see example here: var foo = 0; switch (foo) { case -1: console.log('negative 1'); break; case 0: // foo is 0 so criteria met here so this block will run console.log(0); // note: the forgotten break would have been here case 1: // no break statement in 'case 0:' so this case will run as well console.log(1); break; // it en
counters this break so will not continue into 'case 2:' case 2: console.log(2); break; default: console.log('default'); } can i put a default between cases?
...javascript will drop you back to the default if it can't find a match: var foo = 5; switch (foo) { case 2: console.log(2); break; // it en
counters this break so will not continue into 'default:' default: console.log('default') // fall-through case 1: console.log('1'); } it also works when you put default before all other cases.
Web video codec guide - Web media technologies
this guide introduces the video codecs you're most likely to en
counter 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.
... to minimize the number of pixels that are different, here we take into ac
count the panning of the camera by first shifting the first frame to the right by two pixels, then by taking the difference.
...ime rtp / webrtc compatible no supporting/maintaining organization mpeg / itu specification https://www.itu.int/rec/t-rec-h.262 https://www.iso.org/standard/61152.html licensing proprietary; all patents have expired worldwide with the exception of in malaysia and the philippines as of april 1, 2019, so mpeg-2 can be used freely outside those two
countries.
Media - Progressive web apps (PWAs)
action: printing a document note: this snippet only works on firefox since it erroneously increments the css
counter for fix-position elemnts.
...copy and paste the content from here: /*** print sample ***/ /* defaults for screen */ #print-head, #print-foot { display: none; } /* print only */ @media print { h1 { page-break-before: always; padding-top: 2em; } h1:first-child { page-break-before: avoid;
counter-reset: page; } #print-head { display: block; position: fixed; top: 0pt; left:0pt; right: 0pt; font-size: 200%; text-align: center; } #print-foot { display: block; position: fixed; bottom: 0pt; right: 0pt; font-size: 200%; } #print-foot:after { content:
counter(page);
counter-increment: page; } } /* end print only */ view this document in your browse...
...if your browser supports
counters, it adds a page number in the footer.
fill-rule - SVG: Scalable Vector Graphics
starting with a
count of zero, add one each time a path segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left.
... after
counting the crossings, if the result is zero then the point is outside the path.
...side a shape with the path segment moving in the opposite direction (one square drawn clockwise, the other anti-clockwise) --> <path fill-rule="nonzero" stroke="red" d="m210,0 h90 v90 h-90 z m230,20 v50 h50 v-50 z"/> </svg> evenodd the value evenodd determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and
counting the number of path segments from the given shape that the ray crosses.
Using custom elements - Web Components
so for example, we can define a custom word-
count element like this: customelements.define('word-
count', word
count, { extends: 'p' }); the element is called word-
count, its class object is word
count, and it extends the <p> element.
...for example, word
count is structured like so: class word
count extends htmlparagraphelement { constructor() { // always call super first in constructor super(); // element functionality written in here ...
...for example <p is="word-
count">, or document.createelement("p", { is: "word-
count" }).
lang - XPath
syntax lang(string ) arguments string the language code or localization (language and
country) code to be matched.
... if the given string does not specify a
country code, this function will match nodes of that language with any
country code.
... given this fragment of xml: <p xml:lang="en">i went up a floor.</p> <p xml:lang="en-gb">i took the lift.</p> <p xml:lang="en-us">i rode the elevator.</p> and this part of an xsl template: <xsl:value-of select="
count(//p[lang('en')])" /> <xsl:value-of select="
count(//p[lang('en-gb')])" /> <xsl:value-of select="
count(//p[lang('en-us')])" /> <xsl:value-of select="
count(//p[lang('de')])" /> the output might be: 3 1 1 0 defined xpath 1.0 4.3 gecko support supported.
passwords - Archive of obsolete content
oncomplete is called when the operation has completed successfully and onerror is called when the function en
counters an error.
... the options parameter may also include oncomplete and onerror callback functions, which are called when the function has completed successfully and when it en
counters an error, respectively.
places/bookmarks - Archive of obsolete content
options : object optional options: name type
count number the number of bookmark items to return.
...possible options are 'title', 'date', 'url', 'visit
count', 'dateadded' and 'lastmodified'.
test/utils - Archive of obsolete content
let { before, after } = require('sdk/test/utils'); let { search } = require('sdk/places/bookmarks'); exports.test
countbookmarks = function (assert, done) { search().on('end', function (results) { assert.equal(results, 0, 'should be no bookmarks'); done(); }); }; before(exports, function (name, assert) { removeallbookmarks(); }); require('sdk/test').run(exports); both before and after may be asynchronous.
... to make them asynchronous, pass a third argument done, which is a function to call when you have finished: let { before, after } = require('sdk/test/utils'); let { search } = require('sdk/places/bookmarks'); exports.test
countbookmarks = function (assert, done) { search().on('end', function (results) { assert.equal(results, 0, 'should be no bookmarks'); done(); }); }; before(exports, function (name, assert, done) { removeallbookmarksasync(function () { done(); }); }); require('sdk/test').run(exports); globals functions before(exports, beforefn) runs beforefn before each test in the file.
Tree - Archive of obsolete content
expanding/collapsing all tree nodes to expand all tree nodes: var treeview = tree.treeboxobject.view; for (var i = 0; i < treeview.row
count; 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.row
count; i++) { if (treeview.iscontainer(i) && treeview.iscontaineropen(i)) treeview.toggleopenstate(i); } getting the text from the selected row assuming the given <tree>: <tree id="my-tree" seltype="single" onselect="ontreeselected()"> use the following javascript: function ontreeselected(){ var tree = document.getelementbyid("my-tree"); var cellindex = 0; var celltext = tree.
...); 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 = tree.view.getcelltext(row.value, col.value); alert(celltext); } getting the selected indices of a multiselect tree var start = {}, end = {}, numranges = tree.view.selection.getrange
count(), selectedindices = []; for (var t = 0; t < numranges; t++){ tree.view.selection.getrangeat(t, start, end); for (var v = start.value; v <= end.value; v++) selectedindices.push(v); } other resources xul: tree documentation xul tutorial: tree selection ...
Install Manifests - Archive of obsolete content
if a value for the application's os is en
countered that requires any specific abi, the abi is considered important for that os and the application will refuse to install the add-on if it does not find a matching os/abi combination.
... glossary restricted access area a restricted access area is an install location that could be restricted on a restricted-access ac
count, regardless of whether or not the location is restricted with the current user privileges (see nsiinstalllocation::restricted).
Adding sidebars - Archive of obsolete content
another, more important difference to take into ac
count is that users can resize the sidebar to their liking, and in most cases, the sidebar is going to be fairly narrow.
...you should take into ac
count that the whole tab box is going to be as large as the tab strip on the top and the content of the largest panel.
Local Storage - Archive of obsolete content
we recommend that you at least keep an error log, so that you can request error data from your users when you en
counter problems that are hard to debug.
... you should carefully design your database structure, taking into ac
count features you're planning on adding in the future.
User Notifications and Alerts - Archive of obsolete content
all notifications have an additional close button, so you should take into ac
count that it's possible that none of your custom buttons will be clicked.
...another problem you need to take into ac
count is that transparency of floating xul on the mac os version of firefox 2 doesn't work.
List of Mozilla-Based Applications - Archive of obsolete content
abstract ac
counting tool adobe acrobat and adobe reader portable document format (pdf) software uses mozilla spidermonkey adobe flash player popular browser plug-in uses nss in linux version adwatch content management system uses xul and xpcom aicpcu/iia exam app exam delivery software aliwal geocoder geocoding & data on a map ...
...iz also creates some gis firefox add-ons logitech harmony remote software software for remote control device uses gre or xulrunner longman dictionary of contemporary english cd-rom lotus notes / sametime groupware the latest version of ibm lotus notes and sametime can embed xul applications lucidor e-book reader lx-office ac
counting tool looks like it makes at least some use of xul maavis simple ui & communications for accessibility framework designed for elderly people with dementia but other applications mac os x operating system makes use of some mpl files such as libsecurity_asn1 maemo browser browser for maemo internet tablet development name is microb magoocli...
Monitoring WiFi access points - Archive of obsolete content
<html> <head> <title>wifi monitor example</title> <script> var
count = 0; function test() { } test.prototype = { onchange: function (accesspoints) { netscape.security.privilegemanager.enableprivilege('universalxpconnect'); var d = document.getelementbyid("d"); d.innerhtml = ""; for (var i=0; i<accesspoints.length; i++) { var a = accesspoints[i]; d.innerhtml += "<p>" + a.mac + " " + a.ssid + " " + a.signal + "</p>"; } var...
... c = document.getelementbyid("c"); c.innerhtml = "<p>" +
count++ + "</p>"; }, onerror: function (value) { alert("error: " +value); }, queryinterface: function(iid) { netscape.security.privilegemanager.enableprivilege('universalxpconnect'); if (iid.equals(components.interfaces.nsiwifilistener) || iid.equals(components.interfaces.nsisupports)) return this; throw components.results.ns_error_no_interface; }, } netscape.security.privilegemanager.enableprivilege('universalxpconnect'); var listener = new test(); var wifi_service = components.classes["@mozilla.org/wifi/monitor;1"].getservice(components.interfaces.nsiwifimonitor); wifi_service.startwatching(listener); </script> </head> <body> <div id="d"><p></p></div> <d...
Using microformats - Archive of obsolete content
count()
counts the number of microformats in a document that match specified criteria.
... var nummicroformats = microformats.
count(name, rootelement, options); parameters name the name of the microformat to
count.
Code snippets - Archive of obsolete content
: " + id + ", len = " + len + ", " + record.title); } } print an alphabetically sorted list of members of a collection components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); let ids = json.parse(new resource(weave.service.storageurl + "bookmarks").get()); for each (let id in ids.sort()) { console.log(" " + id); } get a
count of the number of members of a collection on the server let collection = "passwords"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); json.parse(new resource(weave.service.storageurl + collection).get()).length; dump the cleartext of each record in a collection to the console.
...://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); coll.full = true; coll.ids = [id]; coll.recordhandler = function(item) { item.collection = collection; item.decrypt(); console.log(item.cleartext); }; coll.get();
count types of bookmark records components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let deleted = 0; let items = {}; let collection = "bookmarks"; let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); coll.full = true; coll.lim...
Space Manager High Level Design - Archive of obsolete content
during the incremental reflow of dirty lines the block frame may en
counter lines that are not dirty.
... a non-dirty line is en
countered by the block frame in reflowdirtylines block frame calls its propagatefloatdamage method the space manager is checked to see if there is any float damage if there is, then the block frame asks the space manager if the line in question intersects the float damage if the line does intersect a damage interval, then the line is marked dirty if the line does not intersect a damage interval, i...
Tuning Pageload - Archive of obsolete content
specifically - content.notify.ontimer controls whether the frame constructor is notified off a timer at all content.notify.backoff
count controls how many times that happens for a given page (the default is arbitrarily many times).
... once the backoff
count is reached, no more rendering model construction till after the whole page is parsed.
Venkman Internals - Archive of obsolete content
in order to set a breakpoint in a particular function, you'll want to call scriptwrapper.setbreakpoint(pc[, parentbp]); where |pc| is the program
counter location to set the breakpoint, and |parentbp| is an optional "future breakpoint" object to use as the parent for this breakpoint.
...from here, you can set and clear breakpoints by line number (instead of by program
counter), locate a scriptwrapper for a given line number, and do a few other useful things.
Venkman Introduction - Archive of obsolete content
(note that venkman displays usage data when it starts up: "recorded local startup x, global yyy." this data comes from a
counter built in to the application.
... for more information about this
counter and the data, see item 2.2 in the venkman faq.) when you first start venkman, the basic views are arranged as in the screenshot above—though you can customize the layout and presence of the different views however you want, as we describe in the view customization section below.
Using Breakpoints in Venkman - Archive of obsolete content
one of the most important aspects of debugging a script or software program is the ability to examine variables—function return values, errors,
counters, variable scopes—as they change over the course of the script execution.
...to reset the
count, enter a 0 in the "trigger
count" field.
insertItemAt - Archive of obsolete content
note: you cannot insert an item to an index that does not exist, eg: trying to insert an item at the end with element.getrow
count() + 1 example <!-- this example inserts at the selected item or appends, then selects the newly created item --> <script language="javascript"> function insertitemtolist(){ var mylistbox = document.getelementbyid('mylistbox'); // create a date to get some labels and values var somedate = new date(); if(mylistbox.selectedindex == -1){ // no item was selected in list so append to the end ...
... mylistbox.appenditem( somedate.tolocaletimestring(), somedate.gettime() ); var newindex = mylistbox.getrow
count() -1 }else{ // item was selected so insert at the selected item var newindex = mylistbox.selectedindex; mylistbox.insertitemat(newindex, somedate.tolocaletimestring(), somedate.gettime()); } // select the newly created item mylistbox.selectedindex = newindex; } </script> <button label="insert item at selected" oncommand="insertitemtolist()"/> <listbox id="mylistbox"> <listitem label="foo"/> </listbox> see also appenditem() removeitemat() ...
MenuModification - Archive of obsolete content
indicies are
counted starting at 0, so to insert an item before the fourth item pass 3 as the argument.
... menu.appenditem("open", ""); menu.removeitemat(menu.item
count - 1); the item
count property holds the number of items within the menu.
Building Trees - Archive of obsolete content
this example sets the
country associated with a photo as a property of a tree’s rows.
...<rule> <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://www.xulplanet.com/rdf/
country" object="?
country"/> <triple subject="?
country" predicate="http://purl.org/dc/elements/1.1/title" object="?
countrytitle"/> </query> <action> <treechildren> <treeitem uri="?photo"> <treerow properties="?
countrytitle"> <treecell src="?photo"/> </treerow> </treeitem> </treechildren> </action> </rule> you might use the following css to change the border around rows listing a particular
country: treechildren::-moz-tree-row(netherlands) { border: green 1px solid; } ...
textbox (Toolkit autocomplete) - Archive of obsolete content
en, readonly,showcommentcolumn, showimagecolumn, size, tabindex, tabscrolling, timeout, type, value properties accessibletype, completedefaultindex, controller, crop, disableautocomplete, disablekeynavigation, disabled, editable, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, label, maxlength, maxrows, minresultsforpopup, open, popup, popupopen, search
count, searchparam, selectionend, selectionstart, showcommentcolumn, showimagecolumn,size, tabindex, tabscrolling, textlength, textvalue, timeout, type, value methods getsearchat, onsearchcomplete, ontextentered, ontextreverted, select, setselectionrange examples <textbox type="autocomplete" autocompletesearch="history"/> attributes accesskey type: character this should be set to ...
... search
count new in thunderbird 15 requires seamonkey 2.12 type: integer returns the number of search components used.
Manipulating Lists - Archive of obsolete content
for example the selecteditems property holds a list of the items that are selected, while the selected
count property holds the number of items selected.
... deleting selected items the following example shows a method of deleting the selected items properly: example 4 : source view <script> function deleteselection(){ var list = document.getelementbyid('thelist'); var
count = list.selected
count; while (
count--){ var item = list.selecteditems[0]; list.removeitemat(list.getindexofitem(item)); } } </script> <button label="delete" oncommand="deleteselection();"/> <listbox id="thelist" seltype="multiple"> <listitem label="cheddar"/> <listitem label="cheshire"/> <listitem label="edam"/> <listitem label="gouda"/> <listitem label="havartie"/> </listb...
Using Remote XUL - Archive of obsolete content
<?xml version="1.0"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <iframe src="https://www.mozilla.org/" flex="1" /> </window> the xul iframe element is just like its html
counterpart: it defines an area within which web content can be displayed.
...you can't
count on this behavior, however, so you should always specify a stylesheet.
menu - Archive of obsolete content
attributes acceltext, accesskey, allowevents, command, crop, disabled, image, label, menuactive, open, sizetopopup, tabindex, value properties accessibletype, accesskey, command, control, crop, disabled, image, item
count, label, labelelement, menupopup, open, parentcontainer, selected, tabindex, value methods appenditem, getindexofitem, getitematindex, insertitemat, removeitemat style classes menu-iconic example <menubar id="sample-menubar"> <menu id="file-menu" label="file"> <menupopup id="file-popup"> <menuitem label="new"/> <menuitem label="open"/> <menuitem label="save"/> ...
... item
count type: integer read only property holding the number of child items.
menulist - Archive of obsolete content
attributes accesskey, crop, disableautoselect, disabled, editable, focused, image, label, oncommand, open, preference, readonly, sizetopopup, tabindex, value properties accessibletype, crop, description, disableautoselect, disabled, editable, editor, image, inputfield, item
count, label, menuboxobject, menupopup, open, selectedindex, selecteditem, tabindex, value methods appenditem, contains, getindexofitem, getitematindex, insertitemat, removeallitems, removeitemat, select examples <menulist> <menupopup> <menuitem label="option 1" value="1"/> <menuitem label="option 2" value="2"/> <menuitem label="option 3" value="3"/> <menuitem label="option ...
... item
count type: integer read only property holding the number of child items.
radiogroup - Archive of obsolete content
attributes disabled, focused, preference, tabindex, value properties accessibletype, disabled, focuseditem, item
count, selectedindex, selecteditem, tabindex, value methods appenditem, checkadjacentelement, getindexofitem, getitematindex, insertitemat, removeitemat examples <radiogroup> <radio id="orange" label="red"/> <radio id="violet" label="green" selected="true"/> <radio id="yellow" label="blue"/> </radiogroup> attributes disabled type: boolean indicates whether the element is disa...
... item
count type: integer read only property holding the number of child items.
tabs - Archive of obsolete content
attributes closebutton, disableclose, disabled, onclosetab, onnewtab, onselect, setfocus, selectedindex, tabbox, tabindex, tooltiptextnew, value, properties accessibletype, disabled, item
count, selectedindex, selecteditem, tabindex, value, methods advanceselectedtab, appenditem, getindexofitem, getitematindex, insertitemat, removeitemat examples (example needed) attributes closebutton obsolete since gecko 1.9.2 type: boolean if this attribute is set to true, the tabs row will have a "new tab" button and "close" button on the ends.
... item
count type: integer read only property holding the number of child items.
textbox - Archive of obsolete content
to get the actual number of rows in the element, use the getrow
count method.
... the xul script: <textbox id="pnnote" multiline="true" rows="2" cols="70" onkeypress="return pn
countnotechars(event);"/> the javascript: function pn
countnotechars(evt) { //allow non character keys (delete, backspace and and etc.) if ((evt.charcode == 0) && (evt.keycode != 13)) return true; if (evt.target.value.length < 10) { return true; } else { return false; } } related interfaces nsiaccessibleprovider, nsidomxultextboxelement ...
toolbox - Archive of obsolete content
properties accessible, customtoolbar
count, externaltoolbars, palette, toolbarset methods appendcustomtoolbar, collapsetoolbar, expandtoolbar examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="toolbox example" width="300"> <toolbox> <toolbar> <toolbarbutton label="back"/> ...
... customtoolbar
count firefox only type: integer the number of custom toolbars currently within the toolbox.
wizard - Archive of obsolete content
attributes firstpage, lastpage, pagestep, title, windowtype properties canadvance, canrewind, currentpage, onfirstpage, onlastpage, page
count, pageindex, pagestep, title, wizardpages methods advance, cancel, extra1, extra2, getbutton, getpagebyid, goto, rewind examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <wizard id="thewizard" title="secret code wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function checkcode(){ document.gete...
... page
count type: integer this property holds the number of pages in the wizard.
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 ac
count feature has been added to the thunderbird ac
count manager, however, testing is required before release can be issued.
... hence, they are looking for a mac user to test out the new features by building a mac.rdf file with all of the various .mac ac
count properties mentioned in the document here.
2006-11-17 - Archive of obsolete content
how to create top-level folders in inbox with an imap ac
count on courier server.
... solution is provided by jay lee should there be an additional options for ac
count configuration that just delete the messages from the server whenever they are deleted in tb?
2006-10-20 - Archive of obsolete content
marcus claims that when he builds firefox using centos he en
counters crashes (segmentation faults) under linux distributions such as gentoo, suse and fedora.
... he also points out that when he performs a local build any of those platforms (gentoo, suse and fedora) he doesn't en
counter any problems on the same machine.
NPN_Enumerate - Archive of obsolete content
syntax #include <npruntime.h> bool npn_enumerate(npp npp, npobject *npobj, npidentifier **identifiers, uint32_t *identifier
count); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
... identifier
count a pointer to receive the number of identifiers in identifiers.
NPN_GetStringIdentifiers - Archive of obsolete content
syntax #include <npruntime.h> void npn_getstringidentifiers(const nputf8 **names, int32_t name
count, npidentifier *identifiers); parameters the function has the following parameters: names an array of strings for which opaque identifiers should be returned.
... name
count the number of strings in the names array.
NPN_Invoke - Archive of obsolete content
syntax #include <npruntime.h> bool npn_invoke(npp npp, npobject *npobj, npidentifier methodname, const npvariant *args, uint32_t arg
count, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the method on the object.
...arg
count the number of arguments in the args array.
NPN_InvokeDefault - Archive of obsolete content
syntax #include <npruntime.h> bool npn_invokedefault(npp npp, npobject *npobj, const npvariant *args, uint32_t arg
count, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the default method on the object.
... arg
count the number of arguments in the args array.
Vulnerabilities - Archive of obsolete content
an example is the number of consecutive failed authentication attempts to permit before locking out a user ac
count.
... setting this to 1 would be the most secure setting against password guessing attacks, but it would also cause legitimate users to be locked out after mistyping a password once, and it would also permit attackers to perform denial-of-service attacks against users more easily by generating a single failed login attempt for each user ac
count.
Theme changes in Firefox 2 - Archive of obsolete content
extensions/update.css the following styles are no longer used in firefox 2 and should be removed from your theme: #foundlist #statusbar-updates .updatecategorybox .updatecategorycontent .updatecategoryicon .updatecategorylabel[selected="true"] .updateicon .updateicon[severity="0"] .updateicon[severity="1"] .updateicon[severity="2"] .updateindicator > label .updateindicator[update
count="0"] .updateitemchecked .updateitemchecked .checkbox-label-box .updateitemfromlabel .updateitemicon .updateitemicon .updateitemname .updateitemnamerow .updateitemurl .warning radio[type="update-type"] radiogroup[type="update-types"] toolbarbutton[type="updates"] toolbarbutton[type="updates"] > .toolbarbutton-icon toolbarbutton[type="updates"][severity="0"] > .toolbarbutton-icon too...
...lbarbutton[type="updates"][severity="1"] > .toolbarbutton-icon toolbarbutton[type="updates"][severity="2"] > .toolbarbutton-icon toolbarbutton[type="updates"][update
count="0"] updateitem the following styles were also added: .alertbox .throbber ...
Browser Feature Detection - Archive of obsolete content
dertopstyle true true true borderrightstyle true true true borderbottomstyle true true true borderleftstyle true true true bottom true true true captionside true false true clear true true true clip true true true content true false true
counterincrement true false true
counterreset true false true cue true false false cueafter true false false cuebefore true false false cursor true true true direction true true true elevation true false false emptycells true false true fontsi...
...ordertopstyle', 'supported': false}, {name: 'borderrightstyle', 'supported': false}, {name: 'borderbottomstyle', 'supported': false}, {name: 'borderleftstyle', 'supported': false}, {name: 'bottom', 'supported': false}, {name: 'captionside', 'supported': false}, {name: 'clear', 'supported': false}, {name: 'clip', 'supported': false}, {name: 'content', 'supported': false}, {name: '
counterincrement', 'supported': false}, {name: '
counterreset', 'supported': false}, {name: 'cue', 'supported': false}, {name: 'cueafter', 'supported': false}, {name: 'cuebefore', 'supported': false}, {name: 'cursor', 'supported': false}, {name: 'direction', 'supported': false}, {name: 'elevation', 'supported': false}, {name: 'emptycells', 'supported': false}, {name: 'fontsizeadjust', ...
Array.observe() - Archive of obsolete content
added
count: only for the "splice" type.
... examples logging different change types var arr = ['a', 'b', 'c']; array.observe(arr, function(changes) { console.log(changes); }); arr[1] = 'b'; // [{type: 'update', object: <arr>, name: '1', oldvalue: 'b'}] arr[3] = 'd'; // [{type: 'splice', object: <arr>, index: 3, removed: [], added
count: 1}] arr.splice(1, 2, 'beta', 'gamma', 'delta'); // [{type: 'splice', object: <arr>, index: 1, removed: ['b', 'c'], added
count: 3}] specifications strawman proposal specification.
Array.unobserve() - Archive of obsolete content
examples unobserving an array var arr = [1, 2, 3]; var observer = function(changes) { console.log(changes); } array.observe(arr, observer); arr.push(4); // [{type: "splice", object: <arr>, index: 3, removed:[], added
count: 1}] array.unobserve(arr, observer); arr.pop(); // the callback wasn't called using an anonymous function var persons = ['khalid', 'ahmed', 'mohammed']; array.observe(persons, function (changes) { console.log(changes); }); persons.shift(); // [{type: "splice", object: <arr>, index: 0, removed: [ "khalid" ], added
count: 0 }] array.unobserve(persons, function (changes) { console.log(chan...
...ges); }); persons.push('abdullah'); // [{type: "splice", object: <arr>, index: 2, removed: [], added
count: 1 }] // the callback will always be called ...
RDF in Mozilla FAQ - Archive of obsolete content
some examples of datasources that exist today are "browser bookmarks", "browser global history", "imap mail ac
counts", "nntp news servers", and "rdf/xml files".
... for a more detailed ac
count of how to write a datasource, refer to the rdf datasource how-to.
Game promotion - Game development
write about your development process, nasty bugs you en
counter, funny stories, lessons learned, and the ups and downs of being a game developer.
... grow your fanbase by talking to them, sharing tips, offering dis
counts, giving away prizes in competitions, or just complaining at the weather or buggy browser you have to deal with.
Bounding volume collision detection with THREE.js - Game development
a more simple alternative that fixes the previous issue is to set those boundaries later on with box3.setfromobject, which will compute the dimensions taking into ac
count a 3d entity's transformations and any child meshes as well.
... it takes into ac
count the child meshes when computing the size of the bounding box, so the original mesh and all its children are wrapped.
Building up a basic demo with Three.js - Game development
var torusgeometry = new three.torusgeometry(7, 1, 6, 12); var phongmaterial = new three.meshphongmaterial({color: 0xff9500}); var torus = new three.mesh(torusgeometry, phongmaterial); scene.add(torus); these lines will add a torus geometry; the torusgeometry() method's parameters define, and the parameters are radius, tube diameter, radial segment
count, and tubular segment
count.
...first, we implement a helper variable, called t, for
counting elapsed time.
Finishing up - Game development
let's first add a variable to store the number of lives in the same place where we declared our other variables: var lives = 3; drawing the life
counter looks almost the same as drawing the score
counter — add the following function to your code, below the drawscore() function: function drawlives() { ctx.font = "16px arial"; ctx.fillstyle = "#0095dd"; ctx.filltext("lives: "+lives, canvas.width-65, 20); } instead of ending the game immediately, we will decrease the number of lives until they are no longer available.
...you can check out this series'
counterpart, 2d breakout game using phaser or the cyber orb built in phaser tutorial.
FTP - MDN Web Docs Glossary: Definitions of Web-related terms
increasingly, though, teams and hosting ac
counts don't allow ftp and instead rely on a version control system like git.
... you will still find it used on older hosting ac
counts, but it is safe to say that ftp is no longer considered best practice.
Parse - MDN Web Docs Glossary: Definitions of Web-related terms
parsing can continue when a css file is en
countered, but <script> tags—particularly those without an async or defer attribute—blocks rendering, and pauses parsing of html.
... when the browser en
counters css styles, it parses the text into the css object model (or cssom), a data structure it then uses for styling layouts and painting.
SQL Injection - MDN Web Docs Glossary: Definitions of Web-related terms
how it works after entering username and password, behind the gui the sql queries work as follows: "select
count(*) from users where username=' " + txt.user.text+" ' and password=' "+ txt.password.text+" ' "; now suppose user enters the username: admin and password: passwd123, so after clicking on the log in button, sql query will run as follows: "select
count(*) from users where username=' admin ' and password=' passwd123 ' "; if the credentials are correct, then the user is allowed to log in, so it's...
... hackers use a simple string called a magical string, for example: username: admin password: anything 'or'1'='1 after clicking on the login button, the sql query will work as follows: "select
count(*) from users where username=' admin ' and password=' anything 'or'1'='1 ' "; just take a closer look at the above query's password section.
TLD - MDN Web Docs Glossary: Definitions of Web-related terms
iana today distinguishes the following groups of top-level domains:
country-code top-level domains (cctld) two-character domains established for
countries or territories.
... internationalized
country code top-level domains (idn cctld) cctlds in non-latin character sets (e.g., arabic or chinese).
Introduction to cross browser testing - Learn web development
overview: cross browser testing next this article starts the module off by providing an overview of the topic of (cross) browser testing, answering questions such as "what is cross browser testing?", "what are the most common types of problems you'll en
counter?", and "what are the main approaches for testing, identifying, and fixing problems?" prerequisites: familiarity with the core html, css, and javascript languages.
...if not, you will be able to get a good idea by looking at other sources, such as usage stats for competitors, or
countries the site will be serving.
A bird's-eye view of the Mozilla framework
the xpcom component keeps track of all interface pointers currently held by its clients using an internal reference
count it increments via client calls to addref().
...release() decrements the reference
count and then the object becomes a candidate for destruction.
Creating a Login Manager storage module
}, initwithfile: function slms_initwithfile(ainputfile, aoutputfile) { this.stub(arguments); }, addlogin: function slms_addlogin(login) { this.stub(arguments); }, removelogin: function slms_removelogin(login) { this.stub(arguments); }, modifylogin: function slms_modifylogin(oldlogin, newlogin) { this.stub(arguments); }, getalllogins: function slms_getalllogins(
count) { this.stub(arguments); }, removealllogins: function slms_removealllogins() { this.stub(arguments); }, getalldisabledhosts: function slms_getalldisabledhosts(
count) { this.stub(arguments); }, getloginsavingenabled: function slms_getloginsavingenabled(hostname) { this.stub(arguments); }, setloginsavingenabled: function slms_setloginsavingenabled(hostname, enabled) ...
...{ this.stub(arguments); }, findlogins: function slms_findlogins(
count, hostname, formsubmiturl, httprealm) { this.stub(arguments); },
countlogins: function slms_
countlogins(ahostname, aformsubmiturl, ahttprealm) { this.stub(arguments); } }; function nsgetmodule(compmgr, filespec) xpcomutils.generatemodule([sampleloginmanagerstorage]); sample c++ implementation bug 309807 contains a complete example.
Debugging Frame Reflow
it provides the following information for each frame at the start of its reflow reflow reason available width, available height computed width, computed height the previous and the next frame in flow and a
count number.
...the line
count is 856 (cnt=856).
Debugging Table Reflow
roup> <col> <col width="50%"> <col width="1*"> <col> </colgroup> <tr> <td style="width:80px">cell 1</td> <td>cell 2</td> <td>cell 3</td> <td>cell 4</td> </tr> </table> rendering: <colgroup><col><col width="50%"><col width="1*"><col></colgroup>cell 1cell 2cell 3cell 4 it will produce the following log at the entrance of assignnonpctcolwidths: assignnonpctcolwidths en max=4500
count=0 ***start table dump*** mcolwidths=-1 -1 -1 -1 col frame cache -> 0=00b93138 1=00b931f0 2=024dd728 3=024dd780 **start col dump** colindex=0 isanonymous=0 constraint=0 widths=-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 **end col dump** **start col dump** colindex=1 isanonymous=0 constraint=0 widths=-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 **end col dump** **start col dump** colindex=2 isanonymous=0 constraint=...
... min_con des_con fix min_adj des_adj fix_adj pct pct_adj min_pro final 360 540 1230 -1 -1 -1 -1 -1 -1 360 there was no change till the entrance of balancecolumnwidths balancecolumnwidths en
count=1 ***start table dump*** mcolwidths=360 360 360 360 col frame cache -> 0=00b93138 1=00b931f0 2=024dd728 3=024dd780 **start col dump** colindex=0 isanonymous=0 constraint=0 widths=360 540 1230 -1 -1 -1 -1 -1 -1 360 **end col dump** **start col dump** colindex=1 isanonymous=0 constraint=0 widths=360 540 -1 -1 -1 -1 -1 -1 -1 360 **end col dump** **start col dump** colindex=2 isanonymous=0...
Configuring Build Options
in some
countries, it may be illegal to use or export cryptographic software.
... you should become familiar with the cryptography laws in your
country.
Performance
should be registered in a process script or jsm instead load frame scripts on demand bad: // addon.js services.mm.loadframescript("framescript.js", /*delayed:*/ true) // stuff communicating with the framescript // framescript.js function onlyonceinabluemoon() { // we only need this during a total solar eclipse while goat blood rains from the sky sendasyncmessage('my-addon:paragraph-
count', {num: content.document.queryselectorall('p').length}) } addmessagelistener("my-addon:request-from-parent", onlyonceinabluemoon) better: // addon.js function ontoolbarbutton(event) { let tabmm = gbrowser.mcurrentbrowser.frameloader.messagemanager; let button = event.target; let callback = (message) => { tabmm.removemessagelistener("my-addon:paragraph-
count", callback) decoratebu...
...tton(button, message.data.num) } tabmm.addmessagelistener("my-addon:paragraph-
count", callback); tabmm.loadframescript("data:,sendasyncmessage('my-addon:paragraph-
count', {num: content.document.queryselectorall('p').length})", false) } function decoratebutton(button,
count) { // do stuff with result } this executes the script only when it is needed and only in one tab and allows it to be garbage-collected immediately after execution.
mozbrowseropensearch
when an instance of <link rel="search" type="application/opensearchdescription+xml"> is en
countered.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowseropensearch", function( event ) { console.log("new search engine en
countered: " + event.details.title); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsertitlechange ...
HTMLIFrameElement.sendMouseEvent()
syntax instanceofhtmliframeelement.sendmouseevent(type, x, y, button, click
count, modifiers); returns void.
... click
count the number of clicks that should be performed.
HTMLIFrameElement.sendTouchEvent()
syntax instanceofhtmliframeelement.sendtouchevent(type, x, y, rx, ry, rotationangles, forces,
count, modifiers); returns void.
...
count the number of touches that should be performed.
Overview of Mozilla embedding APIs
nscomptr<interface-type> these are templatized smart pointers which transparently deal with xpcom reference
counting issues.
...this interface provides runtime interface discovery and a reference
counted memory model fashioned after the microsoft com iunknown interface.
HTTP Cache
we also - in a thread-safe manner -
count the number of consumers keeping a reference on each entry.
... the open callback actually doesn't give the consumer directly the cacheentry object but a small wrapper class that manages the 'consumer reference
counter' on its cache entry.
How Mozilla determines MIME Types
this means that, for example, if mozilla en
counters a <link type="text/css" rel="stylesheet" href="..."> element, a type of text/css will be assumed.
...when en
countering a non-text byte, the helper app dialog will be shown, showing the mime type corresponding to the extension of the file.
How to implement a custom autocomplete search component
sult; }, /** * @return {number} the index of the default item that should be entered if * none is selected */ get defaultindex() { return this._defaultindex; }, /** * @return {string} description of the cause of a search failure */ get errordescription() { return this._errordescription; }, /** * @return {number} the number of matches */ get match
count() { return this._results.length; }, /** * @return {string} the value of the result at the given index */ getvalueat: function(index) { return this._results[index]; }, /** * @return {string} the comment of the result at the given index */ getcommentat: function(index) { if (this._comments) return this._comments[index]; else return ''; }, /...
...d) */ get searchresult() { return this._searchresult; }, /** * index of the default item that should be entered if none is selected */ get defaultindex() { return this._defaultindex; }, /** * a string describing the cause of a search failure */ get errordescription() { return this._errordescription; }, /** * the number of matches */ get match
count() { return this._results.length; }, /** * get the value of the result at the given index */ getvalueat: function(index) { return this._results[index]; }, /** * get the comment of the result at the given index */ getcommentat: function(index) { return this._comments[index]; }, /** * get the style hint for the result at the given index */ getstylea...
CustomizableUI.jsm
note that non-removable non-default widgets and non-existing widgets are not taken into ac
count in determining whether we're in the default state.
... panel_column_
count number 3, the (constant) number of columns in the menu panel.
nsIApplicationCacheService
tunistically(in nsiapplicationcache cache, in acstring key); nsiapplicationcache chooseapplicationcache(in acstring key); nsiapplicationcache createapplicationcache(in acstring group); void deactivategroup(in acstring group); nsiapplicationcache getactivecache(in acstring group); nsiapplicationcache getapplicationcache(in acstring clientid); void getgroups([optional] out unsigned long
count, [array, size_is(
count), retval] out string groupids); methods cacheopportunistically() flags the specified key as one that should be cached opportunistically.
...void getgroups( out unsigned long
count, optional [array, size_is(
count), retval] out string groupids ); parameters
count optional the
count of the application cache groups.
nsIBrowserHistory
attributes attribute type description
count obsolete since gecko 15.0 pruint32 indicates if there are entries in global history.
... note: the
count attribute was removed in gecko 15.0 because it was only used to determine if there were any entries at all anyway, so the nsinavhistoryservice.hashistoryentries attribute is better for this.
nsIDOMSimpleGestureEvent
the value is specified in degrees for rotation events (where positive values indicate clockwise rotation and negative values indicate
counter-clockwise rotation).
... rotation constants constant value description rotation_
counterclockwise 1
counter-clockwise rotation.
nsIDictionary
method overview boolean haskey(in string key); void getkeys(out pruint32
count, [retval, array, size_is(
count)] out string keys); nsisupports getvalue(in string key); void setvalue(in string key, in nsisupports value); nsisupports deletevalue(in string key); void clear(); methods haskey() check if a given key is present in the dictionary.
... void getkeys( out pruint32
count, [retval, array, size_is(
count)] out string keys ); return value array of all keys, unsorted.
nsIEditor
ion); void removeattributeorequivalent(in nsidomelement element, in domstring sourceattrname, in boolean asuppresstransaction); void postcreate(); void predestroy(in boolean adestroyingframes); selected content removal void deleteselection(in short action, in short stripwrappers); document info and file methods void resetmodification
count(); long getmodification
count(); void incrementmodification
count(in long amod
count); void incrementmodification
count(in long amod
count); transaction methods void dotransaction(in nsitransaction txn); void enableundo(in boolean enable); void undo(in unsigned long
count); void canundo(out boolean isenabled, out boolean canundo);...
... void redo(in unsigned long
count); void canredo(out boolean isenabled, out boolean canredo); void begintransaction(); void endtransaction(); void beginplaceholdertransaction(in nsiatom name); void endplaceholdertransaction(); boolean shouldtxnsetselection(); void setshouldtxnsetselection(in boolean should); inline spellchecking methods nsiinlinespellchecker getinlinespellchecker(in boolean autocreate); void syncrealtimespell(); void setspellcheckuseroverride(in boolean enable); clipboard methods void cut(); boolean cancut(); void copy(); boolean cancopy(); void paste(in long aselectiontype); boolean canpaste(in long aselectio...
nsIMsgDBHdr
line
count unsigned long indicates the size of the message body in number of lines.
... ac
countkey string indicates the ac
count that was originally used to fetch the message.
nsIMsgFolder
nsmsgdispositionstate_none -1 nsmsgdispositionstate_replied 0 nsmsgdispositionstate_forwarded 1 allmessage
countnotifications 0 turn notifications on/off for various notification types.
... currently only supporting allmessage
countnotifications which refers to both total and unread message
counts.
nsIMsgIncomingServer
void setintattribute(in string name, in long value); void setintvalue(in string attr, in long value); void setunicharattribute(in string name, in astring value); void setunicharvalue(in string attr, in astring value); void shutdown(); void storepassword(); astring tostring(); void writetofoldercache(in nsimsgfoldercache foldercache); attributes attribute type description ac
countmanagerchrome astring read only.
... cancreatefoldersonserver boolean candelete boolean can this server be removed from the ac
count manager?
nsIMsgSearchSession
string arbitraryheader); nsimsgsearchterm createterm(); void appendterm(in nsimsgsearchterm term); void registerlistener(in nsimsgsearchnotify listener); void unregisterlistener(in nsimsgsearchnotify listener); void getnthsearchterm(in long whichterm, in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value); long
countsearchscopes(); void getnthsearchscope(in long which,out nsmsgsearchscopevalue scopeid, out nsimsgfolder folder); void addscopeterm(in nsmsgsearchscopevalue scope, in nsimsgfolder folder); void adddirectoryscopeterm(in nsmsgsearchscopevalue scope); void clearscopes(); [noscript] boolean scopeusescustomheaders(in nsmsgsearchscopevalue scope, in voidptr ...
...
countsearchscopes() long
countsearchscopes(); getnthsearchscope() void getnthsearchscope(in long which, out nsmsgsearchscopevalue scopeid, out nsimsgfolder folder); parameters which return values scopeid folder addscopeterm() add a scope (e.g.
nsINavHistoryContainerResultNode
st changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsinavhistoryresultnode findnodebydetails(in autf8string auristring, in prtime atime, in long long aitemid, in boolean arecursive); nsinavhistoryresultnode getchild(in unsigned long aindex); unsigned long getchildindex(in nsinavhistoryresultnode anode); attributes attribute type description child
count unsigned long the number of child nodes; accessing this throws an ns_error_not_available exception of containeropen is false.
...when closed, attempting to call getchild() or access child
count results in an error.
nsINavHistoryQueryOptions
sort_by_visit
count_ascending 7 sort by the ascending visit
count order.
... sort_by_visit
count_descending 8 sort by the descending visit
count order.
nsINavHistoryResultTreeViewer
obsolete since gecko 1.9 flatitem
count pruint32 this tells you how many items are in the flattened list of results, that is how many rows are in this tree right now.
... the tree adaptor will also qi to nsitreeview, and this will be the same as nsitreeview.row
count.
nsIPrinterEnumerator
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void displaypropertiesdlg(in wstring aprinter, in nsiprintsettings aprintsettings); void enumerateprinters(out pruint32 a
count,[retval, array, size_is(a
count)] out wstring aresult); obsolete since gecko 1.9 void initprintsettingsfromprinter(in wstring aprintername, in nsiprintsettings aprintsettings); attributes attribute type description defaultprintername wstring the name of the system default printer.
...void enumerateprinters( out pruint32 a
count, [retval, array, size_is(a
count)] out wstring aresult ); parameters a
count returns number of printers returned.
nsIProperties
to get an instance, use: var properties = components.classes["@mozilla.org/file/directory_service;1"] .getservice(components.interfaces.nsiproperties); method overview void get(in string prop, in nsiidref iid, [iid_is(iid),retval] out nsqiresult result); void getkeys(out pruint32
count, [array, size_is(
count), retval] out string keys); boolean has(in string prop); void set(in string prop, in nsisupports value); void undefine(in string prop); methods get() gets the xpcom object associated with a particular name.
...void getkeys( out pruint32
count, [array, size_is(
count), retval] out string keys ); parameters
count the length of the result array.
nsIScriptableUnicodeConverter
instance, use: var converter = components.classes["@mozilla.org/intl/scriptableunicodeconverter"] .createinstance(components.interfaces.nsiscriptableunicodeconverter); method overview acstring convertfromunicode(in astring asrc); acstring finish(); astring converttounicode(in acstring asrc); astring convertfrombytearray([const,array,size_is(a
count)] in octet adata, in unsigned long a
count); void converttobytearray(in astring astring,[optional] out unsigned long alen,[array, size_is(alen),retval] out octet adata); nsiinputstream converttoinputstream(in astring astring); attributes attribute type description charset string current character set.
... astring convertfrombytearray( [const,array,size_is(a
count)] in octet adata, in unsigned long a
count ); converttobytearray() convert a unicode string to an array of bytes.
Index - Firefox Developer Tools
it then provides a number of views of the heap that can show you which objects ac
count for memory usage and exactly where in your code you are allocating memory.
...you can sometimes en
counter problems working with source maps.
DOM allocation example - Firefox Developer Tools
it just contains a script that creates a large number of dom nodes: var toolbarbutton
count = 20; var toolbar
count = 200; function getrandomint(min, max) { return math.floor(math.random() * (max - min + 1)) + min; } function createtoolbarbutton() { var toolbarbutton = document.createelement("span"); toolbarbutton.classlist.add("toolbarbutton"); // stop spidermonkey from sharing instances toolbarbutton[getrandomint(0,5000)] = "foo"; return toolbarbutton; } function createtoolbar() { var toolbar = document.createelement("div"); // stop spidermonkey from sharing inst...
...ances toolbar[getrandomint(0,5000)] = "foo"; for (var i = 0; i < toolbarbutton
count; i++) { var toolbarbutton = createtoolbarbutton(); toolbar.appendchild(toolbarbutton); } return toolbar; } function createtoolbars() { var container = document.getelementbyid("container"); for (var i = 0; i < toolbar
count; i++) { var toolbar = createtoolbar(); container.appendchild(toolbar); } } createtoolbars(); a simple pseudocode representation of how this code operates looks like this: createtoolbars() -> createtoolbar() // called 200 times, creates 1 div element each time -> createtoolbarbutton() // called 20 times per toolbar, creates 1 span element each time in total, then, it creates 200 htmldivelement objects, and 4000 htmlspanelement objects.
Dominators view - Firefox Developer Tools
this includes the integer eye- and tentacle-
counts.
... each monster has a bigger retained size, which is ac
counted for by the string used for the monster's name: all this maps closely to the memory graph we were expecting to see.
Monster example - Firefox Developer Tools
here's the code: var monster_
count = 5000; var min_name_length = 2; var max_name_length = 48; function monster() { function randomint(min, max) { return math.floor(math.random() * (max - min + 1)) + min; } function randomname() { var chars = "abcdefghijklmnopqrstuvwxyz"; var namelength = randomint(min_name_length, max_name_length); var name = ""; for (var j = 0; j < namelength; j++) { name += chars[randomint(0, chars.length-1)]; } return name; } this.name = randomname(); this.eye
count = randomint(0, 25); this.tentacle
count = random...
...int(0, 250); } function makemonsters() { var monsters = { "friendly": [], "fierce": [], "undecided": [] }; for (var i = 0; i < monster_
count; i++) { monsters.friendly.push(new monster()); } for (var i = 0; i < monster_
count; i++) { monsters.fierce.push(new monster()); } for (var i = 0; i < monster_
count; i++) { monsters.undecided.push(new monster()); } console.log(monsters); } var makemonstersbutton = document.getelementbyid("make-monsters"); makemonstersbutton.addeventlistener("click", makemonsters); the page contains a button: when you push the button, the code creates some monsters.
Flame Chart - Firefox Developer Tools
in the call tree page, we figured out that the program call graph in that profile, and the associated sample
count, looked like this: sortall() // 8 -> sort() // 37 -> bubblesort() // 1345 -> swap() // 252 -> selectionsort() // 190 -> swap() // 1 -> quicksort() // 103 -> partition() // 12 first, we'll just select the whole ...
...if you
counted them all, the call tree view tells us that you'd see 253 of them.
Console messages - Firefox Developer Tools
number of occurrences if a line that generates a warning or error is executed more than once, it is only logged once and this
counter appears to indicate how many times it was en
countered.
... the web console supports the following console api messages: assert() clear()
count() dir() dirxml() error() exception() group() groupend() info() log() table() time() timeend() trace() warn() the console prints a stack trace for all error messages, like this: function foo() { console.error("it explodes"); } function bar() { foo(); } function dostuff() { bar(); } dostuff(); server server-side log messages was introduced in firefox 43, but removed in ...
AudioBuffer.duration - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, frame
count, audioctx.samplerate); myarraybuffer.duration; value a double.
... example // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var frame
count = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, frame
count, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < frame
count; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.duration); } specification specifi...
AudioBuffer.length - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, frame
count, audioctx.samplerate); myarraybuffer.length; value an integer.
... example // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var frame
count = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, frame
count, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < frame
count; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.length); } specification specificat...
AudioBuffer.numberOfChannels - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, frame
count, audioctx.samplerate); myarraybuffer.numberofchannels; value an integer.
... example // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var frame
count = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, frame
count, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < frame
count; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.numberofchannels); } specification ...
AudioBuffer.sampleRate - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, frame
count, audioctx.samplerate); myarraybuffer.samplerate; value a floating-point value indicating the current sample rate of the buffers data, in samples per second.
... example // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var frame
count = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, frame
count, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < frame
count; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.samplerate); } specification specif...
AudioTrackList - Web APIs
var audiotracks = document.queryselector("video").audiotracks; monitoring track
count changes in this example, we have an app that displays information about the number of channels available.
... audiotracks.onaddtrack = updatetrack
count; audiotracks.onremovetrack = updatetrack
count; function updatetrack
count(event) { track
count = audiotracks.length; drawtrack
countindicator(track
count); } specifications specification status comment html living standardthe definition of 'audiotracklist' in that specification.
AudioWorkletProcessor() - Web APIs
outputchannel
count optional an array defining the number of channels for each output.
... for example, outputchannel
count: [n, m] specifies the number of channels in the first output to be n and the second output to be m.
BaseAudioContext.createBufferSource() - Web APIs
var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var button = document.queryselector('button'); var pre = document.queryselector('pre'); var myscript = document.queryselector('script'); pre.innerhtml = myscript.innerhtml; // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var frame
count = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, frame
count, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(ch...
...annel); for (var i = 0; i < frame
count; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } // get an audiobuffersourcenode.
BasicCardRequest - Web APIs
instead of using this property, it is up to the server to check support for the card given the information coded into the ac
count number.
...this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr dick straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "
country" : "gb", // etc.
CSS Object Model (CSSOM) - Web APIs
reference animationevent caretposition css csscharsetrule cssconditionrule css
counterstylerule cssfontfacerule cssfontfeaturevaluesmap cssfontfeaturevaluesrule cssgroupingrule cssimportrule csskeyframerule csskeyframesrule cssmarginrule cssmediarule cssnamespacerule csspagerule cssrule cssrulelist cssstyledeclaration cssstylesheet cssstylerule csssupportsrule cssvariablesmap cssviewportrule elementcssinlinestyle fontface fontfaceset fontfacesetloadevent geometryutils getstyleutils linkstyle medialist mediaquerylist mediaquerylistevent mediaquerylist...
... css device adaptation working draft css
counter styles level 3 candidate recommendation document object model (dom) level 2 style specification obsolete initial definition.
Using the CSS Typed Object Model - Web APIs
elector('p'); // get the table we'll be populating const stylestable = document.queryselector('#regurgitation'); // retrieve all computed styles with computedstylemap() const allcomputedstyles = myelement.computedstylemap(); // array of properties we're interested in const ofinterest = ['padding-top', 'margin-bottom', 'font-size', 'font-stretch', 'animation-duration', 'animation-iteration-
count', 'width', 'height']; // iterate thru our properties of interest for ( let i = 0; i < ofinterest.length; i++ ) { // create a row const row = document.createelement( 'tr' ); // add the name of the property const cssproperty = document.createelement( 'td' ); cssproperty.appendchild( document.createtextnode( ofinterest[i] ) ); row.appendchild( cssproperty ); // an...
... to the table stylestable.appendchild( row ); } for those of you using a non-supporting browser, the above output should looks something like this: property value unit padding-top 0 px margin-bottom 16 px font-size 16 px font-stretch 100 percent animation-duration 0 s animation-iteration-
count 1 number width auto undefined height auto undefined you'll note the <length> unit returned is px, the <percentage> unit returned is percent, the <time> unit is s for 'seconds', and the unitless <number> unit is number.
console - Web APIs
console.
count() log the number of times this line has been called with the given label.
... console.
countreset() resets the value of the
counter with the given label.
Credential Management API - Web APIs
these capabilities allow users to sign in without typing passwords, see the federated ac
count they used to sign in to a site, and resume a session without the explicit sign-in flow of an expired session.
...this give users capabilities such as seeing the federated ac
count they used to sign on to a site, or resuming a session without the explicit sign-in flow of an expired session.
DataTransfer.mozSetDataAt() - Web APIs
mozsetdataat() may only be called with an index argument less than mozitem
count in which case an existing item is modified, or equal to mozitem
count in which case a new item is added, and the mozitem
count is incremented by one.
... function dragstart_handler(event) { var dt = event.datatransfer; var idx = dt.mozitem
count; // add two new items to the drag transfer if (idx >= 0) { dt.mozsetdataat("text/uri-list","http://www.example.com/", idx); dt.mozsetdataat("text/html", "hello world", idx+1); } } specifications this method is not defined in any web standard.
Document: animationiteration event - Web APIs
this event does not occur at the same time as the animationend event, and therefore does not occur for animations with an animation-iteration-
count of one.
... examples this code uses animationiteration to keep track of the number of iterations an animation has completed: let iteration
count = 0; document.addeventlistener('animationiteration', () => { iteration
count++; console.log(`animation iteration
count: ${iteration
count}`); }); the same, but using the onanimationiteration event handler property: let iteration
count = 0; document.onanimationiteration = () => { iteration
count++; console.log(`animation iteration
count: ${iteration
count}`); }; see a live example of this ...
EXT_disjoint_timer_query - Web APIs
ext.query_
counter_bits_ext a glint indicating the number of bits used to hold the query result for the given target.
... ext.query
counterext() records the current time into the corresponding query object.
Element: mouseenter event - Web APIs
#mousetarget { box-sizing: border-box; width:15rem; border:1px solid #333; } javascript var enterevent
count = 0; var leaveevent
count = 0; const mousetarget = document.getelementbyid('mousetarget'); const unorderedlist = document.getelementbyid('unorderedlist'); mousetarget.addeventlistener('mouseenter', e => { mousetarget.style.border = '5px dotted orange'; enterevent
count++; addlistitem('this is mouseenter event ' + enterevent
count + '.'); }); mousetarget.addeventlistener('mouseleave', e => { ...
... mousetarget.style.border = '1px solid #333'; leaveevent
count++; addlistitem('this is mouseleave event ' + leaveevent
count + '.'); }); function addlistitem(text) { // create a new text node using the supplied text var newtextnode = document.createtextnode(text); // create a new li element var newlistitem = document.createelement("li"); // add the text node to the li element newlistitem.appendchild(newtextnode); // add the newly created list item to list unorderedlist.appendchild(newlistitem); } result specifications specification status ui eventsthe definition of 'mouseenter' in that specification.
Element: mouseleave event - Web APIs
#mousetarget { box-sizing: border-box; width:15rem; border:1px solid #333; } javascript var enterevent
count = 0; var leaveevent
count = 0; const mousetarget = document.getelementbyid('mousetarget'); const unorderedlist = document.getelementbyid('unorderedlist'); mousetarget.addeventlistener('mouseenter', e => { mousetarget.style.border = '5px dotted orange'; enterevent
count++; addlistitem('this is mouseenter event ' + enterevent
count + '.'); }); mousetarget.addeventlistener('mouseleave', e => { ...
... mousetarget.style.border = '1px solid #333'; leaveevent
count++; addlistitem('this is mouseleave event ' + leaveevent
count + '.'); }); function addlistitem(text) { // create a new text node using the supplied text var newtextnode = document.createtextnode(text); // create a new li element var newlistitem = document.createelement("li"); // add the text node to the li element newlistitem.appendchild(newtextnode); // add the newly created list item to list unorderedlist.appendchild(newlistitem); } result specifications specification status ui eventsthe definition of 'mouseleave' in that specification.
EventTarget.addEventListener() - Web APIs
if (document.readystate=="complete") { var e=new event(); e.srcelement=window; wrapper2(e); } } else { this.attachevent("on"+type,wrapper); eventlisteners.push({object:this,type:type,listener:listener,wrapper:wrapper}); } }; var removeeventlistener=function(type,listener /*, usecapture (will be ignored) */) { var
counter=0; while (
counter<eventlisteners.length) { var eventlistener=eventlisteners[
counter]; if (eventlistener.object==this && eventlistener.type==type && eventlistener.listener==listener) { if (type=="domcontentloaded") { this.detachevent("onreadystatechange",eventlistener.wrapper); } else { this.detachevent("on"+type,eventlistener.wra...
...pper); } eventlisteners.splice(
counter, 1); break; } ++
counter; } }; element.prototype.addeventlistener=addeventlistener; element.prototype.removeeventlistener=removeeventlistener; if (htmldocument) { htmldocument.prototype.addeventlistener=addeventlistener; htmldocument.prototype.removeeventlistener=removeeventlistener; } if (window) { window.prototype.addeventlistener=addeventlistener; window.prototype.removeeventlistener=removeeventlistener; } } })(); older way to register event listeners addeventlistener() was introduced with the dom 2 events specification.
GlobalEventHandlers.onanimationiteration - Web APIs
var box = document.getelementbyid("box"); var iteration
counter = 0; box.onanimationiteration = function(event) { box.style.animationplaystate = "paused"; document.getelementbyid("play").innerhtml = "start iteration #" + (iteration
counter+1); }; this sets up two global variables: box, which references the "box" element that we're animating, and iteration
counter, which is initially zero, which indicates how many iterations of the animation have occurr...
... finally, we set up a handler for a click on the button that runs the animation: document.getelementbyid("play").addeventlistener("click", function(event) { box.style.animationplaystate = "running"; iteration
counter++; }, false); this sets the box element's animation-play-state to "running" and increments the iteration
counter.
HTMLOrForeignElement.dataset - Web APIs
name conversion dash-style to camelcase conversion a custom data attribute name is transformed to a key for the domstringmap entry with the following rules the prefix data- is removed (including the dash); for any dash (u+002d) followed by an ascii lowercase letter a to z, the dash is removed, and the letter is transformed into its uppercase
counterpart; other characters (including other dashes) are left unchanged.
... camelcase to dash-style conversion the opposite transformation, which maps a key to an attribute name, uses the following rules: restriction: before the transformation, a dash must not be immediately followed by an ascii lowercase letter a to z; the prefix data- is added; any ascii uppercase letter a to z is transformed into a dash, followed by its lowercase
counterpart; other characters are left unchanged.
IDBCursor.advance() - Web APIs
syntax cursor.advance(
count); parameters
count the number of times to move the cursor forward.
... typeerror the value passed into the
count parameter was zero or a negative number.
IDBCursor.continuePrimaryKey() - Web APIs
example here’s how you can resume an iteration of all articles tagged with "javascript" since your last visit: let request = articlestore.index("tag").opencursor(); let
count = 0; let unreadlist = []; request.onsuccess = (event) => { let cursor = event.target.result; if (!cursor) { return; } let lastprimarykey = getlastiteratedarticleid(); if (lastprimarykey > cursor.primarykey) { cursor.continueprimarykey("javascript", lastprimarykey); return; } // update lastiteratedarticleid setlastiteratedarticleid(cursor.primarykey); //...
... preload 5 articles into the unread list; unreadlist.push(cursor.value); if (++
count < 5) { cursor.continue(); } }; specifications specification status comment indexed database api draftthe definition of 'continueprimarykey()' in that specification.
IDBIndex - Web APIs
methods inherits from: eventtarget idbindex.
count() returns an idbrequest object, and in a separate thread, returns the number of records within a key range.
...pera android full support 14safari ios full support 8samsung internet android full support 1.5 full support 1.5 no support 1.5 — 7.0prefixed prefixed implemented with the vendor prefix: webkit
countchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support ...
Selection.getRangeAt() - Web APIs
a negative number or a number greater than or equal to selection.range
count will result in an error.
... example let ranges = []; sel = window.getselection(); for(let i = 0; i < sel.range
count; i++) { ranges[i] = sel.getrangeat(i); } /* each item in the ranges array is now * a range object representing one of the * ranges in the current selection */ specifications specification status comment selection apithe definition of 'selection: getrangeat()' in that specification.
Using writable streams - Web APIs
the second object is optional, and allows you to specify a custom queueing strategy to use for your stream, which takes the form of an instance of bytelengthqueuingstrategy or
countqueuingstrategy.
... the constructor call in our example looks like this: const decoder = new textdecoder("utf-8"); const queuingstrategy = new
countqueuingstrategy({ highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li')...
TextTrackList - Web APIs
var texttracks = document.queryselector("video").texttracks; monitoring track
count changes in this example, we have an app that displays information about the number of channels available.
... texttracks.onaddtrack = updatetrack
count; texttracks.onremovetrack = updatetrack
count; function updatetrack
count(event) { track
count = texttracks.length; drawtrack
countindicator(track
count); } specifications specification status comment html living standardthe definition of 'textracklist' in that specification.
VideoTrackList - Web APIs
var videotracks = document.queryselector("video").videotracks; monitoring track
count changes in this example, we have an app that displays information about the number of channels available.
... videotracks.onaddtrack = updatetrack
count; videotracks.onremovetrack = updatetrack
count; function updatetrack
count(event) { track
count = videotracks.length; drawtrack
countindicator(track
count); } specifications specification status comment html living standardthe definition of 'videotracklist' in that specification.
WebGL constants - Web APIs
constant name value description cw 0x0900 passed to frontface to specify the front face of a polygon is drawn in the clockwise direction ccw 0x0901 passed to frontface to specify the front face of a polygon is drawn in the
counter clockwise direction hints constants passed to webglrenderingcontext.hint() constant name value description dont_care 0x1100 there is no preference for this behavior.
... ext_disjoint_timer_query constant name value description query_
counter_bits_ext 0x8864 the number of bits used to hold the query result for the given target.
Movement, orientation, and motion: A WebXR example - Web APIs
then we pass the object's reference space into the applyviewercontrols() function, which returns a revised xrreferencespace that transforms the position and orientation of the object to take into ac
count the movement, pitch, and yaw applied by the user using the keyboard and mouse.
... view.projectionmatrix); gl.uniformmatrix4fv( programinfo.uniformlocations.modelviewmatrix, false, modelviewmatrix); gl.uniformmatrix4fv( programinfo.uniformlocations.normalmatrix, false, normalmatrix); gl.activetexture(gl.texture0); gl.bindtexture(gl.texture_2d, texture); gl.uniform1i(programinfo.uniformlocations.usampler, 0); { const vertex
count = 36; const type = gl.unsigned_short; const offset = 0; gl.drawelements(gl.triangles, vertex
count, type, offset); } } renderscene() begins by calculating how much rotation should occur around each of the three axes in the amount of time that has elapsed since the previous frame was rendered.
Window: animationiteration event - Web APIs
this event does not occur at the same time as the animationend event, and therefore does not occur for animations with an animation-iteration-
count of one.
... examples this code uses animationiteration to keep track of the number of iterations an animation has completed: let iteration
count = 0; window.addeventlistener('animationiteration', () => { iteration
count++; console.log(`animation iteration
count: ${iteration
count}`); }); the same, but using the onanimationiteration event handler property: let iteration
count = 0; window.onanimationiteration = () => { iteration
count++; console.log(`animation iteration
count: ${iteration
count}`); }; see a live example of this even...
Window.getDefaultComputedStyle() - Web APIs
that is, only user-agent and user styles are taken into ac
count.
...the object is of the same type as the object returned by window.getcomputedstyle(), but only takes into ac
count user-agent and user rules.
Window: popstate event - Web APIs
note: when writing functions that process popstate event it is important to take into ac
count that properties like window.location will already reflect the state change (if it affected the current url), but document might still not.
... if the history traversal is being performed with replacement enabled, the entry immediately prior to the destination entry (taking into ac
count the delta parameter on methods such as go()) is removed from the history stack.
WritableStream - Web APIs
defaultwriter.ready .then(() => { defaultwriter.close(); }) .then(() => { console.log("all chunks written"); }) .catch((err) => { console.log("stream error:", err); }); } const decoder = new textdecoder("utf-8"); const queuingstrategy = new
countqueuingstrategy({ highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li')...
... the highwatermark property, which is set when creating the
counting strategy (line 35), sets the maximum amount of data that the writablestream instance will handle in a single write() operation.
WritableStreamDefaultWriter.close() - Web APIs
return value a promise, which fulfills with the undefined if all remaining chunks were successfully written before the close, or rejects with an error if a problem was en
countered during the process.
... defaultwriter.ready .then(() => { defaultwriter.close(); }) .then(() => { console.log("all chunks written"); }) .catch((err) => { console.log("stream error:", err); }); } const decoder = new textdecoder("utf-8"); const queuingstrategy = new
countqueuingstrategy({ highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li')...
ARIA: timer role - Accessibility
the timer role indicates to assistive technologies that an element is a numerical
counter listing the amount of elapsed time from a starting point or the remaining time until an end point.
... examples some prominent web timers include clocks, stop watches and
countdowns, such as ticketing websites, e-commerce sites, and event
countdowns (see https://
countingdownto.com/).
ARIA: cell role - Accessibility
examples <div role="table" aria-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-row
count="81"> <div id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none" aria-rowindex="1">aria role</span> <span role="columnheader" aria-sort="none" aria-rowindex="1">semantic element</span> </div> </div> <div role="rowgroup"> <div role="row"> ...
... <table role="table" aria-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-row
count="81"> <caption id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</caption> <thead role="rowgroup"> <tr role="row"> <th role="columnheader" aria-sort="none" aria-rowindex="1">aria role</th> <th role="columnheader" aria-sort="none" aria-rowindex="1">semantic element</th> </tr> </thead> <tbody role="rowgroup"> ...
ARIA: gridcell role - Accessibility
use aria-col
count and aria-row
count on the parent element with role="grid" applied to it to set the total number of columns or rows.
...aria-colindex is being used to describe the rows' position and allows a person using assistive technology to infer that certain rows have been removed: <div role="grid" aria-col
count="6"> <div role="rowgroup"> <div role="row"> <div role="columnheader" aria-colindex="1">first name</div> <div role="columnheader" aria-colindex="2">last name</div> <div role="columnheader" aria-colindex="5">city</div> <div role="columnheader" aria-colindex="6">zip</div> </div> </div> <div role="rowgroup"> <div role="row"> <div role="gridcell" aria-colindex="1">debra</div> <div role="gridcell" aria-colindex="2">burks</div> <div role="g...
ARIA: dialog role - Accessibility
<div role="dialog" aria-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user ac
count section.</p> <button>close</button> </div> description marking up a dialog element with the dialog role helps assistive technology identify the dialog's content as being grouped and separated from the rest of the page content.
...this approach is shown in the code snippet below: <div role="dialog" aria-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user ac
count section.</p> <button>close</button> </div> keep in mind that a dialog's title and description text do not have to be focusable in order to be perceived by screen readers operating in a non-virtual mode.
Microdata - HTML: Hypertext Markup Language
/schema.org/softwareapplication"> <span itemprop="name">angry birds</span> - requires <span itemprop="operatingsystem">android</span><br> <link itemprop="applicationcategory" href="http://schema.org/gameapplication"/> <div itemprop="aggregaterating" itemscope itemtype="http://schema.org/aggregaterating"> rating: <span itemprop="ratingvalue">4.6</span> ( <span itemprop="rating
count">8864</span> ratings ) </div> <div itemprop="offers" itemscope itemtype="http://schema.org/offer"> price: $<span itemprop="price">1.00</span> <meta itemprop="pricecurrency" content="usd" /> </div> </div> structured data itemscope itemtype softwareapplication (http://schema.org/softwareapplication) itemprop name angry birds itemprop o...
...peratingsystem android itemprop applicationcategory gameapplication (http://schema.org/gameapplication) itemscope itemprop[itemtype] aggregaterating [aggregaterating] itemprop ratingvalue 4.6 itemprop rating
count 8864 itemscope itemprop[itemtype] offers [offer] itemprop price 1.00 itemprop pricecurrency usd result note: a handy tool for extracting microdata structures from html is google's structured data testing tool.
Accept-Language - HTTP
the content of the accept-language is often out of the control of the user (like when traveling and using an internet cafe in a different
country); the user may also want to visit a page in another language than the locale of their user interface.
...the most common extra information is the
country or region variant (like 'en-us' or 'fr-ca') or the type of alphabet to use (like 'sr-latn').
HTTP Index - HTTP
261 500 internal server error http, server error, status code the hypertext transfer protocol (http) 500 internal server error server error response code indicates that the server en
countered an unexpected condition that prevented it from fulfilling the request.
... 277 server-side access control (cors) cors, http, php access control systems perform authorization identification, authentication, access approval, and ac
countability of entities through login credentials including passwords, personal identification numbers (pins), biometric scans, and physical or electronic keys.
Equality comparisons and sameness - JavaScript
even if your requirements involve having comparisons between two nan values evaluate to true, generally it is easier to special-case the nan checks (using the isnan method available from previous versions of ecmascript) than it is to work out how surrounding computations might affect the sign of any zeros you en
counter in your comparison.
... relying on object.is when the signedness of zeros is not taken into ac
count can be hazardous.
Groups and ranges - JavaScript
a back reference to the last substring matching the n parenthetical in the regular expression (
counting left parentheses).
... examples
counting vowels var aliceexcerpt = "there was a long silence after this, and alice could only hear whispers now and then."; var regexpvowels = /[aeiouy]/g; console.log("number of vowels:", aliceexcerpt.match(regexpvowels).length); // number of vowels: 25 using groups let personlist = `first_name: john, last_name: doe first_name: jane, last_name: smith`; let regexpnames = /first_name: (\w+), last_...
Warning: expression closures are deprecated - JavaScript
var x = function() 1; var obj = {
count: function() 1 }; standard syntax to convert the non-standard expression closures syntax to standard ecmascript syntax, you can add curly braces and return statements.
... var x = function() { return 1; } var obj = {
count: function() { return 1; } }; standard syntax using arrow functions alternatively, you can use arrow functions: var x = () => 1; standard syntax using shorthand method syntax expression closures can also be found with getter and setter, like this: var obj = { get x() 1, set x(v) this.v = v }; with es2015 method definitions, this can be converted to: var obj = { get x() { return 1 }, set x(v) { this.v = v } }; ...
TypeError: "x" is read-only - JavaScript
'use strict'; var obj = object.freeze({name: 'elsa', score: 157}); obj.score = 0; // typeerror 'use strict'; object.defineproperty(this, 'lung_
count', {value: 2, writable: false}); lung_
count = 3; // typeerror 'use strict'; var frozenarray = object.freeze([0, 1, 2]); frozenarray[0]++; // typeerror there are also a few read-only properties built into javascript.
...he global variable undefined is also read-only, so you can't silence the infamous "undefined is not a function" error by doing this: 'use strict'; undefined = function() {}; // typeerror: "undefined" is read-only valid cases 'use strict'; var obj = object.freeze({name: 'score', points: 157}); obj = {name: obj.name, points: 0}; // replacing it with a new object works 'use strict'; var lung_
count = 2; // a `var` works, because it's not read-only lung_
count = 3; // ok (anatomically unlikely, though) ...
TypeError: 'x' is not iterable - JavaScript
var obj = { 'france': 'paris', 'england': 'london' }; // iterate over the property names: for (let
country of object.keys(obj)) { var capital = obj[
country]; console.log(
country, capital); } for (const [
country, capital] of object.entries(obj)) console.log(
country, capital); another option for this use case might be to use a map: var map = new map; map.set('france', 'paris'); map.set('england', 'london'); // iterate over the property names: for (let
country of map.keys()) { let...
... capital = map[
country]; console.log(
country, capital); } for (let capital of map.values()) console.log(capital); for (const [
country, capital] of map.entries()) console.log(
country, capital); iterating over a generator generators are functions you call to produce an iterable object.
The arguments object - JavaScript
this example function accepts any number of string arguments and returns the longest one: function longeststring() { var longest = ''; for (var i=0; i < arguments.length; i++) { if (arguments[i].length > longest.length) { longest = arguments[i]; } } return longest; } you can use arguments.length to
count how many arguments the function was called with.
... if you instead want to
count how many parameters a function is declared to accept, inspect that function's length property.
Atomics.notify() - JavaScript
syntax atomics.notify(typedarray, index,
count) parameters typedarray a shared int32array.
...
count optional the number of sleeping agents to notify.
Intl.Locale.prototype.region - JavaScript
the intl.locale.prototype.region property is an accessor property that returns the region of the world (usually a
country) associated with the locale.
...for example, english is spoken in the united kingdom and the united states of america, but there are differences in spelling and other language conventions between those two
countries.
Intl.Locale - JavaScript
intl.locale.prototype.casefirst returns whether case is taken into ac
count for the locale's collation rules.
... intl.locale.prototype.region returns the region of the world (usually a
country) associated with the locale.
RegExp.prototype[@@replace]() - JavaScript
class myregexp extends regexp { constructor(pattern, flags,
count) { super(pattern, flags); this.
count =
count; } [symbol.replace](str, replacement) { // perform @@replace |
count| times.
... var result = str; for (var i = 0; i < this.
count; i++) { result = regexp.prototype[symbol.replace].call(this, result, replacement); } return result; } } var re = new myregexp('\\d', '', 3); var str = '01234567'; var newstr = str.replace(re, '#'); // string.prototype.replace calls re[@@replace].
WeakRef - JavaScript
examples using a weakref object this example starts a
counter shown in a dom element, stopping when the element doesn't exist anymore: class
counter { constructor(element) { // remember a weak reference to the dom element this.ref = new weakref(element); this.start(); } start() { if (this.timer) { return; } this.
count = 0; const tick = () => { // get the element from the weak reference, if it still exists ...
... const element = this.ref.deref(); if (element) { element.textcontent = ++this.
count; } else { // the element doesn't exist anymore console.log("the element is gone."); this.stop(); this.ref = null; } }; tick(); this.timer = setinterval(tick, 1000); } stop() { if (this.timer) { clearinterval(this.timer); this.timer = 0; } } } const
counter = new
counter(document.getelementbyid("
counter"));
counter.start(); settimeout(() => { document.getelementbyid("
counter").remove(); }, 5000); specifications specification weakrefsthe definition of 'weakref' in that specification.
Nullish coalescing operator (??) - JavaScript
in other words, if you use || to provide some default value to another variable foo, you may en
counter unexpected behaviors if you consider some falsy values as usable (eg.
... let
count = 0; let text = ""; let qty =
count || 42; let message = text || "hi!"; console.log(qty); // 42 and not 0 console.log(message); // "hi!" and not "" the nullish coalescing operator avoids this pitfall by only returning the second operand when the first one evaluates to either null or undefined (but no other falsy values): let mytext = ''; // an empty string (which is also a falsy value) l...
continue - JavaScript
if continue is en
countered, the program continues at the top of the checkj statement.
... each time continue is en
countered, checkj reiterates until its condition returns false.
for - JavaScript
typically used to initialize a
counter variable.
...generally used to update or increment the
counter variable.
let - JavaScript
for example: var x = 'global'; let y = 'global'; console.log(this.x); // "global" console.log(this.y); // undefined emulating private members in dealing with constructors it is possible to use the let bindings to share one or more private members without using closures: var thing; { let privatescope = new weakmap(); let
counter = 0; thing = function() { this.someproperty = 'foo'; privatescope.set(this, { hidden: ++
counter, }); }; thing.prototype.showpublic = function() { return this.someproperty; }; thing.prototype.showprivate = function() { return privatescope.get(this).hidden; }; } console.log(typeof privatescope); // "undefined" var thing = new thing(); console.log(thing...
...} you may en
counter errors in switch statements because there is only one block.
JavaScript
and other
countries.
... javascript building blocks continues our coverage of javascript's key fundamental features, turning our attention to commonly-en
countered types of code blocks such as conditional statements, loops, functions, and events.
Digital audio concepts - Web media technologies
each of these is represented by one channel, and the number of channels contained in the audio signal is called the channel
count.
... joint stereo is a method of storing stereo audio samples in a more space-efficient manner by taking into ac
count that usually the sound entering each ear is similar.
Populating the page: how browsers work - Web Performance
in our example above, the request is definitely less than 14kb, but the linked resources aren't requested until the browser en
counters the links during parsing, described below.
...parsing can continue when a css file is en
countered, but <script> tags—particularly those without an async or defer attribute—block rendering, and pause the parsing of html.
Using dns-prefetch - Web Performance
you can safely use them together like so: <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin> <link rel="dns-prefetch" href="https://fonts.gstatic.com/"> note: if a page needs to make connections to many third-party domains, preconnecting them all is
counterproductive.
...if a non-supporting browser en
counters a dns-prefetch hint—or any other resource hint—your site won’t break.
The building blocks of responsive design - Progressive web apps (PWAs)
this is created using the css rules included at the top of the stylesheet, before any media queries are en
countered.
...mobiles in general (more commonly in some parts of the world than others) are on lower bandwidth connections and have less memory available than desktop devices, so yes, those extra kilobytes really do
count.
end - SVG: Scalable Vector Graphics
ple <svg width="120" height="120" viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- animated rectangle --> <rect x="10" y="35" height="15" width="0"> <animate attributetype="xml" attributename="width" from="0" to="100" begin="0s" end="endbutton.click" dur="8s" repeat
count="indefinite" fill="freeze" /> </rect> <!-- trigger --> <rect id="endbutton" style="cursor:pointer;" x="19.5" y="62.5" rx="5" height="25" width="80" fill="#efefef" stroke="black" stroke-width="1" /> <text x="60" y="80" text-anchor="middle" style="pointer-events:none;">click me.</text> <!-- grid --> <text x="10" y="20" text-anchor="middle">0s...
...ample <svg width="120" height="120" viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- animated rectangles --> <rect x="10" y="35" height="15" width="0"> <animate attributetype="xml" attributename="width" from="0" to="100" begin="0s" end="accesskey(e)" dur="8s" repeat
count="indefinite" fill="freeze" /> </rect> <!-- trigger --> <text x="60" y="80" text-anchor="middle" style="pointer-events:none;">hit the "s" key</text> <!-- grid --> <text x="10" y="20" text-anchor="middle">0s</text> <line x1="10" y1="25" x2="10" y2="55" stroke="grey" stroke-width=".5" /> <text x="35" y="20" text-anchor="middle">2s</text> <line x1="35" y1="...
rotate - SVG: Scalable Vector Graphics
www.w3.org/2000/svg"> <!-- draw the outline of the motion path in grey --> <path d="m10,110 a120,120 -45 0,1 110 10 a120,120 -45 0,1 10,110" stroke="lightgrey" stroke-width="2" fill="none" id="themotionpath"/> <!-- red arrow which will not rotate --> <path fill="red" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeat
count="indefinite" rotate="0"> <mpath href="#themotionpath"/> </animatemotion> </path> <g transform="translate(100, 0)"> <use href="#themotionpath"/> <!-- green arrow which will rotate along the motion path --> <path fill="green" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeat
count="indefinite" rotate="auto"> <...
...mpath href="#themotionpath"/> </animatemotion> </path> </g> <g transform="translate(200, 0)"> <use href="#themotionpath"/> <!-- blue arrow which will rotate backwards along the motion path --> <path fill="blue" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeat
count="indefinite" rotate="auto-reverse"> <mpath href="#themotionpath"/> </animatemotion> </path> </g> <g transform="translate(300, 0)"> <use href="#themotionpath"/> <!-- purple arrow which will have a static rotation of 210 degrees --> <path fill="purple" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeat
count="indefinite" rotate="210"> <mpath href="#themotionpath"/>...
SVG Attribute reference - SVG: Scalable Vector Graphics
ffset opacity operator order orient orientation origin overflow overline-position overline-thickness p panose-1 paint-order path pathlength patterncontentunits patterntransform patternunits ping pointer-events points pointsatx pointsaty pointsatz preservealpha preserveaspectratio primitiveunits r r radius referrerpolicy refx refy rel rendering-intent repeat
count repeatdur requiredextensions requiredfeatures restart result rotate rx ry s scale seed shape-rendering slope spacing specularconstant specularexponent speed spreadmethod startoffset stddeviation stemh stemv stitchtiles stop-color stop-opacity strikethrough-position strikethrough-thickness string stroke stroke-dasharray stroke-dashoffset stroke-linecap stroke-li...
...de-bidi, vector-effect, visibility, word-spacing, writing-mode filters attributes filter primitive attributes height, result, width, x, y transfer function attributes type, tablevalues, slope, intercept, amplitude, exponent, offset animation attributes animation attribute target attributes attributetype, attributename animation timing attributes begin, dur, end, min, max, restart, repeat
count, repeatdur, fill animation value attributes calcmode, values, keytimes, keysplines, from, to, by, autoreverse, accelerate, decelerate animation addition attributes additive, accumulate event attributes animation event attributes onbegin, onend, onrepeat document event attributes onabort, onerror, onresize, onscroll, onunload global event attributes oncancel, oncanplay, oncanplaythrough...
<a> - SVG: Scalable Vector Graphics
ll, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<a>' in that specification.
<animateMotion> - SVG: Scalable Vector Graphics
html,body,svg { height:100%; margin: 0; padding: 0; display:block; } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="lightgrey" d="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> <circle r="5" fill="red"> <animatemotion dur="10s" repeat
count="indefinite" path="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> </circle> </svg> usage context categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements<mpath> attributes keypoints this attribute indicate, in the range [0,1], how far is the object along the path for each keytimes associated values.
... value type: <number>|auto|auto-reverse; default value: 0; animatable: no note: for <animatemotion> the default value for the calcmode attribute is paced animation attributes animation timing attributes begin, dur, end, min, max, restart, repeat
count, repeatdur, fill animation value attributes calcmode, values, keytimes, keysplines, from, to, by other animation attributes most notably: attributename, additive, accumulate animation event attributes most notably: onbegin, onend, onrepeat global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element e...
<circle> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<circle>' in that specification.
<ellipse> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<ellipse>' in that specification.
<feComposite> - SVG: Scalable Vector Graphics
the second set does not wipe out the background, with the result that the background sometimes shines through and is other cases is blended into itself (i.e., "double-
counting").</desc> <filter id="overflood" filterunits="objectboundingbox" x="-5%" y="-5%" width="110%" height="110%"> <feflood flood-color="#ffffff" flood-opacity="1" result="flood"/> <fecomposite in="sourcegraphic" in2="backgroundimage" operator="over" result="comp"/> <femerge> <femergenode in="flood"/> <femergenode in="comp"/> </femerge> </filter> <filter id="inflood" fi...
...flood)" /> <text x="-25" y="275">arithmetic</text> </g> </g> <g transform="translate(0,325)" enable-background="new"> <desc>render the examples using the filters that do not obliterate the background, thus sometimes causing the background to continue to appear in some cases, and in other cases the background image blends into itself ("double-
counting").</desc> <text x="15" y="75">opacity 1.0</text> <text x="15" y="115" font-size="27">(without feflood)</text> <text x="15" y="200">opacity 0.5</text> <text x="15" y="240" font-size="27">(without feflood)</text> <use xlink:href="#bluetriangles"/> <g transform="translate(275,25)"> <use xlink:href="#red100" filter="url(#overnoflood)" /> <use xli...
<foreignObject> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<foreignobject>' in that specification.
<g> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<g>' in that specification.
<line> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<line>' in that specification.
<marker> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment svg markersthe definition of '<marker>' in that specification.
<path> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment svg pathsthe definition of '<path>' in that specification.
<polygon> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polygon>' in that specification.
<polyline> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polyline>' in that specification.
<rect> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<rect>' in that specification.
<svg> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<svg>' in that specification.
<symbol> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> note: a <symbol> element itself is not meant to be rendered.
<text> - SVG: Scalable Vector Graphics
, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, text content elementpermitted contentcharacter data and any number of the following elements, in any order:animation elementsdescriptive elementstext content elements<a> specifications specification status comment scalable vector graphics (svg) 2the definition of '<text>' in that specification.
<textPath> - SVG: Scalable Vector Graphics
olation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:title usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scalable vector graphics (svg) 2the definition of '<textpath>' in that specification.
<tspan> - SVG: Scalable Vector Graphics
, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-col
count, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-...
...posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-row
count, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scalable vector graphics (svg) 2the definition of '<tspan>' in that specification.