Search completed in 1.08 seconds.
<param>: The Object Parameter element - HTML: Hypertext Markup Language
the html <
param> element defines
parameters for an <object> element.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface html
paramelement attributes this element includes the global attributes.
... name name of the
parameter.
...And 5 more matches
AudioParam - Web APIs
the web audio api's audio
param interface represents an audio-related
parameter, usually a
parameter of an audionode (such as gainnode.gain).
... an audio
param can be set to a specific value or a change in value, and can be scheduled to happen at a specific time and following a specific pattern.
... there are two kinds of audio
param, a-rate and k-rate
parameters: an a-rate audio
param takes the current audio
parameter value for each sample frame of the audio signal.
...And 24 more matches
The "codecs" parameter in common media types - Web media technologies
for that reason, the codecs
parameter can be added to the mime type describing media content.
... this guide briefly examines the syntax of the media type codecs
parameter and how it's used with the mime type string to provide details about the contents of audio or video media beyond simply indicating the container type.
...for this reason, you can add the codecs
parameter to the media type.
...And 23 more matches
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
overview xslt supports the concept of passing
parameters to a stylesheet when executing it.
...however when using an <?xml-stylesheet?> processing instruction (pi) there used to be no way to provide
parameters.
... to solve this two new pis are implemented in firefox 2 (see supported versions below for details), <?xslt-
param?> and <?xslt-
param-namespace?>.
...And 21 more matches
mozIStorageBindingParams
the mozistoragebinding
params interface is used to bind values to
parameters prior to calling mozistoragestatement.executeasync().
... storage/public/mozistoragebinding
params.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create mozistoragebinding
params objects by calling the mozistoragebinding
paramsarray.newbinding
params().
...And 17 more matches
URLSearchParams - Web APIs
the urlsearch
params interface defines utility methods to work with the query string of a url.
... an object implementing urlsearch
params can directly be used in a for...of structure, for example the following two lines are equivalent: for (const [key, value] of mysearch
params) {} for (const [key, value] of mysearch
params.entries()) {} note: this feature is available in web workers.
... constructor urlsearch
params() returns a urlsearch
params object instance.
...And 16 more matches
AudioParamDescriptor - Web APIs
the audio
paramdescriptor dictionary of the web audio api specifies properties for an audio
param objects.
... it is used to create custom audio
params on an audioworkletnode.
... if the underlying audioworkletprocessor has a
parameterdescriptors static getter, then the returned array of objects based on this dictionary is used internally by audioworkletnode constructor to populate its
parameters property accordingly.
...And 13 more matches
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
the read-only
parameterdescriptors property of an audioworkletprocessor-derived class is a static getter, which returns an iterable of audio
paramdescriptor-based objects.
... the property is not a part of the audioworkletprocessor interface, but, if defined, it is called internally by the audioworkletprocessor constructor to create a list of custom audio
param objects in the
parameters property of the associated audioworkletnode.
... syntax audioworkletprocessorsubclass.
parameterdescriptors; value an iterable of audio
paramdescriptor-based objects.
...And 13 more matches
JS_GetGCParameter
adjust performance
parameters related to garbage collection.
... syntax uint32_t js_getgc
parameter(jsruntime *rt, jsgc
paramkey key); void js_setgc
parameter(jsruntime *rt, jsgc
paramkey key, uint32_t value); uint32_t js_getgc
parameterforthread(jscontext *cx, jsgc
paramkey key); // added in spidermonkeysidebar 17 void js_setgc
parameterforthread(jscontext *cx, jsgc
paramkey key, uint32_t value); // added in spidermonkeysidebar 17 name type description rt jsruntime * the runtime to configure.
... key jsgc
paramkey specifies which garbage collection
parameter to get or set.
...And 9 more matches
AudioParam.value - Web APIs
the web audio api's audio
param interface property value gets or sets the value of this audio
param at the current time.
... initially, the value is set to audio
param.defaultvalue.
... setting value has the same effect as calling audio
param.setvalueattime with the time returned by the audiocontext's currenttime property..
...And 9 more matches
Default parameters - JavaScript
default function
parameters allow named
parameters to be initialized with default values if no value or undefined is passed.
... syntax function [name]([
param1[ = defaultvalue1 ][, ...,
paramn[ = defaultvaluen ]]]) { statements } description in javascript, function
parameters default to undefined.
...this is where default
parameters can help.
...And 9 more matches
AudioWorkletNode.parameters - Web APIs
the read-only
parameters property of the audioworkletnode interface returns the associated audio
parammap — that is, a map-like collection of audio
param objects.
... they are instantiated during creation of the underlying audioworkletprocessor according to its
parameterdescriptors static getter.
... syntax audioworkletnodeinstance.
parameters value the audio
parammap object containing audio
param instances.
...And 7 more matches
HTMLParamElement - Web APIs
the html
paramelement interface provides special properties (beyond those of the regular htmlelement object interface it inherits) for manipulating <
param> elements, representing a pair of a key and a value that acts as a
parameter for an <object> element.
...aco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/html
paramelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">html
paramelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits p...
... html
paramelement.name is a domstring representing the name of the
parameter.
...And 7 more matches
Controlling multiple parameters with ConstantSourceNode - Web APIs
this article demonstrates how to use a constantsourcenode to link multiple
parameters together so they share the same value, which can be changed by simply setting the value of the constantsourcenode.offset
parameter.
... you may have times when you want to have multiple audio
parameters be linked so they share the same value even while being changed in some way.
...you could use a loop and change the value of each affected audio
param one at a time, but there are two drawbacks to doing it that way: first, that's extra code that, as you're about to see, you don't have to write; and second, that loop uses valuable cpu time on your thread (likely the main thread), and there's a way to offload all that work to the audio rendering thread, which is optimized for this kind of work and may run at a more appropriate priority level than your code.
...And 7 more matches
mozIStorageBindingParamsArray
the mozistoragebinding
paramsarray interface is a container for mozistoragebinding
params objects, and is used to store sets of bound
parameters that will be used by the mozistoragestatement.executeasync().
... storage/public/mozistoragebinding
paramsarray.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create these objects by calling the mozistoragestatement.newbinding
paramsarray().
...And 6 more matches
RTCRtpSender.setParameters() - Web APIs
the set
parameters() method of the rtcrtpsender interface applies changes the configuration of sender's track, which is the mediastreamtrack for which the rtcrtpsender is responsible.
... in other words, set
parameters() updates the configuration of the rtp transmission as well as the encoding configuration for a specific media track on the webrtc connection.
... syntax var promise = rtcrtpsender.set
parameters(
parameters)
parameters
parameters an object conforming with the rtcrtpsend
parameters dictionary, specifying options for the rtcrtpsender; these include potential codecs that could be use for encoding the sender's track.
...And 6 more matches
WebGLRenderingContext.getParameter() - Web APIs
the webglrenderingcontext.get
parameter() method of the webgl api returns a value for the passed
parameter name.
... syntax any gl.get
parameter(pname);
parameters pname a glenum specifying which
parameter value to return.
... return value depends on the
parameter.
...And 6 more matches
WebGLRenderingContext.texParameter[fi]() - Web APIs
the webglrenderingcontext.tex
parameter[fi]() methods of the webgl api set texture
parameters.
... syntax void gl.tex
parameterf(glenum target, glenum pname, glfloat
param); void gl.tex
parameteri(glenum target, glenum pname, glint
param);
parameters target a glenum specifying the binding point (target).
... the pname
parameter is a glenum specifying the texture
parameter to set.
...And 6 more matches
RTCRtpParameters - Web APIs
the rtcrtp
parameters dictionary is the basic object describing the
parameters of an rtp transport.
... it is extended separately for senders and receivers in the form of the rtcrtpsend
parameters and rtcrtpreceive
parameters dictionaries.
... to obtain the
parameters of a sender or receiver, call its get
parameters() method: get
parameters() get
parameters() properties codecs an array of rtcrtpcodec
parameters objects describing the set of codecs from which the sender or receiver will choose.
...And 5 more matches
URLSearchParams.set() - Web APIs
the set() method of the urlsearch
params interface sets the value associated with a given search
parameter to the given value.
...if the search
parameter doesn't exist, this method creates it.
... syntax urlsearch
params.set(name, value)
parameters name the name of the
parameter to set.
...And 5 more matches
SyntaxError: missing formal parameter - JavaScript
the javascript exception "missing formal
parameter" occurs when your function declaration is missing valid
parameters.
... message syntaxerror: missing formal
parameter (firefox) error type syntaxerror what went wrong?
... "formal
parameter" is a fancy way of saying "function
parameter".
...And 5 more matches
Rest parameters - JavaScript
the rest
parameter syntax allows us to represent an indefinite number of arguments as an array.
...} description a function's last
parameter can be prefixed with ...
... only the last
parameter can be a "rest
parameter".
...And 5 more matches
Parameter - MDN Web Docs Glossary: Definitions of Web-related terms
a
parameter is a named variable passed into a function.
...
parameter variables are used to import arguments into functions.
... note the difference between
parameters and arguments: function
parameters are the names listed in the function's definition.
...And 4 more matches
AudioParam.setTargetAtTime() - Web APIs
the settargetattime() method of the audio
param interface schedules the start of a gradual change to the audio
param value.
... syntax var
paramref =
param.settargetattime(target, starttime, timeconstant);
parameters target the value the
parameter will start to transition towards at the given start time.
...if it is less than or equal to audiocontext.currenttime, the
parameter will start changing immediately.
...And 4 more matches
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
the webglrenderingcontext.getframebufferattachment
parameter() method of the webgl api returns information about a framebuffer's attachment.
... syntax any gl.getframebufferattachment
parameter(target, attachment, pname);
parameters target a glenum specifying the binding point (target).
... pname
parameter return value gl.framebuffer_attachment_object_type a glenum indicating the type of the texture.
...And 4 more matches
param - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] for sql templates, used to bind values to
parameters specified within an sql statement.
... the value to bind should be text as a child of the
param element.
... for more information, see query_
parameters.
...And 3 more matches
nsIDialogParamBlock
embedding/components/windowwatcher/public/nsidialog
paramblock.idlscriptable an interface to pass strings, integers and nsisupports to a dialog.
...print32 getint( in print32 inindex );
parameters inindex the index of the integer to get.
...wstring getstring( in print32 inindex );
parameters inindex the index of the string to get.
...And 3 more matches
AudioParam.linearRampToValueAtTime() - Web APIs
the linearramptovalueattime() method of the audio
param interface schedules a gradual linear change in the value of the audio
param.
... the change starts at the time specified for the previous event, follows a linear ramp to the new value given in the value
parameter, and reaches the new value at the time given in the endtime
parameter.
... syntax var audio
param = audio
param.linearramptovalueattime(value, endtime)
parameters value a floating point number representing the value the audio
param will ramp to by the given time.
...And 3 more matches
RTCIceTransport.getLocalParameters() - Web APIs
the rtcicetransport method getlocal
parameters() returns an rtcice
parameters object which provides information uniquely identifying the local peer for the duration of the ice session.
... the local peer's
parameters are obtained during ice signaling and delivered to the transport when the client calls rtcpeerconnection.setlocaldescription().
... syntax
parameters = rtcicetransport.getlocal
parameters();
parameters none.
...And 3 more matches
RTCIceTransport.getRemoteParameters() - Web APIs
the rtcicetransport method getremote
parameters() returns an rtcice
parameters object which provides information uniquely identifying the remote peer for the duration of the ice session.
... the remote peer's
parameters are received during ice signaling and delivered to the transport when the client calls rtcpeerconnection.setremotedescription().
... syntax
parameters = rtcicetransport.getremote
parameters();
parameters none.
...And 3 more matches
RTCRtpEncodingParameters - Web APIs
an instance of the webrtc api's rtcrtpencoding
parameters dictionary describes a single configuration of a codec for an rtcrtpsender.
... it's used in the rtcrtpsend
parameters describing the configuration of an rtp sender's encodings; rtcrtpdecoding
parameters is used to describe the configuration of an rtp receiver's encodings.
... codecpayloadtype when describing a codec for an rtcrtpsender, codecpayloadtype is a single 8-bit byte (or octet) specifying the codec to use for sending the stream; the value matches one from the owning rtcrtp
parameters object's codecs
parameter.
...And 3 more matches
RTCRtpSendParameters.encodings - Web APIs
the rtcrtpsend
parameters dictionary's encodings property is an rtcrtpencoding
parameters object providing configuration settings for the encoder being used for the rtcrtpsender's track.
... syntax send
parameters.encodings = encoding
parameterlist; encoding
parameterlist = send
parameters.encodings; value an array of objects conforming to the rtcrtpencoding
parameters dictionary, each of which contains properties which provide settings and
parameters that describe and configure a single codec that could be used to encode the track.
... codecpayloadtype when describing a codec for an rtcrtpsender, codecpayloadtype is a single 8-bit byte (or octet) specifying the codec to use for sending the stream; the value matches one from the owning rtcrtp
parameters object's codecs
parameter.
...And 3 more matches
URLSearchParams.append() - Web APIs
the append() method of the urlsearch
params interface appends a specified key/value pair as a new search
parameter.
... as shown in the example below, if the same key is appended multiple times it will appear in the
parameter string multiple times for each value.
... syntax urlsearch
params.append(name, value)
parameters name the name of the
parameter to append.
...And 3 more matches
VRStageParameters - Web APIs
the vrstage
parameters interface of the webvr api represents the values describing the the stage area for devices that support room-scale experiences.
... this interface is accessible through the vrdisplay.stage
parameters property.
... properties vrstage
parameters.sittingtostandingtransform read only contains a matrix that transforms the sitting-space view matrices of vrframedata to standing-space.
...And 3 more matches
WebGL2RenderingContext.samplerParameter[if]() - Web APIs
the webgl2renderingcontext.sampler
parameter[if]() methods of the webgl 2 api set webglsampler
parameters.
... syntax void gl.sampler
parameteri(sampler, pname,
param); void gl.sampler
parameterf(sampler, pname,
param);
parameters sampler a webglsampler object.
... pname a glenum specifying which
parameter to set.
...And 3 more matches
WebGLRenderingContext.getBufferParameter() - Web APIs
the webglrenderingcontext.getbuffer
parameter() method of the webgl api returns information about the buffer.
... syntax any gl.getbuffer
parameter(target, pname);
parameters target a glenum specifying the target buffer object.
... examples gl.getbuffer
parameter(gl.array_buffer, gl.buffer_size); specifications specification status comment webgl 1.0the definition of 'getbuffer
parameter' in that specification.
...And 3 more matches
WebGLRenderingContext.getRenderbufferParameter() - Web APIs
the webglrenderingcontext.getrenderbuffer
parameter() method of the webgl api returns information about the renderbuffer.
... syntax any gl.getrenderbuffer
parameter(target, pname);
parameters target a glenum specifying the target renderbuffer object.
... examples gl.getrenderbuffer
parameter(gl.renderbuffer, gl.renderbuffer_width); specifications specification status comment webgl 1.0the definition of 'getrenderbuffer
parameter' in that specification.
...And 3 more matches
WebGLRenderingContext.getTexParameter() - Web APIs
the webglrenderingcontext.gettex
parameter() method of the webgl api returns information about the given texture.
... syntax any gl.gettex
parameter(target, pname);
parameters target a glenum specifying the binding point (target).
... examples gl.gettex
parameter(gl.texture_2d, gl.texture_mag_filter); specifications specification status comment webgl 1.0the definition of 'gettex
parameter' in that specification.
...And 3 more matches
Setting Parameters - XSLT: Extensible Stylesheet Language Transformations
setting
parameters while running transformations using precoded .xsl and .xml files is quite useful, configuring the .xsl file from javascript may be even more useful.
... xslt provides the xsl:
param element, which is a child of the xsl:stylesheet element.
... xsltprocessor provides three javascript methods to interact with these
parameters: xsltprocessor.set
parameter(), xsltprocessor.get
parameter() and xsltprocessor.remove
parameter().
...And 3 more matches
PR_GMTParameters
syntax #include <prtime.h> prtime
parameters pr_gmt
parameters ( const prexplodedtime *gmt);
parameter gmt a pointer to the clock/calendar time whose offsets are to be determined.
... returns a time
parameters structure that expresses the time zone offsets at the specified time.
... description this is a frequently-used time
parameter callback function.
...And 2 more matches
AudioParam.exponentialRampToValueAtTime() - Web APIs
the exponentialramptovalueattime() method of the audio
param interface schedules a gradual exponential change in the value of the audio
param.
... the change starts at the time specified for the previous event, follows an exponential ramp to the new value given in the value
parameter, and reaches the new value at the time given in the endtime
parameter.
... syntax var audio
param = audio
param.exponentialramptovalueattime(value, endtime)
parameters value a floating point number representing the value the audio
param will ramp to by the given time.
...And 2 more matches
AudioParam.setValueCurveAtTime() - Web APIs
the setvaluecurveattime() method of the audio
param interface schedules the
parameter's value to change following a curve defined by a list of values.
... syntax var
paramref =
param.setvaluecurveattime(values, starttime, duration);
parameters values an array of floating-point numbers representing the value curve the audio
param will change through along the specified duration.
... duration a double representing the total time (in seconds) over which the
parameter's value will change following the specified curve.
...And 2 more matches
RTCRtpSendParameters - Web APIs
the webrtc api's rtcrtpsend
parameters dictionary is used to specify the
parameters for an rtcrtpsender when calling its set
parameters() method.
... properties in addition to the properties below, rtcrtpsend
parameters inherits the properties from the rtcrtp
parameters interface.
... encodings an array of rtcrtpencoding
parameters objects, each specifying the
parameters for a single codec that could be used to encode the track's media.
...And 2 more matches
RTCRtpSender.getParameters() - Web APIs
the get
parameters() method of the rtcrtpsender interface returns an rtcrtpsend
parameters object describing the current configuration for the encoding and transmission of media on the sender's track.
... syntax var rtpsend
parameters = rtpsender.get
parameters()
parameters none.
... return value an rtcrtpsend
parameters object indicating the current configuration of the sender.
...And 2 more matches
URLSearchParams() - Web APIs
the urlsearch
params() constructor creates and returns a new urlsearch
params object.
... syntax var urlsearch
params = new urlsearch
params(init);
parameters init optional one of: a usvstring, which will be parsed from application/x-www-form-urlencoded format.
... return value a urlsearch
params object instance.
...And 2 more matches
WebGL2RenderingContext.getSamplerParameter() - Web APIs
the webgl2renderingcontext.getsampler
parameter() method of the webgl 2 api returns
parameter information of a webglsampler object.
... syntax any gl.getsampler
parameter(sampler, pname);
parameters sampler a webglsampler object.
... return value depends on the pname
parameter, either a glenum or a glfloat.
...And 2 more matches
SyntaxError: redeclaration of formal parameter "x" - JavaScript
the javascript exception "redeclaration of formal
parameter" occurs when the same variable name occurs as a function
parameter and is then redeclared using a let assignment in a function body again.
... message syntaxerror: let/const redeclaration (edge) syntaxerror: redeclaration of formal
parameter "x" (firefox) syntaxerror: identifier "x" has already been declared (chrome) error type syntaxerror what went wrong?
... the same variable name occurs as a function
parameter and is then redeclared using a let assignment in a function body again.
...And 2 more matches
SyntaxError: "use strict" not allowed in function with non-simple parameters - JavaScript
the javascript exception "'use strict' not allowed in function" occurs when a "use strict" directive is used at the top of a function with default
parameters, rest
parameters, or destructuring
parameters.
... message edge: cannot apply strict mode on functions with non-simple
parameter list firefox: syntaxerror: "use strict" not allowed in function with default
parameter syntaxerror: "use strict" not allowed in function with rest
parameter syntaxerror: "use strict" not allowed in function with destructuring
parameter chrome: syntaxerror: illegal 'use strict' directive in function with non-simple
parameter list error type syntaxerror.
... a "use strict" directive is written at the top of a function that has one of the following
parameters: default
parameters rest
parameters destructuring
parameters a "use strict" directive is not allowed at the top of such functions per the ecmascript specification.
...And 2 more matches
PR_LocalTimeParameters
syntax #include <prtime.h> prtime
parameters pr_localtime
parameters ( const prexplodedtime *gmt);
parameter gmt a pointer to the clock/calendar time whose offsets are to be determined.
... returns a time
parameters structure that expresses the time zone offsets at the specified time.
... description this is a frequently-used time
parameter callback function.
... you don't normally call it directly; instead, you pass it as a
parameter to pr_explodetime() or pr_normalizetime().
JS_SetGCParametersBasedOnAvailableMemory
this article covers features introduced in spidermonkey 31 adjust performance
parameters related to garbage collection based on available memory.
... syntax void js_setgc
parametersbasedonavailablememory(jsruntime *rt, uint32_t availmem); name type description rt jsruntime * the runtime to configure.
... description js_setgc
parametersbasedonavailablememory adjusts the
parameters of the garbage collection based on available memory.
... see also mxr id search for js_setgc
parametersbasedonavailablememory js_setgc
parameter bug 950044 ...
Working with out parameters
} the gettransferdata method takes three
parameters, aflavor, adata, and adatalen, and returns nothing.
...these are so-called out
parameters.
...to get at the out
parameters, you have to pass in an object.
...implementation when implementing a method which has out
parameters in javascript, you have to set a new property called value to the out
parameter which will hold the required value.
AudioParam.cancelScheduledValues() - Web APIs
the cancelscheduledvalues() method of the audio
param interface cancels all scheduled future changes to the audio
param.
... syntax var audio
param = audio
param.cancelscheduledvalues(starttime)
parameters starttime a double representing the time (in seconds) after the audiocontext was first created after which all scheduled changes will be cancelled.
... returns a reference to this audio
param object.
... examples var gainnode = audioctx.creategain(); gainnode.gain.setvaluecurveattime(wavearray, audioctx.currenttime, 2); //'gain' is the audio
param gainnode.gain.cancelscheduledvalues(audioctx.currenttime); specifications specification status comment web audio apithe definition of 'cancelscheduledvalues' in that specification.
AudioParam.setValueAtTime() - Web APIs
the setvalueattime() method of the audio
param interface schedules an instant change to the audio
param value at a precise time, as measured against audiocontext.currenttime.
... the new value is given in the value
parameter.
... syntax var audio
param = audio
param.setvalueattime(value, starttime)
parameters value a floating point number representing the value the audio
param will change to at the given time.
... returns a reference to this audio
param object.
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
the pubkeycred
params property of the publickeycredentialcreationoptions dictionary is an array whose elements are objects describing the desired features of the credential to be created.
... syntax pubkeycred
params = publickeycredentialcreationoptions.pubkeycred
params value an array whose elements are objects with the following properties: type a string describing type of public-key credential to be created.
... examples var publickey = { pubkeycred
params: [ // we would like an elliptic curve to be used if possible { type: "public-key", alg: -7 }, // if not, then we will fallback on an rsa algorithm { type: "public-key", alg: -37 } ], challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: ...
...n(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'pubkeycred
params' in that specification.
RTCRtpCodecParameters - Web APIs
the rtcrtpcodec
parameters dictionary, part of the webrtc api, is used to describe the configuration
parameters for a single media codec.
... in addition to being the type of the rtcrtp
parameters.codecs property, it's used when calling rtcrtptransceiver.setcodecpreferences() to configure a transceiver's codecs before beginning the offer/answer process to establish a webrtc peer connection.
... sdpfmtpline optional a domstring containing the format-specific
parameters field from the "a=fmtp" line in the codec's sdp, if one is present; see section 5.8 of the ietf specification for jsep.
... note: on an rtcrtpreceiver, the format-specific
parameters come from the sdp sent by the remote peer, while for rtcrtpsender, they're provided by the local description.
RTCRtpEncodingParameters.maxBitrate - Web APIs
the rtcrtpencoding
parameters dictionary's maxbitrate property specifies the maximum number of bits per second to allow a track encoded with this encoding to use.
... syntax rtpencoding
parameters.maxbitrate = maxbitspersecond; rtpencoding
parameters = { maxbitrate: maxbitspersecond }; maxbitspersecond = rtpencoding
parameters.maxbitrate; value an unsigned long integer value specifying the maximum bandwidth this encoding is permitted to use for a track of media it encodes in terms of bits per second.
... other
parameters may further reduce the bandwidth used by the track; for example, maxframerate will, if set low enough, constrain the bandwidth as well.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencoding
parameters.maxbitrate' in that specification.
RTCRtpEncodingParameters.scaleResolutionDownBy - Web APIs
the rtcrtpencoding
parameters dictionary's scaleresolutiondownby property can be used to specify a factor by which to reduce the size of a video track during encoding.
... syntax rtpencoding
parameters.scaleresolutiondownby = scalingfactor; rtpencoding
parameters = { scaleresolutiondownby: scalingfactor }; value a double-precison floating-point number specifying the amount by which to reduce the size of the video during encoding.
...therefore, specifying a value less than 1.0 is not permitted and will cause a rangeerror exception to be thrown by rtcpeerconnection.addtransceiver() or rtcrtpsender.set
parameters().
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencoding
parameters.scaleresolutiondownby' in that specification.
RTCRtpReceiveParameters - Web APIs
the rtcrtpreceive
parameters dictionary, based upon the rtcrtp
parameters dictionary, is returned by the the rtcrtpreceiver method get
parameters().
... it describes the
parameters being used by the receiver's rtp connection to the remote peer.
...it inherits all of the properties of its parent, rtcrtp
parameters.
... function getrtcpcname(receiver) { let
parameters = receiver.get
parameters(); return
parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceive
parameters' in that specification.
RTCRtpReceiver.getParameters() - Web APIs
the get
parameters() method of the rtcrtpreceiver interface returns an rtcrtpreceive
parameters object describing the current configuration for the encoding and transmission of media on the receiver's track.
... syntax let rtpreceive
parameters = rtpreceiver.get
parameters();
parameters none.
... return value an rtcrtpreceive
parameters object indicating the current configuration of the receiver.
... function getrtcpcname(receiver) { let
parameters = receiver.get
parameters(); return
parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.get
parameters()' in that specification.
URL.searchParams - Web APIs
the search
params readonly property of the url interface returns a urlsearch
params object allowing access to the get decoded query arguments contained in the url.
... syntax const urlsearch
params = url.search
params value a urlsearch
params object.
... examples if the url of your page is https://example.com/?name=jonathan%20smith&age=18 you could parse out the name and age
parameters using: let
params = (new url(document.location)).search
params; let name =
params.get('name'); // is the string "jonathan smith".
... let age = parseint(
params.get('age')); // is the number 18 specifications specification status comment urlthe definition of 'search
params' in that specification.
URLSearchParams.delete() - Web APIs
the delete() method of the urlsearch
params interface deletes the given search
parameter and all its associated values, from the list of all search
parameters.
... syntax urlsearch
params.delete(name)
parameters name the name of the
parameter to be deleted.
... return value void examples let url = new url('https://example.com?foo=1&bar=2&foo=3'); let
params = new urlsearch
params(url.search.slice(1)); // delete the foo
parameter.
...
params.delete('foo'); //query string is now: 'bar=2' specifications specification status comment urlthe definition of 'delete()' in that specification.
URLSearchParams.get() - Web APIs
the get() method of the urlsearch
params interface returns the first value associated to the given search
parameter.
... syntax urlsearch
params.get(name)
parameters name the name of the
parameter to return.
... return value a usvstring if the given search
parameter is found; otherwise, null.
... examples if the url of your page is https://example.com/?name=jonathan&age=18 you could parse out the 'name' and 'age'
parameters using: let
params = new urlsearch
params(document.location.search.substring(1)); let name =
params.get("name"); // is the string "jonathan" let age = parseint(
params.get("age"), 10); // is the number 18 requesting a
parameter that isn't present in the query string will return null: let address =
params.get("address"); // null specifications specification status comment urlthe definition of 'get()' in that specification.
URLSearchParams.getAll() - Web APIs
the getall() method of the urlsearch
params interface returns all the values associated with a given search
parameter as an array.
... syntax urlsearch
params.getall(name)
parameters name the name of the
parameter to return.
... examples let url = new url('https://example.com?foo=1&bar=2'); let
params = new urlsearch
params(url.search.slice(1)); //add a second foo
parameter.
...
params.append('foo', 4); console.log(
params.getall('foo')) //prints ["1","4"].
URLSearchParams.toString() - Web APIs
the tostring() method of the urlsearch
params interface returns a query string suitable for use in a url.
... syntax urlsearch
params.tostring()
parameters none.
...(returns an empty string if no search
parameters have been set.) examples let url = new url('https://example.com?foo=1&bar=2'); let
params = new urlsearch
params(url.search.slice(1)); //add a second foo
parameter.
...
params.append('foo', 4); console.log(
params.tostring()); //prints 'foo=1&bar=2&foo=4' // note:
params can also be directly created let url = new url('https://example.com?foo=1&bar=2'); let
params = url.search
params; // or even simpler let
params = new urlsearch
params('foo=1&bar=2'); specifications specification status comment urlthe definition of 'tostring() (see "stringifier")' in that specification.
WebGL2RenderingContext.getActiveUniformBlockParameter() - Web APIs
the webgl2renderingcontext.getactiveuniformblock
parameter() method of the webgl 2 api retrieves information about an active uniform block within a webglprogram.
... syntax any gl.getactiveuniformblock
parameter(program, uniformblockindex, pname);
parameters program a webglprogram containing the active uniform block.
... return value depends on which information is requested using the pname
parameter.
... examples var blocksize = gl.getactiveuniformblock
parameter(program, blockindex, gl.uniform_block_data_size); specifications specification status comment webgl 2.0the definition of 'getactiveuniformblock
parameter' in that specification.
WebGL2RenderingContext.getQueryParameter() - Web APIs
the webgl2renderingcontext.getquery
parameter() method of the webgl 2 api returns
parameter information of a webglquery object.
... syntax any gl.getquery
parameter(query, pname);
parameters query a webglquery object.
... return value depends on the pname
parameter, either a gluint or a glboolean.
... examples var query = gl.createquery(); gl.beginquery(gl.any_samples_passed, query); var result = gl.getquery
parameter(query, gl.query_result); specifications specification status comment webgl 2.0the definition of 'getquery
parameter' in that specification.
WebGL2RenderingContext.getSyncParameter() - Web APIs
the webgl2renderingcontext.getsync
parameter() method of the webgl 2 api returns
parameter information of a webglsync object.
... syntax any gl.getsync
parameter(sync, pname);
parameters sync a webglsync object.
... return value depends on the pname
parameter, either a glenum or a glbitfield.
... examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.getsync
parameter(sync, gl.sync_status); specifications specification status comment webgl 2.0the definition of 'getsync
parameter' in that specification.
WebGLRenderingContext.getProgramParameter() - Web APIs
the webglrenderingcontext.getprogram
parameter() method of the webgl api returns information about the given program.
... syntax any gl.getprogram
parameter(program, pname);
parameters program a webglprogram to get
parameter information from.
... examples gl.getprogram
parameter(program, gl.delete_status); specifications specification status comment webgl 1.0the definition of 'getprogram
parameter' in that specification.
... webgl 2.0the definition of 'getprogram
parameter' in that specification.
<xsl:param> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:
param> element establishes a
parameter by name and, optionally, a default value for that
parameter.
... when used as a top-level element, the
parameter is global .
... when used inside an <xsl:template> element, the
parameter is local to that template.
... syntax <xsl:
param name=name select=expression> template </xsl:
param> required attributes name names the
parameter.
mozIStorageStatementParams
this interface has no defined properties, but has properties based on the named
parameters found in the sql from the statement it was accessed off of.
... for example, say you create a statement like so: var statement = dbconn.createstatement("select * from table_name where id = :item_id"); this object would have one property, item_id, that you can use to bind a value to that named
parameter like so: statement.
params.item_id = 2; for more details on why you should bind
parameters as opposed to hard-coding them into your statement, please see the overview document about binding
parameters.
...for (let
param in statement.
params) statement.
params[
param] = valuestobind[
param]; ...
AesGcmParams - Web APIs
the aesgcm
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-gcm algorithm.
... for details of how to supply appropriate values for this
parameter, see the specification for aes-gcm: nist sp800-38d, in particular section 5.2.1.1 on input data.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aesgcm
params' in that specification.
AudioParam.cancelAndHoldAtTime() - Web APIs
the cancelandholdattime() property of the audio
param interface cancels all scheduled future changes to the audio
param but holds its value at a given time until further changes are made using other methods.
... syntax var audio
param = audio
param.cancelandholdattime(canceltime)
parameters canceltime a double representing the time (in seconds) after the audiocontext was first created after which all scheduled changes will be cancelled.
... return value a reference to the audio
param it was called on.
EcdhKeyDeriveParams - Web APIs
the ecdhkeyderive
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.derivekey(), when using the ecdh algorithm.
... the
parameters for ecdh derivekey() therefore include the other entity's public key, which is combined with this entity's private key to derive the shared secret.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.ecdhkeyderive
params' in that specification.
RTCIceParameters.usernameFragment - Web APIs
the rtcice
parameters dictionary's usernamefragment property specifies the username fragment ("ufrag") that uniquely identifies the corresponding ice session for the duration of the current ice session.
... syntax ufrag = rtcice
parameters.usernamefragment; value a domstring containing the username fragment that, in tandem with the password, uniquely identify the ice session being used by the transport.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcice
parameters.usernamefragment' in that specification.
RTCIceParameters - Web APIs
the rtcice
parameters dictionary specifies the username fragment and password assigned to an ice session.
... during ice negotiation, each peer's username fragment and password are recorded in an rtcice
parameters object, which can be obtained from the rtcicetransport by calling its getlocal
parameters() or getremote
parameters() method, depending on which end interests you.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcice
parameters' in that specification.
RTCRtcpParameters - Web APIs
the rtcrtcp
parameters dictionary provides
parameters of an rtcp connection.
... it's used as the value of the rtcp property of the
parameters of an rtcrtpsender or rtcrtpreceiver.
... function getrtpcname(rtpobject) { let
parameters = rtpobject.get
parameters(); return
parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtcp
parameters' in that specification.
URLSearchParams.entries() - Web APIs
the entries() method of the urlsearch
params interface returns an iterator allowing iteration through all key/value pairs contained in this object.
... syntax search
params.entries();
parameters none.
... examples // create a test urlsearch
params object var search
params = new urlsearch
params("key1=value1&key2=value2"); // display the key/value pairs for(var pair of search
params.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment urlthe definition of 'entries() (see "iterable")' in that specification.
URLSearchParams.forEach() - Web APIs
the foreach() method of the urlsearch
params interface allows iteration through all values contained in this object via a callback function.
... syntax search
params.foreach(callback);
parameters callback a callback function that is executed against each
parameter, with the
param value provided as its
parameter.
... examples // create a test urlsearch
params object var search
params = new urlsearch
params("key1=value1&key2=value2"); // log the values search
params.foreach(function(value, key) { console.log(value, key); }); the result is: value1 key1 value2 key2 specifications specification status comment urlthe definition of 'foreach() (see "iterable")' in that specification.
URLSearchParams.has() - Web APIs
the has() method of the urlsearch
params interface returns a boolean that indicates whether a
parameter with the specified name exists.
... syntax var hasname = urlsearch
params.has(name)
parameters name the name of the
parameter to find.
... examples let url = new url('https://example.com?foo=1&bar=2'); let
params = new urlsearch
params(url.search.slice(1));
params.has('bar') === true; //true specifications specification status comment urlthe definition of 'has()' in that specification.
URLSearchParams.keys() - Web APIs
the keys() method of the urlsearch
params interface returns an iterator allowing iteration through all keys contained in this object.
... syntax search
params.keys();
parameters none.
... examples // create a test urlsearch
params object var search
params = new urlsearch
params("key1=value1&key2=value2"); // display the keys for(var key of search
params.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment urlthe definition of 'keys() (see "iterable")' in that specification.
URLSearchParams.sort() - Web APIs
the urlsearch
params.sort() method sorts all key/value pairs contained in this object in place and returns undefined.
... syntax search
params.sort();
parameters none.
... examples // create a test urlsearch
params object var search
params = new urlsearch
params("c=4&a=2&b=3&a=1"); // sort the key/value pairs search
params.sort(); // display the sorted query string console.log(search
params.tostring()); the result is: a=2&a=1&b=3&c=4 specifications specification status comment urlthe definition of 'sort()' in that specification.
URLSearchParams.values() - Web APIs
the values() method of the urlsearch
params interface returns an iterator allowing iteration through all values contained in this object.
... syntax search
params.values();
parameters none.
... examples // create a test urlsearch
params object var search
params = new urlsearch
params("key1=value1&key2=value2"); // display the values for(var value of search
params.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment urlthe definition of 'values() (see "iterable")' in that specification.
WebGL2RenderingContext.getIndexedParameter() - Web APIs
the webgl2renderingcontext.getindexed
parameter() method of the webgl 2 api returns indexed information about a given target.
... syntax any gl.getindexed
parameter(target, index);
parameters target a glenum specifying the target for which to return information.
... examples var binding = gl.getindexed
parameter(gl.transform_feedback_buffer_binding, 0); specifications specification status comment webgl 2.0the definition of 'getindexed
parameter' in that specification.
WebGL2RenderingContext.getInternalformatParameter() - Web APIs
the webgl2renderingcontext.getinternalformat
parameter() method of the webgl 2 api returns information about implementation-dependent support for internal formats.
... syntax any gl.getinternalformat
parameter(target, internalformat, pname);
parameters target a glenum specifying the target renderbuffer object.
... examples var samples = gl.getinternalformat
parameter(gl.renderbuffer, gl.rgba8, gl.samples); specifications specification status comment webgl 2.0the definition of 'getinternalformat
parameter' in that specification.
WebGLRenderingContext.getShaderParameter() - Web APIs
the webglrenderingcontext.getshader
parameter() method of the webgl api returns information about the given shader.
... syntax any gl.getshader
parameter(shader, pname);
parameters shader a webglshader to get
parameter information from.
... examples gl.getshader
parameter(shader, gl.shader_type); specifications specification status comment webgl 1.0the definition of 'getshader
parameter' in that specification.
SyntaxError: Malformed formal parameter - JavaScript
the javascript exception "malformed formal
parameter" occurs when the argument list of a function() constructor call is invalid somehow.
... message syntaxerror: expected {x} (edge) syntaxerror: malformed formal
parameter (firefox) error type syntaxerror what went wrong?
..."formal
parameter" is a fancy way of saying "function argument".
<xsl:with-param> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:with-
param> element sets the value of a
parameter to be passed into a template.
... syntax <xsl:with-
param name=name select=expression> template </xsl:with-
param> required attributes name gives this
parameter a name.
... optional attributes select defines the value of the
parameter through an xpath expression.
PRTimeParamFn
this type defines a callback function to calculate and return the time
parameter offsets from a calendar time object in gmt.
... syntax #include <prtime.h> typedef prtime
parameters (pr_callback_decl *prtime
paramfn) (const prexplodedtime *gmt); description the type prtime
paramfn represents a callback function that, when given a time instant in gmt, returns the time zone information (offset from gmt and dst offset) at that time instant.
PRTimeParameters
syntax #include <prtime.h> typedef struct prtime
parameters { print32 tp_gmt_offset; print32 tp_dst_offset; } prtime
parameters; description each geographic location has a standard time zone, and if daylight saving time (dst) is practiced, a daylight time zone.
... the prtime
parameters structure represents the local time zone information in terms of the offset (in seconds) from gmt.
AesCbcParams - Web APIs
the aescbc
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-cbc algorithm.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aescbc
params' in that specification.
AesCtrParams - Web APIs
the aesctr
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-ctr algorithm.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aesctr
params' in that specification.
AesKeyGenParams - Web APIs
the aeskeygen
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.generatekey(), when generating an aes key: that is, when the algorithm is identified as any of aes-cbc, aes-ctr, aes-gcm, or aes-kw.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aeskeygen
params' in that specification.
AudioParam.defaultValue - Web APIs
the defaultvalue read-only property of the audio
param interface represents the initial value of the attributes as defined by the specific audionode creating the audio
param.
... syntax var defaultval = audio
param.defaultvalue; value a floating-point number.
AudioParam.maxValue - Web APIs
the maxvalue read-only property of the audio
param interface represents the maximum possible value for the
parameter's nominal (effective) range.
... syntax var maxval = audio
param.maxvalue; value a floating-point number indicating the maximum value permitted for the
parameter's nominal range.
AudioParam.minValue - Web APIs
the minvalue read-only property of the audio
param interface represents the minimum possible value for the
parameter's nominal (effective) range.
... syntax var minval = audio
param.minvalue; value a floating-point number indicating the minimum value permitted for the
parameter's nominal range.
AudioParamMap - Web APIs
the web audio api interface audio
parammap represents a set of multiple audio
parameters, each described as a mapping of a domstring identifying the
parameter to the audio
param object representing its value.
... properties the audio
parammap object is accessed as a map in which each
parameter is identified by a name string which is mapped to an audio
param containing the value of that
parameter.
EcKeyGenParams - Web APIs
the eckeygen
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.generatekey(), when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as either of ecdsa or ecdh.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.eckeygen
params' in that specification.
EcKeyImportParams - Web APIs
the eckeyimport
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.importkey() or subtlecrypto.unwrapkey(), when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as either of ecdsa or ecdh.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.eckeyimport
params' in that specification.
EcdsaParams - Web APIs
the ecdsa
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.sign() or subtlecrypto.verify() when using the ecdsa algorithm.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.ecdsa
params' in that specification.
HkdfParams - Web APIs
the hkdf
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.derivekey(), when using the hkdf algorithm.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hkdf
params' in that specification.
HmacImportParams - Web APIs
the hmacimport
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.importkey() or subtlecrypto.unwrapkey(), when generating a key for the hmac algorithm.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hmacimport
params' in that specification.
HmacKeyGenParams - Web APIs
the hmackeygen
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.generatekey(), when generating a key for the hmac algorithm.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hmackeygen
params' in that specification.
Pbkdf2Params - Web APIs
the pbkdf2
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.derivekey(), when using the pbkdf2 algorithm.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.pbkdf2
params' in that specification.
RTCIceParameters.password - Web APIs
the rtcice
parameters dictionary's password property specifies the ice password that, in tandem with the usernamefragment, uniquely identifies an ice session for its entire duration.
... syntax password = rtcice
parameters.password; value a domstring containing the password that corresponds to the transport's usernamefragment string specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcice
parameters.password' in that specification.
RsaHashedImportParams - Web APIs
the rsahashedimport
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.importkey() or subtlecrypto.unwrapkey(), when importing any rsa-based key pair: that is, when the algorithm is identified as any of rsassa-pkcs1-v1_5, rsa-pss, or rsa-oaep.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsahashedimport
params' in that specification.
RsaHashedKeyGenParams - Web APIs
the rsahashedkeygen
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.generatekey(), when generating any rsa-based key pair: that is, when the algorithm is identified as any of rsassa-pkcs1-v1_5, rsa-pss, or rsa-oaep.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsahashedkeygen
params' in that specification.
RsaOaepParams - Web APIs
the rsaoaep
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the rsa_oaep algorithm.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsaoaep
params' in that specification.
RsaPssParams - Web APIs
the rsapss
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.sign() or subtlecrypto.verify(), when using the rsa-pss algorithm.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsapss
params' in that specification.
Index - Web APIs
42 aescbc
params api, aescbc
params, dictionary, reference, web crypto api the aescbc
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-cbc algorithm.
... 43 aesctr
params api, aesctr
params, dictionary, reference, web crypto api the aesctr
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-ctr algorithm.
... 44 aesgcm
params api, aesgcm
params, dictionary, reference, web crypto api the aesgcm
params dictionary of the web crypto api represents the object that should be passed as the algorithm
parameter into subtlecrypto.encrypt(), subtlecrypto.decrypt(), subtlecrypto.wrapkey(), or subtlecrypto.unwrapkey(), when using the aes-gcm algorithm.
...And 186 more matches
sslfnc.html
syntax #include "nss.h" secstatus nss_init(char *configdir);
parameter this function has the following
parameter: configdir a pointer to a string containing the pathname of the directory where the certificate, key, and security module databases reside.
... syntax #include "nss.h" secstatus nss_initreadwrite(char *configdir);
parameter this function has the following
parameter: configdir a pointer to a string containing the pathname of the directory where the certificate, key, and security module databases reside.
... syntax #include "nss.h" secstatus nss_nodb_init(char *reserved);
parameter this function has the following
parameter: reserved should be null..
...And 75 more matches
Editor Embedding Guide - Archive of obsolete content
the first
parameter is the nsidomwindow you just retrieved, the second is the editor type you want to create, and the third is whether you want the window editable immediately or when the document is done loading.
...call a command -- docommand: commandmanager->docommand(acommand, acommand
params); acommand is a const char * to a supported command name (see list below).
... acommand
params could possibly be a null pointer or a pointer to a valid structure filled with relative
parameters to acommand (see list below for legal
params).
...And 71 more matches
nsIDOMWindowUtils
wheel_event_expected_overflow_delta_x_negative 0x0040 wheel_event_expected_overflow_delta_y_zero 0x0100 wheel_event_expected_overflow_delta_y_positive 0x0200 wheel_event_expected_overflow_delta_y_negative 0x0400 mousescroll_prefer_widget_at_point 1 mousescroll_scroll_lines 2 mousescroll_win_scroll_l
param_not_null 65536 touch_hover 1 touch_contact 2 touch_remove 4 touch_cancel 8 ime_status_disabled 0 users cannot use ime at all.
... void activatenativemenuitemat( in astring indexstring );
parameters indexstring clearmozafterpaintevents() void clearmozafterpaintevents();
parameters none.
... pruint32 comparecanvases( in nsidomhtmlcanvaselement acanvas1, in nsidomhtmlcanvaselement acanvas2, out unsigned long amaxdifference );
parameters acanvas1 acanvas2 amaxdifference return value computeanimationdistance() method for testing nsstyleanimation::computedistance.
...And 53 more matches
nsINavBookmarksService
void addobserver( in nsinavbookmarkobserver observer, in boolean ownsweak );
parameters observer the bookmark observer to be added.
... void beginupdatebatch();
parameters none.
... void changebookmarkuri( in nsiuri olduri, obsolete since gecko 1.9 in long long aitemid, in nsiuri anewuri );
parameters olduri obsolete since gecko 1.9 the uri of the item to be changed.
...And 53 more matches
nsIHTMLEditor
void adddefaultproperty( in nsiatom aproperty, in astring aattribute, in astring avalue );
parameters aproperty the property to set by default.
... void addinsertionlistener( in nsicontentfilter infilter );
parameters infilter function which callers want called during insertion.
... void align( in astring aalign );
parameters aalign breakisvisible() checks whether a br node is visible to the user.
...And 49 more matches
nsIFile
all methods with string
parameters have two forms.
... delete_on_close 0x80000000 optional
parameter used by opennsprfiledesc methods append() this function is used for constructing a descendant of the current nsifile.
... void append( in astring node );
parameters node a string which is intended to be a child node of the nsifile.
...And 48 more matches
WebGL constants - Web APIs
standard webgl constants are installed on the webglrenderingcontext and webgl2renderingcontext objects, so that you use them as gl.constant_name: var canvas = document.getelementbyid('mycanvas'); var gl = canvas.getcontext('webgl'); gl.get
parameter(gl.line_width); some constants are also provided by webgl extensions.
... var debuginfo = gl.getextension('webgl_debug_renderer_info'); var vendor = gl.get
parameter(debuginfo.unmasked_vendor_webgl); the webgl tutorial has more information, examples, and resources on how to get started with webgl.
... getting gl
parameter information constants passed to webglrenderingcontext.get
parameter() to specify what information to return.
...And 48 more matches
nsIAnnotationService
void setpageannotation( in nsiuri auri, in autf8string aname, in nsivariant avalue, in long aflags, in unsigned short aexpiration );
parameters auri the uri on which the annotation is to be set.
... void setitemannotation( in long long aitemid, in autf8string aname, in nsivariant avalue, in long aflags, in unsigned short aexpiration );
parameters aitemid the item on which the annotation is to be set.
... void setpageannotationstring( in nsiuri auri, in autf8string aname, in astring avalue, in long aflags, in unsigned short aexpiration );
parameters auri the uri on which the annotation is to be set.
...And 42 more matches
mozIStorageStatement
method overview void initialize(in mozistorageconnection adbconnection, in autf8string asqlstatement); obsolete since gecko 1.9.1 void finalize(); mozistoragestatement clone(); autf8string get
parametername(in unsigned long a
paramindex); unsigned long get
parameterindex(in autf8string aname); autf8string getcolumnname(in unsigned long acolumnindex); unsigned long getcolumnindex(in autf8string aname); void reset(); astring escapestringforlike(in astring avalue, in wchar aescapechar); void bind
parameters(in mozistoragebinding
paramsarray apar...
...ameters); mozistoragebinding
paramsarray newbinding
paramsarray(); void bindutf8string
parameter(in unsigned long a
paramindex, in autf8string avalue); void bindstring
parameter(in unsigned long a
paramindex, in astring avalue); void binddouble
parameter(in unsigned long a
paramindex, in double avalue); void bindint32
parameter(in unsigned long a
paramindex, in long avalue); void bindint64
parameter(in unsigned long a
paramindex, in long long avalue); void bindnull
parameter(in unsigned long a
paramindex); void bindblob
parameter(in unsigned long a
paramindex, [array,const,size_is(avaluesize)] in octet avalue, in unsigned long avaluesize); mozistoragependingstatement executeasync(mozistoragestatementcallback acallback); ...
...
parametercount unsigned long number of
parameters.
...And 39 more matches
nsIXPConnect
void addjsholder( in voidptr aholder, in nsscriptobjecttracerptr atracer );
parameters aholder the object that hold the js objects that should be rooted.
... atracer missing description exceptions thrown missing exception missing description clearallwrappednativesecuritypolicies() void clearallwrappednativesecuritypolicies();
parameters none.
... nsixpconnectjsobjectholder createsandbox( in jscontextptr cx, in nsiprincipal principal );
parameters cx a context to use when creating the sandbox object.
...And 39 more matches
source-editor.jsm
void addbreakpoint( number alineindex, [optional] string acondition );
parameters alineindex the 0-based line number at which to place the breakpoint.
... void addeventlistener( string aeventtype, function acallback );
parameters aeventtype the name of the event type to listen for; see event name constants for possible values.
... boolean canredo();
parameters none.
...And 37 more matches
CustomizableUI.jsm
parameters alistener the listener object to add removelistener() remove a listener added with addlistener.
...
parameters alistener the listener object to remove registerarea() register a customizable area with customizableui.
...
parameters aareaid the name of the area to register.
...And 34 more matches
XPIDL
the following is the correspondence table: table 1: standard idl types idl c++ in
parameter c++ out
parameter js type notes boolean bool bool* boolean char char char* string only chars in range \u0000-\u00ff permitted double double double* number float float float* number long int32_t int32_t* number long long int64_t int64_t* number ...
... in addition to this list, nearly every idl file includes nsrootidl.idl in some fashion, which also defines the following types: table 2: types provided by nsrootidl.idl idl typedef c++ in
parameter c++ out
parameter js type notes prtime (xpidl unsigned long long typedef, 64 bits) number prtime is in microseconds, while js date assumes time in milliseconds nsresult (xpidl unsigned long typedef, 32 bits) number nsrefcnt (xpidl unsigned long typedef, 32 bits) number size_t (xpidl unsigned long typedef, 32 bits...
...webidl types will be passed as mozilla::dom::interfacename* when used as in-
parameters, as mozilla::dom::interfacename** when used as out or inout-
parameters, and as refptr<mozilla::dom::interfacename> when used as an array element.
...And 32 more matches
nsDependentCString
methods constructors nsdependentcstring(const char*, const char*) - source
parameters char* start a pointer to the start of the string.
...nsdependentcstring(const char*, pruint32) - source
parameters char* data a pointer to the string.
...
parameters char* data a pointer to the string.
...And 31 more matches
imgIContainer
void addrestoredata( [array, size_is(acount), const] in char data, in unsigned long acount );
parameters data missing description acount 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.
...void appendframe( in print32 ax, in print32 ay, in print32 awidth, in print32 aheight, in gfximageformat aformat, [array, size_is(imagelength)] out pruint8 imagedata, out unsigned long imagelength );
parameters ax missing description ay missing description awidth missing description aheight missing description aformat missing description imagedata missing description imagelength missing description exceptions thrown missing exception missing description native code only!appendpalettedframe obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 ...
...void appendpalettedframe( in print32 ax, in print32 ay, in print32 awidth, in print32 aheight, in gfximageformat aformat, in pruint8 apalettedepth, [array, size_is(imagelength)] out pruint8 imagedata, out unsigned long imagelength, [array, size_is(palettelength)] out pruint32 palettedata, out unsigned long palettelength );
parameters ax missing description ay missing description awidth missing description aheight missing description aformat missing description apalettedepth missing description imagedata missing description imagelength missing description palettedata missing description palettelength missing description exceptions thrown ...
...And 31 more matches
nsITreeView
boolean candrop( in long index, in long orientation, in nsidomdatatransfer datatransfer );
parameters index the index of the row.
... datatransfer this
parameter, added in gecko 1.9.2, provides the data being dragged, so that it can be examined to determine if a drop is possible.
... boolean candropbeforeafter( in long index, in boolean before );
parameters index the index of the item.
...And 31 more matches
Places utilities for JavaScript
placesutils method overview nsiuri createfixeduri(string aspec); string getformattedstring(string key, string
params); string getstring(string key); boolean nodeisfolder(nsinavhistoryresultnode anode); boolean nodeisbookmark(nsinavhistoryresultnode anode); boolean nodeisseparator(nsinavhistoryresultnode anode); boolean nodeisvisit(nsinavhistoryresultnode anode); boolean nodeisuri(nsinavhistoryresultnode anode); boolean nodeisquery(nsinavhistoryresu...
...
parameters aspec a url string that needs fixup return type returns a correct nsiuri.
... getformattedstring() string getformattedstring(string key, array string
params)
parameters key the string name to get from the string bundle
params strings to substitute into the bundle at designated points see xul:stringbundle for more information.
...And 29 more matches
nsCAutoString
methods constructors void nscautostring() - source constructors void nscautostring(char) - source
parameters char c void nscautostring(const char*, pruint32) - source
parameters char* data pruint32 length void nscautostring(const nscautostring&) - source
parameters nscautostring& str void nscautostring(const nsacstring_internal&) - source
parameters nsacstring_internal& str void nscautostring(const nscsubstringtuple&) - source
parameters ns...
...csubstringtuple& tuple operator= nscautostring& operator=(const nscautostring&) - source
parameters nscautostring& str nscstring& operator=(const nscstring&) - source
parameters nscstring& str nsacstring_internal& operator=(char) - source
parameters char c nsacstring_internal& operator=(const char*) - source
parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source
parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source
parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the...
... @
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 acount tells us how far from the offset we are to search.
...And 28 more matches
nsXPIDLCString
class declaration nstxpidlstring extends nststring such that: (1) mdata can be null (2) objects of this type can be automatically cast to |const chart*| (3) getter_copies method is supported to adopt data allocated with ns_alloc, such as "out string"
parameters in xpidl.
... methods constructors void nsxpidlcstring() - source void nsxpidlcstring(const nsxpidlcstring&) - source
parameters nsxpidlcstring& str operator const char* char* operator const char*() const - source operator[] char operator[](print32) const - source
parameters print32 i char operator[](pruint32) const - source
parameters pruint32 i operator= nsxpidlcstring& operator=(const nsxpidlcstring&) - source
parameters nsxpidlcstring& str nscstring& operator=(const nscstring&)...
... - source
parameters nscstring& str nsacstring_internal& operator=(char) - source
parameters char c nsacstring_internal& operator=(const char*) - source
parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source
parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source
parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
...And 28 more matches
DevTools API - Firefox Developer Tools
parameters: tooldefinition {tooldefinition} - an object that contains information about the tool.
...
parameters: tool {tooldefinition|string} - the tool definition object or the id of the tool to unregister.
...
parameters: themedefinition {themedefinition} - an object that contains information about the theme.
...And 28 more matches
d - SVG: Scalable Vector Graphics
a path definition is a list of path commands where each command is composed of a command letter and numbers that represent the command
parameters.
...each command is composed of a command letter and numbers that represent the command
parameters.
... command
parameters notes m (x, y)+ move the current point to the coordinate x,y.
...And 28 more matches
NS_ConvertUTF16toUTF8
methods constructors void ns_convertutf16toutf8(const prunichar*) - source a helper class that converts a utf-16 string to utf-8
parameters prunichar* astring void ns_convertutf16toutf8(const prunichar*, pruint32) - source
parameters prunichar* astring pruint32 alength void ns_convertutf16toutf8(const nsastring_internal&) - source
parameters nsastring_internal& astring operator= nscautostring& operator=(const nscautostring&) - source
parameters nscautostring& str nscstring& operator=(const nscstring&) -...
... source
parameters nscstring& str nsacstring_internal& operator=(char) - source
parameters char c nsacstring_internal& operator=(const char*) - source
parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source
parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source
parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
... @
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 acount tells us how far from the offset we are to search.
...And 27 more matches
NS_LossyConvertUTF16toASCII
methods constructors void ns_lossyconvertutf16toascii(const prunichar*) - source a helper class that converts a utf-16 string to ascii in a lossy manner
parameters prunichar* astring void ns_lossyconvertutf16toascii(const prunichar*, pruint32) - source
parameters prunichar* astring pruint32 alength void ns_lossyconvertutf16toascii(const nsastring_internal&) - source
parameters nsastring_internal& astring operator= nscautostring& operator=(const nscautostring&) - source
parameters nscautostring& str nscstring& operator=(const n...
...scstring&) - source
parameters nscstring& str nsacstring_internal& operator=(char) - source
parameters char c nsacstring_internal& operator=(const char*) - source
parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source
parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source
parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
... @
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 acount tells us how far from the offset we are to search.
...And 27 more matches
nsAdoptingCString
methods constructors void nsadoptingcstring() - source void nsadoptingcstring(char*, pruint32) - source
parameters char* str pruint32 length void nsadoptingcstring(const nsadoptingcstring&) - source
parameters nsadoptingcstring& str operator= nsadoptingcstring& operator=(const nsadoptingcstring&) - source
parameters nsadoptingcstring& str nsxpidlcstring& operator=(const nsxpidlcstring&) - source
parameters nsxpidlcstring& str nscstring& operator=(const nscstring&) - source par...
...ameters nscstring& str nsacstring_internal& operator=(char) - source
parameters char c nsacstring_internal& operator=(const char*) - source
parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source
parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source
parameters nscsubstringtuple& tuple operator const char* char* operator const char*() const - source operator[] char operator[](print32) const - source
parameters print32 i char operator[](pruint32) const - source
parameters pruint32 i get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substrin...
... @
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 acount tells us how far from the offset we are to search.
...And 27 more matches
nsCString
methods constructors void nscstring() - source constructors void nscstring(char) - source
parameters char c void nscstring(const char*, pruint32) - source
parameters char* data pruint32 length void nscstring(const nscstring&) - source
parameters nscstring& str void nscstring(const nscsubstringtuple&) - source
parameters nscsubstringtuple& tuple void nscstring(const nsacstring_internal&) - source
parameters nsacstring_internal& readable operator= nscstring& op...
...erator=(const nscstring&) - source
parameters nscstring& str nsacstring_internal& operator=(char) - source
parameters char c nsacstring_internal& operator=(const char*) - source
parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source
parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source
parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
... @
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 acount tells us how far from the offset we are to search.
...And 27 more matches
nsDependentString
methods constructors void nsdependentstring(const prunichar*, const prunichar*) - source constructors
parameters prunichar* start prunichar* end void nsdependentstring(const prunichar*, pruint32) - source
parameters prunichar* data pruint32 length void nsdependentstring(const prunichar*) - source
parameters prunichar* data void nsdependentstring(const nsastring_internal&) - source
parameters nsastring_internal& str void nsdependentstring() - source assertvalid void assertva...
...
parameters prunichar* data void rebind(const prunichar*, pruint32) - source
parameters prunichar* data pruint32 length void rebind(const prunichar*, const prunichar*) - source
parameters prunichar* start prunichar* end operator= nsstring& operator=(const nsstring&) - source
parameters nsstring& str nsastring_internal& operator=(prunichar) - source
parameters prunichar c nsastring_internal& operator=(const prunichar*) - source
parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source
parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - s...
...ource
parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
...And 27 more matches
nsDependentSubstring external
methods constructors void nsdependentsubstring_external() - source void nsdependentsubstring_external(const prunichar*, pruint32) - source
parameters prunichar astart pruint32 alength void nsdependentsubstring_external(const nsastring&, pruint32) - source
parameters nsastring astr pruint32 astartpos void nsdependentsubstring_external(const nsastring&, pruint32, pruint32) - source
parameters nsastring astr pruint32 astartpos pruint32 alength...
... rebind void rebind(const prunichar*, pruint32) - source
parameters prunichar astart pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters prunichar* begin prunichar* end prunichar beginreading() const - source endreading prunichar endreading() const - source charat prunichar charat(pruint32) const - source
parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source
parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 27 more matches
nsFixedCString
methods constructors void nsfixedcstring(char*, pruint32) - source @
param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @
param storagesize the size of the fixed buffer @
param length (optional) the length of the string already contained in the buffer
parameters char* data pruint32 storagesize void nsfixedcstring(char*, pruint32, pruint32) - source
parameters char* data pruint32 storagesize pruint32 len...
...gth operator= nscstring& operator=(const nscstring&) - source
parameters nscstring& str nsacstring_internal& operator=(char) - source
parameters char c nsacstring_internal& operator=(const char*) - source
parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source
parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source
parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
... @
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 acount tells us how far from the offset we are to search.
...And 27 more matches
nsPromiseFlatCString
methods constructors void nspromiseflatcstring(const nsacstring_internal&) - source
parameters nsacstring_internal& str void nspromiseflatcstring(const nscsubstringtuple&) - source
parameters nscsubstringtuple& tuple operator= nscstring& operator=(const nscstring&) - source
parameters nscstring& str nsacstring_internal& operator=(char) - source
parameters char c nsacstring_internal& operator=(const char*) - source
parameters char* data nsacstring_intern...
...al& operator=(const nsacstring_internal&) - source
parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source
parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
... @
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 acount tells us how far from the offset we are to search.
...And 27 more matches
nsXPIDLString
class declaration nstxpidlstring extends nststring such that: (1) mdata can be null (2) objects of this type can be automatically cast to |const chart*| (3) getter_copies method is supported to adopt data allocated with ns_alloc, such as "out string"
parameters in xpidl.
... methods constructors void nsxpidlstring() - source void nsxpidlstring(const nsxpidlstring&) - source
parameters nsxpidlstring& str operator const prunichar* prunichar* operator const prunichar*() const - source operator[] prunichar operator[](print32) const - source
parameters print32 i prunichar operator[](pruint32) const - source
parameters pruint32 i operator= nsxpidlstring& operator=(const nsxpidlstring&) - source
parameters nsxpidlstring& str nsstring& operato...
...r=(const nsstring&) - source
parameters nsstring& str nsastring_internal& operator=(prunichar) - source
parameters prunichar c nsastring_internal& operator=(const prunichar*) - source
parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source
parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source
parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
...And 27 more matches
NS_ConvertASCIItoUTF16
methods constructors void ns_convertasciitoutf16(const char*) - source
parameters char* acstring void ns_convertasciitoutf16(const char*, pruint32) - source
parameters char* acstring pruint32 alength void ns_convertasciitoutf16(const nsacstring_internal&) - source
parameters nsacstring_internal& acstring operator= nsautostring& operator=(const nsautostring&) - source
parameters nsautostring& str nsstring& operator=(const nsstring&) - source par...
...ameters nsstring& str nsastring_internal& operator=(prunichar) - source
parameters prunichar c nsastring_internal& operator=(const prunichar*) - source
parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source
parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source
parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
... @
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 acount tells us how far from the offset we are to search.
...And 26 more matches
NS ConvertASCIItoUTF16 external
methods constructors void ns_convertasciitoutf16_external(const nsacstring&) - source
parameters nsacstring& astr void ns_convertasciitoutf16_external(const char*, pruint32) - source
parameters char* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source
parameters nsstring_external& a...
...string nsastring& operator=(const nsastring&) - source
parameters nsastring& astring nsastring& operator=(const prunichar*) - source
parameters prunichar* aptr nsastring& operator=(prunichar) - source
parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() const - source charat prunichar charat(pruint32) const - source
parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source
parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 26 more matches
NS_ConvertUTF8toUTF16
methods constructors void ns_convertutf8toutf16(const char*) - source
parameters char* acstring void ns_convertutf8toutf16(const char*, pruint32) - source
parameters char* acstring pruint32 alength void ns_convertutf8toutf16(const nsacstring_internal&) - source
parameters nsacstring_internal& acstring operator= nsautostring& operator=(const nsautostring&) - source
parameters nsautostring& str nsstring& operator=(const nsstring&) - source
param...
...eters nsstring& str nsastring_internal& operator=(prunichar) - source
parameters prunichar c nsastring_internal& operator=(const prunichar*) - source
parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source
parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source
parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
... @
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 acount tells us how far from the offset we are to search.
...And 26 more matches
NS ConvertUTF8toUTF16 external
methods constructors void ns_convertutf8toutf16_external(const nsacstring&) - source
parameters nsacstring& astr void ns_convertutf8toutf16_external(const char*, pruint32) - source
parameters char* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source
parameters nsstring_external& as...
...tring nsastring& operator=(const nsastring&) - source
parameters nsastring& astring nsastring& operator=(const prunichar*) - source
parameters prunichar* aptr nsastring& operator=(prunichar) - source
parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() const - source charat prunichar charat(pruint32) const - source
parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source
parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 26 more matches
PromiseFlatString (External)
methods get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source
parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source
parameters nsastring& astring nsastring& operator=(const prunichar*) - source
parameters prunichar* aptr nsastring& operator=(prunichar) - source
parameters prunichar achar adopt ...
... void adopt(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() const - source charat prunichar charat(pruint32) const - source
parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source
parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 26 more matches
nsAdoptingString
methods constructors void nsadoptingstring() - source void nsadoptingstring(prunichar*, pruint32) - source
parameters prunichar* str pruint32 length void nsadoptingstring(const nsadoptingstring&) - source
parameters nsadoptingstring& str operator= nsadoptingstring& operator=(const nsadoptingstring&) - source
parameters nsadoptingstring& str nsxpidlstring& operator=(const nsxpidlstring&) - source
parameters nsxpidlstring& str nsstring& operator=(const nsstring&) - source
parameter...
...s nsstring& str nsastring_internal& operator=(prunichar) - source
parameters prunichar c nsastring_internal& operator=(const prunichar*) - source
parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source
parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source
parameters nssubstringtuple& tuple operator const prunichar* prunichar* operator const prunichar*() const - source operator[] prunichar operator[](print32) const - source
parameters print32 i prunichar operator[](pruint32) const - source
parameters pruint32 i get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - sou...
... @
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 acount tells us how far from the offset we are to search.
...And 26 more matches
nsAutoString
methods constructors void nsautostring() - source constructors void nsautostring(prunichar) - source
parameters prunichar c void nsautostring(const prunichar*, pruint32) - source
parameters prunichar* data pruint32 length void nsautostring(const nsautostring&) - source
parameters nsautostring& str void nsautostring(const nsastring_internal&) - source
parameters nsastring_internal& str void nsautostring(const nssubstringtuple&) - source
parameters nssubstringtuple& tuple o...
...perator= nsautostring& operator=(const nsautostring&) - source
parameters nsautostring& str nsstring& operator=(const nsstring&) - source
parameters nsstring& str nsastring_internal& operator=(prunichar) - source
parameters prunichar c nsastring_internal& operator=(const prunichar*) - source
parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source
parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source
parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
... @
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 acount tells us how far from the offset we are to search.
...And 26 more matches
nsAutoString (External)
methods get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source
parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source
parameters nsastring& astring nsastring& operator=(const prunichar*) - source
parameters prunichar* aptr nsastring& operator=(prunichar) - source
parameters prunichar achar adopt ...
... void adopt(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() const - source charat prunichar charat(pruint32) const - source
parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source
parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 26 more matches
nsDependentCSubstring external
methods constructors void nsdependentcsubstring_external() - source void nsdependentcsubstring_external(const char*, pruint32) - source
parameters char* astart pruint32 alength void nsdependentcsubstring_external(const nsacstring&, pruint32) - source
parameters nsacstring& astr pruint32 astartpos void nsdependentcsubstring_external(const nsacstring&, pruint32, pruint32) - source
parameters nsacstring& astr pruint32 astartpos pruint32 ale...
...ngth rebind void rebind(const char*, pruint32) - source
parameters char* astart pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters char** begin char** end char* beginreading() const - source endreading char* endreading() const - source charat char charat(pruint32) const - source
parameters pruint32 apos operator[] char operator[](pruint32) const - source
parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 26 more matches
nsDependentString external
methods constructors void nsdependentstring_external() - source void nsdependentstring_external(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength rebind void rebind(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source
parameters ...
... nsstring_external& astring nsastring& operator=(const nsastring&) - source
parameters nsastring& astring nsastring& operator=(const prunichar*) - source
parameters prunichar* aptr nsastring& operator=(prunichar) - source
parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() const - source charat prunichar charat(pruint32) const - source
parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source
parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 26 more matches
nsFixedString
methods constructors void nsfixedstring(prunichar*, pruint32) - source @
param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @
param storagesize the size of the fixed buffer @
param length (optional) the length of the string already contained in the buffer
parameters prunichar* data pruint32 storagesize void nsfixedstring(prunichar*, pruint32, pruint32) - source
parameters prunichar* data pruint32 storagesiz...
...e pruint32 length operator= nsstring& operator=(const nsstring&) - source
parameters nsstring& str nsastring_internal& operator=(prunichar) - source
parameters prunichar c nsastring_internal& operator=(const prunichar*) - source
parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source
parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source
parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
... @
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 acount tells us how far from the offset we are to search.
...And 26 more matches
nsPromiseFlatString
methods constructors void nspromiseflatstring(const nsastring_internal&) - source
parameters nsastring_internal& str void nspromiseflatstring(const nssubstringtuple&) - source
parameters nssubstringtuple& tuple operator= nsstring& operator=(const nsstring&) - source
parameters nsstring& str nsastring_internal& operator=(prunichar) - source
parameters prunichar c nsastring_internal& operator=(const prunichar*) - source
parameters prunichar* data nsastr...
...ing_internal& operator=(const nsastring_internal&) - source
parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source
parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
... @
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 acount tells us how far from the offset we are to search.
...And 26 more matches
nsString
methods constructors void nsstring() - source constructors void nsstring(prunichar) - source
parameters prunichar c void nsstring(const prunichar*, pruint32) - source
parameters prunichar* data pruint32 length void nsstring(const nsstring&) - source
parameters nsstring& str void nsstring(const nssubstringtuple&) - source
parameters nssubstringtuple& tuple void nsstring(const nsastring_internal&) - source
parameters nsastring_internal& readable operator= nsstring...
...& operator=(const nsstring&) - source
parameters nsstring& str nsastring_internal& operator=(prunichar) - source
parameters prunichar c nsastring_internal& operator=(const prunichar*) - source
parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source
parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source
parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string.
... @
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 acount tells us how far from the offset we are to search.
...And 26 more matches
nsStringContainer (External)
parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() const - source charat prunichar charat(pruint32) const - source
parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source...
...
parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
... @
param newsize size the string to this length.
...And 26 more matches
nsString external
methods constructors void nsstring_external() - source void nsstring_external(const nsstring_external&) - source
parameters nsstring_external& astring void nsstring_external(const nsastring&) - source
parameters nsastring& areadable void nsstring_external(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength get prunichar* get() const - source operator= ...
... nsstring_external& operator=(const nsstring_external&) - source
parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source
parameters nsastring& astring nsastring& operator=(const prunichar*) - source
parameters prunichar* aptr nsastring& operator=(prunichar) - source
parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() const - source charat prunichar charat(pruint32) const - source
parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source
parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 26 more matches
IAccessibleTable
[propget] hresult accessibleat( [in] long row, [in] long column, [out] iunknown accessible );
parameters row the 0 based row index for which to retrieve the cell.
...[propget] hresult caption( [out] iunknown accessible );
parameters accessible if the table has a caption then a reference to it is returned, else a null pointer is returned.
...[propget] hresult childindex( [in] long rowindex, [in] long columnindex, [out] long cellindex );
parameters rowindex 0 based row index for the cell.
...And 26 more matches
nsIWindowsRegKey
constant value description root_key_classes_root 0x80000000 root_key_current_user 0x80000001 root_key_local_machine 0x80000002 access constants values for the mode
parameter passed to the open() and create() methods.
...void close();
parameters none.
...note: on 32-bit windows, it is valid to pass any hkey as the rootkey
parameter of this function.
...And 26 more matches
NS ConvertUTF16toUTF8 external
methods constructors void ns_convertutf16toutf8_external(const nsastring&) - source
parameters nsastring& astr void ns_convertutf16toutf8_external(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source
parameters nscstring_exter...
...nal& astring nsacstring& operator=(const nsacstring&) - source
parameters nsacstring& astring nsacstring& operator=(const char*) - source
parameters char* aptr nsacstring& operator=(char) - source
parameters char achar adopt void adopt(const char*, pruint32) - source
parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters char** begin char** end char* beginreading() const - source endreading char* endreading() const - source charat char charat(pruint32) const - source
parameters pruint32 apos operator[] char operator[](pruint32) const - source
parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 25 more matches
NS LossyConvertUTF16toASCII external
methods constructors void ns_lossyconvertutf16toascii_external(const nsastring&) - source
parameters nsastring& astr void ns_lossyconvertutf16toascii_external(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source
parameters nscstring...
..._external& astring nsacstring& operator=(const nsacstring&) - source
parameters nsacstring& astring nsacstring& operator=(const char*) - source
parameters char* aptr nsacstring& operator=(char) - source
parameters char achar adopt void adopt(const char*, pruint32) - source
parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters char** begin char** end char* beginreading() const - source endreading char* endreading() const - source charat char charat(pruint32) const - source
parameters pruint32 apos operator[] char operator[](pruint32) const - source
parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 25 more matches
PromiseFlatCString (External)
methods get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source
parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source
parameters nsacstring& astring nsacstring& operator=(const char*) - source
parameters char* aptr nsacstring& operator=(char) - source
parameters char achar adopt void adopt...
...(const char*, pruint32) - source
parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters char** begin char** end char* beginreading() const - source endreading char* endreading() const - source charat char charat(pruint32) const - source
parameters pruint32 apos operator[] char operator[](pruint32) const - source
parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 25 more matches
nsCAutoString (External)
methods get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source
parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source
parameters nsacstring& astring nsacstring& operator=(const char*) - source
parameters char* aptr nsacstring& operator=(char) - source
parameters char achar adopt void adopt...
...(const char*, pruint32) - source
parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters char** begin char** end char* beginreading() const - source endreading char* endreading() const - source charat char charat(pruint32) const - source
parameters pruint32 apos operator[] char operator[](pruint32) const - source
parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 25 more matches
nsCString external
methods constructors void nscstring_external() - source void nscstring_external(const nscstring_external&) - source
parameters nscstring_external& astring void nscstring_external(const nsacstring&) - source
parameters nsacstring& areadable void nscstring_external(const char*, pruint32) - source
parameters char* adata pruint32 alength get char* get() const - source operator= ...
...nscstring_external& operator=(const nscstring_external&) - source
parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source
parameters nsacstring& astring nsacstring& operator=(const char*) - source
parameters char* aptr nsacstring& operator=(char) - source
parameters char achar adopt void adopt(const char*, pruint32) - source
parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters char** begin char** end char* beginreading() const - source endreading char* endreading() const - source charat char charat(pruint32) const - source
parameters pruint32 apos operator[] char operator[](pruint32) const - source
parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 25 more matches
nsDependentCString external
methods constructors void nsdependentcstring_external() - source void nsdependentcstring_external(const char*, pruint32) - source
parameters char* adata pruint32 alength rebind void rebind(const char*, pruint32) - source
parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source
parameters nscstring_ex...
...ternal& astring nsacstring& operator=(const nsacstring&) - source
parameters nsacstring& astring nsacstring& operator=(const char*) - source
parameters char* aptr nsacstring& operator=(char) - source
parameters char achar adopt void adopt(const char*, pruint32) - source
parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters char** begin char** end char* beginreading() const - source endreading char* endreading() const - source charat char charat(pruint32) const - source
parameters pruint32 apos operator[] char operator[](pruint32) const - source
parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 25 more matches
nsLiteralCString (External)
methods rebind void rebind(const char*, pruint32) - source
parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source
parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source
parameters nsacstring& astring ...
... nsacstring& operator=(const char*) - source
parameters char* aptr nsacstring& operator=(char) - source
parameters char achar adopt void adopt(const char*, pruint32) - source
parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters char** begin char** end char* beginreading() const - source endreading char* endreading() const - source charat char charat(pruint32) const - source
parameters pruint32 apos operator[] char operator[](pruint32) const - source
parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 25 more matches
nsLiteralString (External)
methods rebind void rebind(const char*, pruint32) - source
parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source
parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source
parameters nsacstring& astring ...
... nsacstring& operator=(const char*) - source
parameters char* aptr nsacstring& operator=(char) - source
parameters char achar adopt void adopt(const char*, pruint32) - source
parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...
parameters char** begin char** end char* beginreading() const - source endreading char* endreading() const - source charat char charat(pruint32) const - source
parameters pruint32 apos operator[] char operator[](pruint32) const - source
parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 25 more matches
mozIStorageConnection
void asyncclose( in mozistoragecompletioncallback acallback optional );
parameters acallback optional an optional callback handler to be executed when the connection is successfully closed.
... void begintransaction();
parameters none.
... void begintransactionas( in print32 transactiontype );
parameters transactiontype one of the transaction constants (mozistorageconnection.transaction_deferred, mozistorageconnection.transaction_immediate, mozistorageconnection.transaction_exclusive) clone() clones a database connection, optionally making the new connection read only.
...And 25 more matches
nsACString (External)
parameters char** begin char** end char* beginreading() const - source endreading char* endreading() const - source charat char charat(pruint32) const - source
parameters pruint32 apos operator[] char operator[](pruint32) const - source
parameters ...
... @
param newsize size the string to this length.
...
parameters char** begin char** end pruint32 newsize char* beginwriting(pruint32) - source
parameters pruint32 alen endwriting char* endwriting() - source setlength prbool setlength(pruint32) - source
parameters pruint32 alen length pruint32 length() const - source isempty prbool isempty() const - source setisvoid void setisvoid(prbool) - source
parameters prbool val isvoid prbool isvoid() const - source ...
...And 24 more matches
nsCStringContainer (External)
parameters char* begin char* end char beginreading() const - source endreading char endreading() const - source charat char charat(pruint32) const - source
parameters pruint32 apos operator[] char operator[](pruint32) const - source
parameters prui...
... @
param newsize size the string to this length.
...
parameters char* begin char* end pruint32 newsize char beginwriting(pruint32) - source
parameters pruint32 alen endwriting char endwriting() - source setlength prbool setlength(pruint32) - source
parameters pruint32 alen length pruint32 length() const - source isempty prbool isempty() const - source setisvoid void setisvoid(prbool) - source
parameters prbool val isvoid prbool isvoid() const - source ...
...And 24 more matches
nsAString (External)
parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() const - source charat prunichar charat(pruint32) const - source
parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source
parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(pruni...
... @
param newsize size the string to this length.
...
parameters prunichar** begin prunichar** end pruint32 newsize prunichar* beginwriting(pruint32) - source
parameters pruint32 <anonymous> endwriting prunichar* endwriting() - source setlength prbool setlength(pruint32) - source
parameters pruint32 alen length pruint32 length() const - source isempty prbool isempty() const - source setisvoid void setisvoid(prbool) - source
parameters prbool val isvoid prbool isvoid() const - source assign void assign(const nsastring&) - source
parameters nsastring& astring void assign(const prunichar*, pruint32) - source
parameters prunichar* adata pruint32 alength void assign(prunichar) - source...
...And 23 more matches
nsISessionStore
void deletetabvalue( in nsidomnode atab, in astring akey );
parameters atab the tab for which to delete the value.
... void deletewindowvalue( in nsidomwindow awindow, in astring akey );
parameters awindow the window in which to delete the value.
... nsidomnode duplicatetab( in nsidomwindow awindow, in nsidomnode atab );
parameters awindow the window in which the duplicated tab will be created.
...And 23 more matches
nsIVariant
methods native code only!getasacstring acstring getasacstring();
parameters none.
... 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.
...(reference counted elements are not cloned, but their reference count is increased.) return value native code only!getasastring astring getasastring();
parameters none.
...And 23 more matches
nsIDocShell
void addsessionstorage( in nsiprincipal principal, in nsidomstorage storage );
parameters principal the principal to use for the new storage object.
...void addstate( in nsivariant adata, in domstring atitle, in domstring aurl, in boolean areplace );
parameters adata the state object to pass to the popstate event.
... atitle gecko currently ignores this
parameter.
...And 22 more matches
nsIPromptService
note: some of these interface methods use out and inout
parameters.
... in c++, out
parameters are pointers.
... for javascript, they are extra work, as you can't use an out
parameter directly.
...And 22 more matches
nsISelectionController
void characterextendforbackspace();
parameters none.
...void characterextendfordelete();
parameters none.
...void charactermove( in boolean forward, in boolean extend );
parameters forward forward or backward if pr_false.
...And 22 more matches
AddonManager
to do so many methods of the addonmanager take the add-on types as
parameters.
... callbacks installcallback() a callback that is passed a single addoninstall void installcallback( in addoninstall install )
parameters install the addoninstall passed back from the asynchronous request installlistcallback() a callback that is passed an array of addoninstalls void installlistcallback( in addoninstall installs[] )
parameters installs the array of addoninstalls passed back from the asynchronous request addoncallback() a callback that is passed a single addon void addoncallback( in addon ad...
...don )
parameters addon the addon passed back from the asynchronous request.
...And 21 more matches
nsIMsgDBView
void open(in nsimsgfolder folder, in nsmsgviewsorttypevalue sorttype, in nsmsgviewsortordervalue sortorder, in nsmsgviewflagstypevalue viewflags, out long count);
parameters folder the nsimsgfolder to open.
... void openwithhdrs(in nsisimpleenumerator aheaders, in nsmsgviewsorttypevalue asorttype, in nsmsgviewsortordervalue asortorder, in nsmsgviewflagstypevalue aviewflags, out long acount);
parameters aheaders a list of headers to open, arranged in an nsisimpleenumerator.
... void init(in nsimessenger amessengerinstance, in nsimsgwindow amsgwindow, in nsimsgdbviewcommandupdater acommandupdater);
parameters amessengerinstance amsgwindow acommandupdater sort() sorts the currently loaded messages.
...And 21 more matches
tabs/utils - Archive of obsolete content
parameters tab : tab a xul tab element to activate.
...
parameters window : window a browser window.
...
parameters window : window a browser window.
...And 20 more matches
Drawing and Event Handling - Plugins
op-left corner */ uint32 y; /* relative to a netscape page */ uint32 width; /* maximum window size */ uint32 height; nprect cliprect; /* clipping rectangle in port coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* whether this is a window or a drawable */ } npwindow; the window
parameter is a platform-specific handle to a native window element in the browser window hierarchy on windows and unix.
... void npp_print(npp instance, npprint *printinfo); the instance
parameter represents the current plug-in.
... the printinfo
parameter determines the print mode.
...And 20 more matches
Namespaces crash course - SVG: Scalable Vector Graphics
<svg xmlns="http://www.w3.org/2000/svg"> <!-- more tags here --> </svg> the namespace declaration is provided by the xmlns
parameter.
... this
parameter says that the <svg> element and its child elements belong to whichever xml dialect has the namespace name 'http://www.w3.org/2000/svg' which is, of course, svg.
... <html xmlns="http://www.w3.org/1999/xhtml"> <body> <!-- some xhtml tags here --> <svg xmlns="http://www.w3.org/2000/svg" width="300px" height="200px"> <!-- some svg tags here --> </svg> <!-- some xhtml tags here --> </body> </html> in this example the xmlns
parameter on the root <html> element declares the default namespace to be xhtml.
...And 20 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
here's an example of this kind of usage for ie: <!-- ie only code --> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="366" height="142" id="myflash"> <
param name="movie" value="javascript-to-flash.swf" /> <
param name="quality" value="high" /> <
param name="swliveconnect" value="true" /> </object> in the above example, the classid attribute that goes along with the object element points to a "clsid:" urn followed by the unique identifier of an activex control (in the above example, the string beginning with "d27...").
...additional
param elements (which are "children" of the above object element) specify configuration
parameters for the flash plugin.
... for instance, the
param name="movie" tells the flash plugin the location of the swf file to start playing.
...And 19 more matches
nsIContentPrefService2
domain
parameters many methods of this interface accept a "domain"
parameter.
...private-browsing context
parameters many methods also accept a "context"
parameter.
... this
parameter relates to private browsing and determines the kind of storage that a method uses, either the usual permanent storage or temporary storage set() aside for private browsing sessions.
...And 19 more matches
nsIEditorSpellCheck
void addwordtodictionary( in wstring word );
parameters word the word to add to the current personal dictionary.
...boolean canspellcheck();
parameters none.
...void checkcurrentdictionary();
parameters none.
...And 19 more matches
Component; nsIPrefBranch
for example, if your observer is registered with addobserver("bar.", ...) on a branch with root "foo.", modifying the preference "foo.bar.baz" will trigger the observer, and adata
parameter will be "bar.baz".
... void addobserver( in string adomain, in nsiobserver aobserver, in boolean aholdweak );
parameters adomain the preference on which to listen for changes.
... void clearuserpref( in string aprefname );
parameters aprefname the preference to be cleared.
...And 19 more matches
nsIXSLTProcessor
to create an instance, use: var xsltprocessor = components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createinstance(components.interfaces.nsixsltprocessor); method overview void clear
parameters(); nsivariant get
parameter(in domstring namespaceuri, in domstring localname); void importstylesheet(in nsidomnode style); void remove
parameter(in domstring namespaceuri, in domstring localname); void reset(); void set
parameter(in domstring namespaceuri, in domstring localname, in nsivariant value); nsidomdocument transformtodocument(in nsidomnode source); nsidomdocumentfragmen...
...t transformtofragment(in nsidomnode source, in nsidomdocument output); methods clear
parameters() removes all set
parameters from this nsixsltprocessor.
... this will make the processor use the default-value for all
parameters as specified in the stylesheet.
...And 19 more matches
Streams - Plugins
the browser can create a stream for several different types of data: for the file specified in the data attribute of the object element or the src attribute of the embed element for a data file for a full-page instance the npp_newstream method has the following syntax: nperror npp_newstream(npp instance, npmimetype type, npstream *stream, npbool seekable, uint16* stype); the instance
parameter refers to the plug-in instance receiving the stream; the type
parameter represents the stream's mime type.
... the stream
parameter is a pointer to the new stream, which is valid until the stream is destroyed.
... the seekable
parameter specifies whether the stream is seekable (true) or not (false).
...And 19 more matches
Background audio processing using AudioWorklet - Web APIs
set up any audio
parameters the audioworkletnode needs, or that you wish to configure.
... basic code framework the barest framework of an audio processor class looks like this: class myaudioprocessor extends audioworkletprocessor { constructor() { super(); } process(inputlist, outputlist,
parameters) { /* using the inputs (or not, as needed), write the output into each of the outputs */ return true; } }; registerprocessor("my-audio-processor", myaudioprocessor); after the implementation of the processor comes a call to the global function registerprocessor(), which is only available within the scope of the audio context's audioworklet, which is the invoker of the pr...
... 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 channelcount = math.min(input.length, output.length); for (let channelnum = 0; channelnum < channelcount; channelnum++) { let samplecount = input[channelnum].lengt...
...And 19 more matches
Proxy Auto-Configuration (PAC) file - HTTP
} syntax function findproxyforurl(url, host)
parameters url the url being accessed.
...the port number is not included in this
parameter.
... the pac file is named proxy.pac command line: pactester -p ~/pacparser-master/tests/proxy.pac -u http://www.mozilla.org (passes the host
parameter www.mozilla.org and the url
parameter http://www.mozilla.org) isplainhostname() syntax isplainhostname(host)
parameters host the hostname from the url (excluding port number).
...And 19 more matches
Drawing graphics - Learn web development
this is done using the htmlcanvaselement.getcontext() method, which for basic usage takes a single string as a
parameter representing the type of context you want to retrieve.
...add the following lines at the bottom of your javascript: ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height); here we are setting a fill color using the canvas' fillstyle property (this takes color values just like css properties do), then drawing a rectangle that covers the entire area of the canvas with thefillrect method (the first two
parameters are the coordinates of the rectangle's top left hand corner; the last two are the width and height you want the rectangle drawn at — we told you those width and height variables would be useful)!
...its top left corner is 50 pixels away from the top and left of the canvas edge (as defined by the first two
parameters), and it is 100 pixels wide and 150 pixels tall (as defined by the third and fourth
parameters).
...And 17 more matches
XPCOMUtils.jsm
_xpcom_categories: [{ // each object in the array specifies the
parameters to pass to // nsicategorymanager.addcategoryentry().
... 'true' is passed for // both apersist and areplace
params.
...when set to true, and only if 'value' // is not specified, the concatenation of the string "service," and the // object's contractid is passed as avalue
parameter of addcategoryentry.
...And 17 more matches
NSS PKCS11 Functions
syntax #include "secmod.h" extern secmodmodule *secmod_loadusermodule(char *modulespec, secmodmodule *parent, prbool recurse);
parameters this function has the following
parameters: modulespec is a pkcs #11 modulespec.
...nss
parameters may be specified in module specs used by secmod_loadusermodule.
...syntax #include "secmod.h" extern secstatus secmod_unloadusermodule(secmodmodule *module);
parameters this function has the following
parameters: module is the module to be unloaded.
...And 17 more matches
Index
this is useful as a
parameter type, or a temporal local variable for it.
...these structures wrap
parameters that are passed to the finalizers removing most of explicit dependencies on jscontext in the finalization code.
...if prop is non-null, it must come from the *propp out
parameter of a prior jsobjectops.defineproperty or jsobjectops.lookupproperty call.
...And 17 more matches
IAccessibleTable2
[propget] hresult caption( [out] iunknown accessible );
parameters accessible if the table has a caption then a reference to it is returned, else a null pointer is returned.
...[propget] hresult cellat( [in] long row, [in] long column, [out] iunknown cell );
parameters row the 0 based row index for which to retrieve the cell.
...[propget] hresult columndescription( [in] long column, [out] bstr description );
parameters column the 0 based index of the column for which to retrieve the description.
...And 17 more matches
nsIAccessibleTable
nsiaccessible getcellat( in long rowindex, in long columnindex );
parameters rowindex the row index of the cell.
... long getcellindexat( in long rowindex, in long columnindex );
parameters rowindex the row index of the cell.
... astring getcolumndescription( in long columnindex );
parameters columnindex the column index.
...And 17 more matches
nsILoginManager
void addlogin( in nsilogininfo alogin );
parameters alogin the login to store.
... 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.
... unsigned long countlogins( in astring ahostname, in astring aactionurl, in astring ahttprealm );
parameters ahostname the hostname to which to restrict searches, formatted as a url.
...And 17 more matches
nsIMessenger
void setdisplaycharset(in acstring acharset);
parameters acharset the character set to use.
... void setwindow(in nsidomwindow awin, in nsimsgwindow amsgwindow);
parameters awin the window to set as the window for the messaging session.
... void openurl(in acstring aurl);
parameters aurl the url to open.
...And 17 more matches
nsIMsgIncomingServer
void clearallvalues();
parameters none.
...void cleartemporaryreturnreceiptsfilter();
parameters none.
... exceptions thrown missing exception missing description closecachedconnections() void closecachedconnections();
parameters none.
...And 17 more matches
nsINavHistoryService
astring getpagetitle( in nsiuri auri );
parameters auri the page whose title needs to be retrieved.
... void markpageasfollowedbookmark( in nsiuri auri );
parameters auri the page that is to be marked as followed by a bookmark.
...this will cause the transition type of the next visit of the url to be marked as "typed." void markpageastyped( in nsiuri auri );
parameters auri the page that is to be marked as typed by the user.
...And 17 more matches
WebIDL bindings
the return value of the attribute is returned via an out
parameter in the c++.
... webidl type argument type return type dictionary/member type any js::handle<js::value> js::mutablehandle<js::value> js::value boolean bool bool bool byte int8_t int8_t int8_t bytestring const nsacstring& nscstring& (out
param) nsacstring& (out
param) nscstring date mozilla::dom::date domstring const nsastring& mozilla::dom::domstring& (out
param) nsastring& (out
param) nsstring& (out
param) nsstring utf8string const nsacstring& nsacstring& (out
param) nscstring double double double double float float float float ...
...nnull<foo> interface: nullable foo* already_addrefed<foo> foo* refptr<foo> long int32_t int32_t int32_t long long int64_t int64_t int64_t object js::handle<jsobject*> js::mutablehandle<jsobject*> jsobject* octet uint8_t uint8_t uint8_t sequence const sequence<t>& nstarray<t>& (out
param) short int16_t int16_t int16_t unrestricted double double double double unrestricted float float float float unsigned long uint32_t uint32_t uint32_t unsigned long long uint64_t uint64_t uint64_t unsigned short uint16_t uint16_t uint16_t usvstring const nsastring& mozilla...
...And 17 more matches
Functions - JavaScript
in the case of a constructor called with the new keyword, the default value is the value of its this
parameter.
... the
parameters of a function call are the function's arguments.
... defining functions there are several ways to define functions: the function declaration (function statement) there is a special syntax for declaring functions (see function statement for details): function name([
param[,
param[, ...
...And 17 more matches
Understanding WebAssembly text format - WebAssembly
all code in a webassembly module is grouped into functions, which have the following pseudo-code structure: ( func <signature> <locals> <body> ) the signature declares what the function takes (
parameters) and returns (return values).
... signatures and
parameters the signature is a sequence of
parameter type declarations followed by a list of return type declarations.
... each
parameter has a type explicitly declared; wasm currently has four available number types (plus reference types; see the reference types) section below): i32: 32-bit integer i64: 64-bit integer f32: 32-bit float f64: 64-bit float a single
parameter is written (
param i32) and the return type is written (result i32), hence a binary function that takes two 32-bit integers and returns a 64-bit float would be written like this: (func (
param i32) (
param i32) (result f64) ...
...And 17 more matches
lang/functional - Archive of obsolete content
this) as the first
parameter, followed by any
parameters passed into the method.
... let { method } = require("sdk/lang/functional"); let mynumber = { times: method(times), add: method(add), number: 0 }; function times (target, x) { return target.number *= x; } function add (target, x) { return target.number += x; } console.log(mynumber.number); // 0 mynumber.add(10); // 10 mynumber.times(2); // 20 mynumber.add(3); // 23
parameters lambda : function the function to be wrapped and returned.
... let { defer } = require("sdk/lang/functional"); let fn = defer(function myevent (event, value) { console.log(event + " : " + value); }); fn("click", "#home"); console.log("done"); // this will print 'done' before 'click : #home' since // we deferred the execution of the wrapped `myevent` // function, making it non-blocking and executing on the // next event loop
parameters fn : function the function to be deferred.
...And 16 more matches
Starting WebLock
the method at the core of this interface is observe: void observe(in nsisupports asubject, in string atopic, in wstring adata); there aren't really any restrictions on what the three
parameters (asubject, atopic and adata) may represent.
... these
parameters are defined according to the event being observed.
...these are also
parameters in the nsimodule implementation in xxx what is example 1?
...And 16 more matches
IAccessibleText
hresult addselection( [in] long startoffset, [in] long endoffset );
parameters startoffset starting offset ( 0 based).
...[propget] hresult attributes( [in] long offset, [out] long startoffset, [out] long endoffset, [out] bstr textattributes );
parameters offset text() offset (0 based) startoffset the starting offset of the character range over which all text() attributes match those of offset.
...[propget] hresult caretoffset( [out] long offset );
parameters offset the returned offset is relative to the text() represented by this object.
...And 16 more matches
nsIDownloadManager
nsidownload adddownload( in short adownloadtype, in nsiuri asource, in nsiuri atarget, in astring adisplayname, in nsimimeinfo amimeinfo, in prtime astarttime, in nsilocalfile atempfile, in nsicancelable acancelable, in boolean aisprivate );
parameters adownloadtype the download type for the transfer.
...this
parameter is optional.
... void addlistener( in nsidownloadprogresslistener alistener );
parameters alistener the nsidownloadprogresslistener object to receive status information from the download manager.
...And 16 more matches
nsILoginManagerStorage
void addlogin( in nsilogininfo alogin );
parameters alogin the login to add to the login storage.
...unsigned long countlogins( in astring ahostname, in astring aactionurl, in astring ahttprealm );
parameters ahostname the hostname to which to restrict the search.
...void findlogins( out unsigned long count, in astring ahostname, in astring aactionurl, in astring ahttprealm, [retval, array, size_is(count)] out nsilogininfo logins );
parameters count return in this
parameter the number of matching logins found by the search.
...And 16 more matches
nsIMsgDBHdr
(new in 3.1?) methods getproperty() astring getproperty(in string propertyname);
parameters propertyname the name of the property to retrieve.
... void setproperty(in string propertyname, in astring propertystr);
parameters propertyname the name of the property to set.
... setstringproperty() void setstringproperty(in string propertyname, in string propertyvalue);
parameters propertyname the name of the property to set.
...And 16 more matches
nsINavHistoryResultObserver
void batching( in boolean atogglemode );
parameters atogglemode specify true to start batch mode or false to finish the batch.
... void containerclosed( in nsinavhistorycontainerresultnode acontainernode );
parameters acontainernode the container node which was closed.
... void containeropened( in nsinavhistorycontainerresultnode acontainernode );
parameters acontainernode the container node which was opened.
...And 16 more matches
Storage
bind
parameters to a statement as necessary.
...: rv = mdbconn->executesimplesql(ns_literal_cstring("create temp table table_name (column_name integer)")); ns_ensure_success(rv, rv); results to be returned however, if you need to get results back, you should create the statement with the mozistorageconnection.createstatement() api like this in javascript: var statement = dbconn.createstatement("select * from table_name where column_name = :
parameter"); this example uses a named placeholder called "
parameter" to be bound later (described in binding
parameters).
... similarly, the c++ looks like this: nscomptr<mozistoragestatement> statement; rv = dbconn->createstatement(ns_literal_cstring("select * from table_name where column_name = ?1"), getter_addrefs(statement)); ns_ensure_success(rv, rv); this example uses the numbered placeholder indexed by zero for a
parameter to be bound later (described in binding
parameters).
...And 16 more matches
Codecs used by WebRTC - Web media technologies
special
parameter support requirements avc offers a wide array of
parameters for controlling optional values.
... in order to improve reliability of webrtc media sharing across multiple platforms and browsers, it's required that webrtc endpoints that support avc handle certain
parameters in specific ways.
... sometimes this simply means a
parameter must (or must not) be supported.
...And 16 more matches
Sqlite.jsm
if the original connection is using the shared cache, this
parameter will be ignored and the clone will be as privileged as the original connection.
... executecached(sql,
params, onrow) execute(sql,
params, onrow) these similar functions are used to execute a single sql statement on the connection.
...
params (optional)
parameters to bind to this statement.
...And 15 more matches
nss tech note5
f the array of key bytes */ /* turn the secitem into a key object */ pk11symkey* symkey = pk11_importsymkey(slot, ciphermech, pk11_originunwrap, cka_encrypt, &keyitem, null); if generating the key - see section generate a symmetric key <big>prepare the
parameter for crypto context.
...if not using cbc mode, just pass a null iv parm to pk11_
paramfromiv function secitem ivitem; ivitem.data = /* ptr to an array of iv bytes */ ivitem.len = /* length of the array of iv bytes */ secitem *sec
param = pk11_
paramfromiv(ciphermech, &ivitem);</big> <big>now encrypt and decrypt using the key and
parameter setup in above steps</big> create encryption context pk11context* enccontext = pk11_createcontextbysymkey(ciphermech, cka_encrypt or cka_decrypt, symkey, sec
param); do the operation.
...when all done with encrypt/decrypt ops, clean up</big> <big>pk11_freesymkey(symkey); secitem_freeitem(sec
param, pr_true); pk11_freeslot(slot);</big> note: aes encryption, a fixed blocksize of 16 bytes is used.
...And 15 more matches
PKCS #11 Module Specs
parameter this specifies a pkcs #11 library
parameter with the application must pass to the pkcs #11 library at c_initialize() time (see below).
... if the
parameter is not specified, no
parameters are passed to the pkcs #11 module.
...
parameter passing if the
parameter is specified, the application/library will strip the value out, processing any outter quotes and escapes appropriately, and pass the
parameter to the pkcs #11 library when it calls c_initialize().
...And 15 more matches
sslcrt.html
syntax #include <cert.h> secstatus cert_verifycertnow( certcertdbhandle *handle, certcertificate *cert, prbool checksig, seccertusage certusage, void *wincx);
parameters this function has the following
parameters: handle a pointer to the certificate database handle.
...some of the pk11 functions require a pin argument (see ssl_setpkcs11pinarg for details), which must be specified in the wincx
parameter.
... to obtain the value to pass in the wincx
parameter, call ssl_revealpinarg.
...And 15 more matches
Mozilla internal string guide
functions taking strings as
parameters should generally take one of these four types.
...this class corresponds to the xpidl astring
parameter type.
... str.assign(reversedstr); } as function
parameters for methods which are exposed across modules, use nsastring references to pass strings.
...And 15 more matches
IAccessible2
[propget] hresult attributes( [out] bstr attributes );
parameters attributes return value s_false returned if there is nothing to return, [out] value is null.
...[propget] hresult extendedrole( [out] bstr extendedrole );
parameters extendedrole return value s_false if there is nothing to return, [out] value is null.
...[propget] hresult extendedstates( [in] long maxextendedstates, [out, size_is(,maxextendedstates), length_is(, nextendedstates)] bstr extendedstates, [out] long nextendedstates );
parameters maxextendedstates this
parameter is ignored.
...And 15 more matches
inIDOMUtils
nsiarray getbindingurls( in nsidomelement aelement );
parameters aelement a dom element to retrieve the bindings of.
... nsidomnodelist getchildrenfornode( in nsidomnode anode, in boolean ashowinganonymouscontent );
parameters anode a dom node for which to retrieve the style nodes.
... unsigned long long getcontentstate( in nsidomelement aelement );
parameters aelement a dom element to retrieve the content states of.
...And 15 more matches
nsIContentViewer
void clearhistoryentry();
parameters none.
...void close( in nsishentry historyentry );
parameters historyentry the session history entry for the content viewer.
... destroy() void destroy();
parameters none.
...And 15 more matches
nsINavHistoryResultViewer
note: most methods in this interface were renamed in gecko 1.9.2, and others have slightly different
parameter lists.
... void containerclosed( in nsinavhistorycontainerresultnode acontainernode );
parameters acontainernode the container node whose state changed.
... void containeropened( in nsinavhistorycontainerresultnode acontainernode );
parameters acontainernode the container node whose state changed.
...And 15 more matches
LiveConnect Overview - Archive of obsolete content
there are cases where liveconnect will fail to load a class, and you will need to manually load it like this: var widgetry = java.lang.thread.currentthread().getcontextclassloader().loadclass("org.mywidgets.widgetry"); in javascript 1.3 and earlier, javaclass objects are not automatically converted to instances of java.lang.class when you pass them as
parameters to java methods—you must create a wrapper around an instance of java.lang.class.
... specify the location of .jar or .zip file when you compile by using the -classpath command line
parameter.
...to do so, you must define the corresponding formal
parameter of the method to be of type jsobject.
...And 14 more matches
Python binding for NSS
examples of this are the various callbacks which can be set and their
parameters.
... many methods/functions provide sane default (keyword)
parameters freeing the python programmer from having to specify all
parameters yet allowing them to be overriden when necessary.
...be_iv nss.pk11slot.pbe_key_gen nss.pk11slot.format_lines nss.pk11slot.format nss.pk11symkey.format_lines nss.pk11symkey.format nss.secitem.to_base64 nss.secitem.format_lines nss.secitem.format the following files were added: doc/examples/pbkdf2_example.py the secitem constructor added 'ascii'
parameter to permit initialization from base64 and/or pem textual data.
...And 14 more matches
nsIAppShellService
void closetoplevelwindow( in nsixulwindow awindow );
parameters awindow a window.
... void createhiddenwindow( in nsiappshell aappshell );
parameters aappshell a widget "appshell" (event processor) to associate with the new window.
... boolean createstartupstate( in long awindowwidth, in long awindowheight );
parameters awindowwidth the width to make the initial window(s) opened.
...And 14 more matches
nsIFaviconService
void addfailedfavicon( in nsiuri afaviconuri );
parameters afaviconuri the uri of an icon in the favicon service.
...void expireallfavicons();
parameters none.
...void getfavicondata( in nsiuri afaviconuri, out autf8string amimetype, out unsigned long adatalen, optional from gecko 2.0 [array,retval,size_is(adatalen)] out octet adata );
parameters afaviconuri uri of the favicon whose data is being read.
...And 14 more matches
nsIWindowMediator
void addlistener( in nsiwindowmediatorlistener alistener );
parameters alistener the listener to register.
...for that reason this interface requires only objects one step removed from the native window (nsiwidgets), and its implementation must be very understanding of what may be completely invalid pointers in those
parameters.
... boolean calculatezposition( in nsixulwindow inwindow, in unsigned long inposition, in nsiwidget inbelow, out unsigned long outposition, out nsiwidget outbelow );
parameters inwindow the window in question.
...And 14 more matches
lang/type - Archive of obsolete content
let { isundefined } = require('sdk/lang/type'); var foo; isundefined(foo); // true isundefined(0); // false
parameters value : mixed the variable to check.
... let { isnull } = require('sdk/lang/type'); isnull(null); // true isnull(false); // false
parameters value : mixed the variable to check.
... let { isstring } = require('sdk/lang/type'); isstring('my string'); // true isstring(100); // false isstring('100'); // true
parameters value : mixed the variable to check.
...And 13 more matches
Multiprocess on Windows
the interceptor is also aware that any out
params, which contain interfaces, must also be wrapped with interceptors of their own.
...the required steps are as follows: ensure that you generate typelibs for all of your com interfaces; ensure that those interfaces are registered; register any out
params that consist of arrays of interfaces.
... registering out
params that consist of arrays of interfaces recall that one of the limitations of typelibs is that their metadata isn't as rich as oicf metadata.
...And 13 more matches
Creating the Component Code
then xpcom calls registerself, passing
parameters that we'll examine here.
... the registerself method the first
parameter is the nsicomponentmanager, which provides a kind of entry point into managing the registration process.
... your registerself method may call queryinterface on the nsicomponentmanager interface
parameter to obtain the nsicomponentregistrar or nsiservicemanager.
...And 13 more matches
nsDependentCSubstring
methods constructors void nsdependentcsubstring(const nsacstring_internal&, pruint32, pruint32) - source
parameters nsacstring_internal& str pruint32 startpos pruint32 length void nsdependentcsubstring(const char*, const char*) - source
parameters char* start char* end void nsdependentcsubstring(const nsreadingiterator<char>&, const nsreadingiterator<char>&) - source
parameters nsreadingiterator<char>& start nsreadingiterator<char>& end void nsdependentcsubstring() - source rebind v...
...oid rebind(const nsacstring_internal&, pruint32, pruint32) - source
parameters nsacstring_internal& <anonymous> pruint32 startpos pruint32 length void rebind(const char*, const char*) - source
parameters char* start char* end beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators
parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source
parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterator<char>&) const - source
parameters nsreadingiterator<char>& iter char*& endreading(const char*&) const - source
parameters char*& iter begin...
...writing char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators
parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source
parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source
parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source
parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source isvoid prbool isvoid() const - source isterminated prbool isterminated() const - source charat char charat(pruint32) const - source par...
...And 13 more matches
nsDependentSubstring
methods constructors void nsdependentsubstring(const nsastring_internal&, pruint32, pruint32) - source
parameters nsastring_internal& str pruint32 startpos pruint32 length void nsdependentsubstring(const prunichar*, const prunichar*) - source
parameters prunichar* start prunichar* end void nsdependentsubstring(const nsreadingiterator<short unsigned int>&, const nsreadingiterator<short unsigned int>&) - source
parameters nsreadingiterator<short unsigned int>& start nsreadingiterator<short un...
...signed int>& end void nsdependentsubstring() - source rebind void rebind(const nsastring_internal&, pruint32, pruint32) - source
parameters nsastring_internal& <anonymous> pruint32 startpos pruint32 length void rebind(const prunichar*, const prunichar*) - source
parameters prunichar* start prunichar* end beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators
parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source
parameters prunichar*& iter endreading prunichar* endreading() const - source nsreadingiterator<short unsigned int>& endreading(...
...nsreadingiterator<short unsigned int>&) const - source
parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(const prunichar*&) const - source
parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators
parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source
parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source
parameters nswritingiterator<short unsigned int>& iter prunichar*& endwriting(prunichar*&) - sou...
...And 13 more matches
nsILocalFile
constants constant value description delete_on_close 0x80000000 optional
parameter used by opennsprfiledesc().
... void appendrelativenativepath( in acstring relativefilepath );
parameters relativefilepath a native relative path.
... void appendrelativepath( in astring relativefilepath );
parameters relativefilepath a native relative path.
...And 13 more matches
nsIMsgHeaderParser
autf8string extractheaderaddressmailboxes( in string line );
parameters line the header line to parse.
... autf8string extractheaderaddressnames( in string line );
parameters line the header line to parse.
... autf8string extractheaderaddressname( in string line );
parameters line the header line to parse.
...And 13 more matches
nsIPluginHost
nsifile createtempfiletopost( in string apostdataurl );
parameters apostdataurl return value native code only!createtmpfiletopost obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete.
... void createtmpfiletopost( in string apostdataurl, out string atmpfilename );
parameters apostdataurl atmpfilename native code only!deletepluginnativewindow deletes plugin native window object created by newpluginnativewindow().
... void deletepluginnativewindow( in nspluginnativewindowptr apluginnativewindow );
parameters apluginnativewindow native code only!destroy void destroy();
parameters none.
...And 13 more matches
nsISHEntry
void addchildshell( in nsidocshelltreeitem shell );
parameters shell childshellat() nsidocshelltreeitem childshellat( in long index );
parameters index the child shell at index; null if index is out of bounds.
...void clearchildshells();
parameters none.
... clone() nsishentry clone();
parameters none.
...And 13 more matches
nsIXULTemplateBuilder
void rebuild();
parameters none.
...void refresh();
parameters none.
...the query node that the new result applies to must be specified using the aquerynode
parameter.
...And 13 more matches
Functions - JavaScript
a list of
parameters to the function, enclosed in parentheses and separated by commas.
... for example, the following code defines a simple function named square: function square(number) { return number * number; } the function square takes one
parameter, called number.
... the function consists of one statement that says to return the
parameter of the function (that is, number) multiplied by itself.
...And 13 more matches
Index - Archive of obsolete content
the first
parameter is the nsidomwindow you just retrieved, the second is the editor type you want to create, and the third is whether you want the window editable immediately or when the document is done loading.
...the first three
parameters will be applied to every request.
... the "escrowauthoritycert"
parameter will only be used for requests that pertain to a key that is being escrowed.
...And 12 more matches
Adding Methods to XBL-defined Elements - Archive of obsolete content
the general syntax of methods is as follows: <implementation> <method name="method-name"> <
parameter name="
parameter-name1"/> <
parameter name="
parameter-name2"/> .
...the method element contains two type of child elements,
parameter elements which describe the
parameters to the method and body which contains the script for the method.
...similarly, the name attributes on the
parameter elements become the names of each
parameter.
...And 12 more matches
Assert.jsm
undefined ok( actual, message );
parameters actual test subject to be evaluated as truthy message short explanation of the expected result equal() the equality assertion tests shallow, coercive equality with ==.
... undefined equal( actual, expected, message );
parameters actual test subject to be evaluated as equivalent to expected expected test reference to evaluate against actual message short explanation of the expected result notequal() the non-equality assertion tests for whether two objects are not equal with !=.
... undefined notequal( actual, expected, message );
parameters actual test subject to be evaluated as not equivalent to expected expected test reference to evaluate against actual message short explanation of the expected result deepequal() the equivalence assertion tests a deep equality relation.
...And 12 more matches
Index
27 components.results xpcom:language bindings, xpconnect components.results is a read-only object whose properties are the names listed as the first
parameters of the macros in js/xpconnect/src/xpc.msg (also at table of errors), with the value of each corresponding to that constant's value.
... 92 working with out
parameters add-ons, extensions, xpcom:language bindings, xpconnect no summary!
...makes eval() use the last object on its 'obj'
param's scope chain as the ecma 'variables object'.
...And 12 more matches
nsACString_internal
parameters nscsubstringtuple& tuple void nsacstring_internal(char*, pruint32, pruint32) - source
parameters char* data pruint32 length pruint32 flags beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators
parameters nsreadingiterator<char>& iter char*& beginrea...
...ding(const char*&) const - source
parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterator<char>&) const - source
parameters nsreadingiterator<char>& iter char*& endreading(const char*&) const - source
parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators
parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source
parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source
parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source
param...
...eters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source isvoid prbool isvoid() const - source isterminated prbool isterminated() const - source charat char charat(pruint32) const - source
parameters pruint32 i operator[] char operator[](pruint32) const - source
parameters pruint32 i first char first() const - source last char last() const - source countchar pruint32 countchar(char) const - source
parameters char <anonymous> findchar print32 findchar(char, pruint32) const - source
parameters char <anonymous> pruint32 offset equals prbool equals(const nsacstring_internal&) const - source equality
parameters nsacst...
...And 12 more matches
nsAString_internal
parameters nssubstringtuple& tuple void nsastring_internal(prunichar*, pruint32, pruint32) - source
parameters prunichar* data pruint32 length pruint32 flags beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators
parameters nsreadi...
...ngiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source
parameters prunichar*& iter endreading prunichar* endreading() const - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source
parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(const prunichar*&) const - source
parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators
parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source
parameters prunichar*& iter endwriting...
... prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source
parameters nswritingiterator<short unsigned int>& iter prunichar*& endwriting(prunichar*&) - source
parameters prunichar*& iter data prunichar* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source isvoid prbool isvoid() const - source isterminated prbool isterminated() const - source charat prunichar charat(pruint32) const - source
parameters pruint32 i operator[] prunichar operator[](pruint32) const - source
parameters pruint32 i first prunichar first() const - source last prunichar last() const - source countchar p...
...And 12 more matches
nsIAccessibleText
constant value description coord_type_screen 0 coord_type_window 1 methods addselection() void addselection( in long startoffset, in long endoffset );
parameters startoffset endoffset getattributerange() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) get the accessible and start/end offsets around the given offset.
...nsiaccessible getattributerange( in long offset, out long rangestartoffset, out long rangeendoffset );
parameters offset rangestartoffset rangeendoffset return value getcharacteratoffset() it would be better to return an unsigned long here, to allow unicode chars > 16 bits.
... wchar getcharacteratoffset( in long offset );
parameters offset return value getcharacterextents() returns the bounding box of the specified position.
...And 12 more matches
nsIDOMElement
domstring getattribute( in domstring name );
parameters name attribute name return value a domstring containing the attribute value.
...nsidomattr getattributenode( in domstring name );
parameters name attribute name return value a nsidomattr corresponding to the attribute.
...nsidomattr getattributenodens( in domstring namespaceuri, in domstring localname );
parameters namespaceuri namespace uri localname attribute name return value a nsidomattr corresponding to the attribute.
...And 12 more matches
nsIDOMNSHTMLDocument
void captureevents( in long eventflags );
parameters eventflags clear() used to reset a document to blank, but deprecated since gecko 1.0 and provided for compatibility with netscape 4.x; use open() and close() instead.
... void clear();
parameters none.
... execcommand() boolean execcommand( in domstring commandid, in boolean doshowui, in domstring value );
parameters commandid the name of the command to execute.
...And 12 more matches
nsIIOService
boolean allowport( in long aport, in string ascheme );
parameters aport the port to check ascheme the scheme for the protocol handler that could override the ioservice's decision.
... acstring extractscheme( in autf8string urlstring );
parameters urlstring the string for the url to extract the scheme from.
... unsigned long getprotocolflags( in string ascheme );
parameters ascheme the scheme for which to get the protocol flags.
...And 12 more matches
nsINavBookmarkObserver
void onbeforeitemremoved( in long long aitemid, in unsigned short aitemtype, in long long aparentid, in acstring aguid, in acstring aparentguid );
parameters aitemid the id of the bookmark that will be removed.
...void onbeginupdatebatch();
parameters none.
...void onendupdatebatch();
parameters none.
...And 12 more matches
nsISelectionPrivate
line 0 startofnextline 1 tableselection_none 0 tableselection_cell 1 tableselection_row 2 tableselection_column 3 tableselection_table 4 tableselection_allcells 5 methods addselectionlistener() void addselectionlistener( in nsiselectionlistener newlistener );
parameters newlistener endbatchchanges() will resume user interface updates after a previous call to startbatchchanges().
... void endbatchchanges();
parameters none.
... void getcachedframeoffset( in nsiframe aframe, in print32 inoffset, in nspointref apoint );
parameters aframe inoffset apoint getenumerator() nsienumerator getenumerator();
parameters none.
...And 12 more matches
Third-party APIs - Learn web development
for example: let map = l.mapquest.map('map', { center: [53.480759, -2.242631], layers: l.mapquest.tilelayer('map'), zoom: 12 }); here we are creating a variable to store the map information in, then creating a new map using the mapquest.map() method, which takes as its
parameters the id of a <div> element you want to display the map in ('map'), and an options object containing the details of the particular map we want to display.
...you can adjust the position by specifying an options object as a
parameter for the control containing a position property, the value of which is a string specifying a position for the control.
...add the following code to your example, again inside window.onload: l.marker([53.480759, -2.242631], { icon: l.mapquest.icons.marker({ primarycolor: '#22407f', secondarycolor: '#3b5998', shadow: true, size: 'md', symbol: 'a' }) }) .bindpopup('this is manchester!') .addto(map); as you can see, this at its simplest takes two
parameters, an array containing the coordinates at which to display the marker, and an options object containing an icon property that defines the icon to display at that point.
...And 11 more matches
JNI.jsm
method overview cdata getforthread(); cdata loadclass(cdata ajenv, string aclassfullyqualifiedname, [optional] object adeclares); cdata newstring(cdata ajenv, string astr); string readstring(cdata ajenv, cdata ajavastring); void unloadclasses(); methods getforthread() blah blah cdata getforthread();
parameters this function does not take any arguments.
... return value blah blah loadclass() blah blah cdata loadclass( ajenv, afullyqualifiedname, [optional] object adeclares );
parameters ajenv the return value of getforthread().
... return value blah blah newstring() blah blah cdata newstring( ajenv, astr );
parameters ajenv the return value of getforthread().
...And 11 more matches
Index
in the most simple scenario, the programmer will provide a directory on your filesystem as a
parameter to the init function, and nss is designed to do the rest.
...the programmer's task is to initialize nss with the required
parameters (such as a database), and nss will then transparently manage the database files.
...create a context handle while providing all the
parameters required for the operation, then call an “update” function multiple times to pass subsets of the input to nss.
...And 11 more matches
pkfnc.html
syntax #include <pk11func.h> #include <certt.h> certcertificate *pk11_findcertfromnickname( char *nickname, void *wincx);
parameters this function has the following
parameters: nickname a pointer to the nickname in the certificate database or to the nickname in the token.
... the pk11_findcertfromnickname function calls the password callback function set with pk11_setpasswordfunc and passes it the pointer specified by the wincx
parameter.
... syntax #include <pk11func.h> #include <certt.h> #include <keyt.h> seckeyprivatekey *pk11_findkeybyanycert( certcertificate *cert, void *wincx);
parameters this function has the following
parameters: cert a pointer to a certificate structure in the certificate database.
...And 11 more matches
nsIAppStartup
obsolete since gecko 1.9.1 constants the following flags may be passed as the amode
parameter to the quit() method.
... void createhiddenwindow();
parameters none.
... boolean createstartupstate( in long awindowwidth, in long awindowheight );
parameters awindowwidth the width to make the initial window(s) opened.
...And 11 more matches
nsIClipboardCommands
boolean cancopyimagecontents();
parameters none.
...boolean cancopyimagelocation();
parameters none.
...boolean cancopylinklocation();
parameters none.
...And 11 more matches
nsICommandLine
some flags may take
parameters; for example: "-url <
param>" or "-install-xpi <
param>".
... method overview long findflag(in astring aflag, in boolean acasesensitive); astring getargument(in long aindex); boolean handleflag(in astring aflag, in boolean acasesensitive); astring handleflagwith
param(in astring aflag, in boolean acasesensitive); void removearguments(in long astart, in long aend); nsifile resolvefile(in astring aargument); nsiuri resolveuri(in astring aargument); attributes attribute type description length long number of arguments in the command line.
...long findflag( in astring aflag, in boolean acasesensitive );
parameters aflag the flag name to locate.
...And 11 more matches
nsIHttpChannel
netwerk/protocol/http/nsihttpchannel.idlscriptable this interface allows for the modification of http request
parameters and the inspection of the resulting http response status and headers when they become available.
... void getoriginalresponseheader( in acstring aheader, in nsihttpheadervisitor avisitor );
parameters aheader the case-insensitive name of the response header to query (for example "set-cookie").
... acstring getrequestheader( in acstring aheader );
parameters aheader the case-insensitive name of the request header to query (for example "cache-control").
...And 11 more matches
nsISelection
void addrange( in nsidomrange range );
parameters range the nsidomrange to add collapse() collapses the selection to a single point, at the specified offset in the given nsidomnode.
...void collapse( in nsidomnode parentnode, in long offset );
parameters parentnode the given nsidomnode where the selection will be set.
... collapsed() [noscript,notxpcom,nostdcall] boolean collapsed(); native code only!collapsenative void collapsenative( in nsinode parentnode, in long offset );
parameters parentnode offset collapsetoend() collapses the whole selection to a single point at the end of the current selection (regardless of direction).
...And 11 more matches
nsISmsRequestManager
long addrequest( in nsidommozsmsrequest arequest );
parameters arequest an smsrequest.
...long createrequest( in nsidommozsmsmanager amanager, out nsidommozsmsrequest arequest );
parameters amanager an smsmanager.
...notifycreatemessagelist() void notifycreatemessagelist( in long arequestid, in long alistid, in nsidommozsmsmessage amessage );
parameters arequestid a number representing the id of the request.
...And 11 more matches
nsITextInputProcessor
void appendclausetopendingcomposition(in unsigned long alength, in unsigned long aattribute);
parameters alength the length of appending clause.
... boolean begininputtransaction(in nsidomwindow awindow, in nsitextinputprocessorcallback acallback);
parameters awindow the dom window which has focused editor.
... boolean begininputtransactionfortests(in nsidomwindow awindow, in nsitextinputprocessorcallback acallback optional);
parameters awindow the dom window which has focused editor.
...And 11 more matches
nsITreeSelection
void adjustselection( in long index, in long count );
parameters index index of the change.
...void clearrange( in long startindex, in long endindex );
parameters startindex index to clearing at.
...void clearselection();
parameters none.
...And 11 more matches
Initialization and Destruction - Plugins
nperror npp_new(npmimetype plugintype, npp instance, uint16 mode, int16 argc, char *argn[], char *argv[], npsaveddata *saved); the plugintype
parameter represents the mime type of this instance of the plug-in.
... the instance
parameter represents an npp object, created by the browser.
... the mode
parameter identifies the display mode in which the plug-in was invoked, either np_embed or np_full.
...And 11 more matches
URLs - Plugins
nperror npn_geturl(npp instance, const char *url, const char *target); the instance
parameter represents the current plug-in instance.
... the url
parameter is the url of the request, which can be of any type, including http, ftp, news, or mailto.
... the target
parameter represents the destination where the url will be displayed, a window or frame.
...And 11 more matches
EventTarget.addEventListener() - Web APIs
syntax target.addeventlistener(type, listener [, options]); target.addeventlistener(type, listener [, usecapture]); target.addeventlistener(type, listener [, usecapture, wantsuntrusted ]); // gecko/mozilla only
parameters type a case-sensitive string representing the event type to listen for.
...events in the target phase will trigger all listeners on an element in the order they were registered, regardless of the usecapture
parameter.
... wantsuntrusted a firefox (gecko)-specific
parameter.
...And 11 more matches
SubtleCrypto.unwrapKey() - Web APIs
syntax const result = crypto.subtle.unwrapkey( format, wrappedkey, unwrappingkey, unwrapalgo, unwrappedkeyalgo, extractable, keyusages );
parameters format is a string describing the data format of the key to unwrap.
... unwrapalgo is an object specifying the algorithm to be used to encrypt the exported key, and any extra
parameters as required: to use rsa-oaep, pass an rsaoaep
params object.
... to use aes-ctr, pass an aesctr
params object.
...And 11 more matches
Paths - SVG: Scalable Vector Graphics
the shape of a <path> element is defined by one
parameter: d.
... (see more in basic shapes.) the d attribute contains a series of commands and
parameters used by those commands.
... coordinates in the d
parameter are always unitless and hence in the user coordinate system.
...And 11 more matches
window/utils - Archive of obsolete content
parameters window : nsidomwindow the window whose inner window we are interested in.
...
parameters window : nsidomwindow the window whose outer window we are interested in.
... getxulwindow(window) returns the nsixulwindow for the given nsidomwindow: var { ci } = require('chrome'); var utils = require('sdk/window/utils'); var active = utils.getmostrecentbrowserwindow(); active instanceof ci.nsixulwindow // => false utils.getxulwindow(active) instanceof ci.nsixulwindow // => true
parameters window : nsidomwindow returns nsixulwindow getbasewindow(window) returns the nsibasewindow for the given nsidomwindow: var { ci } = require('chrome'); var utils = require('sdk/window/utils'); var active = utils.getmostrecentbrowserwindow(); active instanceof ci.nsibasewindow // => false utils.getbasewindow(active) instanceof ci.nsibasewindow // => true
parameters window : nsidomwindow returns nsibasewindow gettoplevelwindow(window...
...And 10 more matches
Observer Notifications - Archive of obsolete content
the interface has only one method observe() which takes three
parameters.
... the first
parameter (subject) can be any xpcom object, the second
parameter is a notification topic, and the final
parameter is a string that further describes the notification.
... adding an observer to the observer service is simple, invoking the addobserver method with three
parameters.
...And 10 more matches
SQLite Templates - Archive of obsolete content
query
parameters sometimes, you will want to adjust the query depending on certain criteria.
...the solution is to use query
parameters, using the
param element.
... <query> select name, email from myfriends where gender = :wantedgender <
param name="wantedgender">male</
param> </query> in this example, a
parameter 'wantedgender' is used.
...And 10 more matches
tabbrowser - Archive of obsolete content
the rest of the
parameters are optional.
... firefox 3.6 note the second form of this method was added in firefox 3.6; it allows you to specify the
parameters by name, in any order.
... it also adds the relatedtocurrent
parameter; firefox uses this to decide whether the new tab should be inserted next to the current tab.
...And 10 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
it takes the following
parameters: a function to run, or a reference to a function defined elsewhere.
... zero or more values that represent any
parameters you want to pass to the function when it is run.
... passing
parameters to a settimeout() function any
parameters that you want to pass to the function being run inside the settimeout() must be passed to it as additional
parameters at the end of the list.
...And 10 more matches
mozIPersonalDictionary
void addcorrection( in wstring word, in wstring correction, in wstring lang );
parameters word the incorrect spelling of the word to add to the list of corrections.
...void addword( in wstring word, in wstring lang );
parameters word the word to add to the dictionary.
...note that this
parameter is currently unused.
...And 10 more matches
nsIAccessibleRetrieval
nsiaccessible getaccessiblefor( in nsidomnode anode );
parameters anode the dom node to get an accessible for.
...nsiaccessible getaccessibleinshell( in nsidomnode anode, in nsipresshell apresshell );
parameters anode the dom node to get an accessible for.
...nsiaccessible getaccessibleinweakshell( in nsidomnode anode, in nsiweakreference apresshell );
parameters anode the dom node to get an accessible for.
...And 10 more matches
nsIAppShell
void create( inout int argc, inout string argv );
parameters argc the number of
parameters passed in on the command line.
... argv a direct reference to the
parameter array.
...void dispatchnativeevent( in prbool arealevent, in voidptr aevent );
parameters arealevent event is real or a null placeholder (macintosh).
...And 10 more matches
nsIBinaryInputStream
pruint8 read8();
parameters none.
... pruint16 read16();
parameters none.
... pruint32 read32();
parameters none.
...And 10 more matches
nsIBinaryOutputStream
void setoutputstream( in nsioutputstream aoutputstream );
parameters aoutputstream instance of the nsioutputstream object to which output should be directed.
...void write8( in pruint8 abyte );
parameters abyte the byte to write to the stream.
...void write16( in pruint16 a16 );
parameters a16 the 16-bit integer to write to the stream.
...And 10 more matches
nsIBrowserHistory
void addpagewithdetails( in nsiuri auri, in wstring atitle, in long long alastvisited );
parameters auri the page that will be added to the history.
... void markpageasfollowedlink( in nsiuri auri );
parameters auri the url that is to be marked as explicitly followed by the user.
...this will cause the transition type of the next visit of the url to be marked as "typed." void markpageastyped( in nsiuri auri );
parameters auri the page that is to be marked as typed by the user.
...And 10 more matches
nsIFocusManager
void clearfocus( in nsidomwindow awindow );
parameters awindow exceptions thrown ns_error_invalid_arg if awindow is null.
...void contentremoved( in nsidocument adocument, in nsicontent aelement );
parameters adocument aelement native code only!firedelayedevents fire any events that have been delayed due to synchronized actions.
... void firedelayedevents( in nsidocument adocument );
parameters adocument native code only!focusplugin indicate that a plugin wishes to take the focus.
...And 10 more matches
nsILivemarkService
long long createlivemark( in long long folder, in astring name, in nsiuri siteuri, in nsiuri feeduri, in long index );
parameters folder the id of the parent folder.
... long long createlivemarkfolderonly( in long long folder, in astring name, in nsiuri siteuri, in nsiuri feeduri, in long index );
parameters folder the id of the parent folder.
... nsiuri getfeeduri( in long long container );
parameters container the folder id of a livemark container.
...And 10 more matches
nsITreeBoxObject
void ensurerowisvisible(in long index);
parameters index the index of the row ensurecellisvisible() ensures that a given cell in the tree is visible.
... void ensurecellisvisible(in long row, in nsitreecolumn col);
parameters index the index of the row to check col the nsitreecolumn to check scrolltorow() scrolls such that the row at index is at the top of the visible view.
... void scrolltorow(in long index);
parameters index the index of the row scrollbylines() scroll the tree up or down by numlines lines.
...And 10 more matches
nsIZipReader
void close();
parameters none.
... void extract( in autf8string zipentry, in nsifile outfile );
parameters zipentry the zip entry to extract.
... nsiutf8stringenumerator findentries( in autf8string apattern );
parameters apattern a regular expression used to find matching entries in the zip file.
...And 10 more matches
Add to iPhoto
it returns a cfstringref, which is a pointer to the new string, and accepts, as input, three
parameters: an allocator, which is a pointer to a routine that will allocate the memory to contain the new object (we use the ctypes.voidptr_t type for this), a pointer to the unicode string to copy into the new string object (ctypes.jschar.ptr), and the length of the unicode string in characters.
...the main reason i include this here is because of the last
parameter, which should be a pointer to an fsref, but that's not declared until we get around to declaring the carbon api, and i think that's worth noting.
... ctypes.default_abi, // abi type osstatus, // returns osstatus corefoundation.cfarrayref, // array of files to open in the app optionbits, // roles mask ctypes.voidptr_t, // inae
param this.struct_lsapplication
parameters.ptr, // description of the app to launch ctypes.voidptr_t, // psn array pointer cfindex); // max psn count this function returns an osstatus indicating the result of the launch attempt, and accepts these
parameters: a ...
...And 10 more matches
Using IndexedDB - Web APIs
the second
parameter to the open method is the version of the database.
...the method takes a name of the store, and a
parameter object.
... even though the
parameter object is optional, it is very important, because it lets you define important optional properties and refine the type of object store you want to create.
...And 10 more matches
io/file - Archive of obsolete content
globals functions basename(path) the path
parameter must be an absolute path, relative paths will cause an error.
...
parameters path : string the path of a file.
...
parameters path : string the path of a file.
...And 9 more matches
Menu - Archive of obsolete content
parameters menuitems an array of menuitems.
...
parameters properties an object defining any of the properties below.
...
parameters items a single menuitem or an array of menuitems.
...And 9 more matches
Dict.jsm
note: you can actually specify non-strings as keys; these are converted to strings before being used, so they're documented here as if they were a string
parameter.
... dict dict(); dict dict( object initalkeysandvalues );
parameters initialkeysandvalues optional a object containing key/value pairs with which to initialize the dictionary.
... dict copy();
parameters none.
...And 9 more matches
nsIComponentRegistrar
void autoregister( in nsifile aspec );
parameters aspec this
parameter indicates either a component file to be registered or a directory containing component files to be registered.
...void autounregister( in nsifile aspec );
parameters aspec this
parameter indicates either a component file to be unregistered or a directory containing component files to be unregistered.
...string cidtocontractid( in nscidref aclass );
parameters aclass the classid to be queried.
...And 9 more matches
nsIDownloadProgressListener
void ondownloadstatechange( in short astate, in nsidownload adownload );
parameters astate the previous state of the download.
... onlocationchange() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) void onlocationchange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri alocation, in nsidownload adownload );
parameters awebprogress the nsiwebprogress instance used by the download manager to monitor downloads.
...this
parameter will not be null.
...And 9 more matches
nsILocalFileMac
cfurlref getcfurl();
parameters none.
...fsref getfsref();
parameters none.
...fsspec getfsspec();
parameters none.
...And 9 more matches
nsIMicrosummaryService
void addgenerator( in nsiuri generatoruri );
parameters generatoruri the uri of the resource providing the generator.
...nsimicrosummary createmicrosummary( in nsiuri pageuri, in nsiuri generatoruri );
parameters pageuri the uri of the page to be summarized.
...nsisimpleenumerator getbookmarks();
parameters none.
...And 9 more matches
nsIMsgMessageService
void copymessage(in string asrcuri, in nsistreamlistener acopylistener, in boolean amovemessage, in nsiurllistener aurllistener, in nsimsgwindow amsgwindow, out nsiuri aurl);
parameters asrcuri the string url of the message to copy.
...script] void copymessages(in nsmsgkeyarrayptr keys, in nsimsgfolder srcfolder, in nsistreamlistener acopylistener, in boolean amovemessage, in nsiurllistener aurllistener, in nsimsgwindow amsgwindow, out nsiuri aurl);
parameters keys an array of message keys to be copied.
... void displaymessage(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in string acharsetoverride, out nsiuri aurl);
parameters amessageuri a uri representing the message to display.
...And 9 more matches
nsIPropertyBag2
nsivariant get( in astring prop );
parameters prop property to return the value of.
...getpropertyasacstring() acstring getpropertyasacstring( in astring prop );
parameters prop property to return the value of.
...getpropertyasastring() astring getpropertyasastring( in astring prop );
parameters prop property to return the value of.
...And 9 more matches
nsITransactionListener
void didbeginbatch( in nsitransactionmanager amanager, in nsresult aresult );
parameters amanager the nsitransactionmanager that began a batch.
...void diddo( in nsitransactionmanager amanager, in nsitransaction atransaction, in nsresult adoresult );
parameters amanager the nsitransactionmanager that did the transaction.
...void didendbatch( in nsitransactionmanager amanager, in nsresult aresult );
parameters amanager the nsitransactionmanager ending a batch.
...And 9 more matches
nsITransactionManager
void addlistener( in nsitransactionlistener alistener );
parameters alistener the nsitransactionlistener to add.
...void beginbatch();
parameters none.
...void clear();
parameters none.
...And 9 more matches
nsIZipWriter
void addentrychannel( in autf8string azipentry, in prtime amodtime, in print32 acompression, in nsichannel achannel, in boolean aqueue );
parameters azipentry the path of the file entry to add to the zip file.
... void addentrydirectory( in autf8string azipentry, in prtime amodtime, in boolean aqueue );
parameters azipentry the path of the directory entry to add to the zip file.note: you must use forward slashes in the path.
...if the specified file is a directory, this call is equivalent to: addentrydirectory(azipentry, afile.lastmodifiedtime, aqueue); void addentryfile( in autf8string azipentry, in print32 acompression, in nsifile afile, in boolean aqueue );
parameters azipentry the path of the file entry to add to the zip file.
...And 9 more matches
Getting Started Guide
all good getters addref the interface pointers they produce, thus providing you with an owning reference; you will hold onto the reference longer than the scope of the function in which you acquired it, e.g., you got it as a
parameter, but you're hanging onto it in a member variable (see, for example, comparison 1, below).
... you don't need an owning reference when the object is passed in as a
parameter, and you don't need to keep it any longer than the scope of this function; the object's lifetime is known to contain yours in some well defined way, e.g., in the nodes of a tree, parent nodes keep owning references to their children, children need not keep owning references to their parents.
... */ ns_if_release(mfooptr); // error: |release| is private mfooptr = afooptr; ns_if_addref(mfooptr); // error: |addref| is private second: you can't just pass the address of an nscomptr to a getter expecting to return a result through a raw xpcom interface pointer
parameter.
...And 9 more matches
AudioNode.connect() - Web APIs
the connect() method of the audionode interface lets you connect one of the node's outputs to a target, which may be either another audionode (thereby directing the sound data to the specified node) or an audio
param, so that the node's output data is automatically used to change the value of that
parameter over time.
... syntax var destinationnode = audionode.connect(destination, outputindex, inputindex); audionode.connect(destination, outputindex);
parameters destination the audionode or audio
param to which to connect.
...this
parameter is not allowed if the destination is an audio
param.
...And 9 more matches
SubtleCrypto - Web APIs
subtlecrypto.encrypt() returns a promise that fufills with the encrypted data corresponding to the clear text, algorithm, and key given as
parameters.
... subtlecrypto.decrypt() returns a promise that fulfills with the clear data corresponding to the encrypted text, algorithm, and key given as
parameters.
... subtlecrypto.sign() returns a promise that fulfills with the signature corresponding to the text, algorithm, and key given as
parameters.
...And 9 more matches
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.
... if this function can't find the string referenced by the identifier
parameter, it returns the identifier itself.
... if you're supplying different localizations for a string depending on the number of items (that is, whether to use a singular or plural form) then get() takes a second integer
parameter which indicates the number of items there are.
...And 8 more matches
platform/xpcom - Archive of obsolete content
es: xpcom.register(factory); you can use the corresponding unregister() function to unregister them, whether or not you have disabled automatic unregistration: xpcom.unregister(factory); you can find out whether a factory or service has been registered by using the isregistered() function: if (xpcom.isregistered(factory)) xpcom.unregister(factory); globals constructors factory(options)
parameters options : object required options: name type component constructor constructor for the component this factory creates.
...users of xpcom can use this value to retrieve the factory from components.classes: var factory = components.classes['@me.org/request'] var component = factory.createinstance(ci.nsirequest); this
parameter is formally optional, but if you don't specify it, users won't be able to retrieve your factory using a contract id.
...users of xpcom can use this value to retrieve the factory using components.classesbyid: var factory = components.classesbyid[id]; var component = factory.createinstance(ci.nsirequest); this
parameter is optional.
...And 8 more matches
ui/sidebar - Archive of obsolete content
var sidebar = require("sdk/ui/sidebar").sidebar({ id: 'my-sidebar', title: 'my sidebar', url: require("sdk/self").data.url("sidebar.html"), onattach: function (worker) { console.log("attaching"); }, onshow: function () { console.log("showing"); }, onhide: function () { console.log("hiding"); }, ondetach: function () { console.log("detaching"); } });
parameters options : object required options: name type title string a title for the sidebar.
...
parameters window : browserwindow the window in which to show the sidebar, specified as a browserwindow.
... this
parameter is optional.
...And 8 more matches
XPCOM Objects - Archive of obsolete content
passing
parameters passing
parameters to xpcom methods is no different from other js objects, with some exceptions.
...this specifies that these are input
parameters, values that the method will use to perform its actions.
... when is a
parameter not an in
parameter?
...And 8 more matches
Build your own function - Learn web development
any
parameters we want to give to our function go inside the parentheses, and the code that runs when we call the function goes inside the curly braces.
... improving the function with
parameters as it stands, the function is still not very useful — we don't want to just show the same default message every time.
... let's improve our function by adding some
parameters, allowing us to call it with some different options.
...And 8 more matches
Client-Server Overview - Learn web development
information can be encoded as: url
parameters: get requests encode data in the url sent to the server by adding name/value pairs onto the end of it — for example http://mysite.com?name=fred&age=11.
... you always have a question mark (?) separating the rest of the url from the url
parameters, an equals sign (=) separating each name from its associated value, and an ampersand (&) separating each pair.
... url
parameters are inherently "insecure" as they can be changed by users and then resubmitted.
...And 8 more matches
Listening to events on all tabs
void onlocationchange( nsidomxulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, nsiuri alocation [optional] in unsigned long aflags );
parameters abrowser the browser representing the tab whose location changed.
...void onprogresschange( nsidomxulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, print32 acurselfprogress, print32 amaxselfprogress, print32 acurtotalprogress, print32 amaxtotalprogress );
parameters abrowser the browser representing the tab for which updated progress information is being provided.
... acurselfprogress the current progress for the request indicated by the request
parameter.
...And 8 more matches
IPDL Tutorial
the
parameters of the recv* methods (const nscstring& pluginpath in the example) are references to temporary objects, so copy them if you need to keep their data around.
...
parameters message declarations allow any number of
parameters.
...
parameters specify data that are sent with the message.
...And 8 more matches
InstallListener
void onnewinstall( in addoninstall install )
parameters install the addoninstall representing the install ondownloadstarted() called when downloading begins for an add-on install.
... void ondownloadstarted( in addoninstall install )
parameters install the addoninstall representing the install ondownloadprogress() called as data is received during a download.
... void ondownloadprogress( in addoninstall install )
parameters install the addoninstall representing the install ondownloadended() called when downloading completes successfully for an add-on install.
...And 8 more matches
NSS 3.20 release notes
new functions in ssl.h ssl_dhegroupprefset - configure the set of allowed/enabled dhe group
parameters that can be used by nss for a server socket.
... ssl_enableweakdheprimegroup - enable the use of weak dhe group
parameters that are smaller than default minimum size of the library.
... new types in sslt.h ssldhegrouptype - enumerates the set of dhe
parameters embedded in nss that can be used with function ssl_dhegroupprefset new macros in ssl.h ssl_enable_server_dhe - a socket option user to enable or disable dhe ciphersuites for a server socket notable changes in nss 3.20 the tls library has been extended to support dhe ciphersuites in server applications.
...And 8 more matches
GC Rooting Guide
gc things on the stack js::rooted<t> all gc thing pointers stored on the stack (i.e., local variables and
parameters to functions) must use the js::rooted<t> class.
... this is a template class where the template
parameter is the type of the gc thing it contains.
... js::handle<t> all gc thing pointers that are
parameters to a function must be wrapped in js::handle<t>.
...And 8 more matches
Querying Places
executing a query places queries have several basic parts: the query object: nsinavhistoryquery, holds the search
parameters the query options: nsinavhistoryqueryoptions, allows configuration of the search result the history service: nsinavhistoryservice, executes the query the first first step is to create the query and options, and fill them with the
parameters you want.
...let options = placesutils.history.getnewqueryoptions(); // no query
parameters will return everything let query = placesutils.history.getnewquery(); // execute the query let result = placesutils.history.executequery(query, options); result types nsinavhistoryqueryoptions has a resulttype property that allows configuration of the grouping and level of detail to be returned in the results.
... basic query search
parameters const unsigned long time_relative_epoch = 0 const unsigned long time_relative_today = 1 const unsigned long time_relative_now = 2 attribute prtime begintime attribute unsigned long begintimereference readonly attribute boolean hasbegintime readonly attribute prtime absolutebegintime attribute prtime endtime attribute unsigned long endtimereference readonly attribute boolean hasen...
...And 8 more matches
imgIDecoderObserver
void ondataavailable( in imgirequest arequest, in boolean acurrentframe, [const] in nsintrect arect );
parameters arequest the request on which data is available, or null if being called for an imgidecoder object.
...void ondiscard( in imgirequest arequest );
parameters arequest the request on which data is available, or null if being called for an imgidecoder object.
...void onimageisanimated( in imgirequest arequest );
parameters arequest the request on which data is available, or null if being called for an imgidecoder object.
...And 8 more matches
nsIBrowserSearchService
void addengine( in astring engineurl, in long datatype, in astring iconurl, in boolean confirm, [optional] in nsisearchinstallcallback callback );
parameters engineurl the url to the search engine's description file.
...void addenginewithdetails( in astring name, in astring iconurl, in astring alias, in astring description, in astring method, in astring url );
parameters name the search engine's name.
...void getdefaultengines( [optional] out unsigned long enginecount, [retval, array, size_is(enginecount)] out nsisearchengine engines );
parameters enginecount the number of default search engines.
...And 8 more matches
nsICacheEntryDescriptor
void close();
parameters none.
...void doom();
parameters none.
...void doomandfailpendingrequests( in nsresult status );
parameters status the access status.
...And 8 more matches
nsIDBFolderInfo
numunreadmessages long sortorder nsmsgviewsortordervalue sorttype nsmsgviewsorttypevalue version unsigned long viewflags nsmsgviewflagstypevalue viewtype nsmsgviewtypevalue methods andflags() long andflags( in long flags );
parameters flags missing description return value missing description exceptions thrown missing exception missing description changeexpungedbytes() void changeexpungedbytes( in long delta );
parameters delta missing description exceptions thrown missing exception missing description changenummessages() void changenummessages( in long ...
...delta );
parameters delta missing description exceptions thrown missing exception missing description changenumunreadmessages() void changenumunreadmessages( in long delta );
parameters delta missing description exceptions thrown missing exception missing description getbooleanproperty() boolean getbooleanproperty( in string propertyname, in boolean defaultvalue );
parameters propertyname missing description defaultvalue missing description return value missing description exceptions thrown missing exception missing description getcharacterset() void getcharacterset( out acstring charset, out boolean overriden );
parameters charset missing description ...
... overriden missing description exceptions thrown missing exception missing description getcharactersetoverride() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void getcharactersetoverride( out boolean charactersetoverride );
parameters charactersetoverride missing description exceptions thrown missing exception missing description getcharptrcharacterset() string getcharptrcharacterset();
parameters none.
...And 8 more matches
nsIDOMEvent
help 0x10000000 back 0x20000000 text 0x40000000 alt_mask 0x00000001 control_mask 0x00000002 shift_mask 0x00000004 meta_mask 0x00000008 methods violates the xpcom interface guidelines deserialize() boolean deserialize( in constipcmessageptr amsg, out voidptr aiter );
parameters amsg aiter return value native code only!duplicateprivatedata void duplicateprivatedata();
parameters none.
... violates the xpcom interface guidelines getinternalnsevent() nseventptr getinternalnsevent();
parameters none.
... boolean getpreventdefault();
parameters none.
...And 8 more matches
nsIDragService
[noscript] void dragmoved( in long ax, in long ay );
parameters ax the x coordinate to which to move the popup being dragged.
... void enddragsession( in prbool adonedrag );
parameters adonedrag if adonedrag is true, the drag has finished, otherwise the drag has just left the window.
... void firedrageventatsource( in unsigned long amsg ); obsolete since gecko 43
parameters amsg one of the ns_dragdrop_* contants which was defined in widget/basicevents.h fire a drag event at the fource of the drag.
...And 8 more matches
nsIHttpServer
les/webserver.jsm var exported_symbols = ["create"]; components.utils.import("resource://gre/modules/services.jsm"); function create() { var server = components.classes["@mozilla.org/server/jshttp;1"] .createinstance(components.interfaces.nsihttpserver); return { get objectname () { return "webserver"; }, /** * @
param integer|string port port or "host:port" * @
param object opt optional options.
... (not supported) * @
param function callback optional callback */ listen: function(port, opt, callback) { if (arguments.length == 2 && "function" == typeof opt) { callback = opt; } if (callback) { this.registerprefixhandler("/", callback); } let host = "localhost"; if (typeof port === "string" && port.indexof(':') != -1){ [host, port] = port.split(':'); port = parseint(port); server.identity.add('http', host, port); } server.wrappedjsobject._start(port, host); return true; }, registerfile: function(path, filepath) { var file = components.classes['@mozil...
... * * @
param port * the port upon which listening should happen, or -1 if no specific port is * desired * @throws ns_error_already_initialized * if this server is already started * @throws ns_error_not_available * if the server is not started and cannot be started on the desired port * (perhaps because the port is already in use or because the process does * not have privil...
...And 8 more matches
nsIMsgSearchSession
eaders(in nsmsgsearchscopevalue scope, in voidptr selection, in boolean forfilters); boolean isstringattribute(in nsmsgsearchattribvalue attrib); void addallscopes(in nsmsgsearchscopevalue attrib); void search(in nsimsgwindow awindow); void interruptsearch(); void pausesearch(); void resumesearch(); [noscript] nsmsgsearchtype setsearch
param(in nsmsgsearchtype type, in voidptr
param); [noscript] void addresultelement(in nsmsgresultelement element); boolean matchhdr(in nsimsgdbhdr amsghdr, in nsimsgdatabase adatabase); void addsearchhit(in nsimsgdbhdr header, in nsimsgfolder folder); attributes attribute type description searchterms nsisupportsarray readonly: n...
...umsearchterms unsigned long readonly: runningadapter nsimsgsearchadapter readonly: search
param voidptr not scriptable and readonly: searchtype nsmsgsearchtype readonly: numresults long readonly: window nsimsgwindow constants name value description booleanor 0 booleanand 1 methods addsearchterm() void addsearchterm(in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value, in boolean booleanand, in string arbitraryheader);
parameters attrib attribute for this term.
... createterm() nsimsgsearchterm createterm(); appendterm() void appendterm(in nsimsgsearchterm term);
parameters term registerlistener() adds a listener to the search session.
...And 8 more matches
nsINavHistoryObserver
note: see using onbeforedeleteuri() in gecko 1.9.1 for how to implement this in gecko 1.9.1 void onbeforedeleteuri( in nsiuri auri, in acstring aguid );
parameters auri the uri of the page about to be deleted.
...void onbeginupdatebatch();
parameters none.
...void onclearhistory();
parameters none.
...And 8 more matches
nsIPermissionManager
void add( in nsiuri uri, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in print64 expiretime );
parameters uri the uri to add the permission for.
... void addfromprincipal( in nsiprincipal principal, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in print64 expiretime );
parameters principal the principal to add the permission for.
... void remove( in nsiuri uri, in string type );
parameters nsiuri the uri whose permission will be removed.
...And 8 more matches
nsIWebNavigation
load_flags_none 0 this is the default value for the load flags
parameter.
... void gotoindex( in long index );
parameters index the index of the session history item to go to.
... void loaduri( wstring uri, unsigned long loadflags, nsiuri referrer, nsiinputstream postdata, nsiinputstream headers );
parameters uri the uri string to load.
...And 8 more matches
WebGLRenderingContext - Web APIs
webglrenderingcontext.getcontextattributes() returns a webglcontextattributes object that contains the actual context
parameters.
... webglrenderingcontext.get
parameter() returns a value for the passed
parameter name.
... webglrenderingcontext.samplecoverage() specifies multi-sample coverage
parameters for anti-aliasing effects.
...And 8 more matches
url - Archive of obsolete content
any api in the sdk which has a url
parameter will accept url objects, not raw strings, unless otherwise noted.
...
parameters source : string a string to be converted into a url.
...
parameters uri : string a string to be parsed as data url.
...And 7 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
passing the name of the window type as the
parameter of the nsiwindowmediator.getmostrecentwindow() method returns the most recently active window from among the root element's windows with that type set for the windowtype attribute value.
... setting the
parameter to null returns the active window from among all windows, including dialogs, etc.
... like the getmostrecentwindow() method, passing null as the
parameter for the getenumerator() method enables you to get all windows in firefox, including dialogs, etc.
...And 7 more matches
Creating regular expressions for a microsummary generator - Archive of obsolete content
urls 101 urls for auction item pages on ebay, like those on many other sites, usually start with the string "http://" and contain a domain name, a file path, and some query
parameters.
... here's a url for an auction item page on ebay: http://cgi.ebay.com/ws/ebayisapi.dll?viewitem&item=280018439106 in this url, the domain name is "cgi.ebay.com", the file path is "/ws/ebayisapi.dll", and the query
parameters are "?viewitem&item=280018439106".
... matching from the start of the url while this expression matches the url, it also matches other urls that contain this url in their query
parameters, for example: http://www.example.com/redirect.php?url=http://cgi.ebay.com/ws/ebayisapi.dll?viewitem&item=280018439106 that's probably not what we want, since urls that contain our example url probably aren't auction item pages themselves.
...And 7 more matches
generateCRMFRequest() - Archive of obsolete content
crmfobject = crypto.generatecrmfrequest("requesteddn", "regtoken", "authenticator", "escrowauthoritycert", "crmf generation done code", keysize1, "key
params1", "keygenalg1", ..., keysizen, "key
paramsn", "keygenalgn"); this method will generate a sequence of crmf requests that has n requests.
...the first three
parameters will be applied to every request.
... the "escrowauthoritycert"
parameter will only be used for requests that pertain to a key that is being escrowed.
...And 7 more matches
TypeScript support in Svelte - Learn web development
if we pass an unknown property in the options
parameter of the app constructor (for example a typo like traget instead of target) typescript will complain: in the app.svelte component, the setuptypescript.js script has added the lang="ts" attribute to the <script> tag.
... now from todos.svelte, we will instantiate a todo component with a literal object as its
parameter before the call to the moreactions component, like this: <hr /> <todo todo={ { name: 'a new task with no id!', completed: false } } /> <!-- moreactions --> <moreactions {todos} add the lang='ts' to the <script> tag of the todos.svelte component, so that it knows to use the type checking we have specified.
...(ts) let timeout ./svelte-todo-typescript/src/components/alert.svelte:11:28 warn:
parameter 'message' implicitly has an 'any' type, but a better type may be inferred from usage.
...And 7 more matches
AddonListener
void onenabling( in addon addon, in boolean needsrestart )
parameters addon the addon that is being enabled needsrestart true if an application restart is necessary for the change to take effect onenabled() called when an add-on has been enabled.
... void onenabled( in addon addon, )
parameters addon the addon that has been enabled ondisabling() called when an add-on is about to be disabled.
... void ondisabling( in addon addon, in boolean needsrestart )
parameters addon the addon that is being disabled needsrestart true if an application restart is necessary for the change to take effect ondisabled() called when an add-on has been disabled.
...And 7 more matches
PopupNotifications.jsm
void locationchange();
parameters none.
... notification getnotification( string id xulelement browser );
parameters id the notification id to search for.
... void remove( notification notification );
parameters notification the notification object representing the notification to remove.
...And 7 more matches
nsIEditorIMESupport
void begincomposition( in nstexteventreplyptr areply );
parameters areply endcomposition() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) handles the end of inline input composition.
... void endcomposition();
parameters none.
...void forcecompositionend();
parameters none.
...And 7 more matches
nsIExternalProtocolService
boolean externalprotocolhandlerexists( in string aprotocolscheme );
parameters aprotocolscheme the scheme from a url: http, ftp, mailto, and so on.
...astring getapplicationdescription( in autf8string ascheme );
parameters ascheme the scheme to look up.
...nsihandlerinfo getprotocolhandlerinfo( in acstring aprotocolscheme );
parameters aprotocolscheme the scheme from a url: http, ftp, mailto, and so on.
...And 7 more matches
nsIMsgIdentity
void clearallvalues();
parameters none.
... void copy(in nsimsgidentity identity);
parameters identity getunicharattribute() getter for unicode attributes.
... astring getunicharattribute(in string name);
parameters name setunicharattribute() setter for unicode attributes.
...And 7 more matches
nsINavHistoryQuery
toolkit/components/places/public/nsinavhistoryservice.idlscriptable encapsulates all the query
parameters you're likely to need when building up history ui.
... all
parameters are anded together.
...setting this is equivalent to listing all bookmark folders in the folders
parameter.
...And 7 more matches
nsIScriptableIO
nsifile getfile( in astring alocation, in astring afilename );
parameters alocation a location key identifying a known standard directory.
... the afilename
parameter is treated as being local to this directory.
... nsifile getfilewithpath( in astring afilepath );
parameters afilepath the absolute pathname of the file to reference, or the value of a file's persistentdescriptor.
...And 7 more matches
nsIStringBundle
method overview wstring formatstringfromid(in long aid, [array, size_is(length)] in wstring
params, in unsigned long length); wstring formatstringfromname(in wstring aname, [array, size_is(length)] in wstring
params, in unsigned long length); nsisimpleenumerator getsimpleenumeration(); wstring getstringfromid(in long aid); wstring getstringfromname(in wstring aname); methods formatstringfromid() returns a formatted string with the given id from the...
... wstring formatstringfromid( in long aid, [array, size_is(length)] in wstring
params, in unsigned long length );
parameters aid the id of the string to retrieve.
...
params
parameters to pass in to the string.
...And 7 more matches
nsITreeColumns
nsitreecolumn getcolumnat( in long index );
parameters index index of the column return value a nsitreecolumn for this index.
...nsitreecolumn getcolumnfor( in nsidomelement element );
parameters element a dom element return value a nsitreecolumn for this element.
...nsitreecolumn getfirstcolumn();
parameters none.
...And 7 more matches
nsIWindowWatcher
nsiwebbrowserchrome getchromeforwindow( in nsidomwindow awindow );
parameters awindow the nsidomwindow whose chrome window the caller needs.
... nsiauthprompt getnewauthprompter( in nsidomwindow aparent );
parameters aparent the parent window used for posing alerts.
... nsiprompt getnewprompter( in nsidomwindow aparent );
parameters aparent the parent nsidomwindow used for posing alerts.
...And 7 more matches
nsIWritablePropertyBag2
); void setpropertyasint64(in astring prop, in print64 value); void setpropertyasinterface(in astring prop, in nsisupports value); void setpropertyasuint32(in astring prop, in pruint32 value); void setpropertyasuint64(in astring prop, in pruint64 value); methods setpropertyasacstring() void setpropertyasacstring( in astring prop, in acstring value );
parameters prop property to set the value of.
... setpropertyasastring() void setpropertyasastring( in astring prop, in astring value );
parameters prop property to set the value of.
... setpropertyasautf8string() void setpropertyasautf8string( in astring prop, in autf8string value );
parameters prop property to set the value of.
...And 7 more matches
nsIXPCScriptable
methods precreate() void precreate( in nsisupports nativeobj, in jscontextptr cx, in jsobjectptr globalobj, out jsobjectptr parentobj );
parameters nativeobj cx globalobj parentobj create() void create( in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj );
parameters wrapper cx obj postcreate() void postcreate( in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj );
parameters wrapper cx obj addproperty() prbool addproperty( in ns...
...ixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp );
parameters wrapper cx obj id vp return value delproperty() prbool delproperty( in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp );
parameters wrapper cx obj id vp return value getproperty() prbool getproperty( in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp );
parameters wrapper cx obj id vp return value ns_success_i_did_something if this method does something.
... setproperty() prbool setproperty( in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp );
parameters wrapper cx obj id vp return value ns_success_i_did_something if this method does something.
...And 7 more matches
HTMLInputElement.stepDown() - Web APIs
the htmlinputelement.stepdown([n]) method decrements the value of a numeric type of <input> element by the value of the step attribute or up to n multiples of the step attribute if a number is passed as the
parameter.
...mytime.step(), with no
parameter, would have resulted in 16:45, as n defaults to 1.
...s of 900 seconds (15 minute) --> <input type="time" max="17:00" step="900"> <!-- decrements by intervals of 7 days (one week) --> <input type="date" max="2019-12-25" step="7"> <!-- decrements by intervals of 12 months (one year) --> <input type="month" max="2019-12" step="12"> the method, when invoked, changes the form control's value by the value given in the step attribute, multiplied by the
parameter, within the constraints set within the form control.
...And 7 more matches
IDBObjectStoreSync - Web APIs
any add( in any value, in optional any key ) raises (idbdatabaseexception);
parameters returns exceptions this method can raise a idbdatabaseexception with the following codes: value the value to store into the index.
... constraint_err if a record exists in this index with a key corresponding to the key
parameter or the index is auto-populated, or if no record exists with a key corresponding to the value
parameter in the index's referenced object store.
... data_err if this object store uses out-of-line keys, and the key
parameter was not passed.
...And 7 more matches
context-menu - Archive of obsolete content
for example, this item appears whenever the context menu is invoked on a page that contains at least one image: require("sdk/context-menu").item({ label: "this page has images", contentscript: 'self.on("context", function (node) {' + ' return !!document.queryselector("img");' + '});' }); note that the listener function has a
parameter called node.
... therefore, to handle an item click, listen for the "click" event in that item's content script like so: require("sdk/context-menu").item({ label: "my item", contentscript: 'self.on("click", function (node, data) {' + ' console.log("item clicked!");' + '});' }); note that the listener function has
parameters called node and data.
...
parameters options : object required options: name type label string the item's label.
...And 6 more matches
test/assert - Archive of obsolete content
parameters logger : object object used to log the results of assertions.
... assert.ok(a == 1, "test that a is equal to one"); this is equivalent to: assert.equal(a == 1, true, "test that a is equal to one");
parameters guard : expression the expression to evaluate.
... equal(actual, expected, message) tests shallow, coercive equality with ==: assert.equal(1, 1, "test that one is one");
parameters actual : object the actual result.
...And 6 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
both methods require three
parameters: the event type, a function reference, and a boolean denoting whether the listener should catch events in their capture phase.
...internet explorer's event model only has the bubbling phase; therefore, setting the third
parameter to false results in internet explorer-like behavior: <div id="mydiv">click me!</div> <script> function handleevent(aevent) { // if aevent is null, it is the internet explorer event model, // so get window.event.
...thus, to remove an event listener requires all three
parameters be the same as the ones you use when adding the listener.
...And 6 more matches
Graceful asynchronous programming with Promises - Learn web development
inside your <script> element, add the following line: let promise = fetch('coffee.jpg'); this calls the fetch() method, passing it the url of the image to fetch from the network as a
parameter.
... this can also take an options object as an optional second
parameter, but we are just using the simplest version for now.
...it is passed the returned response object as a
parameter.
...And 6 more matches
Functions — reusable blocks of code - Learn web development
in this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define them, scope, and
parameters.
...again, this looks something like this: mybutton.onclick = function() { alert('hello'); // i can put as much code // inside here as i want } function
parameters some functions require
parameters to be specified when you are invoking them — these are values that need to be included inside the function parentheses, which it needs to do its job properly.
... note:
parameters are sometimes called arguments, properties, or even attributes.
...And 6 more matches
Parser API
functions interface function <: node { id: identifier | null;
params: [ pattern ]; defaults: [ expression ]; rest: identifier | null; body: blockstatement | expression; generator: boolean; expression: boolean; } a function declaration or expression.
... interface functiondeclaration <: function, declaration { type: "functiondeclaration"; id: identifier;
params: [ pattern ]; defaults: [ expression ]; rest: identifier | null; body: blockstatement | expression; generator: boolean; expression: boolean; } a function declaration.
... interface functionexpression <: function, expression { type: "functionexpression"; id: identifier | null;
params: [ pattern ]; defaults: [ expression ]; rest: identifier | null; body: blockstatement | expression; generator: boolean; expression: boolean; } a function expression.
...And 6 more matches
Shell global objects
entrypoints(
params) carry out some jsapi operation as directed by
params, and return an array of objects describing which javascript entry points were invoked as a result.
...
params is an object whose properties indicate what operation to perform.
... here are the recognized groups of properties: { function } call the object
params.function with no arguments.
...And 6 more matches
IAccessibleTableCell
[propget] hresult columnextent( [out] long ncolumnsspanned );
parameters ncolumnsspanned returns the 1 based column extent of the specified cell.
...[propget] hresult columnheadercells( [out, size_is(, ncolumnheadercells,)] iunknown cellaccessibles, [out] long ncolumnheadercells );
parameters cellaccessibles pointer to an array of references to cell accessibles.
...[propget] hresult columnindex( [out] long columnindex );
parameters columnindex returns the 0 based column index of the cell of the specified cell or the index of the first column if the cell spans multiple columns.
...And 6 more matches
nsIApplicationCache
void activate();
parameters none.
...void addnamespaces( in nsiarray namespaces );
parameters namespaces an nsiarray of nsiapplicationcachenamespace objects describing the namespaces to add to the cache.
...void discard();
parameters none.
...And 6 more matches
nsIBlocklistService
unsigned long getaddonblockliststate( in jsval addon, in astring appversion, optional in astring toolkitversion optional );
parameters addon the addon object whose blocklist state is to be determined.
...if this
parameter is null, the version of the running application is used.
...if this
parameter is null, the version of the running toolkit is used.
...And 6 more matches
nsICollection
void appendelement( in nsisupports item )
parameters item nsisupports item to be appended to the list.
...void clear();
parameters none.
...pruint32 count();
parameters none.
...And 6 more matches
nsIContentPrefService
void addobserver( in astring aname, in nsicontentprefobserver aobserver );
parameters aname the name of the preference to observe.
... nsivariant getpref( in nsivariant agroup, in astring aname, in nsicontentprefcallback acallback optional );
parameters agroup the group for which to retrieve a preference; this may be specified as either a uri or as a string; in either case, the group consists of all sites matching the hostname portion of the specified uri.
... nsipropertybag2 getprefs( in nsivariant agroup );
parameters agroup the group whose preferences are to be retrieved; this may be specified as either a uri or as a string; in either case, the group consists of all sites matching the hostname portion of the specified uri.
...And 6 more matches
nsIControllers
void appendcontroller( in nsicontroller controller );
parameters controller a controller to be added to the list of controllers.
...nsicontroller getcontrollerat( in unsigned long index );
parameters index the position of the wanted controller.
...nsicontroller getcontrollerbyid( in unsigned long controllerid );
parameters controllerid the id (insertion order) of a controller.
...And 6 more matches
nsIDBChangeListener
void onhdrflagschanged(in nsimsgdbhdr ahdrchanged, in unsigned long aoldflags, in unsigned long anewflags, in nsidbchangelistener ainstigator);
parameters ahdrchanged the nsimsgdbhdr of the message that changed.
... void onhdrdeleted(in nsimsgdbhdr ahdrchanged, in nsmsgkey aparentkey, in long aflags, in nsidbchangelistener ainstigator);
parameters ahdrchanged the nsimsgdbhdr of the message that was removed.
... void onhdradded(in nsimsgdbhdr ahdrchanged, in nsmsgkey aparentkey, in long aflags, in nsidbchangelistener ainstigator);
parameters ahdrchanged the nsimsgdbhdr of the message that was added.
...And 6 more matches
nsIDOMMozNetworkStatsManager
nsidomdomrequest getsamples(in nsisupports network, in jsval start, in jsval end, [optional] in jsval options /* networkstatsgetoptions */);
parameters network the origin of the data.
...when total data usage reaches threshold bytes, a "networkstats-alarm" system message is sent to the application, where the optional
parameter data must be a cloneable object.
... nsidomdomrequest addalarm(in nsisupports network, in long threshold, [optional] in jsval options /* networkstatsalarmoptions */);
parameters network the origin of the data.
...And 6 more matches
nsIJSON
jsobject decode( in astring str );
parameters str the json string to decode.
... jsval decodetojsval( in astring str, in jscontext cx );
parameters str the json string to decode.
... jsobject decodefromstream( in nsiinputstream stream, in long contentlength );
parameters stream the nsiinputstream from which to read the json string.
...And 6 more matches
nsINavHistoryResultViewObserver
boolean candrop( in long index, in long orientation );
parameters index the item over which the drag is currently located.
... void ondrop( in long row, in long orientation );
parameters row the row at which the drop occurred.
... void ontoggleopenstate( in long index );
parameters index the item being toggled.
...And 6 more matches
nsIObserverService
void addobserver( in nsiobserver anobserver, in string atopic, in boolean ownsweak );
parameters anobserver the nsiobserver object which will receive notifications.
... nsisimpleenumerator enumerateobservers( in string atopic );
parameters atopic the notification topic or subject.
... void notifyobservers( in nsisupports asubject, in string atopic, in wstring somedata );
parameters asubject a notification specific interface pointer.
...And 6 more matches
nsIPrincipal
constant value description enable_denied 1 enable_unknown 2 enable_with_user_permission 3 enable_granted 4 methods native code only!canenablecapability short canenablecapability( in string capability );
parameters capability missing description return value missing description exceptions thrown missing exception missing description checkmayload() checks whether this principal is allowed to load the network resource located at the given uri under the same-origin policy.
...void checkmayload( in nsiuri uri, in boolean report );
parameters uri missing description report if true, will report a warning to the console service if the load is not allowed.
... native code only!disablecapability void disablecapability( in string capability, inout voidptr annotation );
parameters capability missing description annotation missing description native code only!enablecapability void enablecapability( in string capability, inout voidptr annotation );
parameters capability missing description annotation missing description equals() returns whether the other principal is equivalent to this principal.
...And 6 more matches
nsIProcess
void init( in nsifile executable );
parameters executable the nsifile executable file to be represented by the nsiprocess object.
... void initwithpid( in unsigned long pid );
parameters pid the process id to begin to represent.
... void kill();
parameters none.
...And 6 more matches
nsIProtocolProxyService
nsiproxyinfo resolve( in nsiuri auri, in unsigned long aflags );
parameters auri the uri to test.
... nsicancelable asyncresolve( in nsiuri auri, in unsigned long aflags, in nsiprotocolproxycallback acallback );
parameters auri the uri to test.
...if canceled, the cancellation status (areason) will be forwarded to the callback's nsiprotocolproxycallback.onproxyavailable() method via the astatus
parameter.
...And 6 more matches
nsIScrollable
methods getcurscrollpos() obsolete since gecko 29.0 (firefox 29.0 / thunderbird 29.0 / seamonkey 2.26) long getcurscrollpos( in long scrollorientation );
parameters scrollorientation an integer representing the orientation of the scrollbar.
... return value getdefaultscrollbarpreferences() long getdefaultscrollbarpreferences( in long scrollorientation );
parameters scrollorientation an integer representing the orientation of the scrollbar.
...getscrollbarvisibility() void getscrollbarvisibility( out boolean verticalvisible, out boolean horizontalvisible );
parameters verticalvisible boolean specifying the visibility of the vertical scrollbar.
...And 6 more matches
nsITransferable
void adddataflavor( in string adataflavor );
parameters adataflavor a string defining a new data flavor that the transferable supports.
... nsisupportsarray flavorstransferablecanexport();
parameters none.
... nsisupportsarray flavorstransferablecanimport();
parameters none.
...And 6 more matches
nsIWebProgressListener
the astatus
parameter to onstatechange() indicates the final status of the request.
...the document corresponding to a document request is available via the domwindow attribute of onstatechange()'s awebprogress
parameter.
... void onlocationchange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri alocation, [optional] in unsigned long aflags );
parameters awebprogress the nsiwebprogress instance that fired the notification.
...And 6 more matches
nsIXULTemplateQueryProcessor
void addbinding( in nsidomnode arulenode, in nsiatom avar, in nsiatom aref, in astring aexpr );
parameters arulenode rule to add the binding to.
...print32 compareresults( in nsixultemplateresult aleft, in nsixultemplateresult aright, in nsiatom avar, in unsigned long asorthints );
parameters aleft the left result to compare.
...nsisupports compilequery( in nsixultemplatebuilder abuilder, in nsidomnode aquery, in nsiatom arefvariable, in nsiatom amembervariable );
parameters abuilder the template builder.
...And 6 more matches
nsIXULWindow
void addchildwindow( in nsixulwindow achild );
parameters achild the child window being added.
... void applychromeflags();
parameters none.
... void assumechromeflagsarefrozen();
parameters none.
...And 6 more matches
nsIMsgCloudFileProvider
void init(in string aaccountkey);
parameters uploadfile() starts a file upload for this account.
... void uploadfile(in nsilocalfile afile, in nsirequestobserver acallback);
parameters afile the file to be uploaded.
... acstring urlforfile(in nsilocalfile afile);
parameters afile the previously uploaded file to get the url for.
...And 6 more matches
RTCPeerConnection.setLocalDescription() - Web APIs
the method takes a single
parameter—the session description—and it returns a promise which is fulfilled once the description has been changed, asynchronously.
... syntax apromise = rtcpeerconnection.setlocaldescription(sessiondescription); pc.setlocaldescription(sessiondescription, successcallback, errorcallback);
parameters sessiondescription optional an rtcsessiondescriptioninit or rtcsessiondescription which specifies the configuration to be applied to the local end of the connection.
... type of the description
parameter the description is of type rtcsessiondescriptioninit, which is a serialized version of a rtcsessiondescription browser object.
...And 6 more matches
URL API - Web APIs
you can also look up the values of individual
parameters with the urlsearch
params object's get() method: let addr = new url("https://mysite.com/login?user=someguy&page=news"); try { loginuser(addr.search
params.get("user")); gotopage(addr.search
params.get("page")); } catch(err) { showerrormessage(err); } for example, in the above snippet, the username and target page are taken from the query and passed to appropriate functions that are use...
... other functions within urlsearch
params let you change the value of keys, add and delete keys and their values, and even sort the list of
parameters.
... url api interfaces the url api is a simple one, with only a couple of interfaces to its name: url urlsearch
params older versions of the specification included an interface called urlutilsreadonly, which has since been merged into the workerlocation interface.
...And 6 more matches
WebGL best practices - Web APIs
geterror, get
parameter) certain webgl entry points cause synchronous stalls on the calling thread.
... getshader/program
parameter(), getshader/programinfolog(), other gets on shaders/programs: flush + shader compile + round-trip, if not done after shader compilation is complete.
... (see also parallel shader compilation below.) get*
parameter() in general: possible flush + round-trip.
...And 6 more matches
Web Authentication API - Web APIs
the
parameters received from the server will be passed to the create() call, typically with little or no modification and returns a promise that will resolve to a publickeycredential containing an authenticatorattestationresponse.
... browser calls authenticatormakecredential() on authenticator - internally, the browser will validate the
parameters and fill in any defaults, which become the authenticatorresponse.clientdatajson.
... one of the most important
parameters is the origin, which is recorded as part of the clientdata so that the origin can be verified by the server later.
...And 6 more matches
Window.openDialog() - Web APIs
it behaves the same, except that it can optionally take one or more
parameters past windowfeatures, and windowfeatures itself is treated a little differently.
... the optional
parameters, if present, are bundled up in a javascript array object and added to the newly created window as a property named window.arguments.
...these
parameters may be used, then, to pass arguments to and from the dialog window.
...And 6 more matches
XSLTProcessor - Web APIs
it has methods to load the xslt stylesheet, to manipulate <xsl:
param>
parameter values, and to apply the transformation to documents.
... syntax the constructor has no
parameters.
... the resultant object depends on the output method of the stylesheet: output method result type html htmldocument xml xmldocument text xmldocument with a single root element <transformiix:result> with the text as a child [throws] void xsltprocessor.set
parameter(string namespaceuri, string localname, any value) sets a
parameter in the xslt stylesheet that was imported.
...And 6 more matches
Web APIs
a angle_instanced_arrays abortcontroller abortsignal absoluteorientationsensor abstractrange abstractworker accelerometer addresserrors aescbc
params aesctr
params aesgcm
params aeskeygen
params ambientlightsensor analysernode animation animationeffect animationevent animationplaybackevent animationtimeline arraybufferview attr audiobuffer audiobuffersourcenode audioconfiguration audiocontext audiocontextlatencycategory audiocontextoptions audiodestinationnode audiolistener audionode audionodeoptions audio
param audio
paramdescriptor audiopa...
...aints document documentfragment documentorshadowroot documenttimeline documenttouch documenttype doublerange dragevent dynamicscompressornode e ext_blend_minmax ext_color_buffer_float ext_color_buffer_half_float ext_disjoint_timer_query ext_float_blend ext_frag_depth ext_srgb ext_shader_texture_lod ext_texture_compression_bptc ext_texture_compression_rgtc ext_texture_filter_anisotropic eckeygen
params eckeyimport
params ecdhkeyderive
params ecdsa
params effecttiming element elementcssinlinestyle elementtraversal errorevent event eventlistener eventsource eventtarget extendableevent extendablemessageevent f featurepolicy federatedcredential fetchevent file fileentrysync fileerror fileexception filelist filereader filereadersync filerequest filesystem filesystemdirectoryentry ...
...isindexelement htmlkeygenelement htmllielement htmllabelelement htmllegendelement htmllinkelement htmlmapelement htmlmarqueeelement htmlmediaelement htmlmenuelement htmlmenuitemelement htmlmetaelement htmlmeterelement htmlmodelement htmlolistelement htmlobjectelement htmloptgroupelement htmloptionelement htmloptionscollection htmlorforeignelement htmloutputelement htmlparagraphelement html
paramelement htmlpictureelement htmlpreelement htmlprogresselement htmlquoteelement htmlscriptelement htmlselectelement htmlshadowelement htmlslotelement htmlsourceelement htmlspanelement htmlstyleelement htmltablecaptionelement htmltablecellelement htmltablecolelement htmltableelement htmltablerowelement htmltablesectionelement htmltemplateelement htmltextareaelement htmltimeelement htmltitleeleme...
...And 6 more matches
<keygen> - HTML: Hypertext Markup Language
the element is written as follows: <keygen name="name" challenge="challenge string" keytype="type" key
params="pqg-
params"> the keytype
parameter is used to specify what type of key is to be generated.
...the key
params attribute is required for dsa and ec key generation and ignored for rsa key generation.
... pqg is a synonym for key
params.
...And 6 more matches
Arrow function expressions - JavaScript
syntax basic syntax (
param1,
param2, …,
paramn) => { statements } (
param1,
param2, …,
paramn) => expression // equivalent to: => { return expression; } // parentheses are optional when there's only one
parameter name: (single
param) => { statements } single
param => { statements } // the
parameter list for a function with no
parameters should be written with a pair of parentheses.
... () => { statements } advanced syntax // parenthesize the body of a function to return an object literal expression:
params => ({foo: bar}) // rest
parameters and default
parameters are supported (
param1,
param2, ...rest) => { statements } (
param1 = defaultvalue1,
param2, …,
paramn = defaultvaluen) => { statements } // destructuring within the
parameter list is also supported var f = ([a, b] = [1, 2], {x: c} = {x: a + b}) => a + b + c; f(); // 6 description see also "es6 in depth: arrow functions" on hacks.mozilla.org.
... shorter functions var elements = [ 'hydrogen', 'helium', 'lithium', 'beryllium' ]; // this statement returns the array: [8, 6, 7, 9] elements.map(function(element) { return element.length; }); // the regular function above can be written as the arrow function below elements.map((element) => { return element.length; }); // [8, 6, 7, 9] // when there is only one
parameter, we can remove the surrounding parentheses elements.map(element => { return element.length; }); // [8, 6, 7, 9] // when the only statement in an arrow function is `return`, we can remove `return` and remove // the surrounding curly brackets elements.map(element => element.length); // [8, 6, 7, 9] // in this case, because we only need the length property, we can use destructuring
parameter...
...And 6 more matches
String.prototype.replace() - JavaScript
syntax const newstr = str.replace(regexp|substr, newsubstr|function)
parameters regexp (pattern) a regexp object or literal.
... newsubstr (replacement) the string that replaces the substring specified by the specified regexp or substr
parameter.
... a number of special replacement patterns are supported; see the "specifying a string as a
parameter" section below.
...And 6 more matches
Index - XSLT: Extensible Stylesheet Language Transformations
3 index index, reference, xslt found 54 pages: 4 pi
parameters xslt no summary!
...using the xsltprocessor.get
parameter() method, the code can figure whether to sort in ascending or descending order.
... it defaults to ascending if the
parameter is empty (the first time the sorting happens, as there is no value for it in the xslt file).
...And 6 more matches
widget - Archive of obsolete content
parameters options : object required options: name type label string a string description of the widget used for accessibility, title bars, and error reporting.
...
parameters data : value the message to send.
...
parameters type : string the type of event to listen for.
...And 5 more matches
preferences/service - Archive of obsolete content
parameters name : string preference name.
...
parameters name : string defaultvalue : string,number,boolean preference value.
... example: var name = "extensions.checkcompatibility.nightly"; var nightlycompatchk = require("sdk/preferences/service").get(name); has(name)
parameters name : string preference name.
...And 5 more matches
util/array - Archive of obsolete content
let { has } = require('sdk/util/array'); let a = ['rock', 'roll', 100]; has(a, 'rock'); // true has(a, 'rush'); // false has(a, 100); // true
parameters array : array the array to search.
... let { hasany } = require('sdk/util/array'); let a = ['rock', 'roll', 100]; hasany(a, ['rock', 'bright', 'light']); // true hasany(a, ['rush', 'coil', 'jet']); // false
parameters array : array the array to search for elements.
... let { add } = require('sdk/util/array'); let a = ['alice', 'bob', 'carol']; add(a, 'dave'); // true add(a, 'dave'); // false add(a, 'alice'); // false console.log(a); // ['alice', 'bob', 'carol', 'dave']
parameters array : array the array to add the element to.
...And 5 more matches
Space Manager Detailed Design - Archive of obsolete content
* {0, ayoffset, amaxsize.width, amaxsize.height} in the local * coordinate space * * @
param ayoffset the y-offset of where the band begins.
... the coordinate is * relative to the upper-left corner of the local coordinate space * @
param amaxsize the size to use to constrain the band data * @
param abanddata [in,out] used to return the list of trapezoids that * describe the available space and the unavailable space * @return ns_ok if successful and ns_error_failure if the band data is not * not large enough.
... * * the region is tagged with a frame * * @
param aframe the frame used to identify the region.
...And 5 more matches
XPCOM Interfaces - Archive of obsolete content
this function takes one
parameter, the interface that you want to get.
...here, we use the nsilocalfile interface and pass it as a
parameter to queryinterface().
...the first
parameter should be the file path, such as '/usr/local/mozilla'.
...And 5 more matches
Parsing microformats in JavaScript - Archive of obsolete content
normalizeddate = microformats.parser.datetimegetter(propnode, parentnode);
parameters propnode the dom node to check.
... propertyvalue = microformats.parser.defaultgetter(propnode, parentnode, datatype);
parameters propnode the dom node to check.
...email = microformats.parser.emailgetter(propnode, parentnode);
parameters propnode the dom node to check.
...And 5 more matches
Useful string methods - Learn web development
this can be done using the indexof() method, which takes a single
parameter — the substring you want to search for.
...try the following: browsertype.slice(0,3); this returns "moz" — the first
parameter is the character position to start extracting at, and the second
parameter is the character position after the last one to be extracted.
...in this example, since the starting index is 0, the second
parameter is equal to the length of the string being returned.
...And 5 more matches
How to implement a custom autocomplete search component
the component uses the autocompletesearch
param attribute or search
param property to allow the developer to define the default directory otherwise only paths beginning with / or ~/ will be autocompleted.
...onst ci = components.interfaces; const cu = components.utils; cu.import('resource://gre/modules/xpcomutils.jsm'); const class_id = components.id('x753d830-ba1e-11e0-962b-0800200c9a66'); // ← change this const class_name = "basic autocomplete"; const contract_id = '@mozilla.org/autocomplete/search;1?name=basic-autocomplete'; /** * @constructor * * @implements {nsiautocompleteresult} * * @
param {string} searchstring * @
param {number} searchresult * @
param {number} defaultindex * @
param {string} errordescription * @
param {array.<string>} results * @
param {array.<string>|null=} comments */ function providerautocompleteresult(searchstring, searchresult, defaultindex, errordescription, results, comments) { this._searchstring = searchstring; this._searchresult = searchresult; t...
...i.nsiautocompleteresult ]) }; /** * @constructor * * @implements {nsiautocompletesearch} */ function providerautocompletesearch() { } providerautocompletesearch.prototype = { classid: class_id, classdescription : class_name, contractid : contract_id, /** * searches for a given string and notifies a listener (either synchronously * or asynchronously) of the result * * @
param searchstring the string to search for * @
param search
param an extra
parameter * @
param previousresult a previous result to use for faster searchinig * @
param listener the listener to notify when the search is complete */ startsearch: function(searchstring, search
param, previousresult, listener) { var results = ['mary', 'john']; var autocomplete_result = new providerautocompl...
...And 5 more matches
FileUtils.jsm
enatomicfileoutputstream(nsifile file, int modeflags); nsifileoutputstream opensafefileoutputstream(nsifile file, int modeflags); void closeatomicfileoutputstream(nsifileoutputstream stream); void closesafefileoutputstream(nsifileoutputstream stream); constants constant value description mode_rdonly 0x01 corresponds to the pr_rdonly
parameter to pr_open mode_wronly 0x02 corresponds to the pr_wronly
parameter to pr_open mode_create 0x08 corresponds to the pr_create_file
parameter to pr_open mode_append 0x10 corresponds to the pr_append
parameter to pr_open mode_truncate 0x20 corresponds to the pr_truncate
parameter to pr_open perms_file 0644 default permissi...
... nsifile getfile( string key, array patharray, bool followlinks );
parameters key the nsidirectoryservice key to start from (see getting special files for more info) patharray an array of path components to locate beneath the directory specified by key.
... nsifile getdir( string key, array patharray, bool shouldcreate, bool followlinks );
parameters key the nsidirectoryservice key to start from (see getting special files for more info) patharray an array of path components to locate beneath the directory specified by key.
...And 5 more matches
NetUtil.jsm
nsiasyncstreamcopier asynccopy( asource, asink, acallback );
parameters asource the input stream from which to read the source data.
...the callback receives a single
parameter: the nsresult status code for the copy operation.
... asyncfetch( asource, acallback );
parameters asource the source to open asynchronously.
...And 5 more matches
PR_Seek64
syntax #include <prio.h> print64 pr_seek64( prfiledesc *fd, print64 offset, prseekwhence whence);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object.
... offset a value, in bytes, used with the whence
parameter to set the file pointer.
... whence a value of type prseekwhence that specifies how to interpret the offset
parameter in setting the file pointer associated with the fd
parameter.
...And 5 more matches
Enc Dec MAC Output Public Key as CSR
utfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *sec
param = pk11_
paramfromiv(type, &ivitem); if (sec
param == null) { pr_fprintf(pr_stderr, "crypt failed : sec
param null\n"); return null; } ctx = pk11_createcontextbysymkey(type, operation, key, sec
param); if (ctx == null) { pr_fprintf(pr_stderr, "crypt failed : can't create a context\n"); goto cleanup; } cleanup: if (sec
param) { secitem_fre...
...eitem(sec
param, pr_true); } return ctx; } /* * common encryption and decryption code */ secstatus crypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, unsigned char *in, unsigned int inlen) { secstatus rv; rv = pk11_cipherop(ctx, out, outlen, maxout, in, inlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "crypt failed : pk11_cipherop returned %d\n", rv); goto cleanup; } cleanup: if (rv != secsuccess) { return rv; } return secsuccess; } /* * decrypt */ secstatus decrypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, unsigned char *in, unsigned int inlen) { return crypt(ctx, out, outlen, maxout, in, inlen); } /* * encrypt */ ...
...1context * encryptinit(pk11symkey *ek, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* * read cryptographic
parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char *header; char *trailer; prfiledesc *file = null; outbuf.type = sibuffer;...
...And 5 more matches
Observer Notifications
you can cancel the shutdown from here by setting asubject.data to true (asubject is the first
parameter to your observer, the data value is an nsisupportsprbool).
...both are passed an nsihttpchannel as the subject
parameter.
...if bookmarks will be restored into a specific folder, observers will be passed an nsisupportsprint64 through their subject
parameters indicating the id of the folder.
...And 5 more matches
imgIRequest
void cancelandforgetobserver( in nsresult astatus );
parameters astatus clone() clone this request; the returned request will have aobserver as the observer.
...imgirequest clone( in imgidecoderobserver aobserver );
parameters aobserver return value decrementanimationconsumers() tell the image it can forget about a request that the image animate.
... void decrementanimationconsumers();
parameters none.
...And 5 more matches
mozIAsyncFavicons
void getfaviconurlforpage( in nsiuri apageuri, in nsifavicondatacallback acallback );
parameters apageuri uri of the page whose favicon's url we're looking up.
...void getfaviconurlforpage( in nsiuri apageuri, in nsifavicondatacallback acallback );
parameters apageuri uri of the page whose favicon uri and data we're looking up.
...the auri
parameter will be the favicon uri, or null when no favicon is associated with the page or an error occurred while fetching it.
...And 5 more matches
mozIStorageValueArray
long gettypeofindex( in unsigned long aindex );
parameters aindex the zero-based numerical index for the column to get the data from.
... long getint32( in unsigned long aindex );
parameters aindex the zero-based numerical index for the column to get the data from.
... long long getint64( in unsigned long aindex );
parameters aindex the zero-based numerical index for the column to get the data from.
...And 5 more matches
nsIApplicationCacheService
void cacheopportunistically( in nsiapplicationcache cache, in acstring key );
parameters cache the cache in which the entry is currently cached.
...nsiapplicationcache chooseapplicationcache( in acstring key );
parameters key the cache entry key for which to select an application cache.
... return value the nsiapplicationcache best able to serve the resource indicated by the key
parameter.
...And 5 more matches
nsICategoryManager
string addcategoryentry( in string acategory, in string aentry, in string avalue, in boolean apersist, in boolean areplace );
parameters acategory the name of the category being modified.
...you must pass false for this
parameter.
... void deletecategory( in string acategory );
parameters acategory the name of the category being deleted.
...And 5 more matches
nsICookieService
string getcookiestring( in nsiuri auri, in nsichannel achannel );
parameters auri the uri of the document for which cookies are being queried.
...this
parameter may be null, but it is strongly recommended that a non-null value be provided to ensure that the cookie privacy preferences are honored.
... string getcookiestringfromhttp( in nsiuri auri, in nsiuri afirsturi, in nsichannel achannel );
parameters auri the uri of the document for which cookies are being queried.
...And 5 more matches
nsICryptoHash
acstring finish( in prbool aascii );
parameters aascii if true then the returned value is a base-64 encoded string.
... void init( in unsigned long aalgorithm );
parameters aalgorithm the hash algorithm to use.
... void initwithstring( in acstring aalgorithm );
parameters aalgorithm the hash algorithm type to be used as a string, such as "sha256".
...And 5 more matches
nsIDNSService
constants resolve flag constants various flags that may be ored together to form the aflags
parameter passed to asyncresolve() and resolve().
...nsicancelable asyncresolve( in autf8string ahostname, in unsigned long aflags, in nsidnslistener alistener, in nsieventtarget alistenertarget );
parameters ahostname the host name or ip-address-literal to resolve.
... alistenertarget optional
parameter (may be null).
...And 5 more matches
nsIDOMChromeWindow
void beginwindowmove( in nsidomevent mousedownevent );
parameters mousedownevent exceptions thrown ns_error_not_implemented if the operating system does not support this method.
... getattention() void getattention();
parameters none.
...void getattentionwithcyclecount( in long acyclecount );
parameters acyclecount the maximum number of times to animate the window per system conventions.
...And 5 more matches
nsIFrameLoader
void activateframeevent( in astring atype, in boolean capture );
parameters atype the event type for which to enable forwarding.
... void activateremoteframe();
parameters none.
... void destroy();
parameters none.
...And 5 more matches
nsIJumpListBuilder
a task can be represented by an application shortcut and associated command line
parameters or a uri.
...the title of of the list is passed through the optional string
parameter of addbuildlist.
...void abortlistbuild();
parameters none.
...And 5 more matches
nsIMimeConverter
string encodemimepartiistr(in string header, in boolean structured, in string mailcharset, in long fieldnamelen, in long encodedwordsize);
parameters propertyname the name of the property to retrieve.
... string encodemimepartiistr_utf8(in autf8string header, in boolean structured, in string mailcharset, in long fieldnamelen, in long encodedwordsize);
parameters header the string to encode into the mime-encoded form.
... decodemimeheadertocharptr() void setstringproperty(in string propertyname, in string propertyvalue);
parameters propertyname the name of the property to set.
...And 5 more matches
nsIOutputStream
void close();
parameters none.
... void flush();
parameters none.
... boolean isnonblocking();
parameters none.
...And 5 more matches
nsIRadioInterfaceLayer
call_state_resuming 8 call_state_disconnecting 9 call_state_disconnected 10 call_state_incoming 11 datacall_state_unknown 0 datacall_state_connecting 1 datacall_state_connected 2 datacall_state_disconnecting 3 datacall_state_disconnected 4 call_state_ringing 2 obsolete since gecko 14.0 methods answercall() void answercall( in unsigned long callindex );
parameters callindex missing description exceptions thrown missing exception missing description deactivatedatacall() void deactivatedatacall( in domstring cid, in domstring reason );
parameters cid missing description reason missing description exceptions thrown missing exception missing description dial() functionality for making and managing phone calls.
... void dial( in domstring number );
parameters number missing description exceptions thrown missing exception missing description enumeratecalls() will continue calling callback.enumeratecallstate until the callback returns false.
... void enumeratecalls( in nsiriltelephonycallback callback );
parameters callback missing description exceptions thrown missing exception missing description getdatacalllist() void getdatacalllist();
parameters none.
...And 5 more matches
nsISmsDatabaseService
xtmessageinlist(in long listid, in long requestid, [optional] in unsigned long long processid); void clearmessagelist(in long listid); void markmessageread(in long messageid, in boolean value, in long requestid, [optional] in unsigned long long processid) methods savereceivedmessage() void savereceivedmessage( in domstring asender, in domstring abody, in unsigned long long adate );
parameters asender a domstring with the sender of the text message.
... savesentmessage() void savesentmessage( in domstring a receiver, in domstring abody, in unsigned long long adate );
parameters areceiver a domstring with the receiver of the text message.
... getmessage() void getmessage( in long messageid, in long requestid, [optional] in unsigned long long processid );
parameters messageid a number representing the id of the message.
...And 5 more matches
nsITransport
void close( in nsresult areason );
parameters areason the reason for closing the stream.
...nsiinputstream openinputstream( in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegmentcount );
parameters aflags optional transport specific flags.
... asegmentsize if open_unbuffered is not set, then this
parameter specifies the size of each buffer segment (pass 0 to use default value).
...And 5 more matches
nsIURLParser
unsigned long extensionpos, out long extensionlen); void parsefilepath(in string filepath, in long filepathlen, out unsigned long directorypos, out long directorylen, out unsigned long basenamepos, out long basenamelen, out unsigned long extensionpos, out long extensionlen); void parsepath(in string path, in long pathlen, out unsigned long filepathpos, out long filepathlen, out unsigned long
parampos, out long
paramlen, out unsigned long querypos, out long querylen, out unsigned long refpos, out long reflen); void parseserverinfo(in string serverinfo, in long serverinfolen, out unsigned long hostnamepos, out long hostnamelen, out long port); void parseurl(in string spec, in long speclen, out unsigned long schemepos, out long schemelen, out unsigned long authoritypos, out long authority...
...out
parameters of the methods are all optional (that is the caller may pass-in a null value if the corresponding results are not needed).
... signed out
parameters may hold a value of -1 if the corresponding result is not part of the string being parsed.
...And 5 more matches
nsIAbCard/Thunderbird3
nsivariant getproperty(in autf8string name, in nsivariant defaultvalue);
parameters name the case-sensitive name of the property to get.
...
parameters name the case-sensitive name of the property to get.
... void setproperty(in autf8string name, in nsivariant value); [noscript] void setpropertyasastring(in string name, in astring value); [noscript] void setpropertyasautf8string(in string name, in autf8string value); [noscript] void setpropertyasuint32(in string name, in pruint32 value); [noscript] void setpropertyasbool(in string name, in boolean value);
parameters name the case-sensitive name of the property to set.
...And 5 more matches
Reference Manual
nsiweakreference* weakptr = ...; weakptr->queryreferent( using an nscomptr<t> as a t* using an nscomptr as a pointer "in"
parameters "out"
parameters: getter_addrefs assignment into an nscomptr is fairly easy to understand.
...these rules apply equally to the "assignment" that happens when copying
parameters or function results that are declared to be nscomptrs.
... if we want nscomptrs to be a viable substitute for raw xpcom interface pointers, however, we will need to deal with the issue of "out"
parameters.
...And 5 more matches
AudioWorkletProcessor.process - Web APIs
syntax var isactivelyprocessing = audioworkletprocessor.process(inputs, outputs,
parameters);
parameters inputs an array of inputs connected to the node, each item of which is, in turn, an array of channels.
... outputs an array of outputs that is similar to the inputs
parameter in structure.
...
parameters an object containing string keys and float32array values.
...And 5 more matches
BiquadFilterNode - Web APIs
note: though the audio
param objects returned are read-only, the values they represent are not.
... biquadfilternode.frequency read only is an a-rate audio
param, a double representing a frequency in the current filtering algorithm measured in hertz (hz).
... biquadfilternode.detune read only is an a-rate audio
param representing detuning of the frequency in cents.
...And 5 more matches
Using the CSS Painting API - Web APIs
it takes two
parameters.
... the first is the name we give the worklet — this is the name we will use in our css as the
parameter of the paint() function when we want to apply this styling to an element.
... the second
parameter is the class that does all the magic, defining the context options and what to paint to the two-dimensional canvas that will be our image.
...And 5 more matches
Drawing shapes with canvas - Web APIs
each of these three functions takes the same
parameters.
... let's have a more detailed look at the arc method, which takes six
parameters: x and y are the coordinates of the center of the circle on which the arc should be drawn.
...the startangle and endangle
parameters define the start and end points of the arc in radians, along the curve of the circle.
...And 5 more matches
ConstantSourceNode.offset - Web APIs
the read-only offset property of the constantsourcenode interface returns a audio
param object indicating the numeric a-rate value which is always returned by the source when asked for the next sample.
... while the audio
param named offset is read-only, the value property within is not.
... so you can change the value of offset by setting the value of constantsourcenode.offset.value: myconstantsourcenode.offset.value = newvalue; syntax let offset
parameter = constantaudionode.offset; let offset = constantsourcenode.offset.value; constantsourcenode.offset.value = newvalue; value an audio
param object indicating the a-rate value returned for every sample by this node.
...And 5 more matches
HTMLInputElement.stepUp() - Web APIs
same day of the week: <input type="datetime-local" min="019-12-25t19:30" step="7"> number 1 0.1 increments <input type="number" min="0" step="0.1" max="10"> range 1 increments by 2: <input type="range" min="0" step="2" max="10"> the method, when invoked, changes the form control's value by the value given in the step attribute, multiplied by the
parameter, within the constraints set on the form control.
... the default value for the
parameter, if no value is passed, is 1.
... syntax element.stepup( [ stepincrement ] );
parameters stepincrement the optional stepincrement paremeter is a numeric value.
...And 5 more matches
IDBIndexSync - Web APIs
any add( in any value, in optional any key ) raises (idbdatabaseexception);
parameters returns exceptions this method can raise a idbdatabaseexception with the following code: value the value to store into the index.
... constraint_err if a record exists in this index with a key corresponding to the key
parameter or the index is auto-populated, or if no record exists with a key corresponding to the value
parameter in the index's referenced object store.
... any get ( in any key ) raises (idbdatabaseexception);
parameters key the key that identifies the record to be retrieved.
...And 5 more matches
Notification - Web APIs
notification.actions read only the actions array of the notification as specified in the constructor's options
parameter.
... notification.body read only the body string of the notification as specified in the constructor's options
parameter.
... notification.dir read only the text direction of the notification as specified in the constructor's options
parameter.
...And 5 more matches
RTCPeerConnection.setRemoteDescription() - Web APIs
the method takes a single
parameter—the session description—and it returns a promise which is fulfilled once the description has been changed, asynchronously.
... syntax apromise = rtcpeerconnection.setremotedescription(sessiondescription);
parameters sessiondescription an rtcsessiondescriptioninit or rtcsessiondescription which specifies the remote peer's current offer or answer.
... this value is an offer or answer received from the remote peer through your implementation of the sessiondescription
parameter is technically of type rtcsessiondescriptioninit, but because rtcsessiondescription serializes to be indistinguishable from rtcsessiondescriptioninit, you can also pass in an rtcsessiondescription.
...And 5 more matches
SubtleCrypto.decrypt() - Web APIs
it takes as arguments a key to decrypt with, some optional extra
parameters, and the data to decrypt (also known as "ciphertext").
... syntax const result = crypto.subtle.decrypt(algorithm, key, data);
parameters algorithm is an object specifying the algorithm to be used, and any extra
parameters as required.
... the values given for the extra
parameters must match those passed into the corresponding encrypt() call.
...And 5 more matches
WebGLRenderingContext.pixelStorei() - Web APIs
syntax void gl.pixelstorei(pname,
param);
parameters pname a glenum specifying which
parameter to set.
...
param a glint specifying a value to set the pname
parameter to.
... pixel storage
parameters
parameter name (for pname) description type default value allowed values (for
param) specified in gl.pack_alignment packing of pixel data into memory glint 4 1, 2, 4, 8 opengl es 2.0 gl.unpack_alignment unpacking of pixel data from memory.
...And 5 more matches
Migrating from webkitAudioContext - Web APIs
renaming of audio
param.settargetvalueattime the settargetvalueattime() method on the audio
param interface has been renamed to settargetattime().
...instead of setting a gain property directly on an audio source, you connect the source to a gain node and then control the gain using that node's gain
parameter.
... code using the activesourcecount attribute of the audiocontext, like this snippet: var src0 = context.createbuffersource(); var src1 = context.createbuffersource(); // set buffers and other
parameters...
...And 5 more matches
WritableStream.WritableStream() - Web APIs
syntax var writablestream = new writablestream(underlyingsink[, queuingstrategy]);
parameters underlyingsink an object containing methods and properties that define how the constructed stream instance will behave.
...the controller
parameter passed to this method is a writablestreamdefaultcontroller.
... write(chunk, controller) optional this method, also defined by the developer, will be called when a new chunk of data (specified in the chunk
parameter) is ready to be written to the underlying sink.
...And 5 more matches
Getting Started - Developer guides
at this stage, you need to tell the xmlhttp request object which javascript function will handle the response, by setting the onreadystatechange property of the object and naming it after the function to call when the request changes state, like this: httprequest.onreadystatechange = nameofthefunction; note that there are no parentheses or
parameters after the function name, because you're assigning a reference to the function, rather than actually calling it.
...}; next, after declaring what happens when you receive the response, you need to actually make the request, by calling the open() and send() methods of the http request object, like this: httprequest.open('get', 'http://www.example.org/some.file', true); httprequest.send(); the first
parameter of the call to open() is the http request method – get, post, head, or another method supported by your server.
... the second
parameter is the url you're sending the request to.
...And 5 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
a.join(sep) converts the array to a string — with values delimited by the sep
param a.pop() removes and returns the last item.
...a javascript function can take 0 or more named
parameters.
... the named
parameters turn out to be more like guidelines than anything else.
...And 5 more matches
The arguments object - JavaScript
description note: if you're writing es6 compatible code, then rest
parameters should be preferred.
...if you instead want to count how many
parameters a function is declared to accept, inspect that function's length property.
...for example: let listhtml = list('u', 'one', 'two', 'three'); /* listhtml is: "<ul><li>one</li><li>two</li><li>three</li></ul>" */ rest, default, and destructured
parameters the arguments object can be used in conjunction with rest, default, and destructured
parameters.
...And 5 more matches
Introduction to using XPath in JavaScript - XPath
var xpathresult = document.evaluate( xpathexpression, contextnode, namespaceresolver, resulttype, result );
parameters the evaluate function takes a total of five
parameters: xpathexpression: a string containing the xpath expression to be evaluated.
... return value returns xpathresult, which is an xpathresult object of the type specified in the resulttype
parameter.
...contextnode.documentelement : contextnode.ownerdocument.documentelement ); </pre> and then pass document.evaluate, the nsresolver variable as the namespaceresolver
parameter.
...And 5 more matches
ui/button/action - Archive of obsolete content
to set state like this, call state() with 2
parameters: the first
parameter is a window or tab object or as a shorthand, the string "window" for the currently active window, or the string "tab" for the currently active tab the second
parameter is an object containing the state properties you wish to update.
...
parameters options : object required options: name type id string the button's id.
... = actionbutton({ id: "default-label", label: "default label", icon: "./default.png", onclick: function(state) { if (button.label == "default label") { button.state(button, differentstate); } else { button.state(button, defaultstate); } console.log(button.state(button).label); console.log(button.state(button).icon); } });
parameters target : button, tab, window, string to set or get the global state, this needs to be the button instance.
...And 4 more matches
ui/button/toggle - Archive of obsolete content
to set state like this, call state() with 2
parameters: the first
parameter is a window or tab object or as a shorthand, the string "window" for the currently active window, or the string "tab" for the currently active tab the second
parameter is an object containing the state properties you wish to update.
...
parameters options : object required options: name type id string the button's id.
... = togglebutton({ id: "default-label", label: "default label", icon: "./default.png", onclick: function(state) { if (button.label == "default label") { button.state(button, differentstate); } else { button.state(button, defaultstate); } console.log(button.state(button).label); console.log(button.state(button).icon); } });
parameters target : button, tab, window, string to set or get the global state, this needs to be the button instance.
...And 4 more matches
Using microformats - Archive of obsolete content
add(name, definition);
parameters name the name of the microformat to add to the microformat module.
... var nummicroformats = microformats.count(name, rootelement, options);
parameters name the name of the microformat to count.
... var dumpstring = debug(microformatobject)
parameters microformatobject the microformat object to dump.
...And 4 more matches
Choosing the right approach - Learn web development
asynchronous callbacks generally found in old-style apis, involves a function being passed into another function as a
parameter, which is then invoked when an asynchronous operation has been completed, so that the callback can in turn do something with the result.
... 4 full support 52notes notes setinterval now defined on windoworworkerglobalscope mixin.opera android full support 10.1safari ios full support 1samsung internet android full support 3.0supports
parameters for callbackchrome full support yesedge full support 12firefox full support yesie full support 10opera full support yessafari ?
... 4 full support 52notes notes setinterval now defined on windoworworkerglobalscope mixin.opera android full support 10.1safari ios full support 1samsung internet android full support 3.0supports
parameters for callbackchrome full support yesedge full support 12firefox full support yesie full support 10opera full support yessafari ?
...And 4 more matches
Gecko info for Windows accessibility vendors
the return value numattribs specifies the number of attributes for this node, and the last 3
parameters return 3 arrays corresponding to attribute name, namespace id, and attribute value.
... hresult get_attributes( /* [in] */ unsigned short maxattribs, /* [out] */ bstr *attribnames, /* [out] */ short *namespaceid, /* [out] */ bstr *attribvalues, /* [out] */ unsigned short *numattribs); a variation on this method is get_attributesfornames, which lets turns the attribnames array into an [in]
parameter, letting you specify only those attributes you're interested in.
...the return value numstyleproperties specifies the number of style properties for this node, and the last 2
parameters return 2 arrays corresponding to style property name and style property value.
...And 4 more matches
Download
promise start();
parameters none.
... promise launch();
parameters none.
... promise showcontainingdirectory();
parameters none.
...And 4 more matches
DownloadList
promise<array<download>> getall();
parameters none.
...promise add( download adownload );
parameters adownload the download object to add.
...promise remove( download adownload );
parameters adownload the download object to remove.
...And 4 more matches
Http.jsm
httprequest supports the following
parameters: name meaning headers an array of headers postdata this can be: a string: send it as is an array of
parameters: encode as form values null/undefined: no post data.
... onload a function handle to call when the load is complete, it takes two
parameters: the responsetext and the xhr object.
... onerror a function handle to call when an error occurs, it takes three
parameters: the error, the responsetext and the xhr object.
...And 4 more matches
Promise
new promise(executor);
parameters executor this function is invoked immediately with the resolving functions as its two arguments: executor(resolve, reject); the constructor will not return until the executor has completed.
... void resolve( avalue );
parameters avalue optional if this value is not a promise, including undefined, it becomes the fulfillment value of the associated promise.
... void reject( areason );
parameters areason optional the rejection reason for the associated promise.
...And 4 more matches
PR_Seek
syntax #include <prio.h> print32 pr_seek( prfiledesc *fd, print32 offset, prseekwhence whence);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object.
... offset a value, in bytes, used with the whence
parameter to set the file pointer.
... whence a value of type prseekwhence that specifies how to interpret the offset
parameter in setting the file pointer associated with the fd
parameter.
...And 4 more matches
NSS 3.21 release notes
ded master secret extension (rfc 7627) is supported (bug 1117022) new info functions added for use during mid-handshake callbacks (bug 1084669) new functions in nss.h nss_optionset - sets nss global options nss_optionget - gets the current value of nss global options in secmod.h secmod_createmoduleex - create a new secmodmodule structure from module name string, module
parameters string, nss specific
parameters string, and nss configuration
parameter string.
...the difference with secmod_createmodule is the new function handles nss configuration
parameter strings.
... signature and hash algorithms for tls ssl_signatureprefget - retrieves the currently configured signature and hash algorithms ssl_signaturemaxcount - obtains the maximum number signature algorithms that can be configured with ssl_signatureprefset in utilpars.h nssutil_argparsemodulespecex - takes a module spec and breaks it into shared library string, module name string, module
parameters string, nss specific
parameters string, and nss configuration
parameter strings.
...And 4 more matches
NSS API Guidelines
for example: pk11rsagen
paramsstr.keysizeinbits for members of enums, our current api has no standard (typedefs for enums should follow the data types standard).
... examples: pk11_slotgetseries(), pk11_symkeygetseries(), cert_certificateextractpublickey()
parameter ordering most functions will have a 'natural' ordering for
parameters.
... to keep consistency we should have some minimal
parameter consistency.
...And 4 more matches
Introduction to the JavaScript shell
note: clear() with no
parameters really clears everything.
... gc
param(name[, value]) added in spidermonkey 1.8 read or configure garbage collector
parameters.
... the name must be one of the
parameter keys (such as 'maxbytes', 'maxmallocbytes' or 'gcnumber') defined by for_each_gc_
param in https://searchfox.org/mozilla-central/source/js/src/builtin/testingfunctions.cpp#464.
...And 4 more matches
Accessing the Windows Registry Using XPCOM
if you want to create a new key, you can use the create() method, which takes the same
parameters as open().
... both of these methods take a root key as the first
parameter.
... from javascript, you will want to use the named constants on the interface for this
parameter.
...And 4 more matches
IAccessibleAction
[propget] hresult description( [in] long actionindex, [out] bstr description );
parameters actionindex 0 based index specifying which action's description to return.
...hresult doaction( [in] long actionindex );
parameters actionindex 0 based index specifying the action to perform.
...[propget] hresult keybinding( [in] long actionindex, [in] long nmaxbindings, [out, size_is(,nmaxbindings), length_is(, nbindings)] bstr keybindings, [out] long nbindings );
parameters actionindex 0 based index specifying which action's key bindings should be returned.
...And 4 more matches
IAccessibleEditableText
hresult copytext( [in] long startoffset, [in] long endoffset );
parameters startoffset start index of the text to moved into the clipboard.
...hresult cuttext( [in] long startoffset, [in] long endoffset );
parameters startoffset start index of the text to be deleted.
...hresult deletetext( [in] long startoffset, [in] long endoffset );
parameters startoffset start index of the text to be deleted.
...And 4 more matches
nsIAbCard
allowremotecontent boolean allow remote content to be displayed in html mail received from this contact methods getcardvalue() astring getcardvalue(in string name)
parameters name the attribute you want the value for.
... setcardvalue() void setcardvalue(in string attrname, in astring value)
parameters attrname the attribute you want to set.
... void copy(in nsiabcard srccard)
parameters srccard the source card to copy values from.
...And 4 more matches
nsIAccessibleEditableText
void copytext( in long startpos, in long endpos );
parameters startpos start offset of the text to be copied into the clipboard.
... void cuttext( in long startpos, in long endpos );
parameters startpos start offset of the text to be deleted and copied to clipboard.
... void deletetext( in long startpos, in long endpos );
parameters startpos start offset of the text to be deleted.
...And 4 more matches
nsIAccessibleSelectable
void addchildtoselection( in long index );
parameters index the zero-based accessible child index.
...void clearselection();
parameters none.
...nsiarray getselectedchildren();
parameters none.
...And 4 more matches
nsIAutoCompleteInput
search
param astring an additional
parameter used for configuring searches.
...acstring getsearchat( in unsigned long index );
parameters index the index number of the search session object whose name is to be returned.
...void onsearchbegin();
parameters none.
...And 4 more matches
nsIChannel
inherits from: nsirequest last changed in gecko 19.0 (firefox 19.0 / thunderbird 19.0 / seamonkey 2.16) once a channel is created (via nsiioservice.newchannel()),
parameters for that request may be set by using the channel attributes, or by calling queryinterface() to retrieve a subclass of nsichannel for protocol-specific
parameters.
... note: as of gecko 19.0, this
parameter changed from long to int64_t.
...a value assigned to this attribute will be parsed and normalized as follows: any
parameters (delimited with a ';') will be stripped.
...And 4 more matches
nsIClipboard
void emptyclipboard( in long awhichclipboard );
parameters awhichclipboard specifies the clipboard to which this operation applies.
... void forcedatatoclipboard( in long awhichclipboard );
parameters awhichclipboard specifies the clipboard to which this operation applies.
... void getdata( in nsitransferable atransferable, in long awhichclipboard );
parameters atransferable the transferable to receive data from the clipboard.
...And 4 more matches
nsIComponentManager
void addbootstrappedmanifestlocation( in interface nsilocalfile alocation );
parameters alocation the directory or xpi from which to load the chrome.manifest.
...(see also nsifactory.createinstance.) void createinstance( in nscidref aclass, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result );
parameters aclass the classid of the object instance that is being requested.
... void createinstancebycontractid( in string acontractid, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result );
parameters acontractid the contractid of the object instance that is being requested.
...And 4 more matches
nsIConsoleService
void getmessagearray( [array, size_is(count)] out nsiconsolemessage messages, out pruint32 count );
parameters messages an array of logged messages.
... void getmessagearray( [optional] out pruint32 count, [retval, array, size_is(count)] out nsiconsolemessage messages );
parameters count the number of messages in the array.
... logmessage() void logmessage( in nsiconsolemessage message );
parameters message the nsiconsolemessage to log.
...And 4 more matches
nsIDOMGeoGeolocation
void clearwatch( in unsigned short watchid );
parameters none.
...void getcurrentposition( in nsidomgeopositioncallback successcallback, [optional] in nsidomgeopositionerrorcallback errorcallback, [optional] in nsidomgeopositionoptions options );
parameters successcallback an nsidomgeopositioncallback to be called when the current position is available.
... errorcallback an nsidomgeopositionerrorcallback that is called if an error occurs while retrieving the position; this
parameter is optional.
...And 4 more matches
nsIDOMWindow
nsidomcssstyledeclaration getcomputedstyle( in nsidomelement elt, in domstring pseudoelt optional );
parameters elt pseudoelt optional return value getselection() returns the nsiselection object indicating what if any content is currently selected in the window.
... nsiselection getselection();
parameters none.
... void scrollby( in long xscrolldif, in long yscrolldif );
parameters xscrolldif the number of pixels by which to scroll horizontally.
...And 4 more matches
nsIEditorMailSupport
nsisupportsarray getembeddedobjects();
parameters none.
...nsidomnode insertascitedquotation( in astring aquotedtext, in astring acitation, in boolean ainserthtml );
parameters aquotedtext the actual text to be quoted.
...nsidomnode insertasquotation( in astring aquotedtext );
parameters aquotedtext the actual text to be quoted.
...And 4 more matches
nsIFormHistory2
void addentry( in astring name, in astring value );
parameters name value entryexists() gets whether a name and value pair exists in the form history.
... boolean entryexists( in astring name, in astring value );
parameters name value return value nameexists() returns true if there is no entry that is paired with a name.
... boolean nameexists( in astring name );
parameters name return value removeallentries() removes all entries in the entire form history.
...And 4 more matches
nsIInstallLocation
astring getidforlocation( in nsifile file );
parameters file the location where an item might live.
...nsifile getitemfile( in astring id, in astring path );
parameters id the guid of the item.
...nsifile getitemlocation( in astring id );
parameters id the guid of the item.
...And 4 more matches
nsIJetpack
);
parameters amessagename the name of the message to send.
...void registerreceiver( in astring amessagename, in jsval areceiver );
parameters amessagename the name of the message from the jetpack process on which the callback is triggered.
... unregisterreceiver() this unregisters a callback previously registered with registerreceiver() void unregisterreceiver( in astring amessagename, in jsval areceiver );
parameters amessagename the name of the message on which the callback should no longer be triggered.
...And 4 more matches
nsILocaleService
nsilocale getapplicationlocale();
parameters none.
...astring getlocalecomponentforuseragent();
parameters none.
...nsilocale getlocalefromacceptlanguage( in string acceptlanguage );
parameters acceptlanguage locale preference in the same format as the accept-language http header.
...And 4 more matches
nsIMemory
voidptr alloc( in size_t size );
parameters size the size of the block to allocate.
... void free( in voidptr ptr );
parameters ptr the address of the memory block to free.
... void heapminimize( in boolean immediate );
parameters immediate if true, heap minimization will occur immediately if the call was made on the main thread.
...And 4 more matches
nsIMemoryReporterManager
nsisimpleenumerator enumeratemultireporters();
parameters none.
...nsisimpleenumerator enumeratereporters();
parameters none.
...void init();
parameters none.
...And 4 more matches
nsIPlacesImportExportService
void backupbookmarksfile();
parameters none.
... void exporthtmltofile( in nsilocalfile afile );
parameters afile an nsilocalfile indicating where to save the new bookmarks.html file.
...observers will be passed through their data
parameters either "html" if aisinitialimport is false or "html-initial" if aisinitialimport is true.
...And 4 more matches
nsIPrefService
nsiprefbranch getbranch( in string aprefroot );
parameters aprefroot the preference root tree on which to base this branch.
... nsiprefbranch getdefaultbranch( in string aprefroot );
parameters aprefroot the preference root tree on which to base this branch.
... note: if nsnull is passed in for the afile
parameter the default preferences file(s) [prefs.js, user.js] will be read and processed.
...And 4 more matches
nsIProfile
void cloneprofile( in wstring profilename );
parameters profilename the name to assign to the new clone of the current profile.
...void createnewprofile( in wstring profilename, in wstring nativeprofiledir, in wstring langcode, in boolean useexistingdir );
parameters profilename the name to assign to the new profile.
...void deleteprofile( in wstring name, in boolean candeletefiles );
parameters name the name of the profile to delete.
...And 4 more matches
nsIServerSocket
void asynclisten( in nsiserversocketlistener alistener );
parameters alistener the listener to be notified when client connections are accepted.
... void close();
parameters none.
... prnetaddr getaddress();
parameters none.
...And 4 more matches
nsIUpdatePrompt
void checkforupdates();
parameters none.
...void showupdateavailable( in nsiupdate update );
parameters update an nsiupdate describing the update that's available.
...void showupdatedownloaded( in nsiupdate update, in boolean background optional );
parameters update an nsiupdate describing the update that was downloaded.
...And 4 more matches
nsIWebBrowserPersist
void cancelsave();
parameters none.
... void savechannel( in nsichannel achannel, in nsisupports afile );
parameters achannel the nsichannel to save to a file.
... void savedocument( in nsidomdocument adocument, in nsisupports afile, in nsisupports adatapath, in string aoutputcontenttype, in unsigned long aencodingflags, in unsigned long awrapcolumn );
parameters adocument document to save to file.
...And 4 more matches
nsIWebProgress
constants the following flags may be combined to form the anotifymask
parameter for the addprogresslistener() method.
... constant value description notify_state_request 0x00000001 only receive the nsiwebprogresslistener.onstatechange() event if the astateflags
parameter includes nsiwebprogresslistener::state_is_request.
... notify_state_document 0x00000002 only receive the nsiwebprogresslistener.onstatechange() event if the astateflags
parameter includes nsiwebprogresslistener::state_is_document.
...And 4 more matches
Setting HTTP request headers
(this variable could have been named anything though.) the setrequestheader method takes 3
parameters.
... the first
parameter is the name of the http request header.
... the second
parameter is the value of the http request header.
...And 4 more matches
Web Audio Editor - Firefox Developer Tools
within that context they then construct a number of audio nodes, including: nodes providing the audio source, such as an oscillator or a data buffer source nodes performing transformations such as delay and gain nodes representing the destination of the audio stream, such as the speakers each node has zero or more audio
param properties that configure its operation.
...you can then examine and edit the audio
param properties for each node in the graph.
... some non-audio
param properties, like an oscillatornode's type property, are displayed, and you can edit these as well.
...And 4 more matches
AudioBuffer() - Web APIs
syntax var audiobuffer = new audiobuffer(options);
parameters inherits
parameters from the audionodeoptions dictionary.
... deprecated
parameters context a reference to an audiocontext.
... this
parameter was removed from the spec.
...And 4 more matches
AudioNode.disconnect() - Web APIs
syntax audionode.disconnect(); audionode.disconnect(output); audionode.disconnect(destination); audionode.disconnect(destination, output); audionode.disconnect(destination, output, input); return value undefined
parameters there are several versions of the disconnect() method, which accept different combinations of
parameters to control which nodes to disconnect from.
... if no
parameters are provided, all outgoing connections are disconnected.
... destination optional an audionode or audio
param specifying the node or nodes to disconnect from.
...And 4 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
* * @
param nod a node implementing the |characterdata| interface (i.e., * a |text|, |comment|, or |cdatasection| node * @return true if all of the text content of |nod| is whitespace, * otherwise false.
... * * @
param nod an object implementing the dom1 |node| interface.
... (normally |previoussibling| is a property * of all dom nodes that gives the sibling node, the node that is * a child of the same parent, that occurs immediately before the * reference node.) * * @
param sib the reference node.
...And 4 more matches
FileSystemDirectoryEntry.getDirectory() - Web APIs
syntax filesystemdirectoryentry.getdirectory([path][, options][, successcallback][, errorcallback]);
parameters path optional a usvstring representing an absolute path or a path relative to the directory on which the method is called, describing which directory entry to return.
...the method receives a single
parameter: the filesystemdirectoryentry object representing the directory in question.
...receives as its sole input
parameter a fileerror object describing the error which occurred.
...And 4 more matches
FileSystemDirectoryEntry.getFile() - Web APIs
syntax filesystemdirectoryentry.getfile([path][, options][, successcallback][, errorcallback]);
parameters path optional a usvstring specifying the path, relative to the directory on which the method is called, describing which file's entry to return.
...the method receives a single
parameter: the filesystemfileentry object representing the file in question.
...receives as its sole input
parameter a fileerror object describing the error which occurred.
...And 4 more matches
FileSystemEntrySync - Web APIs
[ todo: specify what kind of metadata ] metadata getmetada () raises (fileexception);
parameter none returns metadata exceptions this method can raise a fileexception with the following codes: exception description not_found_err the entry does not exist.
...you can keep it in the same location and then define the newname
parameter.
... filesystementrysync moveto ( in directoryentrysync parent, optional domstring newname ) raises (fileexception);
parameters parent the directory to which to move the entry.
...And 4 more matches
PannerNode - Web APIs
the orientation and position value are set and retrieved using different syntaxes, since they're stored as audio
param values.
...while this audio
param cannot be directly changed, its value can be altered using its value property.
...while this audio
param cannot be directly changed, its value can be altered using its value property.
...And 4 more matches
SVGTransform - Web APIs
methods name & arguments return description setmatrix(in svgmatrix matrix) void sets the transform type to svg_transform_matrix, with
parameter matrix defining the new transformation.
... note that the values from the
parameter matrix are copied.
... settranslate(in float tx , in float ty) void sets the transform type to svg_transform_translate, with
parameters tx and ty defining the translation amounts.
...And 4 more matches
WebGL2RenderingContext - Web APIs
state information webgl2renderingcontext.getindexed
parameter() returns the indexed value for the given target.
... renderbuffers webgl2renderingcontext.getinternalformat
parameter() returns information about implementation-dependent support for internal formats.
... webgl2renderingcontext.getquery
parameter() returns information about a query.
...And 4 more matches
Window.open() - Web APIs
syntax var window = window.open(url, windowname, [windowfeatures]);
parameters url a domstring indicating the url of the resource to be loaded.
...the url
parameter specifies the url to be fetched and loaded in the new window.
...if windowname does not specify an existing window and the windowfeatures
parameter is not provided (or if the windowfeatures
parameter is an empty string), then the new secondary window will render the default toolbars of the main window.
...And 4 more matches
font-variant-alternates - CSS: Cascading Style Sheets
tation(user-defined-ident); font-variant-alternates: swash(ident1) annotation(ident2); /* global values */ font-variant-alternates: initial; font-variant-alternates: inherit; font-variant-alternates: unset; the @font-feature-values at-rule can define names for alternative glyph functions (stylistic, styleset, character-variant, swash, ornament or annotation), associating the name with opentype
parameters.
...the
parameter is a font-specific name mapped to a number.
...the
parameter is a font-specific name mapped to a number.
...And 4 more matches
Content-Disposition - HTTP
the content-disposition header is defined in the larger context of mime messages for e-mail, but only a subset of the possible
parameters apply to http forms and post requests.
... header type response header (for the main body) general header (for a subpart of a multipart body) forbidden header name no syntax as a response header for the main body the first
parameter in the http context is either inline (default value, indicating it can be displayed inside the web page, or as the web page) or attachment (indicating it should be downloaded; most browsers presenting a 'save as' dialog, prefilled with the value of the filename
parameters if present).
... content-disposition: inline content-disposition: attachment content-disposition: attachment; filename="filename.jpg" as a header for a multipart body the first
parameter in the http context is always form-data.
...And 4 more matches
Promise() constructor - JavaScript
syntax new promise(executor)
parameters executor a function to be executed by the constructor, during the process of constructing the promiseobj.
... the invocation of resolutionfunc includes a value
parameter.
...the value received by promiseobj.then() is passed to the invocation of handlefulfilled as an input
parameter (see "chained promises" section).
...And 4 more matches
String.prototype.replaceAll() - JavaScript
parameters regexp (pattern) a regexp object or literal with the global flag.
... newsubstr (replacement) the string that replaces the substring specified by the specified regexp or substr
parameter.
... a number of special replacement patterns are supported; see the "specifying a string as a
parameter" section below.
...And 4 more matches
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
using the xsltprocessor.get
parameter() method, the code can figure whether to sort in ascending or descending order.
... it defaults to ascending if the
parameter is empty (the first time the sorting happens, as there is no value for it in the xslt file).
... the sorting value is set using xsltprocessor.set
parameter().
...And 4 more matches
panel - Archive of obsolete content
parameters options : object optional options: name type width number the width of the panel in pixels.
...
parameters message : value the message to send.
...
parameters options : object optional options: name type width number the width of the panel in pixels.
...And 3 more matches
places/bookmarks - Archive of obsolete content
parameters options : object required options: name type title string the title for the bookmark.
...
parameters options : object required options: name type title string the title for the group.
...
parameters options : object optional options: name type group group the parent group that the bookmark group lives under.
...And 3 more matches
ui/frame - Archive of obsolete content
once created, the frame needs to be added to a toolbar for it to be visible: var { frame } = require("sdk/ui/frame"); var { toolbar } = require("sdk/ui/toolbar"); var frame = new frame({ url: "./frame.html" }); var toolbar = toolbar({ name: "my-toolbar", title: "my toolbar", items: [frame] });
parameters options : object required options: name type url url, string a url pointing to the html file specifying the frame's content.
...
parameters message : string the message to send.
...igin: frame.postmessage("ping", frame.url); on(event, listener) assign a listener to a frame event: var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); frame.on("message", pong) function pong(e) { if (e.data == "ping") { // message only the sender, and not any frames attached to other browser windows e.source.postmessage("pong", "*"); } }
parameters event : string the name of the event to listen to.
...And 3 more matches
ui/toolbar - Archive of obsolete content
the only mandatory option is title, but for the toolbar to contain any actual content, the items
parameter must also be supplied, and must contain at least object.
...s: var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); var toolbar = toolbar({ title: "my toolbar", items: [frame], hidden: true, onshow: showing, onhide: hiding }); function showing(e) { console.log("showing"); console.log(e); } function hiding(e) { console.log("hiding"); console.log(e); }
parameters options : object required options: name type title string the toolbar's title.
...an event: var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); var toolbar = toolbar({ title: "my toolbar", items: [frame] }); toolbar.on("show", showing); toolbar.on("hide", hiding); function showing(e) { console.log("showing: " + e.title); } function hiding(e) { console.log("hiding: " + e.title); }
parameters event : string the name of the event to listen to.
...And 3 more matches
Installing Extensions and Themes From Web Pages - Archive of obsolete content
web script example <script type="application/javascript"> <!-- function install (aevent) { for (var a = aevent.target; a.href === undefined;) a = a.parentnode; var
params = { "foo": { url: aevent.target.href, iconurl: aevent.target.getattribute("iconurl"), hash: aevent.target.getattribute("hash"), tostring: function () { return this.url; } } }; installtrigger.install(
params); return false; } //--> </script> <a href="http://www.example.com/foo.xpi" iconurl="http://www.example.com/foo.png" hash="sha1:28857e...
...users can save the xpi file to disk easily by right clicking on the link and choosing "save link as..." when the link is clicked it calls the function install passing the event object as the
parameter.
... the install first creates a
parameter block: var
params = { "foo": { url: aevent.target.href, iconurl: aevent.target.getattribute("iconurl"), hash: aevent.target.getattribute("hash"), tostring: function () { return this.url; } }; this specifies the display name (foo) for use in the confirmation dialog, the url to the extension (which is the link href, recall), the icon url to display in the confirmation dialog, a hash of the xpi file contents (to protect against corrupted downloads), and a tostring function which will allow this code to work with versions of firefox 0.8 and earlier.
...And 3 more matches
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
usage insert some html like this into your content: <object classid="clsid:dbb2de32-61f1-4f7f-beb8-a37f5bc24ee2" width="500" height="300"> <
param name="type" value="video/quicktime"/> <
param name="src" value="http://www.foobar.com/some_movie.mov"/> <!-- custom arguments --> <
param name="loop" value="true"/> </object> the classid attribute tells ie to create an instance of the plug-in hosting control, the width and height specify the dimensions in pixels.
...the following <embed> attributes have <
param> tag equivalents: <
param name="type" ...> is equivalent to typespecifies the mime type of the plug-in.
... <
param name="src" ...> is equivalent to srcspecifies an url for the initial stream of data to feed the plug-in.
...And 3 more matches
Nanojit - Archive of obsolete content
fragment *f = fragmento->getanchor((void *)0xdeadbeef); f->lirbuf = buf; f->root = f; // create a lir writer lirbufwriter out(buf); // write a few lir instructions to the buffer: add the first
parameter // to the constant 2.
... out.ins0(lir_start); lins *two = out.insimm(2); lins *first
param = out.ins
param(0, 0); lins *result = out.ins2(lir_add, first
param, two); out.ins1(lir_ret, result); // emit a lir_loop instruction.
... typedef js_fastcall int32_t (*addtwofn)(int32_t); addtwofn fn = reinterpret_cast<addtwofn>(f->code()); printf("2 + 5 = %d\n", fn(5)); return 0; } code explanation interesting part are the lines 46-50: // write a few lir instructions to the buffer: add the first
parameter // to the constant 2.
...And 3 more matches
Index - Archive of obsolete content
24 autocompletesearch
param xul attributes, xul reference no summary!
...(this one has no post data
parameter, see loaduriwithflags for a version that does) 531 loaduriwithflags xul methods, xul reference (see nsiwebnavigation.loaduri() for details on the referrer and postdata
parameters.) 532 makeeditable xul methods, xul reference no summary!
... 814 search
param xul properties, xul reference no summary!
...And 3 more matches
loadOneTab - Archive of obsolete content
the rest of the
parameters are optional.
... this method works the same as addtab except for the loadinbackground
parameter which allows you to choose whether to open the new tab in foreground or background.
... there's also no owner
parameter as the owner tab is specified automatically.
...And 3 more matches
Providing Command-Line Options - Archive of obsolete content
extensions and xul applications can modify the way command line
parameters are handled by writing a component that implements the nsicommandlinehandler interface and registering it in a category.
... see also: xulrunner:commandline overview the code below is an example of writing a javascript xpcom component to handle command line
parameters.
... example the below example component implements two command line
parameters: firefox.exe -myapp opens a chrome window for my application.
...And 3 more matches
NPN_GetValue - Archive of obsolete content
syntax #include <npapi.h> nperror npn_getvalue(npp instance, npnvariable variable, void *value);
parameters this function has the following
parameters: instance pointer to the current plug-in instance.
...the value
parameter should point to a npbool, which will be set appropriately if the function returns nperr_no_error.
...the value
parameter should point to an npbool, which will be set appropriately if the function returns nperr_no_error.
...And 3 more matches
NPN NewStream - Archive of obsolete content
syntax #include <npapi.h> nperror npn_newstream(npp instance, npmimetype type, const char* target, npstream** stream);
parameters the function has the following
parameters: instance pointer to current plug-in instance.
...the mime
parameter is the mime type of the plug-in to create.
...the stream is returned in the stream
parameter.
...And 3 more matches
NPN_SetValue - Archive of obsolete content
syntax #include <npapi.h> nperror npn_setvalue(npp instance, nppvariable variable, void *value);
parameters the function has the following
parameters: instance pointer to the plugin instance setting the variable.
...to set windowless operation, call npn_setvalue with nppvpluginwindowbool as the variable
parameter and false as the value
parameter.
...to specify an opaque mode, the plugin calls npn_setvalue with nppvplugintransparentbool for the variable
parameter and false for the value
parameter.
...And 3 more matches
Windows Media in Netscape - Archive of obsolete content
this is the example: needs to be embedded in wiki page (can it just be put here?) <object id="playerex2" classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" height="200" width="200"> <
param name="uimode" value="full"> <
param name="autostart" value="true"> <
param name="url" value="media/preludesteel.wma"> your browser does not support the activex windows media player </object> the same markup (used above and shown below) will work in both ie and netscape 7.1.
... <object id="playerex2" classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" height="200" width="200"> <
param name="uimode" value="full" /> <
param name="autostart" value="true" /> <
param name="url" value="preludesteel.wma" /> your browser does not support the activex windows media player </object> the classid attribute references the clsid of windows media player 7 and above -- windows media player versions before 7 used a different clsid.
...the various
param elements that can be used and the functionalities behind them is best described by the windows media 9 series sdk.
...And 3 more matches
React interactivity: Events and state - Learn web development
handling form submission via callbacks inside the top of our app() component function, create a function named addtask() which has a single
parameter of name: function addtask(name) { alert(name); } next, we'll pass addtask() into <form /> as a prop.
... usestate() creates a piece of state for a component, and its only
parameter determines the initial value of that state.
...this function will have an id
parameter, but we're not going to use it yet.
...And 3 more matches
Addon
the dialog receives the addon object representing your add-on as a
parameter.
... void datadirectorycallback( in string path, in error error )
parameters path a string representation of the addon's data directory.
... void iscompatiblewith( in string appversion, in string platformversion )
parameters appversion an application version to test against platformversion a platform version to test against findupdates() starts an update check for this add-on.
...And 3 more matches
L10n Checks
options reference locale in the source and xpi modes you can change the default reference locale (en-us) by setting the -r
parameter, e.g.: check-l10n-completeness -r pl browser/locales/l10n.ini ../l10n/ de output mode you can change the look and feel of the output by setting the -o
parameter to 0 (tree; default), 1 (full tree) or 2 (full relative paths), e.g.: check-l10n-completeness -o 2 browser/locales/l10n.ini ../l10n/ de en-us in the locale directory in the source mode you can tell l10n checks to look for the en-us ...
...locale in the directory containing all other locales instead of the directory containing the source by setting the -l
parameter (useful for e.g.
... "kompozer"), e.g.: check-l10n-completeness -l browser/locales/l10n.ini ../l10n/ de compare every directory in the source mode you can tell l10n checks to compare every directory, not only the ones set in the all-locales file, by setting the -f
parameter (useful for e.g.
...And 3 more matches
PR_NormalizeTime
syntax #include <prtime.h> void pr_normalizetime ( prexplodedtime *time, prtime
paramfn
params);
parameters the function has these
parameters: time a pointer to a clock/calendar time in the prexplodedtime format.
...
params a time
parameter callback function.
... returns nothing; the time
parameter is altered by the callback function.
...And 3 more matches
Encrypt Decrypt MAC Keys As Session Objects
utfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *sec
param = pk11_
paramfromiv(ckm_aes_cbc, &ivitem); if (sec
param == null) { pr_fprintf(pr_stderr, "crypt failed : sec
param null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, sec
param); if (ctx == null) { pr_fprintf(pr_stderr, "crypt failed : can't create a context\n"); goto cleanup; } cleanup: if (sec
param) { ...
... secitem_freeitem(sec
param, pr_true); } return ctx; } /* * common encryption and decryption code */ secstatus crypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, unsigned char *in, unsigned int inlen) { secstatus rv; rv = pk11_cipherop(ctx, out, outlen, maxout, in, inlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "crypt failed : pk11_cipherop returned %d\n", rv); goto cleanup; } cleanup: if (rv != secsuccess) { return rv; } return secsuccess; } /* * decrypt */ secstatus decrypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, unsigned char *in, unsigned int inlen) { return crypt(ctx, out, outlen, maxout, in, inlen); } /* ...
...1context * encryptinit(pk11symkey *ek, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* * read cryptographic
parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; outbuf.type = sibuffer...
...And 3 more matches
Encrypt and decrypt MAC using token
utfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *sec
param = pk11_
paramfromiv(ckm_aes_cbc, &ivitem); if (sec
param == null) { pr_fprintf(pr_stderr, "crypt failed : sec
param null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, sec
param); if (ctx == null) { pr_fprintf(pr_stderr, "crypt failed : can't create a context\n"); goto cleanup; } cleanup: if (sec
param) { ...
... secitem_freeitem(sec
param, pr_true); } return ctx; } /* * common encryption and decryption code */ secstatus crypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, unsigned char *in, unsigned int inlen) { secstatus rv; rv = pk11_cipherop(ctx, out, outlen, maxout, in, inlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "crypt failed : pk11_cipherop returned %d\n", rv); goto cleanup; } cleanup: if (rv != secsuccess) { return rv; } return secsuccess; } /* * decrypt */ secstatus decrypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, unsigned char *in, unsigned int inlen) { return crypt(ctx, out, outlen, maxout, in, inlen); } /* ...
...1context * encryptinit(pk11symkey *ek, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* * read cryptographic
parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; outbuf.type = sibuffer...
...And 3 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
derr, "problem while vfy_update\n"); goto cleanup; } } rv = vfy_end(vfy); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (vfy) { vfy_destroycontext(vfy, pr_true); } return rv; } /* * write cryptographic
parameters to header file */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; const char *header; const char *trailer; switch (type) { case symkey: header = enckey_header; trailer = enckey_trailer; break; case mackey: header = mackey_h...
... pr_fprintf(outfile, "%s\n", header); pr_fprintf(outfile, "%s\n", buf); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; break; default: return secfailure; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * read cryptographic
parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv = secsuccess; prfiledesc* file = null; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char *header; char *trailer; ...
... return rv; } /* * generate the private key */ seckeyprivatekey * generateprivatekey(keytype keytype, pk11slotinfo *slot, int size, int publicexponent, const char *noise, seckeypublickey **pubkeyp, const char *pqgfile, secupwdata *pwdata) { ck_mechanism_type mechanism; secoidtag algtag; pk11rsagen
params rsa
params; void *
params; seckeyprivatekey *privkey = null; secstatus rv; unsigned char randbuf[blocksize + 1]; rv = generaterandom(randbuf, blocksize); if (rv != secsuccess) { fprintf(stderr, "error while generating the random numbers : %s\n", port_errortostring(rv)); goto cleanup; } pk11_...
...And 3 more matches
Encrypt Decrypt_MAC_Using Token
*/ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *sec
param = pk11_
paramfromiv(ckm_aes_cbc, &ivitem); if (sec
param == null) { pr_fprintf(pr_stderr, "crypt failed : sec
param null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, sec
param); if (ctx == null) { pr_fprintf(pr_stderr, "crypt failed : can't create a context\n"); goto cleanup; } cleanup: if (sec
param) { ...
... secitem_freeitem(sec
param, pr_true); } return ctx; } /* * common encryption and decryption code.
...1context * encryptinit(pk11symkey *ek, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* * read cryptographic
parameters from the header file.
...And 3 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
utfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *sec
param = pk11_
paramfromiv(ckm_aes_cbc, &ivitem); if (sec
param == null) { pr_fprintf(pr_stderr, "crypt failed : sec
param null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, sec
param); if (ctx == null) { pr_fprintf(pr_stderr, "crypt failed : can't create a context\n"); goto cleanup; } cleanup: if (sec
param) { ...
... secitem_freeitem(sec
param, pr_true); } return ctx; } /* * common encryption and decryption code */ secstatus crypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, unsigned char *in, unsigned int inlen) { secstatus rv; rv = pk11_cipherop(ctx, out, outlen, maxout, in, inlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "crypt failed : pk11_cipherop returned %d\n", rv); goto cleanup; } cleanup: if (rv != secsuccess) { return rv; } return secsuccess; } /* * decrypt */ secstatus decrypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, unsigned char *in, unsigned int inlen) { return crypt(ctx, out, outlen, maxout, in, inlen); } /* ...
...1context * encryptinit(pk11symkey *ek, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* * read cryptographic
parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; outbuf.type = sibuffer...
...And 3 more matches
NSS Sample Code sample2
*/ #include "nss.h" #include "pk11pub.h" /* example key & iv */ unsigned char gkey[] = {0xe8, 0xa7, 0x7c, 0xe2, 0x05, 0x63, 0x6a, 0x31}; unsigned char giv[] = {0xe4, 0xbb, 0x3b, 0xd3, 0xc3, 0x71, 0x2e, 0x58}; int main(int argc, char **argv) { ck_mechanism_type ciphermech; pk11slotinfo* slot = null; pk11symkey* symkey = null; secitem* sec
param = null; pk11context* enccontext = null; secitem keyitem, ivitem; secstatus rv, rv1, rv2; unsigned char data[1024], buf1[1024], buf2[1024]; int i, result_len, tmp1_outlen, tmp2_outlen; /* initialize nss * if your application code has already initialized nss, you can skip it * here.
...as unwrapped - which is what should be done * normally anyway - using raw keys isn't a good idea */ symkey = pk11_importsymkey(slot, ciphermech, pk11_originunwrap, cka_encrypt, &keyitem, null); if (symkey == null) { fprintf(stderr, "failure to import key into nss (err %d)\n", pr_geterror()); goto out; } /* set up the pkcs11 encryption
paramters.
... * when not using cbc mode, ivitem.data and ivitem.len can be 0, or you * can simply pass null for the iv
parameter in pk11_
paramfromiv func */ ivitem.type = sibuffer; ivitem.data = giv; ivitem.len = sizeof(giv); sec
param = pk11_
paramfromiv(ciphermech, &ivitem); if (sec
param == null) { fprintf(stderr, "failure to set up pkcs11
param (err %d)\n", pr_geterror()); goto out; } /* sample data we'll encrypt and decrypt */ strcpy(data, "encrypt me!"); fprintf(stderr, "clear data: %s\n", data); /* ========================= start section ============================= */ /* if using the the same key and iv over and over, stuff before this */ /* section and after this section needs to be done only once */ /* encrypt data into buf1...
...And 3 more matches
sample2
infile, ibuf, sizeof(ibuf))) > 0) { rv = vfy_update(vfy, ibuf, nb); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_update\n"); goto cleanup; } } rv = vfy_end(vfy); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (vfy) { vfy_destroycontext(vfy, pr_true); } return rv; } /* * write cryptographic
parameters to header file */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; const char *header; const char *trailer; switch (type) { case symkey: header = enckey_header; trailer = enckey_trailer; break; case mackey: header = mackey_header; trailer = mackey_trailer; break; case iv: header = iv_header; trailer = iv_trailer; break; case...
... = ns_sig_trailer; break; case lab: header = lab_header; trailer = lab_trailer; pr_fprintf(outfile, "%s\n", header); pr_fprintf(outfile, "%s\n", buf); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; break; default: return secfailure; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * read cryptographic
parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv = secsuccess; prfiledesc* file = null; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char *header; char *trailer; outbuf.type = sibuffer; file = pr_open(filename, pr_rdonly, 0); if (!file) { pr_fprintf(pr_stderr, "failed ...
...ecfailure; goto cleanup; } } } hextobuf(body, item, ishexdata); cleanup: if (file) { pr_close(file); } return rv; } /* * generate the private key */ seckeyprivatekey * generateprivatekey(keytype keytype, pk11slotinfo *slot, int size, int publicexponent, const char *noise, seckeypublickey **pubkeyp, const char *pqgfile, secupwdata *pwdata) { ck_mechanism_type mechanism; secoidtag algtag; pk11rsagen
params rsa
params; void *
params; seckeyprivatekey *privkey = null; secstatus rv; unsigned char randbuf[blocksize + 1]; rv = generaterandom(randbuf, blocksize); if (rv != secsuccess) { fprintf(stderr, "error while generating the random numbers : %s\n", port_errortostring(rv)); goto cleanup; } pk11_randomupdate(randbuf, blocksize); switch (keytype) { case rsakey: rsa
params.keysizeinbits = size; rsa
params.
...And 3 more matches
FC_Initialize
syntax ck_rv fc_initialize(ck_void_ptr pinitargs);
parameters pinitargs points to a ck_c_initialize_args structure.
... library
parameters should point to a string that contains the library
parameters.
... the library
parameters string has this format: "configdir='dir' certprefix='prefix1' keyprefix='prefix2' secmod='file' flags= " here are some examples.
...And 3 more matches
mozIStorageStatementWrapper
params mozistoragestatement
params the
parameters; these can be set in lieu of using the call notation on this.
... void initialize( in mozistoragestatement astatement );
parameters astatement the statement to be initialized.
... void reset();
parameters none.
...And 3 more matches
nsIAlertsService
void showalertnotification( in astring imageurl, in astring title, in astring text, in boolean textclickable, optional in astring cookie, optional in nsiobserver alertlistener, optional in astring name, optional in astring dir, optional in astring lang, optional in astring data, optional in nsiprincipal principal, optional in boolean inprivatebrowsing, optional );
parameters imageurl a url identifying the image to display in the notification alert.
...it must implement an observe() method that accepts three
parameters: subject: always null.
... data: the value of the cookie
parameter passed into the showalertnotification method.
...And 3 more matches
nsICRLManager
an dosilentdownload, in wstring crlkey); void reschedulecrlautoupdate(); boolean updatecrlfromurl(in wstring url, in wstring key); constants constant value description type_autoupdate_time_based 1 type_autoupdate_freq_based 2 methods computenextautoupdatetime() wstring computenextautoupdatetime( in nsicrlinfo info, in unsigned long autoupdatetype, in double noofdays );
parameters info autoupdatetype noofdays return value deletecrl() delete the crl.
... void deletecrl( in unsigned long crlindex );
parameters crlindex getcrls() get a list of crl entries in the db.
... nsiarray getcrls();
parameters none.
...And 3 more matches
nsICacheService
nsicachesession createsession( in string clientid, in nscachestoragepolicy storagepolicy, in boolean streambased );
parameters clientid specifies the name of the client using the cache.
... acstring createtemporaryclientid( in nscachestoragepolicy storagepolicy );
parameters storagepolicy the cache storage policy.
... void evictentries( in nscachestoragepolicy storagepolicy );
parameters storagepolicy the cache storage policy.
...And 3 more matches
nsICommandController
content/xul/document/public/nsicontroller.idlscriptable an enhanced controller interface that supports passing
parameters to commands.
...to create an instance, use: var commandcontroller = components.classes["@mozilla.org/embedcomp/base-command-controller;1"] .createinstance(components.interfaces.nsicommandcontroller); method overview void docommandwith
params(in string command, in nsicommand
params acommand
params); void getcommandstatewith
params( in string command, in nsicommand
params acommand
params); methods docommandwith
params() executes the specified command with a set of
parameters contained in an nsicommand
params object.
... void docommandwith
params( in string command, in nsicommand
params acommand
params );
parameters command the command to execute.
...And 3 more matches
nsIContentSecurityPolicy
boolean permitsancestry( in nsidocshell docshell );
parameters docshell containing the protected resource.
...void refinepolicy( in astring policystring, in nsiuri selfuri );
parameters policystring selfuri scanrequestdata() called after the content security policy object is created to fill in the appropriate request and request header information needed in case a report needs to be sent.
... void scanrequestdata( in nsihttpchannel achannel );
parameters achannel sendreports() manually triggers violation report sending given a uri and reason.
...And 3 more matches
nsICookieManager2
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 );
parameters ahost the host or domain for which the cookie is set.
... boolean cookieexists( in nsicookie2 acookie );
parameters acookie the cookie to look for.
... unsigned long countcookiesfromhost( in autf8string ahost );
parameters ahost the host string to look for, such as "google.com".
...And 3 more matches
nsIDOMOfflineResourceList
void mozadd( in domstring uri );
parameters uri the uri of the resource to add to the list.
... void mozhasitem( in domstring uri );
parameters uri the uri of the resource to check.
... domstring mozitem( in unsigned long index );
parameters index the index of the cached item whose uri should be returned.
...And 3 more matches
nsIDOMParser
when you create a domparser from a privileged script, you can pass
parameters to the constructor, more on that below.
...if the caller has universalxpconnect privileges, it can pass
parameters to new domparser().
... if fewer than three
parameters are passed, the remaining
parameters will default to null.
...And 3 more matches
nsIDOMXULElement
void blur();
parameters none.
...void click();
parameters none.
...void docommand();
parameters none.
...And 3 more matches
nsIDispatchSupport
void comvariant2jsval( in comvariantptr comvar, out jsval val );
parameters comvar the com variant to be converted.
...unsigned long gethostingflags( in string acontext );
parameters acontext return value isclassmarkedsafeforscripting() test if the specified class is marked safe for scripting.
... boolean isclassmarkedsafeforscripting( in nscidref cid, out boolean classexists );
parameters cid the nsid representation of the clsid to test.
...And 3 more matches
nsIDocumentLoader
methods clearparentdocloader() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void clearparentdocloader();
parameters none.
... createdocumentloader() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void createdocumentloader( out nsidocumentloader aninstance );
parameters aninstance destroy() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void destroy();
parameters none.
... fireonlocationchange() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void fireonlocationchange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri auri );
parameters awebprogress arequest auri fireonstatuschange() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void fireonstatuschange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage );
parameters awebprogress arequest astatus amessage native code only!getcontentviewercontainer obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)this feature is obsolete.
...And 3 more matches
nsIErrorService
string geterrorstringbundle( in short errormodule );
parameters errormodule the module for which the string bundle is registered.
...string geterrorstringbundlekey( in nsresult error );
parameters error the nsresult for which the string bundle key is to be retrieved.
...void registererrorstringbundle( in short errormodule, in string stringbundleurl );
parameters errormodule the module for which the string bundle is to be registered.
...And 3 more matches
nsIFileProtocolHandler
nsifile getfilefromurlspec( in autf8string url );
parameters url the url string to convert.
... autf8string geturlspecfromactualfile( in nsifile file );
parameters file the nsifile to convert.
...autf8string geturlspecfromdir( in nsifile file );
parameters file the nsifile to convert.
...And 3 more matches
nsIInputStream
unsigned long available();
parameters none.
... void close();
parameters none.
... isnonblocking() boolean isnonblocking();
parameters none.
...And 3 more matches
nsIMsgSearchTerm
nsigned long astatus); matchpriority boolean matchpriority(in nsmsgpriorityvalue priority); matchage boolean matchage(in prtime days); matchsize boolean matchsize(in unsigned long size); matchlabel boolean matchlabel(in nsmsglabelvalue alabelvalue); matchjunkstatus boolean matchjunkstatus(in string ajunkscore); matchjunkpercent /* * test search term match for junkpercent * * @
param ajunkpercent junkpercent for message (0-100, 100 is junk) * @return true if matches */ boolean matchjunkpercent(in unsigned long ajunkpercent); matchjunkscoreorigin /* * test search term match for junkscoreorigin * @
param ajunkscoreorigin who set junk score?
... * @
param ascopeterm scope of search * @
param aoffset offset of message in message store.
... * @
param alength length of message.
...And 3 more matches
nsIPlacesView
nsinavhistoryresultnode[] getdragableselection();
parameters none.
... nsinavhistoryresultnode[][] getremovableselectionranges();
parameters none.
... nsinavhistoryresult getresult();
parameters none.
...And 3 more matches
nsIPrintingPrompt
inherits from: nsisupports last changed in gecko 1.7 this interface is identical to nsipintingpromptservice but without the parent nsidomwindow
parameter.
...gesetup(in nsiprintsettings printsettings, in nsiobserver aobs); void showprintdialog(in nsiwebbrowserprint webbrowserprint, in nsiprintsettings printsettings); void showprogress(in nsiwebbrowserprint webbrowserprint, in nsiprintsettings printsettings, in nsiobserver opendialogobserver, in boolean isforprinting, out nsiwebprogresslistener webprogresslistener, out nsiprintprogress
params printprogress
params, out boolean notifyonopen); methods showpagesetup() shows the print progress dialog.
... void showpagesetup( in nsiprintsettings printsettings, in nsiobserver aobs );
parameters printsettings printsettings for page setup.
...And 3 more matches
nsIProgressEventSink
void onprogress( in nsirequest arequest, in nsisupports acontext, in unsigned long long aprogress, in unsigned long long aprogressmax );
parameters arequest the request being observed (may qi to nsichannel).
... acontext if arequest is a channel, then this
parameter is the listener context passed to nsichannel.asyncopen().
...void onstatus( in nsirequest arequest, in nsisupports acontext, in nsresult astatus, in wstring astatusarg );
parameters arequest the request being observed (may qi to nsichannel).
...And 3 more matches
nsIPushSubscription
void getkey( in domstring name, [optional] out uint32_t keylen, [array, size_is(keylen), retval] out uint8_t key );
parameters name the encryption key name.
... keylen and key are out
parameters.
... when called from javascript, nsipushsubscription.getkey() only takes name as a
parameter, and returns key.
...And 3 more matches
nsISHistory
void addshistorylistener( in nsishistorylistener alistener );
parameters alistener listener object to be notified for all page loads that initiate in session history.
...nsishentry getentryatindex( in long index, in boolean modifyindex );
parameters index the index value whose entry is requested.
... modifyindex a boolean flag that indicates if the current index of session history should be modified to the
parameter index.
...And 3 more matches
nsISHistoryListener
boolean onhistorygoback( in nsiuri abackuri );
parameters abackuri the uri of the session history entry being navigated to.
...boolean onhistorygoforward( in nsiuri aforwarduri );
parameters aforwarduri the uri of the session history entry being navigated to.
...boolean onhistorygotoindex( in long aindex, in nsiuri agotouri );
parameters aindex the index in session history of the entry to be loaded.
...And 3 more matches
nsIScreen
void getavailrect( out long left, out long top, out long width, out long height );
parameters left the left edge of the available screen rectangle.
...void getrect( out long left, out long top, out long width, out long height );
parameters left the left edge of the screen's rectangle.
...each call to this method must eventually be followed by a corresponding call to unlockminimumbrightness() with the same value for the brightness
parameter.
...And 3 more matches
nsISearchEngine
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void add
param(in astring name, in astring value, in astring responsetype); nsisearchsubmission getsubmission(in astring data, [optional] in astring responsetype, [optional] in astring purpose); boolean supportsresponsetype(in astring responsetype); attributes attribute type description alias astring an optional shortcut alias for the engine.
... methods add
param() adds a
parameter to the search engine's submission data.
...void add
param( in astring name, in astring value, in astring responsetype );
parameters name the name of the
parameter to add.
...And 3 more matches
nsISupportsArray
([const] in nsisupports aelement); violates the xpcom interface guidelines boolean replaceelementat(in nsisupports aelement, in unsigned long aindex); violates the xpcom interface guidelines boolean sizeto(in long asize); violates the xpcom interface guidelines methods violates the xpcom interface guidelines appendelements() boolean appendelements( in nsisupportsarray aelements );
parameters aelements return value clone() nsisupportsarray clone();
parameters none.
... return value compact() void compact();
parameters none.
... deleteelementat() void deleteelementat( in unsigned long aindex );
parameters aindex deletelastelement() void deletelastelement( in nsisupports aelement );
parameters aelement violates the xpcom interface guidelines elementat() nsisupports elementat( in unsigned long aindex );
parameters aindex return value enumeratebackwards() [notxpcom, noscript] boolean enumeratebackwards( in nsisupportsarrayenumfunc afunc, in voidptr adata );
parameters afunc adata return value enumerateforwards() [notxpcom, noscript] boolean enumerateforwards( in nsisupportsarrayenumfunc afunc, in voidptr adata );
parameters afunc adata return value violates the xpcom interface guidelines equals() boolean equals( [const] in nsisupportsarray other );
parameters other ...
...And 3 more matches
nsIURI
nsiuri clone();
parameters none.
... nsiuri cloneignoringref();
parameters none.
... boolean equals( in nsiuri other );
parameters other another nsiuri to compare to.
...And 3 more matches
nsIWebBrowserChrome
void destroybrowserwindow();
parameters none.
...void exitmodaleventloop( in nsresult astatus );
parameters astatus the result code to return from showasmodal().
...boolean iswindowmodal();
parameters none.
...And 3 more matches
nsIWebSocketListener
void onacknowledge( in nsisupports acontext, in pruint32 asize );
parameters acontext user defined context.
...void onbinarymessageavailable( in nsisupports acontext, in acstring amsg );
parameters acontext user defined context.
...void onmessageavailable( in nsisupports acontext, in autf8string amsg );
parameters acontext user defined context.
...And 3 more matches
nsIWinAppHelper
methods fixreg() obsolete since gecko 1.9 (firefox 3) invokes helper.exe with the /fixreg
parameter.
... note that this
parameter was never actually supported.
... void fixreg();
parameters none.
...And 3 more matches
Working with windows in chrome code
opening windows from a <script> in a window or an overlay to open a new window, we usually use a window.open or window.opendialog dom call, like this: var win = window.open("chrome://myextension/content/about.xul", "aboutmyextension", "chrome,centerscreen"); the first
parameter to window.open is the uri of the xul file that describes the window and its contents.
... the second
parameter is the window's name; the name can be used in links or forms as the target attribute.
... the third, and optional,
parameter is a list of special window features the window should have.
...And 3 more matches
Int64
int64 int64( value );
parameters value the value to assign the new 64-bit integer object.
... number compare( a, b );
parameters a the first value to compare.
... number hi( num );
parameters num the value whose high 32 bits are to be returned.
...And 3 more matches
UInt64
uint64 uint64( value );
parameters value the value to assign the new 64-bit unsigned integer object.
... number compare( a, b );
parameters a the first value to compare.
... number hi( num );
parameters num the value whose high 32 bits are to be returned.
...And 3 more matches
Plug-in Basics - Plugins
ple 1: nesting object elements <html> <head> <title>example 1: nesting object elements</title> <style type="text/css"> .myplugin { width: 470px; height: 231px; } </style> </head> <body><p> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,30,0" class="myplugin"> <
param name="movie" value="foo.swf"/> <
param name="quality" value="high"/> <
param name="salign" value="tl"/> <
param name="menu" value="0"/> <object data="foo_movie.swf" type="application/x-shockwave-flash" class="myplugin"/> <
param name="quality" value="high"/> <
param name="salign" value="tl"/> <
param name="menu" value="0"/> ...
... <object type="*" class="myplugin"> <
param name="pluginspage" value="http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash"/> </object> </object> </object> </p></body> </html> the outermost object element defines the classid; the first nested object uses the type value application/x-shockwave-flash to load the adobe flash plug-in, and the innermost object exposes a download page for users that do not already have the necessary plug-in.
... if the browser can handle the type-that is, if a plug-in exists for that type-then all elements and attributes up to the closing </object> element, except
param elements and other object elements, are filtered.
...And 3 more matches
AudioWorkletProcessor - Web APIs
this method gets called for each block of 128 sample-frames and takes input and output arrays and calculated values of custom audio
params (if they are defined) as
parameters.
... you can use inputs and audio
parameter values to fill the outputs array, which by default holds silence.
... optionally, if you want custom audio
params on your node, you can supply a
parameterdescriptors property as a static getter on the processor.
...And 3 more matches
Using images - Web APIs
in its most basic form it looks like this: drawimage(image, x, y) draws the canvasimagesource specified by the image
parameter at the coordinates (x, y).
... img.onload = function() { ctx.drawimage(img, 0, 0); ctx.beginpath(); ctx.moveto(30, 96); ctx.lineto(70, 66); ctx.lineto(103, 76); ctx.lineto(170, 15); ctx.stroke(); }; img.src = 'https://mdn.mozillademos.org/files/5395/backdrop.png'; } the resulting graph looks like this: screenshotlive sample scaling the second variant of the drawimage() method adds two new
parameters and lets us place scaled images on the canvas.
... drawimage(image, x, y, width, height) this adds the width and height
parameters, which indicate the size to which to scale the image when drawing it onto the canvas.
...And 3 more matches
ConstantSourceNode - Web APIs
in addition, it can be used like a constructible audio
param by automating the value of its offset or by connecting another node to it; see controlling multiple
parameters with constantsourcenode.
...the output's value is always the same as the value of the offset
parameter.
... properties inherits properties from its parent interface, audioscheduledsourcenode, and adds the following properties: offset an audio
param which specifies the value that this source continuously outputs.
...And 3 more matches
DynamicsCompressorNode() - Web APIs
syntax var dynamicscompressornode = new dynamicscompressornode(context, options)
parameters context a reference to an audiocontext.
...this
parameter is k-rate.
...this
parameter is k-rate.
...And 3 more matches
HTMLSelectElement.add() - Web APIs
syntax collection.add(item[, before]);
parameters item is an htmloptionelement or htmloptgroupelement before is optional and an element of the collection, or an index of type long, representing the item item should be inserted before.
... if this
parameter is null (or the index does not exist), the new element is appended to the end of the collection.
... document.createelement("option"); var opt2 = document.createelement("option"); opt1.value = "1"; opt1.text = "option: value 1"; opt2.value = "2"; opt2.text = "option: value 2"; sel.add(opt1, null); sel.add(opt2, null); /* produces the following, conceptually: <select> <option value="1">option: value 1</option> <option value="2">option: value 2</option> </select> */ the before
parameter is optional.
...And 3 more matches
Media Capabilities API - Web APIs
to test support, smoothness and power efficiency of a video or audio file, you define the media configuration you want to test, and then pass the audio or video configuration as the
parameter of the mediacapabilities interface's encodinginfo() and decodinginfo() methods.
... media capabilities dictionaries mediaconfiguration describes how video and audio configuration dictionaries must be configured, or defined, to be passed as a
parameter of the mediacapabilities.encodinginfo() and mediacapabilities.decodinginfo() methods.
... mediadecodingconfiguration defines the valid values for allowed types of media when the media configuration is submitted as the
parameter for mediacapabilities.decodinginfo().
...And 3 more matches
PaymentRequest.PaymentRequest() - Web APIs
syntax var paymentrequest = new paymentrequest(methoddata, details, [options]);
parameters methoddata contains an array of identifiers for the payment methods the merchant web site accepts and any associated payment method specific data.
...starting with more recent browsers, this
parameter is more generic than credit cards, it is a single domstring, and the meaning of the data
parameter changes with the supportedmethods.
...this
parameter contains the following fields: total the total amount of the payment request.
...And 3 more matches
RTCPeerConnection.addIceCandidate() - Web APIs
if the candidate
parameter is missing or a value of null is given when calling addicecandidate(), the added ice candidate is an "end-of-candidates" indicator.
... syntax apromise = pc.addicecandidate(candidate); addicecandidate(candidate, successcallback, failurecallback);
parameters candidate optional an object conforming to the rtcicecandidateinit dictionary, or an rtcicecandidate object; the contents of the object should be constructed from a message received over the signaling channel, describing a newly received ice candidate that's ready to be delivered to the local ice agent.
... if no candidate object is specified, or its value is null, an end-of-candidates signal is sent to the remote peer using the end-of-candidates a-line, formatted simply like this: a=end-of-candidates deprecated
parameters in older code and documentation, you may see a callback-based version of this function.
...And 3 more matches
ReadableStream.ReadableStream() - Web APIs
syntax var readablestream = new readablestream(underlyingsource[, queuingstrategy]);
parameters underlyingsource an object containing methods and properties that define how the constructed stream instance will behave.
...the controller
parameter passed to this method is a readablestreamdefaultcontroller or a readablebytestreamcontroller, depending on the value of the type property.
...the controller
parameter passed to this method is a readablestreamdefaultcontroller or a readablebytestreamcontroller, depending on the value of the type property.
...And 3 more matches
SubtleCrypto.deriveKey() - Web APIs
syntax const result = crypto.subtle.derivekey( algorithm, basekey, derivedkeyalgorithm, extractable, keyusages );
parameters algorithm is an object defining the derivation algorithm to use.
... to use ecdh, pass an ecdhkeyderive
params object.
... to use hkdf, pass an hkdf
params object.
...And 3 more matches
SubtleCrypto.encrypt() - Web APIs
it takes as its arguments a key to encrypt with, some algorithm-specific
parameters, and the data to encrypt (also known as "plaintext").
... syntax const result = crypto.subtle.encrypt(algorithm, key, data);
parameters algorithm is an object specifying the algorithm to be used and any extra
parameters if required: to use rsa-oaep, pass an rsaoaep
params object.
... to use aes-ctr, pass an aesctr
params object.
...And 3 more matches
Using textures in WebGL - Web APIs
turn off mips and set // wrapping to clamp to edge gl.tex
parameteri(gl.texture_2d, gl.texture_wrap_s, gl.clamp_to_edge); gl.tex
parameteri(gl.texture_2d, gl.texture_wrap_t, gl.clamp_to_edge); gl.tex
parameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); } }; image.src = url; return texture; } function ispowerof2(value) { return (value & (value - 1)) == 0; } the loadtexture() routine starts by creating a webgl texture object ...
... mipmapping and uv repeating can be disabled with tex
parameteri().
...gl.tex
parameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); // prevents s-coordinate wrapping (repeating).
...And 3 more matches
Advanced techniques: Creating and sequencing audio - Web APIs
each voice also has local controls, which allow you to manipulate the effects or
parameters particular to each technique we are using to create those voices.
...the gain node has one property: gain, which is of type audio
param.
... this is really useful — now we can start to harness the power of the audio
param methods on the gain value.
...And 3 more matches
JSON.stringify() - JavaScript
syntax json.stringify(value[, replacer[, space]])
parameters value the value to convert to a json string.
...if this
parameter is not provided (or is null), no white space is used.
...l.for('foo')]: 'foo' }, function(k, v) { if (typeof k === 'symbol') { return 'a symbol'; } }); // undefined // non-enumerable properties: json.stringify( object.create(null, { x: { value: 'x', enumerable: false }, y: { value: 'y', enumerable: true } }) ); // '{"y":"y"}' // bigint values throw json.stringify({x: 2n}); // typeerror: bigint value can't be serialized in json the replacer
parameter the replacer
parameter can be either a function or an array.
...And 3 more matches
Trailing commas - JavaScript
trailing commas (sometimes called "final commas") can be useful when adding new elements,
parameters, or properties to javascript code.
... javascript has allowed trailing commas in array literals since the beginning, and later added them to object literals (ecmascript 5) and most recently (ecmascript 2017) to function
parameters.
... var arr = [1, 2, 3,,,]; arr.length; // 5 objects starting with ecmascript 5, trailing commas in object literals are legal as well: var object = { foo: "bar", baz: "qwerty", age: 42, }; trailing commas in functions ecmascript 2017 allows trailing commas in function
parameter lists.
...And 3 more matches
Basic shapes - SVG: Scalable Vector Graphics
some of the
parameters that determine their position and size are given, but an element reference would probably contain more accurate and complete descriptions along with other properties that won't be covered in here.
...different elements correspond to different shapes and take different
parameters to describe the size and position of those shapes.
...the one on the right has its rx and ry
parameters set, giving it rounded corners.
...And 3 more matches
content/mod - Archive of obsolete content
for example, the following code applies a style to a content window, adding a border to all divs in page: var attachto = require("sdk/content/mod").attachto; var style = require("sdk/stylesheet/style").style; var style = style({ source: "div { border: 4px solid gray }" }); // assuming window points to the content page we want to modify attachto(style, window);
parameters modification : object the modification we want to apply to the target.
...detachfrom(style, window);
parameters modification : object the modification we want to remove from the target window : nsidomwindow the window to be modified.
...
parameters target : object the object for which we want to obtain the window represented or contained.
...And 2 more matches
io/text-streams - Archive of obsolete content
parameters inputstream : stream the backing stream, an nsiinputstream.
...
parameters outputstream : stream the backing stream, an nsioutputstream.
...
parameters numchars : number the number of characters to read.
...And 2 more matches
Bootstrapped extensions - Archive of obsolete content
void startup( data, reason );
parameters data a bootstrap data structure.
... void shutdown( data, reason );
parameters data a bootstrap data structure.
... void install( data, reason );
parameters data a bootstrap data structure.
...And 2 more matches
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
the (lossy)copy(ascii|utf8|16)to(ascii|utf8|16) do not accept character pointer
parameters.
...the equalsignorecase method does not take a length
parameters.
...instead of passing getter_copies(astring) to a method expecting a character pointer out
parameter, you will need to use a temporary variable and copy the result.missing headers some headers are included from idl files only when mozilla_internal_api is defined (actually, they shouldn't be there at all).
...And 2 more matches
Promises - Archive of obsolete content
yield db.executetransaction(function* () { for (let node of nodes) // insert the node's data, using an automatically-cached, // pre-compiled statement, and
parameter placeholders.
... yield db.executecached( "insert into nodes (id, owner, key, value) \ values (:id, :owner, :key, :value);", {
params: { id: node.id, owner: node.owner.id, key: node.key, value: node.value }}); }); // perform a bulk update.
... * * @
param {string} the basename of the file.
...And 2 more matches
Modularization techniques - Archive of obsolete content
out
parameters functions that return a new interface should call addref() on that interface before returning it.
... in
parameters and local pointers interfaces that are passed in to a function and local copies of that interface pointer are assumed to be in the lifetime of the calling function, and do not need to have addref() called.
... nsresult tweekfoo(ifoo *afoo1, ifoo *afoo2) { ifoo local = afoo; if (afoo->bar() == ns_ok) { local = afoo2; } return local->boff(); } in-out
parameters in-out
parameters are used as both in
parameters and out
parameters.
...And 2 more matches
Configuration - Archive of obsolete content
configuration a webapp profile is a simple, ini-style text file that specifies some
parameters about a webapp.
...the
parameters also control some of the features of the prism host window.
... here is the list of
parameters: id the unique name of this web application.
...And 2 more matches
Elements - Archive of obsolete content
method <!entity % method-content "(
parameter*,body?)"> <!element method %method-content;> <!attlist method id id #implied name cdata #required type cdata #implied > the method element is used to describe a single method of a binding implementation.
... example <method name="scrollto"> <
parameter name="index"/> <body> this.setattribute("scrollpos", index); </body> </method>
parameter <!element
parameter empty> <!attlist
parameter id id #implied name cdata #required > the
parameter element is used inside a method element.
... it represents a single
parameter of a method.
...And 2 more matches
Install script template - Archive of obsolete content
* * @
param empty
param list **/ function createsecondaryinstall() { // use getfolder in such a way that it creates c:\winnt\system32\myplugin secondaryfolder = getfolder("win system", company_name); // if secondaryfolder is null, then there has been an error if(!secondaryfolder) return nosecondaryinstall; else { // we have admin privileges to write to the win system directory // so we wil...
... * * @
param dirpath directory path from getfolder * @
param spacerequired required space in kilobytes * **/ function verifydiskspace(dirpath, spacerequired) { var spaceavailable; // get the available disk space on the given path spaceavailable = filegetdiskspaceavailable(dirpath); // convert the available disk space into kilobytes spaceavailable = parseint(spaceavailable / 1024); // do...
... * * @
param rootkey must be one of these two string values hkey_local_machine or hkey_current_user * @
param plidid plid for plugins * @
param dllabsolutepath the fully qualified path to the dll * @
param xptabsolutepath the fully qualified path to the xpt * @
param plugindescription a string describing the plugin * @
param vendor a string describing the vendor * @
param productname t...
...And 2 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
the initinstall method is polymorphic, but here is a recommended invocation mechanism: initinstall("my plugin software", "@myplugin.com/myplugin,version=2.5", "2.5.0.0"); in the code snippet above, the initinstall method is invoked with three
parameters: a string for the name of the application a string signifying the plugin identifier associated with the plugin.
...you can pass command line
parameters to the executable.
...) has already been called // using the install object's execute method to block on a native installer execute("setup.exe", "-s", true); // in the above sample, assume that running "setup -s" from the // command prompt runs the setup executable, and that "-s" is some // invocation
parameter defined by the setup.exe file, perhaps to force // the installer to run silently.
...And 2 more matches
addFile - Archive of obsolete content
th, object localdirspec, string relativelocalpath, boolean forceupdate); public int addfile ( string xpisourcepath); public int addfile ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); public int addfile ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath);
parameters the addfile method has the following
parameters: registryname the pathname in the client version registry about the file.
... this
parameter can be an absolute pathname, such as /royalairways/royalsw/executable or a relative pathname, such as executable.
...this
parameter can also be null, in which case the xpisourcepath
parameter is used as a relative pathname.note that the registry pathname is not the location of the software on the machine; it is the location of information about the software inside the client version registry.
...And 2 more matches
execute - Archive of obsolete content
method of install object syntax int execute ( string xpisourcepath [, boolean blocking]); int execute ( string xpisourcepath, string args [, boolean blocking]);
parameters the execute method has the following
parameters: xpisourcepath the pathname of the file to extract and execute.
... (note that this path points into the xpi itself.) args a
parameter string that is passed to the executable.
...the blocking
parameter is not available as part of this method in versions of netscape before 6.1/mozilla 0.9.3.
...And 2 more matches
Tree Box Objects - Archive of obsolete content
ow> </treeitem> <treeitem> <treerow> <treecell label="spoon"/> <treecell label="8"/> </treerow> </treeitem> </treechildren> </tree> <label value="row:"/> <label id="row"/> <label value="column:"/> <label id="column"/> <label value="child type:"/> <label id="part"/> the getcellat() function takes five arguments, the coordinates to look up and three out
parameters.
... an out
parameter is used since the function needs to return more that one value.
... you will see a number of interfaces that use out
parameters in the xulplanet object reference (fixme: deadlink).
...And 2 more matches
prefwindow - Archive of obsolete content
opensubdialog( url, features,
params ) return type: window opens a child modal dialog.
... openwindow( windowtype, url, features,
params ) return type: window open a child window.
... notes usage patterns opening/initializing a prefwindow note that you can define an initwith
params() function in your sub window - to handle
parameters passed using openwindow() in case the window was already open.
...And 2 more matches
2006-09-29 - Archive of obsolete content
* * @
param aavailwidth the available width into which the element is * being placed (i.e., the width of its containing * block).
... * @
param amargin the sum of the left and right margins of the * frame, including actual values resulting from * percentages, but not including actual values * resulting from 'auto'.
... * @
param aborder the sum of the left and right border widths of the * frame.
...And 2 more matches
NPP_NewStream - Archive of obsolete content
syntax #include <npapi.h> nperror npp_newstream(npp instance, npmimetype type, npstream* stream, npbool seekable, uint16* stype);
parameters the function has the following
parameters: instance pointer to current plug-in instance.
... stype out
parameter.
... implementation note: some plugins, notably silverlight, do not set this out
param, and rely on the out
param being initialized to a default np_normal value.
...And 2 more matches
NPP_Write - Archive of obsolete content
(remark: hence the name "npp_write" is misleading - just think of:"data_arrived") syntax #include <npapi.h> int32 npp_write(npp instance, npstream* stream, int32 offset, int32 len, void* buf);
parameters the function has the following
parameters: instance pointer to the current plug-in instance.
... the plug-in can use the offset
parameter to track the bytes that are written.
...in a normal-mode stream., the
parameter value increases as the each buffer is written.
...And 2 more matches
Building up a basic demo with Babylon.js - Game development
to initialize it you need to pass it three
parameters: any name you want to use for it, the coordinates where you want it to be positioned in the 3d space, and the scene you want to add it to.
...add the following line below your camera definition: var light = new babylon.pointlight("light", new babylon.vector3(10, 10, 0), scene); the
parameters are very similar to the previously defined camera: the name of the light, a position in 3d space and the scene to which the light is added.
...add these lines below the previous ones: var boxmaterial = new babylon.standardmaterial("material", scene); boxmaterial.emissivecolor = new babylon.color3(0, 0.58, 0.86); box.material = boxmaterial; the standardmaterial takes two
parameters: a name, and the scene you want to add it to.
...And 2 more matches
What is a URL? - Learn web development
?key1=value1&key2=value2 are extra
parameters provided to the web server.
... those
parameters are a list of key/value pairs separated with the & symbol.
... the web server can use those
parameters to do extra stuff before returning the resource.
...And 2 more matches
How to build custom form controls - Learn web development
// this function will be used each time we want to deactivate a custom control // it takes one
parameter // select : the dom node with the `select` class to deactivate function deactivateselect(select) { // if the control is not active there is nothing to do if (!select.classlist.contains('active')) return; // we need to get the list of options for the custom control var optlist = select.queryselector('.optlist'); // we close the list of option optlist.classlist.add('hidden'); ...
...// and we deactivate the custom control itself select.classlist.remove('active'); } // this function will be used each time the user wants to (de)activate the control // it takes two
parameters: // select : the dom node with the `select` class to activate // selectlist : the list of all the dom nodes with the `select` class function activeselect(select, selectlist) { // if the control is already active there is nothing to do if (select.classlist.contains('active')) return; // we have to turn off the active state on all custom controls // because the deactivateselect function fulfills all the requirements of the // foreach callback function, we use it directly without using an intermediate // anonymous function.
... selectlist.foreach(deactivateselect); // and we turn on the active state for this specific control select.classlist.add('active'); } // this function will be used each time the user wants to open/closed the list of options // it takes one
parameter: // select : the dom node with the list to toggle function toggleoptlist(select) { // the list is kept from the control var optlist = select.queryselector('.optlist'); // we change the class of the list to show/hide it optlist.classlist.toggle('hidden'); } // this function will be used each time we need to highlight an option // it takes two
parameters: // select : the dom node with the `select` class containing the option to highlight // option : the dom node with the `option` class to highlight function highlightoption(select, o...
...And 2 more matches
Fetching data from the server - Learn web development
this stores a reference to the <select> and <pre> elements in constants and defines an onchange event handler function so that when the select's value is changed, its value is passed to an invoked function updatedisplay() as a
parameter.
... this function is automatically given the response from the server as a
parameter when the fetch() promise resolves.
...the code below would do the same thing: let myfetch = fetch(url); myfetch.then(function(response) { response.text().then(function(text) { poemdisplay.textcontent = text; }); }); because the fetch() method returns a promise that resolves to the http response, any function you define inside a .then() chained onto the end of it will automatically be given the response as a
parameter.
...And 2 more matches
Working with Svelte stores - Learn web development
then we call the method alert.subscribe(), passing it a callback function as a
parameter.
... whenever the value of the store changes, the callback function will be called with the new value as its
parameter.
... when we call set(), we update the value of the store, and call each handler — passing the new value as a
parameter.
...And 2 more matches
Command line options
command
parameters containing spaces must be enclosed in quotes, such as "joel user".
... command
parameters, except profile names, are case insensitive.
... blank spaces ( ) separate commands and
parameters.
...And 2 more matches
Commenting IDL for better documentation
if an interface is used as a
parameter or as the type of the value returned by a method, please use the full name of the interface in the description of the method.
... @
param parameter description every
parameter of a method should be documented, only use the
parameter name, leave out things like [in]/[out].
... * @
param cookietoeat the nsicookie to eat.
...And 2 more matches
Displaying Places information using views
void applyfilter( string filterstring, array folderrestrict );
parameters filterstring the new query's searchterms property will be set to this string.
... void load( array queries, nsinavhistoryqueryoptions options );
parameters queries an array of nsinavhistoryquery objects.
... void selectitems( array aids, array aopencontainers );
parameters aids an array of item ids.
...And 2 more matches
UpdateListener
void oncompatibilityupdateavailable( in addon addon )
parameters addon the addon that was being checked for updates onnocompatibilityupdateavailable() called when the update check found no new compatibility information for the application and platform version that the update check was being performed for.
... void onnocompatibilityupdateavailable( in addon addon )
parameters addon the addon that was being checked for updates onupdateavailable() called when a new version of an add-on has been found for install.
... void onupdateavailable( in addon addon, in addoninstall install )
parameters addon the addon that was being checked for updates install an addoninstall for the updated version onnoupdateavailable() called when no new version of an add-on has been found for install.
...And 2 more matches
Add-on Repository
string getrecommendedurl();
parameters none.
... string getsearchurl( in string searchterms );
parameters searchterms search terms used to search the repository.
... void cancelsearch();
parameters none.
...And 2 more matches
FxAccountsOAuthClient.jsm
components.utils.import("resource://gre/modules/fxaccountsoauthclient.jsm"); creating a new fxaccountsoauthclient new fxaccountsoauthclient(object options); method overview launchwebflow(); teardown(); attributes
parameters object returns the set of
parameters that initialized the firefox accounts oauth flow.
...fxaccountsoauthclient fxaccountsoauthclient( object options object
parameters string client_id string state string oauth_uri string content_uri [optional] string scope [optional] string action [optional] string authorizationendpoint );
parameters client_id - oauth id returned from client registration.
...
parameters set of
parameters to initialize the firefox accounts oauth flow.
...And 2 more matches
PerfMeasurement.jsm
perfmeasurement( eventmask tomeasure );
parameters tomeasure a mask of all of the event types you want to record; see event mask constants for a list of values.
...static bool canmeasuresomething();
parameters none.
...void reset();
parameters none.
...And 2 more matches
Cryptography functions
and later pk11_freesymkey mxr 3.2 and later pk11_generatefortezzaiv mxr 3.2 and later pk11_generatekeypair mxr 3.2 and later pk11_generatekeypairwithflags mxr 3.10.2 and later pk11_generatekeypairwithopflags mxr 3.12 and later pk11_generatenew
param mxr 3.2 and later pk11_generaterandom mxr 3.2 and later pk11_generaterandomonslot mxr 3.11 and later pk11_getalltokens mxr 3.2 and later pk11_getallslotsforcert mxr 3.12 and later pk11_getbestkeylength mxr 3.2 and later pk11_getbes...
...ericobject mxr 3.9.2 and later pk11_getnextsafe mxr 3.4 and later pk11_getnextsymkey mxr 3.4 and later pk11_getpadmechanism mxr 3.4 and later pk11_getpbecryptomechanism mxr 3.12 and later pk11_getpbeiv mxr 3.6 and later pk11_getpqg
paramsfromprivatekey mxr 3.4 and later pk11_getprevgenericobject mxr 3.9.2 and later pk11_getprivatekeynickname mxr 3.4 and later pk11_getprivatemoduluslen mxr 3.2 and later pk11_getpublickeynickname mxr 3.4 and later pk11_getslotfromkey mxr 3.2 and lat...
...ater pk11_isfriendly mxr 3.2 and later pk11_ishw mxr 3.2 and later pk11_isinternal mxr 3.2 and later pk11_ispresent mxr 3.2 and later pk11_isreadonly mxr 3.2 and later pk11_isremovable mxr 3.12 and later pk11_ivfrom
param mxr 3.2 and later pk11_keygen mxr 3.2 and later pk11_linkgenericobject mxr 3.9.2 and later pk11_listcerts mxr 3.2 and later.
...And 2 more matches
JSS Provider Notes
none of the key generation algorithms accepts an algorithm
parameterspec.
... the
params passed to init() are ignored.
...5anddes pbewithsha1anddes pbewithsha1anddesede (pbewithsha1anddes3 ) pbewithsha1and128rc4 rc4 generatesecret supports the following transformations: keyspec class key algorithm pbekeyspec org.mozilla.jss.crypto.pbekeygen
params using the appropriate pbe algorithm: des desede rc4 desedekeyspec desede deskeyspec des secretkeyspec aes des desede rc4 ...
...And 2 more matches
Mozilla-JSS JCA Provider notes
none of the key generation algorithms accepts an algorithm
parameterspec.
... the
params passed to init() are ignored.
... secretkeyfactory supported algorithms notes aes des desede (des3) pbahmacsha1 pbewithmd5anddes pbewithsha1anddes pbewithsha1anddesede (pbewithsha1anddes3) pbewithsha1and128rc4 rc4 generatesecret supports the following transformations: keyspec class key algorithm pbekeyspec org.mozilla.jss.crypto.pbekeygen
params using the appropriate pbe algorithm: des desede rc4 desedekeyspec desede deskeyspec des secretkeyspec aes des desede rc4 getkeyspec supports the following transformations: key algorithm keyspec class desede desedekeyspec des ...
...And 2 more matches
NSS 3.12.5 release_notes
the 2 new functions are: nss_initcontext nss_shutdowncontext
parameters for these functions are used to initialize softoken.
...if the string
parameter is null (as opposed to empty, zero length), then the softoken default is used.
... these are equivalent to the
parameters for pk11_configurepkcs11().
...And 2 more matches
NSS functions
and later pk11_freesymkey mxr 3.2 and later pk11_generatefortezzaiv mxr 3.2 and later pk11_generatekeypair mxr 3.2 and later pk11_generatekeypairwithflags mxr 3.10.2 and later pk11_generatekeypairwithopflags mxr 3.12 and later pk11_generatenew
param mxr 3.2 and later pk11_generaterandom mxr 3.2 and later pk11_generaterandomonslot mxr 3.11 and later pk11_getalltokens mxr 3.2 and later pk11_getallslotsforcert mxr 3.12 and later pk11_getbestkeylength mxr 3.2 and later pk11_getbes...
...ericobject mxr 3.9.2 and later pk11_getnextsafe mxr 3.4 and later pk11_getnextsymkey mxr 3.4 and later pk11_getpadmechanism mxr 3.4 and later pk11_getpbecryptomechanism mxr 3.12 and later pk11_getpbeiv mxr 3.6 and later pk11_getpqg
paramsfromprivatekey mxr 3.4 and later pk11_getprevgenericobject mxr 3.9.2 and later pk11_getprivatekeynickname mxr 3.4 and later pk11_getprivatemoduluslen mxr 3.2 and later pk11_getpublickeynickname mxr 3.4 and later pk11_getslotfromkey mxr 3.2 and lat...
...ater pk11_isfriendly mxr 3.2 and later pk11_ishw mxr 3.2 and later pk11_isinternal mxr 3.2 and later pk11_ispresent mxr 3.2 and later pk11_isreadonly mxr 3.2 and later pk11_isremovable mxr 3.12 and later pk11_ivfrom
param mxr 3.2 and later pk11_keygen mxr 3.2 and later pk11_linkgenericobject mxr 3.9.2 and later pk11_listcerts mxr 3.2 and later.
...And 2 more matches
sslintro.html
sets up
parameters for a server session cache for a single-process application.
...sets up
parameters for a server cache for a multi-process application.
...sets a single configuration
parameter of a specified socket.
...And 2 more matches
JS::Evaluate
this
parameter is documented in detail at js_executescript.
...this
parameter is documented in detail at js_executescript.
... rval js::mutablehandlevalue out
parameter.
...And 2 more matches
Using RAII classes in Mozilla
in the common case, using these macros involves these three additions to a class: class moz_raii nsautoscriptblocker { public: explicit nsautoscriptblocker(jscontext *cx moz_guard_object_notifier_
param) { // note: no ',' before macro moz_guard_object_notifier_init; nscontentutils::addscriptblocker(cx); } ~nsautoscriptblocker() { nscontentutils::removescriptblocker(); } private: moz_decl_use_guard_object_notifier }; moz_guard_object_notifier_
param is added to the end of the constructor's
parameter list.
... however, there are some variations for special cases: first, if the constructor (otherwise) takes no arguments, then you have to use the moz_guard_object_notifier_only_
param macro instead.
... (this is needed because the macro adds a
parameter only when debug is defined, and in this case, it can't add the leading comma.) class moz_raii nsautoscriptblocker { public: explicit nsautoscriptblocker(moz_guard_object_notifier_only_
param) { moz_guard_object_notifier_init; nscontentutils::addscriptblocker(); } ~nsautoscriptblocker() { nscontentutils::removescriptblocker(); } private: moz_decl_use_guard_object_notifier }; second, if the constructor is not inline, it needs the
parameter added in its implementation as well.
...And 2 more matches
extIPreferenceBranch
all preference "aname"
parameters used in this interface are relative to the root branch.
... boolean has(in astring aname)
parameters aname the name of preference return value true if the preference exists, false if not get() gets an object representing a preference extipreference get(in astring aname)
parameters aname the name of preference return value a preference object, or null if the preference does not exist getvalue() gets the value of a preference.
... nsivariant getvalue(in astring aname, in nsivariant adefaultvalue)
parameters aname the name of a preference adefaultvalue the default value of a preference.
...And 2 more matches
Using XPCOM Utilities to Make Things Easier
all of these macros work on an array of structures represented by the components
parameter.
... the first
parameter for each of these macros is an arbitrary string that names the module.
... these three entries constitute the required
parameters for the registerfactorylocation method we looked at in the prior chapter.
...And 2 more matches
IAccessibleHyperlink
[propget] hresult anchor( [in] long index, [out] variant anchor );
parameters index a 0 based index identifies the anchor when, as in the case of an image map, there is more than one link represented by this object.
...[propget] hresult anchortarget( [in] long index, [out] variant anchortarget );
parameters index a 0 based index identifies the anchor when, as in the case of an image map, there is more than one link represented by this object.
...endindex() [propget] hresult endindex( [out] long index );
parameters index the 0 based character offset at which the textual representation of the hyperlink ends.
...And 2 more matches
IAccessibleRelation
[propget] hresult localizedrelationtype( [out] bstr localizedrelationtype );
parameters localizedrelationtype return value s_ok.
...[propget] hresult ntargets( [out] long ntargets );
parameters ntargets return value s_ok.
...[propget] hresult relationtype( [out] bstr relationtype );
parameters relationtype the strings returned are defined @ref grprelations "in this section of the documentation".
...And 2 more matches
amIInstallTrigger
boolean enabled();
parameters none.
... boolean install( in nsivariant aargs, in amiinstallcallback acallback optional );
parameters aargs the add-ons to install.
... boolean installchrome( in pruint32 atype, in astring aurl, in astring askin );
parameters atype unused, retained for backwards compatibility.
...And 2 more matches
imgIDecoder
void close();
parameters none.
...void flush();
parameters none.
...void init( in imgiload aload );
parameters aload an imgiload object to receive the decoded image data.
...And 2 more matches
mozISpellCheckingEngine
void adddirectory( nsifile dir );
parameters dir an nsifile object indicating the directory from which to add dictionaries.
...boolean check( in wstring word );
parameters word a word to check for correct spelling.
...void getdictionarylist( [array, size_is(count)] out wstring dictionaries, out pruint32 count );
parameters dictionaries a list of dictionaries supported by this spell checker.
...And 2 more matches
mozITXTToHTMLConv
wstring scantxt( in wstring text, in unsigned long whattodo );
parameters text the original, plain text to scan and convert into html.
... wstring scanhtml( in wstring text, in unsigned long whattodo );
parameters text the original, user-edited html.
... unsigned long citeleveltxt( in wstring line, out unsigned long loglinestart );
parameters line the original line of text, which may begin with one or more cite characters such as ">".
...And 2 more matches
nsIAccessNode
nsiaccessnode getchildnodeat( in long childnum );
parameters childnum zero-based child index.
... nsidomcssprimitivevalue getcomputedstylecssvalue( in domstring pseudoelt, in domstring propertyname );
parameters pseudoelt the pseudo element to retrieve style for, or empty string for general computed style information for the node.
... domstring getcomputedstylevalue( in domstring pseudoelt, in domstring propertyname );
parameters pseudoelt the pseudo element to retrieve style for, or null for general computed style information for this node.
...And 2 more matches
nsIApplicationUpdateService
void adddownloadlistener( in nsirequestobserver listener );
parameters listener an object implementing nsirequestobserver and optionally nsiprogresseventsink that will be notified of state and progress information as the update is downloaded.
... astring downloadupdate( in nsiupdate update, in boolean background );
parameters update an nsiupdate object indicating the update to download.
...void pausedownload();
parameters none.
...And 2 more matches
nsICacheSession
void asyncopencacheentry( in acstring key, in nscacheaccessmode accessrequested, in nsicachelistener listener, [optional] in boolean nowait );
parameters key the key for cache entry.
...void doomentry( in acstring key, in nsicachelistener listener );
parameters key the key for cache entry.
...void evictentries();
parameters none.
...And 2 more matches
nsIClipboardDragDropHooks
inherits from: nsisupports last changed in gecko 1.7 embedders who want to have these hooks made available should implement nsiclipboarddragdrophooks and use the command manager to send the appropriate commands with these
parameters/settings: command: cmd_clipboarddragdrophook
params value type possible values "addhook" isupports nsiclipboarddragdrophooks as nsisupports "removehook" isupports nsiclipboarddragdrophooks as nsisupports note: overrides/hooks need to be added to each window (as appropriate).
...boolean allowdrop( in nsidomevent event, in nsidragsession session );
parameters event the dom event (drag gesture).
...boolean allowstartdrag( in nsidomevent event );
parameters event the dom event (drag gesture).
...And 2 more matches
nsICookiePermission
nscookieaccess canaccess( in nsiuri auri, in nsiuri afirsturi, obsolete since gecko 1.9 in nsichannel achannel );
parameters auri the uri trying to access cookies.
...it may modify the issession and expiry attributes of the cookie via the aissession and aexpiry
parameters, in order to limit or extend the lifetime of the cookie.
...boolean cansetcookie( in nsiuri auri, in nsichannel achannel, in nsicookie2 acookie, inout boolean aissession, inout print64 aexpiry );
parameters auri the uri trying to set the cookie.
...And 2 more matches
nsICryptoHMAC
acstring finish( in prbool aascii );
parameters aascii if true then the returned value is a base-64 encoded string.
...void init( in unsigned long aalgorithm, in nsikeyobject akeyobject );
parameters aalgorithm the algorithm type to be used.
...void reset();
parameters none.
...And 2 more matches
nsIDOMStorage
void clear();
parameters none.
...domstring getitem( in domstring key );
parameters key the key for which data should be returned.
...domstring key( in unsigned long index );
parameters index the index for which the corresponding key should be returned.
...And 2 more matches
nsIDOMStorage2
void clear();
parameters none.
...domstring getitem( in domstring key );
parameters key the key for which data should be returned.
...domstring key( in unsigned long index );
parameters index the index for which the corresponding key should be returned.
...And 2 more matches
nsIDictionary
boolean haskey( in string key );
parameters key key to check for.
... nsisupports getvalue( in string key );
parameters key the lookup key indicating the value.
... void setvalue( in string key, in nsisupports value );
parameters key the key by which the value can be accessed.
...And 2 more matches
nsIEventListenerService
void geteventtargetchainfor( in nsidomeventtarget aeventtarget, [optional] out unsigned long acount, [retval, array, size_is(acount)] out nsidomeventtarget aoutarray );
parameters aeventtarget the nsidomeventtarget for which to return the event target chain.
...void getlistenerinfofor( in nsidomeventtarget aeventtarget, [optional] out unsigned long acount, [retval, array, size_is(acount)] out nsieventlistenerinfo aoutarray );
parameters aeventtarget the nsieventtarget for which to obtain a list of listeners.
...boolean haslistenersfor( in nsidomeventtarget aeventtarget, in domstring atype );
parameters aeventtarget the nsidomeventtarget for which to check if this has any listener for atype.
...And 2 more matches
nsIFilePicker
void appendfilter( in astring title, in astring filter );
parameters title the title of the filter.
... void appendfilters( in long filtermask );
parameters note: if appendfilters is the first (or only) call to set the file filters the filter with the smallest code will be used as default filter when displaying the nsifilepicker dialog.
... void init( in nsidomwindow parent, in astring title, in short mode );
parameters parent the nsidomwindow parent.
...And 2 more matches
nsIHttpChannelInternal
void getrequestversion( out unsigned long major, out unsigned long minor );
parameters major on return, contains the request's major version number.
...void getresponseversion( out unsigned long major, out unsigned long minor );
parameters major on return, contains the response's major version number.
...void httpupgrade( in acstring aprotocolname, in nsihttpupgradelistener alistener );
parameters aprotocolname the value of the http upgrade request header.
...And 2 more matches
nsIIDNService
autf8string convertacetoutf8( in acstring input );
parameters input the ace encoded hostname to convert into utf-8 format.
...autf8string converttodisplayidn( in autf8string input, out boolean isascii );
parameters input the string to convert to display format.
...acstring convertutf8toace( in autf8string input );
parameters input the hostname to convert to ace format.
...And 2 more matches
nsIINIParser
nsiutf8stringenumerator getkeys( in autf8string asection );
parameters asection the name of the section whose keys you wish to enumerate.
...nsiutf8stringenumerator getsections();
parameters none.
...autf8string getstring( in autf8string asection, in autf8string akey );
parameters asection the section containing the key whose value is to be returned.
...And 2 more matches
nsIJSID
an unnamed jsid also results when you implement a function that is passed an nsiidref
parameter, such as queryinterface().
...boolean equals( in nsijsid other );
parameters other the other nsijsid to compare to.
... violates the xpcom interface guidelines getid() const nsid* getid();
parameters none.
...And 2 more matches
nsIMessageListenerManager
void addmessagelistener(in astring messagename, in nsimessagelistener listener, [optional] in boolean listenwhenclosed);
parameters messagename a string indicating the name of the message to listen for.
...this
parameter only has an effect for frame message managers in the main process.
...
parameters messagename the name of the message whose listener is to be removed.
...And 2 more matches
nsIMsgThread
void addchild(in nsimsgdbhdr child, in nsimsgdbhdr inreplyto, in boolean threadinthread, in nsidbchangeannouncer announcer);
parameters child the message to add inreplyto the message this should be in reply to threadinthread announcer an nsidbchangeannouncer to receive notification when the change is made.
... nsimsgdbhdr getchildat(in long index);
parameters index the index to get the message from getchildkeyat() nsmsgkey getchildkeyat(in long index);
parameters index the index to get the key from getchild() nsimsgdbhdr getchild(in nsmsgkey msgkey);
parameters msgkey the index to get the key from getchildhdrat() nsimsgdbhdr getchildhdrat(in long index);
parameters index the index to get the message from.
... removechildat() void removechildat(in long index);
parameters index the index to remove the message from removechildhdr() void removechildhdr(in nsimsgdbhdr child, in nsidbchangeannouncer announcer);
parameters child the message to remove announcer an nsidbchangeannouncer to receive notification when the change is made.
...And 2 more matches
nsIMutableArray
void appendelement( in nsisupports element, in boolean weak );
parameters element the element to append.
...void clear();
parameters none.
...void insertelementat( in nsisupports element, in unsigned long index, in boolean weak );
parameters element the element to insert.
...And 2 more matches
nsIProperties
void get( in string prop, in nsiidref iid, [iid_is(iid),retval] out nsqiresult result );
parameters prop the property name.
...void getkeys( out pruint32 count, [array, size_is(count), retval] out string keys );
parameters count the length of the result array.
...boolean has( in string prop );
parameters prop the property name.
...And 2 more matches
nsIPushMessage
domstring text();
parameters none.
... jsval json();
parameters none.
... void binary( [optional] out uint32_t datalen, [array, retval, size_is(datalen)] out uint8_t data );
parameters datalen the data size.
...And 2 more matches
nsIScriptableInputStream
unsigned long available();
parameters none.
...void close();
parameters none.
...void init( in nsiinputstream ainputstream );
parameters ainputstream the nsiinputstream to be wrapped.
...And 2 more matches
nsISocketTransport
prnetaddr getpeeraddr();
parameters none.
...prnetaddr getselfaddr();
parameters none.
...unsigned long gettimeout( in unsigned long atype );
parameters atype the timeout type, who's associated value should be retrieved.
...And 2 more matches
nsISocketTransportService
void attachsocket( in prfiledescptr afd, in nsasockethandlerptr ahandler );
parameters afd open file descriptor of the socket to control.
... nsisockettransport createtransport( in array<acstring> asockettypes, in autf8string ahost, in long aport, in nsiproxyinfo aproxyinfo );
parameters asockettypes array of socket type strings.
... init() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void init();
parameters none.
...And 2 more matches
nsISound
void beep();
parameters none.
...void init();
parameters none.
...void play( in nsiurl aurl );
parameters aurl the url of the sound file to play.
...And 2 more matches
nsITaggingService
void taguri( in nsiuri auri, in nsivariant atags );
parameters auri the url to tag.
... void untaguri( in nsiuri auri, in nsivariant atags );
parameters auri the url to un-tag.
... nsivariant geturisfortag( in astring atag );
parameters atag the tag name.
...And 2 more matches
nsITaskbarPreviewController
boolean drawpreview( in nsidomcanvasrenderingcontext2d ctx );
parameters ctx an nsidomcanvasrenderingcontext2d object representing the drawing context into which the preview is to be rendered.
... boolean drawthumbnail( in nsidomcanvasrenderingcontext2d ctx, in unsigned long width, in unsigned long height );
parameters ctx an nsidomcanvasrenderingcontext2d object representing the drawing context into which the thumbnail is to be rendered.
... boolean onactivate();
parameters none.
...And 2 more matches
nsIWebSocketChannel
void asyncopen( in nsiuri auri, in acstring aorigin, in nsiwebsocketlistener alistener, in nsisupports acontext );
parameters auri the uri of the websocket protocol; this may be redirected.
... acontext an opaque
parameter forwarded to alistener's methods.
... close() void close( in unsigned short acode, in autf8string areason );
parameters acode the status of the connection when closed; see status codes for possible values.
...And 2 more matches
nsIWinTaskbar
nsijumplistbuilder createjumplistbuilder();
parameters none.
...nsitaskbartabpreview createtaskbartabpreview( in nsidocshell shell, in nsitaskbarpreviewcontroller controller );
parameters shell an nsidocshell object representing the top-level window from which to create the preview.
...nsitaskbarprogress gettaskbarprogress( in nsidocshell shell );
parameters shell the nsidocshell used to find the toplevel window.
...And 2 more matches
nsIXFormsModelElement
.8 obsolete gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview nsidomdocument getinstancedocument(in domstring instanceid); void rebuild(); void recalculate(); void refresh(); void revalidate(); methods getinstancedocument() nsidomdocument getinstancedocument( in domstring instanceid );
parameters instanceid the id of the instance element to be returned.
...void rebuild();
parameters none.
...void recalculate();
parameters none.
...And 2 more matches
nsIXmlRpcClient
call this before using this object void getdata ( in string serverurl ) ;
parameters serverurl url of server side object on which methods should be called setauthentication() set authentication info if needed.
... both
parameters must be specified for authentication to be enabled void setauthentication ( in string username, in string password ) ;
parameters username username to be used if asked to authenticate password password to be used if asked to authenticate clearauthentication() clear authentication info void setauthentication ( in string username, in string password ) ;
parameters username password setencoding() set character encoding.
... the default charset if this function is not called is "utf-8" void setauthentication ( in string encoding ) ;
parameters encoding encoding charset to be used asynccall() call remote method methodname asynchronously with given arguments.
...And 2 more matches
NS_CStringContainerInit2
#include "nsstringapi.h" nsresult ns_cstringcontainerinit2( nscstringcontainer& acontainer, const char* adata = nsnull, pruint32 adatalength = pr_uint32_max, pruint32 aflags = 0 );
parameters acontainer [in] the nscstringcontainer instance to initialize.
...this
parameter may be null.
... adatalength [in] an optional
parameter that specifies the length of the array pointed to by adata.
...And 2 more matches
Xptcall Porting Guide
the invoke functionality requires the implementation of the following on each platform (from xptcall/public/xptcall.h): xptc_public_api(nsresult) ns_invokebyindex(nsisupports* that, pruint32 methodindex, pruint32
paramcount, nsxptcvariant*
params); calling code is expected to supply an array of nsxptcvariant structs.
... these are discriminated unions describing the type and value of each
parameter of the target function.
... these implementations use the basic strategy of: figure out how much stack space is needed for the
params, make the space in a new frame, copy the
params to that space, invoke the method, cleanup and return.
...And 2 more matches
CData
cdata address()
parameters none.
... string tosource()
parameters none.
... string tostring();
parameters none.
...And 2 more matches
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
syntax var audiobuffersourcenode = new audiobuffersourcenode(context, options)
parameters inherits
parameters from the audionodeoptions dictionary.
...thus, its behavior is independent of the value of the playbackrate
parameter.
...thus, its behavior is independent of the value of the playbackrate
parameter.
...And 2 more matches
AudioBufferSourceNode.start() - Web APIs
syntax audiobuffersourcenode.start([when][, offset][, duration]);
parameters when optional the time, in seconds, at which the sound should begin to play, in the same time coordinate system used by the audiocontext.
...if this
parameter isn't specified, the sound plays until it reaches its natural conclusion or is stopped using the stop() method.
... using this
parameter is functionally identical to calling start(when, offset) and then calling stop(when+duration).
...And 2 more matches
console - Web APIs
console.time() starts a timer with a name specified as an input
parameter.
...formatting is supported, for example console.log("foo %.2f", 1.1) will output the number to 2 decimal places: foo 1.10 note: precision formatting doesn't work in chrome each of these pulls the next argument after the format string off the
parameter list.
... styling console output you can use the %c directive to apply a css style to console output: console.log("this is %cmy stylish message", "color: yellow; font-style: italic; background-color: blue;padding: 2px"); the text before the directive will not be affected, but the text after the directive will be styled using the css declarations in the
parameter.
...And 2 more matches
CryptoKey - Web APIs
cryptokey.algorithm an object describing the algorithm for which this key can be used and any associated extra
parameters.
... aeskeygen
params if the algorithm is any of the aes variants.
... rsahashedkeygen
params if the algorithm is any of the rsa variants.
...And 2 more matches
DOMMatrixReadOnly.scale() - Web APIs
dommatrix.scale(scalex[, scaley][, scalez][, originx][, originy][, originz])
parameters scalex a multiplier for the scale value on the x-axis.
...reen, each positioned at the document origin: <svg width="250" height="250" viewbox="0 0 25 25"> <rect width="25" height="25" fill="red" /> <rect id="transformed" width="25" height="25" fill="blue" /> <rect id="transformedorigin" width="25" height="25" fill="green" /> </svg> this javascript first creates an identity matrix, then uses the scale() method to create a new matrix with a single
parameter.
... we test if the browser supports a six
parameter scale() method by creating a new matrix using three
parameters and observing it's is2d property — if this is false then the third
parameter has been accepted by the browser as a scalez
parameter, making this a 3d matrix.
...And 2 more matches
DirectoryEntrySync - Web APIs
parameter none exceptions this method can raise a fileexception with the following codes: exception description not_found_err the directory does not exist.
...[ todo: explain why ] getfile() depending on how you've set the options
parameter, the method either creates a file or looks up an existing file.
... void getfile ( in domstring path, in optional flags options ) raises (fileexception);
parameter path either an absolute path or a relative path from the directory to the file to be looked up or created.
...And 2 more matches
DynamicsCompressorNode - Web APIs
dynamicscompressornode.threshold read only is a k-rate audio
param representing the decibel value above which the compression will start taking effect.
... dynamicscompressornode.knee read only is a k-rate audio
param containing a decibel value representing the range above the threshold where the curve smoothly transitions to the compressed portion.
... dynamicscompressornode.ratio read only is a k-rate audio
param representing the amount of change, in db, needed in the input for a 1 db change in the output.
...And 2 more matches
Working with the History API - Web APIs
the pushstate() method pushstate() takes three
parameters: a state object; a title (currently ignored); and (optionally), a url.
... let's examine each of these three
parameters in more detail.
... title all browsers but safari currently ignore this
parameter, although they may use it in the future.
...And 2 more matches
IDBDatabaseSync - Web APIs
idbobjectstoresync createobjectstore( in domstring name, in domstring keypath, in optional boolean autoincrement ) raises (idbdatabaseexception);
parameters name the name of a new object store.
... idbobjectstoresync openobjectstore ( in domstring name, in optional unsigned short mode ) raises (idbdatabaseexception);
parameters name the name of the object store to open.
... void removeobjectstore ( in domstring storename ) raises (idbdatabaseexception);
parameters storename the name of an existing object store to remove.
...And 2 more matches
IDBObjectStore.add() - Web APIs
if a record already exists in the object store with the key
parameter as its key, then an error constrainerror event is fired on the returned request object.
... syntax var request = objectstore.add(value); var request = objectstore.add(value, key);
parameters value the value to be stored.
... dataerror any of the following conditions apply: the object store uses in-line keys or has a key generator, and a key
parameter was provided.
...And 2 more matches
IDBObjectStore.put() - Web APIs
syntax let request = objectstore.put(item); let request = objectstore.put(item, key);
parameters item the item you wish to update (or insert).
... dataerror any of the following conditions apply: the object store uses in-line keys or has a key generator, and a key
parameter was provided.
... the object store uses out-of-line keys and has no key generator, and no key
parameter was provided.
...And 2 more matches
Using the Media Capabilities API - Web APIs
these features include: the ability to query the browser to determine its ability to encode or decode media given a specified set of encoding
parameters.
... these
parameters may include the codecs, resolutions, bit rates, frame rates, and other such details.
...you can, therefore, test for the presence of the api like so: if ("mediacapabilities" in navigator) { // mediacapabilities is available } else { // mediacapabilities is not available } taking video as an example, to obtain information about video decoding abilities, you create a video decoding configuration which you pass as a
parameter to mediacapabilities.decodinginfo() method.
...And 2 more matches
PaymentResponse - Web APIs
this option is only present when the requestpayeremail option is set to true in the options
parameter of the paymentrequest() constructor.
...this option is only present when the requestpayername option is set to true in the options
parameter of the paymentrequest() constructor.
...this option is only present when the requestpayerphone option is set to true in the options
parameter of the paymentrequest() constructor.
...And 2 more matches
RTCPeerConnection.addTrack() - Web APIs
syntax rtpsender = rtcpeerconnection.addtrack(track, stream...);
parameters track a mediastreamtrack object representing the media track to add to the peer connection.
... usage notes adding tracks to multiple streams after the track
parameter, you can optionally specify one or more mediastream objects to add the track to.
... the rtcrtptransceiver associated with the sender has a rtcrtpreceiver whose track property specifies a mediastreamtrack whose kind is the same as the kind of the track
parameter specified when calling rtcpeerconnection.addtrack().
...And 2 more matches
SubtleCrypto.generateKey() - Web APIs
syntax const result = crypto.subtle.generatekey(algorithm, extractable, keyusages);
parameters algorithm is a dictionary object defining the type of key to generate and providing extra algorithm-specific
parameters.
... for rsassa-pkcs1-v1_5, rsa-pss, or rsa-oaep: pass an rsahashedkeygen
params object.
... for ecdsa or ecdh: pass an eckeygen
params object.
...And 2 more matches
SubtleCrypto.importKey() - Web APIs
syntax const result = crypto.subtle.importkey( format, keydata, algorithm, extractable, usages );
parameters format is a string describing the data format of the key to import.
... algorithm is a dictionary object defining the type of key to import and providing extra algorithm-specific
parameters.
... for rsassa-pkcs1-v1_5, rsa-pss, or rsa-oaep: pass an rsahashedimport
params object.
...And 2 more matches
SubtleCrypto.sign() - Web APIs
it takes as its arguments a key to sign with, some algorithm-specific
parameters, and the data to sign.
... syntax const signature = crypto.subtle.sign(algorithm, key, data);
parameters algorithm is a string or object that specifies the signature algorithm to use and its
parameters: to use rsassa-pkcs1-v1_5, pass the string "rsassa-pkcs1-v1_5" or an object of the form { "name": "rsassa-pkcs1-v1_5" }.
... to use rsa-pss, pass an rsapss
params object.
...And 2 more matches
SubtleCrypto.verify() - Web APIs
it takes as its arguments a key to verify the signature with, some algorithm-specific
parameters, the signature, and the original signed data.
... syntax const result = crypto.subtle.verify(algorithm, key, signature, data);
parameters algorithm is a domstring or object defining the algorithm to use, and for some algorithm choices, some extra
parameters.
... the values given for the extra
parameters must match those passed into the corresponding sign() call.
...And 2 more matches
SubtleCrypto.wrapKey() - Web APIs
syntax const result = crypto.subtle.wrapkey( format, key, wrappingkey, wrapalgo );
parameters format is a string describing the data format in which the key will be exported before it is encrypted.
... wrapalgo is an object specifying the algorithm to be used to encrypt the exported key, and any required extra
parameters: to use rsa-oaep, pass an rsaoaep
params object.
... to use aes-ctr, pass an aesctr
params object.
...And 2 more matches
URL - Web APIs
search a usvstring indicating the url's
parameter string; if any
parameters are provided, this string includes all of them, beginning with the leading ?
... search
params read only a urlsearch
params object which can be used to access the individual query
parameters found in search.
... usage notes the constructor takes a url
parameter, and an optional base
parameter to use as a base if the url
parameter is a relative url: const url = new url('../cats', 'http://www.example.com/dogs'); console.log(url.hostname); // "www.example.com" console.log(url.pathname); // "/cats" url properties can be set to construct the url: url.hash = 'tabby'; console.log(url.href); // "http://www.example.com/cats#tabby" urls are encoded acco...
...And 2 more matches
WEBGL_depth_texture - Web APIs
extended methods this extension extends webglrenderingcontext.teximage2d(): the format and internalformat
parameters now accept gl.depth_component and gl.depth_stencil.
... the type
parameter now accepts gl.unsigned_short, gl.unsigned_int, and ext.unsigned_int_24_8_webgl.
... the pixels
parameter now accepts an arraybufferview of type uint16array and uint32array.
...And 2 more matches
Cross-browser audio basics - Developer guides
ent.js includes flash fallbacks, which are used something like this: <audio controls> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- fallback for non supporting browsers goes here --> <a href="audiofile.mp3">download audio</a> <object width="320" height="30" type="application/x-shockwave-flash" data="mediaelement-flash-video.swf"> <
param name="movie" value="mediaelement-flash-video.swf" /> <
param name="flashvars" value="controls=true&isvideo=false&file=audiofile.mp3" /> </object> </audio> note: you should be aware that flash and silverlight code require that the user has the appropriate plugin installed, and that the browser cannot guarantee the security aspects of code running on those plugin platforms.
...it takes no
parameters.
...it takes no
parameters.
...And 2 more matches
Indexed collections - JavaScript
the foreach() method provides another way of iterating over an array: let colors = ['red', 'green', 'blue'] colors.foreach(function(color) { console.log(color) }) // red // green // blue alternatively, you can shorten the code for the foreach
parameter with es2015 arrow functions: let colors = ['red', 'green', 'blue'] colors.foreach(color => console.log(color)) // red // green // blue the function passed to foreach is executed once for every item in the array, with the array item passed as the argument to the function.
... if initialvalue is specified, then callback is called with initialvalue as the first
parameter value and the value of the first item in the array as the second
parameter value.
... if initialvalue is not specified, then callback's first two
parameter values will be the first and second elements of the array.
...And 2 more matches
Working with objects - JavaScript
an example is: objectname.methodname = functionname; var myobj = { mymethod: function(
params) { // ...do something } // or this works too myothermethod(
params) { // ...do something else } }; where objectname is an existing object, methodname is the name you are assigning to the method, and functionname is the name of the function.
... you can then call the method in the context of the object as follows: object.methodname(
params); you can define methods for an object type by including a method definition in the object constructor function.
...of course, the getter method must not expect a
parameter, while the setter method expects exactly one
parameter (the new value to set).
...And 2 more matches
Date.UTC() - JavaScript
the date.utc() method accepts
parameters similar to the date constructor, but treats them as utc.
... syntax since ecmascript 2017: date.utc(year[, month[, day[, hour[, minute[, second[, millisecond]]]]]]) ecmascript 2016 and earlier: (month used to be required) date.utc(year, month[, day[, hour[, minute[, second[, millisecond]]]]])
parameters year a full year.
...(up through ecmascript 2016, month was a required
parameter.
...And 2 more matches
Date.prototype.setHours() - JavaScript
syntax dateobj.sethours(hoursvalue[, minutesvalue[, secondsvalue[, msvalue]]]) versions prior to javascript 1.3 dateobj.sethours(hoursvalue)
parameters hoursvalue ideally, an integer between 0 and 23, representing the hour.
...if you specify the secondsvalue
parameter, you must also specify the minutesvalue.
...if you specify the msvalue
parameter, you must also specify the minutesvalue and secondsvalue.
...And 2 more matches
Date.prototype.setMinutes() - JavaScript
syntax dateobj.setminutes(minutesvalue[, secondsvalue[, msvalue]]) versions prior to javascript 1.3 dateobj.setminutes(minutesvalue)
parameters minutesvalue an integer between 0 and 59, representing the minutes.
...if you specify the secondsvalue
parameter, you must also specify the minutesvalue.
...if you specify the msvalue
parameter, you must also specify the minutesvalue and secondsvalue.
...And 2 more matches
Date.prototype.setUTCHours() - JavaScript
syntax dateobj.setutchours(hoursvalue[, minutesvalue[, secondsvalue[, msvalue]]])
parameters hoursvalue an integer between 0 and 23, representing the hour.
...if you specify the secondsvalue
parameter, you must also specify the minutesvalue.
...if you specify the msvalue
parameter, you must also specify the minutesvalue and secondsvalue.
...And 2 more matches
Date.prototype.setUTCMinutes() - JavaScript
syntax dateobj.setutcminutes(minutesvalue[, secondsvalue[, msvalue]])
parameters minutesvalue an integer between 0 and 59, representing the minutes.
...if you specify the secondsvalue
parameter, you must also specify the minutesvalue.
...if you specify the msvalue
parameter, you must also specify the minutesvalue and secondsvalue.
...And 2 more matches
Object initializer - JavaScript
syntax let o = {} let o = {a: 'foo', b: 42, c: {}} let a = 'foo', b = 42, c = {} let o = {a: a, b: b, c: c} let o = { property: function (
parameters) {}, get property() {}, set property(value) {} }; new notations in ecmascript 2015 please see the compatibility table for support for these notations.
... // shorthand property names (es2015) let a = 'foo', b = 42, c = {}; let o = {a, b, c} // shorthand method names (es2015) let o = { property(
parameters) {} } // computed property names (es2015) let prop = 'foo' let o = { [prop]: 'hey', ['b' + 'ar']: 'there' } description an object initializer is an expression that describes the initialization of an object.
... let o = { property: function (
parameters) {}, get property() {}, set property(value) {} } in ecmascript 2015, a shorthand notation is available, so that the keyword "function" is no longer necessary.
...And 2 more matches
Media container formats (file types) - Web media technologies
base 3gp media mime types audio video audio/3gpp video/3gpp audio/3gpp2 video/3gpp2 audio/3gp2 video/3gp2 these mime types are the fundamental types for the 3gp media container; other types may be used depending on the specific codec or codecs in use; in addition, you can add the codecs
parameter to the mime type string to indicate which codecs are used for the audio and/or video tracks, and to optionally provide details about the profile, level, and/or other codec configuration specifics.
... when specifying the mpeg-4 media type (audio/mp4 or video/mp4), you can add the codecs
parameter to the mime type string to indicate which codecs are used for the audio and/or video tracks, and to optionally provide details about the profile, level, and/or other codec configuration specifics.
...in addition, you can add the codecs
parameter to the mime type string to indicate which codecs are used for the audio and/or video tracks, and to optionally provide details about the profile, level, and/or other codec configuration specifics.
...And 2 more matches
Transport Layer Security - Web security
the security of any connection using transport layer security (tls) is heavily dependent upon the cipher suites and security
parameters selected.
...applications that use tls can choose their security
parameters, which can have a substantial impact on the security and reliability of data.
... a tls connection starts with a handshake phase where a client and server agree on a shared secret and important
parameters, like cipher suites, are negotiated.
...And 2 more matches
JavaScript/XSLT Bindings - XSLT: Extensible Stylesheet Language Transformations
figure 1 : instantiating an xsltprocessor var xsltprocessor = new xsltprocessor(); // load the xsl file using synchronous (third
param is set to false) xmlhttprequest var myxmlhttprequest = new xmlhttprequest(); myxmlhttprequest.open("get", "example.xsl", false); myxmlhttprequest.send(null); var xslref = myxmlhttprequest.responsexml; // finally import the .xsl xsltprocessor.importstylesheet(xslref); for the actual transformation, xsltprocessor requires an xml document, which is used in conjunction with the import...
...the first
parameter references the dom node to clone.
... by making the second
parameter "true", it will clone all descendants as well (a deep clone).
...And 2 more matches
base64 - Archive of obsolete content
parameters data : string the data to encode charset : string the charset of the string to encode (optional).
...in order to encode and decode unicode strings, the charset
parameter needs to be set: var base64 = require("sdk/base64"); var encodeddata = base64.encode(unicodestring, "utf-8"); returns string : the encoded string decode(data, charset) decodes a string of data which has been encoded using base-64 encoding.
...
parameters data : string the encoded data charset : string the charset of the string to encode (optional).
...in order to encode and decode unicode strings, the charset
parameter needs to be set: var base64 = require("sdk/base64"); var decodeddata = base64.decode(encodeddata, "utf-8"); returns string : the decoded string ...
page-worker - Archive of obsolete content
parameters options : object optional options: name type contenturl string the url of the content to load in the panel.
...
parameters message : value the message to send.
...
parameters type : string the type of event to listen for.
...
parameters type : string the type of event for which listener was registered.
passwords - Archive of obsolete content
ociated with your add-on, use the url property, initialized from self.uri: function show_my_addon_passwords() { require("sdk/passwords").search({ url: require("sdk/self").uri, oncomplete: function oncomplete(credentials) { credentials.foreach(function(credential) { console.log(credential.username); console.log(credential.password); }); } }); }
parameters options : object required options: name type oncomplete function the callback function that is called once the function completes successfully.
... the options
parameter may also include oncomplete and onerror callback functions, which are called when the function has completed successfully and when it encounters an error, respectively.
...
parameters options : object required options: name type username string the username for the credential.
...re("sdk/passwords").remove); }) }); to change an existing credential just call store after remove succeeds: require("sdk/passwords").remove({ realm: "user registration", username: "joe", password: "secret123" oncomplete: function oncomplete() { require("sdk/passwords").store({ realm: "user registration", username: "joe", password: "{new password}" }) } });
parameters options : object required options: name type username string the username for the credential.
querystring - Archive of obsolete content
globals functions stringify(fields, separator, assignment) serializes an object containing name:value pairs into a query string: querystring.stringify({ foo: 'bar', baz: 4 }); // => 'foo=bar&baz=4' by default '&' and'=' are used as separator and assignment characters, but you can override this using additional optional
parameters: querystring.stringify({ foo: 'bar', baz: 4 }, ';', ':'); // => 'foo:bar;baz:4'
parameters fields : object the data to convert to a query string.
... parse(querystring, separator, assignment) parse a query string into an object containing name:value pairs: querystring.parse('foo=bar&baz=bla') // => { foo: 'bar', baz: 'bla' } optionally separator and assignment arguments may be passed to override default '&' and '=' characters: querystring.parse('foo:bar|baz:bla', '|', ':') // => { foo: 'bar', baz: 'bla' }
parameters querystring : string the query string.
...
parameters query : string the query string to escape.
...
parameters query : string an escaped query string.
timers - Archive of obsolete content
parameters callback : function function to be called.
...
parameters id : integer an id returned from settimeout().
...
parameters callback : function function to be called.
...
parameters id : integer an id returned from setinterval().
event/core - Archive of obsolete content
parameters target : object event target object.
...
parameters target : object event target object.
...
parameters target : object event target object.
...
parameters target : object event target object.
io/byte-streams - Archive of obsolete content
parameters inputstream : stream the backing stream, an nsiinputstream.
...
parameters outputstream : stream the backing stream, an nsioutputstream.
...
parameters numbytes : number the number of bytes to read.
...
parameters str : string the string to write.
system/events - Archive of obsolete content
var events = require("sdk/system/events"); var { ci } = require("chrome"); function listener(event) { var channel = event.subject.queryinterface(ci.nsihttpchannel); channel.setrequestheader("user-agent", "mybrowser/1.0", false); } events.on("http-on-modify-request", listener); globals functions emit(type, event) send an event to observer service
parameters type : string the event type.
... on(type, listener, strong) listen to events of a given type
parameters type : string the event type name to watch.
... once(type, listener, strong) listen only once to a particular event type
parameters type : string the event type name to watch.
... off(type, listener) stop listening for an event
parameters type : string the event type name to unsubscribe to.
util/collection - Archive of obsolete content
parameters array : array if array is given, it will be used as the backing array.
...
parameters object : object the property will be defined on this object.
...
parameters itemoritems : object an item or array of items.
...
parameters itemoritems : object an item or array of items.
Preferences - Archive of obsolete content
here are the idl definitions: void getcomplexvalue(in string aprefname, in nsiidref atype, [iid_is(atype), retval] out nsqiresult avalue); void setcomplexvalue(in string aprefname, in nsiidref atype, in nsisupports avalue); as you can see, both of them take a
parameter, atype, which can have one of the following values (to be precise, you should pass components.interfaces.nsiwhatever instead of just nsiwhatever, which is undefined).
... if there's a value of the expected type in the default tree, it is returned (with the only exception being that calling getcomplexvalue() with atype
parameter specified as nsipreflocalizedstring, described above).
... // extensions.myextension.pref1 was changed break; case "pref2": // extensions.myextension.pref2 was changed break; } } } myprefobserver.register(); and next, here is a more evolved version of the previous code better fit for code reuse both within a project and across projects (for example, using javascript code modules): /** * @constructor * * @
param {string} branch_name * @
param {function} callback must have the following arguments: * branch, pref_leaf_name */ function preflistener(branch_name, callback) { // keeping a reference to the observed preference branch or it will get // garbage collected.
...s["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice); this._branch = prefservice.getbranch(branch_name); this._branch.queryinterface(components.interfaces.nsiprefbranch2); this._callback = callback; } preflistener.prototype.observe = function(subject, topic, data) { if (topic == 'nspref:changed') this._callback(this._branch, data); }; /** * @
param {boolean=} trigger if true triggers the registered function * on registration, that is, when this method is called.
Updating addons broken by private browsing changes - Archive of obsolete content
nsihttpauthmanager: setauthidentity and getauthidentity now take an optional boolean
parameter to indicate whether the identity is classified as private.
... nsistricttransportsecurityservice: processstsheader, removestsstate, isstshost, and isstsuri now take a flags
parameter that understands nsisocketprovider.no_permanent_storage or nothing.
... chrome apis openbrowserwindow: takes an optional
parameter to indicate desired properties of the window.
... openlinkin: can receive an extra private boolean property in the
parameter object.
Dehydra Function Reference - Archive of obsolete content
require supports optional named arguments via javascript object where each
parameter is a property.
...strict boolean: controls js strict mode werror boolean: turns js warnings into errors gczeal int: this is a write-only
parameter to set turn on frequent garbage collection.
... optional: code is an integer
parameter that allows warnings to be enabled(-wfoo) and disabled(-wno-) on the gcc commandline.
... this
parameter is used when the first argument to warning() is an integer.
Dehydra Object Reference - Archive of obsolete content
.
parameters array of variable objects a function definition's
parameter names and types .memberof aggregate type object indicates the aggregate type(class/struct) in the type system that this variable is a member of.
... .hasdefault boolean flag applicable to function
parameters only.
... indicates whether the
parameter has a default value, e.g.
... .
parameters array of type objects the
parameter types for the function.
Twitter - Archive of obsolete content
the first is simple: define properties on the object corresponding to the
parameters of the twitter method.
... for instance, some twitter methods have an id
parameter, so you would define an id property and set its value to a user's id.
... (you can read about the
parameters of the various methods at twitter's api reference.) there are two special, optional properties: success and error.
...in other words, define a data property that is itself an object whose properties correspond to the
parameters of the twitter method.
DOM Interfaces - Archive of obsolete content
parameters elt - the element to retrieve anonymous children for.
...
parameters elt - the element to retrieve anonymous children for.
...
parameters node - the node for which the bound element responsible for generation is desired.
...
parameters documenturl of type domstring - the url of a binding document.
confirm - Archive of obsolete content
method of install object syntax int confirm( string atext ); int confirm( string atext, string adialogtitle, number abuttonflags, string abutton0title, string abutton1title, string abutton2title, string acheckmsg, object acheckstate );
parameters the second, extended confirm() method is supported starting with gecko 1.8.
... it accepts any number of
parameters up to 8.
... previous gecko versions only support the first, one-
parameter method and will throw an error on occuring the extended form.
...constants button_title_ok: an 'ok' button button_title_cancel: a 'cancel' button button_title_yes: a 'yes' button button_title_no: a 'no' button button_title_save: a 'save' button button_title_dont_save: a 'don't save' button button_title_revert: a 'revert' button button_title_is_string: custom title specified by the corresponding abuttonxtitle
parameter other constants button_pos_0_default: specifies button 0 as the default button.
getFolder - Archive of obsolete content
method of install object syntax filespecobject getfolder ( string foldername); filespecobject getfolder ( string foldername, string subdirectory); filespecobject getfolder ( object localdirspec, string subdirectory);
parameters the getfolder method has the following
parameters: foldername a string representing one of netscape's standard directories.
... there are two sets of possible values for this
parameter.
...this
parameter is available in netscape 6 or later and may be case sensitive (depending on the operating system).
...pdata" "win common files" "win desktop" "win desktop common" "win program files" "win programs" "win programs common" "win startmenu" "win startmenu common" "win startup" "win startup common" "win system" the "file:///" form is only valid when the subdirectory
parameter is used.
patch - Archive of obsolete content
ntax int patch ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath);
parameters the patch method has the following
parameters: registryname the pathname in the client version registry for the component that is to be patched.this
parameter can be an absolute pathname, such as /royalairways/royalsw/executable or a relative pathname, such as executable.
...this
parameter can also be null, in which case the xpisourcepath
parameter is used as a relative pathname.
... relativelocalpath a pathname relative to the localdirspec
parameter that identifies the subcomponent that is to be patched.
...if this
parameter is blank or null, xpisourcepath is used.
textbox (Toolkit autocomplete) - Archive of obsolete content
attributes accesskey, autocompletepopup, autocompletesearch, autocompletesearch
param, completedefaultindex, completeselectedindex,crop, disableautocomplete, disabled, disablekeynavigation, enablehistory, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputtooltiptext, label, maxlength, maxrows, minresultsforpopup, nomatch, onchange, oninput, onsearchcomplete, ontextentered, ontextreverted, open, 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, searchcount, search
param, 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 a character that is used as a shortcut key.
... autocompletesearch
param new in thunderbird 2 requires seamonkey 1.1 type: string a string which is passed to the search component.
... search
param new in thunderbird 15 requires seamonkey 2.12 type: string gets and sets the value of the autocompletesearch
param attribute.
Textbox (XPFE autocomplete) - Archive of obsolete content
attributes accesskey, alwaysopenpopup, autocompletesearch, autocompletesearch
param, autofill, autofillaftermatch, autofill, completedefaultindex, crop, disableautocomplete, disableautocomplete, disabled, disablehistory, enablehistory, focused, forcecomplete, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, ignoreblurwhilesearching, inputtooltiptext, label, maxlength, maxrows, minresultsforpopup, minresultsforpopup, nomatch, onchange, onerrorcommand, oninput, onsear...
... 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, searchcount, search
param, searchsessions, selectionend, selectionstart, sessioncount, showcommentcolumn, showpopup, size, tabindex, tabscrolling, textlength, textvalue, timeout, type, useraction, value methods addsession, clearresults, getdefaultsession, getresultat, getresultcount, getresultvalueat, getsession, getsessionbyname, getsessionresultat, getsessionstatusat, getsessionvalueat, removesession, se...
... autocompletesearch
param new in thunderbird 2 requires seamonkey 1.1 type: string a string which is passed to the search component.
... search
param new in thunderbird 15 requires seamonkey 2.12 type: string gets and sets the value of the autocompletesearch
param attribute.
calICalendarViewController - Archive of obsolete content
in calidatetime anewstarttime, in calidatetime anewendtime); void deleteoccurrence (in caliitemoccurrence aoccurrence); }; methods createnewevent void createnewevent (in calicalendar acalendar, in calidatetime astarttime, in calidatetime aendtime); the createnewevent method is used for creating a new calievent in the calicalendar specified by the acalendar
parameter.
...the calidatetime
parameters are optional, but aendtime cannot be included without astarttime.
...the calievent should have its enddate set to aendtime, if this
parameter is specified.
...the calidatetime
parameters must either both be specified, or neither.
NPN_GetAuthenticationInfo - Archive of obsolete content
const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen);
parameters this function has the following
parameters: instance pointer to the current plug-in instance protocol protocol name (uri scheme) host host name port port number scheme http authentication scheme name realm http authentication realm username out
parameter.
... ulen out
parameter.
... password out
parameter.
... plen out
parameter.
NPN_PostURL - Archive of obsolete content
syntax #include <npapi.h> nperror npn_posturl(npp instance, const char *url, const char *target, uint32 len, const char *buf, npbool file);
parameters the function has the following
parameters: instance pointer to the current plug-in instance.
...if the target
parameter is null, the new stream is passed to the plug-in regardless of mime type.
... when you use npn_posturl to send data to the server, you can handle the response in several different ways by specifying different target
parameters.
...you can also write the response data to a frame by specifying the frame name as the target
parameter.
NPStream - Archive of obsolete content
for these streams, notifydata is set to the value of the notifydata
parameter to npn_geturlnotify or npn_posturlnotify.
... description the browser allocates and initializes the npstream object and passes it to the plug-in in as a
parameter to npp_newstream or npn_newstream.
...streams produced by the browser: the browser creates the npstream object and passes it to the plug-in initially as a
parameter to npp_newstream.
...streams produced by the plug-in: the browser creates the npstream object and returns it as an output
parameter when the plug-in calls npp_newstream.
RDF in Mozilla FAQ - Archive of obsolete content
refresh() takes a single
parameter that indicates whether you'd like it to perform its operation synchronously ("blocking") or asynchrounously ("non-blocking").
... alternatively, if your datasource already has an object that is an rdf container, you can instantiate an nsirdfcontainer object with the @mozilla.org/rdf/container;1 contractid and init() it with the datasource and resource as
parameters.
... rdfcat url takes as a
parameter a url from which to read an rdf/xml file, and will "cat" the file back to the console.
... rdfpoll url [interval ] takes as a
parameter a url from which to read an rdf/xml file.
Audio for Web games - Game development
start() takes two optional
parameters.
... here's a bit of code that given a tempo (the time in seconds of your beat/bar) will calculate how long to wait until you play the next part — you feed the resulting value to the start() function with the first
parameter, which takes the absolute time of when that playback should commence.
... note the second
parameter (where to start playing from in the new track) is relative: if (offset == 0) { source.start(); offset = context.currenttime; } else { var relativetime = context.currenttime - offset; var beats = relativetime / tempo; var remainder = beats - math.floor(beats); var delay = tempo - (remainder*tempo); source.start(context.currenttime+delay, relativetime+delay); } note: you can try our wait calculator code here, on jsfiddle (i've synched to the bar in this case).
... note: if the first
parameter is 0 or less than the context currenttime, playback will commence immediately.
Animations and tweens - Game development
loading the animation next up, go into your create() function, find the line that loads the ball sprite, and below it put the call to animations.add() seen below: ball = game.add.sprite(50, 250, 'ball'); ball.animations.add('wobble', [0,1,0,2,0,1,0,2,0], 24); to add an animation to the object we use the animations.add() method, which contains the following
parameters the name we chose for the animation an array defining the order in which to display the frames during the animation.
... applying the animation when the ball hits the paddle in the arcade.collide() method call that handles the collision between the ball and the paddle (the first line inside update(), see below) we can add an extra
parameter that specifies a function to be executed every time the collision happens, in the same fashion as the ballhitbrick() function.
... update the first line inside update() as shown below: function update() { game.physics.arcade.collide(ball, paddle, ballhitpaddle); game.physics.arcade.collide(ball, bricks, ballhitbrick); paddle.x = game.input.x || game.world.width*0.5; } then we can create the ballhitpaddle() function (having ball and paddle as default
parameters), playing the wobble animation when it is called.
...it takes an object containing the chosen
parameter's desired ending values (scale takes a scale value, 1 being 100% of size, 0 being 0% of size, etc.), the time of the tween in milliseconds and the type of easing to use for the tween.
Index - MDN Web Docs Glossary: Definitions of Web-related terms
7 arpa glossary, infrastructure .arpa (address and routing
parameter area) is a top-level domain used for internet infrastructure purposes, especially reverse dns lookup (i.e., find the domain name for a given ip address).
... 315
parameter codingscripting, glossary, javascript a
parameter is a named variable passed into a function.
...
parameter variables are used to import arguments into functions.
...truly random numbers (say, from a radioactive source) are utterly unpredictable, whereas all algorithms are predictable, and a prng returns the same numbers when passed the same starting
parameters or seed.
Signature (functions) - MDN Web Docs Glossary: Definitions of Web-related terms
a signature can include:
parameters and their types a return value and type exceptions that might be thrown or passed back information about the availability of the method in an object-oriented program (such as the keywords public, static, or prototype).
... the method accepts one
parameter, which is called value and is not further defined.
...java is strictly typed and will check any
parameters at compilation time if they are correct.
... the method accepts one
parameter of type string array.
Introducing asynchronous JavaScript - Learn web development
an example of an async callback is the second
parameter of the addeventlistener() method (as we saw in action above): btn.addeventlistener('click', () => { alert('you clicked me!'); let pelem = document.createelement('p'); pelem.textcontent = 'this is a newly-added paragraph.'; document.body.appendchild(pelem); }); the first
parameter is the type of event to be listened for, and the second
parameter is a callback function that is invoke...
...however, we then create a loadasset() function that takes a callback as a
parameter, along with a url to fetch and a content type.
...the expected
parameter of foreach() is a callback function, which itself takes two
parameters, a reference to the array name and index values.
... here we see fetch() taking a single
parameter — the url of a resource you want to fetch from the network — and returning a promise.
Function return values - Learn web development
previous article in this series): let mytext = 'the weather is cold'; let newstring = mytext.replace('cold', 'warm'); console.log(newstring); // should print "the weather is warm" // the replace() string function takes a string, // replaces one substring with another, and returns // a new string with the replacement made the replace() function is invoked on the mytext string, and is passed two
parameters: the substring to find ('cold').
...the random() function takes one
parameter — a whole number — and it returns a whole random number between 0 and that number.
...nitions: function squared(num) { return num * num; } function cubed(num) { return num * num * num; } function factorial(num) { if (num < 0) return undefined; if (num == 0) return 1; let x = num - 1; while (x > 1) { num *= x; x--; } return num; } the squared() and cubed() functions are fairly obvious — they return the square or cube of the number that was given as a
parameter.
...it is generally a good idea to check that any necessary
parameters are validated, and that any optional
parameters have some kind of default value provided.
Adding features to our bouncing balls demo - Learn web development
you also need to add a new
parameter to the new ball() ( ...
... ) constructor call — the exists
parameter should be the 5th
parameter, and should be given a value of true.
... you should do this something like shape.call(this, x, y, 20, 20, exists); it should also define its own properties, as follows: color — 'white' size — 10 again, remember to define your inherited properties as
parameters in the constructor, and set the prototype and constructor properties correctly.
... first of all, create a new evil circle object instance (specifying the necessary
parameters), then call its setcontrols() method.
Inheritance in JavaScript - Learn web development
the first
parameter specifies the value of this that you want to use when running the function, and the other
parameters are those that should be passed to the function when it is invoked.
... we want the teacher() constructor to take the same
parameters as the person() constructor it is inheriting from, so we specify them all as
parameters in the call() invocation.
... inheriting from a constructor with no
parameters note that if the constructor you are inheriting from doesn't take its property values from
parameters, you don't need to specify them as additional arguments in call().
... example, if you had something really simple like this: function brick() { this.width = 10; this.height = 20; } you could inherit the width and height properties by doing this (as well as the other steps described below, of course): function blueglassbrick() { brick.call(this); this.opacity = 0.5; this.color = 'blue'; } note that we've only specified this inside call() — no other
parameters are required as we are not inheriting any properties from the parent that are set via
parameters.
Working with JSON - Learn web development
add the following line: request.open('get', requesturl); this takes at least two
parameters — there are other optional
parameters available.
...the following function definition below the previous code: function populateheader(jsonobj) { const myh1 = document.createelement('h1'); myh1.textcontent = jsonobj['squadname']; header.appendchild(myh1); const mypara = document.createelement('p'); mypara.textcontent = 'hometown: ' + jsonobj['hometown'] + ' // formed: ' + jsonobj['formed']; header.appendchild(mypara); } we named the
parameter jsonobj, to remind ourselves that this javascript object originated from json.
...luckily, these two problems are so common in web development that a built-in json object is available in browsers, which contains the following two methods: parse(): accepts a json string as a
parameter, and returns the corresponding javascript object.
... stringify(): accepts an object as a
parameter, and returns the equivalent json string form.
Object building practice - Learn web development
function ball(x, y, velx, vely, color, size) { this.x = x; this.y = y; this.velx = velx; this.vely = vely; this.color = color; this.size = size; } here we include some
parameters that define the properties each ball needs in order to function in our program: x and y coordinates — the horizontal and vertical coordinates where the ball starts on the screen.
...its
parameters are: the x and y position of the arc's center — we are specifying the ball's x and y properties.
... the last two
parameters specify the start and end number of degrees around the circle that the arc is drawn between.
...our loop() function does the following: sets the canvas fill color to semi-transparent black, then draws a rectangle of the color across the whole width and height of the canvas, using fillrect() (the four
parameters provide a start coordinate, and a width and height for the rectangle drawn).
Componentizing our Svelte app - Learn web development
the child component will execute the handler, passing the needed information as a
parameter, and the handler will modify the parent's state.
...whenever the user clicks on any filter button, the child will call the onclick handler, passing the selected filter as a
parameter, back up to its parent.
...go back to this file and update your <todo> component call like so: <todo {todo} on:remove={e => removetodo(e.detail)} /> our handler receives the e
parameter (the event object), which as described before holds the todo being deleted in the detail property.
... when the user clicks on the checkbox we call the ontoggle() function, which executes update(), passing an object with the new completed value as a
parameter.
Adding a new todo form: Vue events, methods, and models - Learn web development
.passive: equivalent to using the { passive: true }
parameter when creating an event listener in vanilla javascript using addeventlistener().
...this is done by including the data you want to pass as another
parameter in the $emit() method: this.$emit("todo-added", this.label).
... update your onsubmit() method like so: onsubmit() { this.$emit('todo-added', this.label) } to actually pick up this data inside app.vue, we need to add a
parameter to our addtodo() method that includes the label of the new to-do item.
...but this is easy to fix — because we're using v-model to bind the data to the <input> in todoform, if we set the name
parameter to equal an empty string, the input will update as well.
Creating MozSearch plugins
a mozsearch search plugin is an xml file that describes the search engine, its url, and the
parameters that need to be passed to that url.
...16" height="16">data:image/x-icon;base64,r0lgodlheaaqajecap8aaaaaap///waaach5baeaaaialaaaaaaqabaaaaipli+py+0nogquybdened2khkffwuamezmpzsfmaihphrrguum/ft+uwaaow==</image> <url type="application/x-suggestions+json" method="get" template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchterms}" /> <url type="text/html" method="get" template="http://search.yahoo.com/search"> <
param name="p" value="{searchterms}"/> <
param name="ei" value="utf-8"/> <moz
param name="fr" condition="pref" pref="yahoo-fr" /> </url> <searchform>http://search.yahoo.com/</searchform> </searchplugin> let's say the user chooses to use the yahoo!
...lkgmq7ykczxpcqxquzhaeccj4xgml493ug21zd%2badaxh0wlm4a9mzpxjkjiiawtar5pqmalacabquulttbgccagcnnzgabbgamj5thwgvjlaaaaabjru5erkjggg%3d%3d</image> <url type="text/html" method="get" template="http://developer.mozilla.org/en/docs/special:search?search={searchterms}"/> <searchform>http://developer.mozilla.org/en/docs/special:search</searchform> </searchplugin> notice in this case that instead of using <
param> to define
parameters to the search engine, they're simply embedded inside the template url.
...<
param> should be used for post.
Communicating with frame scripts
asynchronous messaging to send an asynchronous message the frame script uses the global sendasyncmessage() function: // frame script sendasyncmessage("my-addon@me.org:my-e10s-extension-message"); sendasyncmessage() takes one mandatory
parameter, which is the name of the message.
... data the json object passed as the second
parameter to sendasyncmessage().
...ger, you can use the message manager's sendasyncmessage method: // chrome script browser.messagemanager.sendasyncmessage("my-addon@me.org:message-from-chrome"); if you have a window or a global message manager, you need to use the broadcastasyncmessage method: // chrome script window.messagemanager.broadcastasyncmessage("my-addon@me.org:message-from-chrome"); these methods takes one mandatory
parameter, which is the message name.
...this takes two
parameters: the name of the message and a listener function.
Downloads.jsm
promise<download> createdownload( object aproperties );
parameters aproperties provides the initial properties for the newly created download.
... promise fetch( asource, atarget, object aoptions );
parameters asource string containing the uri for the download source.
... promise<downloadlist> getlist(atype);
parameters atype this can be downloads.public, downloads.private, or downloads.all.
... promise<downloadsummary> getsummary(atype);
parameters atype this can be downloads.public, downloads.private, or downloads.all.
Deferred
void resolve( avalue );
parameters avalue optional if this value is not a promise, including undefined, it becomes the fulfillment value of the associated promise.
... void reject( areason );
parameters areason optional the rejection reason for the associated promise.
... * * @
param {anything} value : this value is used to resolve the promise * if the value is a promise then the associated promise assumes the state * of promise passed as value.
... * * @
param {anything} reason: the reason for the rejection of the promise.
Date and Time
macros for time unit conversion types and constants time
parameter callback functions functions macros for time unit conversion macros for converting between seconds, milliseconds, microseconds, and nanoseconds.
... pr_msec_per_sec pr_usec_per_sec pr_nsec_per_sec pr_usec_per_msec pr_nsec_per_msec types and constants types and constants defined for nspr dates and times are: prtime prtime
parameters prexplodedtime time
parameter callback functions in some geographic locations, use of daylight saving time (dst) and the rule for determining the dates on which dst starts and ends have changed a few times.
... you can define your own time
parameter callback functions, which must conform to the definition prtime
paramfn.
... two often-used callback functions of this type are provided by nspr: prtime
paramfn pr_localtime
parameters and pr_gmt
parameters functions the functions that create and manipulate time and date values are: pr_now pr_explodetime pr_implodetime pr_normalizetime ...
PRSeekWhence
specifies how to interpret the offset
parameter in setting the file pointer associated with the fd
parameter for the pr_seek and pr_seek64 functions.
... syntax #include <prio.h> typedef prseekwhence { pr_seek_set = 0, pr_seek_cur = 1, pr_seek_end = 2 } prseekwhence; enumerators the enumeration has the following enumerators: pr_seek_set sets the file pointer to the value of the offset
parameter.
... pr_seek_cur sets the file pointer to its current location plus the value of the offset
parameter.
... pr_seek_end sets the file pointer to the size of the file plus the value of the offset
parameter.
PR_CWait
syntax #include <prcmon.h> prstatus pr_cwait( void *address, printervaltime timeout);
parameters the function has the following
parameters: address the address of the protected object--the same address previously passed to pr_centermonitor.
... returns the function returns one of the following values: pr_success indicates either that the monitored object has been notified or that the interval specified in the timeout
parameter has been exceeded.
... description using the value specified in the address
parameter to find a monitor in the monitor cache, pr_cwait waits for a notification that the monitor's state has changed.
... the thread waiting on the monitor resumes execution when the monitor is notified (assuming the thread is the next in line to receive the notify) or when the interval specified in the timeout
parameter has been exceeded.
PR_CreateThread
syntax #include <prthread.h> prthread* pr_createthread( prthreadtype type, void (*start)(void *arg), void *arg, prthreadpriority priority, prthreadscope scope, prthreadstate state, pruint32 stacksize);
parameters pr_createthread has the following
parameters: type specifies that the thread is either a user thread (pr_user_thread) or a system thread (pr_system_thread).
... arg a pointer to the root function's only
parameter.
... nspr does not assess the type or the validity of the value passed in this
parameter.
...if you pass zero in this
parameter, pr_createthread chooses the most favorable machine-specific stack size.
PR_Open
syntax #include <prio.h> prfiledesc* pr_open( const char *name, printn flags, printn mode);
parameters the function has the following
parameters: name the pathname of the file to be opened.
...if the flags
parameter does not include any of the first three flags (pr_rdonly, pr_wronly, or pr_rdwr), the open file can't be read or written, which is not useful.
...possible values of the mode
parameter are listed in the table below.
...if a new file is created as a result of the pr_open call, its file mode bits are set according to the mode
parameter.
PR_OpenSharedMemory
syntax #include <prshm.h> nspr_api( prsharedmemory * ) pr_opensharedmemory( const char *name, prsize size, printn flags, printn mode ); /* define values for pr_opensharememory(...,create) */ #define pr_shm_create 0x1 /* create if not exist */ #define pr_shm_excl 0x2 /* fail if already exists */
parameters the function has the following
parameters: name the name of the shared memory segment.
...when
parameter create is (pr_shm_excl | pr_shm_create) and the shared memory already exists, the function returns null with the error set to pr_file_exists_error.
... when
parameter create is pr_shm_create and the shared memory already exists, a handle to that memory segment is returned.
... when
parameter create is 0, and the shared memory exists, a pointer to a prsharedmemory structure is returned.
NSS 3.39 release notes
nss 3.39 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_39_rtm/src/ new in nss 3.39 new functionality the tstclnt and selfserv utilities added support for configuring the enabled tls signature schemes using the -j
parameter.
... previous versions of nss accepted an rsa pkcs#1 v1.5 signature where the digestinfo structure was missing the null
parameter.
... starting with version 3.39, nss requires the encoding to contain the null
parameter.
... the tstclnt and selfserv test utilities no longer accept the -z
parameter, as support for tls compression was removed in a previous nss version.
EncDecMAC using token object - sample 3
rintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *sec
param = pk11_
paramfromiv(ckm_aes_cbc, &ivitem); if (sec
param == null) { pr_fprintf(pr_stderr, "crypt failed : sec
param null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, sec
param); if (ctx == null) { pr_fprintf(pr_stderr, "crypt failed : can't create a context\n"); goto cleanup; } cleanup: if (sec
param) { secitem_freeitem(sec
param, pr_true); } return ctx; } /* * comm...
...in, inlen); } /* * encryptinit */ pk11context * encryptinit(pk11symkey *ek, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* * read cryptographic
parameters from the header file */ secstatus readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; outbuf.type = sibuffer; file = pr_open(filename, pr_rdonly, 0); if (!file) { pr_fprintf(pr_stderr, "failed to open %s\n",...
...yptandmac */ secstatus encryptandmac(prfiledesc *infile, prfiledesc *headerfile, prfiledesc *encfile, pk11symkey *ek, pk11symkey *mk, unsigned char *iv, unsigned int ivlen, prbool ascii) { secstatus rv; unsigned char ptext[blocksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[blocksize]; unsigned int encbuflen; secitem no
params = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglength; static unsigned int firsttime = 1; int j; ctxmac = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, mk, &no
params); if (ctxmac == null) { pr_fprintf(pr_stderr, "can't create mac context\n"); rv = secfailure; goto cleanup; } rv = macinit(ctxmac); if ...
...ditem) { secstatus rv; prfiledesc* 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 no
params = { 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; memcpy(iv, ivitem->data, ivitem->len); paddinglength = (unsigned int)paditem->data[0]; ctxmac = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, mk, &no
params); if (ctxmac == null) { pr_fprint...
NSS tools : modutil
(y/n) y using installer script "installer_script" successfully parsed installation script current platform is linux:5.4.08:x86 using installation
parameters for platform linux:5.4.08:x86 installed file crypto.so to /tmp/crypto.so installed file setup.sh to ./pk11inst.dir/setup.sh executing "./pk11inst.dir/setup.sh"...
... "./pk11inst.dir/setup.sh" executed successfully installed module "example pkcs #11 module" into module database installation completed successfully adding module spec each module has information stored in the security database about its configuration and
parameters.
...(this information can be edited by loading new specs using the -rawadd command.) modutil -rawlist -dbdir sql:/home/my/sharednssdb name="nss internal pkcs #11 module"
parameters="configdir=.
... certprefix= keyprefix= secmod=secmod.db flags=readonly " nss="trustorder=75 cipherorder=100 slot
params={0x00000001=[slotflags=rsa,rc4,rc2,des,dh,sha1,md5,md2,ssl,tls,aes,random askpw=any timeout=30 ] } flags=internal,critical" setting a default provider for security mechanisms multiple security modules may provide support for the same security mechanisms.
NSS tools : modutil
(y/n) y using installer script "installer_script" successfully parsed installation script current platform is linux:5.4.08:x86 using installation
parameters for platform linux:5.4.08:x86 installed file crypto.so to /tmp/crypto.so installed file setup.sh to ./pk11inst.dir/setup.sh executing "./pk11inst.dir/setup.sh"...
... "./pk11inst.dir/setup.sh" executed successfully installed module "example pkcs #11 module" into module database installation completed successfully adding module spec each module has information stored in the security database about its configuration and
parameters.
...(this information can be edited by loading new specs using the -rawadd command.) modutil -rawlist -dbdir sql:/home/my/sharednssdb name="nss internal pkcs #11 module"
parameters="configdir=.
... certprefix= keyprefix= secmod=secmod.db flags=readonly " nss="trustorder=75 cipherorder=100 slot
params={0x00000001=[slotflags=rsa,rc4,rc2,des,dh,sha1,md5,md2,ssl,tls,aes,random askpw=any timeout=30 ] } flags=internal,critical" setting a default provider for security mechanisms multiple security modules may provide support for the same security mechanisms.
Bytecode Descriptions
this instruction and the branch around the iterator loop are emitted only when arr is itself a rest
parameter, as in (...arr) => f(...arr), a strong hint that it's a packed array whose prototype is array.prototype.
... the weird scoping rules for functions with default
parameter expressions, as specified in functiondeclarationinstantiation step 28 ("note: a separate environment record is needed...").
... rest stack: ⇒ rest create and push the rest
parameter array for current function call.
... this must appear only in a script for a function that has a rest
parameter.
JSClass.call
var custom = new specialcustomobject(); custom(); // the jsclass.call hook receives the global object as the obj
parameter.
... new custom(); // the jsclass.construct hook receives the global object as the obj
parameter.
... var x = { specialmethod: custom }; x.specialmethod(); // the jsclass.call hook receives x as the obj
parameter.
... new x.specialmethod(); // the jsclass.construct hook receives x as the obj
parameter.
JS_ConvertArguments
(the purpose is to ensure gc safety.) format const char * null-terminated string describing the types of the out
parameters and how to convert the values in argv.
... void * out
parameters.
...there must be one pointer for each
parameter described in format.
... variables for optional
parameters must already be initialized, because if an optional
parameter is not in argv, js_convertarguments does not modify the corresponding variable.
JS_GetPropertyAttrsGetterAndSetter
attrsp unsigned int * out
parameter.
... foundp jsbool * out
parameter.
... getterp jspropertyop * out
parameter.
... setterp jspropertyop * out
parameter.
JS_NewArrayObject
obsolete since jsapi 30 description js_newarrayobject with contents
parameter creates a new array object with the specified contents elements.
... js_newarrayobject with length
parameter creates a new array object with the specified length; the result is like the javascript expression new array(length).
... js_newarrayobject with length
parameter creates a new array object with the specified length.
... see also mxr id search for js_newarrayobject bug 969812 - change
parameter to contents ...
JS_SetOptions
to turn individual options on or off, use js_setoptions with js_getoptions: // turn on warnings for dubious practices js_setoptions(cx, js_getoptions(cx) | jsoption_extra_warnings); // turn off those extra warnings js_setoptions(cx, js_getoptions(cx) & ~jsoption_extra_warnings); the options
parameter and the return value are the logical or of zero or more constants from the following table: option description jsoption_extra_warnings warn on dubious practice.
... mxr id search for jsoption_werror jsoption_varobjfix make js_evaluatescript() use the last object on its obj
param's scope chain (that is, the global object) as the ecma "variables object".
... mxr id search for jsoption_moar_xml jsoption_native_branch_callback the branch callback set by js_setbranchcallback may be called with a null script
parameter, by native code that loops intensively.
... mxr id search for jsoption_jit jsoption_no_script_rval added in spidermonkey 1.8.1 by setting this option, the application promises to the compiler that a null rval out-
param will be passed to each call to js_executescript.
SpiderMonkey 1.8.5
getters and setters of type jspropertyop took an id
parameter of type jsval.
... the type of the
parameter has been changed to jsid.
...to migrate, simply add a jsbool strict
parameter to each setter function.
...sversion js_evaluateucscriptforprincipalsversion js_executeregexp js_executeregexpnostatics js_executescriptversion js_forget_string_flatness js_fileescapedstring js_finishjsonparse (removed in future releases, replaced with js_parsejson) js_flatstringequalsascii js_flattenstring js_flushcaches js_freezeobject js_getcompartmentprivate js_getemptystring js_getflatstringchars js_getgc
parameter js_getgc
parameterforthread js_getglobalforscopechain js_getinternedstringchars js_getinternedstringcharsandlength js_getownpropertydescriptor js_getpropertyattrsgetterandsetterbyid js_getpropertybyid js_getpropertybyiddefault js_getpropertydefault js_getpropertydescriptorbyid js_getruntimesecuritycallbacks js_getsecuritycallbacks js_getstringcharsandlength js_getstringcharsz js...
Using the Places livemark service
var newlvmkid = livemarkservice.createlivemark(parentfolderid, "livemark name", uri("http://example.com/"), uri("http://example.com/rss.xml"), -1); the first
parameter is the id of the folder in which to create the livemark.
... the second
parameter is the livemark's name as it will appear in the bookmark's title.
... the third
parameter is the uri of the site the livemark was created from (specified as an nsiuri object.
...r root = bmsvc.bookmarksmenufolder; // item id of the bookmarks menu var newlvmkid = livemarkservice.createlivemarkfolderonly(bmsvc, root, "livemark name", uri("http://example.com/"), uri("http://example.com/rss.xml"), -1); the
parameters here are the same as for nsilivemarkservice.createlivemark(), except for the insertion of a new
parameter at the beginning, which is the nsinavbookmarksservice to use when creating the livemark.
Using XPCOM Components
getter_addrefs(cookiemanager)); if (ns_failed(rv)) return -1; pruint32 len; deletedcookies->getlength(&len); for (int c=0; c<len; c++) cookiemanager->remove(deletedcookies[c].host, deletedcookies[c].name, deletedcookies[c].path, pr_false); xxx: in the original document, there were only the first three
parameters to the |remove| call.
... i added |pr_false| as a fourth
parameter because the interface seems to require it: http://lxr.mozilla.org/mozilla/source/netwerk/cookie/public/nsicookiemanager.idl#64 this problem also appears in the javascript version below, and i've added |false| as a fourth
parameter there as well.
...*/ } function finalizecookiedeletions() { for (var c=0; c<deletedcookies.length; c++) { cmgr.remove(deletedcookies[c].host, deletedcookies[c].name, deletedcookies[c].path, false); } deletedcookies.length = 0; } xxx: in the original document, there were only the first three
parameters to the |remove| call.
... i added |false| as a fourth
parameter because the interface seems to require it: http://lxr.mozilla.org/mozilla/source/netwerk/cookie/public/nsicookiemanager.idl#64 this problem also appears in the c++ version above, and i've added |pr_false| as a fourth
parameter there as well.
Components.utils.Sandbox
options the constructor accepts an optional
parameter.
... this
parameter is an object with the following optional properties: freshzone if true creates a new gc region separate from both the calling context's and the sandbox prototype's region.
...content scripts should pass the window they're running in as this
parameter, in order to ensure that the script is cleaned up at the same time as the content itself.
... the following objects are supported: -promise (removed in firefox 37) css indexeddb (web worker only) xmlhttprequest textencoder textdecoder url urlsearch
params atob btoa blob file crypto rtcidentityprovider fetch (added in firefox 41) caches filereader for example: var sandboxscript = 'var encoded = btoa("hello");' + 'var decoded = atob(encoded);'; var options = { "wantglobalproperties": ["atob", "btoa"] ...
operator+=
self_type& operator+=( const self_type& astring );
parameters astring [in] a nsastring to append to this string.
... self_type& operator+=( const char_type* adata );
parameters adata [in] a raw character array to append to this string.
... self_type& operator+=( char_type achar );
parameters achar [in] a character to append to this string.
...see also append
parameters astring [in] a nsastring to append to this string.
nsEmbedCString
nsembedcstring(); explicit nsembedcstring( const self_type& astring );
parameters astring [in] a nsembedcstring to copy into this string.
... nsembedcstring( const abstract_string_type& aabstractstring );
parameters aabstractstring [in] a nsacstring to copy into this string.
... explicit nsembedcstring( const abstract_string_type& aabstractstring );
parameters aabstractstring [in] a nsacstring to copy into this string.
... explicit nsembedcstring( const char_type* adata, size_type adatalength = pr_uint32_max );
parameters adata [in] a raw character array to copy into this string.
operator=
self_type& operator=( const self_type& astring );
parameters astring [in] a nsembedcstring to append to this string.
... self_type& operator=( const abstract_string_type& astring );
parameters astring [in] a nsacstring to append to this string.
... self_type& operator=( const char_type* adata );
parameters adata [in] a raw character array to append to this string.
... self_type& operator=( char_type achar );
parameters achar [in] a character to append to this string.
nsEmbedString
nsembedstring(); explicit nsembedstring( const self_type& astring );
parameters astring [in] a nsembedstring to copy into this string.
... nsembedstring( const abstract_string_type& aabstractstring );
parameters aabstractstring [in] a nsastring to copy into this string.
... explicit nsembedstring( const abstract_string_type& aabstractstring );
parameters aabstractstring [in] a nsastring to copy into this string.
... explicit nsembedstring( const char_type* adata, size_type adatalength = pr_uint32_max );
parameters adata [in] a raw character array to copy into this string.
operator=
self_type& operator=( const self_type& astring );
parameters astring [in] a nsembedstring to append to this string.
... self_type& operator=( const abstract_string_type& astring );
parameters astring [in] a nsastring to append to this string.
... self_type& operator=( const char_type* adata );
parameters adata [in] a raw character array to append to this string.
... self_type& operator=( char_type achar );
parameters achar [in] a character to append to this string.
IAccessibleApplication
[propget] hresult appname( [out] bstr name );
parameters name the application name.
...[propget] hresult appversion( [out] bstr version );
parameters version the application version.
...[propget] hresult toolkitname( [out] bstr name );
parameters name the toolkit/bridge name.
...[propget] hresult toolkitversion( [out] bstr version );
parameters version the toolkit/bridge version.
IAccessibleValue
[propget] hresult currentvalue( [out] variant currentvalue );
parameters currentvalue returns the current value represented by this object.
...[propget] hresult maximumvalue( [out] variant maximumvalue );
parameters maximumvalue returns the maximal value in an implementation dependent type.
...[propget] hresult minimumvalue( [out] variant minimumvalue );
parameters minimumvalue returns the minimal value in an implementation dependent type.
...hresult setcurrentvalue( [in] variant value );
parameters value the new value represented by this object.
imgICache
any images from windows in private browsing mode will not be present in the cache returned from a call with a null
parameter).
...void clearcache( in boolean chrome );
parameters chrome if true, evict only chrome images.
...nsiproperties findentryproperties( in nsiuri uri );
parameters uri the uri to look up.
...void removeentry( in nsiuri uri );
parameters uri the uri to remove.
imgIEncoder
methods addimageframe() void addimageframe( [array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 frameformat, in astring frameoptions );
parameters data list of bytes in the format specified by inputformat.
...frameformat missing description frameoptions missing description encodeclipboardimage() obsolete since gecko 1.9 (firefox 3) void encodeclipboardimage( in nsiclipboardimage aclipboardimage, out nsifile aimagefile );
parameters aclipboardimage missing description aimagefile missing description endimageencode() void endimageencode();
parameters none.
... initfromdata() void initfromdata( [array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 inputformat, in astring outputoptions );
parameters data list of bytes in the format specified by inputformat.
... startimageencode() void startimageencode( in pruint32 width, in pruint32 height, in pruint32 inputformat, in astring outputoptions );
parameters width width in pixels.
mozIJSSubScriptLoader
jsval loadsubscript( in string url, in object targetobj optional, in string charset optional, ); example let context = {}; services.scriptloader.loadsubscript("chrome://my-package/content/foo-script.js", context, "utf-8" /* the script's encoding */);
parameters url the url pointing to the script to load.
... loadsubscriptwithoptions() same as loadsubscript(), except that
parameters after url are expressed as an object, and a new ignorecache option is available.
... jsval loadsubscriptwithoptions( in string url, in object options );
parameters url the url pointing to the script to load.
... options an object that may include any of these
parameters: property type description target object the object to use as the scope object for the script being executed.
mozIStorageService
nsifile backupdatabasefile( in nsifile adbfile, in astring abackupfilename, in nsifile abackupparentdirectory optional );
parameters adbfile the database file to back up.
...mozistorageconnection opendatabase( in nsifile adatabasefile );
parameters adatabasefile an nsifile indicating the database file to open.
...mozistorageconnection openspecialdatabase( in string astoragekey );
parameters astoragekey a string key identifying the type of storage requested.
...mozistorageconnection openunshareddatabase( in nsifile adatabasefile );
parameters adatabasefile an nsifile indicating the database file to open.
nsIAccessibleHyperLink
nsiaccessible getanchor( in long index );
parameters index the 0-based index whose object is to be returned.
... nsiuri geturi( in long index );
parameters index the 0-based index of the uri to be returned.
... boolean isselected();
parameters none.
... boolean isvalid();
parameters none.
nsIAccessibleTreeCache
nsiaccessible getcachedtreeitemaccessible( in long arow, in nsitreecolumn acolumn );
parameters arow the row index.
...void invalidatecache( in long arow, in long acount );
parameters arow row index the invalidation starts from.
...void treeviewchanged();
parameters none.
...void treeviewinvalidated( in long astartrow, in long aendrow, in long astartcol, in long aendcol );
parameters astartrow row index invalidation starts from.
nsIAnnotationObserver
void onitemannotationremoved( in long long aitemid, in autf8string aname );
parameters aitemid the item whose annotation is to be deleted.
...void onitemannotationset( in long long aitemid, in autf8string aname );
parameters aitemid the item on which the annotation is to be set.
...void onpageannotationremoved( in nsiuri auri, in autf8string aname );
parameters auri the uri whose annotation is to be deleted.
...void onpageannotationset( in nsiuri apage, in autf8string aname );
parameters apage the uri on which the annotation is to be set.
nsIArray
null is a valid entry in the array, and as such any nsisupports
parameters may be null, except where noted.
...nsisimpleenumerator enumerate();
parameters none.
...unsigned long indexof( in unsigned long startindex, in nsisupports element );
parameters startindex the initial element to search in the array.
...void queryelementat( in unsigned long index, in nsiidref uuid, [iid_is(uuid), retval] out nsqiresult result );
parameters index position of element.
nsIAsyncInputStream
void asyncwait( in nsiinputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget );
parameters acallback this object is notified when the stream becomes ready.
... this
parameter may be null to clear an existing callback.
... aflags this
parameter specifies optional flags passed in to configure the behavior of this method.
...void closewithstatus( in nsresult astatus );
parameters astatus the error that will be reported if this stream is accessed after it has been closed.
nsIAsyncOutputStream
void asyncwait( in nsioutputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget );
parameters acallback this object is notified when the stream becomes ready.
... this
parameter may be null to clear an existing callback.
... aflags this
parameter specifies optional flags passed in to configure the behavior of this method.
...void closewithstatus( in nsresult reason );
parameters reason the error that will be reported if this stream is accessed after it has been closed.
nsIAuthModule
void getnexttoken( [const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength );
parameters aintoken a buffer containing the input token (for example a challenge from a server).
...void init( in string aservicename, in unsigned long aserviceflags, in wstring adomain, in wstring ausername, in wstring apassword );
parameters aservicename the service name, which may be null if not applicable (for example, for ntlm, this
parameter should be null).
...void unwrap( [const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength );
parameters aintoken a buffer containing the data received from the server.
...void wrap( [const] in voidptr aintoken, in unsigned long aintokenlength, in boolean confidential, out voidptr aouttoken, out unsigned long aouttokenlength );
parameters aintoken a buffer containing the data to be sent to the server.
nsIAutoCompleteSearch
method overview void startsearch(in astring searchstring, in astring search
param, in nsiautocompleteresult previousresult, in nsiautocompleteobserver listener); void stopsearch(); methods startsearch() search for a given string and notify a listener (either synchronously or asynchronously) of the result.
... void startsearch( in astring searchstring, in astring search
param, in nsiautocompleteresult previousresult, in nsiautocompleteobserver listener );
parameters searchstring the string to search for.
... search
param an extra
parameter.
...void stopsearch();
parameters none.
nsIChromeRegistry
void canonify( in nsiuri achromeurl );
parameters achromeurl the url that is to be canonified.
...void checkfornewchrome();
parameters none.
... nsiuri convertchromeurl( in nsiuri achromeurl );
parameters achromeurl the url that is to be converted.
...boolean wrappersenabled( in nsiuri auri );
parameters auri the uri for which to determine if xpcnativewrappers are enabled.
nsICommandLineRunner
void init( in long argc, in nscharptrarray argv, in nsifile workingdir, in unsigned long state );
parameters argc the number of arguments being passed.
...void run();
parameters none.
... setwindowcontext() sets the windowcontext
parameter.
... void setwindowcontext( in nsidomwindow awindow );
parameters awindow the dom window object which will be set.
nsIController
void docommand( in string command );
parameters command the name of the command to execute.
...boolean iscommandenabled( in string command );
parameters command the name of the command whose availability is to be checked.
...void onevent( in string eventname );
parameters eventname the name of the event to process.
...boolean supportscommand( in string command );
parameters command the name of the command to determine whether or not it is supported.
nsICrashReporter
void annotatecrashreport( in acstring key, in acstring data );
parameters key name of the data to be added.
...void appendappnotestocrashreport( in acstring data );
parameters data data to be added.
...void appendobjcexceptioninfotoappnotes( in voidptr aexception );
parameters aexception nsexception object to append note for.
...void writeminidumpforexception( in voidptr aexceptioninfo );
parameters aexceptioninfo exception_info* provided by window's seh.
nsICycleCollectorListener
g long aaddress, in boolean amarked); void describerefcountedobject(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.
... begindescriptions() void begindescriptions();
parameters none.
... describegcedobject() void describegcedobject( in unsigned long long aaddress, in boolean amarked );
parameters aaddress amarked describerefcountedobject() void describerefcountedobject( in unsigned long long aaddress, in unsigned long aknownedges, in unsigned long atotaledges );
parameters aaddress aknownedges atotaledges end() void end();
parameters none.
... noteedge() void noteedge( in unsigned long long afromaddress, in unsigned long long atoaddress, in string aedgename );
parameters afromaddress atoaddress aedgename noteobject() void noteobject( in unsigned long long aaddress, in string aobjectdescription );
parameters aaddress aobjectdescription ...
nsIDNSRecord
prnetaddr getnextaddr( in pruint16 aport );
parameters aport a port number to initialize the prnetaddr with.
...acstring getnextaddrasstring();
parameters none.
...boolean hasmore();
parameters none.
...void rewind();
parameters none.
nsIDOMNode
constants constant value description element_node 1 attribute_node 2 text_node 3 cdata_section_node 4 entity_reference_node 5 entity_node 6 processing_instruction_node 7 comment_node 8 document_node 9 document_type_node 10 document_fragment_node 11 notation_node 12 methods appendchild() nsidomnode appendchild( in nsidomnode newchild );
parameters newchild return value clonenode() nsidomnode clonenode( in boolean deep );
parameters deep return value hasattributes() boolean hasattributes();
parameters none.
... return value haschildnodes() boolean haschildnodes();
parameters none.
... return value insertbefore() nsidomnode insertbefore( in nsidomnode newchild, in nsidomnode refchild );
parameters newchild refchild return value issupported() boolean issupported( in domstring feature, in domstring version );
parameters feature version return value normalize() void normalize();
parameters none.
... removechild() nsidomnode removechild( in nsidomnode oldchild );
parameters oldchild return value replacechild() nsidomnode replacechild( in nsidomnode newchild, in nsidomnode oldchild );
parameters newchild oldchild return value see also document object model (dom) level 2 core specificationrec ...
nsIDebug
void abort( in string afile, in long aline );
parameters afile file containing abort request.
...void assertion( in string astr, in string aexpr, in string afile, in long aline );
parameters astr assertion message.
...void break( in string afile, in long aline );
parameters afile file containing break request.
...void warning( in string astr, in string afile, in long aline );
parameters astr warning message.
nsIDeviceMotion
void addlistener( in nsidevicemotionlistener alistener );
parameters alistener the nsidevicemotionlistener object whose nsidevicemotionlistener.onaccelerationchange() method should be called with updated acceleration data.
...void addwindowlistener( in nsidomwindow awindow );
parameters awindow the dom window that the accelerometer should begin sending mozorientation events to.
...void removelistener( in nsidevicemotionlistener alistener );
parameters alistener the nsidevicemotionlistener object to which no further updates should be sent.
...void removewindowlistener( in nsidomwindow awindow );
parameters awindow the dom window that the accelerometer should stop sending mozorientation events to.
nsIDirIndexListener
void onindexavailable( in nsirequest arequest, in nsisupports actxt, in nsidirindex aindex );
parameters arequest the request.
... actxt opaque
parameter aindex new index to add.
...void oninformationavailable( in nsirequest arequest, in nsisupports actxt, in astring ainfo );
parameters arequest the request.
... actxt opaque
parameter ainfo new info to add.
nsIDynamicContainer
void oncontainermoved( in long long aitemid, in long long anewparent, in long anewindex );
parameters aitemid the item-id of the container item.
...void oncontainernodeclosed( in nsinavhistorycontainerresultnode acontainer );
parameters acontainer the container node of the container being closed.
...void oncontainernodeopening( in nsinavhistorycontainerresultnode acontainer, in nsinavhistoryqueryoptions aoptions );
parameters acontainer the container node for the container being opened.
...void oncontainerremoving( in long long aitemid );
parameters aitemid the item-id of the container item.
nsIEffectiveTLDService
acstring getbasedomain( in nsiuri auri, [optional] in pruint32 aadditionalparts );
parameters auri the uri to be analyzed.
... acstring getbasedomainfromhost( in autf8string ahost, in pruint32 aadditionalparts optional );
parameters ahost the host string to be analyzed.
... acstring getpublicsuffix( in nsiuri auri );
parameters auri the uri to be analyzed.
... acstring getpublicsuffixfromhost( in autf8string ahost );
parameters ahost the host string to be analyzed.
nsIFeedProgressListener
void handleentry( in nsifeedentry entry, in nsifeedresult result );
parameters entry pointer to an nsifeedentry containing information about the entry that was just processed.
... void handlefeedatfirstentry( in nsifeedresult result );
parameters result an nsifeedresult describing the feed at the point at which the first entry is found, but before processing it.
... void handlestartfeed( in nsifeedresult result );
parameters result an nsifeedresult describing the current state of the feed at the moment parsing begins.
... void reporterror( in astring errortext, in long linenumber, in boolean bozo );
parameters errortext a short description of the error.
nsIFrameMessageManager
void addmessagelistener( in astring amessage, in nsiframemessagelistener alistener [optional in boolean listenwhenclosed );
parameters amessage the name of the message for which to add a listener.
...this
parameter only has an effect for frame message managers in the main process.
... void removemessagelistener( in astring amessage, in nsiframemessagelistener alistener );
parameters amessage the name of the message for which to remove a listener.
... void sendasyncmessage( in astring amessage, in astring json );
parameters amessage the name of the message to send to the listeners.
nsIGeolocationProvider
boolean isready();
parameters none.
...void shutdown();
parameters none.
...void startup();
parameters none.
...void watch( in nsigeolocationupdate callback );
parameters callback an nsigeolocationupdate to be notified when position changes.
nsIGlobalHistory3
the other
params to this function are the same as those for nsichanneleventsink.onchannelredirect().
...void adddocumentredirect( in nsichannel aoldchannel, in nsichannel anewchannel, in print32 aflags, in boolean atoplevel );
parameters aoldchannel anewchannel aflags flags to add.
...unsigned long geturigeckoflags( in nsiuri auri );
parameters auri the nsiuri to get flags for.
...void seturigeckoflags( in nsiuri auri, in unsigned long aflags );
parameters auri the nsiuri to add flags for.
nsIHTTPHeaderListener
this instance is passed in through {geturl,posturl}()'s streamlistener
parameter.
...note: you must copy the values of the
params.
... void newresponseheader( in string headername, in string headervalue );
parameters headername headervalue statusline() called once for the http response status line.
...void statusline( in string line );
parameters line ...
nsIIdleService
the data
parameter for the notification contains the current user idle time in gecko 15 and earlier or 0 in gecko 16 and later.
...the data
parameter for the notification contains the current user idle time.
... void addidleobserver( in nsiobserver observer, in unsigned long time );
parameters observer the nsiobserver to be notified.
... void removeidleobserver( in nsiobserver observer, in unsigned long time );
parameters observer the nsiobserver to be removed.
nsILoginInfo
nsilogininfo clone();
parameters none.
... boolean equals( in nsilogininfo alogininfo );
parameters alogininfo the login to which to compare for equality.
... void init( in astring ahostname, in astring aformsubmiturl, in astring ahttprealm, in astring ausername, in astring apassword, in astring ausernamefield, in astring apasswordfield );
parameters ahostname the value to assign to the hostname field.
... boolean matches( in nsilogininfo alogininfo, in boolean ignorepassword );
parameters alogininfo the login to which to compare for equality.
nsILoginManagerPrompter
void init( in nsidomwindow awindow );
parameters awindow the in which the user is doing some login-related action that is resulting in a need to prompt them for something.
... void prompttochangepassword( in nsilogininfo aoldlogin, in nsilogininfo anewlogin );
parameters aoldlogin the existing login (with the old password).
... void prompttochangepasswordwithusernames( [array, size_is(count)] in nsilogininfo logins, in pruint32 count, in nsilogininfo anewlogin );
parameters logins an array of existing logins.
... prompttosavepassword() ask the user if they want to save a login (yes, never, not now) void prompttosavepassword( in nsilogininfo alogin );
parameters alogin the login to be saved.
nsIMicrosummaryGenerator
long calculateupdateinterval( in nsidomnode apagecontent );
parameters apagecontent the content of the page being summarized.
...boolean equals( in nsimicrosummarygenerator aother );
parameters aother the generator to compare against.
...if a generator doesn't need content, pass null as the
parameter to this method.
...astring generatemicrosummary( in nsidomnode apagecontent );
parameters apagecontent the content of the page being summarized.
nsIModule
boolean canunload( in nsicomponentmanager acompmgr );
parameters acompmgr the global component manager.
...void getclassobject( in nsicomponentmanager acompmgr, in nscidref aclass, in nsiidref aiid, [retval, iid_is(aiid)] out nsqiresult aresult );
parameters acompmgr the global component manager.
...void registerself( in nsicomponentmanager acompmgr, in nsifile alocation, in string aloaderstr, in string atype );
parameters acompmgr the global component manager.
...void unregisterself( in nsicomponentmanager acompmgr, in nsifile alocation, in string aloaderstr );
parameters acompmgr the global component manager.
nsIMsgAccount
void addidentity( in nsimsgidentity identity );
parameters identity the identity to add.
...void clearallvalues();
parameters none.
...void init();
parameters none.
...void removeidentity( in nsimsgidentity identity );
parameters identity the identity to remove.
nsIMsgDatabase
void open(in nsilocalfile afoldername, in boolean acreate, in boolean aleaveinvaliddb);
parameters afoldername the name of the folder to create.
... forcefolderdbclosed() void forcefolderdbclosed(in nsimsgfolder afolder);
parameters afolder close() void close(in boolean aforcecommit);
parameters aforcecommit commit() void commit(in nsmsgdbcommit committype);
parameters committype forceclosed() force closed is evil, and we should see if we can do without it.
... void forceclosed(); clearcachedhdrs() void clearcachedhdrs(); resethdrcachesize() void resethdrcachesize(in unsigned long size); getmsghdrforkey() nsimsgdbhdr getmsghdrforkey(in nsmsgkey key);
parameters key getmsghdrformessageid() nsimsgdbhdr getmsghdrformessageid(in string messageid);
parameters messageid containskey() returns whether or not this database contains the given key.
... boolean containskey(in nsmsgkey key);
parameters key createnewhdr() must call addnewhdrtodb after creating.
nsIMsgFilterCustomAction
* * @
param type the filter type * @
param scope the search scope * * @return true if valid */ boolean isvalidfortype(in nsmsgfiltertypetype type, in nsmsgsearchscopevalue scope); /** * after the user inputs a particular action value for the action, determine * if that value is valid.
... * * @
param actionvalue the value entered.
... * @
param actionfolder folder in the filter list * @
param filtertype filter type (manual, offlinemail, etc.) * * @return errormessage a localized message to display if invalid * set to null if the actionvalue is valid */ autf8string validateactionvalue(in autf8string actionvalue, in nsimsgfolder actionfolder, in nsmsgfiltertypetype filtertype); /* allow duplicate actions in the same filter list?
... */ /** * apply the custom action to an array of messages * * @
param msghdrs array of nsimsgdbhdr objects of messages * @
param actionvalue user-set value to use in the action * @
param copylistener calling method (filtertype manual only) * @
param filtertype type of filter being applied * @
param msgwindow message window */ void apply(in nsiarray msghdrs /* nsimsgdbhdr array */, in autf8string actionvalue, in...
nsIMsgSearchCustomTerm
* * @
param scope search scope (nsmsgsearchscope) * @
param op search operator (nsmsgsearchop).
... * * @
param scope search scope (nsmsgsearchscope) * @
param op search operator (nsmsgsearchop).
... * * @
param scope search scope (nsmsgsearchscope) * @
param length object to hold array length * * @return array of operators */ void getavailableoperators(in nsmsgsearchscopevalue scope, out unsigned long length, [retval, array, size_is(length)] out nsmsgsearchopvalue operators); match /** * apply the custom search term to a messa...
...ge * * @
param msghdr header database reference representing the message * @
param searchvalue user-set value to use in the search * @
param searchop search operator (contains, ishigherthan, etc.) * * @return true if the term matches the message, else false */ boolean match(in nsimsgdbhdr msghdr, in autf8string searchvalue, in nsmsgsearchopvalue searchop); ...
nsIObserver
void observe( in nsisupports asubject, in string atopic, in wstring adata );
parameters asubject in general reflects the object whose change or action is being observed.
... adata an optional
parameter or other auxiliary data further describing the change or action.
... remarks the specific values and meanings of the
parameters provided varies widely, though, according to where the observer was registered, and what topic is being observed.
... a single nsiobserver implementation can observe multiple types of notification, and is responsible for dispatching its own behavior on the basis of the
parameters for a given callback.
nsIPasswordManager
astring adduser(in autf8string ahost, in astring auser, in astring apassword);
parameters ahost the hostname of the password to store.
... void removeuser(in autf8string ahost, in astring auser);
parameters ahost the hostname of the password to remove.
... void addreject(in autf8string ahost);
parameters ahost the name of the hostname for which passwords should no longer be saved.
... void removereject(in autf8string ahost);
parameters ahost the name of the hostname for which passwords can be saved again.
nsIProtocolHandler
boolean allowport( in long port, in string scheme );
parameters port the port for which an override is being requested.
... nsichannel newchannel( in nsiuri auri );
parameters auri the uri for which to construct a channel.
...(many servers do not support utf-8 iris at the present time, so we must be careful about tracking the native charset of the origin server.) nsiuri newuri( in autf8string aspec, in string aorigincharset, in nsiuri abaseuri );
parameters aspec the uri string in utf-8 encoding.
...if the protocol has no concept of relative uris, this
parameter is ignored.
nsIPushService
void subscribe( in domstring scope, in nsiprincipal principal, in nsipushsubscriptioncallback callback );
parameters scope the serviceworkerregistration.scope for a service worker subscription, or a unique url (for example, chrome://my-module/push) for a system subscription.
... void getsubscription( in domstring scope, in nsiprincipal principal, in nsipushsubscriptioncallback callback );
parameters scope the unique scope url, as passed to nsipushservice.subscribe().
... void unsubscribe( in domstring scope, in nsiprincipal principal, in nsiunsubscriberesultcallback callback );
parameters scope the unique scope url, as passed to nsipushservice.subscribe().
...your nsiobserver should ensure the data
parameter matches your subscription scope.
nsIRequest
void cancel( in nsresult astatus );
parameters astatus the reason for canceling this request.
... boolean ispending();
parameters none.
... void resume();
parameters none.
... void suspend();
parameters none.
nsISecurityCheckedComponent
string cancallmethod( in nsiidptr iid, in wstring methodname );
parameters iid the iid of the interface this method exists on.
...string cancreatewrapper( in nsiidptr iid );
parameters iid the interface to reflect into javascript.
...string cangetproperty( in nsiidptr iid, in wstring propertyname );
parameters iid the interface that the property to get exists on.
...string cansetproperty( in nsiidptr iid, in wstring propertyname );
parameters iid the interface that the property to set exists on.
nsISeekableStream
void seek( in long whence, in long long offset );
parameters whence specifies how to interpret the 'offset'
parameter in setting the stream offset associated with the implementing stream, according to the table of constants above.
... offset specifies a value, in bytes, that is used in conjunction with the 'whence'
parameter to set the stream offset of the implementing stream.
...void seteof();
parameters none.
...long long tell();
parameters none.
nsIServiceManager
void getservice( in nscidref aclass, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result );
parameters aclass the classid of the service that is being requested.
... void getservicebycontractid( in string acontractid, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result );
parameters acontractid the contractid of the service that is being requested.
... boolean isserviceinstantiated( in nscidref aclass, in nsiidref aiid );
parameters aclass the classid of the service that is being tested.
... boolean isserviceinstantiatedbycontractid( in string acontractid, in nsiidref aiid );
parameters acontractid the contractid of the service that is being tested.
nsISocketProvider
when set, the hostname
parameter passed in this interface will be used instead of the address structure passed for a later request.
...
parameters are the same as newsocket() with the exception of afiledesc, which is an input
parameter instead.
... void addtosocket( in long afamily, in string ahost, in long aport, in string aproxyhost, in long aproxyport, in unsigned long aflags, in prfiledescstar afiledesc, out nsisupports asecurityinfo );
parameters afamily the address family for this socket (pr_af_inet or pr_af_inet6).
...void newsocket( in long afamily, in string ahost, in long aport, in string aproxyhost, in long aproxyport, in unsigned long aflags, out prfiledescstar afiledesc, out nsisupports asecurityinfo );
parameters afamily the address family for this socket (pr_af_inet or pr_af_inet6).
nsIStringBundleService
e(components.interfaces.nsistringbundleservice); method overview nsistringbundle createbundle(in string aurlspec); nsistringbundle createextensiblebundle(in string aregistrykey); void flushbundles(); wstring formatstatusmessage(in nsresult astatus, in wstring astatusarg); methods createbundle() nsistringbundle createbundle( in string aurlspec );
parameters aurlspec the url of the properties file to load.
... createextensiblebundle() nsistringbundle createextensiblebundle( in string aregistrykey );
parameters aregistrykey the name of the category under which the properties file(s) have been registered.
...(automatically called for the memory-pressure and chrome-flush-caches global observer topics.) void flushbundles();
parameters none.
... wstring formatstatusmessage( in nsresult astatus, in wstring astatusarg );
parameters astatus the status code.
nsIStructuredCloneContainer
nsivariant deserializetovariant();
parameters none.
...astring getdataasbase64();
parameters none.
...void initfrombase64( in astring adata, in unsigned long aformatversion );
parameters adata a base-64-encoded byte stream.
...void initfromvariant( in nsivariant adata );
parameters adata a nsivariant, must be backed by a jsval.
nsIThread
void shutdown()
parameters none.
... boolean haspendingevents()
parameters none.
...if there aren't any pending events, this method may wait -- depending on the value of the maywait
parameter -- until an event is dispatched to the thread.
... boolean processnextevent( in boolean maywait );
parameters maywait if true, this method blocks until an event is available to process if the event queue is empty.
nsIThreadObserver
void afterprocessnextevent( in nsithreadinternal thread, in unsigned long recursiondepth );
parameters thread the nsithread on which the event was processed.
... void ondispatchedevent( in nsithreadinternal thread );
parameters thread the nsithread on which the event was dispatched.
... void onprocessnextevent( in nsithreadinternal thread, in boolean maywait, in unsigned long recursiondepth );
parameters thread the nsithread on which the event is going to be processed.
...this
parameter will be false during thread shutdown.
nsITimer
void cancel();
parameters none.
... void init( in nsiobserver aobserver, in unsigned long adelay, in unsigned long atype );
parameters aobserver a callback object, that is capable listening to timer events.
... void initwithcallback( in nsitimercallback acallback, in unsigned long adelay, in unsigned long atype );
parameters acallback an nsitimercallback interface to call when timer expires.
... void initwithfunccallback( in nstimercallbackfunc acallback, in voidptr aclosure, in unsigned long adelay, in unsigned long atype );
parameters acallback a nstimercallbackfunc interface compatible function to call when timer fires.
nsIToolkitProfileService
nsitoolkitprofile createprofile( in nsilocalfile arootdir, in autf8string aname );
parameters arootdir the profile directory.
...void flush();
parameters none.
...nsitoolkitprofile getprofilebyname( in autf8string aname );
parameters aname the profile name to find.
...nsiprofilelock lockprofilepath( in nsilocalfile adirectory, in nsilocalfile atempdirectory );
parameters adirectory the directory to lock as a profile directory.
nsITransaction
void dotransaction();
parameters none.
...boolean merge( in nsitransaction atransaction );
parameters atransaction the previously executed transaction to merge.
...void redotransaction();
parameters none.
...void undotransaction();
parameters none.
nsITransactionList
nsitransactionlist getchildlistforitem( in long aindex );
parameters aindex the index of the item in the list.
...nsitransaction getitem( in long aindex );
parameters aindex the index of the item in the list.
...long getnumchildrenforitem( in long aindex );
parameters aindex the index of the item in the list.
...boolean itemisbatch( in long aindex );
parameters aindex the index of the item in the list.
nsITreeColumn
methods native code only!getidconst void getidconst( [shared] out wstring idconst );
parameters idconst getnext() get the next column in the nsitreecolumns.
... nsitreecolumn getnext();
parameters none.
...nsitreecolumn getprevious();
parameters none.
...invalidate() void invalidate();
parameters none.
nsIURIFixup
nsiuri createexposableuri( in nsiuri auri );
parameters auri the uri to be converted.
... nsiuri createfixupuri( in autf8string auritext, in unsigned long afixupflags );
parameters auritext candidate uri.
... nsiuri keywordtouri( in autf8string akeyword );
parameters akeyword the keyword to convert into a uri.
... nsiuri createfixupuri( in autf8string auritext, in unsigned long afixupflags );
parameters auritext candidate uri.
nsIURL
inherits from: nsiuri last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) http://host/directory/filebasename.fileextension?query http://host/directory/filebasename.fileextension#ref http://host/directory/filebasename.fileextension;
param \ \ / \ ----------------------- \ | / \ filename / ---------------------------- | filepath you can get a nsiurl from an nsiuri, using the queryinterface() method: var myuri = components.class...
...
param autf8string
parameters specified after the ; in the url.
.../ ftp://foo.com/bar ftp://foo.com/ ftp://foo.com/bar/ ftp://foo.com/bar/b.html ftp://foo.com/bar/ http://foo.com/a.htm#i http://foo.com/b.htm http://foo.com/ ftp://foo.com/c.htm#i ftp://foo.com/c.htm ftp://foo.com/c.htm file:///a/b/c.html file:///d/e/c.html file:/// autf8string getcommonbasespec( in nsiuri auritocompare );
parameters auritocompare a uri to compare with return value the common uri portion getrelativespec() this method takes a uri and returns a substring of this if it can be made relative to the uri passed in.
...autf8string getrelativespec( in nsiuri auritocompare );
parameters auritocompare a uri to compare with return value the common uri portion see also code snippets:uri parsing nsistandardurl ...
nsIUploadChannel
for this reason, we have a special meaning for the acontenttype
parameter.
... void setuploadstream( in nsiinputstream astream, in acstring acontenttype, in long acontentlength );
parameters astream the stream to be uploaded by this channel.
...in the case of http, if this
parameter is non-empty, then its value will replace any existing content-type header on the http request.
... in the case of ftp and file, this
parameter is ignored.
nsIXULBrowserWindow
astring onbeforelinktraversal( in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab );
parameters originaltarget the specified target for the link.
...void setjsdefaultstatus( in astring status );
parameters status the status string.
...void setjsstatus( in astring status );
parameters status the status string.
...void setoverlink( in astring link, in nsidomelement element );
parameters link the link string.
nsIXULTemplateResult
astring getbindingfor( in nsiatom avar );
parameters avar the variable to look up.
...nsisupports getbindingobjectfor( in nsiatom avar );
parameters avar the variable to look up.
...void hasbeenremoved();
parameters none.
...void rulematched( in nsisupports aquery, in nsidomnode arulenode );
parameters aquery the query that matched.
nsPIPromptService
this interface defines the meaning of each indexes of getint(), setint(), getstring() and setstring() of the nsidialog
paramblock interface but they are defined on in c++.
... method overview void dodialog(in nsidomwindow aparent, in nsidialog
paramblock a
paramblock, in string achromeurl); methods dodialog() opens a dialog.
... void dodialog( in nsidomwindow aparent, in nsidialog
paramblock a
paramblock, in string achromeurl );
parameters aparent the parent window of the dialog.
... a
paramblock various
parameters for the dialog.
Using the clipboard
this function takes three
parameters.
...the first
parameter of this function is the transferable.
... the second
parameter can usually be set to null but you could set it to an nsiclipboardowner so that you can tell when the data you've copied is overwritten by another copy operation.
... the third
parameter to setdata (and the
parameter to emptyclipboard) indicates which clipboard buffer to use.
xptcall FAQ
the core invoke function has the declaration: xptc_public_api(nsresult) xptc_invokebyindex(nsisupports* that, pruint32 methodindex, pruint32
paramcount, nsxptcvariant*
params); nsxptcvariant is a discriminated union of the types that can be passed as
parameters to the target function (including void* to represent arbitrary pointer types).
... given the correct set of
parameters, this function can call any method on any xpcom interface.
...the information in the typelibs allows xpconnect to convert function
parameters and build the nsxptcvariant array required to make this call.
...these stubs forward calls to a shared function whose job it is to use the typelib information to extract the
parameters from the platform specific calling convention to build an array of variants to hold the
parameters and then call an inherited method which can then do whatever it wants with the call.
ArrayType
ctype arraytype() type[ length] );
parameters type: it represents the type of the elements or variable which is going to be present in an array length optional it denotes the number of entries present in an array or the number of elements that an array should contain.
... if you don't specify this
parameter, the array's length is unspecified.
...
parameters length the number of entries the array type should be able to contain.
... cdata addressofelement( idx );
parameters idx a numeric value indicating the offset into the array of the element just to return a pointer.
CType
ctype array( [n] };
parameters n optional the number of elements in the declared array type.
... if this
parameter is left out, the array's size is indeterminate.
... string tosource();
parameters none.
... string tostring();
parameters none.
Library
close();
parameters none.
... cdata declare( name[, abi, returntype argtype1, ...] );
parameters name the name of the symbol exported by the native library that is to be declared as usable from javascript abi the abi used by the exported function; this will be ctypes.default_abi for most libraries, except for windows libraries, which will be ctypes.winapi_abi or ctypes.stdcall_abi.
...this
parameter should not be provided if the api is an exported data symbol.
... argtype1...argtypen zero or more
parameter ctype may be specified for the
parameters of the function being declared.
Version, UI, and Status Information - Plugins
void npn_status(npp instance, const char *message); the instance
parameter is the current plug-in instance, that is, the one that the status message belongs to.
... in the message
parameter, pass the string you want to display on the status line.
... const char* npn_useragent(npp instance); the instance
parameter represents the current plug-in instance.
... void npn_reloadplugins(npbool reloadpages); the reloadpages
parameter is a boolean that indicates whether to reload the page (true) or not (false).
Debugger.Object - Firefox Developer Tools
for example: function h() { var i = function() {}; // display name: h/i f(function () {}); // display name: h/< } var s = f(function () {}); // display name: s<
parameternames if the referent is a debuggee function, the names of the its
parameters, as an array of strings.
... if the referent is a host function for which
parameter names are not available, return an array with one element per
parameter, each of which is undefined.
... if the referent uses destructuring
parameters, then the array’s elements reflect the structure of the
parameters.
...} then this debugger.object instance’s
parameternames property would have the value: ["a", ["b", "c"], {d:"d", e:"f"}] script if the referent is a function that is debuggee code, this is that function’s script, as a debugger.script instance.
Debugger.Object - Firefox Developer Tools
for example: function h() { var i = function() {}; // display name: h/i f(function () {}); // display name: h/< } var s = f(function () {}); // display name: s<
parameternames if the referent is a debuggee function, the names of the its
parameters, as an array of strings.
... if the referent is a host function for which
parameter names are not available, return an array with one element per
parameter, each of which is undefined.
... if the referent uses destructuring
parameters, then the array's elements reflect the structure of the
parameters.
...} then this debugger.object instance's
parameternames property would have the value: ["a", ["b", "c"], {d:"d", e:"f"}] script if the referent is a function that is debuggee code, this is that function's script, as a debugger.script instance.
AudioWorkletNode - Web APIs
audioworkletnode.
parameters read only returns an audio
parammap — a collection of audio
param objects.
...if the audioworkletprocessor has a static
parameterdescriptors getter, the audio
paramdescriptor array returned from it is used to create audio
param objects on the audioworkletnode.
... with this mechanism it is possible to make your own audio
param objects accessible from your audioworkletnode.
... // white-noise-processor.js class whitenoiseprocessor extends audioworkletprocessor { process (inputs, outputs,
parameters) { const output = outputs[0] output.foreach(channel => { for (let i = 0; i < channel.length; i++) { channel[i] = math.random() * 2 - 1 } }) return true } } registerprocessor('white-noise-processor', whitenoiseprocessor) next, in our main script file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor, ...
console.assert() - Web APIs
syntax console.assert(assertion, obj1 [, obj2, ..., objn]); console.assert(assertion, msg [, subst1, ..., substn]); // c-like message formatting
parameters assertion any boolean expression.
...this
parameter gives you additional control over the format of the output.
...ormsg: errormsg}); // or, using es2015 object property shorthand: // console.assert(number % 2 === 0, {number, errormsg}); } // output: // the # is 2 // the # is 3 // assertion failed: {number: 3, errormsg: "the # is not even"} // the # is 4 // the # is 5 // assertion failed: {number: 5, errormsg: "the # is not even"} note that, while a string containing a substitution string works as a
parameter for console.log in node and many, if not most, browsers...
... console.log('the word is %s', 'foo'); // output: the word is foo ...the use of such a string does not currently work as intended as a
parameter for console.assert in all browsers: console.assert(false, 'the word is %s', 'foo'); // correct output in node.js and some browsers // (e.g.
Document.createTouch() - Web APIs
syntax var touch = documenttouch.createtouch(view, target, identifier, pagex, pagey, screenx, screeny);
parameters note: all
parameters are optional.
... note: previous versions of this method included the following additional
parameters but those
parameters are not included in either of the standards listed below.
... consequently, these
parameters should be considered deprecated and not used.
... return value touch a touch object configured as described by the input
parameters.
EventTarget.removeEventListener() - Web APIs
the event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see matching event listeners for removal syntax target.removeeventlistener(type, listener[, options]); target.removeeventlistener(type, listener[, usecapture]);
parameters type a string which specifies the type of event for which to remove an event listener.
...if this
parameter is absent, a default value of false is assumed.
...obviously, you need to specify the same type and listener
parameters to removeeventlistener().
... but what about the options or usecapture
parameters?
Using Fetch - Web APIs
supplying request options the fetch() method can optionally accept a second
parameter, an init object that allows you to control a number of different settings: see fetch() for the full options available, and more details.
...the request() constructor, and pass that in as a fetch() method argument: const myheaders = new headers(); const myrequest = new request('flowers.jpg', { method: 'get', headers: myheaders, mode: 'cors', cache: 'default', }); fetch(myrequest) .then(response => response.blob()) .then(myblob => { myimage.src = url.createobjecturl(myblob); }); request() accepts exactly the same
parameters as the fetch() method.
...a body is an instance of any of the following types: arraybuffer arraybufferview (uint8array and friends) blob/file string urlsearch
params formdata the body mixin defines the following methods to extract a body (implemented by both request and response).
... request bodies can be set by passing body
parameters: const form = new formdata(document.getelementbyid('login-form')); fetch('/login', { method: 'post', body: form }); both request and response (and by extension the fetch() function), will try to intelligently determine the content type.
FileSystemDirectoryReader.readEntries() - Web APIs
syntax readentries(successcallback[, errorcallback]);
parameters successcallback a function which is called when the directory's contents have been retrieved.
... the function receives a single input
parameter: an array of file system entry objects, each based on filesystementry.
...it receives one input
parameter: a fileerror object describing the error which occurred.
...this function takes as input a filesystementry representing an entry in the file system to be scanned and processed (the item
parameter), and an element into which to insert the list of contents (the container
parameter).
FileSystemEntry.copyTo() - Web APIs
syntax filesystementry.copyto(newparent[, newname][, successcallback][, errorcallback]);
parameters newparent a filesystemdirectoryentry object specifying the destination directory for the copy operation.
... newname optional if this
parameter is provided, the copy is given this string as its new file or directory name.
...receives a single input
parameter: a filesystementry based object providing the copied item's new details.
...there's a single
parameter: a fileerror describing what went wrong.
FileSystemEntry.moveTo() - Web APIs
syntax filesystementry.moveto(newparent[, newname][, successcallback][, errorcallback]);
parameters newparent a filesystemdirectoryentry object specifying the destination directory for the move operation.
... newname optional if this
parameter is provided, the entry is renamed to have this string as its new file or directory name.
...receives a single input
parameter: a filesystementry based object providing the moved item's new details.
...there's a single
parameter: a fileerror describing what went wrong.
History.pushState() - Web APIs
syntax history.pushstate(state, title[, url])
parameters state the state object is a javascript object which is associated with the new history entry created by pushstate().
... title most browsers currently ignore this
parameter, although they may use it in the future.
... url optional the new history entry's url is given by this
parameter.
...if this
parameter isn't specified, it's set to the document's current url.
IDBDatabase.createObjectStore() - Web APIs
the method takes the name of the store as well as a
parameter object that lets you define important optional properties.
... syntax idbdatabase.createobjectstore(name); idbdatabase.createobjectstore(name, options);
parameters name the name of the new object store to be created.
... optional
parameters optional an options object whose attributes are optional
parameters to the method.
... unknown
parameters are ignored.
IDBDatabase.transaction() - Web APIs
syntax idbdatabase.transaction(storenames); idbdatabase.transaction(storenames, mode);
parameters "durability" -- the durability constrints for the transction.
...if you don't provide the
parameter, the default access mode is readonly.
... notfounderror an object store specified in in the storenames
parameter has been deleted or removed.
... typeerror the value for the mode
parameter is invalid.
RTCInboundRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcinboundrtpstreamstats dictionary is a value generated by adding the quantization
parameter (qp) values for every frame sent or received to date on the video track corresponding to this rtcinboundrtpstreamstats object.
... syntax var qpsum = rtcinboundrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization
parameter (qp) value for every frame sent or received so far on the track described by the rtcinboundrtpstreamstats object.
...the quantization process and the amount of compression can be controlled using one or more
parameters.
...additionally, qp is not likely to be the only
parameter the codec uses to adjust the compression.
RTCOutboundRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcoutboundrtpstreamstats dictionary is a value generated by adding the quantization
parameter (qp) values for every frame this sender has produced to date on the video track corresponding to this rtcoutboundrtpstreamstats object.
... syntax var qpsum = rtcoutboundrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization
parameter (qp) value for every frame sent so far on the track described by the rtcoutboundrtpstreamstats object.
...the quantization process and the amount of compression can be controlled using one or more
parameters.
...additionally, qp is not likely to be the only
parameter the codec uses to adjust the compression.
RTCRtpCodecCapability - Web APIs
the iana maintains a list of codecs and their
parameters, including their clock rates.
... sdpfmtpline optional a domstring giving the format specific
parameters field from the a=fmtp line in the sdp which corresponds to the codec, if such a line exists.
... if there is no
parameters field, this property is left out.
... description rtcrtpcodeccapabilities describes the basic
parameters for a single codec supported by the user's device.
RTCRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcrtpstreamstats dictionary is a value generated by adding the quantization
parameter (qp) values for every frame sent or received to date on the video track corresponding to this rtcrtpstreamstats object.
... syntax var qpsum = rtcrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization
parameter (qp) value for every frame sent or received so far on the track described by the rtcrtpstreamstats object.
...the quantization process and the amount of compression can be controlled using one or more
parameters.
...additionally, qp is not likely to be the only
parameter the codec uses to adjust the compression.
Using Service Workers - Web APIs
resolve(request.response); } else { reject(error('image didn\'t load successfully; error code:' + request.statustext)); } }; request.onerror = () => { reject(error('there was a network error.')); }; request.send(); }); } we return a new promise using the promise() constructor, which takes as an argument a callback function with resolve and reject
parameters.
... next, we use the serviceworkercontainer.register() function to register the service worker for this site, which is just a javascript file residing inside our app (note this is the file's url relative to the origin, not the js file that references it.) the scope
parameter is optional, and can be used to specify the subset of your content that you want the service worker to control.
...this returns a promise for a created cache; once resolved, we then call a function that calls addall() on the created cache, which for its
parameter takes an array of origin-relative urls to all the resources you want to cache.
...resource, to get the new resource from the network if it is available: fetch(event.request); if a match wasn’t found in the cache, and the network isn’t available, you could just match the request with some kind of default fallback page as a response using match(), like this: caches.match('./fallback.html'); you can retrieve a lot of information about each request by calling
parameters of the request object returned by the fetchevent: event.request.url event.request.method event.request.headers event.request.body recovering failed requests so caches.match(event.request) is great when there is a match in the service worker cache, but what about cases when there isn’t a match?
StereoPannerNode.pan - Web APIs
the pan property of the stereopannernode interface is an a-rate audio
param representing the amount of panning to apply.
... syntax var audioctx = new audiocontext(); var pannode = audioctx.createstereopanner(); pannode.pan.value = -0.5; returned value an a-rate audio
param containing the panning to apply.
... note: though the audio
param returned is read-only, the value it represents is not.
...we then use an oninput event handler to change the value of the stereopannernode.pan
parameter and update the pan value display when the slider is moved.
SubtleCrypto.deriveBits() - Web APIs
syntax const result = crypto.subtle.derivebits( algorithm, basekey, length );
parameters algorithm is an object defining the derivation algorithm to use.
... to use ecdh, pass an ecdhkeyderive
params object.
... to use hkdf, pass an hkdf
params object.
... to use pbkdf2, pass a pbkdf2
params object.
WebGLRenderingContext.getActiveUniform() - Web APIs
syntax webglactiveinfo webglrenderingcontext.getactiveuniform(program, index);
parameters program a webglprogram specifying the webgl shader program from which to obtain the uniform variable's information.
...this value is an index 0 to n - 1 as returned by gl.getprogram
parameter(program, gl.active_uniforms).
... gl.invalid_value is generated if index is not in the range [0, gl.getprogram
parameter(program, gl.active_uniforms) - 1].
... examples const numuniforms = gl.getprogram
parameter(program, gl.active_uniforms); for (let i = 0; i < numuniforms; ++i) { const info = gl.getactiveuniform(program, i); console.log('name:', info.name, 'type:', info.type, 'size:', info.size); } specifications specification status comment webgl 1.0the definition of 'getactiveuniform' in that specification.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
syntax void gl.vertexattribpointer(index, size, type, normalized, stride, offset);
parameters index a gluint specifying the index of the vertex attribute that is to be modified.
... for types gl.float and gl.half_float, this
parameter has no effect.
... the maximum number of vertex attributes depends on the graphics card, and you can call gl.get
parameter(gl.max_vertex_attribs) to get this value.
... querying current settings you can call gl.getvertexattrib() and gl.getvertexattriboffset() to get the current
parameters for an attribute, e.g.
Adding 2D content to a WebGL context - Web APIs
er = loadshader(gl, gl.vertex_shader, vssource); const fragmentshader = loadshader(gl, gl.fragment_shader, fssource); // create the shader program const shaderprogram = gl.createprogram(); gl.attachshader(shaderprogram, vertexshader); gl.attachshader(shaderprogram, fragmentshader); gl.linkprogram(shaderprogram); // if creating the shader program failed, alert if (!gl.getprogram
parameter(shaderprogram, gl.link_status)) { alert('unable to initialize the shader program: ' + gl.getprograminfolog(shaderprogram)); return null; } return shaderprogram; } // // creates a shader of the given type, uploads the source and // compiles it.
... // function loadshader(gl, type, source) { const shader = gl.createshader(type); // send the source to the shader object gl.shadersource(shader, source); // compile the shader program gl.compileshader(shader); // see if it compiled successfully if (!gl.getshader
parameter(shader, gl.compile_status)) { alert('an error occurred compiling the shaders: ' + gl.getshaderinfolog(shader)); gl.deleteshader(shader); return null; } return shader; } the loadshader() function takes as input the webgl context, the shader type, and the source code, then creates and compiles the shader as follows: a new shader is created by calling gl.createshader().
... to check to be sure the shader successfully compiled, the shader
parameter gl.compile_status is checked.
... to get its value, we call gl.getshader
parameter(), specifying the shader and the name of the
parameter we want to check (gl.compile_status).
WebGL model view projection - Web APIs
the function takes three
parameters — the context to render the program in, the id of the <script> element containing the vertex shader, and the id of the <script> element containing the fragment shader.
...unction(fieldofviewinradians, aspectratio, near, far) { var f = 1.0 / math.tan(fieldofviewinradians / 2); var rangeinv = 1 / (near - far); return [ f / aspectratio, 0, 0, 0, 0, f, 0, 0, 0, 0, (near + far) * rangeinv, -1, 0, 0, near * far * rangeinv * 2, 0 ]; } the four
parameters into this function are: fieldofviewinradians an angle, given in radians, indicating how much of the scene is visible to the viewer at once.
...the introduction of this
parameter finally solves the problem wherein the model gets warped as the canvas is resized and reshaped.
... the results view on jsfiddle exercises experiment with the
parameters of the perspective projection matrix and the model matrix.
Rendering and the WebXR frame animation callback - Web APIs
webxr frames your frame rendering callback function receives as input two
parameters: the time to which the frame corresponds, and an xrframe object describing the state of the scene as of that time.
... for (let view of viewerpose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); mydrawsceneintoview(view, deltatime); } } } the mydrawframe() function grabs the xrsession from the xrframe object specified by the frame
parameter, then calls the session's requestanimationframe() method to immediately schedule the rendering of the next frame.
... next, the time elapsed since the previous frame was rendered is calculated by subtracting from the current time as specified by the currentframetime
parameter the saved time at which the last frame was rendered, lastframetime.
... matching your animation to the elapsed time the frame callback receives a time
parameter for a good reason.
Using the Web Audio API - Web APIs
you can specify a range's values and use them directly with the audio node's
parameters.
...gainnode.gain) are not simple values; they are actually objects of type audio
param — these called
parameters.
...this enables them to be much more flexible, allowing for passing the
parameter a specific set of values to change between over a set period of time, for example.
...again let's use a range type input to vary this
parameter: <input type="range" id="panner" min="-1" max="1" value="0" step="0.01"> we use the values from that input to adjust our panner values in the same way as we did before: const pannercontrol = document.queryselector('#panner'); pannercontrol.addeventlistener('input', function() { panner.pan.value = this.value; }, false); let's adjust our audio graph again, to connect all the nodes to...
Web audio spatialization basics - Web APIs
let's create constants that store the values we'll use for these
parameters later on: const innercone = 60; const outercone = 90; const outergain = 0.3; the next
parameter is distancemodel — this can only be set to linear, inverse, or exponential.
...these are also the
parameters we're going to change when the controls on our interface are used.
... let's use the relevant constructor for creating our panner node and pass in all those
parameters we set above: const panner = new pannernode(audioctx, { panningmodel: pannermodel, distancemodel: distancemodel, positionx: positionx, positiony: positiony, positionz: positionz, orientationx: orientationx, orientationy: orientationy, orientationz: orientationz, refdistance: refdistance, maxdistance: maxdistance, rollofffactor: rolloff, coneinnerangle: in...
...yselector('.boombox-body'); // the values for our css transforms let transform = { xaxis: 0, yaxis: 0, zaxis: 0.8, rotatex: 0, rotatey: 0 } // set our bounds const topbound = -posy; const bottombound = posy; const rightbound = posx; const leftbound = -posx; const innerbound = 0.1; const outerbound = 1.5; let's create a function that takes the direction we want to move as a
parameter, and both modifies the css transform and updates the position and orientation values of our panner node properties to change the sound as appropriate.
Window.requestFileSystem() - Web APIs
window.requestfilesystem(type, size, successcallback[, errorcallback]);
parameters type the type of storage to request.
...the callback receives a single
parameter: a filesystem object representing the file system the app has permission to use.
... errorcallback optional an optional
parameter specifying a function which is called if an error occurs while attempting to obtain the file system, or if the user denies permission to create or access the file system.
... the callback receives as input a single
parameter: a fileerror object describing the error.
Synchronous and asynchronous requests - Web APIs
var xhr = new xmlhttprequest(); xhr.open("get", "/bar/foo.txt", true); xhr.onload = function (e) { if (xhr.readystate === 4) { if (xhr.status === 200) { console.log(xhr.responsetext); } else { console.error(xhr.statustext); } } }; xhr.onerror = function (e) { console.error(xhr.statustext); }; xhr.send(null); line 2 specifies true for its third
parameter to indicate that the request should be handled asynchronously.
... line 15 specifies true for its third
parameter to indicate that the request should be handled asynchronously.
...the null
parameter indicates that no body content is needed for the get request.
... window.addeventlistener('unload', logdata, false); function logdata() { var client = new xmlhttprequest(); client.open("post", "/log", false); // third
parameter indicates sync xhr.
XMLHttpRequest.send() - Web APIs
send() accepts an optional
parameter which lets you specify the request's body; this is primarily used for requests such as put.
... if the request method is get or head, the body
parameter is ignored and the request body is set to null.
... syntax xmlhttprequest.send(body)
parameters body optional a body of data to be sent in the xhr request.
... an xmlhttprequestbodyinit, which per the fetch spec can be a blob, buffersource, formdata, urlsearch
params, or usvstring object.
Color picker tool - CSS: Cascading Style Sheets
.ui-input-slider-info { width: 60px; } #zindex[data-active='true'] { top: 0; opacity: 1; } javascript content 'use strict'; var uicolorpicker = (function uicolorpicker() { function getelembyid(id) { return document.getelementbyid(id); } var subscribers = []; var pickers = []; /** * rgba color class * * hsv/hsb and hsl (hue, saturation, value / brightness, lightness) * @
param hue 0-360 * @
param saturation 0-100 * @
param value 0-100 * @
param lightness 0-100 */ function color(color) { if(color instanceof color === true) { this.copy(color); return; } this.r = 0; this.g = 0; this.b = 0; this.a = 1; this.hue = 0; this.saturation = 0; this.value = 0; this.lightness = 0; this.format = 'hsv'; } function rgbcolor(r, g, b) { var...
...w color(); color.sethsv(h, s, v); color.a = a; return color; } function hslcolor(h, s, l) { var color = new color(); color.sethsl(h, s, l); return color; } function hslacolor(h, s, l, a) { var color = new color(); color.sethsl(h, s, l); color.a = a; return color; } color.prototype.copy = function copy(obj) { if(obj instanceof color !== true) { console.log('typeof
parameter not color'); return; } this.r = obj.r; this.g = obj.g; this.b = obj.b; this.a = obj.a; this.hue = obj.hue; this.saturation = obj.saturation; this.value = obj.value; this.format = '' + obj.format; this.lightness = obj.lightness; }; color.prototype.setformat = function setformat(format) { if (format === 'hsv') this.format = 'hsv'; if (format === 'hsl') this.
...y(topic, value) { if (this.subscribers[topic]) this.subscribers[topic](value); }; /*************************************************************************/ // set picker properties /*************************************************************************/ colorpicker.prototype.setcolor = function setcolor(color) { if(color instanceof color !== true) { console.log('typeof
parameter not color'); return; } if (color.format !== this.picker_mode) { color.setformat(this.picker_mode); color.updatehsx(); } this.color.copy(color); this.updatehuepicker(); this.updatepickerposition(); this.updatepickerbackground(); this.updatealphapicker(); this.updatealphagradient(); this.updatepreviewcolor(); this.notify('red', this.color.r); this.notify('gre...
... as you adjust the
parameters that define the color, it gets displayed in all three standard web css formats.
filter - CSS: Cascading Style Sheets
if the
parameter for any function is invalid, the function returns none.
...the
parameter is specified as a css length, but does not accept percentage values.
...the function accepts a
parameter of type <shadow> (defined in css3 backgrounds), with the exception that the inset keyword is not allowed.
...the
parameters of the <shadow>
parameter are as follows: <offset-x> <offset-y> (required) these are two <length> values to set the shadow offset.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
among the options for the shadow is the shadow's base color (which is then blurred and blended with the background based on the other
parameters).
...this function accepts as its input
parameters the values of the red, green, and blue components and an optional fourth
parameter, the value for the alpha channel.
... legal values for each of these
parameters are: red, green, and blue each must be an <integer> value between 0 and 255 (inclusive), or a <percentage> from 0% to 100%.
...its color
parameter is set to black.
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
permitted content zero or more <
param> elements, then transparent.
...this attribute might be used to specify the various <
param> elements passed to the java applet.
...it indicates the id of the data source object that supplies the data that is bound to the <
param> elements associated with the applet.
... example html <applet code="game.class" align="left" archive="game.zip" height="250" width="350"> <
param name="difficulty" value="easy"> <b>sorry, you need java to play this game.</b> </applet> specifications specification status comment html 5.2the definition of '<applet>' in that specification.
Standard metadata names - HTML: Hypertext Markup Language
origin-when-cross-origin send the full url (stripped of
parameters) for same-origin requests, but only send the origin for other cases.
... same-origin send the full url (stripped of
parameters) for same-origin requests.
... strict-origin-when-cross-origin send the full url (stripped of
parameters) for same-origin requests.
... unsafe-url send the full url (stripped of
parameters) for same-origin or cross-origin requests.
Global attributes - HTML: Hypertext Markup Language
class and style are supported on all elements but <base>, <basefont>, <head>, <html>, <meta>, <
param>, <script>, <style>, and <title>.
... dir is supported on all elements but <applet>, <base>, <basefont>, <bdo>, <br>, <frame>, <frameset>, <iframe>, <
param>, and <script>.
... lang is supported on all elements but <applet>, <base>, <basefont>, <br>, <frame>, <frameset>, <iframe>, <
param>, and <script>.
... title is supported on all elements but <base>, <basefont>, <head>, <html>, <meta>, <
param>, <script>, and <title>.
Identifying resources on the Web - HTTP
query ?key1=value1&key2=value2 are extra
parameters provided to the web server.
... those
parameters are a list of key/value pairs separated with the & symbol.
... the web server can use those
parameters to do extra stuff before returning the resource to the user.
... each web server has its own rules regarding
parameters, and the only reliable way to know how a specific web server is handling
parameters is by asking the web server owner.
MIME types (IANA media types) - HTTP
an optional
parameter can be added to provide additional details: type/subtype;
parameter=value for example, for any mime type whose main type is text, the optional charset
parameter can be used to specify the character set used for the characters in the data.
... mime types are case-insensitive but are traditionally written in lowercase, with the exception of
parameter values, whose case may or may not have specific meaning.
... some content you find may have a charset
parameter at the end of the text/javascript media type, to specify the character set used to represent the code's content.
...the optional codecs
parameter can be added to the mime type to further specify which codecs to use and what options were used to encode the media, such as codec profile, level, or other such information.
Array.prototype.forEach() - JavaScript
syntax arr.foreach(callback(currentvalue [, index [, array]])[, thisarg])
parameters callback function to execute on each element.
...(for sparse arrays, see example below.) callback is invoked with three arguments: the value of the element the index of the element the array object being traversed if a thisarg
parameter is provided to foreach(), it will be used as callback's this value.
...using thisarg the following (contrived) example updates an object's properties from each entry in the array: function counter() { this.sum = 0 this.count = 0 } counter.prototype.add = function(array) { array.foreach((entry) => { this.sum += entry ++this.count }, this) // ^---- note } const obj = new counter() obj.add([2, 5, 9]) obj.count // 3 obj.sum // 16 since the thisarg
parameter (this) is provided to foreach(), it is passed to callback each time it's invoked.
... note: if passing the callback function uses an arrow function expression, the thisarg
parameter can be omitted, since all arrow functions lexically bind the this value.
Array.prototype.map() - JavaScript
syntax let new_array = arr.map(function callback( currentvalue[, index[, array]]) { // return element for new_array }[, thisarg])
parameters callback function that is called for every element of arr.
...
parameters in detail callback is invoked with three arguments: the value of the element, the index of the element, and the array object being mapped.
... if a thisarg
parameter is provided, it will be used as callback's this value.
...', '2', '3'].map(number) // [1, 2, 3] // but unlike parseint(), number() will also return a float or (resolved) exponential notation: ['1.1', '2.2e2', '3e300'].map(number) // [1.1, 220, 3e+300] // for comparison, if we use parseint() on the array above: ['1.1', '2.2e2', '3e300'].map( str => parseint(str) ) // [1, 2, 3] one alternative output of the map method being called with parseint as a
parameter runs as follows: let xs = ['10', '10', '10'] xs = xs.map(parseint) console.log(xs) // actual result of 10,nan,2 may be unexpected based on the above description.
Date.prototype.setFullYear() - JavaScript
syntax dateobj.setfullyear(yearvalue[, monthvalue[, datevalue]])
parameters yearvalue an integer specifying the numeric value of the year, for example, 1995.
...if you specify the datevalue
parameter, you must also specify the monthvalue.
... description if you do not specify the monthvalue and datevalue
parameters, the values returned from the getmonth() and getdate() methods are used.
... if a
parameter you specify is outside of the expected range, setfullyear() attempts to update the other
parameters and the date information in the date object accordingly.
Date.prototype.setMonth() - JavaScript
syntax dateobj.setmonth(monthvalue[, dayvalue]) versions prior to javascript 1.3 dateobj.setmonth(monthvalue)
parameters monthvalue a zero-based integer representing the month of the year offset from the start of the year.
... description if you do not specify the dayvalue
parameter, the value returned from the getdate() method is used.
... if a
parameter you specify is outside of the expected range, setmonth() attempts to update the date information in the date object accordingly.
...conceptually it will add the number of days given by the current day of the month to the 1st day of the new month specified as the
parameter, to return the new date.
Date.prototype.setUTCFullYear() - JavaScript
syntax dateobj.setutcfullyear(yearvalue[, monthvalue[, dayvalue]])
parameters yearvalue an integer specifying the numeric value of the year, for example, 1995.
...if you specify the dayvalue
parameter, you must also specify the monthvalue.
... description if you do not specify the monthvalue and dayvalue
parameters, the values returned from the getutcmonth() and getutcdate() methods are used.
... if a
parameter you specify is outside of the expected range, setutcfullyear() attempts to update the other
parameters and the date information in the date object accordingly.
Error - JavaScript
rangeerror creates an instance representing an error that occurs when a numeric variable or
parameter is outside of its valid range.
... typeerror creates an instance representing an error that occurs when a variable or
parameter is not of a valid type.
... urierror creates an instance representing an error that occurs when encodeuri() or decodeuri() are passed invalid
parameters.
... class customerror extends error { constructor(foo = 'bar', ...
params) { // pass remaining arguments (including vendor specific ones) to parent constructor super(...
params) // maintains proper stack trace for where our error was thrown (only available on v8) if (error.capturestacktrace) { error.capturestacktrace(this, customerror) } this.name = 'customerror' // custom debugging information this.foo = foo this.date = new ...
Function.length - JavaScript
the length property indicates the number of
parameters expected by the function.
...the number of formal
parameters.
... this number excludes the rest
parameter and only includes
parameters before the first one with a default value.
...*/ console.log((function(...args) {}).length); // 0, rest
parameter is not counted console.log((function(a, b = 1, c) {}).length); // 1, only
parameters before the first one with // a default value is counted specifications specification ecmascript (ecma-262)the definition of 'function.length' in that specification.
Math.ceil() - JavaScript
syntax math.ceil(x)
parameters x a number.
... * * @
param {string} type the type of adjustment.
... * @
param {number} value the number.
... * @
param {integer} exp the exponent (the 10 logarithm of the adjustment base).
Math.floor() - JavaScript
syntax math.floor(x)
parameters x a number.
... * * @
param {string} type the type of adjustment.
... * @
param {number} value the number.
... * @
param {integer} exp the exponent (the 10 logarithm of the adjustment base).
Math.min() - JavaScript
the static function math.min() returns the lowest-valued number passed into it, or nan if any
parameter isn't a number and can't be converted into one.
... syntax math.min([value1[, value2[, ...]]])
parameters value1, value2, ...
...if any one or more of the
parameters cannot be converted into a number, nan is returned.
... the result is infinity if no
parameters are provided.
RegExp - JavaScript
the literal notation's
parameters are enclosed between slashes and do not use quotation marks.
... the constructor function's
parameters are not enclosed between slashes but do use quotation marks.
... regexp.prototype.exec() executes a search for a match in its string
parameter.
... regexp.prototype.test() tests for a match in its string
parameter.
WebAssembly.instantiate() - JavaScript
syntax primary overload — taking wasm binary code promise<resultobject> webassembly.instantiate(buffersource, importobject);
parameters buffersource a typed array or arraybuffer containing the binary code of the .wasm module you want to compile.
... exceptions if either of the
parameters are not of the correct type or structure, a typeerror is thrown.
... secondary overload — taking a module object instance promise<webassembly.instance> webassembly.instantiate(module, importobject);
parameters module the webassembly.module object to be instantiated.
... exceptions if either of the
parameters are not of the correct type or structure, a typeerror is thrown.
Comma operator (,) - JavaScript
this is commonly used to provide multiple
parameters to a for loop.
...
parameters expr1, expr2, expr3...
...the most common usage of this operator is to supply multiple
parameters in a for loop.
... the comma operator is fully different from the comma within arrays, objects, and function arguments and
parameters.
Destructuring assignment - JavaScript
const {a: aa = 10, b: bb = 5} = {a: 3}; console.log(aa); // 3 console.log(bb); // 5 unpacking fields from objects passed as function
parameter const user = { id: 42, displayname: 'jdoe', fullname: { firstname: 'john', lastname: 'doe' } }; function userid({id}) { return id; } function whois({displayname, fullname: {firstname: name}}) { return `${displayname} is ${name}`; } console.log(userid(user)); // 42 console.log(whois(user)); // "jdoe is john" this unpacks the id, displayname and firstname from the user...
... setting a function
parameter's default value function drawchart({size = 'big', coords = {x: 0, y: 0}, radius = 25} = {}) { console.log(size, coords, radius); // do some chart drawing } drawchart({ coords: {x: 18, y: 30}, radius: 30 }); in the function signature for drawchart above, the destructured left-hand side is assigned to an empty object literal on the right-hand side: {size = 'big', coords = {x: 0, y: 0}, radius = 25} = {}.
...however, if you leave out the right-hand side assignment, the function will look for at least one argument to be supplied when invoked, whereas in its current form, you can simply call drawchart() without supplying any
parameters.
... the current design is useful if you want to be able to call the function without supplying any
parameters, the other can be useful when you want to ensure an object is passed to the function.
Spread syntax (...) - JavaScript
syntax for function calls: myfunction(...iterableobj); for array literals or strings: [...iterableobj, '4', 'five', 6]; for object literals (new in ecmascript 2018): let objclone = { ...obj }; rest syntax (
parameters) rest syntax looks exactly like spread syntax.
...see rest
parameters.
...however, an array can be easily used with new thanks to spread syntax: const datefields = [1970, 0, 1]; // 1 jan 1970 const d = new date(...datefields); to use new with an array of
parameters without spread syntax, you would have to do it indirectly through partial application: function applyandnew(constructor, args) { function partial () { return constructor.apply(this, args); }; if (typeof constructor.prototype === "object") { partial.prototype = object.create(constructor.prototype); } return partial; } function myconstructor () { console.log("a...
...objects ) => ( { ...objects } ); let mergedobj1 = merge (obj1, obj2); // object { 0: { foo: 'bar', x: 42 }, 1: { foo: 'baz', y: 13 } } let mergedobj2 = merge ({}, obj1, obj2); // object { 0: {}, 1: { foo: 'bar', x: 42 }, 2: { foo: 'baz', y: 13 } } in the above example, the spread syntax does not work as one might expect: it spreads an array of arguments into the object literal, due to the rest
parameter.
begin - SVG: Scalable Vector Graphics
a valid repeat value consists of an element id followed by a dot and the function repeat() with an integer value specifying the number of repetitions as
parameter.
... a valid accesskey-value consists of the function accesskey() with the character to be input as
parameter.
... a valid wallclock-sync-value consists of the function wallclock() with a time value as
parameter.
...the behavior is the same as if node.removechild() were called on the parent of the target element with the target element as
parameter.
port - Archive of obsolete content
it may be called with any number of
parameters, but is most likely to be called with a name for the message and an optional payload.
... it takes two
parameters: the name of the message and a function to handle it.
...this takes the same two
parameters as port.on(): the name of the message, and the name of the listener function.
self - Archive of obsolete content
postmessage() send a message from a content script to a listener in the main add-on code: self.postmessage(contentscriptmessage); this takes a single
parameter, the message payload, which may be any json-serializable value.
... on() start listening to messages from the main add-on code: self.on("message", function(addonmessage) { // handle the message }); this takes two
parameters: the name of the event, and the handler function.
...this takes two
parameters: the name of the event to stop listening to, and the listener function to remove.
Communicating using "port" - Archive of obsolete content
it may be called with any number of
parameters, but is most likely to be called with a name for the message and an optional payload.
... it takes two
parameters: the name of the message and a function to handle it.
...this takes the same two
parameters as port.on(): the name of the message, and the name of the listener function.
simple-prefs - Archive of obsolete content
the event listener may take an optional
parameter that specifies the name of the property which changed.
... example: function onprefchange(prefname) { console.log("the preference " + prefname + " value has changed!"); } require("sdk/simple-prefs").on("somepreference", onprefchange); require("sdk/simple-prefs").on("someotherpreference", onprefchange); // `""` listens to all changes in the extension's branch require("sdk/simple-prefs").on("", onprefchange);
parameters prefname : string the name of the preference to watch for changes.
...
parameters prefname : string the name of the preference to watch for changes.
tabs - Archive of obsolete content
} });
parameters options : object required options: name type url string string url to be opened in the new tab.
...
parameters callback : function a function to be called when the tab finishes its closing process.
... example var tabs = require("sdk/tabs"); tabs.on('ready', function(tab) { var worker = tab.attach({ contentscript: 'document.body.style.border = "5px solid red";' }); });
parameters options : object optional options: name type contentscriptfile string,array the local file urls of content scripts to load.
event/target - Archive of obsolete content
worker.on('message', function (data) { console.log('data received: ' + data) });
parameters type : string the type of event.
...
parameters type : string the type of event.
...
parameters type : string the type of event.
frame/hidden-frame - Archive of obsolete content
parameters options : object required options: name type onready function,array functions to call when the frame is ready to load content.
...
parameters hiddenframe : hiddenframe the frame to add remove(hiddenframe) unregister a hidden frame, unloading any content that was loaded in it.
...
parameters hiddenframe : hiddenframe the frame to remove hiddenframe hiddenframe objects represent hidden frames.
loader/sandbox - Archive of obsolete content
parameters source : string|window|null an object that determines the privileges that will be given to the sandbox.
...
parameters sandbox : sandbox the sandbox to use.
...
parameters sandbox : sandbox the sandbox to use.
remote/parent - Archive of obsolete content
if you use a relative path, you must use the module
parameter.
...
parameters id : string the module to load.
... to use a relative path you must pass the module
parameter.
stylesheet/utils - Archive of obsolete content
parameters window : nsidomwindow uri : string, nsiuri} type : string the type of the sheet.
...
parameters window : nsidomwindow uri : string, nsiuri} type : string the type of the sheet.
...
parameters type : string the type of the sheet.
test/utils - Archive of obsolete content
parameters exports : object a test file's exports object beforefn : function the function to be called before each test.
...
parameters exports : object a test file's exports object afterfn : function the function to be called after each test.
...
parameters predicate : function a function that gets called every interval milliseconds to determine if the promise should be resolved.
Dialogs and Prompts - Archive of obsolete content
passing
parameter to a dialog and getting return values from it.
...the code to open a dialog named mydialog.xul and pass it arguments: var
params = {inn:{name:"foo", description:"bar", enabled:true}, out:null}; window.opendialog("chrome://myext/content/mydialog.xul", "", "chrome, dialog, modal, resizable=yes",
params).focus(); if (
params.out) { // user clicked ok.
... // notice if user clicks cancel, window.arguments[0].out remains null // because this function is never called window.arguments[0].out = {name:document.getelementbyid("name").value, description:document.getelementbyid("description").value, enabled:document.getelementbyid("enabled").checked}; return true; } see also passing
parameter to a dialog and getting return values from it.
Finding window handles - Archive of obsolete content
notice that by using only the c++ part of this code will get the the parent window handle of the nsibasewindow you give as a
param.
... that means if you use the top level nsibasewindow as a
param, null will be returned in the chain and cause crash of firefox, that's a bug of firefox.(https://bugzilla.mozilla.org/show_bug.cgi?id=489045) now, let's move forward.
... .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .treeowner .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsibasewindow); then in c++ part, a function take nsibasewindow as
param hwnd getparentwindowhwnd(nsibasewindow *window) { nativewindow hwnd; nsresult rv = window->getparentnativewindow(&hwnd); if (ns_failed(rv)) return null; return (hwnd)hwnd; } that's it; use with caution!
JavaScript Daemons Management - Archive of obsolete content
about the “callback arguments” polyfill in order to make this framework compatible with internet explorer (which doesn't support sending additional
parameters to timers' callback function, neither with settimeout() or setinterval()) we included the ie-specific compatibility code (commented code), which enables the html5 standard
parameters' passage functionality in that browser for both timers (polyfill), at the end of the daemon.js module.
...|*| |*| https://developer.mozilla.org/docs/dom/window.setinterval |*| |*| syntax: |*| var timeoutid = window.settimeout(func, delay, [
param1,
param2, ...]); |*| var timeoutid = window.settimeout(code, delay); |*| var intervalid = window.setinterval(func, delay[,
param1,
param2, ...]); |*| var intervalid = window.setinterval(code, delay); |*| \*/ /* if (document.all && !window.settimeout.ispolyfill) { var __nativest__ = window.settimeout; window.settimeout = function (vcallback, ndelay) { var aargs = array.prototype.slice...
...it will be called with three
parameters: index (the iterative index of each invocation), length (the number of total invocations assigned to the daemon - finite or infinity), and backwards (a boolean expressing whether the process is going backwards or not).
Toolbar - Archive of obsolete content
* * @
param {string} toolbarid the id of the toolbar to install to.
... * @
param {string} id the id of the button to install.
... * @
param {string} afterid the id of the element to insert after.
Install Manifests - Archive of obsolete content
note: as of gecko 2.0, the dialog receives the addon object representing your add-on as a
parameter.
...if any value matches the application's build
parameters, it will be installed; if not, the user will get an appropriate error message.
...every time you upload a new version of your add-on or change its compatibility
parameters through the author interface, your update manifest will be generated automatically.
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
od clear: function(event) { event.preventbubble(); var fileenum = this._dir.directoryentries; while (fileenum.hasmoreelements()) { var file = fileenum.getnext().queryinterface(components.interfaces.nsifile); file.remove(false); // debug dump("sessionstore> clear: " + file.leafname + "\n"); } }, _readfile method reads the nslfile object passed as a
parameter, and returns its contents as a text string.
...mponents.interfaces.nsiconverterinputstream.default_replacement_character); var content = ""; var data = {}; while (cvstream.readstring(4096, data)) { content += data.value; } cvstream.close(); return content.replace(/\r\n?/g, "\n"); } catch (ex) { } return null; }, _writefile method creates a new file for the nslfile object passed as a
parameter, and writes the text string, also passed as a
parameter.
... setwindowstate(awindow, astate, aoverwrite) restores the browser window indicated by the
parameter awindow to the state indicated by astate.
Adding windows and dialogs - Archive of obsolete content
it allows you to send a set of optional
parameters that can be used to communicate with the dialog.
... let somevalue = 2; let returnvalue = { accepted : false , result : "" }; window.opendialog( "chrome://xulschoolhello/content/somedialog.xul", "xulschoolhello-some-dialog", "chrome,centerscreen", somevalue, returnvalue); // you can send as many extra
parameters as you need.
... // if (returnvalue.accepted) { do stuff } the optional
parameters are available in the dialog code through the window.arguments property: let somevalue = window.arguments[0]; let returnvalue = window.arguments[1]; // returnvalue.accepted = true; // returnvalue.result = "something"; the
parameter named returnvalue is an object that the dialog will modify to reflect what the user did in it.
Appendix F: Monitoring DOM changes - Archive of obsolete content
* * @
param {string} selector the css selector of nodes about which you * want to be notified.
... * @
param {function(event)} callback the function which is to be called * when matching nodes become available.
... * @
param {document} doc the document in which to watch for new nodes.
Connecting to Remote Content - Archive of obsolete content
in the onload callback function, the responsetext
parameter contains the server response as text.
... the open method takes two required
parameters: the http request method and the url to send the request.
... request.open("post", url, true); request.setrequestheader("content-type", "application/x-www-form-urlencoded"); request.send("data=hello&version=2"); the third
parameter for the open method specifies whether the request should be handled asynchronously or not.
JavaScript Object Management - Archive of obsolete content
ike this anyway, one way to do it is to have a timeout execute the code after a delay: init : function(aevent) { let that = this; this._stringbundle = document.getelementbyid("xs-hw-string-bundle"); window.settimeout( function() { window.alert(that._stringbundle.getstring("xulschoolhello.greeting.label")); }, 0); } the settimeout function executes the function in the first
parameter, after a delay in miliseconds specified by the second
parameter.
... notice the way we send callback functions as
parameters, and the use of an alternate reference for this which we always name that.
... the general guideline we follow is this: whenever you have to set a callback function
parameter, wrap it in an anonymous function.
Setting up an extension development environment - Archive of obsolete content
to quickly achieve our task of creating just a developer profile, we will start the application with the
parameters: /path/to/firefox -no-remote -p profilename without these
parameters, the default behavior of your mozilla applications is to only open the everyday user profile: named default.
... the
parameter -p profilename doesn't imply -no-remote, therefore use them together.
... if you are already running a firefox instance without -no-remote, and you attempt to start another instance with -p profilename (but without the -no-remote
parameter), that second invocation would ignore its -p profilename
parameter, instead opening a new window for the already running instance; sharing all its profile, sessions etc.
Drag and Drop JavaScript Wrapper - Archive of obsolete content
each of the functions takes two
parameters, the first is the event object and the second is an observer object that you create.
...the first
parameter is the event object, available in all event handlers.
... the second
parameter to this function is the observer, which we'll create soon.
Clipboard Test - Archive of obsolete content
<style></style> <style>.description{ display: block; font-size: 13pt; color: #444; font-style: italic; margin-bottom: 7px; } .method>.returns{display: none;} .method>.name>.
param:not(:last-child):after{content: ","; padding-right: .5em; } .method>.name>.
param:not(:last-child):after{content: ","; padding-right: .5em; } .method>.name>.
param>.name:after{content: " as "; font-weight: normal; } .method>.
params{display: block; color:#555;} .method>.
params>.
param{display: block; margin-bottom:5px;} .method>.
params>.
param>.name{font-weight:bold; margin-right:.5em; min-width:80px; display:inline-block;} .method>.
params>.
param>.description{display:inline-block; width:300px; vertical-align:top;margin-right:30px} .method>.
params>.
param>.type{display:inline-block; width:100px; vertical-align:top;font-weight...
...:bold;} .method>.
params>.
param>.type:before{content: "type "; color: #888; font-weight:normal;} .method>.
params>.
param>.default{display:inline-block; width:100px; vertical-align:top;font-weight:bold;} .method>.
params>.
param>.default:before{content: "default "; color: #888;font-weight:normal;} ]]></style> clipboard jetpack's clipboard support api provides a standardized way for features to access the clipboard.
...this is an optional
parameter.
Monitoring downloads - Archive of obsolete content
var dbconn = this.storageservice.opendatabase(this.dbfile); statement = dbconn.createstatement("replace into items values " + "(?1, ?2, ?3, 0, 0.0, 0)"); statement.bindstring
parameter(0, adownload.source.spec); statement.bindint64
parameter(1, adownload.size); statement.bindint64
parameter(2, adownload.starttime); statement.execute(); statement.reset(); dbconn.close(); break; // record the completion (whether failed or successful) of the download case components.interfaces.nsidownloadmanager.download_finished: case c...
... var dbconn = this.storageservice.opendatabase(this.dbfile); var statement = dbconn.createstatement("update items set size=?1, " + "endtime=?2, speed=?3, status=?4 where source=?5 and starttime=?6"); statement.bindint64
parameter(0, adownload.size); statement.bindint64
parameter(1, endtime.gettime()); statement.binddouble
parameter(2, adownload.speed); statement.bindint32
parameter(3, adownload.state); statement.bindstring
parameter(4, adownload.source.spec); statement.bindint64
parameter(5, adownload.starttime); statement.execute(); statement.reset(); dbconn.close(); }, this simp...
...these methods take as a
parameter the zero-based index number of the column whose value you wish to retrieve.
URIs and URLs - Archive of obsolete content
the path consists of directory, filename,
param, query and ref.
...if the spec is completly broken down, it consists of: scheme, username, password, host, port, directory, filebasename, fileextension,
param, query and ref.
... together these segments form the url spec with the following syntax: scheme://username:password@host:port/directory/filebasename.fileextension;
param?query#ref for performance reasons the complete spec is stored in escaped form in the nsstandardurl object with pointers (position and length) to each basic segment and for the more global segments like path and prehost for example.
Binding Implementations - Archive of obsolete content
a method with
parameters specifies those
parameters and their names with
parameter elements declared underneath the method element.
...the
parameters specified are bound to their names in the method body.
... <method name="scrolltoindex"> <
parameter name="index"/> <body> <![cdata[ if (index < 0) return; ...
compareTo - Archive of obsolete content
compareto compares the version information specified in this object to the version information specified in the version
parameter.
... method of installversion object syntax compareto ( installversion version); compareto ( string version); compareto ( int major, int minor, int release, int build);
parameters the compareto method has the following
parameters: maj the major version number.
...if this version object represents a smaller (earlier) version than that represented by the version
parameter, this method returns a negative number.
registerChrome - Archive of obsolete content
method of install object syntax int registerchrome( switch, srcdir, xpipath);
parameters the registerchrome method has the following
parameters: switch switch is the chrome switch indicating what type of file is being registered.
...one final option for the switch
parameter is delayed_chrome, which registers the switch only after a relaunch of the browser.
...description when the third
parameter is omitted (pointing to a specific location within the xpi file), this function is being used in a somewhat deprecated way.
addTab - Archive of obsolete content
the rest of the
parameters are optional.
... firefox 3.6 note the second form of this method was added in firefox 3.6; it allows you to specify the
parameters by name, in any order.
... it also adds the relatedtocurrent
parameter; firefox uses this to decide whether the new tab should be inserted next to the current tab.
Focus and Selection - Archive of obsolete content
it takes three
parameters, the event type, a function to execute when the event occurs and a boolean indicating whether to capture or not.
...it takes two
parameters, the first is the starting character and the second is the character after the last one that you want to have selected.
...if you use the same value for both
parameters, the start and end of the selection changes to the same position.
XBL Example - Archive of obsolete content
it will take one
parameter, the page number to set the page to.
... <method name="setpage"> <
parameter name="newidx"/> <body> <![cdata[ var thedeck=document.getanonymousnodes(this)[0].childnodes[0]; var totalpages=this.childnodes.length; if (newidx<0) return 0; if (newidx>=totalpages) return totalpages; thedeck.setattribute("selectedindex",newidx); document.getanonymousnodes(this)[0].childnodes[1].childnodes[1] .setattribute("value",(newidx+1)+" of "+totalpages); return newidx; ]]> </body> </method> this function is called setpage and takes one
parameter newidx.
...ldnodes.length; document.getanonymousnodes(this)[0].childnodes[1].childnodes[1] .setattribute("value",(this.page+1)+" of "+totalpages); </constructor> <property name="page" onget="return parseint(document.getanonymousnodes(this)[0].childnodes[0].getattribute('selectedindex'));" onset="return this.setpage(val);"/> <method name="setpage"> <
parameter name="newidx"/> <body> <![cdata[ var thedeck=document.getanonymousnodes(this)[0].childnodes[0]; var totalpages=this.childnodes.length; if (newidx<0) return 0; if (newidx>=totalpages) return totalpages; thedeck.setattribute("selectedindex",newidx); document.getanonymousnodes(this)[0].childnodes[1].childnodes[1] ...
Using the Editor from XUL - Archive of obsolete content
it does some getting of window.arguments (which is a way callers can pass
parameters to new windows -- we use this to get the url to be loaded), then it calls editorstartup(), where the real work happens.
... it passes two
parameters; the first indicates whether we want a plain text or html editor (pass text or html here), and the second is the <iframe> element on which we wish to create the editor.
...this
parameter is more important when the editor is in a text widget, where it points to the the subtree of the parent document that corresponds to widget content.
promptBox - Archive of obsolete content
nsidomelement appendprompt( args, onclosecallback );
parameters args arguments for the prompt.
...void removeprompt( nsidomelement aprompt );
parameters aprompt the prompt to dispose of.
...nodelist listprompts( nsidomelement aprompt );
parameters aprompt this
parameter isn't used; i don't know why it's even there.
nsIContentPolicy - Archive of obsolete content
mozilla callers will handle this like reject_request; third-party implementors may, for example, use this to direct their own callers to consult the extra
parameter for additional details.
... short shouldload( in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra, in nsiprincipal arequestprincipal );
parameters acontenttype the type of content being tested.
... short shouldprocess( in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetype, in nsisupports aextra, in nsiprincipal arequestprincipal );
parameters acontenttype the type of content being tested.
NPEvent - Archive of obsolete content
syntax microsoft windows typedef struct _npevent { uint16 event; uint32 w
param; uint32 l
param; } npevent; mac os typedef eventrecord npevent; type eventrecord = record { what: integer; message: longint; when: longint; where: point; modifiers: integer; end; xwindows typedef xevent npevent; fields npevent on microsoft windows the data structure has the following fields: event one of the following event types: wm_paint wm_lbuttondown wm_lbuttonup wm_lbuttondblclk wm_rbuttondown wm_rbuttonup wm_rbuttondblclk wm_mbuttondown wm_mbuttonup wm_mbuttondblclk wm_mousemove ...
...w
param 32 bit field for the windows event
parameter;
parameter value depends upon event type.
... l
param 32 bit field for the windows event
parameter;
parameter value depends upon event type.
NPN_GetValueForURL - Archive of obsolete content
syntax #include <npapi.h> typedef enum { npnurlvcookie = 501, npnurlvproxy } npnurlvariable; nperror npn_getvalueforurl(npp instance, npnurlvariable variable, const char *url, char **value, uint32_t *len);
parameters this function has the following
parameters: instance pointer to the current plug-in instance.
... value out
parameter.
... when multiple cookies are returned for a given url, the format of the return value is: cookie1=value1;cookie2=value2;cookie3=value3 len out
parameter.
NPN_PostURLNotify - Archive of obsolete content
syntax #include <npapi.h> nperror npn_posturlnotify(npp instance, const char* url, const char* target, uint32 len, const char* buf, npbool file, void* notifydata);
parameters the function has the following
parameters: instance current plug-in instance, specified by the plug-in.
...if this function is called with a target
parameter value of _self or a parent to _self, this function should return an invalid_
param nperror.
...see npn_geturl for information about this
parameter.
NPP_SetWindow - Archive of obsolete content
syntax #include <npapi.h> nperror npp_setwindow(npp instance, npwindow *window);
parameters the function has the following
parameters: instance pointer to the current plug-in instance.
... for windowed plug-ins on windows and unix, the window
parameter contains a handle to a subwindow of the browser window hierarchy.
... before setting the window
parameter to point to a new window, it is a good idea to compare the information about the new window to the previous window (if one existed) to account for any changes.
Legacy generator function - Archive of obsolete content
the legacy generator function statement declares legacy generator functions with the specified
parameters.
... syntax function name([
param,[,
param,[...,
param]]]) { [statements] } name the function name.
...
param the name of an argument to be passed to the function.
JavaArray - Archive of obsolete content
in javascript 1.4 and later, the componenttype
parameter is either a javaclass object representing the type of the array or class object, such as one returned by java.lang.class.forname.
...in addition, the tostring method is inherited from the object object and returns the following value: [object javaarray] you must specify a class object, such as one returned by java.lang.object.forname, for the componenttype
parameter of newinstance when you use this method to create an array.
... you cannot use a javaclass object for the componenttype
parameter.
Explaining basic 3D theory - Game development
the camera has three
parameters — location, direction, and orientation — which have to be defined for the newly created scene.
... fragment processing fragment processing focuses on textures and lighting — it calculates final colors based on the given
parameters.
... during output merging some processing is also applied to ignore information that is not needed — for example the
parameters of objects that are outside of the screen or behind other objects, and thus not visible, are not calculated.
Building up a basic demo with Three.js - Game development
you might have noticed the antialias
parameter in the first line — this renders the edges of shapes more smoothly.
... 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.
...the
parameter, dodecahedrongeometry(), defines the size of the object.
Load the assets and print them on screen - Game development
game.load.image('ball', 'img/ball.png'); } the first
parameter we want to give the asset is the name that will be used across our game code — for example, in our ball variable name — so we need to make sure it is the same.
... the second
parameter is the relative path to the graphic asset.
...the first two
parameters are the x and y coordinates of the canvas where you want it added, and the third one is the name of the asset we defined earlier.
Index - Learn web development
90 build your own function article, beginner, codingscripting, functions, guide, javascript, learn, tutorial, build, invoke, l10n:priority,
parameters with most of the essential theory dealt with in the previous article, this article provides practical experience.
... 92 functions — reusable blocks of code api, article, beginner, browser, codingscripting, custom, functions, guide, javascript, learn, method, anonymous, invoke, l10n:priority,
parameters another essential concept in coding is functions, which allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times.
... in this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define them, scope, and
parameters.
Making decisions in your code — conditionals - Learn web development
we also have a function called update(), which takes two colors as
parameters (inputs).
...if this returns true, we run the update() function with
parameters of black and white, meaning that we end up with background color of black and text color of white.
... if it returns false, we run the update() function with
parameters of white and black, meaning that the site color are inverted.
Client-side storage - Learn web development
the storage.setitem() method allows you to save a data item in storage — it takes two
parameters: the name of the item, and its value.
... try typing this into your javascript console (change the value to your own name, if you wish!): localstorage.setitem('name','chris'); the storage.getitem() method takes one
parameter — the name of a data item you want to retrieve — and returns the item's value.
... the storage.removeitem() method takes one
parameter — the name of a data item you want to remove — and removes that item out of web storage.
Website security - Learn web development
for example, consider a site search function where the search terms are encoded as url
parameters, and these terms are displayed along with the results.
... an attacker can construct a search link that contains a malicious script as a
parameter (e.g., http://mysite.com?q=beer<script%20src="http://evilsite.com/tricky.js"></script>) and email it to another user.
...this includes, but is not limited to data in url
parameters of get requests, post requests, http headers and cookies, and user-uploaded files.
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
in our immediate use case, we will define a function called selectonfocus() that will receive a node as
parameter.
...s call onfocus() return { destroy: () => node.removeeventlistener('focus', onfocus) // this will be executed when the node is removed from the dom } } } now we need to tell the <input> to use that function with the use:action directive: <input use:selectonfocus /> with this directive we are telling svelte to run this function, passing the dom node of the <input> as a
parameter, as soon as the component is mounted on the dom.
...actions can also have reactive
parameters, and svelte lets us detect when any of those
parameters change.
Dynamic behavior in Svelte: working with variables and props - Learn web development
the second
parameter, if provided, will contain the index of the current item.
...if removetodo() received no
params, you could use on:event={removetodo}, but not on:event={removetodo()}.
...filter is a top-level variable, so we might be tempted to remove it from the helper function
params, and just call it like this — filtertodos(todo).
Testopia
api users take note: positional
parameters are now deprecated.
... all
params should now be sent in a hash (struct, dict, hashmap or whatever your language of choice calls key, value pairs).
... though all attempts have been made to provide continuing support for positional
parameters, please be aware that some api calls may fail until you make this change.
Debugging on Windows
command line
parameters and environment variables vc++ 6.0: to change or set the command line options, go to project > settings..., debug tab and select general from the drop down list.
... ns_convertutf.* ; might be too broad: (ns|promise)[^\:]*[ss]tring.* ...add common functions to this list should probably make a .reg file for easy importing obtaining stdout and other file handles running the following command in the command window in visual studio returns the value of stdout, which can be used with various debugging methods (such as nsgenericelement::list) that take a file*
param: debug.evaluatestatement {,,msvcr80d}(&__iob_func()[1]) (alternatively you can evaluate {,,msvcr80d}(&__iob_func()[1]) in the quickwatch window) similarly, you can open a file on the disk using fopen: >debug.evaluatestatement {,,msvcr80d}fopen("c:\\123", "w") 0x10311dc0 { ..snip..
... you need to make sure this configure
parameter is set: --enable-debugger-info-modules=yes you can also choose to include or exclude specific modules.
Error codes returned by Mozilla APIs
ns_error_factory_not_loaded (0x800401f8) ns_error_factory_exists (0xc1f30100) ns_error_factory_no_signature_support (0xc1f30101) ns_error_proxy_invalid_in_
parameter (0x80010010) ns_error_proxy_invalid_out_
parameter (0x80010011) ns_error_cannot_convert_data (0x80460001) ns_error_object_is_immutable (0x80460002) ns_error_loss_of_significant_data (0x80460003) ns_error_illegal_during_shutdown (0x8046001e) many operations cannot be performed once the application is being shutdown.
... (0x805b0034) ns_error_dom_security_err (0x805303e8) ns_error_dom_secman_err (0x805303e9) ns_error_dom_wrong_type_err (0x805303ea) ns_error_dom_not_object_err (0x805303eb) ns_error_dom_not_xpc_object_err (0x805303ec) ns_error_dom_not_number_err (0x805303ed) ns_error_dom_not_boolean_err (0x805303ee) ns_error_dom_not_function_err (0x805303ef) ns_error_dom_too_few_
parameters_err (0x805303f0) ns_error_dom_bad_document_domain (0x805303f1) ns_error_dom_prop_access_denied (0x805303f2) ns_error_dom_xpconnect_access_denied (0x805303f3) ns_error_dom_bad_uri (0x805303f4) ns_error_dom_retval_undefined (0x805303f5) ns_error_dom_quota_reached (0x805303f6) an attempt was made to add data into the local or global storage for a given domain that would...
... ns_error_xpc_not_enough_args (0x80570001) ns_error_xpc_need_out_object (0x80570002) ns_error_xpc_cant_set_out_val (0x80570003) ns_error_xpc_native_returned_failure (0x80570004) ns_error_xpc_cant_get_interface_info (0x80570005) ns_error_xpc_cant_get_
param_iface_info (0x80570006) ns_error_xpc_cant_get_method_info (0x80570007) ns_error_xpc_unexpected (0x80570008) ns_error_xpc_bad_convert_js (0x80570009) ns_error_xpc_bad_convert_native (0x8057000a) ns_error_xpc_bad_convert_js_null_ref (0x8057000b) ns_error_xpc_bad_op_on_wn_proto (0x8057000c) ns_error_xpc_cant_convert_wn_to_fun (0x8057000d) ns_error_xpc_cant_define_prop...
IPDL Type Serialization
each type specializes ipc::
paramtraits as follows: namespace ipc { template <> struct
paramtraits<mytype> { typedef mytype
paramtype; static void write(message* amsg, const
paramtype& a
param) { // implement serialization here } static bool read(const message* amsg, void** aiter,
paramtype* aresult) { // implement deserialization here.
...most structures can be serialized in this manner: struct examplestruct { int i; nscstring j; int k[4]; }; namespace ipc { template <> struct
paramtraits<examplestruct> { typedef examplestruct
paramtype; static void write(message* amsg, const
paramtype& a
param) { write
param(amsg, a
param.i); write
param(amsg, a
param.j); for (int i = 0; i < 4; ++i) write
param(amsg, a
param.k[i]); } static bool read(const message* amsg, void** aiter,
paramtype* aresult) { if (!read
param(amsg, aiter, &(aresult->i)) || !r...
...ead
param(amsg, aiter, &(aresult->j))) return false; for (int i = 0; i < 4; ++i) if (!read
param(amsg, aiter, &(aresult->k[i]))) return false; return true; } }; } // namespace ipc once you have a serializer for a type, you can serialize a collection of it (ex: an nstarray<examplestruct>) by simply declaring "using nstarray<examplestruct>;' in your ipdl file, then using it in a ipc method.
JavaScript Tips
var uniquename = { _privatemember: 3, publicmember: "a string", init: function() { this.dosomething(this.anothermember); }, dosomething: function(a
param) { alert(a
param); } }; xpconnect don't use object methods and properties more than you have to.
...you do not have to query interfaces to compare objects, nor to pass objects as
parameters (this is different from c++, where you do have to query interfaces in both cases).
...ace(aiid) { if (aiid.equals(components.interfaces.nsiobserver) || aiid.equals(components.interfaces.nsisupportsweakreference) || aiid.equals(components.interfaces.nsisupports)) return this; throw components.results.ns_nointerface; }, observe: function observe(asubject, atopic, astate) { } } when declaring xpcom methods, try to use the same names for method
parameters as are used in the interface definition.
AddonUpdateChecker
updateinfo getcompatibilityupdate( in updateinfo updates[], in string version, in boolean ignorecompatibility, in string appversion, in string platformversion )
parameters updates an array of update objects version the version of the add-on to get new compatibility information for ignorecompatibility an optional
parameter to get the first compatibility update that is compatible with any version of the application or toolkit appversion the version of the application or null to use the current version platformversion the version of the platform or nu...
... updateinfo getnewestcompatibleupdate( in updateinfo updates[], in string appversion, in string platformversion )
parameters updates an array of update objects appversion the version of the application or null to use the current version platformversion the version of the platform or null to use the current version checkforupdates() starts an update check.
... void checkforupdates( in string id, in string type, in string updatekey, string url, in updatechecklistener listener )
parameters id the id of the add-on being checked for updates type the type of add-on being checked for updates updatekey an optional update key for the add-on url the url of the add-on's update manifest listener an observer to notify of results ...
DownloadSummary
promise bindtolist( downloadlist alist );
parameters alist underlying downloadlist whose contents should be summarized.
...promise addview( object aview );
parameters aview the view object to add.
...promise removeview( object aview );
parameters aview the view object to remove.
Promise.jsm
deferred defer(); obsolete since gecko 30
parameters none.
... promise resolve( avalue );
parameters avalue optional if this value is not a promise, including undefined, it becomes the fulfillment value of the returned promise.
... promise reject( areason );
parameters areason optional the rejection reason for the returned promise.
WebChannel.jsm
parameters callback callback function containing function(id, message, sendercontext)
parameters.
...
parameters none send() sends messages over the webchannel id using the "webchannelmessagetocontent" event.
...
parameters message the message object that will be sent sendercontext the sendercontext
parameter passed to the .listen method.
Encodings for localization files
this is tricky to hook up in the build process, so here it goes: file encoding notes toolkit/installer/windows/charset.mk ascii the win_installer_charset variable must be set to an encoding which matches toolkit/installer/windows/install.it charset=
parameter.
...this must match the charset=
parameter in this file, and the win_installer_charset
parameter in charset.mk the fontname/fontsize/charset
parameters in this file must be set to good values.
...see the table below for appropriate values for the charset=
parameter.
PRExplodedTime
syntax #include <prtime.h> typedef struct prexplodedtime { print32 tm_usec; print32 tm_sec; print32 tm_min; print32 tm_hour; print32 tm_mday; print32 tm_month; print16 tm_year; print8 tm_wday; print16 tm_yday; prtime
parameters tm_
params; } prexplodedtime; description the prexplodedtime structure represents clock/calendar time.
...in addition, prexplodedtime includes a prtime
parameters structure representing the local time zone information, so that the time point is non-ambiguously specified.
... tm_
params: a prtime
parameters structure representing the local time zone information.
PR_Accept
syntax #include <prio.h> prfiledesc* pr_accept( prfiledesc *fd, prnetaddr *addr, printervaltime timeout);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing the rendezvous socket on which the caller is willing to accept new connections.
... if the addr
parameter is not null, pr_accept stores the address of the connecting entity in the prnetaddr object pointed to by addr.
...if the timeout
parameter is not pr_interval_no_timeout and no pending connection can be accepted before the time limit, pr_accept returns null with the error code pr_io_timeout_error.
PR_AcceptRead
syntax #include <prio.h> print32 pr_acceptread( prfiledesc *listensock, prfiledesc **acceptedsock, prnetaddr **peeraddr, void *buf, print32 amount, printervaltime timeout);
parameters the function has the following
parameters: listensock a pointer to a prfiledesc object representing a socket descriptor that has been called with the pr_listen function, also known as the rendezvous socket.
...this
parameter is valid only if the function return does not indicate failure.
...this
parameter is valid only if the function return does not indicate failure.
PR_CEnterMonitor
syntax #include <prcmon.h> prmonitor* pr_centermonitor(void *address);
parameter the function has the following
parameter: address a reference to the data that is to be protected by the monitor.
... returns the function returns one of the following values: if successful, the function returns a pointer to the prmonitor associated with the value specified in the address
parameter.
... description pr_centermonitor uses the value specified in the address
parameter to find a monitor in the monitor cache, then enters the lock associated with the monitor.
PR_CExitMonitor
syntax #include <prcmon.h> prstatus pr_cexitmonitor(void *address);
parameters the function has the following
parameters: address the address of the protected object--the same address previously passed to pr_centermonitor.
...this may indicate that the address
parameter is invalid or that the calling thread is not in the 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.
PR_CNotify
syntax #include <prcmon.h> prstatus pr_cnotify(void *address);
parameter the function has the following
parameter: address the address of the monitored object.
... returns pr_success indicates that the calling thread is the holder of the mutex for the monitor referred to by the address
parameter.
... description using the value specified in the address
parameter to find a monitor in the monitor cache, pr_cnotify notifies single a thread waiting for the monitor's state to change.
PR_CreateFileMap
syntax #include <prio.h> prfilemap* pr_createfilemap( prfiledesc *fd, print64 size, prfilemapprotect prot);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing the file that is to be mapped to memory.
...this
parameter consists of one of the following options: pr_prot_readonly.
... description the prfilemapprotect enumeration used in the prot
parameter is defined as follows: typedef enum prfilemapprotect { pr_prot_readonly, pr_prot_readwrite, pr_prot_writecopy } prfilemapprotect; pr_createfilemap only prepares for the mapping a file to memory.
PR_CreatePipe
syntax #include <prio.h> prstatus pr_createpipe( prfiledesc **readpipe, prfiledesc **writepipe);
parameters the function has the following
parameters: readpipe a pointer to a prfiledesc pointer.
... on return, this
parameter contains the file descriptor for the read end of the pipe.
...on return, this
parameter contains the file descriptor for the write end of the pipe.
PR EnumerateAddrInfo
syntax #include <prnetdb.h> void *pr_enumerateaddrinfo( void *enumptr, const praddrinfo *addrinfo, pruint16 port, prnetaddr *result);
parameters the function has the following
parameters: enumptr the index pointer of the enumeration.
...this
parameter is not checked for validity.
... returns the function returns the value you should specify in the enumptr
parameter for the next call of the enumerator.
PR_EnumerateHostEnt
syntax #include <prnetdb.h> printn pr_enumeratehostent( printn enumindex, const prhostent *hostent, pruint16 port, prnetaddr *address);
parameters the function has the following
parameters: enumindex the index of the enumeration.
...this
parameter is not checked for validity.
... returns the function returns one of the following values: if successful, the function returns the value you should specify in the enumindex
parameter for the next call of the enumerator.
PR_ExplodeTime
syntax #include <prtime.h> void pr_explodetime( prtime usecs, prtime
paramfn
params, prexplodedtime *exploded);
parameters the function has these
parameters: usecs an absolute time in the prtime format.
...
params a time
parameter callback function.
...upon return, the location pointed to by the exploded
parameter contains the converted time value.
PR_Init
syntax #include <prinit.h> void pr_init( prthreadtype type, prthreadpriority priority, pruintn maxptds);
parameters pr_init has the following
parameters: type this
parameter is ignored.
... priority this
parameter is ignored.
... maxptds this
parameter is ignored.
PR_Send
syntax #include <prio.h> print32 pr_send( prfiledesc *fd, const void *buf, print32 amount, printn flags, printervaltime timeout);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing a socket.
... flags this obsolete
parameter must always be zero.
...if the
parameter fd is a blocking socket, this number must always equal amount.
PR_Wait
syntax #include <prmon.h> prstatus pr_wait( prmonitor *mon, printervaltime ticks);
parameters the function has the following
parameter: mon a reference to an existing structure of type prmonitor.
... returns the function returns one of the following values: pr_success means the thread is being resumed from the pr_wait call either because it was explicitly notified or because the time specified by the
parameter ticks has expired.
... a thread waiting on the monitor resumes when the monitor is notified or when the timeout specified by the ticks
parameter elapses.
PR_Writev
syntax #include <prio.h> print32 pr_writev( prfiledesc *fd, priovec *iov, print32 size, printervaltime timeout); #define pr_max_iovector_size 16
parameters the function has the following
parameters: fd a pointer to a prfiledesc object for a socket.
...the value of this
parameter must not be greater than pr_max_iovector_size.
...if the timeout
parameter is not pr_interval_no_timeout and all the data cannot be written in the specified interval, pr_writev returns -1 with the error code pr_io_timeout_error.
An overview of NSS Internals
in the most simple scenario, the programmer will provide a directory on your filesystem as a
parameter to the init function, and nss is designed to do the rest.
...the programmer's task is to initialize nss with the required
parameters (such as a database), and nss will then transparently manage the database files.
...create a context handle while providing all the
parameters required for the operation, then call an “update” function multiple times to pass subsets of the input to nss.
HTTP delegation
no full uri is provided as a
parameter.
... instead, the
parameters are a server session object (that carries host and port information already) and the request path.
...once the http response has been obtained from the http server, the function will provide the results in its "out
parameters".
HTTP delegation
no full uri is provided as a
parameter.
... instead, the
parameters are a server session object (that carries host and port information already) and the request path.
...once the http response has been obtained from the http server, the function will provide the results in its "out
parameters".
NSS_3.12_release_notes.html
ash.h) nss_initwithmerge (see nss.h) pk11_createmergelog (see pk11pub.h) pk11_creategenericobject (see pk11pub.h) pk11_createpbev2algorithmid (see pk11pub.h) pk11_destroymergelog (see pk11pub.h) pk11_generatekeypairwithopflags (see pk11pub.h) pk11_getpbecryptomechanism (see pk11pub.h) pk11_isremovable (see pk11pub.h) pk11_mergetokens (see pk11pub.h) pk11_writerawattribute (see pk11pub.h) seckey_ec
paramstobasepointorderlen (see keyhi.h) seckey_ec
paramstokeysize (see keyhi.h) secmod_deletemoduleex (see secmod.h) sec_getregisteredhttpclient (see ocsp.h) sec_pkcs5isalgorithmpbealgtag (see secpkcs5.h) vfy_createcontextdirect (see cryptohi.h) vfy_createcontextwithalgorithmid (see cryptohi.h) vfy_verifydatadirect (see cryptohi.h) vfy_verifydatawithalgorithmid (see cryptohi.h) vfy_verifydigestdirect (s...
...bug 417024: convert libpkix error code into nss error code bug 422859: libpkix builds & validates chain to root not in the caller-provided anchor list bug 425516: need to destroy data pointed by certvalout
param array in case of error bug 426450: pkix_pl_hashtable_remove leaks hashtable key object bug 429230: memory leak in pkix_checkcert function bug 392696: fix copyright boilerplate in all new pkix code bug 300928: integrate libpkix to nss bug 303457: extensions newly supported in libpkix must be marked supported bug 331096: nss softoken must detect forks on all unix-ish platforms bug 390710: certnamec...
...bug 337088: coverity 405, pk11_
paramtoalgid() in mozilla/security/nss/lib/pk11wrap/pk11mech.c bug 339907: oaep_xor_with_h1 allocates and leaks sha1cx bug 341122: coverity 633 sftk_destroyslotdata uses slot->slotlock then checks it for null bug 351140: coverity 995, potential crash in ecgroup_fromnameandhex bug 362278: lib/util includes header files from other nss directories bug 228190: remove unnecessary nss_enable_ecc defines from...
NSS 3.33 release notes
new functions in cert.h cert_findcertbyissuerandsncx - a variation of existing function cert_findcertbyissuerandsn that accepts an additional password context
parameter.
... cert_findcertbynicknameoremailaddrcx - a variation of existing function cert_findcertbynicknameoremailaddr that accepts an additional password context
parameter.
... cert_findcertbynicknameoremailaddrforusagecx - a variation of existing function cert_findcertbynicknameoremailaddrforusage that accepts an additional password context
parameter.
NSS Developer Tutorial
variable, and function
parameter names, always start with a lowercase letter.
... the function prototype of an exported function, cannot be changed, with these exceptions: a foo *
parameter can be changed to const foo *.
... sometimes an int
parameter can be changed to unsigned int, or an int *
parameter can be changed to unsigned int *.
NSS tools : pk12util
there are optional
parameters that can be used to encrypt the file to protect the certificate material.
...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" alternatively, the -r pri...
...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 friendly name: thawte personal freemail issuing ca - thawte consulting certificate friendly name: thawte freemail member's thawte consulting (pty) ltd.
sslerr.html
her blocks.) ssl_error_handshake_unexpected_alert -12229 "ssl peer was not expecting a handshake message it received." ssl_error_decompression_failure_alert -12228 "ssl peer was unable to successfully decompress an ssl record it received." ssl_error_handshake_failure_alert -12227 "ssl peer was unable to negotiate an acceptable set of security
parameters." ssl_error_illegal_
parameter_alert -12226 "ssl peer rejected a handshake message for unacceptable content." ssl_error_unsupported_cert_alert -12225 "ssl peer does not support certificates of the type it received." ssl_error_certificate_unknown_alert -12224 "ssl peer had some unspecified issue with the certificate it received." ssl_error_...
...fficient_security_alert -12189 "server requires ciphers more secure than those supported by client." ssl_error_internal_error_alert -12188 "peer reports it experienced an internal error." ssl_error_user_canceled_alert -12187 "peer user canceled handshake." ssl_error_no_renegotiation_alert -12186 "peer does not permit renegotiation of ssl security
parameters." ssl_error_unsupported_extension_alert -12184 "ssl peer does not support requested tls hello extension." ssl_error_certificate_unobtainable_alert -12183 "ssl peer could not obtain your certificate from the supplied url." ssl_error_unrecognized_name_alert -12182 "ssl peer has no certificate for the requested dns name." ssl_error_bad_cert_...
...re -12214 "sha-1 digest function failed." ssl_error_mac_computation_failure -12213 "message authentication code computation failed." ssl_error_sym_key_context_failure -12212 "failure to create symmetric key context." ssl_error_sym_key_unwrap_failure -12211 "failure to unwrap the symmetric key in client key exchange message." ssl_error_iv_
param_failure -12209 "pkcs11 code failed to translate an iv into a
param." ssl_error_init_cipher_suite_failure -12208 "failed to initialize the selected cipher suite." ssl_error_session_key_gen_failure -12207 "failed to generate session keys for ssl session." on a client socket, indicates a failure of the pkcs11 key generation function.
NSS Tools crlutil
arg1, arg2: specific to extension type extension
parameters addext uses the range that was set earlier by addcert and will install an extension to every cert entries within the range.
... see "implemented extensions" for more information regarding extensions and theirs
parameters.
...is example lists all the crls in the nss database in the specified directory: crlutil -l -d certdir the crl management tool displays output similar to the following: crl name crl type cn=nss test ca,o=bogus nss,l=mountain view,st=california,c=us crl cn=john smith,o=netscape,l=mountain view,st=california,c=us crl to view a particular crl user should specify -n nickname
parameter.
NSS tools : pk12util
there are optional
parameters that can be used to encrypt the file to protect the certificate material.
...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 div...
...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 friendly name: thawte personal freemail issuing ca - thawte consulting certificate friendly name: thawte freemail member's thawte consulting (pty) ltd.
Pork Tools
out
paramdel out
paramdel converts functions to return via return value instead of an out
param.
...returns are changed to nsnull //instead ns_ok, actual result is returned return result; } caller1 { //case 1 nsresult rv; rv = getter(&var); ns_ensure_success(rv,rv); //case 2: naked call getter(&var); //case 3: nsresult decl nsresult rv2 = getter(&var); ns_ensure_success(rv2,rv2); } caller1 { // case 1 // figure out that rv was only used for the rewritten // out
param call + ns_ensure_success.
... then nuke the declaration // nsresult rv; // move out
param to lhs var = getter(); // detect ns_ensure_success immediately following // and change it to an equivalent ns_ensure_true ns_ensure_true(var, ns_error_failure); // case 2 var = getter(); // case 3, eliminate rv2 decl given that it's not used elsewhere var = getter(); ns_ensure_true(var, ns_error_failure) } out
paramdel also support rewriting getters such that they return already_addrefed<nsifoo>.
Exact Stack Rooting
the purpose of js::mutablehandlet is to allow out-
parameters for rooted gcthings.
...when passed to an out-
param, &handle would convert correctly to js::handlet*, but &local is a compile error.
... bool returnfoo(jscontext *cx, mutablehandlestring out) { out.set(js_newstringcopyz(cx, "foo")); return bool(out); } size_t getlengthfoo(jscontext *cx) { rootedstring s(cx); if (returnfoo(cx, &s)) return js_getstringlength(s); return size_t(-1); } all methods in the js-api that return gcpointers have been changed to this out-
param style.
JS::SetLargeAllocationFailureCallback
data void * data
parameter which will be passed to js::largeallocationfailurecallback.
... added in spidermonkey 38 callback syntax typedef void (* js::largeallocationfailurecallback)(void *data); name type description data void * data
parameter passed to js::setlargeallocationfailurecallback.
... see also mxr id search for js::setlargeallocationfailurecallback mxr id search for js::largeallocationfailurecallback bug 936236 bug 987995 - added data
parameter ...
JS::SetOutOfMemoryCallback
data void * data
parameter which will be passed to js::outofmemorycallback.
... added in spidermonkey 38 callback syntax typedef void (* outofmemorycallback)(jscontext *cx, void *data); name type description data void * data
parameter passed to js::setoutofmemorycallback.
... see also mxr id search for js::setoutofmemorycallback mxr id search for js::outofmemorycallback bug 969415 bug 987995 - added data
parameter ...
JSNewEnumerateOp
properties js::autoidvector & out
parameter.
... statep js::mutablehandleid obsolete since jsapi 37 in/out
parameter.
... idp js::mutablehandleid obsolete since jsapi 37 in/out
parameter.
JSObjectOps.lookupProperty
objp jsobject ** out
parameter.
... propp jsproperty ** out
parameter.
... if jslookuppropop succeeds and returns with *propp non-null, that pointer may be passed as the prop
parameter to a jsattributesop, as a short-cut that bypasses id re-lookup.
JS_CheckAccess
mode jsaccessmode the type of access requested (read, write, etc.) vp jsval * out
parameter.
... attrsp unsigned int * out
parameter.
... the mode
parameter specifies what kind of access to check for.
JS_DefineProperty
result js::objectopresult & (out
parameter) receives the result of the operation.
... the
parameters specify the new property's name, initial stored value, getter, setter, and property attributes (attrs).
... see also mxr id search for js_defineproperty mxr id search for js_defineucproperty mxr id search for js_definepropertybyid js_defineelement bug 461163 bug 1113369 -- added desc and result
parameters ...
JS_DefinePropertyWithTinyId
except for the tinyid
parameter, these functions behave exactly as js_defineproperty and js_defineucproperty.
...any time the javascript engine would pass the name of the property as a string to the id
parameter of a tiny-id-aware callback, it passes int_to_jsval(tinyid) instead.
...for example, if a property named "color" is defined with tiny id 10, then the javascript expressions obj[10] and obj.color will both result in int_to_jsval(10) being passed to jsclass.getproperty as the id
parameter.
JS_DeleteProperty
result js::objectopresult & (out
parameter) receives the result of the operation.
...these functions are identical to js_deleteproperty2 and js_deletepropertybyid2 except that they do not have an out
parameter.
... see also mxr id search for js_deleteproperty mxr id search for js_deletepropertybyid js_deleteproperty2 js_deletepropertybyid2 bug 461163 bug 1113369 -- added result
parameter and js_deleteucproperty ...
JS_EvaluateScript
this
parameter is documented in detail at js_executescript.
... rval jsval * out
parameter.
... rval is an optional out
parameter.
JS_ExecuteScriptPart
this
parameter is documented in detail at js_executescript.
... rval jsval * out
parameter.
...the part
parameter must be either jsexec_prolog to execute the script prolog or jsexec_main to execute the main section of the script.
JS_GetFunctionArity
description js_getfunctionarity returns the number of formal
parameters of a function, fun.
...specifically, if fun is a native function, the result is the value that was passed to the nargs
parameter of js_definefunction.
... otherwise fun is implemented in javascript, and the result is the number of identifiers in its formal
parameter list (see ecma 262-3 §13).
JS_NewExternalString
since the program allocated the memory, it will need to free it; this happens in an external string finalizer indicated by the type
parameter.
... js_newexternalstringwithclosure works similarly, except it accepts an additional
parameter, closure, which is saved in the string's internal data structure.
... see also mxr id search for js_newexternalstring js_getexternalstringclosure js_isexternalstring bug 724810 - replaced type with fin
parameter, and remove js_newexternalstringwithclosure ...
JS_PreventExtensions
result js::objectopresult & (out
parameter) receives the result of the operation.
... added in spidermonkey 45 succeeded bool * out
param indicating, on jsapi success, whether the object is now non-extensible.
... see also mxr id search for js_preventextensions bug 1113369 -- added result
parameter ...
JS_ScheduleGC
this article covers features introduced in spidermonkey 17 set nextscheduled
parameter of gc.
... frequency uint32_t the value of nextscheduled
parameter of gc.
... description js_schedulegc sets the nextscheduled
parameter of gc.
A Web PKI x509 certificate primer
the attributes of the certificates in the verification path have valid
parameters for that verification (for example the validity period of all the certificates are valid for the time the verification is being done) revocation checks are considered ok for that particular validation.
...this type of hierarchy allows for a relatively simple long term root to be distributed to clients, and some flexibility on the intermediate cert so that you can change
parameters based on best practices and security research.
...//ocsp.example.com:80/ intermediate signs the csr (using sha256) and appends the extensions described in the file "openssl x509 -req -sha256 -days 1096 -in example.csr -cakey intkey.pem -ca int.pem -set_serial $some_large_integer -out www.example.com.pem -extfile openssl.int.cnf" security notes there are several organizations that provide recommendations regarding the security
parameters for key/hash sizes given current computational power.
Animated PNG graphics
the output buffer is a pixel array with dimensions specified by the width and height
parameters of the png 'ihdr' chunk.
... the boundaries of the entire animation are specified by the width and height
parameters of the png 'ihdr' chunk, regardless of whether the default image is part of the animation.
... constraints on frame regions: x_offset >= 0 y_offset >= 0 width > 0 height > 0 x_offset + width <= 'ihdr' width y_offset + height <= 'ihdr' height the delay_num and delay_den
parameters together specify a fraction indicating the time to display the current frame, in seconds.
Embedded Dialog API
the precise appearance and contents of the new window are defined by the application, though the app should conform to the chromeflags
parameter of nsiwindowcreator::createchromewindow.
...most if not all of these dialogs will need to be child/dependent/transient windows, so each method responsible for actually opening a window must take an nsidomwindow *aparent
parameter, and use that window as the dialog's parent, if non-null.
...embedded dialog posing interface coding conventions the nsidomwindow *aparent
parameter mentioned above should be the first
parameter to each method in which it appears.
extISessionStorage
boolean has(in astring aname)
parameters aname the name of an item return value true if an item exists with the given name, false otherwise.
... void set(in astring aname, in nsivariant avalue)
parameters aname the name of an item return value get() gets the value of a storage item with the given name.
... nsivariant get(in astring aname, in nsivariant adefaultvalue)
parameters aname the name of an item return value value of the item or the given default value if no item exists with the given name.
XPCOM array guide
void notifyobservers(nsiarray* aarray) { pruint32 length; aarray->getlength(&length); for (pruint32 i=0; i<length; ++i) { nscomptr<nsimyobserver> element = do_queryelementat(aarray, i); element->observe(); } } passing as a
parameter since nsiarray is an xpcom object, it should be passed as a pointer.
...is an nsisupportsarray* void getfirstobject(nsielement** aresult) { // no need to call ns_addref - this does it for you melements->queryelementat(0, ns_get_iid(nsielement), (void**)aresult); } // new version, make sure to call ns_addref() // melements is now a nscomarray<nsielement> void getfirstobject(nsielement** aresult) { *aresult = melements[0]; ns_addref(*aresult); } passing as a
parameter when passing nscomarray<t> among functions, the convention is to pass by reference.
... passing as a
parameter when passing nstarray<t> among functions, the convention is to pass by reference.
How to build an XPCOM component in JavaScript
_xpcom_categories: [{ // each object in the array specifies the
parameters to pass to // nsicategorymanager.addcategoryentry().
... 'true' is passed for both // apersist and areplace
params.
...when set to true, and only if 'value' is not // specified, the concatenation of the string "service," and the object's contractid // is passed as avalue
parameter of addcategoryentry.
NS_InitXPCOM2
#include "nsxpcom.h" nsresult ns_initxpcom2( nsiservicemanager** aresult, nsifile* abindirectory, nsidirectoryserviceprovider* aappfilelocationprovider );
parameters aresult [out] the resulting xpcom service manager.
...this
parameter may be nsnull.
...the one exception is that you may call ns_newlocalfile or ns_newnativelocalfile to create a nsifile needed for the abindirectory
parameter to ns_initxpcom2.
NS_InitXPCOM3
#include "nsxpcom.h" nsresult ns_initxpcom3( nsiservicemanager** aresult, nsifile* abindirectory, nsidirectoryserviceprovider* aappfilelocationprovider, nsstaticmoduleinfo const* astaticmodules, pruint32 astaticmodulecount );
parameters aresult [out] the resulting xpcom service manager.
...this
parameter may be nsnull.
...the one exception is that you may call ns_newlocalfile or ns_newnativelocalfile to create a nsifile needed for the abindirectory
parameter to ns_initxpcom3.
NS_NewLocalFile
#include "nsxpcom.h" #include "nsilocalfile.h" nsresult ns_newlocalfile( const nsastring& apath, prbool afollowlinks, nsilocalfile** aresult );
parameters apath [in] a utf-16 string object that specifies an absolute filesystem path.
...this
parameter has no effect on unix systems.
...nsembedstring is used to convert the ucs-2 character array to an object that can be passed as a const nsastring&
parameter.
NS_NewNativeLocalFile
#include "nsxpcom.h" #include "nsilocalfile.h" nsresult ns_newnativelocalfile( const nsacstring& apath, prbool afollowlinks, nsilocalfile** aresult );
parameters apath [in] a string object that specifies an absolute filesystem path.
...this
parameter has no effect on unix systems.
... example code // create a local file that references c:\foo.txt nsresult rv; nscomptr<nsilocalfile> file; rv = ns_newnativelocalfile(nsembedcstring("c:\\foo.txt"), pr_false, getter_addrefs(file)); if (ns_failed(rv)) return rv; here, nsembedcstring is used to convert the ascii string literal to an object that can be passed as a const nsacstring&
parameter.
Append
void append( const self_type& astring );
parameters astring [in] a nsacstring to append to this string.
... void append( const char_type* adata, size_type adatalength = pr_uint32_max );
parameters adata [in] a raw character array to append to this string.
... void append( char_type achar );
parameters achar [in] a character to append to this string.
Assign
void assign( const self_type& astring );
parameters astring [in] a nsacstring to copy into this string.
... void assign( const char_type* adata, size_type adatalength = pr_uint32_max );
parameters adata [in] a raw character array to copy into this string.
... void assign( char_type achar );
parameters achar [in] the character to copy into this string.
Insert
void insert( const self_type& astring, index_type aposition );
parameters astring [in] a nsacstring to append to this string.
... void insert( const char_type* adata, index_type aposition, size_type adatalength = pr_uint32_max );
parameters adata [in] a raw character array to append to this string.
... void insert( char_type achar, index_type aposition );
parameters achar [in] a character to append to this string.
Replace
void replace( index_type acutstart, index_type acutlength, const self_type& astring );
parameters acutstart [in] the starting index of the section to remove, measured in storage units.
... void replace( index_type acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max );
parameters acutstart [in] the starting index of the section to remove, measured in storage units.
... void replace( index_type acutstart, index_type acutlength, char_type achar );
parameters acutstart [in] the starting index of the section to remove, measured in storage units.
operator=
self_type& operator=( const self_type& astring );
parameters astring [in] a nsacstring to append to this string.
... self_type& operator=( const char_type* adata );
parameters adata [in] a raw character array to append to this string.
... self_type& operator=( char_type achar );
parameters achar [in] a character to append to this string.
operator+=
self_type& operator+=( const self_type& astring );
parameters astring [in] a nsacstring to append to this string.
... self_type& operator+=( const char_type* adata );
parameters adata [in] a raw character array to append to this string.
... self_type& operator+=( char_type achar );
parameters achar [in] a character to append to this string.
Append
void append( const self_type& astring );
parameters astring [in] a nsastring to append to this string.
... void append( const char_type* adata, size_type adatalength = pr_uint32_max );
parameters adata [in] a raw character array to append to this string.
... void append( char_type achar );
parameters achar [in] a character to append to this string.
Assign
void assign( const self_type& astring );
parameters astring [in] a nsastring to copy into this string.
... void assign( const char_type* adata, size_type adatalength = pr_uint32_max );
parameters adata [in] a raw character array to copy into this string.
... void assign( char_type achar );
parameters achar [in] the character to copy into this string.
Insert
void insert( const self_type& astring, index_type aposition );
parameters astring [in] a nsastring to append to this string.
... void insert( const char_type* adata, index_type aposition, size_type adatalength = pr_uint32_max );
parameters adata [in] a raw character array to append to this string.
... void insert( char_type achar, index_type aposition );
parameters achar [in] a character to append to this string.
Replace
void replace( index_type acutstart, index_type acutlength, const self_type& astring );
parameters acutstart [in] the starting index of the section to remove, measured in storage units.
... void replace( index_type acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max );
parameters acutstart [in] the starting index of the section to remove, measured in storage units.
... void replace( index_type acutstart, index_type acutlength, char_type achar );
parameter acutstart [in] the starting index of the section to remove, measured in storage units.
operator=
self_type& operator+=( const self_type& astring );
parameters astring [in] a nsastring to append to this string.
... self_type& operator=( const char_type* adata );
parameters adata [in] a raw character array to append to this string.
... self_type& operator=( char_type achar );
parameters achar [in] a character to append to this string.
IAccessibleComponent
[propget] hresult background( [out] ia2color background );
parameters background the returned color is the background color of this object or, if that is not supported, the default background color.
...[propget] hresult foreground( [out] ia2color foreground );
parameters foreground the returned color is the foreground color of this object or, if that is not supported, the default foreground color.
...[propget] hresult locationinparent( [out] long x, [out] long y );
parameters x the x coordinate of the upper left corner of the object's bounding box relative to the immediate parent object.
IAccessibleHypertext
[propget] hresult hyperlink( [in] long index, [out] iaccessiblehyperlink hyperlink );
parameters index this 0 based index specifies the hyperlink to return.
...[propget] hresult hyperlinkindex( [in] long charindex, [out] long hyperlinkindex );
parameters charindex a 0 based index of the character for which to return the link index.
...[propget] hresult nhyperlinks( [out] long hyperlinkcount );
parameters hyperlinkcount the number of links and link groups within this hypertext paragraph.
IAccessibleImage
[propget] hresult description( [out] bstr description );
parameters description the localized description of the image.
...[propget] hresult imageposition( [in] enum ia2coordinatetype coordinatetype, [out] long x, [out] long y );
parameters coordinatetype specifies whether the returned coordinates should be relative to the screen or the parent object.
...[propget] hresult imagesize( [out] long height, [out] long width );
parameters height the height of the image.
amIWebInstallListener
boolean onwebinstallblocked( in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, in pruint32 acount optional );
parameters awindow the window that triggered the installs.
...void onwebinstalldisabled( in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, in pruint32 acount optional );
parameters awindow the window that triggered the installs.
...boolean onwebinstallrequested( in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, in pruint32 acount optional );
parameters awindow the window that triggered the installs.
imgILoader
imgirequest loadimage( in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsloadflags aloadflags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy );
parameters auri the uri to load.
...imgirequest loadimagewithchannel( in nsichannel achannel, in imgidecoderobserver aobserver, in nsisupports cx, out nsistreamlistener alistener );
parameters achannel the channel to load the image from.
...boolean supportimagewithmimetype( in string mimetype );
parameters mimetype the type to find a decoder for.
mozIAsyncHistory
void getplacesinfo( in jsval aplaceidentifiers, in mozivisitinfocallback acallback );
parameters aplaceidentifiers the uri for which to determine the visited status.
...void isurivisited( in nsiuri auri, in mozivisitedstatuscallback acallback );
parameters auri the places for which to retrieve information, identified by either a single place guid, a single uri, or a js array of uris and/or guids.
...void updateplaces( in moziplaceinfo aplaceinfo, in mozivisitinfocallback acallback optional );
parameters aplaceinfo the moziplaceinfo object[s] containing the information to store or update.
mozIStorageStatementCallback
void handlecompletion( in unsigned short areason );
parameters areason the reason the statement stopped executing; see the list of possible values in the constants section.
... void handleerror( in mozistorageerror aerror );
parameters aerror a mozistorageerror object describing the error that occurred.
... void handleresult( in mozistorageresultset aresultset );
parameters aresultset an mozistorageresultset object describing the available results from the statement's execution.
mozIThirdPartyUtil
boolean isthirdpartychannel( in nsichannel achannel, in nsiuri auri optional );
parameters achannel the channel associated with the load.
...boolean isthirdpartyuri( in nsiuri afirsturi, in nsiuri aseconduri );
parameters afirsturi missing description aseconduri missing description return value true if afirsturi is third party with respect to aseconduri.
...boolean isthirdpartywindow( in nsidomwindow awindow, in nsiuri auri optional );
parameters awindow the bottommost window in the hierarchy.
mozIVisitInfoCallback
void handleerror( in nsresult aresultcode, in moziplaceinfo aplaceinfo );
parameters aresultcode nsresult indicating the reason why the change failed.
...void handleresult( in moziplaceinfo aplaceinfo );
parameters aplaceinfo the information that was entered into the database.
...void oncomplete( in nsresult aresultcode, in moziplaceinfo aplaceinfo );
parameters aresultcode nsresult of the change indicating success or failure reason.
nsIAboutModule
the contract id ends with a
parameter that corresponds to the name of the about page.
...unsigned long geturiflags( in nsiuri auri );
parameters auri return value a combination of the flags above corresponding to the appropriate flags for this about uri.
...nsichannel newchannel( in nsiuri auri );
parameters auri the uri of the new channel.
nsIAccessibleDocument
nsiaccessible getaccessibleinparentchain( in nsidomnode adomnode, in boolean acancreate );
parameters adomnode the dom node we need an accessible for.
... nsiaccessnode getcachedaccessnode( in voidptr auniqueid );
parameters auniqueid the unique id used to cache the node.
... astring getnamespaceuriforid( in short namespaceid );
parameters namespaceid the id of the name space.
nsIAccessibleHyperText
nsiaccessiblehyperlink getlink( in long linkindex );
parameters linkindex 0-based index of the link that is to be retrieved.
... long getlinkindex( in long charindex );
parameters charindex the 0-based character index.
... getselectedlinkindex() obsolete since gecko 1.9 (firefox 3) long getselectedlinkindex();
parameters none.
nsIAccessibleImage
this method is the same as nsiaccessible.getbounds() excepting coordinate origin
parameter.
... void getimageposition( in unsigned long coordtype, out long x, out long y );
parameters coordtype specifies coordinates origin (for available constants refer to nsiaccessiblecoordinatetype).
...void getimagesize( out long width, out long height );
parameters width the width of the image accessible.
nsIAuthInformation
on return, this
parameter should contain the domain entered by the user.
...on return, this
parameter should contain the password entered by the user.
...on return, this
parameter should contain the username entered by the user.
nsIAuthPrompt
boolean prompt( in wstring dialogtitle, in wstring text, in wstring passwordrealm, in pruint32 savepassword, in wstring defaulttext, out wstring result );
parameters dialogtitle the title of the dialog.
... boolean promptpassword( in wstring dialogtitle, in wstring text, in wstring passwordrealm, in pruint32 savepassword, inout wstring pwd );
parameters dialogtitle the title of the dialog.
... boolean promptusernameandpassword( in wstring dialogtitle, in wstring text, in wstring passwordrealm, in pruint32 savepassword, inout wstring user, inout wstring pwd );
parameters dialogtitle the title of the dialog.
nsIAutoCompleteListener
inherits from: nsisupports last changed in gecko 1.7 method overview void onautocomplete(in nsiautocompleteresults result, in autocompletestatus status); void onstatus(in wstring statustext); attributes attribute type description
param nsisupports private
parameter used by the autocomplete widget.
...void onautocomplete( in nsiautocompleteresults result, in nsiautocompletestatus status );
parameters result an nsiautocompleteresults object containing the (partial) results of the autocomplete.
...void onstatus( in wstring statustext );
parameters statustext ...
nsIBidiKeyboard
(supported on: win32, mac, gtk2) note: prior to gecko 1.9 this method used a
parameter 'out prbool aisrtl' to return the value.
... boolean islangrtl();
parameters none.
...(supported on: win32) void setlangfrombidilevel( in pruint8 alevel );
parameters alevel if odd set the keyboard to right-to-left, if even set left-to-right.
nsICacheListener
the status
parameter equals ns_ok on success.
...void oncacheentryavailable( in nsicacheentrydescriptor descriptor, in nscacheaccessmode accessgranted, in nsresult status );
parameters descriptor the cache entry descriptor.
...void oncacheentrydoomed( in nsresult status );
parameters status the status is ns_ok when the entry was doomed, or ns_error_not_available when there is no such entry.
nsIClassInfo
nsisupports gethelperforlanguage( in pruint32 language );
parameters language this
parameter selects the language mapping specific helper object to be returned.
... nsiprogramminglanguage defines language identifiers that may be passed for this
parameter.
... void getinterfaces( out pruint32 count, [array, size_is(count), retval] out nsiidptr array );
parameters count the length of the resulting array.
nsIClipboardDragDropHookList
void addclipboarddragdrophooks( in nsiclipboarddragdrophooks ahooks );
parameters ahooks implementation of hooks.
...nsisimpleenumerator gethookenumerator();
parameters none.
...void removeclipboarddragdrophooks( in nsiclipboarddragdrophooks ahooks );
parameters ahooks implementation of hooks.
nsICompositionStringSynthesizer
void appendclause(in unsigned long alength, in unsigned long aattribute);
parameters alength the length of appending clause.
... void setcaret(in unsigned long aoffset, in unsigned long alength);
parameters aoffset caret offset in the composition string.
... void setstring(in astring astring);
parameters astring new composition string.
nsIContentFrameMessageManager
parameters name type description astr string the message to log.
...
parameters name type description aasciistring string ascii string to decode.
...
parameters name type description abase64data string binary data to encode as base64.
nsIContentPrefCallback2
void handlecompletion( in unsigned short reason );
parameters reason one of the complete_* values indicating the manner in which the method completed.
...void handleerror( in nsresult error );
parameters error a number in components.results describing the error.
...void handleresult( in nsicontentpref pref );
parameters pref the retrieved preference.
nsIContentView
void scrollby( in float dxpx, in float dypx );
parameters dxpx the number of css pixels to scroll on the x axis; specify a positive value to scroll to the right or a negative value to scroll to the left.
... void scrollto( in float xpx, in float ypx );
parameters xpx the x coordinate to scroll to, in css pixels.
... void setscale( in float xscale, in float yscale );
parameters xscale horizontal scaling factor; specify 1.0 to use the natural size of the content.
nsIDNSListener
void onlookupcomplete( in nsicancelable arequest, in nsidnsrecord arecord, in nsresult astatus );
parameters arequest the value returned from asyncresolve.
...this
parameter is null if there was an error.
... astatus if the lookup failed, this
parameter gives the reason.
nsIDOMHTMLAudioElement
unsigned long long mozcurrentsampleoffset();
parameters none.
...void mozsetup( in pruint32 channels, in pruint32 rate );
parameters channels the number of audio channels the audio stream should use.
...unsigned long mozwriteaudio( in jsval data );
parameters data the samples to write into the audio stream, specified either as a javascript array or as a numeric typed array.
nsIDOMStorageManager
void clearofflineapps();
parameters none.
...nsidomstorage getlocalstorageforprincipal( nsiprincipal aprincipal, domstring adocumenturi );
parameters aprincipal the principal for which to return the local storage object.
...long getusage( astring aownerdomain );
parameters aownerdomain the domain to check.
nsIDOMXPathEvaluator
nsidomxpathexpression createexpression( in domstring expression, in nsidomxpathnsresolver resolver );
parameters expression a string representing the xpath to be created.
...nsidomxpathnsresolver creatensresolver( in nsidomnode noderesolver );
parameters noderesolver the node to be used as a context for name space resolution.
...nsisupports evaluate( in domstring expression, in nsidomnode contextnode, in nsidomxpathnsresolver resolver, in unsigned short type, in nsisupports result );
parameters expression a string representing the xpath to be evaluated.
nsIDirectoryService
void init();
parameters none.
...void registerprovider( in nsidirectoryserviceprovider prov );
parameters prov the nsidirectoryserviceprovider to register with the service.
...void unregisterprovider( in nsidirectoryserviceprovider prov );
parameters prov the nsidirectoryserviceprovider to unregister from the service.
nsIDroppedLinkHandler
boolean candroplink( in nsidomdragevent aevent, in prbool aallowsamedocument );
parameters aevent a dragenter or dragover event.
... astring droplink( in nsidomdragevent aevent, out astring aname, [optional] in boolean adisallowinherit );
parameters aevent a drop event.
... void droplinks( in nsidomdragevent aevent, [optional] in boolean adisallowinherit, [optional] out unsigned long acount, [retval, array, size_is(acount)] out nsidroppedlinkitem alinks );
parameters aevent a drop event.
nsIEnvironment
void set( in astring aname, in astring avalue );
parameters aname the variable name to set.
... astring get( in astring aname );
parameters aname the variable name to retrieve.
... boolean exists( in astring aname );
parameters aname the variable name to probe.
nsIEventTarget
void dispatch( in nsirunnable event, in unsigned long flags );
parameters event the event to dispatch.
...boolean isoncurrentthread();
parameters none.
...void postevent( in pleventptr aevent );
parameters aevent the event to dispatched.
nsIFeedProcessor
void parseasync( in nsirequestobserver requestobserver, in nsiuri uri );
parameters requestobserver the observer to be notified when parsing starts and stops.
... void parsefromstream( in nsiinputstream stream, in nsiuri uri );
parameters stream pointer to the nsiinputstream from which to read and parse the feed.
... void parsefromstring( in astring str, in nsiuri uri );
parameters str the string to parse as a feed.
nsIFeedTextConstruct
some extension elements also include "type"
parameters, and this interface could be used to represent those as well.
... nsidomdocumentfragment createdocumentfragment( in nsidomelement element );
parameters element the element in which to create the new document fragment.
... astring plaintext();
parameters none.
nsIFileView
void setdirectory( in nsifile directory );
parameters directory the directory to be browsed.
...void setfilter( in astring filterstring );
parameters filterstring the filter to be applied to the file list.
...void sort( in short sorttype, in boolean reversesort );
parameters sorttype one of the sort* constants.
nsIGlobalHistory2
void adduri( in nsiuri auri, in boolean aredirect, in boolean atoplevel, in nsiuri areferrer );
parameters auri the nsiuri of the page being added.
...boolean isvisited( in nsiuri auri );
parameters auri the nsiuri of the page.
...void setpagetitle( in nsiuri auri, in astring atitle );
parameters auri the nsiuri for which to set to the title.
nsIHttpActivityObserver
void observeactivity( in nsisupports ahttpchannel, in pruint32 aactivitytype, in pruint32 aactivitysubtype, in prtime atimestamp, in pruint64 aextrasizedata, in acstring aextrastringdata );
parameters ahttpchannel the nsihttpchannel on which the activity occurred.
... interpreting activity data depending on the values of the aactivitytype and aactivitysubtype fields, the aextrasizedata and aextrastringdata
parameters take on different meanings.
... socket transport activity when the activity type is activity_type_socket_transport and the subtype is status_sending_to, the aextrasizedata
parameter contains the number of bytes sent.
nsIMicrosummary
void addobserver( in nsimicrosummaryobserver observer );
parameters observer the microsummary observer to add.
...boolean equals( in nsimicrosummary aother );
parameters aother the microsummary to compare against.
...void removeobserver( in nsimicrosummaryobserver observer );
parameters observer the microsummary observer to remove.
nsIMicrosummaryObserver
void oncontentloaded( in nsimicrosummary microsummary );
parameters microsummary the microsummary whose content has just been updated.
...void onelementappended( in nsimicrosummary microsummary );
parameters microsummary the microsummary that has just been appended to the set.
...void onerror( in nsimicrosummary microsummary );
parameters microsummary the microsumary which could not be updated.
nsIMicrosummarySet
void addobserver( in nsimicrosummaryobserver observer );
parameters observer the microsummary observer to add.
...nsisimpleenumerator enumerate();
parameters none.
...void removeobserver( in nsimicrosummaryobserver observer );
parameters observer the microsummary observer to remove.
nsIMsgCustomColumnHandler
astring getsortstringforrow(in nsimsgdbhdr ahdr);
parameters ahdr the message's nsimsgdbhdr.
... unsigned long getsortlongforrow(in nsimsgdbhdr ahdr);
parameters ahdr the message's nsimsgdbhdr.
...isstring() boolean isstring();
parameters none.
nsIMsgDBViewCommandUpdater
void updatecommandstatus();
parameters none.
... void displaymessagechanged(in nsimsgfolder afolder, in astring asubject, in acstring akeywords );
parameters afolder the folder containing selected message.
... updatenextmessageafterdelete() allows the backend to tell the front end to re-determine which message we should select after a delete or move void updatenextmessageafterdelete();
parameters none.
nsIMsgSendLater
void sendunsentmessages(in nsimsgidentity identity)
parameters identity the nsimsgidentity to send unsent messages for removelistener() remove an event listener from this nsisendmsglater instance void removelistener(in nsimsgsendlaterlistener listener);
parameters listener the nsimsgsendlaterlistener to remove.
... void addlistener(in nsimsgsendlaterlistener listener);
parameters listener the nsimsgsendlaterlistener to add.
... nsimsgfolder getunsentmessagesfolder(in nsimsgidentity identity);
parameters identity the nsimsgidentity to get the folder for.
nsIMsgWindowCommands
void selectfolder( in acstring folderuri );
parameters folderuri the uri of the folder to select.
...void selectmessage( in acstring messageuri );
parameters messageuri the uri of the message to open.
...void clearmsgpane();
paramters none.
nsINavHistoryContainerResultNode
nsinavhistoryresultnode findnodebydetails( in autf8string auristring, in prtime atime, in long long aitemid, in boolean recursive );
parameters auristring the uri attribute value to match on.
... nsinavhistoryresultnode getchild( in unsigned long aindex );
parameters aindex the index into the child list of the node to fetch.
...unsigned long getchildindex( in nsinavhistoryresultnode anode );
parameters anode the node whose index is to be returned.
nsIParentalControlsService
void log( in short aentrytype, in boolean aflag, in nsiuri asource, in nsifile atarget optional );
parameters aentrytype the type of event to log.
... boolean requesturioverride( in nsiuri atarget, in nsiinterfacerequestor awindowcontext optional );
parameters atarget the uri to be overridden.
... boolean requesturioverrides( in nsiarray atargets, in nsiinterfacerequestor awindowcontext optional );
parameters atargets an array of nsiuri objects, each representing a uri for which an override is desired.
nsIParserUtils
astring converttoplaintext( in astring src, in unsigned long flags, in unsigned long wrapcol );
parameters src the html source to parse (c++ callers are allowed but not required to use the same string for the return value.) flags conversion option flags defined in nsidocumentencoder.
... nsidomdocumentfragment parsefragment( in astring fragment, in unsigned long flags, in boolean isxml, in nsiuri baseuri, in nsidomelement element );
parameters fragment the input markup.
... astring sanitize( in astring src, in unsigned long flags );
parameters src the html source to parse (c++ callers are allowed but not required to use the same string for the return value).
nsIPrefBranch2
for example, if your observer is registered with addobserver("bar.", ...) on a branch with root "foo.", modifying the preference "foo.bar.baz" will trigger the observer, and adata
parameter will be "bar.baz".
... void addobserver( in string adomain, in nsiobserver aobserver, in boolean aholdweak );
parameters adomain the preference on which to listen for changes.
... void removeobserver( in string adomain, in nsiobserver aobserver );
parameters adomain the preference which is being observed for changes.
nsIPrinterEnumerator
methods displaypropertiesdlg() void displaypropertiesdlg( in wstring aprinter, in nsiprintsettings aprintsettings );
parameters aprinter aprintsettings enumerateprinters() obsolete since gecko 1.9 (firefox 3) returns an array of the names of all installed printers.
... void enumerateprinters( out pruint32 acount, [retval, array, size_is(acount)] out wstring aresult );
parameters acount returns number of printers returned.
...void initprintsettingsfromprinter( in wstring aprintername, in nsiprintsettings aprintsettings );
parameters aprintername aprintsettings ...
nsIScriptError
void init( in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category );
parameters message the text of the message to add to the log.
... void initwithwindowid( in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category, in unsigned long long innerwindowid );
parameters message the text of the message to add to the log.
... autf8string tostring();
parameters none.
nsIScriptableUnescapeHTML
nsidomdocumentfragment parsefragment( in astring fragment, in prbool isxml, in nsiuri baseuri, in nsidomelement element );
parameters fragment a string of html or xml source to parse as a fragment.
...this
parameter is ignored if isxml is false.
... astring unescape( in astring src );
parameters src the html string to convert into plain text.
nsISelection2
void getrangesforinterval( in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results );
parameters beginnode beginoffset endnode endoffset these four
parameters represent the range to compare against the selection.
... native code only!getrangesforintervalcomarray void getrangesforintervalcomarray( in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, in rangearray results );
parameters beginnode beginoffset endnode endoffset these four
parameters represent the range to compare against the selection.
... void scrollintoview( in short aregion, in boolean aissynchronous, in short avpercent, in short ahpercent );
parameters aregion the region inside the selection to scroll into view (see selection region constants defined in nsiselectioncontroller).
nsISimpleEnumerator
nsisupports getnext();
parameters none.
... return value ns_ok if the call succeeded in returning a non-null value through the out
parameter.
...boolean hasmoreelements();
parameters none.
nsISmsService
boolean hassupport(); void send(in domstring number, in domstring message, in long requestid, [optional] in unsigned long long processid); methods createsmsmessage() [implicit_jscontext] nsidommozsmsmessage createsmsmessage( in long id, in domstring delivery, in domstring sender, in domstring receiver, in domstring body, in jsval timestamp, in bool read );
parameters id a number representing the id of the message.
... return value a smsmessage getnumberofmessagesfortext() unsigned short getnumberofmessagesfortext( in domstring text );
parameters text a domstring text to check.
... send() void send( in domstring number, in domstring message, in long requestid, in unsigned long long processid optional );
parameters number a domstring with a telephone number to send to.
nsIStreamListener
void ondataavailable( in nsirequest arequest, in nsisupports acontext, in nsiinputstream ainputstream, in unsigned long aoffset, in unsigned long acount );
parameters arequest an nsirequest indicating the source of the data.
...in other words, the sum of all previous count
parameters.
... if that number is greater than or equal to 2^32, this
parameter will be pr_uint32_max (2^32 - 1).
nsIStyleSheetService
void loadandregistersheet( in nsiuri sheeturi, in unsigned long type );
parameters sheeturi uri of the stylesheet to load and register.
... sheetregistered() check if a stylesheet has been registered boolean sheetregistered( in nsiuri sheeturi, in unsigned long type );
parameters sheeturi uri of the stylesheet to check.
...void unregistersheet( in nsiuri sheeturi, in unsigned long type );
parameters sheeturi uri of the stylesheet to unregister.
nsISupports
nsrefcnt addref();
parameters none.
... void queryinterface( in nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result );
parameters uuid the uuid of the requested interface result the resulting interface pointer.
...nsrefcnt release();
parameters none.
nsISyncJPAKE
void final( in acstring ab, in acstring agvb, in acstring arb, in acstring ahkdfinfo, out acstring aaes256key, out acstring ahmac256key );
parameters ab schnorr signature value b, in hex representation.
...void round1( in acstring asignerid, out acstring agx1, out acstring agv1, out acstring ar1, out acstring agx2, out acstring agv2, out acstring ar2 );
parameters asignerid string identifying the signer.
...void round2( in acstring apeerid, in acstring apin, in acstring agx3, in acstring agv3, in acstring ar3, in acstring agx4, in acstring agv4, in acstring ar4, out acstring aa, out acstring agva, out acstring ara );
parameters apeerid string identifying the peer.
nsITaskbarTabPreview
void ensureregistration();
parameters none.
... nativewindow gethwnd();
parameters none.
... void move( in nsitaskbartabpreview anext );
parameters anext the preview that this preview should be placed to the left of.
nsIUpdateCheckListener
void oncheckcomplete( in nsixmlhttprequest request, [array, size_is(updatecount)] in nsiupdate updates, in unsigned long updatecount );
parameters request the nsixmlhttprequest object handling the update check.
...void onerror( in nsixmlhttprequest request, in nsiupdate update );
parameters request the nsixmlhttprequest object handling the update check.
...void onprogress( in nsixmlhttprequest request, in unsigned long position, in unsigned long totalsize );
parameters request the nsixmlhttprequest object handling the update check.
nsIWindowsShellService
string getregistryentry( in long ahkeyconstant, in string asubkeyname, in string avaluename );
parameters ahkeyconstant the starting key, using the constants defined above.
...void restorefilesettings( in boolean aforallusers );
parameters aforallusers whether or not firefox should restore settings for all users on a multi-user system.
...void shortcutmaintenance();
parameters none.
nsIXPCException
methods initialize() void initialize( in string amessage, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner );
parameters amessage aresult aname alocation adata ainner native code only!stealjsval xpcexjsval stealjsval();
parameters none.
... return value native code only!stowjsval void stowjsval( in xpcexjscontextptr cx, in xpcexjsval val );
parameters cx val remarks components.exception is a javascript constructor to create nsixpcexception objects.
... the call signature of the constructor is: components.exception(message, result, stack, data, inner) all
parameters are optional and the appropriate placeholder is 'unknown'.
nsIZipReaderCache
nsizipreader getinnerzip( in nsifile zipfile, in autf8string zipentry );
parameters zipfile the zip file.
...note: if nsizipreader.close has been called on the shared nsizipreader, this method will return the closed nsizipreader nsizipreader getzip( in nsifile zipfile );
parameters zipfile the zip file.
...void init( in unsigned long cachesize );
parameters cachesize the number of released entries to maintain before beginning to throw some out.
Declaring and Calling Functions
example: no input
parameters in this example, we declare the libc clock() function, which returns the elapsed time since system startup, then fetch and output that value.
... const clock = lib.declare("clock", ctypes.default_abi, ctypes.unsigned_long); console.log("clocks since startup: " + clock()); the clock() function requires no input
parameters; it simply returns an unsigned long.
... example: multiple input
parameters this example declares the libc asctime() function, which converts a time structure into a string.
Working with data
creating initialized cdata objects similarly, you can initialize cdata objects with specific values at the type of creation by specifying them as a
parameter when calling the ctype's constructor, like this: var mycdataobj = new type(value); var mycdataobj = type(value); if the size of the specified type isn't undefined, the specified value is converted to the given type.
... using strings with c functions you don't even need to convert strings when using them as input
parameters to c functions.
...it accepts as its input
parameters the high and low 32-bit values and returns a new 64-bit integer.
Using js-ctypes
ame */ ctypes.default_abi, /* abi type */ ctypes.int16_t, /* return type */ ctypes.int16_t, /* alert type */ ctypes.char.ptr, /* primary text */ ctypes.char.ptr, /* secondary text */ ctypes.uint32_t, /* alert
param */ ctypes.int16_t); /* item hit */ var hit = 0; var msgerr = makestr("carbon says..."); var msgexp = makestr("we just called the standardalert carbon function from javascript!"); var err = stdalert(1, msgerr, msgexp, 0, hit); carbon.close(); the makestr() function is a utility routine that takes as input a standard javascript string and returns a carbon-style "...
...it uses the default abi, returns a 16-bit integer (which is a carbon oserr value), and accepts an integer (the alert type), two strings, a pointer to a
parameter block, which we aren't using, and another integer, which is used to return the hit item.
... after that, we simply set up our
parameters by using makestr() to generate the two str255 strings we need, then call stdalert(), which produces the following alert window: the last thing we do is call carbon.close() to close the library when we're done using it.
ABI
a calling convention is an implementation-level (low-level) scheme regarding how subroutines receive
parameters from their caller and how they revert.
... string tosource()
parameters none.
... string tostring();
parameters none.
FunctionType
ctype functiontype( abi, returntype[, argtype1, ...] );
parameters abi the abi type for the function; this is one of the abi constants.
...argtypen zero or more ctype objects indicating the types of each of the
parameters passed into the c function.
...
parameters func a pointer value or javascript function.
PointerType
ctype pointertype( type );
parameters type specifies the type to which the pointer type points.
... exceptions thrown typeerror thrown if the
parameter isn't a ctype.
... bool isnull();
parameters none.
StructType
ctype structtype( name[, fields] );
parameters name the name of the structure.
... define( fields );
parameters fields a field specification, as described above.
... cdata addressoffield( name );
parameters name the name of the field whose address is to be returned.
ctypes
cdata cast( data, type );
parameters data the cdata object to type cast.
...libnss3.dylib for nss3 on os x.) string libraryname( name );
parameters name the name of the library.
... library open( libspec );
parameters libspec the native library to open, specified as a pathname string.
Memory - Plugins
the npn_memalloc method has the following syntax: void *npn_memalloc (uint32 size); the size
parameter is an unsigned long integer that represents the amount of memory, in bytes, to allocate in the browser's memory space.
... void npn_memfree (void *ptr); the ptr
parameter represents a block of memory previously allocated using npn_memalloc.
... uint32 npn_memflush (uint32 size); the size
parameter is an unsigned long integer that represents the amount of memory, in bytes, to free in the browser's memory space.
Migrating from Firebug - Firefox Developer Tools
in there the functions are listed together with their call
parameters.
...to see the call
parameters in the devtools, you need to have a look at the variables side panel.
...they contain a headers,
params, response and cookies panel.
Web Console Helpers - Firefox Developer Tools
the resulttype
parameter specifies the type of result to return; it can be an xpathresult constant, or a corresponding string: "number", "string", "bool", "node", or "nodes"; if not provided, any_type is used.
...if you don't supply a filename, the image file will be named with the following format: screen shot yyy-mm-dd at hh.mm.ss.png the command has the following optional
parameters: command type description --clipboard boolean when present, this
parameter will cause the screenshot to be copied to the clipboard.
...with this
parameter, even the parts of the webpage which are outside the current bounds of the window will be included in the screenshot.
The JavaScript input interpreter - Firefox Developer Tools
the resulttype
parameter specifies the type of result to return; it can be an xpathresult constant, or a corresponding string: "number", "string", "bool", "node", or "nodes"; if not provided, any_type is used.
...if you don't supply a filename, the image file will be named: screen shot yyy-mm-dd at hh.mm.ss.png the command has the following optional
parameters: command type description --clipboard boolean when present, this
parameter will cause the screenshot to be copied to the clipboard.
...with this
parameter, even the parts of the webpage which are outside the current bounds of the window will be included in the screenshot.
AudioBufferSourceNode.detune - Web APIs
the detune property of the audiobuffersourcenode interface is a k-rate audio
param representing detuning of oscillation in cents.
... syntax var source = audioctx.createbuffersource(); source.detune.value = 100; // value in cents note: though the audio
param returned is read-only, the value it represents is not.
... value a k-rate audio
param whose value indicates the detuning of oscillation in cents.
AudioListener.forwardX - Web APIs
the forwardx read-only property of the audiolistener interface is an audio
param representing the x value of the direction vector defining the forward direction the listener is pointing in.
... note: the
parameter is a-rate when used with a pannernode whose panningmodel is set to equalpower, or k-rate otherwise.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.forwardx.value = 0; value an audio
param.
AudioListener.forwardY - Web APIs
the forwardy read-only property of the audiolistener interface is an audio
param representing the y value of the direction vector defining the forward direction the listener is pointing in.
... note: the
parameter is a-rate when used with a pannernode whose panningmodel is set to equalpower, or k-rate otherwise.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.forwardy.value = 0; value an audio
param.
AudioListener.forwardZ - Web APIs
the forwardz read-only property of the audiolistener interface is an audio
param representing the z value of the direction vector defining the forward direction the listener is pointing in.
... note: the
parameter is a-rate when used with a pannernode whose panningmodel is set to equalpower, or k-rate otherwise.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.forwardz.value = 0; value an audio
param.
AudioListener.positionX - Web APIs
the positionx read-only property of the audiolistener interface is an audio
param representing the x position of the listener in 3d cartesian space.
... note: the
parameter is a-rate when used with a pannernode whose pannernode is set to equalpower, or k-rate otherwise.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.positionx.value = 1; value an audio
param.
AudioListener.positionY - Web APIs
the positiony read-only property of the audiolistener interface is an audio
param representing the y position of the listener in 3d cartesian space.
... note: the
parameter is a-rate when used with a pannernode whose pannernode is set to equalpower, or k-rate otherwise.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.positiony.value = 1; value an audio
param.
AudioListener.positionZ - Web APIs
the positionz read-only property of the audiolistener interface is an audio
param representing the z position of the listener in 3d cartesian space.
... note: the
parameter is a-rate when used with a pannernode whose pannernode is set to equalpower, or k-rate otherwise.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.positionz.value = 1; value an audio
param.
AudioListener.setOrientation() - Web APIs
it consists of two direction vectors: the front vector, defined by the three unitless
parameters x, y and z, describes the direction of the face of the listener, that is the direction the nose of the person is pointing towards.
... the up vector, defined by three unitless
parameters xup, yup and zup, describes the direction of the top of the listener's head.
...
parameters x the x value of the front vector of the listener.
AudioListener.upX - Web APIs
the upx read-only property of the audiolistener interface is an audio
param representing the x value of the direction vector defining the up direction the listener is pointing in.
... note: the
parameter is a-rate when used with a pannernode whose pannernode is set to equalpower, or k-rate otherwise.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.upx.value = 0; value an audio
param.
AudioListener.upY - Web APIs
the upy read-only property of the audiolistener interface is an audio
param representing the y value of the direction vector defining the up direction the listener is pointing in.
... note: the
parameter is a-rate when used with a pannernode whose pannernode is set to equalpower, or k-rate otherwise.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.upy.value = 0; value an audio
param.
AudioListener.upZ - Web APIs
the upz read-only property of the audiolistener interface is an audio
param representing the z value of the direction vector defining the up direction the listener is pointing in.
... note: the
parameter is a-rate when used with a pannernode whose pannernode is set to equalpower, or k-rate otherwise.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.upz.value = 0; value an audio
param.
AudioWorkletGlobalScope.registerProcessor - Web APIs
syntax audioworkletglobalscope.registerprocessor(name, processorctor);
parameters name a string representing the name under which the processor will be registered.
... typeerror the processorctor is not a callable constructor, or the
parameterdescriptors property of the constructor exists and doesn't return an array of audio
paramdescriptor-based objects.
... // test-processor.js class testprocessor extends audioworkletprocessor { process (inputs, outputs,
parameters) { return true } } registerprocessor('test-processor', testprocessor) next, in our main script file we'll load the processor, create an instance of audioworkletnode — passing it the processor name that we used when calling registerprocessor — and connect it to an audio graph.
AudioWorkletProcessor() - Web APIs
var processor = new audioworkletprocessor(options);
parameters options an object that is passed as options
parameter to audioworkletnode constructor and passed through the structured clone algorithm.
...
parameterdata optional an object containing the initial values of custom audio
param objects on this node (in its
parameters property), with key being the name of a custom
parameter and value being its initial value.
... // test-processor.js class testprocessor extends audioworkletprocessor { constructor (options) { super() console.log(options.numberofinputs) console.log(options.processoroptions.someusefulvariable) } process (inputs, outputs,
parameters) { return true } } registerprocessor('test-processor', testprocessor) next, in our main script file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor and options object.
BiquadFilterNode.Q - Web APIs
the q property of the biquadfilternode interface is an a-rate audio
param, a double representing a q factor, or quality factor.
... syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.q.value = 100; note: though the audio
param returned is read-only, the value it represents is not.
... value an audio
param.
BiquadFilterNode.detune - Web APIs
the detune property of the biquadfilternode interface is an a-rate audio
param representing detuning of the frequency in cents.
... syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.detune.value = 100; note: though the audio
param returned is read-only, the value it represents is not.
... value an a-rate audio
param.
BiquadFilterNode.frequency - Web APIs
the frequency property of the biquadfilternode interface is a k-rate audio
param, a double representing a frequency in the current filtering algorithm measured in hertz (hz).
... syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.frequency.value = 3000; note: though the audio
param returned is read-only, the value it represents is not.
... value an audio
param.
BiquadFilterNode.gain - Web APIs
the gain property of the biquadfilternode interface is a a-rate audio
param, a double representing the gain used in the current filtering algorithm.
... syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.gain.value = 25; note: though the audio
param returned is read-only, the value it represents is not.
... value an audio
param.
BlobBuilder - Web APIs
void append( in arraybuffer data ); void append( in blob data ); void append( in string data, [optional] in string endings );
parameters data the data to append to the blob being constructed.
... blob getblob( in domstring contenttype optional );
parameters contenttype optional the mime type of the data to be returned in the blob.
... file getfile( in domstring name, [optional] in domstring contenttype );
parameters name the file name.
CSSStyleSheet.insertRule() - Web APIs
syntax stylesheet.insertrule(rule [, index])
parameters rule a domstring containing the rule to be inserted.
... if more than one rule is given in the rule
parameter, the method aborts with a syntaxerror.
... * @
param {array} rules accepts an array of json-encoded declarations * @example addstylesheetrules([ ['h2', // also accepts a second argument as an array of arrays instead ['color', 'red'], ['background-color', 'green', true] // 'true' for !important rules ], ['.myclass', ['background-color', 'yellow'] ] ]); */ function addstylesheetrules (rules) { var styleel = document.createeleme...
CanvasRenderingContext2D.drawImage() - Web APIs
syntax void ctx.drawimage(image, dx, dy); void ctx.drawimage(image, dx, dy, dwidth, dheight); void ctx.drawimage(image, sx, sy, swidth, sheight, dx, dy, dwidth, dheight);
parameters image an element to draw into the context.
... for example, if you load an image and specify the optional size
parameters in its constructor, you will have to use the naturalwidth and naturalheight properties of the created instance to properly calculate things like crop and scale regions, rather than element.width and element.height.
...mples/db/f374e9c6fc.jpg'; function drawimageactualsize() { // use the intrinsic size of image in css pixels for the canvas element canvas.width = this.naturalwidth; canvas.height = this.naturalheight; // will draw the image as 300x227, ignoring the custom size of 60x45 // given in the constructor ctx.drawimage(this, 0, 0); // to use the custom size we'll have to specify the scale
parameters // using the element's width and height properties - lets draw one // on top in the corner: ctx.drawimage(this, 0, 0, this.width, this.height); } result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d: drawimage' in that specification.
CanvasRenderingContext2D.setTransform() - Web APIs
syntax ctx.settransform(a, b, c, d, e, f); ctx.settransform(matrix); the transformation matrix is described by: [acebdf001]\left[ \begin{array}{ccc} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{array} \right]
parameters settransform() has two types of
parameter that it can accept.
... the older type consists of several
parameters representing the individual components of the transformation matrix to set: a (m11) horizontal scaling.
... the newer type consists of a single
parameter, matrix, representing a 2d transformation matrix to set (technically, a dommatrixinit object; any object will do as long as it contains the above components as properties).
Applying styles and colors - Web APIs
// assigning transparent colors to stroke and fill style ctx.strokestyle = 'rgba(255, 0, 0, 0.5)'; ctx.fillstyle = 'rgba(255, 0, 0, 0.5)'; the rgba() function is similar to the rgb() function but it has one extra
parameter.
... the last
parameter sets the transparency value of this particular color.
...the
parameters represent two circles, one with its center at (x1, y1) and a radius of r1, and the other with its center at (x2, y2) with a radius of r2.
Console.table() - Web APIs
this function takes one mandatory argument data, which must be an array or an object, and one additional optional
parameter columns.
...you can use the optional columns
parameter to select a subset of columns to display: // an array of objects, logging only firstname function person(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; } var john = new person("john", "smith"); var jane = new person("jane", "doe"); var emily = new person("emily", "jones"); console.table([john, jane, emily], ["firstname"]); sorting columns you can sort...
... syntax console.table(data [, columns]);
parameters data the data to display.
Console.timeLog() - Web APIs
syntax console.timelog(label);
parameters label the name of the timer to log to the console.
... return if no label
parameter included: default: 1042ms if an existing label is included: timer name: 1242ms exceptions if there is no running timer, timelog() returns the warning: timer “default” doesn’t exist.
... if a label
parameter is included, but there is no corresponding timer: timer “timer name” doesn’t exist.
CredentialsContainer.get() - Web APIs
the get() method of the credentialscontainer interface returns a promise to a single credential instance that matches the provided
parameters.
... syntax var promise = credentialscontainer.get([options])
parameters options optional an object of type credentialrequestoptions that contains options for the request.
... returns a promise that resolves with a credential instance that matches the provided
parameters.
DelayNode.delayTime - Web APIs
the delaytime property of the delaynode interface is an a-rate audio
param representing the amount of delay to apply.
... syntax var audioctx = new audiocontext(); var mydelay = audioctx.createdelay(5.0); mydelay.delaytime.value = 3.0; note: though the audio
param returned is read-only, the value it represents is not.
... value an audio
param.
Document.createAttribute() - Web APIs
the string given in
parameter is converted to lowercase.
... syntax attribute = document.createattribute(name)
parameters name is a string containing the name of the attribute.
... exceptions invalid_character_err if the
parameter contains invalid characters for xml attribute.
Document.createNodeIterator() - Web APIs
note: prior to gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9), this method accepted an optional fourth
parameter (entityreferenceexpansion) that is not part of the dom4 specification, and has therefore been removed.
... this
parameter indicated whether or not the children of entity reference nodes were visible to the iterator.
... since such nodes were never created in browsers, this
paramater had no effect.
Document.createTreeWalker() - Web APIs
syntax document.createtreewalker(root, whattoshow[, filter[, entityreferenceexpansion]]);
parameters root a root node of this treewalker traversal.
... living standard removed the expandentityreferences
parameter.
... made the whattoshow and filter
parameters optionals.
Document.evaluate() - Web APIs
returns an xpathresult based on an xpath expression and other given
parameters.
... further optimization can be achieved by careful use of the context
parameter.
... these are supported values for the resulttype
parameter of the evaluate method: result type value description any_type 0 whatever type naturally results from the given expression.
Events and the DOM - Web APIs
html attribute <button onclick="alert('hello world!')"> the javascript code in the attribute is passed the event object via the event
parameter.
... dom element properties // assuming mybutton is a button element mybutton.onclick = function(event){alert('hello world')} the function can be defined to take an event
parameter.
... function print(evt) { // the evt
parameter is automatically assigned the event object // take care of the differences between console.log & alert console.log('print:', evt) alert(evt) } // any function should have an appropriate name, that's what called semantic table_el.onclick = print ...
DynamicsCompressorNode.attack - Web APIs
the attack property of the dynamicscompressornode interface is a k-rate audio
param representing the amount of time, in seconds, required to reduce the gain by 10 db.
... syntax var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); compressor.attack.value = 0; value an audio
param.
... note: though the audio
param returned is read-only, the value it represents is not.
DynamicsCompressorNode.knee - Web APIs
the knee property of the dynamicscompressornode interface is a k-rate audio
param containing a decibel value representing the range above the threshold where the curve smoothly transitions to the compressed portion.
... syntax var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); compressor.knee.value = 40; value an audio
param.
... note: though the audio
param returned is read-only, the value it represents is not.
DynamicsCompressorNode.ratio - Web APIs
the ratio property of the dynamicscompressornode interface is a k-rate audio
param representing the amount of change, in db, needed in the input for a 1 db change in the output.
... syntax var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); compressor.ratio.value = 12; value an audio
param.
... note: though the audio
param returned is read-only, the value it represents is not.
DynamicsCompressorNode.release - Web APIs
the release property of the dynamicscompressornode interface is a k-rate audio
param representing the amount of time, in seconds, required to increase the gain by 10 db.
... syntax var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); compressor.release.value = 0.25; value an audio
param.
... note: though the audio
param returned is read-only, the value it represents is not.
DynamicsCompressorNode.threshold - Web APIs
the threshold property of the dynamicscompressornode interface is a k-rate audio
param representing the decibel value above which the compression will start taking effect.
... syntax var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); compressor.threshold.value = -50; value an audio
param.
... note: though the audio
param returned is read-only, the value it represents is not.
EXT_texture_filter_anisotropic - Web APIs
constants ext.max_texture_max_anisotropy_ext this is the pname argument to the gl.get
parameter() call, and it returns the maximum available anisotropy.
... ext.texture_max_anisotropy_ext this is the pname argument to the gl.gettex
parameter() and gl.tex
parameterf() / gl.tex
parameteri() calls and sets the desired maximum anisotropy for a texture.
... examples var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); var ext = ( gl.getextension('ext_texture_filter_anisotropic') || gl.getextension('moz_ext_texture_filter_anisotropic') || gl.getextension('webkit_ext_texture_filter_anisotropic') ); if (ext){ var max = gl.get
parameter(ext.max_texture_max_anisotropy_ext); gl.tex
parameterf(gl.texture_2d, ext.texture_max_anisotropy_ext, max); } specifications specification status comment ext_texture_filter_anisotropicthe definition of 'ext_texture_filter_anisotropic' in that specification.
EffectTiming.easing - Web APIs
the first
parameter specifies the number of intervals in the function.
...the second
parameter, which is optional, specifies the point at which the change of values occur within the interval.
... if the second
parameter is omitted, it is given the value end.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
syntax filesystemdirectoryentry.removerecursively(successcallback[, errorcallback]);
parameters successcallback a function to call once the directory removal process has completed.
... the callback has no
parameters.
... errors if an error occurs and an errorcallback was specified, it gets called with a single
parameter: a fileerror object describing the error.
FileSystemDirectoryEntry - Web APIs
full support yesgetdirectory experimentalchrome full support 8edge full support 79firefox full support 50notes full support 50notes notes in firefox, the errorcallback's input
parameter is a domexception rather than a fileerror object.ie no support noopera no support nosafari full support 11.1webview android full support ≤37chrome android full support ...
...18firefox android full support 50notes full support 50notes notes in firefox, the errorcallback's input
parameter is a domexception rather than a fileerror object.opera android no support nosafari ios full support 11.3samsung internet android full support yesgetfile experimentalchrome full support 8edge full support 79firefox full support 50notes full support 50notes notes in firefox, the errorc...
...allback's input
parameter is a domexception rather than a fileerror object.ie no support noopera no support nosafari full support 11.1webview android full support ≤37chrome android full support 18firefox android full support 50notes full support 50notes notes in firefox, the errorcallback's input
parameter is a domexception rather than a fileerror object.opera android no support nosafari ios full support ...
FileSystemEntry.getMetadata() - Web APIs
syntax filesystementry.getmetadata(successcallback[, errorcallback]);
parameters successcallback a function which is called when the copy operation is succesfully completed.
... receives a single input
parameter: a metadata object with information about the file.
...there's a single
parameter: a fileerror describing what went wrong.
FileSystemEntry.getParent() - Web APIs
syntax filesystementry.getparent(successcallback[, errorcallback]);
parameters successcallback a function which is called when the parent directory entry has been retrieved.
... the callback receives a single input
parameter: a filesystemdirectoryentry object representing the parent directory.
...there's a single
parameter: a fileerror describing what went wrong.
GainNode.gain - Web APIs
the gain property of the gainnode interface is an a-rate audio
param representing the amount of gain to apply.
... syntax var audioctx = new audiocontext(); var gainnode = audioctx.creategain(); gainnode.gain.value = 0.5; value an audio
param.
... note: though the audio
param returned is read-only, the value it represents is not.
GainNode - Web APIs
to prevent this from happening, never change the value directly but use the exponential interpolation methods on the audio
param interface.
... gainnode.gain read only is an a-rate audio
param representing the amount of gain to apply.
... you have to set audio
param.value or use the methods of audio
param to change the effect of gain.
Using the Geolocation API - Web APIs
a third, optional,
parameter is an options object where you can set the maximum age of the position returned, the time to wait for a request, and if you want high accuracy for the position.
...this is done using the watchposition() function, which has the same input
parameters as getcurrentposition().
... handling errors the error callback function, if provided when calling getcurrentposition() or watchposition(), expects a geolocationpositionerror object instance as its first
parameter.
Geolocation API - Web APIs
in both cases, the method call takes up to three arguments: a mandatory success callback: if the location retrieval is successful, the callback executes with a geolocationposition object as its only
parameter, providing access to the location data.
... an optional error callback: if the location retrieval is unsuccessful, the callback executes with a geolocationpositionerror object as its only
parameter, providing access information on what went wrong.
... dictionaries positionoptions represents an object containing options to pass in as a
parameter of geolocation.getcurrentposition() and geolocation.watchposition().
HTMLFormElement.requestSubmit() - Web APIs
syntax htmlformelement.requestsubmit(submitter);
parameters submitter optional the submit button whose attributes describe the method by which the form is to be submitted.
... if you omit the submitter
parameter, the form element itself is used as the submitter.
...otherwise, the form is submitted with no submitter
parameter, so it's submitted directly by the form itself.
HTMLHyperlinkElementUtils.search - Web APIs
the htmlhyperlinkelementutils.search property is a search string, also called a query string, that is usvstring containing a '?' followed by the
parameters of the url.
... modern browsers provide urlsearch
params and url.search
params to make it easy to parse out the
parameters from the querystring.
... syntax string = object.search; object.search = string; examples // let an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let
params = new urlsearch
params(querystring); let q = parseint(
params.get("q")); // is the number 123 specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.search' in that specification.
HTMLImageElement - Web APIs
it accepts optional width and height
parameters.
... when called without
parameters, new image() is equivalent to calling document.createelement("img").
... recommendation a constructor (with 2 optional
parameters) has been added.
History.replaceState() - Web APIs
the history.replacestate() method modifies the current history entry, replacing it with the stateobj, title, and url passed in the method
parameters.
... syntax history.replacestate(stateobj, title, [url])
parameters stateobj the state object is a javascript object which is associated with the history entry passed to the replacestate method.
... title most browsers currently ignore this
parameter, although they may use it in the future.
History - Web APIs
calling go() without
parameters or a value of 0 reloads the current page.
... note that all browsers but safari currently ignore the title
parameter.
... note that all browsers but safari currently ignore the title
parameter.
IDBCursor.continue() - Web APIs
the continue() method of the idbcursor interface advances the cursor to the next position along its direction, to the item whose key matches the optional key
parameter.
... syntax cursor.continue(key);
parameters key optional the key to position the cursor at.
... dataerror the key
parameter may have any of the following conditions: the key is not a valid key.
IDBCursor.continuePrimaryKey() - Web APIs
the continueprimarykey() method of the idbcursor interface advances the cursor to the to the item whose key matches the key
parameter as well as whose primary key matches the primary key
parameter.
... syntax cursor.continueprimarykey(key, primarykey);
parameters key the key to position the cursor at.
... dataerror the key
parameter may have any of the following conditions: the key is not a valid key.
IDBFactory.open() - Web APIs
syntax for the current standard: var idbopendbrequest = indexeddb.open(name); var idbopendbrequest = indexeddb.open(name, version);
parameters name the name of the database.
... experimental gecko options object options (version and storage) optional in gecko, since version 26, you can include a non-standard options object as a
parameter of idbfactory.open that contains the version number of the database, plus a storage value that specifies whether you want to use persistent or temporary storage.
... example example of calling open with the current specification's version
parameter: var request = window.indexeddb.open("todolist", 4); in the following code snippet, we make a request to open a database, and include handlers for the success and error cases.
IDBObjectStore.createIndex() - Web APIs
syntax var myidbindex = objectstore.createindex(indexname, keypath); var myidbindex = objectstore.createindex(indexname, keypath, object
parameters);
parameters indexname the name of the index to create.
... object
parameters optional an idbindex
parameters object, which can include the following properties: attribute description unique if true, the index will not allow duplicate values for a single key.
... invalidaccesserror occurs if the provided key path is a sequence, and multientry is set to true in the object
parameters object.
IDBObjectStore.getAll() - Web APIs
the getall() method of the idbobjectstore interface returns an idbrequest object containing all objects in the object store matching the specified
parameter or all objects in the store if no
parameters are given.
... 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.
... a typeerror exception is thrown if the count
parameter is not between 0 and 232-1 included.
IDBObjectStore - Web APIs
idbobjectstore.getkey() returns an idbrequest object, and, in a separate thread retrieves and returns the record key for the object in the object stored matching the specified
parameter.
... idbobjectstore.getall() returns an idbrequest object retrieves all objects in the object store matching the specified
parameter or all objects in the store if no
parameters are given.
... idbobjectstore.getallkeys() returns an idbrequest object retrieves record keys for all objects in the object store matching the specified
parameter or all objects in the store if no
parameters are given.
IIRFilterNode - Web APIs
it lets the
parameters of the filter response be specified, so that it can be tuned as needed.
... the filter
parameters of biquad filters can be automated.
...it also has the following additional methods: getfrequencyresponse() uses the filter's current
parameter settings to calculate the response for frequencies specified in the provided array of frequencies.
KeyframeEffect.KeyframeEffect() - Web APIs
syntax var keyframes = new keyframeeffect(element, keyframeset, keyframeoptions); var keyframes = new keyframeeffect(sourcekeyframes);
parameters the first type of constructor (see above) creates a completely new keyframeeffect object instance.
... its
parameters are: element the dom element to be animated, or null.
...its
parameter is as follows: sourcekeyframes a keyframeeffect object that you want to clone.
LocalFileSystem - Web APIs
//taking care of the browser-specific prefix window.requestfilesystem = window.requestfilesystem || window.webkitrequestfilesystem; // the first
parameter defines the type of storage: persistent or temporary // next, set the size of space needed (in bytes) // initfs is the success callback // and the last one is the error callback // for denial of access and other errors.
... void requestfilesystem( in unsigned short type, in unsigned long long size, in filesystemcallback successcallback, in errorcallback errorcallback );
parameters type the storage type of the file system.
... void resolvelocalfilesystemurl( in domstring url, in entrycallback successcallback, in optional errorcallback errorcallback );
parameters url the url of a local file in the file system.
LocalFileSystemSync - Web APIs
example //taking care of the browser-specific prefix window.requestfilesystemsync = window.requestfilesystemsync || window.webkitrequestfilesystemsync; // the first
parameter defines the type of storage: persistent or temporary // next, set the size of space needed (in bytes) // initfs is the success callback // and the last one is the error callback // for denial of access and other errors.
...[ research ] filesystemsync requestfilesystemsync( in unsigned short type, in unsigned long long size );
parameters type the storage type of the file system.
... void resolvelocalfilesystemurl( in domstring url );
parameter url the url of a local file in the file system.
Location: search - Web APIs
the search property of the location interface is a search string, also called a query string; that is, a usvstring containing a '?' followed by the
parameters of the url.
... modern browsers provide urlsearch
params and url.search
params to make it easy to parse out the
parameters from the querystring.
... syntax string = object.search; object.search = string; examples // let an <a id="myanchor" href="https://developer.mozilla.org/docs/location.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let
params = new urlsearch
params(querystring); let q = parseint(
params.get("q")); // is the number 123 specifications specification status comment html living standardthe definition of 'search' in that specification.
Location - Web APIs
location.search is a usvstring containing a '?' followed by the
parameters or "querystring" of the url.
... modern browsers provide urlsearch
params and url.search
params to make it easy to parse out the
parameters from the querystring.
... methods location.assign() loads the resource at the url provided in
parameter.
LockManager.request() - Web APIs
the request() method of the lockmanager interface requests a lock object with
parameters specifying its name and characteristics.
... the mode property of the options
parameter may be either "exclusive" or "shared".
... syntax lockmanager.request(var promise = name[, {options}], callback)
parameters name an identifier for the lock you want to request.
MediaConfiguration - Web APIs
the mediaconfiguration mediacapabilities dictionary of the media capabilities api describes how media and audio files must be configured, or defined, to be passed as a
parameter of the mediacapabilities.encodinginfo() and mediacapabilities.encodinginfo() methods.
... a valid media decoding configuration, to be submitted as the
parameter for mediacapabilities.decodinginfo() method, has it's `type` set as: file: for plain playback file.
... a valid media encoding configuration, to be submitted as the
parameter for mediacapabilities.encodinginfo() method, has it's `type` set as: record: for recording media.
MediaRecorder() - Web APIs
the object can optionally be configured to record using a specific media container (file type), and, further, can specify the exact codec and codec configuration(s) to use by specifying the codecs
parameter.
... syntax var mediarecorder = new mediarecorder(stream[, options]);
parameters stream the mediastream that will be recorded.
... options optional a dictionary object that can contain the following properties: mimetype: a mime type specifying the format for the resulting media; you may simply specify the container format (the browser will select its preferred codecs for audio and/or video), or you may use the codecs
parameter and/or the profiles
parameter to provide detailed information about which codecs to use and how to configure them.
MediaSession.setActionHandler() - Web APIs
syntax navigator.mediasession.setactionhandler(type, callback)
parameters type a domstring representing an action type to listen for.
...the callback receives no input
parameters, and should not return a value.
... the action handler receives as input a single
parameter: an object conforming to the mediasessionactiondetails dictionary, which provides both the action type (so the same function can handle multiple action types), as well as data needed in order to perform the action.
Navigator.sendBeacon() - Web APIs
syntax navigator.sendbeacon(url, data);
parameters url the url that will receive the data.
... data a arraybuffer, arraybufferview, blob, domstring, formdata, or urlsearch
params object containing the data to send.
... window.addeventlistener("unload", function logdata() { var xhr = new xmlhttprequest(); xhr.open("post", "/log", false); // third
parameter of `false` means synchronous xhr.send(analyticsdata); }); this is what sendbeacon() replaces.
NodeList.prototype.forEach() - Web APIs
the foreach() method of the nodelist interface calls the callback given in
parameter once for each value pair in the list, in insertion order.
... syntax somenodelist.foreach(callback[, thisarg]);
parameters callback a function to execute on each element of somenodelist.
... it accepts 3
parameters: currentvalue the current element being processed in somenodelist.
OES_texture_float - Web APIs
extended methods this extension extends webglrenderingcontext.teximage2d() and webglrenderingcontext.texsubimage2d(): the type
parameter now accepts gl.float.
... the pixels
parameter now accepts an arraybufferview of type float32array.
...if you set the magnification or minification filter in the webglrenderingcontext.tex
parameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use floating-point textures, the texture will be marked as incomplete.
OscillatorNode.detune - Web APIs
the detune property of the oscillatornode interface is an a-rate audio
param representing detuning of oscillation in cents.
... syntax var oscillator = audioctx.createoscillator(); oscillator.detune.setvalueattime(100, audioctx.currenttime); // value in cents note: though the audio
param returned is read-only, the value it represents is not.
... value an a-rate audio
param.
OscillatorNode.frequency - Web APIs
the frequency property of the oscillatornode interface is an a-rate audio
param representing the frequency of oscillation in hertz.
... syntax var oscillator = audioctx.createoscillator(); oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz note: though the audio
param returned is read-only, the value it represents is not.
... value an a-rate audio
param.
PannerNode.orientationX - Web APIs
the audio
param contained by this property is read only; however, you can still change the value of the
parameter by assigning a new value to its audio
param.value property.
... syntax var orientationx = pannernode.orientationx; pannernode.orientationx.value = neworientationx; value an audio
param whose value is the x component of the direction in which the audio source is facing, in 3d cartesian coordinate space.
... example in this example, we'll demonstrate how changing the orientation
parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume.
PannerNode.orientationY - Web APIs
the audio
param contained by this property is read only; however, you can still change the value of the
parameter by assigning a new value to its audio
param.value property.
... syntax var orientationy = pannernode.orientationy; pannernode.orientationy.value = neworientationy; value an audio
param whose value is the y component of the direction the audio source is facing, in 3d cartesian coordinate space.
... example in this example, we'll demonstrate how changing the orientation
parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume.
PannerNode.orientationZ - Web APIs
the audio
param contained by this property is read only; however, you can still change the value of the
parameter by assigning a new value to its audio
param.value property.
... syntax var orientationz = pannernode.orientationz; pannernode.orientationz.value = neworientationz; value an audio
param whose value is the z component of the direction the audio source is facing, in 3d cartesian coordinate space.
... example in this example, we'll demonstrate how changing the orientation
parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume.
PasswordCredential.additionalData - Web APIs
the additionaldata property of the passwordcredential interface takes one of a formdata instance, a urlsearch
params instance, or null.
... syntax passwordcredential.additionaldata = formdata formdata = passwordcredential.additionaldata passwordcredential.additionaldata = urlsearch
params ulrsearch
params = passwordcredential.additionaldata value one of a formdata instance, a urlsearch
params instance, or null.
...it then stores the form object in the additionaldata
parameter, before sending it to server in a call to fetch.
Using the Payment Request API - Web APIs
this takes two mandatory
parameters and one option
parameter: methoddata — an object containing information concerning the payment provider, such as what payment methods are supported, etc.
... so for example, you could create a new paymentrequest instance like so: var request = new paymentrequest(buildsupportedpaymentmethoddata(), buildshoppingcartdetails()); the functions invoked inside the constructor simply return the required object
parameters: function buildsupportedpaymentmethoddata() { // example supported payment methods: return [{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard'], supportedtypes: ['debit', 'credit'] } }]; } function buildshoppingcartdetails() { // hardcoded for demo purposes: return { id: 'order-123', displayitems: [ { l...
...if you call .canmakepayment() multiple times, keep in mind that the first
parameter to the paymentrequest constructor should contain the same method names and data.
PerformanceObserverEntryList.getEntries() - Web APIs
the list is available in the observer's callback function (as the first
parameter in the callback).
... syntax general syntax: entries = list.getentries(); entries = list.getentries(performanceentryfilteroptions); specific usage: entries = list.getentries({name: "entry_name", entrytype: "mark"});
parameters performanceentryfilteroptionsoptional is a performanceentryfilteroptions dictionary, having the following fields: "name", the name of a performance entry.
... this
parameter is currently not supported on chrome or opera.
PeriodicWave.PeriodicWave() - Web APIs
syntax var mywave = new periodicwave(context, options);
parameters inherits
parameters from the audionodeoptions dictionary.
... options optional a periodicwaveoptions dictionary object defining the properties you want the periodicwave to have (it also inherits the options defined in the periodicwaveconstraints dictionary.): real: a float32array containing the cosine terms that you want to use to form the wave (equivalent to the real
parameter of audiocontext.createperiodicwave).
... imag: a float32array containing the sine terms that you want to use to form the wave (equivalent to the imag
parameter of audiocontext.createperiodicwave).
Pointer Lock API - Web APIs
the values of the
parameters are the same as the difference between the values of mouseevent properties, screenx and screeny, which are stored in two subsequent mousemove events, enow and eprevious.
... in other words, the pointer lock
parameter movementx = enow.screenx - eprevious.screenx.
... unlocked state the
parameters movementx and movementy are valid regardless of the mouse lock state, and are available even when unlocked for convenience.
RTCIceTransport - Web APIs
getlocal
parameters() returns a rtcice
parameters object describing the ice
parameters established by a call to the rtcpeerconnection.setlocaldescription() method.
... returns null if
parameters have not yet been received.
... getremote
parameters() returns a rtcice
parameters object containing the ice
parameters for the remote device, as set by a call to rtcpeerconnection.setremotedescription().
RTCPeerConnection.createAnswer() - Web APIs
syntax apromise = rtcpeerconnection.createanswer([options]); rtcpeerconnection.createanswer(successcallback, failurecallback[, options]);
parameters options optional an object which contains options which customize the answer; this is based on the rtcansweroptions dictionary.
... deprecated
parameters in older code and documentation, you may see a callback-based version of this function.
...the
parameters for this form of createanswer() are described below, to aid in updating existing code.
RTCPeerConnection.createDataChannel() - Web APIs
syntax datachannel = rtcpeerconnection.createdatachannel(label[, options]);
parameters label a human-readable name for the channel.
... options optional an rtcdatachannelinit dictionary providing configuration options for the data channel rtcdatachannelinit dictionary the rtcdatachannelinit dictionary provides the following fields, any of which may be included in the object passed as the options
parameter in order to configure the data channel to suit your needs: ordered optional indicates whether or not messages sent on the rtcdatachannel are required to arrive at their destination in the same order in which they were sent (true), or if they're allowed to arrive out-of-order (false).
... return value a new rtcdatachannel object with the specified label, configured using the options specified by options if that
parameter is included; otherwise, the defaults listed above are established.
RTCPeerConnection.createOffer() - Web APIs
syntax apromise = mypeerconnection.createoffer([options]); mypeerconnection.createoffer(successcallback, failurecallback, [options])
parameters options optional an rtcofferoptions dictionary providing options requested for the offer.
... deprecated
parameters in older code and documentation, you may see a callback-based version of this function.
...the
parameters for this form of createoffer() are described below, to aid in updating existing code.
RTCPeerConnection.getStats() - Web APIs
syntax promise = rtcpeerconnection.getstats(selector)
parameters selector optional a mediastreamtrack for which to gather statistics.
... promise = rtcpeerconnection.getstats(selector, successcallback, failurecallback)
parameters selector optional a mediastreamtrack for which to gather statistics.
...the function receives as input a single
parameter: an rtcstatsreport with the collected statistics.
ReadableStream.cancel() - Web APIs
the supplied reason
parameter will be given to the underlying source, which may or may not use it.
... syntax var promise = readablestream.cancel(reason);
parameters reason a domstring providing a human-readable reason for the cancellation.
... return value a promise, which fulfills with the value given in the reason
parameter.
ReadableStreamBYOBReader.cancel() - Web APIs
the supplied reason
parameter will be given to the underlying source, which may or may not use it.
... syntax var promise = readablestreambyobreader.cancel(reason);
parameters reason a domstring providing a human-readable reason for the cancellation.
... return value a promise, which fulfills with the value given in the reason
parameter.
Report - Web APIs
via the reports
parameter of the callback function passed into the reportingobserver() constructor upon creation of a new observer instance.
... the report details are displayed via the displayreports() fuction, which takes the observer callback's reports
parameter as its
parameter: function displayreports(reports) { const outputelem = document.queryselector('.output'); const list = document.createelement('ul'); outputelem.appendchild(list); for(let i = 0; i < reports.length; i++) { let listitem = document.createelement('li'); let textnode = document.createtextnode('report ' + (i + 1) + ', type: ' + reports[i].type); listitem.appen...
...hild(textnode); let innerlist = document.createelement('ul'); listitem.appendchild(innerlist); list.appendchild(listitem); for (let key in reports[i].body) { let innerlistitem = document.createelement('li'); let keyvalue = reports[i].body[key]; innerlistitem.textcontent = key + ': ' + keyvalue; innerlist.appendchild(innerlistitem); } } } the reports
parameter contains an array of all the reports in the observer's report queue.
Request - Web APIs
create a new request using the request() constructor (for an image file in the same directory as the script), then return some property values of the request: const request = new request('https://www.mozilla.org/favicon.ico'); const url = request.url; const method = request.method; const credentials = request.credentials; you could then fetch this request by passing the request object in as a
parameter to a windoworworkerglobalscope.fetch() call, for example: fetch(request) .then(response => response.blob()) .then(blob => { image.src = url.createobjecturl(blob); }); in the following snippet, we create a new request using the request() constructor with some initial data and body content for an api request which need a body payload: const request = new request('https://example.co...
...m', {method: 'post', body: '{"foo": "bar"}'}); const url = request.url; const method = request.method; const credentials = request.credentials; const bodyused = request.bodyused; note: the body type can only be a blob, buffersource, formdata, urlsearch
params, usvstring or readablestream type, so for adding a json object to the payload you need to stringify that object.
... you could then fetch this api request by passing the request object in as a
parameter to a windoworworkerglobalscope.fetch() call, for example and get the response: fetch(request) .then(response => { if (response.status === 200) { return response.json(); } else { throw new error('something went wrong on api server!'); } }) .then(response => { console.debug(response); // ...
Service Worker API - Web APIs
fetchevent the
parameter passed into the serviceworkerglobalscope.onfetch handler, fetchevent represents a fetch action that is dispatched on the serviceworkerglobalscope of a serviceworker.
... installevent the
parameter passed into the oninstall handler, the installevent interface represents an install action that is dispatched on the serviceworkerglobalscope of a serviceworker.
... notificationevent the
parameter passed into the onnotificationclick handler, the notificationevent interface represents a notification click event that is dispatched on the serviceworkerglobalscope of a serviceworker.
Using writable streams - Web APIs
the syntax skeleton looks like this: const stream = new writablestream({ start(controller) { }, write(chunk,controller) { }, close(controller) { }, abort(reason) { } }, { highwatermark, size() }); the constructor takes two objects as
parameters.
... write(chunk,controller) — a method that is called repeatedly every time a new chunk is ready to be written to the underlying sink (specified in the chunk
parameter).
... controllers as you'll have noticed when studying the writablestream() syntax skeleton, the start(), write(), and close() methods can optionally have a controller
parameter passed to them.
URL.search - Web APIs
the search property of the url interface is a search string, also called a query string, that is a usvstring containing a '?' followed by the
parameters of the url.
... modern browsers provide the url.search
params property to make it easy to parse out the
parameters from the query string.
... syntax const search
params = object.search url.search = newsearch
params value a usvstring.
URL.search - Web APIs
the search property of the url interface is a search string, also called a query string, that is a usvstring containing a '?' followed by the
parameters of the url.
... modern browsers provide the url.search
params property to make it easy to parse out the
parameters from the query string.
... syntax const search
params = object.search url.search = newsearch
params value a usvstring.
USBDevice.controlTransferOut() - Web APIs
syntax var promise = usbdevice.controltransferout(setup, data)
parameters setup an object that sets options for .
... value: vender-specific request
parameters.
...not all commands require data; some commands can send data just through the value
parameter.
WebGLRenderingContext.activeTexture() - Web APIs
syntax void gl.activetexture(texture);
parameters texture the texture unit to make active.
... gl.get
parameter(gl.max_combined_texture_image_units); to get the active texture, query the active_texture constant.
... gl.activetexture(gl.texture0); gl.get
parameter(gl.active_texture); // returns "33984" (0x84c0, gl.texture0 enum value) specifications specification status comment webgl 1.0the definition of 'activetexture' in that specification.
WebGLRenderingContext.bufferData() - Web APIs
srcdata, usage); void gl.bufferdata(target, arraybufferview srcdata, usage); // webgl2: void gl.bufferdata(target, arraybufferview srcdata, usage, srcoffset, length);
parameters target a glenum specifying the binding point (target).
... examples using bufferdata var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, 1024, gl.static_draw); getting buffer information to check the current buffer usage and buffer size, use the webglrenderingcontext.getbuffer
parameter() method.
... gl.getbuffer
parameter(gl.array_buffer, gl.buffer_size); gl.getbuffer
parameter(gl.array_buffer, gl.buffer_usage); getting size of a typed array to calculate size
parameter for a typed array.
WebGLRenderingContext.getActiveAttrib() - Web APIs
syntax webglactiveinfo gl.getactiveattrib(program,index);
parameters program a webglprogram containing the vertex attribute.
...this value is an index 0 to n - 1 as returned by gl.getprogram
parameter(program, gl.active_attributes).
... examples const numattribs = gl.getprogram
parameter(program, gl.active_attributes); for (let i = 0; i < numattribs; ++i) { const info = gl.getactiveattrib(program, i); console.log('name:', info.name, 'type:', info.type, 'size:', info.size); } specifications specification status comment webgl 1.0the definition of 'getactiveattrib' in that specification.
WebGLRenderingContext.getUniformLocation() - Web APIs
syntax webgluniformlocation = webglrenderingcontext.getuniformlocation(program, name);
parameters program the webglprogram in which to locate the specified uniform variable.
... gl_invalid_value the program
parameter is not a value or object generated by webgl.
... gl_invalid_operation the program
parameter doesn't correspond to a glsl program generated by webgl, or the specified program hasn't been linked successfully.
WebGLRenderingContext.lineWidth() - Web APIs
syntax void gl.linewidth(width);
parameters width a glfloat specifying the width of rasterized lines.
... examples setting the line width: gl.linewidth(5); getting the line width: gl.get
parameter(gl.line_width); getting the range of available widths.
... gl.get
parameter(gl.aliased_line_width_range); specifications specification status comment webgl 1.0the definition of 'linewidth' in that specification.
WebGLRenderingContext.sampleCoverage() - Web APIs
the webglrenderingcontext.samplecoverage() method of the webgl api specifies multi-sample coverage
parameters for anti-aliasing effects.
... syntax void gl.samplecoverage(value, invert);
parameters value a glclampf which sets a single floating-point coverage value clamped to the range [0,1].
... gl.get
parameter(gl.sample_coverage_value); // 0.5 gl.get
parameter(gl.sample_coverage_invert); // false specifications specification status comment webgl 1.0the definition of 'samplecoverage' in that specification.
WebGLRenderingContext.stencilFunc() - Web APIs
syntax void gl.stencilfunc(func, ref, mask);
parameters func a glenum specifying the test function.
... gl.enable(gl.stencil_test); gl.stencilfunc(gl.less, 0, 0b1110011); to get the current stencil function, reference value, or other stencil information, query the following constants with get
parameter().
... gl.get
parameter(gl.stencil_func); gl.get
parameter(gl.stencil_value_mask); gl.get
parameter(gl.stencil_ref); gl.get
parameter(gl.stencil_back_func); gl.get
parameter(gl.stencil_back_value_mask); gl.get
parameter(gl.stencil_back_ref); gl.get
parameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilfunc' in that specification.
WebGLRenderingContext.stencilFuncSeparate() - Web APIs
syntax void gl.stencilfuncseparate(face, func, ref, mask);
parameters face a glenum specifying whether the front and/or back stencil state is updated.
... gl.enable(gl.stencil_test); gl.stencilfuncseparate(gl.front, gl.less, 0.2, 1110011); to get the current stencil function, reference value, or other stencil information, query the following constants with get
parameter().
... gl.get
parameter(gl.stencil_func); gl.get
parameter(gl.stencil_value_mask); gl.get
parameter(gl.stencil_ref); gl.get
parameter(gl.stencil_back_func); gl.get
parameter(gl.stencil_back_value_mask); gl.get
parameter(gl.stencil_back_ref); gl.get
parameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilfuncseparate' in that specification.
WebGLRenderingContext.stencilOp() - Web APIs
syntax void gl.stencilop(fail, zfail, zpass);
parameters all three
parameters accept all constants listed below.
... gl.enable(gl.stencil_test); gl.stencilop(gl.incr, gl.decr, gl.invert); to get the current information about stencil and depth pass or fail, query the following constants with get
parameter().
... gl.get
parameter(gl.stencil_fail); gl.get
parameter(gl.stencil_pass_depth_pass); gl.get
parameter(gl.stencil_pass_depth_fail); gl.get
parameter(gl.stencil_back_fail); gl.get
parameter(gl.stencil_back_pass_depth_pass); gl.get
parameter(gl.stencil_back_pass_depth_fail); gl.get
parameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilop' in that specification.
WebGLRenderingContext.stencilOpSeparate() - Web APIs
syntax void gl.stencilopseparate(face, fail, zfail, zpass);
parameters the fail, zfail and zpass
parameters accept all constants listed below.
... gl.enable(gl.stencil_test); gl.stencilopseparate(gl.front, gl.incr, gl.decr, gl.invert); to get the current information about stencil and depth pass or fail, query the following constants with get
parameter().
... gl.get
parameter(gl.stencil_fail); gl.get
parameter(gl.stencil_pass_depth_pass); gl.get
parameter(gl.stencil_pass_depth_fail); gl.get
parameter(gl.stencil_back_fail); gl.get
parameter(gl.stencil_back_pass_depth_pass); gl.get
parameter(gl.stencil_back_pass_depth_fail); gl.get
parameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilopseparate' in that specification.
WebGLRenderingContext.viewport() - Web APIs
syntax void gl.viewport(x, y, width, height);
parameters x a glint specifying the horizontal coordinate for the lower left corner of the viewport origin.
... gl.get
parameter(gl.max_viewport_dims); // e.g.
... gl.get
parameter(gl.viewport); // e.g.
A basic 2D WebGL animation example - Web APIs
function buildshaderprogram(shaderinfo) { let program = gl.createprogram(); shaderinfo.foreach(function(desc) { let shader = compileshader(desc.id, desc.type); if (shader) { gl.attachshader(program, shader); } }); gl.linkprogram(program) if (!gl.getprogram
parameter(program, gl.link_status)) { console.log("error linking shader program:"); console.log(gl.getprograminfolog(program)); } return program; } first, gl.createprogram() is called to create a new, empty, glsl program.
... function compileshader(id, type) { let code = document.getelementbyid(id).firstchild.nodevalue; let shader = gl.createshader(type); gl.shadersource(shader, code); gl.compileshader(shader); if (!gl.getshader
parameter(shader, gl.compile_status)) { console.log(`error compiling ${type === gl.vertex_shader ?
... our requestanimationframe() callback receives as input a single
parameter, currenttime, which specifies the time at which the frame drawing began.
Signaling and video calling - Web APIs
the
parameter msgstring is a stringified json object.
... at this point, the two participants know which codecs and codec
parameters are to be used for this call.
...= handleremovetrackevent; mypeerconnection.oniceconnectionstatechange = handleiceconnectionstatechangeevent; mypeerconnection.onicegatheringstatechange = handleicegatheringstatechangeevent; mypeerconnection.onsignalingstatechange = handlesignalingstatechangeevent; } when using the rtcpeerconnection() constructor, we will specify an rtcconfiguration-compliant object providing configuration
parameters for the connection.
WebSocket.close() - Web APIs
syntax websocket.close();
parameters code optional a numeric value indicating the status code explaining why the connection is being closed.
... if this
parameter is not specified, a default value of 1005 is assumed.
... note: in gecko, this method didn't support any
parameters prior to gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5).
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
{ const fovradians = fov * (math.pi / 180.0); const aspectratio = viewport.width / viewport.height; const transform = mat4.create(); mat4.perspective(transform, fovradians, aspectratio, nearclip, farclip); return transform; } after converting the fov angle, fovdegrees, from degrees to radians and computing the aspect ratio of the xrviewport specified by the viewport
parameter, this function uses the glmatrix library's mat4.perspective() function to compute the perspective matrix.
...when the browser needs you to render the scene, it invokes the callback, providing as input
parameters the current time and an xrframe encapsulating the data needed to render the correct frame.
...then we call the webglrenderingcontext method gl.clear(), which clears the framebuffer (since we include gl.color_buffer_bit in the mask
parameter) and the depth buffer (because we include gl.depth_buffer_bit).
Web Audio API best practices - Web APIs
setting audio
param values there are two ways to manipulate audionode values, which are themselves objects of type audio
param interface.
...however, if you're using any of the audio
param's defined methods to set these values, they will take precedence over the above property setting.
... bearing this in mind, if your website or application requires timing and scheduling, it's best to stick with the audio
param methods for setting values.
Web Audio API - Web APIs
audio
param the audio
param interface represents an audio-related
parameter, like one of an audionode.
... audio
parammap provides a maplike interface to a group of audio
param interfaces, which means it provides the methods foreach(), get(), has(), keys(), and values(), as well as a size property.
...r using javascript, establishing it as an audio worklet processor, and then using that processor within a web audio application is the topic of this article.basic concepts behind web audio apithis article explains some of the audio theory behind how the features of the web audio api work, to help you make informed decisions while designing how audio is routed through your app.controlling multiple
parameters with constantsourcenodethis article demonstrates how to use a constantsourcenode to link multiple
parameters together so they share the same value, which can be changed by simply setting the value of the constantsourcenode.offset
parameter.example and tutorial: simple synth keyboardthis article presents the code and working demo of a video keyboard you can play using the mouse.
Using the Web Speech API - Web APIs
this accepts as
parameters the string we want to add, plus optionally a weight value that specifies the importance of this grammar in relation of other grammars available in the list (can be from 0 to 1 inclusive.) the added grammar is available in the list as a speechgrammar object instance.
...we first create a new speechsynthesisutterance() instance using its constructor — this is passed the text input's value as a
parameter.
...then, with all necessary preparations made, we start the utterance being spoken by invoking speechsynthesis.speak(), passing it the speechsynthesisutterance instance as a
parameter.
WindowOrWorkerGlobalScope.fetch() - Web APIs
note: the fetch() method's
parameters are identical to those of the request() constructor.
... syntax const fetchresponsepromise = fetch(resource [, init])
parameters resource this defines the resource that you wish to fetch.
... body any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearch
params, usvstring, or readablestream object.
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
syntax var timeoutid = scope.settimeout(function[, delay, arg1, arg2, ...]); var timeoutid = scope.settimeout(function[, delay]); var timeoutid = scope.settimeout(code[, delay]);
parameters function a function to be executed after the timer expires.
...if this
parameter is omitted, a value of 0 is used, meaning execute "immediately", or more accurately, the next event cycle.
... note: passing additional
parameters to the function in the first syntax does not work in internet explorer 9 and below.
Worker.prototype.postMessage() - Web APIs
this accepts a single
parameter, which is the data to send to the worker.
... syntax worker.postmessage(message, [transfer]);
parameters message the object to deliver to the worker; this will be in the data field in the event delivered to the dedicatedworkerglobalscope.onmessage handler.
... if the message
parameter is not provided, a typeerror will be thrown.
XDomainRequest.send() - Web APIs
syntax xdr.send(data);
parameters data the form data to be sent with the request.
... this
parameter is optional for get requests.
... example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("
param1=value1&
param2=value2"); specification not part of any specification.
XMLHttpRequest() - Web APIs
syntax const request = new xmlhttprequest();
parameters none.
... non-standard firefox syntax firefox 16 added a non-standard
parameter to the constructor that can enable anonymous mode (see bug 692677).
... const request = new xmlhttprequest(
paramsdictionary);
parameters (non-standard) obj
parameters there are two flags you can set: mozanon boolean: setting this flag to true will cause the browser not to expose the origin and user credentials when fetching resources.
XRSession.requestAnimationFrame() - Web APIs
the callback takes two
parameters as inputs: an xrframe describing the state of all tracked objects for the session, and a time stamp you can use to compute any animation updates needed.
... syntax requestid = xrsession.requestanimationframe(animationframecallback);
parameters animationframecallback a function which is called before the next repaint in order to allow you to update and render the xr scene based on elapsed time, animation, user input changes, and so forth.
... the callback receives as input two
parameters: time a domhighrestimestamp indicating the time offset at which the updated viewer state was received from the webxr device.
Linear-gradient Generator - CSS: Cascading Style Sheets
position: absolute; white-space: pre; word-wrap: break-word; display: block; right: 0; } javascript content var uicolorpicker = (function uicolorpicker() { 'use strict'; function getelembyid(id) { return document.getelementbyid(id); } var subscribers = []; var pickers = []; /** * rgba color class * * hsv/hsb and hsl (hue, saturation, value / brightness, lightness) * @
param hue 0-360 * @
param saturation 0-100 * @
param value 0-100 * @
param lightness 0-100 */ function color(color) { if(color instanceof color === true) { this.copy(color); return; } this.r = 0; this.g = 0; this.b = 0; this.a = 1; this.hue = 0; this.saturation = 0; this.value = 0; this.lightness = 0; this.format = 'hsv'; } function rgbcolor(r, g, b) { var...
...w color(); color.sethsv(h, s, v); color.a = a; return color; } function hslcolor(h, s, l) { var color = new color(); color.sethsl(h, s, l); return color; } function hslacolor(h, s, l, a) { var color = new color(); color.sethsl(h, s, l); color.a = a; return color; } color.prototype.copy = function copy(obj) { if(obj instanceof color !== true) { console.log('typeof
parameter not color'); return; } this.r = obj.r; this.g = obj.g; this.b = obj.b; this.a = obj.a; this.hue = obj.hue; this.saturation = obj.saturation; this.value = obj.value; this.format = '' + obj.format; this.lightness = obj.lightness; }; color.prototype.setformat = function setformat(format) { if (format === 'hsv') this.format = 'hsv'; if (format === 'hsl') this.
...y(topic, value) { if (this.subscribers[topic]) this.subscribers[topic](value); }; /*************************************************************************/ // set picker properties /*************************************************************************/ colorpicker.prototype.setcolor = function setcolor(color) { if(color instanceof color !== true) { console.log('typeof
parameter not color'); return; } if (color.format !== this.picker_mode) { color.setformat(this.picker_mode); color.updatehsx(); } this.color.copy(color); this.updatehuepicker(); this.updatepickerposition(); this.updatepickerbackground(); this.updatealphapicker(); this.updatepreviewcolor(); this.updatealphagradient(); this.notify('red', this.color.r); this.notify('gre...
<color> - CSS: Cascading Style Sheets
in browsers that implement the level 4 standard, they accept the same
parameters and behave the same way.
...in browsers that implement the level 4 standard, they accept the same
parameters and behave the same way.
...0% / .05) /* 5% opaque blue */ /* percentage value for alpha */ hsla(240 100% 50% / 5%) /* 5% opaque blue */ specifications specification status comment css color module level 4 working draft adds rebeccapurple, four- (#rgba) and eight-digit (#rrggbbaa) hexadecimal notations, rgba() and hsla() as aliases of rgb() and hsl() (both with identical
parameter syntax), space-separated function
parameters as an alternative to commas, percentages for alpha values, and angles for the hue component in hsl() colors.
url() - CSS: Cascading Style Sheets
the
parameter is an absolute url, a relative url, or a data uri.
... the url() function can be passed as a
parameter of another css functions, like the attr() function.
...(/media/diamonds.png); src: url('fantasticfont.woff'); offset-path: url(#path); mask-image: url("masks.svg#mask1"); /* properties with fallbacks */ cursor: url(pointer.cur), pointer; /* associated short-hand properties */ background: url('https://mdn.mozillademos.org/files/16761/star.gif') bottom right repeat-x blue; border-image: url("/media/diamonds.png") 30 fill / 30px / 30px space; /* as a
parameter in another css function */ background-image: cross-fade(20% url(first.png), url(second.png)); mask-image: image(url(mask.png), skyblue, linear-gradient(rgba(0, 0, 0, 1.0), transparent); /* as part of a non-shorthand multiple value */ content: url(star.svg) url(star.svg) url(star.svg) url(star.svg) url(star.svg); /* at-rules */ @document url("https://www.example.com/") { ...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
looks like a text input, but has validation
parameters and relevant keyboard in supporting browsers and devices with dynamic keyboards.
...looks like a text input, but has validation
parameters and relevant keyboard in supporting browsers and devices with dynamic keyboards.
...a selectmode
parameter is available to allow controlling how the existing content is affected.
Equality comparisons and sameness - JavaScript
note that the distinction between these all have to do with their handling of primitives; none of them compares whether the
parameters are conceptually similar in structure.
... math.atan2 math.ceil math.pow math.round in some cases,it's possible for a -0 to be introduced into an expression as a return value of these methods even when no -0 exists as one of the
parameters.
... math.floor math.max math.min math.sin math.sqrt math.tan it's possible to get a -0 return value out of these methods in some cases where a -0 exists as one of the
parameters.
RangeError: radix must be an integer - JavaScript
the javascript exception "radix must be an integer at least 2 and no greater than 36" occurs when the optional radix
parameter of the number.prototype.tostring() or the bigint.prototype.tostring() method was specified and is not between 2 and 36.
... the optional radix
parameter of the number.prototype.tostring() or the bigint.prototype.tostring() method was specified.
... why is this
parameter's value limited to 36?
TypeError: variable "x" redeclares argument - JavaScript
the javascript strict mode-only exception "variable redeclares argument" occurs when the same variable name occurs as a function
parameter and is then redeclared using a var assignment in a function body again.
... the same variable name occurs as a function
parameter and is then redeclared using a var assignment in a function body again.
...in other cases, you might to rename either the function
parameter or the variable name.
JavaScript error reference - JavaScript
are deprecatedsyntaxerror: "use strict" not allowed in function with non-simple
parameterssyntaxerror: "x" is a reserved identifiersyntaxerror: json.parse: bad parsingsyntaxerror: malformed formal
parametersyntaxerror: unexpected tokensyntaxerror: using //@ to indicate sourceurl pragmas is deprecated.
...identifier starts immediately after numeric literalsyntaxerror: illegal charactersyntaxerror: invalid regular expression flag "x"syntaxerror: missing ) after argument listsyntaxerror: missing ) after conditionsyntaxerror: missing : after property idsyntaxerror: missing ; before statementsyntaxerror: missing = in const declarationsyntaxerror: missing ] after element listsyntaxerror: missing formal
parametersyntaxerror: missing name after .
... operatorsyntaxerror: missing variable namesyntaxerror: missing } after function bodysyntaxerror: missing } after property listsyntaxerror: redeclaration of formal
parameter "x"syntaxerror: return not in functionsyntaxerror: test for equality (==) mistyped as assignment (=)?syntaxerror: unterminated string literaltypeerror: "x" has no propertiestypeerror: "x" is (not) "y"typeerror: "x" is not a constructortypeerror: "x" is not a functiontypeerror: "x" is not a non-null objecttypeerror: "x" is read-onlytypeerror: 'x' is not iterabletypeerror: more arguments neededtypeerror: reduce of empty array with no initial valuetypeerror: x.prototype.y called on incompatible typetypeerror: can't access dead objecttypeerror: can't access property "x" of "y"typeerror: can't assign to property "x" on "y": not ...
Array() constructor - JavaScript
syntax [element0, element1, ..., elementn] new array(element0, element1[, ...[, elementn]]) new array(arraylength)
parameters elementn a javascript array is initialized with the given elements, except in the case where a single argument is passed to the array constructor and that argument is a number (see the arraylength
parameter below).
... examples array literal notation arrays can be created using the literal notation: let fruits = ['apple', 'banana']; console.log(fruits.length); // 2 console.log(fruits[0]); // "apple" array constructor with a single
parameter arrays can be created using a constructor with a single number
parameter.
... let fruits = new array(2); console.log(fruits.length); // 2 console.log(fruits[0]); // undefined array constructor with multiple
parameters if more than one argument is passed to the constructor, a new array with the given elements is created.
ArrayBuffer.prototype.slice() - JavaScript
syntax arraybuffer.slice(begin[, end])
parameters begin zero-based byte index at which to begin slicing.
... description the slice() method copies up to, but not including, the byte indicated by the end
parameter.
... the range specified by the begin and end
parameters is clamped to the valid index range for the current array.
Date.prototype.setSeconds() - JavaScript
syntax dateobj.setseconds(secondsvalue[, msvalue]) versions prior to javascript 1.3 dateobj.setseconds(secondsvalue)
parameters secondsvalue an integer between 0 and 59, representing the seconds.
... description if you do not specify the msvalue
parameter, the value returned from the getmilliseconds() method is used.
... if a
parameter you specify is outside of the expected range, setseconds() attempts to update the date information in the date object accordingly.
Date.prototype.setUTCMonth() - JavaScript
syntax dateobj.setutcmonth(monthvalue[, dayvalue])
parameters monthvalue an integer between 0 and 11, representing the months january through december.
... description if you do not specify the dayvalue
parameter, the value returned from the getutcdate() method is used.
... if a
parameter you specify is outside of the expected range, setutcmonth() attempts to update the date information in the date object accordingly.
Date.prototype.setUTCSeconds() - JavaScript
syntax dateobj.setutcseconds(secondsvalue[, msvalue])
parameters secondsvalue an integer between 0 and 59, representing the seconds.
... description if you do not specify the msvalue
parameter, the value returned from the getutcmilliseconds() method is used.
... if a
parameter you specify is outside of the expected range, setutcseconds() attempts to update the date information in the date object accordingly.
FinalizationRegistry.prototype.unregister() - JavaScript
syntax registry.unregister(unregistertoken);
parameters unregistertoken the token used with the register method when registering the target object.
... * * @
param label a label for the `thingy`.
... * * @
param filename the name of the file.
Function() constructor - JavaScript
syntax new function([arg1 [, arg2 [, ...argn]] ,] functionbody)
parameters arg1, arg2, ...
... all arguments passed to the function are treated as the names of the identifiers of the
parameters in the function to be created, in the order in which they are passed.
... omitting an argument will result in the value of that
parameter being undefined.
Function.prototype.apply() - JavaScript
syntax func.apply(thisarg, [ argsarray])
parameters thisarg the value of this provided for the call to func.
...you use an arguments array instead of a list of arguments (
parameters).
... you can also use arguments for the argsarray
parameter.
Math.fround() - JavaScript
syntax var singlefloat = math.fround(doublefloat);
parameters doublefloat a number.
... if the
parameter is of a different type, it will get converted to a number or to nan if it cannot be converted.
...5); // 1.5 math.fround(1.5) === 1.5; // true however, the number 1.337 cannot be precisely represented in the binary numeral system, so it differs in 32-bit and 64-bit: math.fround(1.337); // 1.3370000123977661 math.fround(1.337) === 1.337; // false 21502^150 is too big for a 32-bit float, so infinity is returned: 2 ** 150; // 1.42724769270596e+45 math.fround(2 ** 150); // infinity if the
parameter cannot be converted to a number, or it is not-a-number (nan), math.fround() will return nan: math.fround('abc'); // nan math.fround(nan); // nan specifications specification ecmascript (ecma-262)the definition of 'math.fround' in that specification.
Math.max() - JavaScript
the math.max() function returns the largest of the zero or more numbers given as input
parameters.
... syntax math.max([value1[, value2[, ...]]])
parameters value1, value2, ...
...n getmaxofarray(numarray) { return math.max.apply(null, numarray); } the new spread operator is a shorter way of writing the apply solution to get the maximum of an array: var arr = [1, 2, 3]; var max = math.max(...arr); however, both spread (...) and apply will either fail or return the wrong result if the array has too many elements, because they try to pass the array elements as function
parameters.
Object.create() - JavaScript
syntax object.create(proto, [propertiesobject])
parameters proto the object which should be the prototype of the newly-created object.
... exceptions the proto
parameter has to be either null or an object excluding primitive wrapper objects.
...(note that the second
parameter // maps keys to *property descriptors*.) o = object.create(object.prototype, { // foo is a regular 'value property' foo: { writable: true, configurable: true, value: 'hello' }, // bar is a getter-and-setter (accessor) property bar: { configurable: false, get: function() { return 10; }, set: function(value) { console.log('setting `o.bar` to', value); ...
Object.getPrototypeOf() - JavaScript
syntax object.getprototypeof(obj)
parameters obj the object whose prototype is to be returned.
... examples using getprototypeof var proto = {}; var obj = object.create(proto); object.getprototypeof(obj) === proto; // true non-object coercion in es5, it will throw a typeerror exception if the obj
parameter isn't an object.
... in es2015, the
parameter will be coerced to an object.
RegExp.prototype[@@replace]() - JavaScript
syntax regexp[symbol.replace](str, newsubstr|function)
parameters str a string that is a target of the replacement.
...a number of special replacement patterns are supported; see the specifying a string as a
parameter section in string.prototype.replace() page.
...the arguments supplied to this function are described in the specifying a function as a
parameter section in string.prototype.replace() page.
RegExp() constructor - JavaScript
syntax literal, constructor, and factory notations are possible: /pattern/flags new regexp(pattern[, flags]) regexp(pattern[, flags])
parameters pattern the text of the regular expression.
... the literal notation's
parameters are enclosed between slashes and do not use quotation marks.
... the constructor function's
parameters are not enclosed between slashes but do use quotation marks.
String.prototype.match() - JavaScript
syntax str.match(regexp)
parameters regexp a regular expression object.
... if you don't give any
parameter and use the match() method directly, you will get an array with an empty string: [""].
...it barked.'; const capturingregex = /(?<animal>fox|cat) jumps over/; const found = paragraph.match(capturingregex); console.log(found.groups); // {animal: "fox"} using match() with no
parameter const str = "nothing will come of nothing."; str.match(); // returns [""] a non-regexp object as the
parameter when the regexp
parameter is a string or a number, it is implicitly converted to a regexp by using new regexp(regexp).
String.prototype.substr() - JavaScript
syntax str.substr(start[, length])
parameters start the index of the first character to include in the returned substring.
...to use this feature in jscript, you can use the following code: // only run when the substr() function is broken if ('ab'.substr(-1) != 'b') { /** * get the substring of a string * @
param {integer} start where to start the substring * @
param {integer} length how many characters to return * @return {string} */ string.prototype.substr = function(substr) { return function(start, length) { // call the original method return substr.call(this, // did we get a negative start, calculate how much it is from the beginning of the string // a...
...djust the start
parameter for negative value start < 0 ?
TypedArray.from() - JavaScript
syntax typedarray.from(source[, mapfn[, thisarg]]) where typedarray is one of: int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array bigint64array biguint64array
parameters source an array-like or iterable object to convert to a typed array.
... typedarray.from() has the optional
parameter mapfn, which allows you to execute a map() function on each element of the typed array (or subclass object) that is being created.
... when the source
parameter is an iterator, the typedarray.from() first collects all the values from the iterator, then creates an instance of thisarg using the count, then sets the values on the instance.
decodeURIComponent() - JavaScript
syntax decodeuricomponent(encodeduri)
parameters encodeduri an encoded component of a uniform resource identifier.
... examples decoding a cyrillic url component decodeuricomponent('javascript_%d1%88%d0%b5%d0%bb%d0%bb%d1%8b'); // "javascript_ÑˆĐµĐ»Đ»Ñ‹" catching errors try { var a = decodeuricomponent('%e0%a4%a'); } catch(e) { console.error(e); } // urierror: malformed uri sequence decoding query
parameters from a url decodeuricomponent cannot be used directly to parse query
parameters from a url.
... function decodequery
param(p) { return decodeuricomponent(p.replace(/\+/g, ' ')); } decodequery
param('search+query%20%28correct%29'); // 'search query (correct)' specifications specification ecmascript (ecma-262)the definition of 'decodeuricomponent' in that specification.
async function expression - JavaScript
syntax async function [name]([
param1[,
param2[, ...,
paramn]]]) { statements } as of es2015, you can also use arrow functions.
...
parameters name the function name.
...
paramn the name of an argument to be passed to the function.
delete operator - JavaScript
syntax delete expression where expression should evaluate to a property reference, e.g.: delete object.property delete object['property']
parameters object the name of an object, or an expression evaluating to an object.
...console.log(delete variable2); // false function func(
param) { // syntaxerror in strict mode.
... console.log(delete
param); // false } // syntaxerror in strict mode.
Function expression - JavaScript
function [name]([
param1[,
param2[, ...,
paramn]]]) { statements } as of es2015, you can also use arrow functions.
...
parameters name optional the function name.
...
paramn optional the name of an argument to be passed to the function.
function* - JavaScript
syntax function* name([
param[,
param[, ...
...
param]]]) { statements } name the function name.
...
param optional the name of a formal
parameter for the function.
function declaration - JavaScript
the function declaration (function statement) defines a function with the specified
parameters.
... syntax function name([
param[,
param,[...,
param]]]) { [statements] } name the function name.
...
param optional the name of an argument to be passed to the function.
Digital audio concepts - Web media technologies
lossless encoder
parameters lossless encoders have a lot less room to manipulate the audio to improve the compression rate, given the need to be able to reproduce the original audio, which limits the number of options available to configure these encoders.
... these
parameters vary depending on the codec, but can include: specifying specific algorithms to use during particular phases of the encoding process
parameters for those algorithms to use, such as how much predictive depth to use when trying to model the audio the number of passes to make while analyzing the audio, or the number of times given algorithms should be run lossy encoder
parameters most codecs have input values you can tune to optimize the compression in various ways, either for size or for quality.
...some codecs have a number of values you can adjust (some of which may require a deep understanding of both psychoacoustics and of the codec's algorithms), and others offer a simple "quality"
parameter you can set, which automatically adjusts various properties of the algorithm.
OpenSearch description format
://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/"> <shortname>[snk]</shortname> <description>[search engine full name and summary]</description> <inputencoding>[utf-8]</inputencoding> <image width="16" height="16" type="image/x-icon">[https://example.com/favicon.ico]</image> <url type="text/html" template="[searchurl]"> <
param name="[key name]" value="{searchterms}"/> <!-- other
params if you need them… --> <
param name="[other key name]" value="[
parameter value]"/> </url> <url type="application/x-suggestions+json" template="[suggestionurl]"/> <moz:searchform>[https://example.com/search]</moz:searchform> </opensearchdescription> shortname a short name for the search engine.
...other supported dynamic search
parameters are described in opensearch 1.1
parameters.
...
param the
parameters that must be passed in along with the search query as key/value pairs.
end - SVG: Scalable Vector Graphics
a valid repeat value consists of an element id followed by a dot and the function repeat() with an integer value specifying the number of repetitions as
parameter.
... a valid accesskey-value consists of the function accesskey() with the character to be input as
parameter.
... a valid wallclock-sync-value consists of the function wallclock() with a time value as
parameter.
Scripting - SVG: Scalable Vector Graphics
you can pass an object that implements the handleevent interface as the second
parameter to these methods.
... setproperty has three
parameters the function svgelement.style.setproperty("fill-opacity", "0.0") throws a domexception - syntax err in mozilla.
...the function setproperty is defined as a function with three
parameters.
choose - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the choose function returns one of the specified objects based on a boolean
parameter.
... returns if the boolean
parameter is true, the first object is returned; otherwise, the second object is returned.
... note: all
parameters are evaluated, even the one that's not returned.
Converting WebAssembly text format to wasm - WebAssembly
a first look at the text format let’s look at a simple example of this — the following program imports a function called imported_func from a module called imports, and exports a function called exported_func: (module (func $i (import "imports" "imported_func") (
param i32)) (func (export "exported_func") i32.const 42 call $i ) ) the webassembly function exported_func is exported for use in our environment (e.g.
...when it is called, it calls an imported javascript function called imported_func, which is run with the value (42) provided as a
parameter.
... next, execute the wat2wasm program, passing it the path to the input file, followed by an -o
parameter, followed by the path to the output file: wat2wasm simple.wat -o simple.wasm this will convert the wasm into a file called simple.wasm, which contains the .wasm assembly code.
Communicating using "postMessage" - Archive of obsolete content
handling message events in the content script to send a message from a content script, you use the postmessage function of the global self object: self.postmessage(contentscriptmessage); this takes a single
parameter, the message payload, which may be any json-serializable value.
... to receive a message from the add-on script, use self's on function: self.on("message", function(addonmessage) { // handle the message }); like all event-registration functions, this takes two
parameters: the name of the event, and the handler function.
clipboard - Archive of obsolete content
parameters data : string the data to put on the clipboard.
...
parameters datatype : string retrieve the clipboard contents only if matching this type (optional).
request - Archive of obsolete content
the constructor takes a single
parameter options which is used to set several properties on the resulting request.
...
parameters options : object optional options: name type url string,url this is the url to which the request will be made.
self - Archive of obsolete content
parameters name : string the filename to be read, relative to the package's data directory.
...so you can rewrite the above code like this: var mypanel = require("sdk/panel").panel({ contenturl: "./myfile.html" }); mypanel.show();
parameters name : string the filename to be read, relative to the package's data directory.
system - Archive of obsolete content
var system = require("sdk/system"); system.exit();
parameters code : integer to exit with failure, set this to 1.
...var desktoppath = require('sdk/system').pathfor('desk');
parameters id : string the id of the special directory.
windows - Archive of obsolete content
parameters options : object required options: name type url string string url to be opened in the new window.
...
parameters callback : function a function to be called when the window finishes its closing process.
content/worker - Archive of obsolete content
parameters options : object required options: name type window object the content window to create javascript sandbox for communication with.
...
parameters data : number,string,json the data to send.
dev/panel - Archive of obsolete content
}); in the constructor definition there are a number of mandatory and optional
parameters for you to supply.
...any additional
parameters sent in the message become arguments to the method.
util/deprecate - Archive of obsolete content
parameters fun : function the function to execute after the error message msg : string the error message to display returns * : the returned value from fun deprecateusage(msg) dump to the console the error message given, prefixed with "deprecated:", and print the stacktrace.
...
parameters msg : string the error message to display ...
util/object - Archive of obsolete content
0, location: "sf" }); b === a // true b.jetpacks // "are yes" b.foo // 50 b.bar // 6 b.location // "sf" // merge also translates property descriptors var c = { "type": "addon" }; var d = {}; object.defineproperty(d, "name", { value: "jetpacks", configurable: false }); merge(c, d); var props = object.getownpropertydescriptor(c, "name"); console.log(props.configurable); // true
parameters source : object the object that other properties are merged into.
... let { extend } = require("sdk/util/object"); var a = { alpha: "a" }; var b = { beta: "b" }; var g = { gamma: "g", alpha: null }; var x = extend(a, b, g); console.log(a); // { alpha: "a" } console.log(b); // { beta: "b" } console.log(g); // { gamma: "g", alpha: null } console.log(x); // { alpha: null, beta: "b", gamma: "g" }
parameters arguments : object n arguments that get merged into a new object.
File I/O - Archive of obsolete content
so therefore for the first
parameter, file, you can pass an nsifile object or a string (such as a jar path) see: netutil.asyncfetch: components.utils.import("resource://gre/modules/netutil.jsm"); netutil.asyncfetch(file, function(inputstream, status) { if (!components.issuccesscode(status)) { // handle error!
... components.utils.import("resource://gre/modules/netutil.jsm"); components.utils.import("resource://gre/modules/fileutils.jsm"); // file is nsifile, data is a string // you can also optionally pass a flags
parameter here.
Interaction between privileged and non-privileged pages - Archive of obsolete content
in form of e4x xml var stuff = {}; stuff.id = sanitize.integer(uc.@id); stuff.name = sanitize.label(uc.@name); } function sendsomethingtopage (something) { var somethingxml = <something/>; // |something| object as e4x xml somethingxml.@id = something.id; somethingxml.@weight = something.weight; sendmsg("sendsomething", somethingxml); } /** * send msgs from chrome to the page * @
param type {string} the event type.
... the receiver needs to use that * when doing addeventlistener(type, ...) * @
param dataxml {e4x} the data or detail */ function sendmsg(type, dataxml) { var el = targetdoc.body; el.setattribute("eventdatatopage", dataxml ?
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
var response = xhr.responsetext; settimeout(function() { alert(response); }, 100); } alternative: use function.bind() introduced in javascript 1.8.5 function.bind is a new utility function that you may use to (partially) bind
parameters to functions.
... you don't have to care about
parameter naming (or changes in naming in future application versions) or short-hand/arrow functions.
Appendix D: Loading Scripts - Archive of obsolete content
flexibility: the evalinsandbox method accepts several
parameters, including the url, line number, and javascript version of the file from which the code being evaluated was extracted.
...this behavior can be reversed by setting the wantsxrays
parameter to false when constructing the sandbox.
Adding preferences to an extension - Archive of obsolete content
observe: function(subject, topic, data) { if (topic != "nspref:changed") { return; } switch(data) { case "symbol": this.tickersymbol = this.prefs.getcharpref("symbol").touppercase(); this.refreshinformation(); break; } }, the topic
parameter indicates what type of event occurred.
... once we've established that the event is in fact a preference change, we look at the data
parameter, which contains the name of the preference that changed.
JXON - Archive of obsolete content
jxon.build
parameters document the xml document to be converted into json format.
... jxon.unbuild
parameters objtree the javascript object from which you want to create your xml document.
MMgc - Archive of obsolete content
a gcobject is allocated with
parameterized operator new, passing the mmgc::gc object: class myobject : public mmgc::gcobject { ...
...to allocate a managed (gc) object, you must use the
parameterized form of operator new, and pass it a reference to the mmgc::gc object.
jspage - Archive of obsolete content
[1]):null;},dispose:function(){new cookie(this.key,$merge(this.options,{duration:-1})).write("");return this;}});cookie.write=function(b,c,a){return new cookie(b,a).write(c); };cookie.read=function(a){return new cookie(a).read();};cookie.dispose=function(b,a){return new cookie(b,a).dispose();};var swiff=new class({implements:[options],options:{id:null,height:1,width:1,container:null,properties:{},
params:{quality:"high",allowscriptaccess:"always",wmode:"transparent",swliveconnect:true},callbacks:{},vars:{}},toelement:function(){return this.object; },initialize:function(l,m){this.instance="swiff_"+$time();this.setoptions(m);m=this.options;var b=this.id=m.id||this.instance;var a=document.id(m.container); swiff.callbacks[this.instance]={};var e=m.
params,g=m.vars,f=m.callbacks;var h=$extend({height:...
...(n){return function(){return n.apply(k.object,arguments); };})(f[d]);g[d]="swiff.callbacks."+this.instance+"."+d;}e.flashvars=hash.toquerystring(g);if(browser.engine.trident){h.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"; e.movie=l;}else{h.type="application/x-shockwave-flash";h.data=l;}var j='<object id="'+b+'"';for(var i in h){j+=" "+i+'="'+h[i]+'"';}j+=">";for(var c in e){if(e[c]){j+='<
param name="'+c+'" value="'+e[c]+'" />'; }}j+="</object>";this.object=((a)?a.empty():new element("div")).set("html",j).firstchild;},replaces:function(a){a=document.id(a,true);a.parentnode.replacechild(this.toelement(),a); return this;},inject:function(a){document.id(a,true).appendchild(this.toelement());return this;},remote:function(){return swiff.remote.apply(swiff,[this.toelement()].extend(arguments)...
LIR - Archive of obsolete content
3
parami integer 32 bit load an int
parameter (register or stack location).
... 4
paramq quad 64 bit load a quad
parameter (register or stack location).
Bundles - Archive of obsolete content
webapp bundle in addition to passing simple command line
parameters, prism can use a zipped bundle package to install a webapp.
...how-to here is a simple way to build a basic web application bundle: create file called webapp.ini that contains something like: [
parameters] id=unique-app-id@unique-author-id.whatever name=webapp name uri=http://[the-url-what-you-want-to-connect-to]/ status=yes location=no sidebar=no navigation=no zip the file to [whatever].webapp double-click the webapp bundle or use prism -webapp [path-to-webapp] structure a bundle can contain the following files.
dirCreate - Archive of obsolete content
method of file object syntax int dircreate( filespecobject dirtocreate );
parameters the dircreate method has the following
parameters: dirtocreate a filespecobject representing the pathname of the directory to create.
...description the input
parameter is a filespecobject that you have already created with the install object's getfolder method.
execute - Archive of obsolete content
method of file object syntax int execute ( filespecobject executablefile, [string a
parameters] );
parameters the execute method has the following
parameters: executablefile a filespecobject representing the local file already on disk to be executed.
... a
parameters an optional
parameter string that is passed to the executable.
modDateChanged - Archive of obsolete content
method of file object syntax boolean moddatechanged (filespecobject asourcefolder, number anolddate);
parameters the moddatechanged method has the following
parameters: asourcefolder a filespecobject representing the file to be queried.
... description most often, the date passed in as the second
parameter in moddatechanged is the returned value from a moddate on a separate file, as in the following example, in which the dates of two files are compared.
windowsShortcut - Archive of obsolete content
method of file object syntax int windowsshortcut( folderobject atarget, folderobject ashortcutpath, string adescription, folderobject aworkingpath, string a
params, folderobject aicon, number aiconid);
parameters the windowsshortcut method has the following
parameters: atarget a filespecobject representing the absolute path (including filename) to file that the shortcut will be created for.
... a
params
parameters that atarget requires.
init - Archive of obsolete content
method of installversion object syntax init ( int maj, int min, int rev, int bld ); init ( string version );
parameters the init method has the following
parameters: maj the major version number.
... when maj, min, rev, and bld are provided as
parameters, all four
parameters are required, but all of them can be zero.
toString - Archive of obsolete content
method of installversion object syntax string version = installversion.tostring ( initobj );
parameters the tostring method has the following
parameter: initobj initobj is an installversion object whose init method has been called.
...the init() function can input the version number as a single string or as a series of
parameters representing the version numbers of the installation.
addDirectory - Archive of obsolete content
localdirspec, string relativelocalpath); public int adddirectory ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int adddirectory ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate);
parameters the adddirectory method has the following
parameters: registryname the pathname in the client version registry for the root directory of the files that are to be installed.this
parameter can be an absolute pathname (beginning with a /) or a relative pathname, (not beginning with a slash).
...a relative pathname is appended to the registry name of the package as specified by the package
parameter to the initinstall method.this
parameter can also be null, in which case the xpisourcepath
parameter is used as a relative pathname.note that the registry pathname is not the location of the software on the computer; it is the location of information about the software inside the client version registry.
gestalt - Archive of obsolete content
method of install object syntax int gestalt ( string selector );
parameters the gestalt method takes the following
parameters: selector the selector code for the information you want.
...the format depends on the select code specified in the selector
parameter.
getComponentFolder - Archive of obsolete content
method of install object syntax object getcomponentfolder (string registryname); object getcomponentfolder ( string registryname, string subdirectory);
parameters the getcomponentfolder method has these
parameters: registryname the pathname in the client version registry for the component whose installation directory is to be obtained.
...this
parameter is available in netscape 6 and may be case sensitive (depending on the operating system).
getWinProfile - Archive of obsolete content
method of install object syntax winprofile getwinprofile ( object folder, string file);
parameters the getwinprofile method has the following
parameters: folder an object representing a directory.
... file a relative pathname to an initialization file in the directory specified by the folder
parameter, such as "royal/royal.ini".
loadResources - Archive of obsolete content
method of install object syntax object loadresources( string xpipath );
parameters the sole input
parameter for loadresources is a string representing the path to the properties file in the xpi in which the key/value pairs are defined.
...be aware that the
parameter specifies the file within the xpi and not on the file system, as the following example demonstrates.
setPackageFolder - Archive of obsolete content
method of install object syntax void setpackagefolder ( object folder);
parameters the setpackagefolder method has the following
parameter: folder an object representing a directory.
...when the package folder is set, it is used as the default for forms of addfile and other methods that have an optional localdirspec
parameter.
writeString - Archive of obsolete content
method of winprofile object syntax boolean writestring ( string section, string key, string value);
parameters the method has the following
parameters: section section in the file, such as "boot" or "drivers".
...to delete an existing value, supply null as the value
parameter.
createKey - Archive of obsolete content
method of winreg object syntax int createkey ( string subkey, string classname);
parameters the method has the following
parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
...for information on this
parameter, see the description of regcreatekeyex in your windows api documentation.
Learn XPI Installer Scripting by Example - Archive of obsolete content
the initinstall method takes the following
parameters: the display name of the package, the name of the package as it appears in the client registry, and the version, which can be expressed as a number or as an installversion object.
...in this most common form of the registerchrome function (it can also be used to support the now-deprecatedmanifest.rdf style of installation archive), the three
parameters represent, in order, the chrome switch used to indicate what kind of software is being registered, the target destination of the software (e.g., the "chrome" folder in the example above), and the path within the xpi (or jar theme archive) where the contents.rdf file is located.
appendNotification - Archive of obsolete content
notification box events requires gecko 9.0(firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) if you specify the eventcallback
parameter, it should be a javascript function that gets called when interesting things happen related to the notification box.
... this function receives as its only
parameter a string indicating what event occurred.
loadTabs - Archive of obsolete content
« xul reference home loadtabs( uris, loadinbackground, replace ) loadtabs( uris,
params ) return type: no return value loads a set of uris, specified by the array uris, into tabs.
...the properties of
params are following: boolean inbackground boolean replace boolean allowthirdpartyfixup tab targettab number newindex object postdatas number usercontextid ...
XUL Reference - Archive of obsolete content
column columns commandset command conditions content datepicker deck description dialog dialogheader dropmarker editor grid grippy groupbox hbox iframe image key keyset label listbox listcell listcol listcols listhead listheader listitem member menu menubar menuitem menulist menupopup menuseparator notification notificationbox observes overlay page panel
param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row rows rule scale script scrollbar scrollbox scrollcorner separator spacer spinbuttons splitter stack statusbar statusbarpanel stringbundle stringbundleset tab tabbrowser (firefox-only starting with firefox 3/gecko 1.9) tabbox tabpa...
...e) textbox (mozilla autocomplete) timepicker description label image listbox listitem listcell listcol listcols listhead listheader richlistbox richlistitem tree treecell treechildren treecol treecols treeitem treerow treeseparator box hbox vbox bbox deck stack grid columns column rows row scrollbox action assign binding bindings conditions content member
param query queryset rule template textnode triple where script commandset command broadcaster broadcasterset observes key keyset stringbundle stringbundleset arrowscrollbox dropmarker grippy scrollbar scrollcorner spinbuttons all attributes all properties all methods attributes defined for all xul elements style classes event handlers deprecated/defunct markup ...
browser - Archive of obsolete content
(this one has no post data
parameter, see loaduriwithflags for a version that does) loaduri( uri, referrer, charset ) return type: no return value load a url into the document, with the given referrer and character set.
... (see nsiwebnavigation.loaduri() for details on the referrer and postdata
parameters.) reload() return type: no return value reloads the document in the browser element on which you call this method.
CommandLine - Archive of obsolete content
an nsicommandline object is passed as the first argument of the launched window: example var cmdline = window.arguments[0]; cmdline = cmdline.queryinterface(components.interfaces.nsicommandline); alert(cmdline.handleflagwith
param("test", false)); see also: chrome: command line for single instance applications of course, for a single instance application (see toolkit.singletonwindowtype for more information), the last example still applies the first time your application is launched.
...compmgr, afilespec) { return apphandlermodule; } create an observer that will get notified when arguments change: chrome/content/cmdline.js function commandlineobserver() { this.register(); } commandlineobserver.prototype = { observe: function(asubject, atopic, adata) { var cmdline = asubject.queryinterface(components.interfaces.nsicommandline); var test = cmdline.handleflagwith
param("test", false); alert("test = " + test); }, register: function() { var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); observerservice.addobserver(this, "commandline-args-changed", false); }, unregister: function() { var observerservice = components.classes...
Monitoring plugins - Archive of obsolete content
below are a number of javascript snippets that would be useful to developers trying to use this feature: registration to register for runtime notifications with the observer service you must create a class with an observe method which receives 3
parameters (subject, topic and data) as well as a register method that contains the following code: var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice (components.interfaces.nsiobserverservice); observerservice.addobserver(this, "experimental-notify-plugin-call", false); observing as discussed above, to specify what you want done wh...
...en a notification arrives your class must have an observe method, receiving 3
parameters (subject, topic and data).
NPN_Enumerate - Archive of obsolete content
syntax #include <npruntime.h> bool npn_enumerate(npp npp, npobject *npobj, npidentifier **identifiers, uint32_t *identifiercount);
parameters the function has the following
parameters: npp the npp indicating which plugin instance is making the request.
... note: the caller must call npn_memfree() on the pointer received through the identifiers
parameter of a successful call to npn_enumerate to release the array of string identifiers when it is no longer needed.
NPN_GetURL - Archive of obsolete content
syntax #include <npapi.h> nperror npn_geturl(npp instance, const char* url, const char* target);
parameters the function has the following
parameters: instance pointer to the current plug-in instance.
...if the target
parameter refers to the window or frame containing the current plug-in instance, the instance is destroyed and the plug-in may be unloaded.
NPN_GetURLNotify - Archive of obsolete content
syntax #include <npapi.h> nperror npn_geturlnotify(npp instance, const char* url, const char* target, void* notifydata);
parameters the function has the following
parameters: instance pointer to the current plug-in instance.
... if this function is called with a target
parameter value of _self or a parent to _self, this function should return nperr_invalid_
param.
NPN_Invoke - Archive of obsolete content
syntax #include <npruntime.h> bool npn_invoke(npp npp, npobject *npobj, npidentifier methodname, const npvariant *args, uint32_t argcount, npvariant *result);
parameters the function has the following
parameters: npp the npp indicating which plugin wants to call the method on the object.
...the result of the method invocation is returned through an npvariant result
parameter.
NPN_InvokeDefault - Archive of obsolete content
syntax #include <npruntime.h> bool npn_invokedefault(npp npp, npobject *npobj, const npvariant *args, uint32_t argcount, npvariant *result);
parameters the function has the following
parameters: npp the npp indicating which plugin wants to call the default method on the object.
...the result of the method invocation is returned through an npvariant result
parameter.
NPP_Destroy - Archive of obsolete content
syntax #include <npapi.h> nperror npp_destroy(npp instance, npsaveddata **save);
parameters the function has the following
parameters: instance pointer to the plug-in instance to delete.
... use the optional save
parameter if you want to save and reuse some state or other information.
NPP_HandleEvent - Archive of obsolete content
syntax #include <npapi.h> int16 npp_handleevent(npp instance, void* event);
parameters the function has the following
parameters: instance pointer to the current plug-in instance.
...the plug-in either handles or ignores the event, depending on the value given in the event
parameter of this function.
NPP_New - Archive of obsolete content
syntax #include <npapi.h> nperror npp_new(npmimetype plugintype, npp instance, uint16 mode, int16 argc, char *argn[], char *argv[], npsaveddata *saved);
parameters the function has the following
parameters: plugintype pointer to the mime type for new plug-in instance.
... if instance data was saved from a previous instance of the plug-in by the npp_destroy function, it is returned in the saved
parameter for the current instance to use.
NPP_Print - Archive of obsolete content
syntax #include <npapi.h> void npp_print(npp instance, npprint* printinfo);
parameters the function has the following
parameters: instance pointer to the current plug-in instance.
...it uses the print mode set in the npprint structure in its printinfo
parameter to determine whether the plug-in should print as an embedded plug-in or as a full-page plug-in.
NPP_URLNotify - Archive of obsolete content
syntax #include <npapi.h> void npp_urlnotify(npp instance, const char* url, npreason reason, void* notifydata);
parameters the function has the following
parameters: instance pointer to the current plug-in instance.
... the
parameter notifydata is the plug-in-private value passed as an argument by a previous npn_geturlnotify() or npn_posturlnotify() call, and can be used as an identifier for the request.
NP_GetValue - Archive of obsolete content
syntax #include <npapi.h> nperror np_getvalue(void *instance, nppvariable variable, void *value);
parameters the function has the following
parameters: instance pointer to the current plug-in instance.
... instance
parameter is null because no instance has been created.
Adobe Flash - Archive of obsolete content
> <
param name="movie" value="somefile.swf" /> ....
...the following code snippet illustrates the ideas behind the use of fscommands demonstrated in example 3: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" id="myflash" width="250" height="150" viewastext> <
param name="movie" value="js2flash.swf" /> <
param name="quality" value="high"></
param> <embed src="js2flash.swf" width="250" height="150" swliveconnect="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="myflash"> </embed> </object> .....
E4X for templating - Archive of obsolete content
max = number.positive_infinity; min = 1; } if (h.length === 1) { for (k in arr) { if (it < min) { ++it; continue; } if (it > max) { break; } ret+=h(arr[k], it, lev); // need to get it or lev via arguments[] since our length detection implies no explicit additional
params; otherwise define with more than one
param (see below) ++it; } } else { for (k in arr) { if (it < min) { ++it; continue; } if (it > max) { break; } ret+=h(k, arr[k], it, lev); ++it; } } return ret; } the following real case ex...
...foreach(elems, function (k, elem, iter) <> <row>{k}: {elem}</row> <row><image src="chrome://myext/skin/images/fillerrow.jpg" /></row> </>)} or if the e4x child element had its own children and text: {foreach(elems, function (k, elem, iter) <> <row>{k}: {elem.text()} {elem.somechild}</row> <row><image src="chrome://myext/skin/images/fillerrow.jpg" /></row> </>)} sorting /* @
param {xmllist} xmllist the xmllist to sort @
param {function} h the sorting handler */ function sort (xmllist, h) { var k, arr=[], ret = <></>; for (k in xmllist) { if (xmllist.hasownproperty(k)) { arr.push(xmllist[k]); } } arr.sort(h).foreach(function (item) { if (typeof item === 'xml') { ret += item; } else if (typeof it...
New in JavaScript 1.3 - Archive of obsolete content
changed functionality in javascript 1.3 changes to date to conform with ecma-262 new constructor date(year, month, day, [,hours [, minutes [, seconds [, milliseconds ]]]]) additional method
parameters: setmonth(month[, date]) sethours(hours[, min[, sec[, ms]]]) setminutes(min[, sec[, ms]]) setseconds(sec[, ms]) the length of an array (property length) is now an unsigned, 32-bit integer.
... array.prototype.slice(): in javascript 1.2, the splice method returned the element removed, if only one element was removed (howmany
parameter is 1).
Object.prototype.unwatch() - Archive of obsolete content
syntax obj.unwatch(prop)
parameters prop the name of a property of the object to stop watching.
... note: the reason for unwatch() to take the property name prop as its only
parameter is due to the "single handler allowing" behavior of the watch() method.
JavaObject - Archive of obsolete content
in addition, you can explicitly construct a javaobject using the object's java constructor with the packages keyword: new packages.javaclass(
parameterlist) javaclassis the fully-specified name of the object's java class.
...
parameters
parameterlist an optional list of
parameters, specified by the constructor of the java class.
Mozilla XForms Specials - Archive of obsolete content
(limitation tracked in bug 271724) optional
parameters in xpath functions optional
parameters in xpath functions are not supported, you will have to specify all
parameters when calling a function.
...instead of using digest('abc', 'sha-1') explicitly use the third
parameter (the results are equal): digest('abc', 'sha-1', 'base64') (limitation tracked in bug 477857) extensions enumerating instances the standardized nsixformsmodelelement does not allow one to enumerate over all possible instances, but only to retrieve instances by their name.
Common causes of memory leaks in extensions - Extensions
"private" : "normal"); } }; services.obs.addobserver(myobserver, "private-browsing", /* ownsweak */ false); the ownsweak = false
parameter causes the observer service to use a strong reference to the observer object, which will cause it to hold onto the whole window.
....obs.removeobserver(myobserver, "private-browsing"); services.obs.removeobserver(myobserver, "xpcom-shutdown"); } else { // do something with "private-browsing" } } }; services.obs.addobserver(myobserver, "private-browsing", false); services.obs.addobserver(myobserver, "xpcom-shutdown", false); finally, a lot of services other than nsiobserverservice accept nsiobserver
parameters or other interfaces and will keep strong references around.
Implementing controls using the Gamepad API - Game development
both functions are fairly simple: connect: function(evt) { gamepadapi.controller = evt.gamepad; gamepadapi.turbo = true; console.log('gamepad connected.'); }, the connect() function takes the event as a
parameter and assigns the gamepad object to the gamepadapi.controller variable.
...it takes two
parameters — the button we want to listen to and the (optional) way to tell the game that holding the button is accepted.
Collision detection - Game development
the third, optional
parameter is the function executed when a collision occurs — ballhitbrick().
... thanks to phaser there are two
parameters passed to the function — the first one is the ball, which we explicitly defined in the collide method, and the second one is the single brick from the bricks group that the ball is colliding with.
Player paddle and controls - Game development
to enable collision detection between the paddle and ball, add the collide() method to the update() function as shown: function update() { game.physics.arcade.collide(ball, paddle); } the first
parameter is one of the objects we are interested in — the ball — and the second is the other one, the paddle.
...) line, and replace it with the following two lines: ball = game.add.sprite(game.world.width*0.5, game.world.height-25, 'ball'); ball.anchor.set(0.5); the velocity stays almost the same — we're just changing the second
parameter's value from 150 to -150, so the ball will start the game by moving up instead of down.
The score - Game development
var scoretext; var score = 0; adding score text to the game display now add this line at the end of the create() function: scoretext = game.add.text(5, 5, 'points: 0', { font: '18px arial', fill: '#0095dd' }); the text() method can take four
parameters: the x and y coordinates to draw the text at.
... the last
parameter looks very similar to css styling.
From object to iframe — other embedding technologies - Learn web development
unsandboxed content can do way too much (executing javascript, submitting forms, popup windows, etc.) by default, you should impose all available restrictions by using the sandbox attribute with no
parameters, as shown in our previous example.
...lugin content, this is the kind of information you'll need, at a minimum: <embed> <object> url of the embedded content src data accurate media type of the embedded content type type height and width (in css pixels) of the box controlled by the plugin height width height width names and values, to feed the plugin as
parameters ad hoc attributes with those names and values single-tag <
param> elements, contained within <object> independent html content as fallback for an unavailable resource not supported (<noembed> is obsolete) contained within <object>, after <
param> elements note: <object> requires a data attribute, a type attribute, or both.
Introduction to events - Learn web development
inside the addeventlistener() function, we specify two
parameters — the name of the event we want to register this handler for, and the code that comprises the handler function we want to run in response to it.
... event objects sometimes inside an event handler function, you'll see a
parameter specified with a name such as event, evt, or simply e.
Test your skills: Functions - Learn web development
the three improvements we want you to make are: refactor the code that generates the random number into a separate function called random(), which takes as
parameters two generic bounds that the random number should be between, and returns the result.
... update the choosename() function so that it makes use of the random number function, takes the array to choose from as a
parameter (making it more flexible), and returns the result.
Arrays - Learn web development
in its simplest form, this takes a single
parameter, the character you want to separate the string at, and returns the substrings between the separator as items in an array.
...tostring() is arguably simpler than join() as it doesn't take a
parameter, but more limiting.
Object-oriented JavaScript for beginners - Learn web development
let's look at the constructor calls again: let person1 = new person('bob'); let person2 = new person('sarah'); in each case, the new keyword is used to tell the browser we want to create a new object instance, followed by the function name with its required
parameters contained in parentheses, and the result is stored in a variable — very similar to how a standard function is called.
...i\'m ' + this.name + '.'); }; you can also pass an object literal to the object() constructor as a
parameter, to prefill it with properties/methods.
Server-side web frameworks - Learn web development
an http get request to get files or data from the server may encode what data is required in url
parameters or within the url structure.
...an http get), get or post
parameters, cookie and session data, etc.
Getting started with React - Learn web development
should look something like this: reactdom.render(<app subject="clarice" />, document.getelementbyid('root')); back in app.js, let's revisit the app function itself, which reads like this (with the return statement shortened for brevity): function app() { const subject = "react"; return ( // return statement ); } change the signature of the app function so that it accepts props as a
parameter, and delete the subject const.
... just like any other function
parameter, you can put props in a console.log() to print it to your browser's console.
Using Vue computed properties - Learn web development
this method should take one
parameter: the todo item id.
... we want to find the item with the matching id and update its done status to be the opposite of its current status: updatedonestatus(todoid) { const todotoupdate = this.todoitems.find(item => item.id === todoid) todotoupdate.done = !todotoupdate.done } we want to run this method whenever a todoitem emits a checkbox-changed event, and pass in its item.id as the
parameter.
Interface Compatibility
changes should not be taken lightly, however: especially if a change is likely to affect many extensions, the change should try to maintain backwards compatibility by using optional/default
parameters or other javascript techniques.
...this may involve using javascript modules, passing named
parameters using objects, or other similar techniques.
Multiple Firefox profiles
set the "command" text field to target the executable file, likely "/usr/bin/firefox", and add the -p
parameter.
...to do this: set the "command" text field to target the executable file, likely "/usr/bin/firefox", and add the -p profile_name
parameter, replacing "profile_name" with the specific profile.
Storage access policy: Block cookies from trackers
on the social media website, the network annotates the advertisement landing page url with a query
parameter that signals that the visit was the result of a click on an advertisement.
... on your website, the display network’s tag checks the url query
parameters and saves any ad tracking
parameters to first-party storage.
HTMLIFrameElement.executeScript()
parameters script the script to be executed.
...http://example.com/index.html note: the options
parameter does not currently seem to have much effect.
AddonInstall
void addlistener( in installlistener listener )
parameters listener the installlistener to add.
... void removelistener( in installlistener listener )
parameters listener the installlistener to remove ...
TypeListener
void ontypeadded( in addontype type )
parameters type the addontype that is being added needsrestart true if an application restart is necessary for the change to take effect ontyperemoved() called when an add-on type has been removed.
... void ontyperemoved( in addontype type, )
parameters type the addontype that has been removed ...
UpdateCheckListener
void onupdatecheckcomplete( in updateinfo results[] )
parameters results an array of updateinfo objects representing the available add-on versions onupdatecheckerror() called when the update check fails.
... void onupdatecheckerror( in integer status )
parameters status a value representing the type of failure; see the range of possible values.
FxAccountsProfileClient.jsm
fxaccountsprofileclient fxaccountsprofileclient( object options string serverurl, string token );
parameters serverurl - firefox profile server url.
...
parameters none return value promise resolves: object - successful response from the '/profile' endpoint.
ISO8601DateUtils.jsm
string create( adate );
parameters adate a javascript date object to translate into an iso 8601 format string.
...date parse( adatestring );
parameters adatestring an iso 8601 format date string.
Interfacing with the Add-on Repository
for example: searchfailed: function() { this.shownotification("i have no recommendations for you right now!", "oh noes!", null); }, here, we call a shownotification() method with some
parameters that we'll look at shortly when we get to our shownotification() method below.
... for example: searchsucceeded: function(addons, addoncount, totalresults) { var num = math.floor(math.random() * addoncount); this.shownotification("would you like to try the " + addons[num].name + " addon?", "install", addons[num].install); }, this routine randomly selects one of the returned add-ons, then calls the previously mentioned shownotification() routine, passing in as
parameters a prompt including the name of the returned add-on, a label for the button to show in the notification ("install"), and the addoninstall object that can be used with the add-on manager api to install the add-on.
Deferred
void resolve( avalue );
parameters avalue optional if this value is not a promise, including undefined, it becomes the fulfillment value of the associated promise.
... void reject( areason );
parameters areason optional the rejection reason for the associated promise.
PromiseWorker.jsm
post syntax promise = myworker.post(afunctionname, aargs, aclosure, atransferlist);
parameters afunctionname the name of the function to be called as it appears in the worker file.
... by convention, the last argument may be an object options with some of the following fields: outexecutionduration {number|null} a
parameter to be filled with the duration of the off main thread execution for this call.
Task.jsm
async() simplifies the common pattern of implementing a method via a task, like this simple object with a greet method that has a name
parameter and spawns a task to send a greeting and return its reply: let greeter = { message: "hello, name!", greet: function(name) { return task.spawn((function* () { return yield sendgreeting(this.message.replace(/name/, name)); }).bind(this); }) }; with async(), the method can be declared succinctly: let greeter = { message: "hello, name!", greet: task.async(function* (nam...
... promise spawn( atask );
parameters atask this
parameter accepts different data types: if you specify a generator function, it is called with no arguments to retrieve the associated iterator.
Localization and Plurals
/** * get the correct plural form of a word based on the number * * @
param anum * the number to decide which plural form to use * @
param awords * a semi-colon (;) separated string of words to pick the plural form * @return the appropriate plural form of the word */ string pluralform get(int anum, string awords) here is an example of using this method: // load pluralform and for this example, assume english components.utils.import("resource://gre/mod...
... * * @
param arulenum * the plural rule number to create functions * @return a pair: [function that gets the right plural form, * function that returns the number of plural forms] */ [string pluralform get(int anum, string awords), int numforms numforms()] makegetter(int arulenum) here is an example usage of makegetter: components.utils.import("resource://gre/modules/pluralform.j...
Mozilla DOM Hacking Guide
this is because, if we had a setlocation() method, it would take an nsidomlocation
parameter, and not a url string.
...the three
parameters passed to the macro, as described in the previous section, are the dom object name, the scriptable helper class, and the scriptable flags.
Interval Timing
this chapter describes printervaltime and the functions that allow you to use it for timing purposes: interval time type and constants interval functions interval time type and constants all timed functions in nspr require a
parameter that depicts the amount of time allowed to elapse before the operation is declared failed.
...such
parameters are common in nspr functions such as those used for i/o operations and operations on condition variables.
PL_strcpy
syntax char * pl_strcpy(char *dest, const char *src);
parameters the function has these
parameters: dest pointer to a buffer.
... returns the function returns a pointer to the buffer specified by the dest
parameter.
PR_ASSERT
syntax #include <prlog.h> void pr_assert ( expression );
parameters the macro has this
parameter: expression any valid c language expression that evaluates to true or false.
...the macro converts the expression to a string and passes it to pr_assert, using file and line
parameters from the compile-time environment.
PR_AtomicSet
syntax #include <pratom.h> print32 pr_atomicset( print32 *val, print32 newval);
parameters the function has the following
parameter: val a pointer to the value to be set.
... newval the new value to assign to the val
parameter.
PR_CNotifyAll
syntax #include <prcmon.h> prstatus pr_cnotifyall(void *address);
parameter the function has the following
parameter: address the address of the monitored object.
... pr_failure indicates that the referenced monitor could not be located or that the calling thread was not in the monitor description using the value specified in the address
parameter to find a monitor in the monitor cache, pr_cnotifyall notifies all threads waiting for the monitor's state to change.
PR_Close
syntax #include <prio.h> prstatus pr_close(prfiledesc *fd);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object.
...on successful return, pr_close frees the dynamic memory and other resources identified by the fd
parameter.
PR_FindSymbol
syntax #include <prlink.h> void* pr_findsymbol ( prlibrary *lib, const char *name);
parameters the function has these
parameters: lib a valid reference to a loaded library, as returned by pr_loadlibrary, or null.
...if the lib
parameter is null, all libraries known to the runtime and the main program are searched in an unspecified order.
PR_FindSymbolAndLibrary
syntax #include <prlink.h> void* pr_findsymbolandlibrary ( const char *name, prlibrary **lib);
parameters the function has these
parameters: name the textual representation of the symbol to locate.
...upon return, the location pointed to by the
parameter lib contains a pointer to the library that contains that symbol.
PR_GetHostByAddr
syntax #include <prnetdb.h> prstatus pr_gethostbyaddr( const prnetaddr *hostaddr, char *buf, printn bufsize, prhostent *hostentry);
parameters the function has the following
parameters: hostaddr a pointer to the ip address of host in question.
... bufsize number of bytes in the buf
parameter.
PR_GetHostByName
syntax #include <prnetdb.h> prstatus pr_gethostbyname( const char *hostname, char *buf, printn bufsize, prhostent *hostentry);
parameters the function has the following
parameters: hostname the character string defining the host name of interest.
... bufsize number of bytes in the buf
parameter.
PR_GetIdentitiesLayer
syntax #include <prio.h> prfiledesc* pr_getidentitieslayer( prfiledesc* stack, prdescidentity id);
parameters the function has the following
parameters: stack a pointer to a prfiledesc object that is a layer in a stack of layers.
... description the stack of layers to be searched is specified by the fd
parameter, which is a layer in the stack.
PR_GetProtoByName
syntax #include <prnetdb.h> prstatus pr_getprotobyname( const char* protocolname, char* buffer, print32 bufsize, prprotoent* result);
parameters the function has the following
parameters: protocolname a pointer to the character string of the protocol's name.
... bufsize number of bytes in the buffer
parameter.
PR_GetProtoByNumber
syntax #include <prnetdb.h> prstatus pr_getprotobynumber( print32 protocolnumber, char* buffer, print32 bufsize, prprotoent* result);
parameters the function has the following
parameters: protocolnumber the number assigned to the protocol.
... bufsize number of bytes in the buffer
parameter.
PR_GetSocketOption
syntax #include <prio.h> prstatus pr_getsocketoption( prfiledesc *fd, prsocketoptiondata *data);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing the socket whose options are to be retrieved.
...on input, the option field of this structure must be set to indicate which socket option to retrieve for the socket represented by the fd
parameter.
PR_GetSpecialFD
syntax #include <prio.h> prfiledesc* pr_getspecialfd(prspecialfd id);
parameter the function has the following
parameter: id a pointer to an enumerator of type prspecialfd, indicating the type of i/o stream desired: pr_standardinput, pr_standardoutput, or pr_standarderror.
... returns if the id
parameter is valid, pr_getspecialfd returns a file descriptor that represents the corresponding standard i/o stream.
PR_Initialize
syntax #include <prinit.h> printn pr_initialize( prprimordialfn prmain, printn argc, char **argv, pruintn maxptds);
parameters pr_initialize has the following
parameters: prmain the function that becomes the primordial thread's root function.
... maxptds this
parameter is ignored.
PR_IntervalToMicroseconds
syntax #include <prinrval.h> pruint32 pr_intervaltomicroseconds(printervaltime ticks);
parameter ticks the number of platform-dependent intervals to convert.
... returns equivalent in microseconds of the value passed in the ticks
parameter.
PR_IntervalToMilliseconds
syntax #include <prinrval.h> pruint32 pr_intervaltomilliseconds(printervaltime ticks);
parameter ticks the number of platform-dependent intervals to convert.
... returns equivalent in milliseconds of the value passed in the ticks
parameter.
PR_IntervalToSeconds
syntax #include <prinrval.h> pruint32 pr_intervaltoseconds(printervaltime ticks);
parameter ticks the number of platform-dependent intervals to convert.
... returns equivalent in seconds of the value passed in the ticks
parameter.
PR_Listen
syntax #include <prio.h> prstatus pr_listen( prfiledesc *fd, printn backlog);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing a socket that will be used to listen for new connections.
...the maximum size of the queue for pending connections is specified by the backlog
parameter.
PR_MicrosecondsToInterval
syntax #include <prinrval.h> printervaltime pr_microsecondstointerval(pruint32 milli);
parameter the function has the following
parameter: micro the number of microseconds to convert to interval form.
... returns platform-dependent equivalent of the value passed in the micro
parameter.
PR_MillisecondsToInterval
syntax #include <prinrval.h> printervaltime pr_millisecondstointerval(pruint32 milli);
parameter the function has the following
parameter: milli the number of milliseconds to convert to interval form.
... returns platform-dependent equivalent of the value passed in the milli
parameter.
PR_MkDir
syntax #include <prio.h> prstatus pr_mkdir( const char *name, printn mode);
parameters the function has the following
parameters: name the name of the directory to be created.
... caveat: the mode
parameter is currently applicable only on unix platforms.
PR_Poll
syntax #include <prio.h> print32 pr_poll( prpolldesc *pds, printn npds, printervaltime timeout);
parameters the function has the following
parameters: pds a pointer to the first element of an array of prpolldesc structures.
...if this
parameter is zero, pr_poll is equivalent to pr_sleep with a timeout.
PR_PushIOLayer
syntax #include <prio.h> prstatus pr_pushiolayer( prfiledesc *stack, prdescidentity id, prfiledesc *layer);
parameters the function has the following
parameters: stack a pointer to a prfiledesc object representing the stack.
... even if the id
parameter indicates the topmost layer of the stack, the value of the file descriptor describing the original stack will not change.
PR_ReadDir
syntax #include <prio.h> prdirentry* pr_readdir( prdir *dir, prdirflags flags);
parameters the function has the following
parameters: dir a pointer to a prdir object that designates an open directory.
... the flags
parameter is an enum of type prdirflags: typedef enum prdirflags { pr_skip_none = 0x0, pr_skip_dot = 0x1, pr_skip_dot_dot = 0x2, pr_skip_both = 0x3, pr_skip_hidden = 0x4 } prdirflags; the memory associated with the returned prdirentry structure is managed by nspr.
PR_RecvFrom
syntax #include <prio.h> print32 pr_recvfrom( prfiledesc *fd, void *buf, print32 amount, printn flags, prnetaddr *addr, printervaltime timeout);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing a socket.
... flags this obsolete
parameter must always be zero.
PR_SecondsToInterval
syntax #include <prinrval.h> printervaltime pr_secondstointerval(pruint32 seconds);
parameter the function has the following
parameter: seconds the number of seconds to convert to interval form.
... returns platform-dependent equivalent of the value passed in the seconds
parameter.
PR_SendTo
syntax #include <prio.h> print32 pr_sendto( prfiledesc *fd, const void *buf, print32 amount, printn flags, const prnetaddr *addr, printervaltime timeout);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing a socket.
... flags this obsolete
parameter must always be zero.
PR_SetSocketOption
syntax #include <prio.h> prstatus pr_setsocketoption( prfiledesc *fd, prsocketoptiondata *data);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing the socket whose options are to be set.
... description on input, the caller must set both the option and value fields of the prsocketoptiondata object pointed to by the data
parameter.
PR_SetThreadPriority
syntax #include <prthread.h> void pr_setthreadpriority( prthread *thread, prthreadpriority priority);
parameters pr_setthreadpriority has the following
parameters: thread a valid identifier for the thread whose priority you want to set.
...it is preferable for a thread to specify itself in the thread
parameter when it calls pr_setthreadpriority.
PR_Sleep
syntax #include <prthread.h> prstatus pr_sleep(printervaltime ticks);
parameter pr_sleep has the following
parameter: ticks the number of ticks you want the thread to sleep for (see printervaltime).
... returns calling pr_sleep with a
parameter equivalent to pr_interval_no_timeout is an error and results in a pr_failure error.
PR_TransmitFile
syntax #include <prio.h> print32 pr_transmitfile( prfiledesc *networksocket, prfiledesc *sourcefile, const void *headers, print32 hlen, prtransmitfileflags flags, printervaltime timeout);
parameters the function has the following
parameters: networksocket a pointer to a prfiledesc object representing the connected socket to send data over.
... the enumeration prtransmitfileflags, used in the flags
parameter, is defined as follows: typedef enum prtransmitfileflags { pr_transmitfile_keep_open = 0, pr_transmitfile_close_socket = 1 } prtransmitfileflags; ...
PR_Unmap
syntax #include <prio.h> prstatus pr_memunmap( void *addr, pruint32 len);
parameters the function has the following
parameters: addr the starting address of the memory region to be unmapped.
...the
parameter addr is the return value of an earlier call to pr_memmap.
PR_WaitCondVar
syntax #include <prcvar.h> prstatus pr_waitcondvar( prcondvar *cvar, printervaltime timeout);
parameters pr_waitcondvar has the following
parameters: cvar the condition variable on which to wait.
... any value other than pr_interval_no_timeout or pr_interval_no_wait for the timeout
parameter will cause the thread to be rescheduled due to either explicit notification or the expiration of the specified interval.
PR_dtoa
syntax #include <prdtoa.h> prstatus pr_dtoa( prfloat64 d, printn mode, printn ndigits, printn *decpt, printn *sign, char **rve, char *buf, prsize bufsz);
parameters the function has these
parameters: d the floating point number to be converted to a string.
... if the input
parameter d is+infinity,-infinity ornan, *decpt is set to 9999.
PR_htonl
syntax #include <prnetdb.h> pruint32 pr_htonl(pruint32 conversion);
parameter the function has the following
parameter: conversion the 32-bit unsigned integer, in host byte order, to be converted.
... returns the value of the conversion
parameter in network byte order.
PR_htons
syntax #include <prnetdb.h> pruint16 pr_htons(pruint16 conversion);
parameter the function has the following
parameter: conversion the 16-bit unsigned integer, in host byte order, to be converted.
... returns the value of the conversion
parameter in network byte order.
PR_ntohl
syntax #include <prnetdb.h> pruint32 pr_ntohl(pruint32 conversion);
parameter the function has the following
parameter: conversion the 32-bit unsigned integer, in network byte order, to be converted.
... returns the value of the conversion
parameter in host byte order.
PR_ntohs
syntax #include <prnetdb.h> pruint16 pr_ntohs(pruint16 conversion);
parameter the function has the following
parameter: conversion the 16-bit unsigned integer, in network byte order, to be converted.
... returns the value of the conversion
parameter in host byte order.
PR_strtod
syntax #include <prdtoa.h> prfloat64 pr_strtod(const char *s00, char **se);
parameters the function has these
parameters: s00 the input string to be scanned.
...if the
parameter se is not null the location it references is also set.
Function_Name
syntax #include <headers.h> returntype function_name(
paramtype
paramname,
paramtype
paramname, );
parameters
paramname sample: in pointer to a certcertdbhandle representing the certificate database to look in
paramname sample: in pointer to an secitem whose type must be sidercertbuffer and whose data contains a der-encoded certificate description long description of this function, what it does, and why you would use it.
... describe all side-effects on "out"
parameters.
NSS CERTVerify Log
certverifylog all the nss verify functions except, the *verifynow() functions, take a
parameter called 'certverifylog'.
... if you supply the log
parameter, nss will continue chain validation after each error .
NSS 3.22 release notes
these functions take an explicit mechanism and
parameters as arguments rather than inferring it from the key type using pk11_mapsignkeytype().
... the ck_rsa_pkcs_pss mechanism takes a
parameter of type ck_rsa_pkcs_pss_
params.
NSS 3.28.3 release notes
ec
params, which is part of the public api of the freebl/softokn parts of nss, had been changed to include an additional attribute.
... that size increase caused crashes or malfunctioning with applications that use that data structure directly, or indirectly through ecpublickey, ecprivatekey, nsslowkeypublickey, nsslowkeyprivatekey, or potentially other data structures that reference ec
params.
NSS 3.29.1 release notes
ec
params, which is part of the public api of the freebl/softokn parts of nss, had been changed to include an additional attribute.
... that size increase caused crashes or malfunctioning with applications that use that data structure directly, or indirectly through ecpublickey, ecprivatekey, nsslowkeypublickey, nsslowkeyprivatekey, or potentially other data structures that reference ec
params.
NSS 3.38 release notes
parameter -k may be used to specify the id of an existing orphan key.
... when using certutil -o to print the chain for a given certificate nickname, the new
parameter --simple-self-signed may be provided, which can avoid ambiguous output in some scenarios.
NSS 3.47 release notes
have the constructed bit set bug 1583068 - nss 3.47 should pick up fix from bug 1575821 (nspr 4.23) bug 1152625 - support aes hw acceleration on armv8 bug 1549225 - disable dsa signature schemes for tls 1.3 bug 1586947 - pk11_importandreturnprivatekey does not store nickname for ec keys bug 1586456 - unnecessary conditional in pki3hack, pk11load and stanpcertdb bug 1576307 - check mechanism
param and
param length before casting to mechanism-specific structs bug 1577953 - support longer (up to rfc maximum) hkdf outputs bug 1508776 - remove refcounting from sftk_freesession (cve-2019-11756) bug 1494063 - support tls exporter in tstclnt and selfserv bug 1581024 - heap overflow in nss utility "derdump" bug 1582343 - soft token mac verification not constant time bug 1578238 - handle inva...
... bug 1542207 - limit policy check on signature algorithms to known algorithms bug 1560329 - drbg: add continuous self-test on entropy source bug 1579290 - asan builds should disable lsan while building bug 1385061 - build nspr tests with nss make; add gyp
parameters to build/run nspr tests bug 1577359 - build atob and btoa for thunderbird bug 1579036 - confusing error when trying to export non-existent cert with pk12util bug 1578626 - [cid 1453375] ub: decrement nullptr.
NSS Sample Code Sample1
() { if (mservername) pl_strfree(mservername); if (mwrappedenckey) secitem_freeitem(mwrappedenckey, pr_true); if (mwrappedmackey) secitem_freeitem(mwrappedmackey, pr_true); if (menckey) pk11_freesymkey(menckey); if (mmackey) pk11_freesymkey(mmackey); } int server::init() { int rv = 0; seckeyprivatekey *prvkey = 0; seckeypublickey *pubkey = 0; pk11slotinfo *slot = 0; pk11rsagen
params rsa
params; secstatus s; // see if there is already a private key with this name.
... rv = getprivatekey(&prvkey); if (rv == 0 && prvkey) goto done; rv = 0; // these could be
parameters to the init function rsa
params.keysizeinbits = 1024; rsa
params.pe = 65537; slot = pk11_getinternalkeyslot(); if (!slot) { rv = 1; goto done; } prvkey = pk11_generatekeypair(slot, ckm_rsa_pkcs_key_pair_gen, &rsa
params, &pubkey, pr_true, pr_true, 0); if (!prvkey) { rv = 1; goto done; } // set the nickname on the private key so that it // can be found later.
NSS Sample Code sample3
e); context = 0; /* * part 2 - hashing with included secret key */ cout << "part 2 -- hashing with included secret key" << endl; /* initialize data */ memset(data, 0xbc, sizeof data); /* create a key */ key = pk11_keygen(slot, ckm_generic_secret_key_gen, 0, 128, 0); if (!key) { cout << "create key failed" << endl; goto done; } cout << (void *)key << endl; /* create
parameters for crypto context */ /* note:
params must be provided, but may be empty */ secitem no
params; no
params.type = sibuffer; no
params.data = 0; no
params.len = 0; /* create context using the same slot as the key */ // context = pk11_createdigestcontext(sec_oid_md5); context = pk11_createcontextbysymkey(ckm_md5, cka_digest, key, &no
params); if (!context) { cout << "createdigestcon...
...cess) { cout << "digestfinal failed" << endl; goto done; } /* print digest */ printdigest(digest, len); pk11_destroycontext(context, pr_true); context = 0; /* * part 3 - mac (with secret key) */ cout << "part 3 -- mac (with secret key)" << endl; /* initialize data */ memset(data, 0xbc, sizeof data); context = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, key, &no
params); if (!context) { cout << "createcontextbysymkey failed" << endl; goto done; } s = pk11_digestbegin(context); if (s != secsuccess) { cout << "digestbegin failed" << endl; goto done; } s = pk11_digestop(context, data, sizeof data); if (s != secsuccess) { cout << "digestop failed" << endl; goto done; } s = pk11_digestfinal(context, digest, &len, sizeof digest); if (s != secsuccess...
nss tech note1
the offset
parameter specifies where to store the type identifier in the target data .
... subsequent templates specify a custom identifier for each possible component type in the size
parameter .
FC_FindObjectsInit
name fc_findobjectsinit - initialize the
parameters for an object search.
... syntax ck_rv fc_findobjectsinit( ck_session_handle hsession, ck_attribute_ptr ptemplate, ck_ulong uscount );
parameters hsession [in] session handle.
NSPR functions
pr_geterror pr_seterror calendar time nss certificate verification functions take a prtime
parameter that specifies the time instant at which the validity of the certificate should verified.
... pr_now interval time the nspr socket i/o functions pr_recv and pr_send (used by the nss ssl functions) take a printervaltime timeout
parameter.
NSS_Initialize
syntax secstatus nss_initialize(const char *configdir, const char *certprefix, const char *keyprefix, const char *secmodname, pruint32 flags);
parameters nss_initialize has five
parameters: configdir [in] the directory where the certificate, key, and module databases live.
...the flags
parameter is a bitwise or of the following flags: nss_init_readonly - open the databases read only.
NSS tools : crlutil
arg1, arg2: specific to extension type extension
parameters addext uses the range that was set earlier by addcert and will install an extension to every cert entries within the range.
... see "implemented extensions" for more information regarding extensions and their
parameters.
ssltyp.html
syntax #include <prtypes.h> secstatus secitem_freeitem ( secitem *item, prbool freeitem)
parameter this function has the following
parameter: item a pointer to a secitem structure.
... syntax #include <prtypes.h> secstatus secitem_zfreeitem ( secitem *item, prbool freeitem)
parameter this function has the following
parameter: item a pointer to a secitem structure.
NSS_3.12.3_release_notes.html
bug 464406: fix signtool regressions bug 465270: uninitialised value in devutil.c::create_object() bug 465273: dead assignment in devutil.c::nssslotarray_clone() bug 465926: during import of pkcs #12 files bug 466180: ssl_configmpserversidcache with default
parameters fails on {net bug 466194: cert_decodetruststring should take a const char * input trusts string.
... bug 485729: remove lib/freebl/mapfile.solaris bug 485837: vc90.pdb files are output in source directory instead of objdir bug 486060: sec_asn1d_parse_leaf uses argument uninitialized by caller pbe_pk11algidto
param documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation.
NSS tools : crlutil
arg1, arg2: specific to extension type extension
parameters addext uses the range that was set earlier by addcert and will install an extension to every cert entries within the range.
... see "implemented extensions" for more information regarding extensions and their
parameters.
Necko walkthrough
nshttpconnectionmgr::postevent creates an nsconnevent with
params including the handler function, nshttpconnectionmgr::onmsgnewtransaction, and the recently created nshttptransaction.
...the event queue works around to nshttpconnectionmgr::onmsgnewtransaction (with the nshttptransaction passed as a
param - remember the event was posted earlier by initiatetransaction from the main thread).
Scripting Java
being able to view the
parameters and return type of java methods is particularly useful in exploratory programming where we might be investigating a method and are unsure of the
parameter or return types.
...to implement a runnable, we need only define a single method run with no
parameters.
Hacking Tips
external programs such as iongraph, dot, and your png viewer are search into the path, otherwise custom one can either be configured with environment variables (gdb_iongraph, gdb_dot, gdb_pngviewer) before starting gdb, or with gdb
parameters (set iongraph-bin <path>, set dot-bin <path>, set pngviewer-bin <path>) within gdb.
... most of the time, you will want js::gc::black (or you can just use 0) for the 2nd
param to js::debug::getmarkmask.
How to embed the JavaScript engine
run the helloworld executable at the command line: ./helloworld how to call c functions from javascript say the c function is named doit and it would like at least two actual
parameters when called (if the caller supplies fewer, the js engine should ensure that undefined is passed for the missing ones): #define doit_minargs 2 // [spidermonkey 24] use jsbool instead of bool.
... static bool doit(jscontext *cx, unsigned argc, jsval *vp) { js::callargs args = callargsfromvp(argc, vp); /* * look in argv for argc actual
parameters, set *rval to return a * value to the caller.
Invariants
that is, they take a
parameter cx of type jscontext *, and require that cx is in a request on the current thread.
... if it cannot be statically proven that a name always refers to a specific variable (meaning either a
parameter or a variable introduced by var/let/function/const) in the program, then a name op must be emitted.
JS::Add*Root
the name
parameter, if present and non-null, is stored in the jsruntime's root table entry along with rp.
... needs the example for typical usage of the name
parameter.
JS::Compile
script js::mutablehandlescript out
parameter.
... mxr id search for js::compile js::evaluate js::compileoffthread js::compilefunction js_decompilescript bug 771705 bug 1143793 -- removed obj
parameter ...
JS::CreateError
rval js::mutablehandlevalue out
parameter.
... see also mxr id search for js::createerror jsexntype jserrorreport bug 984048 bug 1038238 -- change stack
parameter from js::handlestring to js::handleobject ...
JS::MutableHandle
this is useful for out
params.
... syntax bool somefunction(jscontext *cx, js::mutablehandle<t> out
param) { ...
JSNewResolveOp
objp js::mutablehandleobject out
parameter.
...on success, the callback must set the *objp out
parameter to null if id was not resolved; or non-null, referring to obj or one of its prototypes, if id was resolved; and return js_true.
JSObjectOps.dropProperty
that is, the value that the jsobjectops.lookupproperty hook stored in the *objp out
parameter.
...that is, the value that jsobjectops.lookupproperty hook stored in the *propp out
parameter.
JSObjectOps.getAttributes
attrsp unsigned int * in/out
parameter.
...if prop is non-null, it must come from the *propp out
parameter of a prior jsobjectops.defineproperty or jsobjectops.lookupproperty call.
JSObjectOps.newObjectMap
create a new instance of (a concrete subclass of) jsobjectmap (see jsobj.h), with the nrefs and ops members initialized from the same-named
parameters, and with the nslots and freeslot members initialized according to ops and clasp.
...usually, the nrefs
parameter to jsobjectops.newobjectmap will be 1, to count the ref returned to the caller on success.
JS_updateMallocCounter
maxmallocbytes is initialized with maxbytes
parameter of js_newruntime, and could be configured later by calling js_getgc
parameter with jsgc_max_malloc_bytes.
... see also mxr id search for js_updatemalloccounter changeset 88cfae411a2a js_newruntime js_getgc
parameter bug 517665 ...
SpiderMonkey 1.8
a new gc
parameter, jsgc_stackpool_lifespan, controls how eagerly spidermonkey returns unused memory back to the system.
... countheap, dumpheap, gc
param, gczeal, and stackquota are related to memory management.
TPS Tests
ername and password), you should instead execute: python create_venv.py --keep-config %path% activate the environment source %path%/bin/activate run some tests note that the testfile is not a path, it should only be the filename from services/sync/tests/tps/ runtps --debug --testfile %test_file_name% --binary %firefox_binary_path% additionally, omitting a --testfile
parameter will cause it to run all tps tests listed in services/sync/tests/tps/all_tests.json an example on osx, for running just the test_sync.js testfile against a locally built firefox (where the mozconfig set the objdir to obj-ff-artifact): runtps --debug --testfile test_sync.js --binary obj-ff-artifact/dist/nightly.app/contents/macos/firefox running tps against stage, or dev fxa ...
... a phase is defined by calling the phase function with the name of the phase and a list of actions to perform: phase('phase1', [ [bookmarks.add, bookmarks_initial], [passwords.add, passwords_initial], [history.add, history_initial], [sync, sync_wipe_server], ]); each action is an array, the first member of which is a function reference to call, the other members of which are
parameters to pass to the function.
Secure Development Guidelines
ome an sql instruction and be used to: query data from the database (passwords) insert value into the database (a user account) change application logic based on results returned by the database sql injection: example snprintf(str, sizeof(str), "select * from account where name ='%s'", name); sqlite3_exec(db, str, null, null, null); sql injection: prevention use
parameterized queries insert a marker for every piece of dynamic content so data does not get mixed with sql instructions example: sqlite3_stmt *stmt; char *str = "select * from account where name='?'"; sqlite3_prepare_v2(db, str, strlen(str), &stmt, null); sqlite3_bind_text(stmt, 1, name, strlen(name), sqlite_transient); sqlite3_step(stmt); sqlite3_finalize(p_stmt); writing secure code...
... unlock(locka); unlock(lockb); } writing secure code: good coding practices banned api list badly designed apis can often lead to vulnerabilities it’s too easy to use the api inappropriately for example, consider the libc string handling apis strcpy() performs no bounds checking strncpy() doesn’t always 0-terminate strncat() length
parameter is very confusing banned api list examples of incorrect strncat usage buffer overflow strncat(buffer, string, sizeof(buffer)); off-by-one strncat(buffer, string, sizeof(buffer) – strlen(string)); correct usage strncat(buffer, string, sizeof(buffer) – strlen(string) – 1)); banned api list: recommendations create wrappers or replacements fo...
Using the Places history service
all the
parameters set on the query object will be anded together.
...the
parameters within on query as anded together as in executequery(), then the results of the different queries in the array are ored together.
Creating a Python XPCOM component
just execute this file as a script with the interface name as a
param.
... # _reg_clsid_ = "{a new clsid generated for this object}" # _reg_contractid_ = "the.object.name" def get_value( self ): # result: string pass def set_value( self,
param0 ): # result: void - none # in:
param0: string pass as you can see, the output is valid python code, with basic signatures and useful comments for each of the methods.
An Overview of XPCOM
class nsisupports { public: long queryinterface(const nsiid & uuid, void **result) = 0; long addref(void) = 0; long release(void) = 0; }; the first
parameter of queryinterface is a reference to a class named nsiid, which is a basic encapsulation of the iid.
...you can not have two methods with the same name that take different
parameters, and the workaround - having multiple function names - isn't pretty: void foowithint(in int x); void foowithstring(in string x); void foowithuri(in nsiuri x); however, these shortcomings pale in comparison to the functionality gained by using xpidl.
Component Internals
parameters passed to this startup call allow you to configure some aspects of xpcom, including the customization of location of specific directories.
... xpconnect, for example, provides a component loader that makes the various types, including the interfaces and their
parameters, available to javascript.
Finishing the Component
currently, the weblock implementation of the shouldload method compares the in
parameter with each string in the white list.
...the two nsnull
parameters passed to newuri are used to specify the charset of the string and any base uri to use, respectively.
Components.interfaces
properties of the components.interfaces object are used where xpcom methods expect a
parameter of type nsid.
... this includes nsisupports.queryinterface(), the optional
parameter accepted by nsijscid.getservice(), nsijscid.createinstance() when called from javascript, and nsiclassinfo.getinterfaces().
Components.isSuccessCode
syntax var succeeded = components.issuccesscode(returncode);
parameters returncode the return code (of type nsresult) to be checked.
... note: nsiasyncstreamcopier.init() has changed in gecko 1.9.2, omit last 2 boolean
parameters if you're using gecko 1.9.1 and earlier.
Components.utils.cloneInto
syntax components.utils.cloneinto(obj, targetscope[, options]);
parameters obj : object the object to clone.
... options : object this optional
parameter is an object with the following optional properties: clonefunctions: a boolean value that determines if functions should be cloned.
Components.utils.exportFunction
syntax components.utils.exportfunction(func, targetscope[, options]);
parameters func : function the function to export.
... options : object optional
parameter that supplies additional options.
Components.utils.importGlobalProperties
bject xpcom component atob blob btoa crypto css fetch file nsidomfile indexeddb nodefilter firefox 60 nsidomnodefilter obsolete since gecko 60 rtcidentityprovider textdecoder textencoder url urlsearch
params xmlhttprequest nsixmlhttprequest obsolete since gecko 60 for string/object in table without a minimum firefox version, it is not exactly known since when it was available, however it is guranteed available from firefox 28 and up.
... syntax void components.utils.importglobalproperties([string1, string2, ...]);
parameters [string1, string2, ...] an array of strings.
Components.utils.reportError
it must be called with one
parameter, usually an object which was caught by an exception handler.
... if it is not a javascript error object, the
parameter is converted to a string and reported as a new error.
NS_Realloc
#include "nsxpcom.h" void* ns_realloc( void* aptr, prsize asize );
parameters aptr [in] a pointer to the block of memory to reallocate.
... this pointer must have been previously allocated by the xpcom memory manager, or this
parameter may be null in which case this function behaves like ns_alloc.
amIWebInstaller
ean installaddonsfromwebpage( in astring amimetype, in nsidomwindow awindow, in nsiuri areferer, [array, size_is(ainstallcount)] in wstring auris, [array, size_is(ainstallcount)] in wstring ahashes, [array, size_is(ainstallcount)] in wstring anames, [array, size_is(ainstallcount)] in wstring aicons, in amiinstallcallback acallback, optional in pruint32 ainstallcount optional );
parameters amimetype the mimetype for the add-ons.
...boolean isinstallenabled( in astring amimetype, in nsiuri areferer );
parameters amimetype the mime type for the add-on to be installed.
imgIContainerObserver
void framechanged( in imgirequest arequest, in imgicontainer acontainer, [const] in nsintrect adirtyrect );
parameters arequest the image request for which the change occurred.
... notes the arequest
parameter was added to this method in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9).
jsdIStackFrame
makes eval() use the last object on its 'obj'
param's scope chain as the ecma 'variables object'.
...boolean eval( in astring bytes, in autf8string filename, in unsigned long line, out jsdivalue result );
parameters bytes script to be evaluated.
mozIPlacesAutoComplete
void registeropenpage( in nsiuri auri );
parameters auri the uri to register as an open page.
...void unregisteropenpage( in nsiuri auri );
parameters auri the uri to unregister as an open page.
mozIStorageRow
nsivariant getresultbyindex( in unsigned long aindex );
parameters aindex the zero-based index of the column number whose value is to be returned.
...nsivariant getresultbyname( in autf8string aname );
parameters aname the name of the column whose value is to be returned.
mozIStorageVacuumParticipant
boolean onbeginvacuum();
parameters none.
...void onendvacuum( in boolean asucceeded );
parameters asucceeded true if the vacuum operation was successful, or false if it wasn't successful.
nsIAccessibleRelation
nsiaccessible gettarget( in unsigned long index );
parameters index zero-based index of relation target.
...nsiarray gettargets();
parameters none.
nsIAccessibleStateChangeEvent
methods isenabled() boolean isenabled();
parameters none.
...isextrastate() boolean isextrastate();
parameters none.
nsIAsyncStreamCopier
void asynccopy( in nsirequestobserver aobserver, in nsisupports aobservercontext );
parameters aobserver receives notifications.
...void init( in nsiinputstream asource, in nsioutputstream asink, in nsieventtarget atarget, in boolean asourcebuffered, in boolean asinkbuffered, in unsigned long achunksize, in boolean aclosesource, in boolean aclosesink );
parameters asource contains the data to be copied.
nsIAuthPrompt2
nsicancelable asyncpromptauth( in nsichannel achannel, in nsiauthpromptcallback acallback, in nsisupports acontext, in pruint32 level, in nsiauthinformation authinfo );
parameters achannel the channel that requires authentication.
... boolean promptauth( in nsichannel achannel, in pruint32 level, in nsiauthinformation authinfo );
parameters achannel the channel that requires authentication.
nsIAuthPromptCallback
void onauthavailable( in nsisupports acontext, in nsiauthinformation aauthinfo );
parameters acontext the context as passed to nsiauthprompt2.asyncpromptauth().
...void onauthcancelled( in nsisupports acontext, in boolean usercancel );
parameters acontext the context that was passed to nsiauthprompt2.asyncpromptauth().
nsIAutoCompleteObserver
void onsearchresult( in nsiautocompletesearch search, in nsiautocompleteresult result );
parameters search the search object that processed this search.
...void onupdatesearchresult( in nsiautocompletesearch search, in nsiautocompleteresult result );
parameters search the search object that processed this search.
nsIBoxObject
methods getlookandfeelmetric() obsolete since gecko 1.9 (firefox 3) wstring getlookandfeelmetric( in wstring propertyname );
parameters propertyname return value getproperty() wstring getproperty( in wstring propertyname );
parameters propertyname return value getpropertyassupports() nsisupports getpropertyassupports( in wstring propertyname );
parameters propertyname return value removeproperty() void removeproperty( in wstring propertyname );
parameters propertyname setproperty() void setproperty( ...
... in wstring propertyname, in wstring propertyvalue );
parameters propertyname propertyvalue setpropertyassupports() void setpropertyassupports( in wstring propertyname, in nsisupports value );
parameters propertyname value ...
nsICacheVisitor
boolean visitdevice( in string deviceid, in nsicachedeviceinfo deviceinfo );
parameters deviceid specifies the device being visited.
...boolean visitentry( in string deviceid, in nsicacheentryinfo entryinfo );
parameters deviceid specifies the device being visited.
nsIChannelEventSink
void asynconchannelredirect( in nsichannel oldchannel, in nsichannel newchannel, in unsigned long flags, in nsiasyncverifyredirectcallback callback );
parameters oldchannel the channel that's being redirected.
...void onchannelredirect( in nsichannel oldchannel, in nsichannel newchannel, in unsigned long flags );
parameters oldchannel the channel that's being redirected.
nsICharsetResolver
void notifyresolvedcharset( in acstring charset, in nsisupports closure );
parameters charset the detected charset.
...acstring requestcharset( in nsiwebnavigation awebnavigation, in nsichannel achannel, out boolean awantcharset, out nsisupports aclosure );
parameters awebnavigation the nsiwebnavigation the document is being loaded in.
nsIChromeFrameMessageManager
void loadframescript( in astring aurl, in boolean aallowdelayedload );
parameters aurl the url of the script to load into the frame; this must be an absolute url, but data: urls are supported.
...void removedelayedframescript( in astring aurl );
parameters aurl the url of the script to remove from the list of scripts supporting delayed load.
nsIClipboardHelper
void copystring( in astring astring );
parameters astring the string to copy to the clipboard.
... void copystringtoclipboard( in astring astring, in long aclipboardid );
parameters astring the string to copy to the clipboard.
nsIContentPrefObserver
void oncontentprefremoved( in astring agroup, in astring aname );
parameters agroup the group to which the removed preference belonged; this may be the uri of a web site.
... void oncontentprefset( in astring agroup, in astring aname, in nsivariant avalue );
parameters agroup the group to which the preference belongs; this may be the uri of a web site.
nsIContentViewManager
void getcontentviewsin( in float axpx, in float aypx, in float atopsize, in float arightsize, in float abottomsize, in float aleftsize, out unsigned long alength, optional [retval, array, size_is(alength)] out nsicontentview aresult );
parameters axpx the x coordinate of the anchor point of the rectangle, in css pixels.
... alength optional if specified, on return this
parameter indicates the number of nsicontentview objects returned in the aresult array.
nsIConverterOutputStream
void init( in nsioutputstream aoutstream, in string acharset, in unsigned long abuffersize, in prunichar areplacementcharacter );
parameters aoutstream the underlying output stream to which the converted strings will be written.
...implementations not supporting buffering may ignore this
parameter.
nsICookieManager
void remove( in autf8string ahost, in acstring aname, in autf8string apath, in boolean ablocked, in jsval aoriginattributes );
parameters ahost the host or domain for which the cookie was set.
... void removeall();
parameters none.
nsICookieStorage
void getcookie( in string acookieurl, in voidptr acookiebuffer, in pruint32ref acookiesize );
parameters acookieurl url string to look up cookie with..
... void setcookie( in string acookieurl, in constvoidptr acookiebuffer, in unsigned long acookiesize );
parameters acookieurl url string to look up cookie with..
nsIDOMHTMLTimeRanges
float end( in unsigned long index );
parameters index the index to the time range whose end time is to be returned.
...float start( in unsigned long index );
parameters index the index to the time range whose start time is to be returned.
nsIDOMSerializer
void serializetostream( in nsidomnode root, in nsioutputstream stream, in autf8string charset );
parameters root the root of the subtree to be serialized.
...astring serializetostring( in nsidomnode root );
parameters root the root of the subtree to be serialized.
nsIDOMXPathResult
nsidomnode iteratenext();
parameters none.
...nsidomnode snapshotitem( in unsigned long index );
parameters index the index of the dom node to return.
nsIDOMXULSelectControlElement
selectedindex long selecteditem nsidomxulselectcontrolitemelement value domstring methods appenditem() nsidomxulselectcontrolitemelement appenditem( in domstring label, in domstring value );
parameters label value return value getindexofitem() long getindexofitem( in nsidomxulselectcontrolitemelement item );
parameters item return value getitematindex() nsidomxulselectcontrolitemelement getitematindex( in long index );
parameters index return value insertitemat() nsidomxulselectcontrolitemelement insertitemat( in long index, in domstring label, in domstring value )...
...;
parameters index label value return value removeitemat() nsidomxulselectcontrolitemelement removeitemat( in long index );
parameters index return value ...
getFile
nsifile getfile( in string aname, out boolean apersistent );
parameters aname [in] the symbolic name for a file or directory location.
... xpcom file system aliases apersistent [out] this output
parameter indicates to the caller whether or not the returned location is persistent.
nsIDownloadManagerUI
void getattention();
parameters none.
... void show( in nsiinterfacerequestor awindowcontext, optional in unsigned long aid, optional in short areason optional );
parameters awindowcontext optional the parent window context to show the user interface.
nsIDragDropHandler
void detach();
parameters none.
...void hookupto( in nsidomeventtarget attachpoint, in nsiwebnavigation navigator );
parameters attachpoint the receiver to which to attach drag handlers.
nsIDragSession
void getdata( in nsitransferable atransferable, in unsigned long aitemindex );
parameters atransferable the transferable for the data to be put into.
... boolean isdataflavorsupported( in string adataflavor );
parameters adataflavor a string representing the mime type of the data to be matched, such as "text/unicode".
nsIEditor
[noscript] void init( in nsidomdocument doc, in nsipresshellptr shell, obsolete since gecko 5 in nsicontent aroot, in nsiselectioncontroller aselcon, in unsigned long aflags );
parameters doc the document to observe.
...this
parameter was removed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2).
nsIEditorLogging
void startlogging( in nsifile alogfile );
parameters alogfile the file to which the log should be written.
...void stoplogging();
parameters none.
nsIEventListenerInfo
nsisupports getdebugobject();
parameters none.
...astring tosource();
parameters none.
nsIExternalHelperAppService
boolean applydecodingforextension( in autf8string aextension, in acstring aencodingtype );
parameters aextension the filename extension to check.
...nsistreamlistener docontent( in acstring amimecontenttype, in nsirequest arequest, in nsiinterfacerequestor awindowcontext, in boolean aforcesave );
parameters amimecontenttype the content type of the incoming data.
nsIFactory
(see also nsicomponentmanager.createinstance.) void createinstance( in nsisupports aouter, in nsiidref iid, [retval, iid_is(iid)] out nsqiresult result );
parameters aouter pointer to a component that wishes to be aggregated in the resulting instance.
... void lockfactory( in prbool lock );
parameters lock true to lock the factory, and false to unlock the factory.
nsIFrameLoaderOwner
[noscript, notxpcom] alreadyaddrefed_nsframeloader getframeloader();
parameters none.
...void swapframeloaders( in nsiframeloaderowner aotherowner );
parameters aotherowner the other frame loader owner with which to swap frame loaders.
nsIFrameMessageListener
called to deliver a message to the frame handling process; called with one
parameter, which has the following properties: name the name of the message.
...void receivemessage();
parameters none.
nsIFrameScriptLoader
parameters name type description aurl string url for the script to load.
...
parameters name type description aurl string url for the script to remove.
nsIGSettingsCollection
rd 6.0 / seamonkey 2.3) method overview boolean getboolean(in autf8string key); long getint(in autf8string key); autf8string getstring(in autf8string key); void setboolean(in autf8string key, in boolean value); void setint(in autf8string key, in long value); void setstring(in autf8string key, in autf8string value); methods getboolean() boolean getboolean( in autf8string key );
parameters key return value getint() long getint( in autf8string key );
parameters key return value getstring() autf8string getstring( in autf8string key );
parameters key return value setboolean() void setboolean( in autf8string key, in boolean value );
parameters key value setint() void setint( in autf8string key, in long value );
parameters key value setstring() v...
...oid setstring( in autf8string key, in autf8string value );
parameters key value ...
nsIGlobalHistory
void addpage( in string aurl );
parameters aurl the url to the page.
...boolean isvisited( in string aurl );
parameters aurl the url to the page.
nsIHttpActivityDistributor
void addobserver( in nsihttpactivityobserver aobserver );
parameters aobserver the nsihttpactivityobserver that should receive notifications of http transport activity; this object's nsihttpactivityobserver.observeactivity() method will be called each time activity occurs.
...void removeobserver( in nsihttpactivityobserver aobserver );
parameters aobserver the nsihttpactivityobserver that should no longer receive notifications of http transport activity.
nsIINIParserWriter
void setstring( in autf8string asection, in autf8string akey, in autf8string avalue );
parameters asection the name of the section into which to place the property.
... void writefile( in nsifile ainifile, optional in unsigned long aflags optional );
parameters ainifile optional if specified, this nsifile based object is used as the output file instead of the one specified at initialization time (if any).
nsIJSCID
inherits from: nsijsid last changed in gecko 1.7 method overview nsisupports createinstance(); nsisupports getservice(); methods createinstance() nsisupports createinstance();
parameters none.
... return value getservice() nsisupports getservice();
parameters none.
nsILoadGroup
void addrequest( in nsirequest arequest, in nsisupports acontext );
parameters arequest the request to be added to the load group.
...void removerequest( in nsirequest arequest, in nsisupports acontext, in nsresult astatus );
parameters arequest the request to be removed from the load group.
nsILoginManagerCrypto
astring decrypt( in astring ciphertext );
parameters ciphertext the string to be decrypted.
...astring encrypt( in astring plaintext );
parameters plaintext the string to be encrypted.
nsIMIMEInputStream
void addheader( in string name, in string value );
parameters name name of the header.
...void setdata( in nsiinputstream stream );
parameters stream stream containing the data for the stream.
nsIMarkupDocumentViewer
void scrolltonode( in nsidomnode node );
parameters node the nsidomnode of the node to make visible.
...void sizetocontent();
parameters none.
nsIMenuBoxObject
methods handlekeypress() boolean handlekeypress( in nsidomkeyevent keyevent );
parameters keyevent the key event to handle for the menu.
...openmenu() void openmenu( in boolean openflag );
parameters openflag true to open the menu or false to close it.
nsIMessageBroadcaster
parameters name type description messagename string the name of the message.
...
parameters name type description aindex number the index of the subordinate message manager to retrieve.
nsINavHistoryQueryOptions
methods clone() this method creates a new options item with the same
parameters of this one.
... nsinavhistoryqueryoptions clone();
parameters none.
nsINavHistoryResult
void addobserver( in nsinavhistoryresultobserver aobserver, in boolean aownsweak );
parameters aobserver an object that implements the nsinavhistoryresultobserver interface, which will receive notifications of changes on the result.
...void removeobserver( in nsinavhistoryresultobserver aobserver );
parameters aobserver the observer to remove.
nsINavHistoryResultTreeViewer
nsinavhistoryresultnode nodefortreeindex( in unsigned long aindex );
parameters aindex the row index of the note to return.
...unsigned long treeindexfornode( in nsinavhistoryresultnode anode );
parameters anode the node whose index is to be returned.
nsIPipe
void init( in boolean nonblockinginput, in boolean nonblockingoutput, in unsigned long segmentsize, in unsigned long segmentcount, in nsimemory segmentallocator );
parameters nonblockinginput true specifies non-blocking input stream behavior.
...the default value for this
parameter is a finite value.
nsIPrefLocalizedString
void setdatawithlength( in unsigned long length, [size_is(length)] in wstring data );
parameters length the length of the string.
...wstring tostring();
parameters none.
nsIProcessScriptLoader
for example: let ppmm = services.ppmm.getchildat(1); ppmm.loadprocessscript('data:,dump("foo\n");', true);
parameters name type description aurl string url for the script to load.
...
parameters name type description aurl string url for the script to remove.
nsIRequestObserver
void onstartrequest( in nsirequest arequest, in nsisupports acontext );
parameters arequest request being observed.
...void onstoprequest( in nsirequest arequest, in nsisupports acontext, in nsresult astatuscode );
parameters arequest request being observed.
nsIResumableChannel
void asyncopenat( in nsistreamlistener listener, in nsisupports ctxt, in unsigned long startpos, in nsiresumableentityid entityid );
parameters listener as for asyncopen.
...void resumeat( in unsigned long long startpos, in acstring entityid );
parameters startpos the starting offset, in bytes, to use to download.
nsISSLSocketControl
void proxystartssl();
parameters none.
...void starttls();
parameters none.
nsIScreenManager
nsiscreen screenfornativewidget( in voidptr nativewidget );
parameters nativewidget the native widget for which to obtain an nsiscreen instance.
...nsiscreen screenforrect( in long left, in long top, in long width, in long height );
parameters left the left edge of the rectangle.
nsISelection3
note that the
parameters are case-insensitive.
... void modify( in domstring alter, in domstring direction, in domstring granularity );
parameters alter can be one of { "move", "extend" } "move" collapses the selection to the end of the selection and applies the movement direction/granularity to the collapsed selection.
nsISelectionImageService
void getimage( in short selectionvalue, out imgicontainer container );
parameters selectionvalue container reset() the current image is marked as invalid.
... void reset();
parameters none.
nsIServerSocketListener
void onsocketaccepted( in nsiserversocket aserv, in nsisockettransport atransport );
parameters aserv the server socket.
...void onstoplistening( in nsiserversocket aserv, in nsresult astatus );
parameters aserv the server socket.
nsIStreamConverter
void asyncconvertdata( in string afromtype, in string atotype, in nsistreamlistener alistener, in nsisupports actxt );
parameters afromtype the mime type of the original/raw data.
...nsiinputstream convert( in nsiinputstream afromstream, in string afromtype, in string atotype, in nsisupports actxt );
parameters afromstream the stream representing the original/raw data.
nsIStringBundleOverride
nsisimpleenumerator enumeratekeysinbundle( in autf8string url );
parameters url the url of the original string bundle whose keys are to be overridden.
...astring getstringfromname( in autf8string url, in acstring key );
parameters url the url of the original string bundle whose keys are to be overridden.
nsISyncMessageSender
parameters name type description messagename string the name of the message.
...
parameters name type description messagename string the name of the message.
nsITXTToHTMLConv
void preformathtml( in boolean value );
parameters value true to wrap the resulting html in a <pre> block.
...void settitle( in wstring text );
parameters text title to set for the html document.
nsITaskbarProgress
the currentvalue and maxvalue
parameters are optional and should be supplied when state is one of state_normal, state_error or state_paused.
... void setprogressstate( in nstaskbarprogressstate state, in unsigned long long currentvalue, optional in unsigned long long maxvalue optional );
parameters state one of the state constants.
nsITelemetry
jsval gethistogrambyid( in acstring id );
parameters id unique identifier from toolkit/components/telemetry/histograms.json.
... jsval getkeyedhistogrambyid( in acstring id );
parameters id unique identifier from toolkit/components/telemetry/histograms.json.
nsIThreadInternal
void popeventqueue();
parameters none.
... void pusheventqueue( in nsithreadeventfilter filter );
parameters filter the nsithreadeventfilter to apply to dispatched events, or null to accept all dispatched events.
nsIThreadManager
nsithread getthreadfromprthread( in prthread prthread );
parameters prthread the prthread for which to retrieve the corresponding nsithread.
... nsithread newthread( in unsigned long creationflags );
parameters creationflags reserved for future use.
nsIThreadPoolListener
void onthreadcreated();
parameters none.
...void onthreadshuttingdown();
parameters none.
nsIToolkitProfile
nsiprofilelock lock( out nsiprofileunlocker aunlocker );
parameters aunlocker on error, contains an nsiprofileunlocker object you can use to unlock the profile.
...void remove( in boolean removefiles );
parameters removefiles indicates whether or not the profile directory should be removed when the profile is removed from the profile list.
nsITreeContentView
long getindexofitem( in nsidomelement item );
parameters item a tree row for which to find the row index.
...nsidomelement getitematindex( in long index );
parameters index the row index for which to get the item return value the nsidomelement item.
nsIURLFormatter
astring formaturl( in astring aformat );
parameters aformat unformatted url as a string.
...astring formaturlpref( in astring apref );
parameters apref a string representing the name of the preference from which to fetch the url to format.
nsIUTF8ConverterService
autf8string convertstringtoutf8( in acstring astring, in string acharset, in boolean askipcheck, in boolean aallowsubstitution );
parameters astring a string to ensure its utf8ness.
...autf8string converturispectoutf8( in acstring aspec, in string acharset );
parameters aspec an url-escaped uri spec to ensure its utf8ness.
nsIUUIDGenerator
nsidptr generateuuid();
parameters none.
...void generateuuidinplace( in nsnonconstidptr id );
parameters id an existing nsid pointer where the uuid will be stored.
nsIUpdate
nsiupdatepatch getpatchat( in unsigned long index );
parameters index the index of the patch to retrieve.
...nsidomelement serialize( in nsidomdocument updates );
parameters updates the dom document into which to serialize the update.
nsIUpdateChecker
void checkforupdates( in nsiupdatechecklistener listener, in boolean force );
parameters listener an object implementing nsiupdatechecklistener to be notified of the results of an update check.
...void stopchecking( in unsigned short duration );
parameters duration one of the constants indicating the set of updates to stop.
nsIUpdateManager
nsiupdate getupdateat( in long index );
parameters index an index into the history list for the nsiupdate to retrieve.
...void saveupdates();
parameters none.
nsIWebBrowser
void addwebbrowserlistener( in nsiweakreference alistener, in nsiidref aiid );
parameters alistener the listener to be added.
...void removewebbrowserlistener( in nsiweakreference alistener, in nsiidref aiid );
parameters alistener the listener to be removed.
nsIWebContentHandlerRegistrar
void registerprotocolhandler(in domstring protocol,in domstring uri, in domstring title, in nsidomwindow contentwindow) methods registercontenthandler summary of registercontenthandler void registercontenthandler( in domstring mimetype, in domstring uri, in domstring title, in nsidomwindow contentwindow );
parameters mimetype the desired mime type as a string uri the uri to the handler as a string.
... registerprotocolhandler summary of registerprotocolhandler void registerprotocolhandler( in domstring protocol, in domstring uri, in domstring title, in nsidomwindow contentwindow );
parameters protocol the protocol the site wishes to handle, specified as a string.
nsIWebProgressListener2
void onprogresschange64( in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogress, in long long acurtotalprogress, in long long amaxtotalprogress );
parameters awebprogress the nsiwebprogress instance that fired the notification.
...boolean onrefreshattempted( in nsiwebprogress awebprogress, in nsiuri arefreshuri, in long amillis, in boolean asameuri );
parameters awebprogress the nsiwebprogress instance that fired the notification.
nsIWebappsSupport
void installapplication( in wstring title, in wstring uri, in wstring iconuri, in wstring icondata );
parameters title the user-friendly name of the application.
...boolean isapplicationinstalled( in wstring uri );
parameters uri the uri of the web application.
nsIWifiListener
void onchange( [array, size_is(alen)] in nsiwifiaccesspoint accesspoints, in unsigned long alen );
parameters accesspoints an array of nsiwifiaccesspoint objects representing all currently-available wifi access points.
...void onerror( in long error );
parameters error the nsresult value indicating the error that occurred.
nsIWifiMonitor
void startwatching( in nsiwifilistener alistener );
parameters alistener the nsiwifilistener object to receive notifications when the wifi access point list changes.
...void stopwatching( in nsiwifilistener alistener );
parameters alistener the nsiwifilistener object to stop receiving notifications on.
nsIWorkerScope
void close();
parameters none.
...void postmessage( in domstring amessage, in nsiworkermessageport amessageport optional );
parameters amessage the message to post.
nsIWritablePropertyBag
void deleteproperty( in astring name );
parameters name property to delete.
...void setproperty( in astring name, in nsivariant value );
parameters name property to set the value of.
nsIXULBuilderListener
void didrebuild( in nsixultemplatebuilder abuilder );
parameters abuilder the template builder that has rebuilt the content.
...void willrebuild( in nsixultemplatebuilder abuilder );
parameters abuilder the template builder that rebuilds the content.
nsIXULSortService
void insertcontainernode( in nsirdfcompositedatasource db, in nsrdfsortstate sortstateptr, in nsicontent root, in nsicontent trueparent, in nsicontent container, in nsicontent node, in boolean anotify );
parameters db sortstateptr root trueparent container node anotify sort() sort the contents of the widget containing anode using asortkey as the comparison key, and asorthints as how to sort.
... void sort( in nsidomnode anode, in astring asortkey, in astring asorthints );
parameters anode a node in the xul widget whose children are to be sorted.
XPCOM Interface Reference
allerimgicacheimgicontainerimgicontainerobserverimgidecoderimgidecoderobserverimgiencoderimgiloaderimgirequestinidomutilsjsdistackframemoziasyncfaviconsmoziasynchistorymozicoloranalyzermozijssubscriptloadermozipersonaldictionarymoziplaceinfomoziplacesautocompletemoziregistrymozirepresentativecolorcallbackmozispellcheckingenginemozistorageaggregatefunctionmozistorageasyncstatementmozistoragebinding
paramsmozistoragebinding
paramsarraymozistoragecompletioncallbackmozistorageconnectionmozistorageerrormozistoragefunctionmozistoragependingstatementmozistorageprogresshandlermozistorageresultsetmozistoragerowmozistorageservicemozistoragestatementmozistoragestatementcallbackmozistoragestatement
paramsmozistoragestatementrowmozistoragestatementwrappermozistoragevacuumparticipantmozistoragevaluearraymozitxt...
...andlernsidomwindownsidomwindow2nsidomwindowinternalnsidomwindowutilsnsidomxpathevaluatornsidomxpathexceptionnsidomxpathexpressionnsidomxpathresultnsidomxulcontrolelementnsidomxulelementnsidomxullabeledcontrolelementnsidomxulselectcontrolelementnsidomxulselectcontrolitemelementnsidatasignatureverifiernsidebugnsidebug2nsidevicemotionnsidevicemotiondatansidevicemotionlistenernsidialogcreatornsidialog
paramblocknsidictionarynsidirindexnsidirindexlistenernsidirindexparsernsidirectoryenumeratornsidirectoryiteratornsidirectoryservicensidirectoryserviceprovidernsidirectoryserviceprovider2nsidiskcachestreaminternalnsidispatchsupportnsidocshellnsidocumentloadernsidownloadnsidownloadhistorynsidownloadmanagernsidownloadmanageruinsidownloadobservernsidownloadprogresslistenernsidownloadernsidragdrophandlernsi...
NS_CStringContainerInit
#include "nsstringapi.h" nsresult ns_cstringcontainerinit( nscstringcontainer& astring );
parameters astring [in] a nscstringcontainer instance to be initialized.
... example nscstringcontainer str; if (ns_succeeded(ns_cstringcontainerinit(str))) { // now, |str| can be used with any function taking a nsacstring
parameter.
NS_CStringGetData
#include "nsstringapi.h" pruint32 ns_cstringgetdata( const nsacstring& astring, const char** adata, prbool* aterminated = nsnull );
parameters astring [in] a nsacstring instance to inspect.
... aterminated [out] this optional result
parameter indicates whether or not adata is null-terminated.
NS_CStringSetData
#include "nsstringapi.h" nsresult ns_cstringsetdata( nsacstring& astring, const char* adata, pruint32 adatalength = pr_uint32_max );
parameters astring [in] a nsacstring instance to modify.
... example nscstringcontainer str; rv = ns_cstringcontainerinit(str); if (ns_succeeded(rv)) { rv = ns_cstringsetdata(str, "hello world"); if (ns_succeeded(rv)) { // now, pass |str| to some function expecting a |const nsacstring&|
parameter.
NS_CStringToUTF16
#include "nsstringapi.h" nsresult ns_cstringtoutf16( const nsacstring& asrc, nscstringencoding asrcencoding, nsastring& adest );
parameters asrc [in] a nsacstring instance containing the source string to be converted.
...see nscstringencoding for the set of values that can be passed for this
parameter.
NS_StringContainerInit
#include "nsstringapi.h" nsresult ns_stringcontainerinit( nsstringcontainer& astring );
parameters astring [in] a nsstringcontainer instance to be initialized.
...example code nsstringcontainer str; if (ns_succeeded(ns_stringcontainerinit(str))) { // now, |str| can be used with any function taking a nsastring
parameter.
NS_StringGetData
#include "nsstringapi.h" pruint32 ns_stringgetdata( const nsastring& astring, const prunichar** adata, prbool* aterminated );
parameters astring [in] a nsastring instance to inspect.
...aterminated [out] this optional result
parameter indicates whether or not adata is null-terminated.
NS_StringSetData
#include "nsstringapi.h" nsresult ns_stringsetdata( nsastring& astring, const prunichar* adata, pruint32 adatalength = pr_uint32_max );
parameters astring [in] a nsastring instance to modify.
... example code nsstringcontainer str; rv = ns_stringcontainerinit(str); if (ns_succeeded(rv)) { rv = ns_stringsetdata(str, "hello world"); if (ns_succeeded(rv)) { // now, pass |str| to some function expecting a |const nsastring&|
parameter.
NS_UTF16ToCString
#include "nsstringapi.h" nsresult ns_utf16tocstring( const nsastring& asrc, nscstringencoding adestencoding, nsacstring& adest );
parameters asrc [in] a nsastring instance containing the source utf-16 string to be converted.
...see nscstringencoding for the set of values that can be passed for this
parameter.
Frequently Asked Questions
call a getter that uses a raw xpcom interface pointer as an `in/out'
parameter?
... call a getter that fills in an nsifoo*&
parameter?
XPIDL Syntax
[prop_list] "interface" ident [[inheritance] "{" *(ifacebody) "}"] inheritance = ":" *(scoped_name ",") scoped_name] ifacebody = [type_decl / op_decl /attr_decl / const_decl] ";" / codefrag type_decl = [prop_list] "typedef" type_spec *(ident ",") ident type_decl /= [prop_list] "native" ident [parens] const_decl = "const" type_spec ident "=" expr op_decl = [prop_list] (type_spec / "void")
parameter_decls raise_list
parameter_decls = "(" [*(
param_decl ",")
param_decl] ")"
param_decl = [prop_list] ("in" / "out" / "inout") type_spec ident attr_decl = [prop_list] ["readonly"] "attribute" type_spec *(ident ",") ident ; descending order of precedence expr /= expr ("|" / "^" / "&") expr ; unequal precedence "|" is lowest expr /= expr ("<<" / ">>") expr expr /= expr ("+" / "-") expr e...
...dentifier ";" native = [attributes] "native" identifier "(" nativeid ")" interface = [attributes] "interface" identifier" [ifacebase] [ifacebody] ";" ifacebase = ":" identifier ifacebody = "{" *(member) "}" member = cdata / "const" identifier identifier "=" number ";" member /= [attributes] ["readonly"] "attribute" identifier identifer ";" member /= [attributes] identifier identifier "("
paramlist ")" raises ";"
paramlist = [
param *(","
param)] raises = ["raises" "(" identifier *("," identifier) ")"] attributes = "[" attribute *("," attribute) "]" attribute = (identifier / const) ["(" (identifier / iid) ")"]
param = [attributes] ("in" / "out" / "inout") identifier identifier number = number / identifier number /= "(" number ")" number /= "-" number number /= number ("+" / "-...
Address Book examples
} registerloadlistener(foo); save listeners are functions that take the same
parameters, and can be registered with: registersavelistener(foo); load and save listeners can be unregistered using unregisterloadlistener(foo) and unregistersavelistener(foo), respectively.
... the "mydomain" and "addrbook" behaviours can be changed by passing an identity key (see nsimsgidentity.key) via an attribute autocompletesearch
param on the textbox element.
Using C struct and pointers
the first
parameter of this method is the name of the type, which corresponds to the name of the c struct.
... the second
parameter is an array of field descriptors.
Flash Activation: Browser Comparison - Plugins
resizing var plugin = document.getelementbyid('myplugin'); plugin.height = 0; plugin.width = 0; plugin.callpluginmethod(); } the html, by default, specifies the flash object to be a size that makes it visible, like this: <!-- give the plugin an initial size so it is visible --> <object type="application/x-shockwave-flash" data="myapp.swf" id="myplugin" width="300" height="300"> <
param name="callback" value="plugincreated()"> </object> the callback
parameter defined in the html can be called in flash using its flash.external.externalinterface api.
... first, set your up your html with a callback that calls the javascript function plugincreated(), like this: <object type="application/x-my-plugin" data="somedata.mytype" id="myplugin"> <
param name="callback" value="plugincreated()"> </object> the plugincreated() function is then responsible for the setup of your script and any calls back into the plugin that you need to make: function plugincreated() { document.getelementbyid('myplugin').callpluginmethod(); } ...
Deprecated tools - Firefox Developer Tools
it was possible to edit the audio
param properties for each node in the graph.
... some non-audio
param properties, like an oscillatornode's type property, were displayed and editable as well.
Network request details - Firefox Developer Tools
the tabs at the top of this pane enable you to switch between the following pages: headers messages (only for websocket items) cookies
params response cache timings security (only for secure pages) stack trace (only when the request has a stack trace, e.g.
...
params tab this tab displays the get
parameters and post data of a request: response tab the complete content of the response.
Network request list - Firefox Developer Tools
edit and resend opens an editor enabling you to edit the request's method, url,
parameters, and headers, and resend the request.
... copy as curl the command may include the following options: -x [method] if the method is not get or post --data for url encoded request
parameters --data-binary for multipart request
parameters --http/version if the http version is not 1.1 -i if the method is head -h one for each request header.
Taking screenshots - Firefox Developer Tools
the command has the following optional
parameters: command type description --clipboard boolean when present, this
parameter will cause the screenshot to be copied to the clipboard.
...with this
parameter, even the parts of the webpage which are outside the current bounds of the window will be included in the screenshot.
Tips - Firefox Developer Tools
if no filename is included, the file name will be in this format: screen shot date at time.png the --fullpage
parameter is optional.
...see web console helpers for all
parameters.
AnalyserNode.getByteFrequencyData() - Web APIs
syntax var audioctx = new audiocontext(); var analyser = audioctx.createanalyser(); var dataarray = new uint8array(analyser.frequencybincount); // uint8array should be the same length as the frequencybincount void analyser.getbytefrequencydata(dataarray); // fill the uint8array with data returned from getbytefrequencydata()
parameters array the uint8array that the frequency domain data will be copied to.
...sctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth + 1; } }; draw();
parameters array the uint8array that the frequency domain data will be copied to.
AnalyserNode.getFloatTimeDomainData() - Web APIs
syntax var audioctx = new audiocontext(); var analyser = audioctx.createanalyser(); var dataarray = new float32array(analyser.fftsize); // float32array needs to be the same length as the fftsize analyser.getfloattimedomaindata(dataarray); // fill the float32array with data returned from getfloattimedomaindata()
parameters array the float32array that the time domain data will be copied to.
... canvasctx.beginpath(); var slicewidth = width * 1.0 / bufferlength; var x = 0; for(var i = 0; i < bufferlength; i++) { var v = dataarray[i] * 200.0; var y = height/2 + v; if(i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw();
parameters array the float32array that the time domain data will be copied to.
AudioBuffer.copyFromChannel() - Web APIs
syntax myarraybuffer.copyfromchannel(destination, channelnumber, startinchannel);
parameters destination a float32array to copy the channel's samples to.
... exceptions indexsizeerror one of the input
parameters has a value that is outside the accepted range: the value of channelnumber specifies a channel number which doesn't exist (that is, it's greater than or equal to the value of numberofchannels on the channel).
AudioBuffer.getChannelData() - Web APIs
the getchanneldata() method of the audiobuffer interface returns a float32array containing the pcm data associated with the channel, defined by the channel
parameter (with 0 representing the first channel).
... syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); var nowbuffering = myarraybuffer.getchanneldata(channel);
parameters channel the channel property is an index representing the particular channel to get data for.
AudioBufferSourceNode.playbackRate - Web APIs
the playbackrate property of the audiobuffersourcenode interface is a k-rate audio
param that defines the speed at which the audio asset will be played.
... syntax audiobuffersourcenode.playbackrate.value = playbackrateproportion; value an audio
param whose value is a floating-point value indicating the playback rate of the audio as a decimal proportion of the original sampling rate.
AudioBufferSourceNode - Web APIs
audiobuffersourcenode.detune is a k-rate audio
param representing detuning of playback in cents.
... audiobuffersourcenode.playbackrate an a-rate audio
param that defines the speed factor at which the audio asset will be played, where a value of 1.0 is the sound's natural sampling rate.
AudioListener.setPosition() - Web APIs
the three
parameters x, y and z are unitless and describe the listener's position in 3d space according to the right-hand cartesian coordinate system.
...
parameters x the x position of the listener in 3d space.
AudioNode - Web APIs
: -25, mindecibels: -60, smoothingtimeconstant: 0.5, }); // factory method const analysernode = audioctx.createanalyser(); analysernode.fftsize = 2048; analysernode.maxdecibels = -25; analysernode.mindecibels = -60; analysernode.smoothingtimeconstant = 0.5; you are free to use either constructors or factory methods, or mix both, however there are advantages to using the constructors: all
parameters can be set during construction time and don't need to be set individually.
... audionode.connect() allows us to connect the output of this node to be input into another node, either as audio data or as the value of an audio
param.
AudioProcessingEvent - Web APIs
the number of channels is defined as a
parameter, numberofinputchannels, of the factory method audiocontext.createscriptprocessor().
...the number of channels is defined as a
parameter, numberofoutputchannels, of the factory method audiocontext.createscriptprocessor().
AudioScheduledSourceNode.start() - Web APIs
syntax audioscheduledsourcenode.start([when [, offset [, duration]]]);
parameters when optional the time, in seconds, at which the sound should begin to play.
...a value of 0 (or omitting the when
parameter entirely) causes the sound to start playback immediately.
AudioScheduledSourceNode.stop() - Web APIs
syntax audioscheduledsourcenode.stop([when]);
parameters when optional the time, in seconds, at which the sound should stop playing.
...omitting this
parameter, specifying a value of 0, or passing a negative value causes the sound to stop playback immediately.
AudioWorkletNode() - Web APIs
syntax var node = new audioworkletnode(context, name); var node = new audioworkletnode(context, name, options);
parameters context the baseaudiocontext instance this node will be associated with.
...
parameterdata optional an object containing the initial values of custom audio
param objects on this node (in its
parameters property), with key being the name of a custom
parameter and value being its initial value.
AuthenticatorAttestationResponse.getTransports() - Web APIs
syntaxe arrtransports = authenticatorattestationresponse.gettransports()
parameters none.
... examples var publickey = { challenge: /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16), name: "jdoe@example.com", displayname: "john doe" }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var transports = newcredentialinfo.response.gettransports(); console.table(transports); // may be something like ["internal", "nfc", "usb"] }).catch(function (err) { console.error(err); }); specifications specification st...
Background Tasks API - Web APIs
that function, enqueuetask(), looks like this: function enqueuetask(taskhandler, taskdata) { tasklist.push({ handler: taskhandler, data: taskdata }); totaltaskcount++; if (!taskhandle) { taskhandle = requestidlecallback(runtaskqueue, { timeout: 1000 }); } schedulestatusrefresh(); } enqueuetask() accepts as input two
parameters: taskhandler is a function which will be called to handle the task.
... taskdata is an object which is passed into the task handler as an input
parameter, to allow the task to receive custom data.
BaseAudioContext.createBuffer() - Web APIs
syntax var buffer = baseaudiocontext.createbuffer(numofchannels, length, samplerate);
parameters note: for an in-depth explanation of how audio buffers work, and what these
parameters mean, read audio buffers: frames, samples and channels from our basic concepts guide.
... examples first, a couple of simple trivial examples, to help explain how the
parameters are used: var audioctx = new audiocontext(); var buffer = audioctx.createbuffer(2, 22050, 44100); if you use this call, you will get a stereo buffer (two channels), that, when played back on an audiocontext running at 44100hz (very common, most normal sound cards run at this rate), will last for 0.5 seconds: 22050 frames / 44100hz = 0.5 seconds.
BaseAudioContext.createChannelMerger() - Web APIs
syntax baseaudiocontext.createchannelmerger(numberofinputs);
parameters numberofinputs the number of channels in the input audio streams, which the output stream will contain; the default is 6 if this
parameter is not specified.
...to use them, you need to use the second and third
parameters of the audionode.connect(audionode) method, which allow you to specify both the index of the channel to connect from and the index of the channel to connect to.
BaseAudioContext.createChannelSplitter() - Web APIs
syntax baseaudiocontext.createchannelsplitter(numberofoutputs);
parameters numberofoutputs the number of channels in the input audio stream that you want to output separately; the default is 6 if this
parameter is not specified.
...to use them, you need to use the second and third
parameters of the audionode.connect(audionode) method, which allow you to specify the index of the channel to connect from and the index of the channel to connect to.
Blob() - Web APIs
the content of the blob consists of the concatenation of the values given in the
parameter array.
... syntax var newblob = new blob(array, options);
parameters array an array of arraybuffer, arraybufferview, blob, usvstring objects, or a mix of any of such objects, that will be put inside the blob.
Bluetooth.requestDevice() - Web APIs
parameters options optional an object that sets options for the device request.
...this filter consists of an array of bluetoothserviceuuids, a name
parameter, and a nameprefix
parameter.
BroadcastChannel.onmessage - Web APIs
syntax channel.onmessage = function; values function is the name of a user-defined function, without the () suffix or any
parameters, or an anonymous function declaration, such as function(event) {...}.
... an event handler always has one single
parameter, containing the event, here of type messageevent.
CSS.escape() - Web APIs
the css.escape() static method returns a cssomstring containing the escaped string passed as
parameter, mostly for use as part of a css selector.
... syntax escapedstr = css.escape(str);
parameters str the cssomstring to be escaped.
CSS.supports() - Web APIs
syntax css.supports(propertyname, value); css.supports(supportcondition);
parameters there are two distinct sets of
parameters.
... the second syntax takes one
parameter matching the condition of @supports: supportcondition a domstring containing the condition to check.
CSS - Web APIs
css.supports() returns a boolean indicating if the pair property-value, or the condition, given in
parameter is supported.
... css factory functions can be used to return a new cssunitvalue with a value of the
parameter number of the units of the name of the factory function method used.
CSSKeyframesRule - Web APIs
the
parameter is a domstring containing a keyframe in the same format as an entry of a @keyframes at-rule.
...the
parameter is the index of the keyframe to be deleted, expressed as a domstring resolving as a number between 0% and 100%.
CSSStyleDeclaration.setProperty() - Web APIs
syntax style.setproperty(propertyname, value, priority);
parameters propertyname is a domstring representing the css property name (hyphen case) to be modified.
... note: value must not contain "!important" -- that should be set using the priority
parameter.
CanvasRenderingContext2D.arcTo() - Web APIs
the arc is automatically connected to the path's latest point with a straight line, if necessary for the specified
parameters.
... syntax void ctx.arcto(x1, y1, x2, y2, radius);
parameters x1 the x-axis coordinate of the first control point.
CanvasRenderingContext2D.createLinearGradient() - Web APIs
syntax canvasgradient ctx.createlineargradient(x0, y0, x1, y1); the createlineargradient() method is specified by four
parameters defining the start and end points of the gradient line.
...
parameters x0 the x-axis coordinate of the start point.
CanvasRenderingContext2D.createRadialGradient() - Web APIs
syntax canvasgradient ctx.createradialgradient(x0, y0, r0, x1, y1, r1); the createradialgradient() method is specified by six
parameters, three defining the gradient's start circle, and three defining the end circle.
...
parameters x0 the x-axis coordinate of the start circle.
CanvasRenderingContext2D.fillText() - Web APIs
an optional
parameter allows specifying a maximum width for the rendered text, which the user agent will achieve by condensing the text or by using a lower font size.
... syntax canvasrenderingcontext2d.filltext(text, x, y [, maxwidth]);
parameters text a domstring specifying the text string to render into the context.
CanvasRenderingContext2D.setLineDash() - Web APIs
syntax ctx.setlinedash(segments);
parameters segments an array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units).
...it receives a pattern array as its only
parameter.
CanvasRenderingContext2D.strokeText() - Web APIs
an optional
parameter allows specifying a maximum width for the rendered text, which the user agent will achieve by condensing the text or by using a lower font size.
... syntax canvasrenderingcontext2d.stroketext(text, x, y [, maxwidth]);
parameters text a domstring specifying the text string to render into the context.
CanvasRenderingContext2D - Web APIs
gradients and patterns canvasrenderingcontext2d.createlineargradient() creates a linear gradient along the line given by the coordinates represented by the
parameters.
... canvasrenderingcontext2d.createradialgradient() creates a radial gradient given by the coordinates of the two circles represented by the
parameters.
Pixel manipulation with canvas - Web APIs
pixel.data; var rgba = 'rgba(' + data[0] + ', ' + data[1] + ', ' + data[2] + ', ' + (data[3] / 255) + ')'; color.style.background = rgba; color.textcontent = rgba; } canvas.addeventlistener('mousemove', pick); painting pixel data into a context you can use the putimagedata() method to paint pixel data into a context: ctx.putimagedata(myimagedata, dx, dy); the dx and dy
parameters indicate the device coordinates within the context at which to paint the top left corner of the pixel data you wish to draw.
...it returns a data uri containing a representation of the image in the format specified by the type
parameter (defaults to png).
ChannelMergerNode() - Web APIs
syntax var mynode = new channelmergernode(context, options);
parameters context a baseaudiocontext representing the audio context you want the node to be associated with.
... options optional a channelmergeroptions dictionary object defining the properties you want the channelmergernode to have (also inherits
parameters from the audionodeoptions dictionary): numberofinputs: a number defining the number of inputs the channelmergernode should have.
ChannelMergerNode - Web APIs
if channelmergernode has one single output, but as many inputs as there are channels to merge; the number of inputs is defined as a
parameter of its constructor and the call to audiocontext.createchannelmerger.
...to use them, you need to use the second and third
parameters of the audionode.connect(audionode) method, which allow you to specify both the index of the channel to connect from and the index of the channel to connect to.
ChannelSplitterNode - Web APIs
if your channelsplitternode always has one single input, the amount of outputs is defined by a
parameter on its constructor and the call to audiocontext.createchannelsplitter().
...to use them, you need to use the second and third
parameters of the audionode.connect(audionode) method, which allow you to specify the index of the channel to connect from and the index of the channel to connect to.
Clients.matchAll() - Web APIs
include the options
parameter to return all service worker clients whose origin is the same as the associated service worker's origin.
... syntax self.clients.matchall(options).then(function(clients) { // do something with your clients list });
parameters options optional an options object allowing you to set options for the matching operation.
ClipboardItem.getType() - Web APIs
syntax var blob = clipboarditem.gettype(type);
parameters type a valid mime type.
... typeerror no
parameter is specified or the type is not that of the clipboarditem.
Console.profileEnd() - Web APIs
syntax console.profileend(profilename);
parameters profilename the name to give the profile.
... this
parameter is optional.
ConstantSourceNode() - Web APIs
syntax var constantsourcenode = new constantsourcenode(context, options);
parameters context an audiocontext representing the audio context you want the node to be associated with.
... options a constantsourceoptions dictionary object defining the properties you want the constantsourcenode to have: offset: a read-only audio
param specifying the constant value generated by the source.
ConstrainDOMString - Web APIs
it allows you to specify one or more exact string values from which one must be the
parameter's value, or a set of ideal values which should be used if possible.
... candidate recommendation initial definition technically, constraindomstring is actually based on an intermediary dictionary named constraindomstring
parameters, which adds exact and ideal to domstring.
Crypto.getRandomValues() - Web APIs
the array given as the
parameter is filled with random numbers (random in its cryptographic meaning).
... syntax typedarray = cryptoobj.getrandomvalues(typedarray);
parameters typedarray an integer-based typedarray, that is an int8array, a uint8array, an int16array, a uint16array, an int32array, or a uint32array.
DOMTokenList.forEach() - Web APIs
the foreach() method of the domtokenlist interface calls the callback given in
parameter once for each value pair in the list, in insertion order.
... syntax tokenlist.foreach(callback [, thisarg]);
parameters callback function to execute for each element, eventually taking three arguments: currentvalue the current element being processed in the array.
DataTransfer.clearData() - Web APIs
syntax datatransfer.cleardata([format]);
parameters format optional a string which specifies the type of data to remove.
... if this
parameter is an empty string or is not provided, the data for all types is removed.
DataTransferItem.getAsString() - Web APIs
syntax datatransferitem.getasstring(callback);
parameters callback a callback function that has access to the data transfer item's string data.
... return value undefined callback the callback
parameter is a callback function which accepts one
parameter: domstring the drag data item's string data.
DataTransferItem.webkitGetAsEntry() - Web APIs
syntax datatransferitem.webkitgetasentry();
parameters none.
...this function takes as input a filesystementry representing an entry in the file system to be scanned and processed (the item
parameter), and an element into which to insert the list of contents (the container
parameter).
DataTransferItemList.add() - Web APIs
syntax datatransferitem = datatransferitemlist.add(data, type); datatransferitem = datatransferitemlist.add(file);
parameters data a string representing the drag item's data.
... exceptions notsupportederror a string data
parameter was provided, and the list already contains an item whose kind is "plain unicode string" and whose type is equal to the specified type
parameter.
DedicatedWorkerGlobalScope.postMessage() - Web APIs
this accepts a single
parameter, which is the data to send to the worker.
... syntax postmessage(amessage, transferlist);
parameters amessage the object to deliver to the main thread; this will be in the data field in the event delivered to the worker.onmessage handler.
DeprecationReportBody - Web APIs
the report details are displayed via the displayreports() fuction, which takes the observer callback's reports
parameter as its
parameter: function displayreports(reports) { const outputelem = document.queryselector('.output'); const list = document.createelement('ul'); outputelem.appendchild(list); for(let i = 0; i < reports.length; i++) { let listitem = document.createelement('li'); let textnode = document.createtextnode('report ' + (i + 1) + ', type: ' + reports[i].type); listitem.appen...
...hild(textnode); let innerlist = document.createelement('ul'); listitem.appendchild(innerlist); list.appendchild(listitem); for (let key in reports[i].body) { let innerlistitem = document.createelement('li'); let keyvalue = reports[i].body[key]; innerlistitem.textcontent = key + ': ' + keyvalue; innerlist.appendchild(innerlistitem); } } } the reports
parameter contains an array of all the reports in the observer's report queue.
Document.createElementNS() - Web APIs
syntax var element = document.createelementns(namespaceuri, qualifiedname[, options]);
parameters namespaceuri a string that specifies the namespace uri to associate with the element.
...see extending native html elements for more information on how to use this
parameter.
Document.createProcessingInstruction() - Web APIs
syntax pinode = document.createprocessinginstruction(target, data)
parameters pinode is the resulting processinginstruction node.
... obsolete added more explicit definition of how the data
parameter is validated.
Document.createTouchList() - Web APIs
syntax var list = documenttouch.createtouchlist([touch1 [, touch2 [, ...]]]);
parameters touches zero or more touch objects.
... return value list a touchlist object containing the touch objects specified by the touches
parameter.
Document.enableStyleSheetsForSet() - Web APIs
syntax document.enablestylesheetsforset(name);
parameters name the name of the style sheets to enable.
...specify an empty string for the name
parameter to disable all alternate and preferred style sheets (but not the persistent style sheets; that is, those with no title attribute).
Document.getElementById() - Web APIs
syntax var element = document.getelementbyid(id);
parameters id the id of the element to locate.
...note that the id
parameter is case-sensitive, so document.getelementbyid("main") will return null instead of the element <div id="main"> because "m" and "m" are different for the purposes of this method.
Document.getElementsByTagNameNS() - Web APIs
note: currently
parameters in this method are case-sensitive, but they were case-insensitive in firefox 3.5 and before.
... example in the following example getelementsbytagnamens starts from a particular parent element, and searches topdown recursively through the dom from that parent element, looking for child elements matching the tag name
parameter.
Document.open() - Web APIs
syntax document.open();
parameters none.
...this is no longer the case.document non-spec'ed
parameters to document.open gecko-specific notes starting with gecko 1.9, this method is subject to the same same-origin policy as other properties, and does not work if doing so would change the document's origin.
DocumentFragment.querySelector() - Web APIs
if the selectors specified in
parameter are invalid a domexception with a syntax_err value is raised.
... syntax element = documentfragment.queryselector(selectors);
parameters selectors is a domstring containing one or more css selectors separated by commas.
DocumentFragment.querySelectorAll() - Web APIs
if the selectors specified in
parameter are invalid a domexception with a syntax_err value is raised.
... syntax elementlist = documentfragment.queryselectorall(selectors);
parameters selectors is a domstring containing one or more css selectors separated by commas.
DocumentOrShadowRoot.elementFromPoint() - Web APIs
syntax const element = document.elementfrompoint(x, y)
parameters x the horizontal coordinate of a point, relative to the left edge of the current viewport.
... javascript function changecolor(newcolor) { elem = document.elementfrompoint(2, 2); elem.style.color = newcolor; } the changecolor() method simply obtains the element located at the specified point, then sets that element's current foreground color property to the color specified by the newcolor
parameter.
EXT_disjoint_timer_query.getQueryObjectEXT() - Web APIs
syntax any ext.getqueryobjectext(query, pname);
parameters query a webglquery object from which to return information.
... ext.endqueryext(ext.time_elapsed_ext); // at some point in the future, after returning control to the browser var available = ext.getqueryobjectext(query, ext.query_result_available_ext); var disjoint = gl.get
parameter(ext.gpu_disjoint_ext); if (available && !disjoint) { // see how much time the rendering of the object took in nanoseconds.
Element.scroll() - Web APIs
syntax element.scroll(x-coord, y-coord) element.scroll(options)
parameters calling with coordinates x-coord the pixel along the horizontal axis of the element that you want displayed in the upper left.
... 45chrome android full support 45firefox android full support 36opera android full support 32safari ios no support nosamsung internet android full support 5.0scrolltooptions
parameterchrome full support 45edge full support 79firefox full support yesie no support noopera full support 32safari no support noweb...
Element.scrollTo() - Web APIs
syntax element.scrollto(x-coord, y-coord) element.scrollto(options)
parameters x-coord is the pixel along the horizontal axis of the element that you want displayed in the upper left.
... 45chrome android full support 45firefox android full support 36opera android full support 32safari ios no support nosamsung internet android full support 5.0scrolltooptions
parameterchrome full support 45edge full support 79firefox full support yesie no support noopera full support 32safari no support noweb...
Element - Web APIs
element.closest() returns the element which is the closest ancestor of the current element (or the current element itself) which matches the selectors given in
parameter.
... element.getelementsbyclassname() returns a live htmlcollection that contains all descendants of the current element that possess the list of classes given in the
parameter.
ErrorEvent - Web APIs
constructor errorevent() creates an errorevent event with the given
parameters.
... living standard added the error property and the 5th
parameter to the constructor.
ExtendableMessageEvent() - Web APIs
syntax var extendablemessageevent = new extendablemessageevent(type, init);
parameters type a domstring that defines the type of the message event being created.
... init optional an initialisation object, which should contain the following
parameters: data: the event's data — this can be any data type.
FileEntrySync - Web APIs
void createwriter ( ) raises (fileexception);
parameter none.
... void file ( ) raises (fileexception);
parameter none.
FileReader.readAsText() - Web APIs
syntax instanceoffilereader.readastext(blob[, encoding]);
parameters blob the blob or file from which to read.
...by default, utf-8 is assumed if this
parameter is not specified.
FileReaderSync.readAsText() - Web APIs
syntax readastext(file); readastext(blob); readastext(file, encoding); readastext(blob, encoding);
parameters blob the dom file or blob to read.
... encoding the optional
parameter specifies encoding to be used (e.g., iso-8859-1 or utf-8).
FileSystemEntry.toURL() - Web APIs
syntax filesystementry.tourl([mimetype]);
parameters mimetype optional an optional string specifying the mime type to use when interpreting the file.
...if this
parameter is omitted, the user agent uses its standard algorithms to identify the file.
FontFaceSet.load() - Web APIs
the load() method of the fontfaceset forces all the fonts given in
parameters to be loaded.
...
parameters font: a font specification using the css value syntax, e.g.
Using FormData Objects - Web APIs
you can also append a file or blob directly to the formdata object, like this: data.append("myfile", myblob, "filename.txt"); when using the append() method it is possible to use the third optional
parameter to pass a filename inside the content-disposition header that is sent to the server.
... when no filename is specified (or the
parameter isn't supported), the name "blob" is used.
FormData.append() - Web APIs
syntax there are two versions of this method: a two and a three
parameter version: formdata.append(name, value); formdata.append(name, value, filename);
parameters name the name of the field whose data is contained in value.
... filename optional the filename reported to the server (a usvstring), when a blob or file is passed as the second
parameter.
FormData.getAll() - Web APIs
syntax formdata.getall(name);
parameters name a usvstring representing the name of the key you want to retrieve.
... returns an array of formdataentryvalues whose key matches the value passed in the name
parameter.
FormData.set() - Web APIs
syntax there are two versions of this method: a two and a three
parameter version: formdata.set(name, value); formdata.set(name, value, filename);
parameters name the name of the field whose data is contained in value.
... filename optional the filename reported to the server (a usvstring), when a blob or file is passed as the second
parameter.
GainNode() - Web APIs
syntax var gainnode = new gainnode(context, options)
parameters inherits
parameters from the audionodeoptions dictionary.
...this
parameter is a-rate and it's nominal range is (-∞,+∞).
Geolocation.getCurrentPosition() - Web APIs
syntax navigator.geolocation.getcurrentposition(success[, error[, [options]])
parameters success a callback function that takes a geolocationposition object as its sole input
parameter.
... error optional an optional callback function that takes a geolocationpositionerror object as its sole input
parameter.
Geolocation.watchPosition() - Web APIs
syntax navigator.geolocation.watchposition(success[, error[, options]])
parameters success a callback function that takes a geolocationposition object as an input
parameter.
... error optional an optional callback function that takes a geolocationpositionerror object as an input
parameter.
HTMLCanvasElement.toBlob() - Web APIs
syntax canvas.toblob(callback, mimetype, qualityargument);
parameters callback a callback function with the resulting blob object as a single argument.
...ocument.getelementbyid('canvas'); canvas.toblob(function(blob) { var newimg = document.createelement('img'), url = url.createobjecturl(blob); newimg.onload = function() { // no longer need to read the blob so it's revoked url.revokeobjecturl(url); }; newimg.src = url; document.body.appendchild(newimg); }); note that here we're creating a png image; if you add a second
parameter to the toblob() call, you can specify the image type.
HTMLCanvasElement.toDataURL() - Web APIs
the htmlcanvaselement.todataurl() method returns a data uri containing a representation of the image in the format specified by the type
parameter (defaults to png).
... syntax canvas.todataurl(type, encoderoptions);
parameters type optional a domstring indicating the image format.
HTMLMediaElement.canPlayType() - Web APIs
syntax canplayresponse = audioorvideo.canplaytype(mediatype);
parameters mediatype a domstring containing the mime type of the media.
...the string will be one of the following values: probably media of the type indicated by the mediatype
parameter is probably playable on this device.
HTMLMediaElement.play() - Web APIs
syntax var promise = htmlmediaelement.play();
parameters none.
... exceptions the promise's rejection handler is called with an exception name passed in as its sole input
parameter (as opposed to a traditional exception being thrown).
Option() - Web APIs
syntax var optionelementreference = new option(text, value, defaultselected, selected);
parameters text optional a domstring representing the content of the element, i.e.
... examples just add new options /* assuming we have the following html <select id='s'> </select> */ var s = document.getelementbyid('s'); var options = [four, five, six]; options.foreach(function(element,key) { s[key] = new option(element,key); }); append options with different
parameters /* assuming we have the following html <select id="s"> <option>first</option> <option>second</option> <option>third</option> </select> */ var s = document.getelementbyid('s'); var options = [ 'zero', 'one', 'two' ]; options.foreach(function(element, key) { if (element == 'zero') { s[s.options.length] = new option(element, s.options.length, false, false); } if (elemen...
HTMLSelectElement.item() - Web APIs
the htmlselectelement.item() method returns the element corresponding to the htmloptionelement whose position in the options list corresponds to the index given in the
parameter, or null if there are none.
... syntax var item = collection.item(index); var item = collection[index];
parameters index is an unsigned long.
HTMLTableElement.deleteRow() - Web APIs
syntax htmltableelement.deleterow(index)
parameters index index is an integer representing the row that should be deleted.
... return value no return value errors thrown if the number of the row to delete, specified by the
parameter, is greater or equal to the number of available rows, or if it is negative and not equal to the special index -1, representing the last row of the table, the exception index_size_err is thrown.
Headers.delete() - Web APIs
this method throws a typeerror for the following reasons: the value of the name
parameter is not the name of an http header.
... syntax myheaders.delete(name);
parameters name the name of the http header you want to delete from the headers object.
History.go() - Web APIs
you can use it to move forwards and backwards through the history depending on the value of a
parameter.
... syntax history.go([delta])
parameters delta optional the position in the history to which you want to move, relative to the current page.
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.
IDBCursorSync - Web APIs
methods continue() advances the cursor to the next position along its direction, to the item whose key matches the optional key
parameter.
... bool continue ( in optional any key );
parameters key the key to which to move the cursor's position.
IDBFactory.deleteDatabase() - Web APIs
syntax for the current standard: var request = indexeddb.deletedatabase(name); for the experimental version with options (see below): var request = indexeddb.deletedatabase(name, options);
parameters name the name of the database you want to delete.
... optionsnon-standard in gecko, since version 26, you can include a non-standard optional storage
parameter that specifies whether you want to delete a permanent (the default value) indexeddb, or an indexeddb in temporary storage (aka shared pool.) return value a idbopendbrequest on which subsequent events related to this request are fired.
IDBFactorySync - Web APIs
idbdatabasesync open ( in domstring name, in domstring description ) raises (idbdatabaseexception);
parameters name the name for the database.
... exceptions this method can raise an idbdatabaseexception with the following codes: non_transient_err if the name
parameter is not valid.
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.
... 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.
... a typeerror exception is thrown if the count
parameter is not between 0 and 232-1 included.
IDBIndex.openCursor() - Web APIs
syntax var request = myindex.opencursor(); var request = myindex.opencursor(range); var request = myindex.opencursor(range, direction);
parameters range optional a key or idbkeyrange to use as the cursor's range.
... typeerror the value for the direction
parameter is invalid.
IDBIndex.openKeyCursor() - Web APIs
syntax var request = myindex.openkeycursor(); var request = myindex.openkeycursor(range); var request = myindex.openkeycursor(range, direction);
parameters range optional a key or idbkeyrange to use as the cursor's range.
... typeerror the value for the direction
parameter is invalid.
IDBKeyRange.bound() - Web APIs
syntax var myidbkeyrange = idbkeyrange.bound(lower, upper); var myidbkeyrange = idbkeyrange.bound(lower, upper, loweropen); var myidbkeyrange = idbkeyrange.bound(lower, upper, loweropen, upperopen);
parameters lower specifies the lower bound of the new key range.
... exceptions this method may raise a domexception of the following type: exception description dataerror the following conditions raise an exception: the lower or upper
parameters were not passed a valid key.
IDBKeyRange.lowerBound() - Web APIs
syntax var myidbkeyrange = idbkeyrange.lowerbound(lower); var myidbkeyrange = idbkeyrange.lowerbound(lower, open);
parameters lower specifies the lower bound of the new key range.
... exceptions this method may raise a domexception of the following type: exception description dataerror the value
parameter passed was not a valid key.
IDBKeyRange.only() - Web APIs
syntax var myidbkeyrange = idbkeyrange.only(value);
parameters value is the value for the new key range.
... exceptions this method may raise a domexception of the following types: exception description dataerror the value
parameter passed was not a valid key.
IDBKeyRange.upperBound() - Web APIs
syntax var myidbkeyrange = idbkeyrange.upperbound(upper[, open=false])
parameters bound specifies the upper bound of the new key range.
... exceptions this method may raise a domexception of the following type: exception description dataerror the value
parameter passed was not a valid key.
IDBObjectStore.getAllKeys() - Web APIs
the getallkeys() method of the idbobjectstore interface returns an idbrequest object retrieves record keys for all objects in the object store matching the specified
parameter or all objects in the store if no
parameters are given.
... syntax var request = objectstore.getallkeys(); var request = objectstore.getallkeys(query); var request = objectstore.getallkeys(query, count);
parameters query optional a value that is or resolves to an idbkeyrange.
IDBRequest.onerror - Web APIs
the event handler takes one
parameter, an error event with type="error".
...n this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; objectstoretitlerequest.onerror = function() { // if an error occurs with the request, log what it is console.log("there has been an error with retrieving your data: " + objectstoretitlerequest.error); // todo what about event
parameter into onerror()?
compareVersion - Web APIs
method of installtrigger object syntax int compareversion ( string registryname, installversion version); int compareversion ( string registryname, string version); int compareversion ( string registryname, int major, int minor, int release, int build);
parameters the compareversion method has the following
parameters: registryname the pathname in the client version registry for the component whose version is to be compared.
... this
parameter can be an absolute pathname, such as /royalairways/royalsw or a relative pathname, such as plugsin/royalairway/royalsw.
install - Web APIs
method of installtrigger object syntax int install(array xpilist [, function callbackfunc ] )
parameters the install method has the following
parameters: xpilist an array of files to be installed (see example below).
...to surface detail about the status of the installation, use the optional callback function and its status
parameter, as in the example below.
IntersectionObserver.IntersectionObserver() - Web APIs
syntax var observer = new intersectionobserver(callback[, options]);
parameters callback a function which is called when the percentage of the target element is visible crosses a threshold.
... the callback receives as input two
parameters: entries an array of intersectionobserverentry objects, each representing one threshold which was crossed, either becoming more or less visible than the percentage specified by that threshold.
Timing element visibility with the Intersection Observer API - Web APIs
then we load a new ad by calling loadrandomad(), specifying the ad to be replaced as an input
parameter.
... as we saw previously, loadrandomad() will replace an existing ad with content and data corresponding to a new ad, if you specify an existing ad's element as an input
parameter.
LockedFile.getMetadata() - Web APIs
syntax var request = instanceoflockedfile.getmetadata(
param);
parameters
param optional an object used to request specific metadata.
...in case of success, the request's result is an object with the metadata requested through the
param object.
LockedFile.readAsText() - Web APIs
syntax var request = instanceoflockedfile.readastext(size[, encoding]);
parameters size a number representing the number of bytes to read in the file.
...by default, utf-8 is assumed if this
parameter is not specified.
LockedFile.truncate() - Web APIs
if the method is called with an argument, the operation removes all the bytes starting at the index corresponding to the
parameter and regardless of the value of lockedfile.location.
... syntax var request = instanceoflockedfile.truncate(start);
parameters start optional a number representing the index where to start the operation.
MediaDevices.getDisplayMedia() - Web APIs
syntax var promise = navigator.mediadevices.getdisplaymedia(constraints);
parameters constraints optional an optional mediastreamconstraints object specifying requirements for the returned mediastream.
... example in the example below, a startcapture() method is created which initiates screen capture given a set of options specified by the displaymediaoptions
parameter.
MediaDevices.getUserMedia() - Web APIs
syntax var promise = navigator.mediadevices.getusermedia(constraints);
parameters constraints a mediastreamconstraints object specifying the types of media to request, along with any requirements for each type.
... the constraints
parameter is a mediastreamconstraints object with two members: video and audio, describing the media types requested.
MediaRecorder.start() - Web APIs
syntax mediarecorder.start(timeslice)
parameters timeslice optional the number of milliseconds to record into each blob.
... if this
parameter isn't included, the entire media duration is recorded into a single blob unless the requestdata() method is called to obtain the blob and trigger the creation of a new blob into which the media continues to be recorded.
MediaSource.isTypeSupported() - Web APIs
syntax var isitsupported = mediasource.istypesupported(mimetype);
parameters mimetype the mime media type that you want to test support for in the current browser.
... this may include the codecs
parameter to provide added details about the codecs used within the file.
MediaStream() - Web APIs
if any
parameters are given, the specified tracks are added to the new stream.
... syntax newstream = new mediastream(); newstream = new mediastream(stream); newstream = new mediastream(tracks[]);
parameters stream a different mediastream object whose tracks are added to the newly-created stream automatically.
MediaStream.addTrack() - Web APIs
the track is specified as a
parameter of type mediastreamtrack.
... syntax stream.addtrack(track);
parameters track a mediastreamtrack to add to the stream.
MediaStream - Web APIs
mediastream.gettrackbyid() returns the track whose id corresponds to the one given in
parameters, trackid.
... if no
parameter is given, or if no track with that id does exist, it returns null.
MediaStreamTrack.applyConstraints() - Web APIs
syntax const appliedpromise = track.applyconstraints([constraints])
parameters constraints optional a mediatrackconstraints object listing the constraints to apply to the track's constrainable properties; any existing constraints are replaced with the new values specified, and any constrainable properties not included are restored to their default constraints.
... if this
parameter is omitted, all currently set custom constraints are cleared.
MediaStreamTrack.onoverconstrained - Web APIs
syntax track.onoverconstrained = function; values function is the name of a user-defined function, without the () suffix or any
parameters, or an anonymous function declaration, such as function(event) {...}.
... an event handler always has one single
parameter, containing the event, here of type mediastreamerrorevent.
msSetMediaProtectionManager - Web APIs
syntax htmlmediaelement.mssetmediaprotectionmanager(mediaprotectionmanager);
parameters the windows.media.protection namespace provides classes to manage digital rights management (drm) media contents.
... the optional
parameter of the mssetmediaprotectionmanager property is mediaprotectionmanager and can be any type.
MutationObserver.MutationObserver() - Web APIs
syntax const observer = new mutationobserver(callback)
parameters callback a function which will be called on each dom change that qualifies given the observed node or subtree and options.
... the callback function takes as input two
parameters: an array of mutationrecord objects, describing each change that occurred; and the mutationobserver which invoked the callback.
Navigator.getUserMedia() - Web APIs
syntax navigator.getusermedia(constraints, successcallback, errorcallback);
parameters constraints a mediastreamconstraints object specifying the types of media to request, along with any requirements for each type.
...the function is called with one
parameter: the mediastream object that contains the media stream.
Web-based protocol handlers - Web APIs
for example: navigator.registerprotocolhandler("web+burger", "http://www.google.co.uk/?uri=%s", "burger handler"); where the
parameters are: the protocol.
...so, using the above examples, the browser would perform a get on this url: http://www.google.co.uk/?uri=web+burger:cheeseburger server side code can extract the query string
parameters and perform the desired action.
Navigator.requestMediaKeySystemAccess() - Web APIs
syntax ​promise = navigator.requestmediakeysystemaccess(keysystem, supportedconfigurations);
parameters keysystem a domstring identifying the key system.
...the fulfillment handler receives as input just one
parameter: mediakeysystemaccess a mediakeysystemaccess object representing the media key system configuration described by keysystem and supportedconfigurations exceptions in case of an error, the returned promise is rejected with a domexception whose name indicates what kind of error occurred.
Navigator.share() - Web APIs
syntax var sharepromise = navigator.share(data);
parameters data an object containing data to share.
...it will reject immediately if the data
parameter is not correctly specified, and will also reject if the user cancels sharing.
Node.lookupNamespaceURI() - Web APIs
syntax var namespace = node.lookupnamespaceuri(prefix);
parameters prefix the prefix to look for.
... if this
parameter is null, the method will return the default namespace uri, if any.
Node - Web APIs
node.replacechild() replaces one child node of the current one with the second one given in
parameter.
...
parameters rootnode the node object whose descendants will be recursed through.
Notification.Notification() - Web APIs
syntax var mynotification = new notification(title, options);
parameters title defines a title for the notification, which is shown at the top of the notification window.
...the function is passed
parameters to specify the body, icon, and title we want, and then it creates the necessary options object and triggers the notification by using the notification() constructor.
NotificationEvent.NotificationEvent() - Web APIs
syntax var mynotificationevent = new notificationevent(type, notificationeventinit);
parameters type tbd notificationeventinit optional a dictionary object containing a notification object to be used as the notification the event is dispatched on.
... in later drafts of the specification, this
parameter is not optional.
OES_texture_float_linear - Web APIs
with the help of this extension, you can now set the magnification or minification filter in the webglrenderingcontext.tex
parameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use floating-point textures.
... examples gl.getextension('oes_texture_float'); gl.getextension('oes_texture_float_linear'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.tex
parameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.float, image); specifications specification status comment oes_texture_float_linearthe definition of 'oes_texture_float_linear' in that specification.
OES_texture_half_float - Web APIs
extended methods this extension extends webglrenderingcontext.teximage2d() and webglrenderingcontext.texsubimage2d(): the type
parameter now accepts ext.half_float_oes.
...if you set the magnification or minification filter in the webglrenderingcontext.tex
parameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use half floating-point textures, the texture will be marked as incomplete.
OES_texture_half_float_linear - Web APIs
with the help of this extension, you can now set the magnification or minification filter in the webglrenderingcontext.tex
parameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use half floating-point textures.
... examples var halffloat = gl.getextension('oes_texture_half_float'); gl.getextension('oes_texture_half_float_linear'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.tex
parameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, halffloat.half_float_oes, image); specifications specification status comment oes_texture_half_float_linearthe definition of 'oes_texture_half_float_linear' in that specification.
OfflineAudioContext.OfflineAudioContext() - Web APIs
syntax var offlineaudioctx = new offlineaudiocontext(numberofchannels, length, samplerate); var offlineaudioctx = new offlineaudiocontext(options);
parameters you can specify the
parameters for the offlineaudiocontext() constructor as either the same set of
parameters as are inputs into the audiocontext.createbuffer() method, or by passing those
parameters in an options object.
... either way, the individual
parameters are the same.
OscillatorNode.start() - Web APIs
its
parameter is optional and default to 0.
... syntax oscillator.start(when); // start playing oscillator at the point in time specified by when
parameters when optional an optional double representing the time (in seconds) when the oscillator should start, in the same coordinate system as audiocontext's currenttime attribute.
OscillatorNode.stop() - Web APIs
its
parameter is optional and defaults to 0.
... syntax oscillator.stop(when); // stop playing oscillator at when
parameters when optional an optional double representing the audio context time when the oscillator should stop.
OscillatorNode - Web APIs
properties inherits properties from its parent, audioscheduledsourcenode, and adds the following properties: oscillatornode.frequency an a-rate audio
param representing the frequency of oscillation in hertz (though the audio
param returned is read-only, the value it represents is not).
... oscillatornode.detune an a-rate audio
param representing detuning of oscillation in cents (though the audio
param returned is read-only, the value it represents is not).
PannerNode.positionX - Web APIs
the audio
param contained by this property is read only; however, you can still change the value of the
parameter by assigning a new value to its audio
param.value property.
... syntax var positionx = pannernode.positionx; pannernode.positionx.value = newpositionx; value an audio
param whose value is the x coordinate of the audio source's position, in 3d cartesian coordinates.
PannerNode.positionY - Web APIs
the audio
param contained by this property is read only; however, you can still change the value of the
parameter by assigning a new value to its audio
param.value property.
... syntax var positiony = pannernode.positiony; pannernode.positiony.value = newpositiony; value an audio
param whose value is the y coordinate of the audio source's position, in 3d cartesian coordinates.
PannerNode.positionZ - Web APIs
the audio
param contained by this property is read only; however, you can still change the value of the
parameter by assigning a new value to its audio
param.value property.
... syntax var positionz = pannernode.positionz; pannernode.positionz.value = newpositionz; value an audio
param whose value is the z coordinate of the audio source's position, in 3d cartesian coordinates.
PannerNode.setOrientation() - Web APIs
the three
parameters x, y and z are unitless and describe a direction vector in 3d space using the right-hand cartesian coordinate system.
...
parameters x the x value of the panner's direction vector in 3d space.
PannerNode.setPosition() - Web APIs
the setposition() method of the pannernode interface defines the position of the audio source relative to the listener (represented by an audiolistener object stored in the audiocontext.listener attribute.) the three
parameters x, y and z are unitless and describe the source's position in 3d space using the right-hand cartesian coordinate system.
...
parameters x the x position of the panner in 3d space.
PannerNode.setVelocity() - Web APIs
as the vector controls both the direction of travel and its velocity, the three
parameters x, y and z are expressed in meters per second.
...
parameters x the x value of the panner's velocity vector.
PaymentRequest.show() - Web APIs
if your architecture doesn't necessarily have all of the data ready to go at the moment it instantiates the payment interface by calling show(), specify the detailspromise
parameter, providing a promise that is fulfilled once the data is ready.
... syntax paymentpromise = paymentrequest.show(detailspromise);
parameters detailspromise optional an optional promise that you can provide if your architecture requires that the payment request's details need to be updated between instantiating the payment interface and the user beginning to interact with it.
PerformanceObserver() - Web APIs
syntax var observer = new performanceobserver(callback);
parameters callback a performanceobservercallback callback that will be invoked when observed performance events are recorded.
... when the callback is invoked, its first
parameter is a list of performance observer entries and the second
parameter is the observer object.
PerformanceObserverEntryList.getEntriesByName() - Web APIs
the list is available in the observer's callback function (as the first
parameter in the callback).
... syntax entries = list.getentriesbyname(name, type);
parameters name a domstring representing the name of the entry to retrieve.
PromiseRejectionEvent() - Web APIs
syntax promiserejectionevent = promiserejectionevent(type, options);
parameters the promiserejectionevent() constructor also inherits
parameters from event().
... return value a new promiserejectionevent configured as specified by the
parameters.
PublicKeyCredential.getClientExtensionResults() - Web APIs
syntax maparraybuffer = publickeycredential.getclientextensionresults()
parameters none.
... has been defined to include location information in attestation "uvi": true // user verification index: how the user was verified }, challenge: new uint8array(16) /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16) /* from the server */, name: "jdoe@example.com", displayname: "john doe" }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var mybuffer = newcredentialinfo.getclientextensionresults(); // mybuffer will contain the result of any of the processing of the "loc" and "uvi" extensions }).catch(function (err) { console.error(err); }); specifications sp...
PublicKeyCredentialCreationOptions - Web APIs
publickeycredentialcreationoptions.pubkeycred
params an array of element which specify the desired features of the credential, including its type and the algorithm used for the cryptographic signature operations.
...smith", }, // requested format of new keypair pubkeycred
params: [{ type: "public-key", alg: cose_alg_ecdsa_w_sha256, }], // timeout after 1 minute timeout: 60000, // do not send the authenticator's origin attestation attestation: "none", extensions: { uvm: true, exts: true }, // filter out authenticators which are bound to the device authentic...
PushManager.subscribe() - Web APIs
} );
parameters options optional an object containing optional configuration
parameters.
... note: this
parameter is required in some browsers like chrome and edge.
RTCDTMFSender.insertDTMF() - Web APIs
syntax rtcdtmfsender.insertdtmf(tones[, duration[, intertonegap]]);
parameters tones a domstring containing the dtmf codes to be transmitted to the recipient.
... specifying an empty string as the tones
parameter clears the tone buffer, aborting any currently queued tones.
RTCIceCandidate.usernameFragment - Web APIs
if you instead call rtcicecandidate() with a string
parameter containing the candidate m-line text, the value of usernamefragment is extracted from the m-line.
...to avoid including candidates obsoleted by an ice restart, we can use code like this: const ssnewcandidate = signalmsg => { let candidate = new rtcicecandidate(signalmsg.candidate); let receivers = pc.getreceivers(); receivers.foreach(receiver => { let
parameters = receiver.transport.get
parameters(); if (
parameters.usernamefragment === candidate.usernamefragment) { return; } }); pc.addicecandidate(candidate) .catch(reporterror); } this walks through the list of the rtcrtpreceiver objects being used to receive ice data, and looks to see if the usernamefragment indicated in the candidate matches any of them.
RTCOfferAnswerOptions - Web APIs
it's used as the base type for the options
parameter when calling createoffer() or createanswer() on an rtcpeerconnection.
... each of createoffer() and createanswer() use rtcofferansweroptions as the base type for their options
parameter's dictionary.
RTCPeerConnection.addTransceiver() - Web APIs
syntax rtptransceiver = rtcpeerconnection.addtransceiver(trackorkind, init);
parameters trackorkind a mediastreamtrack to associate with the transceiver, or a domstring which is used as the kind of the receiver's track, and by extension of the rtcrtpreceiver itself.
...each entry is of type rtcrtpencoding
parameters.
RTCPeerConnection.onidentityresult - Web APIs
syntax peerconnection.onidentityresult = function; values function is the name of a user-defined function, without the () suffix or any
parameters, or an anonymous function declaration, such as function(event) {...}.
... an event handler always has one single
parameter, containing the event, here of type rtcidentityevent.
RTCPeerConnection.onidpassertionerror - Web APIs
syntax peerconnection.onidpassertionerror = function; values function is the name of a user-defined function, without the () suffix or any
parameters, or an anonymous function declaration, such as function(event) {...}.
... an event handler always has one single
parameter, containing the event, here of type rtcidentityerrorevent.
RTCPeerConnection.onidpvalidationerror - Web APIs
syntax peerconnection.onidpvalidationerror = function; values function is the name of a user-defined function, without the () suffix or any
parameters, or an anonymous function declaration, such as function(event) {...}.
... an event handler always has one single
parameter, containing the event, here of type rtcidentityerrorevent.
RTCPeerConnection.onpeeridentity - Web APIs
syntax peerconnection.onpeeridentity = function; values function is the name of a user-defined function, without the () suffix or any
parameters, or an anonymous function declaration, such as function(event) {...}.
... an event handler always has one single
parameter, containing the event, here of type event.
RTCPeerConnection.onremovestream - Web APIs
syntax peerconnection.onremovestream = function; values function is the name of a user-defined function, without the () suffix or any
parameters, or an anonymous function declaration, such as function(event) {...}.
... an event handler always has one single
parameter, containing the event, here of type mediastreamevent.
RTCPeerConnection.setConfiguration() - Web APIs
if, for example, the rtcpeerconnection() constructor was called with no
parameters, you would have to then call setconfiguration() to add ice servers before ice negotiation could begin.
... syntax rtcpeerconnection.setconfiguration(configuration);
parameters configuration an rtcconfiguration object which provides the options to be set.
RTCPeerConnection.setIdentityProvider() - Web APIs
the rtcpeerconnection.setidentityprovider() method sets the identity provider (idp) to the triplet given in
parameter: its name, the protocol used to communicate with it (optional) and an optional username.
...
parameters domainname is a domstring is the domain name where the idp is.
RTCRtpSender.setStreams() - Web APIs
syntax rtcrtpsender.setstreams(mediastream); rtcrtpsender.setstreams([mediastream...]);
parameters mediastream or [mediastream...] optional an mediastream object—or an array of multiple mediastream objects—identifying the streams to which the rtcrtpsender's track belongs.
... if this
parameter isn't specified, no new streams will be associated with the track.
RTCRtpSender - Web APIs
methods rtcrtpsender.get
parameters() returns a rtcrtp
parameters object describing the current configuration for the encoding and transmission of media on the track.
... rtcrtpsender.set
parameters() applies changes to
parameters which configure how the track is encoded and transmitted to the remote peer.
RTCRtpTransceiver.setCodecPreferences() - Web APIs
when preparing to open an rtcpeerconnection, you can change the codec
parameters from the user agent's default configuration by calling setcodec
parameters() before calling either rtcpeerconnection.createoffer() or createanswer().
... syntax rtcrtptransceiver.setcodecpreferences(codecs)
parameters codecs an array of rtcrtpcodeccapability objects, in order of preference, each providing the
parameters for one of the transceiver's supported codecs.
Range.collapse() - Web APIs
syntax range.collapse(tostart);
parameters tostart optional a boolean value: true collapses the range to its start, false to its end.
... living standard the
parameter is now optional and default to false.
Range.compareBoundaryPoints() - Web APIs
parameters how a constant describing the comparison method: range.end_to_end compares the end boundary-point of sourcerange to the end boundary-point of range.
... if the value of the
parameter is invalid, a domexception with a notsupportederror code is thrown.
ReadableStreamBYOBReader.ReadableStreamBYOBReader() - Web APIs
syntax var readablestreambyobreader = new readablestreambyobreader(stream);
parameters stream the readablestream to be read.
... exceptions typeerror the supplied stream
parameter is not a readablestream, or it is already locked for reading by another reader, or its stream controller is not a readablebytestreamcontroller.
ReadableStreamDefaultReader.cancel() - Web APIs
syntax var promise = readablestreamdefaultreader.cancel(reason);
parameters reason optional a domstring providing a human-readable reason for the cancellation.
... return value a promise, which fulfills with the value given in the reason
parameter.
ReportingObserver() - Web APIs
syntax new reportingobserver(callback[, options]);
parameters callback a callback function that runs when the observer starts to collect reports (i.e.
...the callback function is given two
parameters: reports: a sequence of report objects representing the reports collected in the observer's report queue.
Request() - Web APIs
syntax var myrequest = new request(input[, init]);
parameters input defines the resource that you wish to fetch.
... body: any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearch
params, usvstring, or readablestream object.
ResizeObserver() - Web APIs
syntax var resizeobserver = new resizeobserver(callback)
parameters callback the function called whenever an observed resize occurs.
... the function is called with two
parameters: entries an array of resizeobserverentry objects that can be used to access the new dimensions of the element after each change.
Response() - Web APIs
syntax var myresponse = new response(body, init);
parameters body optional an object defining a body for the response.
... this can be null (which is the default value), or one of: blob buffersource formdata readablestream urlsearch
params usvstring init optional an options object containing any custom settings that you want to apply to the response, or an empty object (which is the default value).
SVGTransformList - Web APIs
initialize(in svgtransform newitem) svgtransform clears all existing current items from the list and re-initializes the list to hold the single item specified by the
parameter.
...the values from the
parameter matrix are copied, the matrix
parameter is not adopted as svgtransform::matrix.
ScrollToOptions - Web APIs
a scrolltooptions dictionary can be provided as a
parameter for the following methods: window.scroll() window.scrollby() window.scrollto() element.scroll() element.scrollby() element.scrollto() properties scrolltooptions.top specifies the number of pixels along the y axis to scroll the window or element.
... when the form is submitted, an event handler is run that puts the entered values into a scrolltooptions dictionary, and then invokes the window.scrollto() method, passing the dictionary as a
parameter: form.addeventlistener('submit', (e) => { e.preventdefault(); var scrolloptions = { left: leftinput.value, top: topinput.value, behavior: scrollinput.checked ?
Selection.extend() - Web APIs
syntax sel.extend(node, offset)
parameters node the node within which the focus will be moved.
... nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yesoffset
parameter is optional experimentalchrome full support yesedge full support ≤79firefox full support 55ie no support noopera full support yessafari full support ...
ServiceWorkerMessageEvent.ServiceWorkerMessageEvent() - Web APIs
syntax var myswme = new serviceworkermessageevent(type, init);
parameters type a domstring that defines the type of the message event being created.
... init optional an initialisation object, which should contain the following
parameters: data: the event's data — this can be any type.
SourceBuffer.appendBufferAsync() - Web APIs
syntax appendpromise = sourcebuffer.appendbufferasync(source);
parameters source a buffersource (that is, either an arraybufferview or arraybuffer) which contains the media segment data you want to add to the sourcebuffer.
... example this simplified example async function, fillsourcebuffer(), takes as input
parameters buffersource, buffer, and a sourcebuffer to which to append the source media from the buffer.
SourceBuffer.remove() - Web APIs
syntax sourcebuffer.remove(start, end);
parameters start a double representing the start of the time range, in seconds.
... exceptions exception explanation invalidaccesserror the mediasource.duration property is equal to nan, the start
parameter is negative or greater than mediasource.duration, or the end
parameter is less than or equal to start or equal to nan.
SpeechSynthesis.speak() - Web APIs
parameters utterance a speechsynthesisutterance object.
...when a form containing the text we want to speak is submitted, we (amongst other things) create a new utterance containing this text, then speak it by passing it into speak() as a
parameter.
StereoPannerNode - Web APIs
stereopannernode.pan read only is an a-rate audio
param representing the amount of panning to apply.
...we then use an oninput event handler to change the value of the stereopannernode.pan
parameter and update the pan value display when the slider is moved.
Using readable streams - Web APIs
the generic syntax skeleton looks like this: const stream = new readablestream({ start(controller) { }, pull(controller) { }, cancel() { }, type, autoallocatechunksize }, { highwatermark, size() }); the constructor takes two objects as
parameters.
...tream if (done) { controller.close(); return; } // enqueue the next data chunk into our target stream controller.enqueue(value); return pump(); }); } } }) }) readablestream controllers you’ll notice that the start() and pull() methods passed into the readablestream() constructor are given controller
parameters — these are instances of the readablestreamdefaultcontroller class, which can be used to control your stream.
TextDecoder() - Web APIs
the textdecoder() constructor returns a newly created textdecoder object for the encoding specified in
parameter.
... syntax decoder = new textdecoder(utflabel, options);
parameters utflabeloptional is a domstring, defaulting to "utf-8", containing the label of the encoder.
TextDecoder.prototype.decode() - Web APIs
the textdecoder.prototype.decode() method returns a domstring containing the text, given in
parameters, decoded with the specific method for that textdecoder object.
... syntax b1 = decoder.decode(buffer, options); b2 = decoder.decode(buffer); b3 = decoder.decode();
parameters buffer optional is either an arraybuffer or an arraybufferview containing the text to decode.
TextEncoder.prototype.encode() - Web APIs
the textencoder.prototype.encode() method takes a usvstring as input, and returns a uint8array containing the text given in
parameters encoded with the specific method for that textencoder object.
... syntax b1 = encoder.encode(string);
parameters string is a usvstring containing the text to encode.
URL() - Web APIs
the url() constructor returns a newly created url object representing the url defined by the
parameters.
... syntax const url = new url(url [, base])
parameters url a usvstring representing an absolute or relative url.
URL.createObjectURL() - Web APIs
the url.createobjecturl() static method creates a domstring containing a url representing the object given in the
parameter.
... syntax const objecturl = url.createobjecturl(object)
parameters object a file, blob, or mediasource object to create an object url for.
USBDevice.controlTransferIn() - Web APIs
syntax var promise = usbdevice.controltransferin(setup, length)
parameters setup an object that sets options for .
... value: vender-specific request
parameters.
WEBGL_debug_renderer_info - Web APIs
the webglrenderingcontext.get
parameter() method can help you to detect which features are supported and the failifmajorperformancecaveat context attribute lets you control if a context should be returned at all, if the performance would be dramatically slow.
... examples with the help of this extension, privileged contexts are able to retrieve debugging information about about the user's graphic driver: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var debuginfo = gl.getextension('webgl_debug_renderer_info'); var vendor = gl.get
parameter(debuginfo.unmasked_vendor_webgl); var renderer = gl.get
parameter(debuginfo.unmasked_renderer_webgl); console.log(vendor); console.log(renderer); specifications specification status comment webgl_debug_renderer_infothe definition of 'webgl_debug_renderer_info' in that specification.
WebGL2RenderingContext.getActiveUniforms() - Web APIs
syntax any gl.getactiveuniforms(program, uniformindices, pname);
parameters program a webglprogram containing the active uniforms.
... return value depends on which information is requested using the pname
parameter.
WebGLRenderingContext.attachShader() - Web APIs
syntax void gl.attachshader(program, shader);
parameters program a webglprogram.
... var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); if ( !gl.getprogram
parameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw 'could not compile webgl program.
WebGLRenderingContext.bindBuffer() - Web APIs
syntax void gl.bindbuffer(target, buffer);
parameters target a glenum specifying the binding point (target).
... gl.get
parameter(gl.array_buffer_binding); gl.get
parameter(gl.element_array_buffer_binding); specifications specification status comment webgl 1.0the definition of 'bindbuffer' in that specification.
WebGLRenderingContext.bindFramebuffer() - Web APIs
syntax void gl.bindframebuffer(target, framebuffer);
parameters target a glenum specifying the binding point (target).
... gl.get
parameter(gl.framebuffer_binding); specifications specification status comment webgl 1.0the definition of 'bindframebuffer' in that specification.
WebGLRenderingContext.bindRenderbuffer() - Web APIs
syntax void gl.bindrenderbuffer(target, renderbuffer);
parameters target a glenum specifying the binding point (target).
... gl.get
parameter(gl.renderbuffer_binding); specifications specification status comment webgl 1.0the definition of 'bindrenderbuffer' in that specification.
WebGLRenderingContext.bindTexture() - Web APIs
syntax void gl.bindtexture(target, texture);
parameters target a glenum specifying the binding point (target).
... gl.get
parameter(gl.texture_binding_2d); specifications specification status comment webgl 1.0the definition of 'bindtexture' in that specification.
WebGLRenderingContext.blendColor() - Web APIs
syntax void gl.blendcolor(red, green, blue, alpha);
parameters red a glclampf for the red component in the range of 0 to 1.
... gl.get
parameter(gl.blend_color); // float32array[0, 0.5, 1, 1] specifications specification status comment webgl 1.0the definition of 'blendcolor' in that specification.
WebGLRenderingContext.blendEquation() - Web APIs
syntax void gl.blendequation(mode);
parameters mode a glenum specifying how source and destination colors are combined.
... gl.get
parameter(gl.blend_equation_rgb) === gl.func_add; // true gl.get
parameter(gl.blend_equation_alpha) === gl.func_add; // true specifications specification status comment webgl 1.0the definition of 'blendequation' in that specification.
WebGLRenderingContext.blendEquationSeparate() - Web APIs
syntax void gl.blendequationseparate(modergb, modealpha);
parameters modergb a glenum specifying how the red, green and blue components of source and destination colors are combined.
... gl.get
parameter(gl.blend_equation_rgb) === gl.func_add; // true gl.get
parameter(gl.blend_equation_alpha) === gl.func_add; // true specifications specification status comment webgl 1.0the definition of 'blendequationseparate' in that specification.
WebGLRenderingContext.blendFunc() - Web APIs
syntax void gl.blendfunc(sfactor, dfactor);
parameters sfactor a glenum specifying a multiplier for the source blending factors.
... gl.enable(gl.blend); gl.blendfunc(gl.src_color, gl.dst_color); gl.get
parameter(gl.blend_src_rgb) == gl.src_color; // true specifications specification status comment webgl 1.0the definition of 'blendfunc' in that specification.
WebGLRenderingContext.blendFuncSeparate() - Web APIs
syntax void gl.blendfuncseparate(srcrgb, dstrgb, srcalpha, dstalpha);
parameters srcrgb a glenum specifying a multiplier for the red, green and blue (rgb) source blending factors.
... gl.enable(gl.blend); gl.blendfuncseparate(gl.src_color, gl.dst_color, gl.one, gl.zero); gl.get
parameter(gl.blend_src_rgb) == gl.src_color; // true specifications specification status comment webgl 1.0the definition of 'blendfunc' in that specification.
WebGLRenderingContext.clear() - Web APIs
syntax void gl.clear(mask);
parameters mask a glbitfield bitwise or mask that indicates the buffers to be cleared.
... gl.get
parameter(gl.color_clear_value); gl.get
parameter(gl.depth_clear_value); gl.get
parameter(gl.stencil_clear_value); specifications specification status comment webgl 1.0the definition of 'clear' in that specification.
WebGLRenderingContext.clearColor() - Web APIs
syntax void gl.clearcolor(red, green, blue, alpha);
parameters red a glclampf specifying the red color value used when the color buffers are cleared.
... gl.get
parameter(gl.color_clear_value); // float32array[1, 0.5, 0.5, 1] specifications specification status comment webgl 1.0the definition of 'clearcolor' in that specification.
WebGLRenderingContext.clearDepth() - Web APIs
syntax void gl.cleardepth(depth);
parameters depth a glclampf specifying the depth value used when the depth buffer is cleared.
... gl.get
parameter(gl.depth_clear_value); // 0.5 specifications specification status comment webgl 1.0the definition of 'cleardepth' in that specification.
WebGLRenderingContext.clearStencil() - Web APIs
syntax void gl.clearstencil(s);
parameters s a glint specifying the index used when the stencil buffer is cleared.
... gl.get
parameter(gl.stencil_clear_value); // 1 specifications specification status comment webgl 1.0the definition of 'clearstencil' in that specification.
WebGLRenderingContext.colorMask() - Web APIs
syntax void gl.colormask(red, green, blue, alpha);
parameters red a glboolean specifying whether or not the red color component can be written into the frame buffer.
... gl.get
parameter(gl.color_writemask); // [true, true, true, false] specifications specification status comment webgl 1.0the definition of 'colormask' in that specification.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
onal srclengthoverride); // read from buffer bound to gl.pixel_unpack_buffer void gl.compressedteximage3d(target, level, internalformat, width, height, depth, border, glsizei imagesize, glintptr offset); void gl.compressedteximage3d(target, level, internalformat, width, height, depth, border, arraybufferview srcdata, optional srcoffset, optional srclengthoverride);
parameters target a glenum specifying the binding point (target) of the active texture.
... examples var ext = ( gl.getextension('webgl_compressed_texture_s3tc') || gl.getextension('moz_webgl_compressed_texture_s3tc') || gl.getextension('webkit_webgl_compressed_texture_s3tc') ); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_s3tc_dxt5_ext, 512, 512, 0, texturedata); gl.tex
parameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.tex
parameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl 1.0the definition of 'compressedteximage2d' in that specification.
WebGLRenderingContext.createProgram() - Web APIs
syntax webglprogram gl.createprogram();
parameters none.
... examples creating a webgl program var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); if ( !gl.getprogram
parameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw 'could not compile webgl program.
WebGLRenderingContext.cullFace() - Web APIs
syntax void gl.cullface(mode);
parameters mode a glenum specifying whether front- or back-facing polygons are candidates for culling.
... gl.get
parameter(gl.cull_face_mode) === gl.front_and_back; // true specifications specification status comment webgl 1.0the definition of 'cullface' in that specification.
WebGLRenderingContext.depthFunc() - Web APIs
syntax void gl.depthfunc(func);
parameters func a glenum specifying the depth comparison function, which sets the conditions under which the pixel will be drawn.
... gl.get
parameter(gl.depth_func) === gl.never; // true specifications specification status comment webgl 1.0the definition of 'depthfunc' in that specification.
WebGLRenderingContext.depthMask() - Web APIs
syntax void gl.depthmask(flag);
parameters flag a glboolean specifying whether or not writing into the depth buffer is enabled.
... gl.get
parameter(gl.depth_writemask); // false specifications specification status comment webgl 1.0the definition of 'depthmask' in that specification.
WebGLRenderingContext.depthRange() - Web APIs
syntax void gl.depthrange(znear, zfar);
parameters znear a glclampf specifying the mapping of the near clipping plane to window or viewport coordinates.
... examples gl.depthrange(0.2, 0.6); to check the current depth range, query the depth_range constant which returns a float32array gl.get
parameter(gl.depth_range); // float32array[0.2, 0.6] specifications specification status comment webgl 1.0the definition of 'depthrange' in that specification.
WebGLRenderingContext.getContextAttributes() - Web APIs
the webglrenderingcontext.getcontextattributes() method returns a webglcontextattributes object that contains the actual context
parameters.
... syntax gl.getcontextattributes(); return value a webglcontextattributes object that contains the actual context
parameters, or null if the context is lost.
WebGLRenderingContext.linkProgram() - Web APIs
syntax void gl.linkprogram(program);
parameters program the webglprogram to link.
... examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); if ( !gl.getprogram
parameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw new error('could not compile webgl program.
WebGLRenderingContext.polygonOffset() - Web APIs
syntax void gl.polygonoffset(factor, units);
parameters factor a glfloat which sets the scale factor for the variable depth offset for each polygon.
... gl.get
parameter(gl.polygon_offset_factor); // 2 gl.get
parameter(gl.polygon_offset_units); // 3 specifications specification status comment webgl 1.0the definition of 'polygonoffset' in that specification.
WebGLRenderingContext.readPixels() - Web APIs
syntax // webgl1: void gl.readpixels(x, y, width, height, format, type, pixels); // webgl2: void gl.readpixels(x, y, width, height, format, type, glintptr offset); void gl.readpixels(x, y, width, height, format, type, arraybufferview pixels, gluint dstoffset);
parameters x a glint specifying the first horizontal pixel that is read from the lower left corner of a rectangular block of pixels.
...the array type must match the type of the type
parameter.
WebGLRenderingContext.renderbufferStorage() - Web APIs
syntax void gl.renderbufferstorage(target, internalformat, width, height);
parameters target a glenum specifying the target renderbuffer object.
... webgl 2.0the definition of 'getrenderbuffer
parameter' in that specification.
WebGLRenderingContext.scissor() - Web APIs
syntax void gl.scissor(x, y, width, height);
parameters x a glint specifying the horizontal coordinate for the lower left corner of the box.
... gl.scissor(0, 0, 200, 200); gl.get
parameter(gl.scissor_box); // int32array[0, 0, 200, 200] specifications specification status comment webgl 1.0the definition of 'scissor' in that specification.
WebGLRenderingContext.stencilMask() - Web APIs
syntax void gl.stencilmask(mask);
parameters mask a gluint specifying a bit mask to enable or disable writing of individual bits in the stencil planes.
... gl.get
parameter(gl.stencil_writemask); // 110101 gl.get
parameter(gl.stencil_back_writemask); // 110101 gl.get
parameter(gl.stencil_bits); // 0 specifications specification status comment webgl 1.0the definition of 'stencilmask' in that specification.
WebGLRenderingContext.stencilMaskSeparate() - Web APIs
syntax void gl.stencilmaskseparate(face, mask);
parameters face a glenum specifying whether the front and/or back stencil writemask is updated.
... gl.get
parameter(gl.stencil_writemask); // 110101 gl.get
parameter(gl.stencil_back_writemask); // 110101 gl.get
parameter(gl.stencil_bits); // 0 specifications specification status comment webgl 1.0the definition of 'stencilmaskseparate' in that specification.
WebGLRenderingContext.validateProgram() - Web APIs
syntax void gl.validateprogram(program);
parameters program a webglprogram to validate.
... examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.validateprogram(program); if ( !gl.getprogram
parameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw 'could not compile webgl program.
WebGLSampler - Web APIs
the webglsampler interface is part of the webgl 2 api and stores sampling
parameters for webgltexture access inside of a shader.
... when working with webglsampler objects, the following methods of the webgl2renderingcontext are useful: webgl2renderingcontext.createsampler() webgl2renderingcontext.deletesampler() webgl2renderingcontext.issampler() webgl2renderingcontext.bindsampler() webgl2renderingcontext.getsampler
parameter() examples creating a webglsampler object in this example, gl must be a webgl2renderingcontext.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
if the newly-set remote description is an offer, we ask webrtc to select an appropriate local configuration by calling the rtcpeerconnection method setlocaldescription() without
parameters.
... perfect negotiation with the updated api the updated code takes advantage of the fact that you can now call setlocaldescription() with no
parameters so it just does the right thing for you, as well as the fact that setremotedescription() automatically rolls back if necessary.
Geometry and reference spaces in WebXR - Web APIs
one of its optional
parameters is an object conforming to the xrsessioninit dictionary which you can use to specify required and/or optional features that the session must (or should ideally) support.
...the callback receives as one of its
parameters a timestamp indicating the time at which the frame takes place, and should perform all rendering for the corresponding animation frame.
Starting up and shutting down a WebXR session - Web APIs
fundamentally, that looks like this: xr.requestsession("immersive-vr").then((session) => { xrsession = session; /* continue to set up the session */ }); note the
parameter passed into requestsession() in this code snippet: immersive-vr.
... customizing the session in addition to the display mode, the requestsession() method can take an optional object with initialization
parameters to customize the session.
Example and tutorial: Simple synth keyboard - Web APIs
the oscillator's frequency is set to the value specified in the freq
parameter by setting the value of the oscillator.frequency audio
param object.
... function changevolume(event) { mastergainnode.gain.value = volumecontrol.value } this simply sets the value of the master gain node's gain audio
param to the slider's new value.
Using IIR filters - Web APIs
the iirfilternode interface of the web audio api is an audionode processor that implements a general infinite impulse response (iir) filter; this type of filter can be used to implement tone control devices and graphic equalizers, and the filter response
parameters can be specified, so that it can be tuned as needed.
...both of these
parameters are arrays, neither of which can be larger than 20 items.
Window.dialogArguments - Web APIs
the dialogarguments property returns the
parameters that were passed into the window.showmodaldialog() method.
... this lets you determine what
parameters were specified when the modal dialog was created.
window.dump() - Web APIs
syntax window.dump(message); dump(message);
parameters message is the string message to log.
...if you don't have one already, closing the application and re-opening it with the command line
parameter -console should create the console or use -attach-console to use the existing console.
Window.prompt() - Web APIs
syntax result = window.prompt(message, default);
parameters message optional a string of text to display to the user.
...note that in internet explorer 7 and 8, if you do not provide this
parameter, the string "undefined" is the default value.
window.requestIdleCallback() - Web APIs
parameters callback a reference to a function that should be called in the near future, when the event loop is idle.
... options optional contains optional configuration
parameters.
Window.scroll() - Web APIs
syntax window.scroll(x-coord, y-coord) window.scroll(options)
parameters x-coord is the pixel along the horizontal axis of the document that you want displayed in the upper left.
... 1chrome android full support 18firefox android full support 4opera android full support 10.1safari ios full support 1samsung internet android full support 1.0scrolltooptions
parameterchrome full support 45edge full support 79firefox full support yesie no support noopera full support 32safari no support noweb...
Window.scrollBy() - Web APIs
syntax window.scrollby(x-coord, y-coord); window.scrollby(options)
parameters x-coord is the horizontal pixel value that you want to scroll by.
... 1chrome android full support 18firefox android full support 4opera android full support 10.1safari ios full support 1samsung internet android full support 1.0scrolltooptions
parameterchrome full support 45edge full support 79firefox full support yesie no support noopera full support 32safari no support noweb...
Window.setImmediate() - Web APIs
syntax var immediateid = setimmediate(func, [
param1,
param2, ...]); var immediateid = setimmediate(func); where immediateid is the id of the immediate which can be used later with window.clearimmediate.
... all
parameters will be passed directly to your function.
WindowEventHandlers.onlanguagechange - Web APIs
syntax object.onlanguagechange = function; value function is the name of a user-defined function, without the () suffix or any
parameters, or an anonymous function declaration, such as function(event) {...}.
... an event handler always has one single
parameter, containing the event, here of type event.
WindowOrWorkerGlobalScope.btoa() - Web APIs
syntax var encodeddata = scope.btoa(stringtoencode);
parameters stringtoencode the binary string to encode.
... example const encodeddata = window.btoa('hello, world'); // encode a string const decodeddata = window.atob(encodeddata); // decode the string unicode strings the btoa() function takes a javascript string as a
parameter.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
syntax var intervalid = scope.setinterval(func, [delay, arg1, arg2, ...]); var intervalid = scope.setinterval(function[, delay]); var intervalid = scope.setinterval(code, [delay]);
parameters func a function to be executed every delay milliseconds.
... var intervalid = window.setinterval(mycallback, 500, '
parameter 1', '
parameter 2'); function mycallback(a, b) { // your code here //
parameters are purely optional.
WritableStream.abort() - Web APIs
syntax var promise = writablestream.abort(reason);
parameters reason a domstring providing a human-readable reason for the abort.
... return value a promise, which fulfills with the value given in the reason
parameter.
WritableStreamDefaultWriter.abort() - Web APIs
syntax var promise = writablestreamdefaultwriter.abort(reason);
parameters reason optional a domstring representing a human-readable reason for the abort.
... return value a promise, which fulfills with the value given in the reason
parameter.
XDomainRequest.onerror - Web APIs
syntax xdr.onerror = funcref;
parameters funcref a function to call when an error occurs.
... example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.onerror = function(){ //handle error } xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("
param1=value1&
param2=value2"); specification not part of any specification.
XDomainRequest.onprogress - Web APIs
syntax xdr.onprogress = funcref;
parameters funcref a function to call when progress events occur.
... example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.onprogress = function(){ //handle partial response with xdr.responsetext } xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("
param1=value1&
param2=value2"); specification not part of any specification.
XDomainRequest.ontimeout - Web APIs
syntax xdr.ontimeout = funcref;
parameters funcref a function to be called when the event times out.
... example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.ontimeout = function(){ //handle timeout } xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("
param1=value1&
param2=value2"); specification not part of any specification.
XMLHttpRequest.open() - Web APIs
syntax xmlhttprequest.open(method, url[, async[, user[, password]]])
parameters method the http request method to use, such as "get", "post", "put", "delete", etc.
... async optional an optional boolean
parameter, defaulting to true, indicating whether or not to perform the operation asynchronously.
XRInputSourceArray.forEach() - Web APIs
syntax xrinputsourcearray.foreach(callback, thisarg);
parameters callback a function to execute once for each entry in the array xrinputsourcearray.
... the callback accepts up to three
parameters: currentvalue a xrinputsource object which is the value of the item from within the xrinputsourcearray which is currently being processed.
XRInputSourcesChangeEvent() - Web APIs
syntax newinputsourceschangeevent = new xrinputsourceschangeevent(type, eventinitdict);
parameters type a domstring indicating the type of event which has occurred.
... return value a newly-created xrinputsourceschangeevent object configured based upon the input
parameters provided.
XRReferenceSpaceEvent() - Web APIs
syntax let refspaceevent = new xrreferencespaceevent(type, eventinitdict);
parameters type a domstring indicating the event type which has occurred.
... return value a new xrreferencespaceevent object, initialized as defined by the input
parameters.
XRRigidTransform() - Web APIs
syntax let xrrigidtransform = new xrrigidtransform(position, orientation);
parameters position optional an object conforming to dompointinit which specifies the coordinates at which the point or object is located.
...if this
parameter is left out or is not compatible with dompointinit, the position used is assumed to be {x: 0, y: 0, z: 0, w: 1}.
XRSessionEvent() - Web APIs
syntax newxrsessionevent = new xrsessionevent(type, eventinitdict);
parameters type a domstring indicating which of the events represented by objects of type xrsessionevent this particular object represents.
... return value a newly-created xrsessionevent object representing an object of the specfied type and configured as described by the eventinitdict
parameter.
XRWebGLLayer.ignoreDepthValues - Web APIs
the value of ignoredepthvalues can only be set when the xrwebgllayer is instantiated, by setting the corresponding value in the xrwebgllayerinit object specified as the constructor's layerinit
parameter.
... as a
parameter you're likely to set yourself, it is unlikely you'll need to read it later, but it's available if the need arises.
msWriteProfilerMark - Web APIs
syntax window.mswriteprofilermark("start-render");
parameters bstrprofilermarkname[in] an event name.
...this
parameter may be null.
:dir() - CSS: Cascading Style Sheets
syntax the :dir() pseudo-class requires one
parameter, representing the text directionality you want to target.
...
parameters ltr target left-to-right elements.
attr() - CSS: Cascading Style Sheets
note: the attr() function can be used with any css property, but support for properties other than content is experimental, and support for the type-or-unit
parameter is sparse.
... candidate recommendation added two optional
parameters; can be used on all properties; may return values other than <string>.
clamp() - CSS: Cascading Style Sheets
it takes three
parameters: a minimum value, a preferred value, and a maximum allowed value.
... syntax the clamp() function takes three comma separated expressions as its
parameter, in the order of minimum value, preferred value, maximum value.
<easing-function> - CSS: Cascading Style Sheets
*/ steps(2, start) /* the second
parameter is optional.
... */ steps(2) these easing function are invalid: /* the first
parameter must be an <integer> and cannot be a real value, even if it is equal to one.
drop-shadow() - CSS: Cascading Style Sheets
syntax drop-shadow(offset-x offset-y blur-radius color) the drop-shadow() function accepts a
parameter of type <shadow> (defined in the box-shadow property), with the exception that the inset keyword and spread
parameters are not allowed.
...
parameters offset-x offset-y (required) two <length> values that determine the shadow offset.
image() - CSS: Cascading Style Sheets
bi-directional awareness the first, optional
parameter of the image() notation is the directionality of the image.
...the section of the image defined in the
parameter becomes a standalone image.
minmax() - CSS: Cascading Style Sheets
o, 300px) minmax(min-content, auto) /* <fixed-breadth>, <track-breadth> values */ minmax(200px, 1fr) minmax(30%, 300px) minmax(400px, 50%) minmax(50%, min-content) minmax(300px, max-content) minmax(200px, auto) /* <inflexible-breadth>, <fixed-breadth> values */ minmax(400px, 50%) minmax(30%, 300px) minmax(min-content, 200px) minmax(max-content, 200px) minmax(auto, 300px) a function taking two
parameters, min and max.
... each
parameter can be a <length>, a <percentage>, a <flex> value, or one of the keyword values max-content, min-content, or auto.
paint() - CSS: Cascading Style Sheets
syntax paint(workletname,
parameters) where: workletname the name of the registered worklet.
...
parameters optional additional
parameters to pass to the paintworklet examples you can pass additional arguments via the css paint() function.
exsl:object-type() - EXSLT
this function lets authors of named templates and extension functions easily provide flexibility in
parameter values.
... syntax exsl:object-type(object)
parameters object the object whose type is to be returned.
regexp:match() - EXSLT
syntax regexp:match(targetstring, regexpstring[, flagsstring])
parameters targetstring the string to perform regular expression matching upon.
... returns a node set of match elements, each of which has the string value equal to a portion of the first
parameter string as captured by the regular expression.
Creating a cross-browser video player - Developer guides
tle-clip-medium.mp4" type="video/mp4"> <source src="video/tears-of-steel-battle-clip-medium.webm" type="video/webm"> <source src="video/tears-of-steel-battle-clip-medium.ogg" type="video/ogg"> <!-- flash fallback --> <object type="application/x-shockwave-flash" data="flash-player.swf?videourl=video/tears-of-steel-battle-clip-medium.mp4" width="1024" height="576"> <
param name="movie" value="flash-player.swf?videourl=video/tears-of-steel-battle-clip-medium.mp4" /> <
param name="allowfullscreen" value="true" /> <
param name="wmode" value="transparent" /> <
param name="flashvars" value="controlbar=over&image=img/poster.jpg&file=flash-player.swf?videourl=video/tears-of-steel-battle-clip-medium.mp4" /> <img alt="tears of steel ...
...the function checks the dir
parameter, which indicates whether the volume is to be increased (+) or decreased (-) and acts accordingly.
Audio and Video Delivery - Developer guides
<audio controls> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- fallback for non supporting browsers goes here --> <a href="audiofile.mp3">download audio</a> <object width="320" height="30" type="application/x-shockwave-flash" data="flashmediaelement.swf"> <
param name="movie" value="flashmediaelement.swf" /> <
param name="flashvars" value="controls=true&isvideo=false&file=audiofile.mp3" /> </object> </audio> the process is very similar with video — just remember to set isvideo=true in the flashvars value
parameters.
...adaptive streaming is often used in conjunction with live streaming where smooth delivery of audio or video is
paramount.
DOM onevent handlers - Developer guides
(the html specification names these: onblur, onerror, onfocus, onload, and onscroll.) event handler's
parameters, this binding, and the return value when the event handler is specified as an html attribute, the specified code is wrapped into a function with the following
parameters: event — for all event handlers except onerror.
...note that the event
parameter actually contains the error message as a string.
HTML attribute reference - HTML: Hypertext Markup Language
name <button>, <form>, <fieldset>, <iframe>, <input>, <keygen>, <object>, <output>, <select>, <textarea>, <map>, <meta>, <
param> name of the element.
... usemap <img>, <input>, <object> value <button>, <data>, <input>, <li>, <meter>, <option>, <progress>, <
param> defines a default value which will be displayed in the element on page load.
<object> - HTML: Hypertext Markup Language
permitted content zero or more <
param> elements, then transparent.
...no percentages) examples embed a flash movie <!-- embed a flash movie --> <object data="movie.swf" type="application/x-shockwave-flash"></object> <!-- embed a flash movie with
parameters --> <object data="movie.swf" type="application/x-shockwave-flash"> <
param name="foo" value="bar"> </object> specifications specification status comment html living standardthe definition of '<object>' in that specification.
Using the application cache - HTML: Hypertext Markup Language
gotchas never access cached files by using traditional get
parameters (like other-cached-page.html?
parametername=value).
...to link to cached resources that have
parameters parsed in javascript use
parameters in the hash part of the link, such as other-cached-page.html#whatever?
parametername=value.
Data URLs - HTTP
lack of error handling invalid
parameters in media, or typos when specifying 'base64', are ignored, but no error is provided.
... the data portion of a data url is opaque, so an attempt to use a query string (page-specific
parameters, with the syntax <url>?
parameter-data) with a data url will just include the query string in the data the url represents.
Cross-Origin Resource Sharing (CORS) - HTTP
the browser determines that it needs to send this based on the request
parameters that the javascript code snippet above was using, so that the server can respond whether it is acceptable to send the request with the actual request
parameters.
... access-control-max-age: <delta-seconds> the delta-seconds
parameter indicates the number of seconds the results can be cached.
List of default Accept values - HTTP
omment firefox text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (since firefox 66) text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 (in firefox 65) text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (before) in firefox 65 and earlier, this value can be modified using the network.http.accept.default
parameter.
... user agent value comment firefox image/webp,*/* (since firefox 65) */* (since firefox 47) image/png,image/*;q=0.8,*/*;q=0.5 (before) this value can be modified using the image.http.accept
parameter.
Link - HTTP
syntax link: < uri-reference >;
param1=value1;
param2="value2" <uri-reference> the uri reference, must be enclosed between < and >.
...
parameters the link header contains
parameters, which are separated with ; and are equivalent to attributes of the <link> element.
Public-Key-Pins - HTTP
includesubdomains optional if this optional
parameter is specified, this rule applies to all of the site's subdomains as well.
... report-uri="<uri>" optional if this optional
parameter is specified, pin validation failures are reported to the given url.
HTTP Public Key Pinning (HPKP) - HTTP
includesubdomains optional if this optional
parameter is specified, this rule applies to all of the site's subdomains as well.
... report-uri optional if this optional
parameter is specified, pin validation failures are reported to the given url.
Grammar and types - JavaScript
additionally, a best practice for parseint is to always include the radix
parameter.
... the radix
parameter is used to specify which numerical system is to be used.
Numbers and dates - JavaScript
to create a date object: var dateobjectname = new date([
parameters]); where dateobjectname is the name of the date object being created; it can be a new object or a property of an existing object.
... the
parameters in the preceding syntax can be any of the following: nothing: creates today's date and time.
getter - JavaScript
} }
parameters prop the name of the property to bind to the given function.
... note the following when working with the get syntax: it can have an identifier which is either a number or a string; it must have exactly zero
parameters (see incompatible es5 change: literal getter and setter functions must now have exactly zero or one arguments for more information); it must not appear in an object literal with another get or with a data entry for the same property ({ get x() { }, get x() { } } and { x: ..., get x() { } } are forbidden).
setter - JavaScript
}}
parameters prop the name of the property to bind to the given function.
... note the following when working with the set syntax: it can have an identifier which is either a number or a string; it must have exactly one
parameter (see incompatible es5 change: literal getter and setter functions must now have exactly zero or one arguments for more information); it must not appear in an object literal with another set or with a data entry for the same property.
Array.prototype.reduce() - JavaScript
syntax arr.reduce(callback( accumulator, currentvalue, [, index[, array]] )[, initialvalue])
parameters callback a function to execute on each element in the array (except for the first, if no initialvalue is supplied).
..., 6, 2, 0,]; const doubledpositivenumbers = numbers.reduce((accumulator, currentvalue) => { if (currentvalue > 0) { const doubled = currentvalue * 2; accumulator.push(doubled); } return accumulator; }, []); console.log(doubledpositivenumbers); // [12, 4] running promises in sequence /** * runs promises from array of functions that can return promises * in chained manner * * @
param {array} arr - promise arr * @return {object} promise object */ function runpromiseinsequence(arr, input) { return arr.reduce( (promisechain, currentfunction) => promisechain.then(currentfunction), promise.resolve(input) ) } // promise function 1 function p1(a) { return new promise((resolve, reject) => { resolve(a * 5) }) } // promise function 2 function p2(a) { return ne...
Array.prototype.concat() - JavaScript
syntax const new_array = old_array.concat([value1[, value2[, ...[, valuen]]]])
parameters valuen optional arrays and/or values to concatenate into a new array.
... if all valuen
parameters are omitted, concat returns a shallow copy of the existing array on which it is called.
Array.prototype.every() - JavaScript
syntax arr.every(callback(element[, index[, array]])[, thisarg])
parameters callback a function to test for each element, taking three arguments: element the current element being processed in the array.
... if a thisarg
parameter is provided to every, it will be used as callback's this value.
Array.prototype.fill() - JavaScript
syntax arr.fill(value[, start[, end]])
parameters value value to fill the array with.
... if the first
parameter is an object, each slot in the array will reference that object.
Array.prototype.filter() - JavaScript
syntax let newarray = arr.filter(callback(element[, index, [array]])[, thisarg])
parameters callback function is a predicate, to test each element of the array.
... callback is invoked with three arguments: the value of the element the index of the element the array object being traversed if a thisarg
parameter is provided to filter, it will be used as the callback's this value.
Array.prototype.find() - JavaScript
syntax arr.find(callback(element[, index[, array]])[, thisarg])
parameters callback function to execute on each value in the array, taking 3 arguments: element the current element in the array.
... if a thisarg
parameter is provided to find, it will be used as the this value inside each invocation of the callback.
Array.prototype.findIndex() - JavaScript
syntax arr.findindex(callback( element[, index[, array]] )[, thisarg])
parameters callback a function to execute on each value in the array until the function returns true, indicating that the satisfying element was found.
... callback is invoked with three arguments: the value of the element the index of the element the array object being traversed if a thisarg
parameter is passed to findindex(), it will be used as the this inside each invocation of the callback.
Array.from() - JavaScript
syntax array.from(arraylike [, mapfn [, thisarg]])
parameters arraylike an array-like or iterable object to convert to an array.
... array.from() has an optional
parameter mapfn, which allows you to execute a map() function on each element of the array being created.
Array.prototype.lastIndexOf() - JavaScript
syntax arr.lastindexof(searchelement[, fromindex])
parameters searchelement element to locate in the array.
...array.lastindexof(element, idx - 1) : -1); } console.log(indices); // [4, 2, 0] note that we have to handle the case idx == 0 separately here because the element will always be found regardless of the fromindex
parameter if it is the first element of the array.
Array.prototype.push() - JavaScript
syntax arr.push([element1[, ...[, elementn]]])
parameters elementn the element(s) to add to the end of the array.
... do not use this method if the second array (morevegs in the example) is very large because the maximum number of
parameters that one function can take is limited in practice.
Array.prototype.some() - JavaScript
syntax arr.some(callback(element[, index[, array]])[, thisarg])
parameters callback a function to test for each element, taking three arguments: element the current element being processed in the array.
... if a thisarg
parameter is provided to some(), it will be used as the callback's this value.
Array.prototype.unshift() - JavaScript
syntax arr.unshift(element1[, ...[, elementn]])
parameters elementn the elements to add to the front of the arr.
... please note that, if multiple elements are passed as
parameters, they're inserted in chunk at the beginning of the object, in the exact same order they were passed as
parameters.
AsyncFunction - JavaScript
it can be obtained with the following code: object.getprototypeof(async function(){}).constructor syntax new asyncfunction([arg1[, arg2[, ...argn]],] functionbody)
parameters arg1, arg2, ...
... all arguments passed to the function are treated as the names of the identifiers of the
parameters in the function to be created, in the order in which they are passed.
BigInt.prototype.toLocaleString() - JavaScript
syntax bigintobj.tolocalestring([locales [, options]])
parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
... see the intl.numberformat() constructor for details on these
parameters and how to use them.
BigInt64Array() constructor - JavaScript
syntax new bigint64array(); new bigint64array(length); new bigint64array(typedarray); new bigint64array(object); new bigint64array(buffer [, byteoffset [, length]]);
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
BigUint64Array() constructor - JavaScript
syntax new biguint64array(); new biguint64array(length); new biguint64array(typedarray); new biguint64array(object); new biguint64array(buffer [, byteoffset [, length]]);
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
Boolean() constructor - JavaScript
syntax new boolean([value])
parameters value optional the initial value of the boolean object.
... examples creating boolean objects with an initial value of false var bno
param = new boolean(); var bzero = new boolean(0); var bnull = new boolean(null); var bemptystring = new boolean(''); var bfalse = new boolean(false); creating boolean objects with an initial value of true var btrue = new boolean(true); var btruestring = new boolean('true'); var bfalsestring = new boolean('false'); var bsulin = new boolean('su lin'); var barrayproto = new boolean([]); var bobjproto = new boolean({}); specifications specification ecmascript (ecma-262)the definition of 'boolean constructor' in that specification.
Boolean - JavaScript
description the value passed as the first
parameter is converted to a boolean value, if necessary.
... examples creating boolean objects with an initial value of false var bno
param = new boolean(); var bzero = new boolean(0); var bnull = new boolean(null); var bemptystring = new boolean(''); var bfalse = new boolean(false); creating boolean objects with an initial value of true var btrue = new boolean(true); var btruestring = new boolean('true'); var bfalsestring = new boolean('false'); var bsulin = new boolean('su lin'); var barrayproto = new boolean([]); var bobjproto ...
DataView() constructor - JavaScript
syntax new dataview(buffer [, byteoffset [, bytelength]])
parameters buffer an existing arraybuffer or sharedarraybuffer to use as the storage backing the new dataview object.
... exceptions rangeerror thrown if the byteoffset or bytelength
parameter values result in the view extending past the end of the buffer.
Date() constructor - JavaScript
parameters there are four basic forms for the date() constructor: no
parameters when no
parameters are provided, the newly-created date object represents the current date and time as of the time of instantiation.
... individual date and time component values given at least a year and month, this form of date() returns a date object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following
parameters.
Date.prototype.setUTCDate() - JavaScript
syntax dateobj.setutcdate(dayvalue)
parameters dayvalue an integer from 1 to 31, representing the day of the month.
... description if a
parameter you specify is outside of the expected range, setutcdate() attempts to update the date information in the date object accordingly.
Date.prototype.setUTCMilliseconds() - JavaScript
syntax dateobj.setutcmilliseconds(millisecondsvalue)
parameters millisecondsvalue a number between 0 and 999, representing the milliseconds.
... description if a
parameter you specify is outside of the expected range, setutcmilliseconds() attempts to update the date information in the date object accordingly.
Date.prototype.toLocaleDateString() - JavaScript
syntax dateobj.tolocaledatestring([locales [, options]])
parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
... see the intl.datetimeformat() constructor for details on these
parameters and how to use them.
Date.prototype.toLocaleString() - JavaScript
syntax dateobj.tolocalestring([locales[, options]])
parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
... see the intl.datetimeformat() constructor for details on these
parameters and how to use them.
Date.prototype.toLocaleTimeString() - JavaScript
syntax dateobj.tolocaletimestring([locales[, options]])
parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
... see the intl.datetimeformat() constructor for details on these
parameters and how to use them.
Float32Array() constructor - JavaScript
syntax new float32array(); // new in es2017 new float32array(length); new float32array(typedarray); new float32array(object); new float32array(buffer [, byteoffset [, length]]);
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
Float64Array() constructor - JavaScript
syntax new float64array(); // new in es2017 new float64array(length); new float64array(typedarray); new float64array(object); new float64array(buffer [, byteoffset [, length]]);
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
Function.prototype.call() - JavaScript
syntax func.call([thisarg[, arg1, arg2, ...argn]])
parameters thisarg optional the value to use as this when calling func.
... in the following example, the constructor for the product object is defined with two
parameters: name and price.
Generator.prototype.next() - JavaScript
you can also provide a
parameter to the next method to send a value to the generator.
... syntax gen.next(value)
parameters value the value to send to the generator.
GeneratorFunction - JavaScript
object.getprototypeof(function*(){}).constructor syntax new generatorfunction ([arg1[, arg2[, ...argn]],] functionbody)
parameters arg1, arg2, ...
... all arguments passed to the function are treated as the names of the identifiers of the
parameters in the function to be created, in the order in which they are passed.
Int16Array() constructor - JavaScript
syntax new int16array(); // new in es2017 new int16array(length); new int16array(typedarray); new int16array(object); new int16array(buffer [, byteoffset [, length]]);
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
Int32Array() constructor - JavaScript
syntax new int32array(); // new in es2017 new int32array(length); new int32array(typedarray); new int32array(object); new int32array(buffer [, byteoffset [, length]]);
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
Int8Array() constructor - JavaScript
syntax new int8array(); // new in es2017 new int8array(length); new int8array(typedarray); new int8array(object); new int8array(buffer [, byteoffset [, length]]);
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
Intl​.ListFormat.prototype​.format() - JavaScript
syntax listformat.format([list]);
parameters list an iterable object, such as an array return value a language-specific formatted string representing the elements of the list description the format() method returns a string that has been formatted based on
parameters provided in the intl.listformat object.
... the locales and options
parameters customize the behavior of format() and let applications specify the language conventions that should be used to format the list.
JSON.parse() - JavaScript
syntax json.parse(text[, reviver])
parameters text the string to parse as json.
... throw new syntaxerror("json.parse"); }; } examples using json.parse() json.parse('{}'); // {} json.parse('true'); // true json.parse('"foo"'); // "foo" json.parse('[1, 5, "false"]'); // [1, 5, "false"] json.parse('null'); // null using the reviver
parameter if a reviver is specified, the value computed by parsing is transformed before being returned.
Map.prototype.forEach() - JavaScript
syntax mymap.foreach(callback([value][,key][,map])[, thisarg])
parameters callback function to execute for each entry of mymap.
... callback is invoked with three arguments: the entry's value the entry's key the map object being traversed if a thisarg
parameter is provided to foreach, it will be passed to callback when invoked, for use as its this value.
Math.imul() - JavaScript
the math.imul() function returns the result of the c-like 32-bit multiplication of the two
parameters.
... syntax var product = math.imul(a, b);
parameters a first number.
Number.isFinite() - JavaScript
syntax number.isfinite(value)
parameters value the value to be tested for finiteness.
... description in comparison to the global isfinite() function, this method doesn't forcibly convert the
parameter to a number.
Number.isNaN() - JavaScript
syntax number.isnan(value)
parameters value the value to be tested for nan.
... in comparison to the global isnan() function, number.isnan() doesn't suffer the problem of forcefully converting the
parameter to a number.
Number.prototype.toExponential() - JavaScript
syntax numobj.toexponential([fractiondigits])
parameters fractiondigits optional.
... if a number has more digits than requested by the fractiondigits
parameter, the number is rounded to the nearest number represented by fractiondigits digits.
Number.prototype.toLocaleString() - JavaScript
syntax numobj.tolocalestring([locales [, options]])
parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
... see the intl.numberformat() constructor for details on these
parameters and how to use them.
Object.assign() - JavaScript
syntax object.assign(target, ...sources)
parameters target the target object — what to apply the sources’ properties to, which is returned after it is modified.
... merging objects with same properties const o1 = { a: 1, b: 1, c: 1 }; const o2 = { b: 2, c: 2 }; const o3 = { c: 3 }; const obj = object.assign({}, o1, o2, o3); console.log(obj); // { a: 1, b: 2, c: 3 } the properties are overwritten by other objects that have the same properties later in the
parameters order.
Object.setPrototypeOf() - JavaScript
syntax object.setprototypeof(obj, prototype)
parameters obj the object which is to have its prototype set.
...does nothing if the prototype
parameter isn't an object or null (i.e., number, string, boolean, or undefined).
Object.prototype.toString() - JavaScript
parameters for numbers and bigints tostring() takes an optional
parameter radix the value of radix must be minimum 2 and maximum 36.
... to use the object.prototype.tostring() with every object, you need to call function.prototype.call() or function.prototype.apply() on it, passing the object you want to inspect as the first
parameter (called thisarg).
Promise.prototype.catch() - JavaScript
syntax p.catch(onrejected); p.catch(function(reason) { // rejection });
parameters onrejected a function called when the promise is rejected.
... return value internally calls promise.prototype.then on the object upon which it was called, passing the
parameters undefined and the received onrejected handler.
handler.setPrototypeOf() - JavaScript
syntax const p = new proxy(target, { setprototypeof: function(target, prototype) { } });
parameters the following
parameters are passed to the setprototypeof() method.
... interceptions this trap can intercept these operations: object.setprototypeof() reflect.setprototypeof() invariants if the following invariants are violated, the proxy will throw a typeerror: if target is not extensible, the prototype
parameter must be the same value as object.getprototypeof(target).
Reflect.construct() - JavaScript
syntax reflect.construct(target, argumentslist[, newtarget])
parameters target the target function to call.
... when invoking reflect.construct(), on the other hand, the new.target operator will point to the newtarget
parameter if supplied, or target if not.
Set() constructor - JavaScript
syntax new set([iterable])
parameters iterable optional if an iterable object is passed, all of its elements will be added to the new set.
... if you don't specify this
parameter, or its value is null, the new set is empty.
Set.prototype.forEach() - JavaScript
syntax myset.foreach(callback[, thisarg])
parameters callback function to execute for each element, taking three arguments: currentvalue, currentkey the current element being processed in the set.
... if a thisarg
parameter is provided to foreach(), it will be passed to callback when invoked, for use as its this value.
String.prototype.localeCompare() - JavaScript
syntax referencestr.localecompare(comparestring[, locales[, options]])
parameters comparestring the string against which the referencestr is compared.
... see the intl.collator() constructor for details on these
parameters and how to use them.
String.prototype.padEnd() - JavaScript
syntax str.padend(targetlength [, padstring])
parameters targetlength the length of the resulting string once the current str has been padded.
...the default value for this
parameter is " " (u+0020).
String.prototype.split() - JavaScript
the division is done by searching for a pattern; where the pattern is provided as the first
parameter in the method's call.
... syntax str.split([separator[, limit]])
parameters separator optional the pattern describing where each split should occur.
TypedArray.prototype.every() - JavaScript
syntax typedarray.every(callback[, thisarg])
parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array.
... if a thisarg
parameter is provided to every, it will be passed to callback when invoked, for use as its this value.
TypedArray.prototype.filter() - JavaScript
syntax typedarray.filter(callback[, thisarg])
parameters callback function to test each element of the typed array.
... callback is invoked with three arguments: the value of the element the index of the element the typed array object being traversed if a thisarg
parameter is provided to filter, it will be passed to callback when invoked, for use as its this value.
TypedArray.prototype.find() - JavaScript
syntax typedarray.find(callback[, thisarg])
parameters callback function to execute on each value in the typed array, taking three arguments: element the current element being processed in the typed array.
... if a thisarg
parameter is provided to find, it will be used as the this for each invocation of the callback.
TypedArray.prototype.findIndex() - JavaScript
syntax typedarray.findindex(callback[, thisarg])
parameters callback function to execute on each value in the typed array, taking three arguments: element the current element being processed in the typed array.
... if a thisarg
parameter is provided to findindex, it will be used as the this for each invocation of the callback.
TypedArray.prototype.forEach() - JavaScript
syntax typedarray.foreach(callback[, thisarg])
parameters callback function that produces an element of the new typed array, taking three arguments: currentvalue the current element being processed in the typed array.
... callback is invoked with three arguments: the element value the element index the typed array being traversed if a thisarg
parameter is provided to foreach(), it will be passed to callback when invoked, for use as its this value.
TypedArray.prototype.map() - JavaScript
syntax typedarray.map(mapfn[, thisarg])
parameters mapfn a callback function that produces an element of the new typed array, taking three arguments: currentvalue the current element being processed in the typed array.
... if a thisarg
parameter is provided to map(), it will be passed to mapfn when invoked, for use as its this value.
TypedArray.prototype.some() - JavaScript
syntax typedarray.some(callback[, thisarg])
parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array.
... if a thisarg
parameter is provided to some, it will be passed to callback when invoked, for use as its this value.
TypedArray.prototype.toLocaleString() - JavaScript
syntax typedarray.tolocalestring([locales [, options]]);
parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
... see the intl.numberformat() constructor for details on these
parameters and how to use them.
TypedArray - JavaScript
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
Uint16Array() constructor - JavaScript
syntax new uint16array(); // new in es2017 new uint16array(length); new uint16array(typedarray); new uint16array(object); new uint16array(buffer [, byteoffset [, length]]);
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
Uint32Array() constructor - JavaScript
syntax new uint32array(); // new in es2017 new uint32array(length); new uint32array(typedarray); new uint32array(object); new uint32array(buffer [, byteoffset [, length]]);
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
Uint8Array() constructor - JavaScript
syntax new uint8array(); // new in es2017 new uint8array(length); new uint8array(typedarray); new uint8array(object); new uint8array(buffer [, byteoffset [, length]]);
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
Uint8ClampedArray() constructor - JavaScript
syntax new uint8clampedarray(); // new in es2017 new uint8clampedarray(length); new uint8clampedarray(typedarray); new uint8clampedarray(object); new uint8clampedarray(buffer [, byteoffset [, length]]);
parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...the byteoffset and length
parameters specify the memory range that will be exposed by the typed array view.
WebAssembly.Memory() constructor - JavaScript
syntax new webassembly.memory(memorydescriptor);
parameters memorydescriptor an object that can contain the following members: initial the initial size of the webassembly memory, in units of webassembly pages.
...when present, the maximum
parameter acts as a hint to the engine to reserve memory up front.
WebAssembly.instantiateStreaming() - JavaScript
syntax promise<resultobject> webassembly.instantiatestreaming(source, importobject);
parameters source a response object or a promise that will fulfill with one, representing the underlying source of a .wasm module you want to stream, compile, and instantiate.
... exceptions if either of the
parameters are not of the correct type or structure, a typeerror is thrown.
encodeURIComponent() - JavaScript
syntax encodeuricomponent(str);
parameters str string.
...imiting uses, the following can be safely used: function fixedencodeuricomponent(str) { return encodeuricomponent(str).replace(/[!'()*]/g, function(c) { return '%' + c.charcodeat(0).tostring(16); }); } examples encoding for content-disposition and link headers the following example provides the special encoding required within utf-8 content-disposition and link server response header
parameters (e.g., utf-8 filenames): var filename = 'my file(2).txt'; var header = "content-disposition: attachment; filename*=utf-8''" + encoderfc5987valuechars(filename); console.log(header); // logs "content-disposition: attachment; filename*=utf-8''my%20file%282%29.txt" function encoderfc5987valuechars(str) { return encodeuricomponent(str).
eval() - JavaScript
syntax eval(string)
parameters string a string representing a javascript expression, statement, or sequence of statements.
...} , false); closures are also helpful as a way to create
parameterized functions without concatenating strings.
isFinite() - JavaScript
if needed, the
parameter is first converted to a number.
... syntax isfinite(testvalue)
parameters testvalue the value to be tested for finiteness.
Pipeline operator (|>) - JavaScript
the result is syntactic sugar in which a function call with a single argument can be written like this: let url = "%21" |> decodeuri; the equivalent call in traditional syntax looks like this: let url = decodeuri("%21"); syntax expression |> function the value of the specified expression is passed into the function as its sole
parameter.
...
parameters expression any valid expression.
function* expression - JavaScript
syntax function* [name]([
param1[,
param2[, ...,
paramn]]]) { statements }
parameters name optional the function name.
...
paramn optional the name of an argument to be passed to the function.
new operator - JavaScript
syntax new constructor[([arguments])]
parameters constructor a class or function that specifies the type of the object instance.
... { this.make = make; this.model = model; this.year = year; this.owner = owner; } to instantiate the new objects, you then use the following: var car1 = new car('eagle', 'talon tsi', 1993, rand); var car2 = new car('nissan', '300zx', 1992, ken); instead of passing a literal string or integer value when creating the new objects, the above statements pass the objects rand and ken as the
parameters for the owners.
async function - JavaScript
syntax async function name([
param[,
param[, ...
param]]]) { statements }
parameters name the function’s name.
...
param the name of an argument to be passed to the function.
import.meta - JavaScript
note that this will include query
parameters and/or hash (i.e., following the ?
... for example, with the following html: <script type="module"> import './index.mjs?someurlinfo=5'; </script> ..the following javascript file will log the `someurlinfo
parameter: // index.mjs new url(import.meta.url).search
params.get('someurlinfo'); // 5 the same applies when a file imports another: // index.mjs import './index2.mjs?someurlinfo=5'; // index2.mjs new url(import.meta.url).search
params.get('someurlinfo'); // 5 note that while node.js will pass on query
parameters (or the hash) as in the latter example, as of node 14.1.0, a url with query
parameters will err when loading in the form node --experimental-modules index.mjs?someurlinfo=5 (it is treated as a file rather than a url in this context).
import - JavaScript
description the name
parameter is the name of the "module object" which will be used as a kind of namespace to refer to the exports.
... the export
parameters specify individual named exports, while the import * as name syntax imports all of them.
Web audio codec guide - Web media technologies
in addition to choosing the type of encoder to use, you may have the opportunity to adjust the encoder using
parameters that choose specific algorithms, tune those algorithms, and specify how many passes to apply while encoding.
... joint stereo can reduce the size of the encoded audio to some extent the
parameters available—and the range of possible values—varies from codec to codec, and even among different encoding utilities for the same codec, so read the documentation that comes with the encoding software you use to learn more.
Web video codec guide - Web media technologies
breaking down the value of the codecs
parameter into its dot-delineated properties, we see the following: value desccription av01 the four-character code (4cc) designation identifying the av1 codec.
... the documentation for your codec choices will probably offer information you'll use when constructing your codecs
parameter.
transform - SVG: Scalable Vector Graphics
if optional
parameters x and y are not supplied, the rotation is about the origin of the current user coordinate system.
... if optional
parameters x and y are supplied, the rotation is about the point (x, y).
SVG documentation index - SVG: Scalable Vector Graphics
30 basefrequency filters, svg, svg attribute the basefrequency attribute represents the base frequency
parameter for the noise function of the <feturbulence> filter primitive.
...some of the
parameters that determine their position and size are given, but an element reference would probably contain more accurate and complete descriptions along with other properties that won't be covered in here.
Web Components
:host(): selects the shadow host of the shadow dom containing the css it is used inside (so you can select a custom element from inside its shadow dom) — but only if the selector given as the function's
parameter matches the shadow host.
... :host-context(): selects the shadow host of the shadow dom containing the css it is used inside (so you can select a custom element from inside its shadow dom) — but only if the selector given as the function's
parameter matches the shadow host's ancestor(s) in the place it sits inside the dom hierarchy.
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
<xsl:apply-imports><xsl:apply-templates><xsl:attribute-set><xsl:attribute><xsl:call-template><xsl:choose><xsl:comment><xsl:copy-of><xsl:copy><xsl:decimal-format><xsl:element><xsl:fallback><xsl:for-each><xsl:if><xsl:import><xsl:include><xsl:key><xsl:message><xsl:namespace-alias><xsl:number><xsl:otherwise><xsl:output><xsl:
param><xsl:preserve-space><xsl:processing-instruction><xsl:sort><xsl:strip-space><xsl:stylesheet><xsl:template><xsl:text><xsl:transform><xsl:value-of><xsl:variable><xsl:when><xsl:with-
param> <xsl:apply-imports> <xsl:apply-templates> <xsl:attribute> <xsl:attribute-set> <xsl:call-template> <xsl:choose> <xsl:comment> <xsl:copy> <xsl:copy-of> <xsl:decimal-format> <xsl:element> <xsl:fallback> ...
...(not supported) <xsl:for-each> <xsl:if> <xsl:import> (mostly supported) <xsl:include> <xsl:key> <xsl:message> <xsl:namespace-alias> (not supported) <xsl:number> (partially supported) <xsl:otherwise> <xsl:output> (partially supported) <xsl:
param> <xsl:preserve-space> <xsl:processing-instruction> <xsl:sort> <xsl:strip-space> <xsl:stylesheet> (partially supported) <xsl:template> <xsl:text> (partially supported) <xsl:transform> <xsl:value-of> (partially supported) <xsl:variable> <xsl:when> <xsl:with-
param> ...
XSLT: Extensible Stylesheet Language Transformations
specifying
parameters using processing instructions firefox allows stylesheet
parameters to be specified when using the <?xml-stylesheet?> processing instruction.
... this is done using the <?xslt-
param?> pi described in this document.
Using the WebAssembly JavaScript API - WebAssembly
now, to help us understand what is going on here, let’s look at the text representation of our wasm module (which we also meet in converting webassembly format to wasm): (module (func $i (import "imports" "imported_func") (
param i32)) (func (export "exported_func") i32.const 42 call $i)) in the second line, you will see that the import has a two-level namespace — the internal function $i is imported from imports.imported_func.
... to create a webassembly global instance from inside your javascript, you use the webassembly.global() constructor, which looks like this: const global = new webassembly.global({value:'i32', mutable:true}, 0); you can see that this takes two
parameters: an object that contains two properties describing the global variable: value: its data type, which can be any data type accepted within webassembly modules — i32, i64, f32, or f64.
Compiling an Existing C Module to WebAssembly - WebAssembly
/github.com/webmproject/libwebp to start off simple, expose webpgetencoderversion() from encode.h to javascript by writing a c file called webp.c: #include "emscripten.h" #include "src/webp/encode.h" emscripten_keepalive int version() { return webpgetencoderversion(); } this is a good simple program to test whether you can get the source code of libwebp to compile, as it doesn't require any
parameters or complex data structures to invoke this function.
...emscripten provides emconfigure and emmake to wrap these commands and inject the appropriate
parameters.
Communicating With Other Scripts - Archive of obsolete content
in this example, "main.js" creates a page-mod to target the page we are interested in: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/talk.html", contentscriptfile: data.url("listen.js") }); the web page "talk.html" creates and dispatches a custom dom event, using initcustomevent()'s detail
parameter to supply the payload: <!doctype html> <html> <head></head> <body> <script> function sendmessage() { var event = document.createevent('customevent'); event.initcustomevent("addon-message", true, true, { hello: 'world' }); document.documentelement.dispatchevent(event); } </script> <button onclick="sendmessage()">send message</button> </bod...
Interacting with page scripts - Archive of obsolete content
in this example, "main.js" creates a page-mod to target the page we are interested in: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/talk.html", contentscriptfile: data.url("listen.js") }); the web page "talk.html" creates and dispatches a custom dom event, using initcustomevent()'s detail
parameter to supply the payload: <!doctype html> <html> <head></head> <body> <script> function sendmessage() { var event = document.createevent('customevent'); event.initcustomevent("addon-message", true, true, { hello: 'world' }); document.documentelement.dispatchevent(event); } </script> <button onclick="sendmessage()">send message</button> </bod...
Modules - Archive of obsolete content
the sandbox constructor takes a url
parameter, which is used to determine the set of privileges for the compartment in which the sandbox will be created.
copy - Archive of obsolete content
method of file object syntax int copy( filespecobject source, filespecobject dest )
parameters the copy method has the following
parameters: source a filespecobject object reprsenting the file to be copied.
dirGetParent - Archive of obsolete content
method of file object syntax filespecobject dirgetparent( filespecobject fileordir );
parameters the dirgetparent method has the following
parameters: fileordir a filespecobject representing the pathname of the file or directory whose parent is being requested.
dirRemove - Archive of obsolete content
method of file object syntax int dirremove( filespecobject dirtoremove [, boolean recursive] );
parameters the dirremove method has the following
parameters: dirtoremove a filespecobject representing the directory to be removed.
dirRename - Archive of obsolete content
method of file object syntax int dirrename( filespecobject directory, string newname );
parameters the dirrename method has the following
parameters: directory a filespecobject representing the directory to be renamed.
diskSpaceAvailable - Archive of obsolete content
method of file object syntax double diskspaceavailable ( string nativefolderpath );
parameters the diskspaceavailable method has the following
parameters: nativefolderpath a string representing the pathname of the partition, a file, or a directory on the partition whose space is being queried.
exists - Archive of obsolete content
method of file object syntax boolean exists( filespecobject target )
parameters the exists method has the following
parameters: target a filespecobject representing the file or directory being tested for existence.
isDirectory - Archive of obsolete content
method of file object syntax boolean isdirectory ( filespecobject nativefolderpath );
parameters the isdirectory method has the following
parameters: nativefolderpath a filespecobject representing the queried directory.
isFile - Archive of obsolete content
method of file object syntax boolean isfile (filespecobject nativefolderpath);
parameters the isfile method has the following
parameter: nativefolderpath a filespecobject representing the queried file object.
macAlias - Archive of obsolete content
method of file object syntax int macalias( filespecobject destdir, string filename, filespecobject aliasdir, string aliasname );
parameters the macalias method has the following
parameters: destdir a filespecobject that represents the directory into which the program file will be installed.
modDate - Archive of obsolete content
method of file object syntax double moddate ( filespecobject nativefolderpath );
parameters the moddate method has the following
parameters: nativefolderpath a filespecobject representing the queried file.
move - Archive of obsolete content
method of file object syntax int move( filespecobject source, filespecobject dest );
parameters the move method has the following
parameters: source a filespecobject representing the source file.
remove - Archive of obsolete content
method of file object syntax int remove( filespecobject file )
parameters the remove method has the following
parameters: file a filespecobject representing the file to be removed.
rename - Archive of obsolete content
method of file object syntax int rename( filespecobject file, string newname )
parameters the rename method has the following
parameters: file a filespecobject representing the file to be renamed.
size - Archive of obsolete content
method of file object syntax int size (string nativefolderpath);
parameters the size method has the following
parameters: nativefolderpath the full pathname to the file.
windowsGetShortName - Archive of obsolete content
method of file object syntax string windowsgetshortname( object localdirspec )
parameters the windowsregisterserver method has the following
parameter: localdirspec a filespecobject representing a directory obtained by getcomponentfolder or getfolder.
deleteKey - Archive of obsolete content
method of winreg object syntax int deletekey ( string subkey);
parameters the method has the following
parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
deleteValue - Archive of obsolete content
method of winreg object syntax int deletevalue ( string subkey, string valname);
parameters the deletevalue method has the following
parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
enumKeys - Archive of obsolete content
method of winreg object syntax string enumkeys ( string key, int subkeyindex );
parameters the enumkeys method has the following
parameters: key the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
enumValueNames - Archive of obsolete content
method of winreg object syntax string enumvaluenames ( string key, int subkeyindex );
parameters the enumvaluenames method has the following
parameters: key the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
getValue - Archive of obsolete content
method of winreg object syntax winregvalue getvalue ( string subkey, string valname);
parameters the getvalue method has the following
parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
getValueNumber - Archive of obsolete content
method of winreg object syntax number getvaluenumber ( string subkey, string valname);
parameters the getvaluestring method has the following
parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
getValueString - Archive of obsolete content
method of winreg object syntax string getvaluestring ( string subkey, string valname);
parameters the getvaluestring method has the following
parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
isKeyWritable - Archive of obsolete content
method of winreg object syntax boolean iskeywritable( string key);
parameters the method has the following
parameter: key a string representing the path to the key returns a boolean value: true if the key is writable; false if not.
keyExists - Archive of obsolete content
method of winreg object syntax boolean keyexists ( string key);
parameters the method has the following
parameter: key a string representing the path to the key returns boolean value description if the user does not have read access to the given key, this will also return false.
setRootKey - Archive of obsolete content
method of winreg object syntax void setrootkey ( int key );
parameters the method has the following
parameter: key an integer representing a root key in the registry.
setValue - Archive of obsolete content
method of winreg object syntax string setvalue ( string subkey, string valname, winregvalue value);
parameters the setvalue method has the following
parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
setValueNumber - Archive of obsolete content
method of winreg object syntax int setvaluenumber ( string subkey, string valname, number value );
parameters the method has the following
parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
setValueString - Archive of obsolete content
method of winreg object syntax int setvaluestring ( string subkey, string valname, string value);
parameters the method has the following
parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
valueExists - Archive of obsolete content
method of winreg object syntax boolean valueexists ( string key, string value );
parameters the method has the following
parameters: key a string representing the path to the key.
WinRegValue - Archive of obsolete content
syntax winregvalue ( int datatype, byte[] regdata);
parameters the winregvalue constructor takes the following
parameter: datatype an integer indicating the type of the data encapsulated by this object.
xulauncher - Archive of obsolete content
#!/bin/bash -e # a simple bash script to create a minimal xulrunner dir structure and # needed meta files in /tmp, copy the xul-file over and start it # usage: # xulauncher xulfile.xul [options] ############################################################################## # check if theres atleast one
parameter ############################################################################## if [ $# -lt 1 ] then echo "you need to give the xul file as first
parameter" exit fi # check if 1st
parameter is a file ############################################################################## if [ !
reftest opportunities files - Archive of obsolete content
l parser/htmlparser/tests/html/pre015.html parser/htmlparser/tests/html/pre012.html parser/htmlparser/tests/html/pre007.html parser/htmlparser/tests/html/pre006.html parser/htmlparser/tests/html/pre005.html parser/htmlparser/tests/html/pre004.html parser/htmlparser/tests/html/pre003.html parser/htmlparser/tests/html/pre002.html parser/htmlparser/tests/html/pre001.html parser/htmlparser/tests/html/
param002.html parser/htmlparser/tests/html/
param001.html parser/htmlparser/tests/html/option.html parser/htmlparser/tests/html/obj003.html parser/htmlparser/tests/html/obj002.html parser/htmlparser/tests/html/obj001.html parser/htmlparser/tests/html/nulltest.html parser/htmlparser/tests/html/newlines.html parser/htmlparser/tests/html/list003.html parser/htmlparser/tests/html/list002.html parser/htmlpar...
xbDesignMode.js - Archive of obsolete content
cument; this.meditordocument.designmode = "on"; } else { // ie this.meditordocument = this.miframeelement.contentwindow.document; this.meditordocument.designmode = "on"; // ie needs to reget the document element after designmode was set this.meditordocument = this.miframeelement.contentwindow.document; } } xbdesignmode.prototype.execcommand = function (acommandname, a
param){ if (this.meditordocument) this.meditordocument.execcommand(acommandname, false, a
param); else throw "no meditordocument found"; } xbdesignmode.prototype.setcsscreation = function (ausecss){ if (this.meditordocument) this.meditordocument.execcommand("usecss", false, ausecss); else throw "no meditordocument found"; } ...
NPN_CreateObject - Archive of obsolete content
syntax #include <npruntime.h> npobject *npn_createobject(npp npp, npclass *aclass);
parameters the function has the following
parameters: <tt>npp</tt> the npp indicating which plugin wants to instantiate the object.
NPN_DestroyStream - Archive of obsolete content
syntax #include <npapi.h> nperror npn_destroystream(npp instance, npstream* stream, nperror reason);
parameters the function has the following
parameters: instance pointer to current plug-in instance.
NPN_Evaluate - Archive of obsolete content
syntax #include <npruntime.h> bool npn_evaluate(npp npp, npobject *npobj, npstring *script, npvariant *result);
parameters the function has the following
parameters: npp the npp indicating which plugin instance's window to evaluate the script in.
NPN_ForceRedraw - Archive of obsolete content
syntax #include <npapi.h> void npn_forceredraw(npp instance);
parameters the function has the following
parameters: instance plug-in instance for which the function forces redrawing.
NPN_GetIntIdentifier - Archive of obsolete content
syntax #include <npruntime.h> npidentifier npn_getintidentifier(int32_t intid);
parameters the function has the following
parameter: <tt>intid</tt> the integer for which an opaque identifier should be returned.
NPN_GetProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_getproperty(npp npp, npobject *npobj, npidentifier propertyname, npvariant *result);
parameters the function has the following
parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
NPN_GetStringIdentifier - Archive of obsolete content
syntax #include <npruntime.h> npidentifier npn_getstringidentifier(const nputf8 *name);
parameters the function has the following
parameters: <tt>name</tt> the string for which an opaque identifier should be returned.
NPN_GetStringIdentifiers - Archive of obsolete content
syntax #include <npruntime.h> void npn_getstringidentifiers(const nputf8 **names, int32_t namecount, npidentifier *identifiers);
parameters the function has the following
parameters: names an array of strings for which opaque identifiers should be returned.
NPN_HasMethod - Archive of obsolete content
syntax #include <npruntime.h> bool npn_hasmethod(npp npp, npobject *npobj, npidentifier methodname);
parameters the function has the following
parameters: npp the npp indicating which plugin instance is making the request.
NPN_HasProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_hasproperty(npp npp, npobject *npobj, npidentifier propertyname);
parameters the function has the following
parameters: <tt>npp</tt> the npp indicating which plugin instance is making the request.
NPN_IntFromIdentifier - Archive of obsolete content
syntax #include <npruntime.h> int32_t npn_intfromidentifier(npidentifier identifier);
parameters the function has the following
parameter: <tt>identifier</tt> the integer identifier whose corresponding integer value should be returned.
NPN_InvalidateRect - Archive of obsolete content
syntax #include <npapi.h> void npn_invalidaterect(npp instance, nprect *invalidrect);
parameters the function has the following
parameters: instance pointer to the plug-in instance to invalidate a portion of.
NPN_MemAlloc - Archive of obsolete content
syntax #include <npapi.h> void *npn_memalloc (uint32 size);
parameters the function has the following
parameters: size size of memory, in bytes, to allocate in the browser's memory space.
NPN_MemFlush - Archive of obsolete content
syntax #include <npapi.h> uint32 npn_memflush(uint32 size);
parameters the function has the following
parameters: size size of memory, in bytes, to free in the browser's memory space.
NPN_MemFree - Archive of obsolete content
syntax #include <npapi.h> void npn_memfree (void* ptr);
parameters the function has the following
parameters: ptr block of memory previously allocated using npn_memalloc.
NPN_ReleaseObject - Archive of obsolete content
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.
NPN_RemoveProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_removeproperty(npp npp, npobject *npobj, npidentifier propertyname);
parameters the function has the following
parameters: npp the npp indicating which plugin instance is making the request.
NPN_RequestRead - Archive of obsolete content
syntax #include <npapi.h> nperror npn_requestread(npstream* stream, npbyterange* rangelist);
parameters the function has the following
parameters: stream stream of type np_seek from which to read bytes.
NPN_SetException - Archive of obsolete content
syntax #include <npruntime.h> void npn_setexception(npobject *npobj, const nputf8 *message);
parameters the function has the following
parameters: <tt>npobj</tt> the object on which the exception occurred.
NPN_SetProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_setproperty(npp npp, npobject *npobj, npidentifier propertyname, const npvariant *value);
parameters the function has the following
parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
NPN_SetValueForURL - Archive of obsolete content
ave much meaning given how proxies are configured, and is not supported.) syntax #include <npapi.h> typedef enum { npnurlvcookie = 501, npnurlvproxy } npnurlvariable; nperror npn_setvalueforurl(npp instance, npnurlvariable variable, const char *url, const char *value, uint32_t len);
parameters this function has the following
parameters: instance pointer to the current plug-in instance.
PL_HashTableAdd
syntax #include <plhash.h> plhashentry *pl_hashtableadd( plhashtable *ht, const void *key, void *value);
parameters the function has the following
parameters: ht a pointer to the the hash table to which to add the entry.
PL_HashTableDestroy
syntax #include <plhash.h> void pl_hashtabledestroy(plhashtable *ht);
parameter the function has the following
parameter: ht a pointer to the hash table to be destroyed.
PL_HashTableEnumerateEntries
syntax #include <plhash.h> printn pl_hashtableenumerateentries( plhashtable *ht, plhashenumerator f, void *arg);
parameters the function has the following
parameters: ht a pointer to the hash table whose entries are to be enumerated.
PL_HashTableLookup
syntax #include <plhash.h> void *pl_hashtablelookup( plhashtable *ht, const void *key);
parameters the function has the following
parameters: ht a pointer to the hash table in which to look up the entry specified by key.
PL_HashTableRemove
syntax #include <plhash.h> prbool pl_hashtableremove( plhashtable *ht, const void *key);
parameters the function has the following
parameters: ht a pointer to the hash table from which to remove the entry.
PL_NewHashTable
syntax #include <plhash.h> plhashtable *pl_newhashtable( pruint32 numbuckets, plhashfunction keyhash, plhashcomparator keycompare, plhashcomparator valuecompare, const plhashallocops *allocops, void *allocpriv );
parameters the function has the following
parameters: numbuckets the number of buckets in the hash table.
PL_strdup
syntax #include <plstr.h> char *pl_strdup(const char *s);
parameter the function has a single
parameter: s the string to copy, may be null.
PL_strfree
syntax void pl_strfree(char *s);
parameter the function has these
parameter: s pointer to the string to be freed.
PL_strlen
returns the length of a specified string (not including the trailing '\0') syntax pruint32 pl_strlen(const char *str);
parameter the function has these
parameter: str size in bytes of item to be allocated.
PRAccessHow
this is the declaration for the enumeration praccesshow, used in the how
parameter of pr_access: #include <prio.h> typedef enum praccesshow { pr_access_exists = 1, pr_access_write_ok = 2, pr_access_read_ok = 3 } praccesshow; see pr_access for what each of these values mean.
PRBool
otherwise, use prbool for variables and
parameter types.
PRFileDesc
syntax #include <prio.h> struct prfiledesc { priomethods *methods; prfileprivate *secret; prfiledesc *lower, *higher; void (*dtor)(prfiledesc *fd); prdescidentity identity; }; typedef struct prfiledesc prfiledesc;
parameters methods the i/o methods table.
PRIOMethods
tfn accept; prbindfn bind; prlistenfn listen; prshutdownfn shutdown; prrecvfn recv; prsendfn send; prrecvfromfn recvfrom; prsendtofn sendto; prpollfn poll; pracceptreadfn acceptread; prtransmitfilefn transmitfile; prgetsocknamefn getsockname; prgetpeernamefn getpeername; prgetsockoptfn getsockopt; prsetsockoptfn setsockopt; }; typedef struct priomethods priomethods;
parameters file_type type of file represented (tos).
PRThread
this pointer is a required
parameter for most of the functions that operate on threads.
PRThreadScope
the scope of an nspr thread, specified as a
parameter to pr_createthread or returned by pr_getthreadscope.
PRThreadType
the type of an nspr thread, specified as a
parameter to pr_createthread.
PR_APPEND_LINK
syntax #include <prclist.h> pr_append_link ( prclist *elemp, prclist *listp);
parameters elemp a pointer to the element to be inserted.
PR_Access
syntax #include <prio.h> prstatus pr_access( const char *name, praccesshow how);
parameters the function has the following
parameters: name the pathname of the file whose accessibility is to be determined.
PR_Assert
syntax #include <prlog.h> void pr_assert ( const char *s, const char *file, printn ln);
parameters the function has these
parameters: s a string to be displayed in the log.
PR_AtomicAdd
syntax #include <pratom.h> print32 pr_atomicadd( print32 *ptr, print32 val);
parameter the function has the following
parameters: ptr a pointer to the value to increment.
PR_AtomicDecrement
syntax #include <pratom.h> print32 pr_atomicdecrement(print32 *val);
parameter the function has the following
parameter: val a pointer to the value to decrement.
PR_AtomicIncrement
syntax #include <pratom.h> print32 pr_atomicincrement(print32 *val);
parameter the function has the following
parameter: val a pointer to the value to increment.
PR_AttachSharedMemory
syntax #include <prshm.h> nspr_api( void * ) pr_attachsharedmemory( prsharedmemory *shm, printn flags ); /* define values for pr_attachsharedmemory(...,flags) */ #define pr_shm_readonly 0x01
parameters the function has these
parameters: shm the handle returned from pr_opensharedmemory.
PR_AttachThread
syntax #include <pprthread.h> prthread* pr_attachthread( prthreadtype type, prthreadpriority priority, prthreadstack *stack);
parameters pr_attachthread has the following
parameters: type specifies that the thread is either a user thread (pr_user_thread) or a system thread (pr_system_thread).
PR_Available
syntax #include <prio.h> print32 pr_available(prfiledesc *fd);
parameter the function has the following
parameter: fd pointer to a prfiledesc object representing a file or socket.
PR_Available64
syntax #include <prio.h> print64 pr_available64(prfiledesc *fd);
parameter the function has the following
parameter: fd pointer to a prfiledesc object representing a file or socket.
PR_Bind
syntax #include <prio.h> prstatus pr_bind( prfiledesc *fd, const prnetaddr *addr);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing a socket.
PR_Calloc
syntax #include <prmem.h> void *pr_calloc ( pruint32 nelem, pruint32 elsize);
parameters nelem the number of elements of size elsize to be allocated.
PR_CLIST_IS_EMPTY
syntax #include <prclist.h> printn pr_clist_is_empty (prclist *listp);
parameter listp a pointer to the linked list.
PR_CallOnce
syntax prstatus pr_callonce( prcalloncetype *once, prcalloncefn func);
parameters pr_callonce has these
parameters: once a pointer to an object of type prcalloncetype.
PR_CancelJob
syntax #include <prtpool.h> nspr_api(prstatus) pr_canceljob(prjob *job);
parameter the function has the following
parameter: job a pointer to a prjob structure returned by a pr_queuejob function representing the job to be cancelled.
PR_CloseDir
syntax #include <prio.h> prstatus pr_closedir(prdir *dir);
parameter the function has the following
parameter: dir a pointer to a prdir structure representing the directory to be closed.
PR_CloseFileMap
syntax #include <prio.h> prstatus pr_closefilemap(prfilemap *fmap);
parameter the function has the following
parameter: fmap the file mapping to be closed.
PR_CloseSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_closesemaphore(prsem *sem);
parameter the function has the following
parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
PR_CloseSharedMemory
syntax #include <prshm.h> nspr_api( prstatus ) pr_closesharedmemory( prsharedmemory *shm );
parameter the function has these
parameter: shm the handle returned from pr_opensharedmemory.
PR_Connect
syntax #include <prio.h> prstatus pr_connect( prfiledesc *fd, const prnetaddr *addr, printervaltime timeout);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing a socket.
PR_ConnectContinue
syntax #include <prio.h> prstatus pr_connectcontinue( prfiledesc *fd, print16 out_flags);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing a socket.
PR ConvertIPv4AddrToIPv6
syntax #include <prnetdb.h> void pr_convertipv4addrtoipv6( pruint32 v4addr, pripv6addr *v6addr );
parameters the function has the following
parameters: v4addr the ipv4 address to convert into an ipv4-mapped ipv6 address.
PR_CreateIOLayerStub
syntax #include <prio.h> prfiledesc* pr_createiolayerstub( prdescidentity ident priomethods const *methods);
parameters the function has the following
parameters: ident the identity to be associated with the new layer.
PR_CreateThreadPool
syntax #include <prtpool.h> nspr_api(prthreadpool *) pr_createthreadpool( print32 initial_threads, print32 max_threads, pruint32 stacksize );
parameters the function has the following
parameters: initial_threads the number of threads to be created within this thread pool.
PR_DELETE
syntax #include <prmem.h> void pr_delete(_ptr);
parameter _ptr the address of memory to be returned to the heap.
PR_Delete
syntax #include <prio.h> prstatus pr_delete(const char *name);
parameters the function has the following
parameter: name the pathname of the file to be deleted.
PR_DeleteSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_deletesemaphore(const char *name);
parameter the function has the following
parameter: name the name of a semaphore that was previously created via a call to pr_opensemaphore.
PR_DeleteSharedMemory
syntax #include <prshm.h> nspr_api( prstatus ) pr_deletesharedmemory( const char *name );
parameter the function has these
parameter: shm the handle returned from pr_opensharedmemory.
PR_DestroyCondVar
syntax #include <prcvar.h> void pr_destroycondvar(prcondvar *cvar);
parameter pr_destroycondvar has one
parameter: cvar a pointer to the condition variable object to be destroyed.
PR_GetDescType
syntax #include <prio.h> prdesctype pr_getdesctype(prfiledesc *file);
parameter the function has the following
parameter: file a pointer to a prfiledesc object whose descriptor type is to be returned.
PR_GetErrorText
syntax #include <prerror.h> print32 pr_geterrortext(char *text);
parameters the function has one
parameter: text on output, the array pointed to contains the thread's current error text.
PR_GetFileInfo
syntax #include <prio.h> prstatus pr_getfileinfo( const char *fn, prfileinfo *info);
parameters the function has the following
parameters: fn the pathname of the file to get information about.
PR_GetFileInfo64
syntax #include <prio.h> prstatus pr_getfileinfo64( const char *fn, prfileinfo64 *info);
parameters the function has the following
parameters: fn the pathname of the file to get information about.
PR_GetInheritedFileMap
syntax #include <prshma.h> nspr_api( prfilemap *) pr_getinheritedfilemap( const char *shmname );
parameter the function has the following
parameter: shmname the name provided to pr_processattrsetinheritablefilemap.
PR_GetLayersIdentity
syntax #include <prio.h> prdescidentity pr_getlayersidentity(prfiledesc* fd);
parameter the function has the following
parameter: fd a pointer to a file descriptor.
PR_GetLibraryName
syntax #include <prlink.h> char* pr_getlibraryname ( const char *dir, const char *lib);
parameters the function has these
parameters: dir a null-terminated string representing the path name of the library, as returned by pr_getlibrarypath.
PR_GetLibraryPath
syntax #include <prlink.h> char* pr_getlibrarypath(void);
parameters the function has no
parameters.
PR_GetNameForIdentity
syntax #include <prio.h> const char* pr_getnameforidentity(prdescidentity ident);
parameter the function has the following
parameter: ident a layer's identity.
PR_GetOpenFileInfo
syntax #include <prio.h> prstatus pr_getopenfileinfo( prfiledesc *fd, prfileinfo *info);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object for an open file.
PR_GetOpenFileInfo64
syntax #include <prio.h> prstatus pr_getopenfileinfo64( prfiledesc *fd, prfileinfo *info);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object for an open file.
PR_GetPeerName
syntax #include <prio.h> prstatus pr_getpeername( prfiledesc *fd, prnetaddr *addr);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing a socket.
PR_GetRandomNoise
syntax #include <prrng.h> nspr_api(prsize) pr_getrandomnoise( void *buf, prsize size );
parameters the function has these
parameters: buf a pointer to a caller-supplied buffer to contain the generated random number.
PR_GetSockName
syntax #include <prio.h> prstatus pr_getsockname( prfiledesc *fd, prnetaddr *addr);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing the socket.
PR_GetThreadPriority
syntax #include <prthread.h> prthreadpriority pr_getthreadpriority(prthread *thread);
parameter pr_getthreadpriority has the following
parameter: thread a valid identifier for the thread whose priority you want to know.
PR_PopIOLayer
syntax #include <prio.h> prfiledesc *pr_popiolayer( prfiledesc *stack, prdescidentity id);
parameters the function has the following
parameters: stack a pointer to a prfiledesc object representing the stack from which the specified layer is to be removed.
PR_PostSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_postsemaphore(prsem *sem);
parameter the function has the following
parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
PR_ProcessAttrSetInheritableFileMap
syntax #include <prshma.h> nspr_api(prstatus) pr_processattrsetinheritablefilemap( prprocessattr *attr, prfilemap *fm, const char *shmname );
parameters the function has the following
parameters: attr pointer to a prprocessattr structure used to pass data to pr_createprocess.
PR_ProcessExit
syntax #include <prinit.h> void pr_processexit(printn status);
parameter pr_processexit has one
parameter: status the exit status code of the process.
PR_QueueJob
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob( prthreadpool *tpool, prjobfn fn, void *arg, prbool joinable );
parameters the function has the following
parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Accept
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_accept( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable );
parameters the function has the following
parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Connect
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_connect( prthreadpool *tpool, prjobiodesc *iod, const prnetaddr *addr, prjobfn fn, void * arg, prbool joinable );
parameters the function has the following
parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Read
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_read( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable );
parameters the function has the following
parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Timer
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_timer( prthreadpool *tpool, printervaltime timeout, prjobfn fn, void * arg, prbool joinable );
parameters the function has the following
parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Write
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_write( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable );
parameters the function has the following
parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_Realloc
syntax #include <prmem.h> void *pr_realloc ( void *ptr, pruint32 size);
parameters ptr a pointer to the existing memory block being resized.
PR_REMOVE_AND_INIT_LINK
syntax #include <prclist.h> pr_remove_and_init_link (prclist *elemp);
parameter elemp a pointer to the element.
PR_REMOVE_LINK
syntax #include <prclist.h> pr_remove_link (prclist *elemp);
parameter elemp a pointer to the element.
PR_Read
syntax #include <prio.h> print32 pr_read(prfiledesc *fd, void *buf, print32 amount);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object for the file or socket.
PR_Recv
syntax #include <prio.h> print32 pr_recv( prfiledesc *fd, void *buf, print32 amount, printn flags, printervaltime timeout);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing a socket.
PR_Rename
syntax #include <prio.h> prstatus pr_rename( const char *from, const char *to);
parameters the function has the following
parameters: from the old name of the file to be renamed.
PR_RmDir
syntax #include <prio.h> prstatus pr_rmdir(const char *name);
parameter the function has the following
parameter: name the name of the directory to be removed.
PR_STATIC_ASSERT
syntax #include <prlog.h> pr_static_assert ( expression );
parameters the macro has this
parameter: expression any valid expression which evaluates at compile-time to true or false.
PR_SetConcurrency
syntax #include <prinit.h> void pr_setconcurrency(pruintn numcpus);
parameter pr_setconcurrency has one
parameter: numcpus the number of extra virtual processor threads to be created.
PR_SetError
syntax #include <prerror.h> void pr_seterror(prerrorcode errorcode, print32 oserr)
parameters the function has these
parameters: errorcode the nspr (platform-independent) translation of the error.
PR_SetErrorText
syntax #include <prerror.h> void pr_seterrortext(printn textlength, const char *text)
parameters the function has these
parameters: textlength the length of the text in the text.
PR_SetLibraryPath
syntax #include <prlink.h> prstatus pr_setlibrarypath(const char *path);
parameters the function has this
parameter: path a pointer to a character array that contains the directory path that the application should use as a default.
PR_SetLogBuffering
syntax #include <prlog.h> void pr_setlogbuffering(printn buffer_size);
parameters the function has this
parameter: buffer_size the size of the buffer to be used for logging.
PR_SetLogFile
syntax #include <prlog.h> prbool pr_setlogfile(const char *name);
parameters the function has this
parameter: name the name of the log file.
PR_SetPollableEvent
syntax nspr_api(prstatus) pr_setpollableevent(prfiledesc *event);
parameter the function has the following
parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent.
PR_SetThreadPrivate
syntax #include <prthread.h> prstatus pr_setthreadprivate(pruintn index, void *priv);
parameters pr_setthreadprivate has the following
parameters: index an index into the per-thread private data table.
PR_Shutdown
syntax #include <prio.h> prstatus pr_shutdown( prfiledesc *fd, prshutdownhow how);
parameters the function has the following
parameters: fd a pointer to a prfiledesc object representing a connected socket.
PR_ShutdownThreadPool
syntax #include <prtpool.h> nspr_api(prstatus) pr_shutdownthreadpool( prthreadpool *tpool );
parameter the function has the following
parameter: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_StringToNetAddr
syntax #include <prnetdb.h> prstatus pr_stringtonetaddr( const char *string, prnetaddr *addr);
parameters the function has the following
parameters: string the string to be converted.
PR_Sync
syntax #include <prio.h> prstatus pr_sync(prfiledesc *fd);
parameter the function has the following
parameter: fd pointer to a prfiledesc object representing a file.
PR_UnloadLibrary
syntax #include <prlink.h> prstatus pr_unloadlibrary(prlibrary *lib);
parameters the function has this
parameter: lib a reference previously returned from pr_loadlibrary.
PR_Unlock
syntax #include <prlock.h> prstatus pr_unlock(prlock *lock);
parameter pr_unlock has one
parameter: lock a pointer to a lock object to be released.
PR_VersionCheck
syntax #include <prinit.h> prbool pr_versioncheck(const char *importedversion);
parameter pr_versioncheck has one
parameter: importedversion the version of the shared library being imported.
PR_WaitForPollableEvent
syntax nspr_api(prstatus) pr_waitforpollableevent(prfiledesc *event);
parameter the function has the following
parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent.
PR_WaitSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_waitsemaphore(prsem *sem);
parameter the function has the following
parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
PR_Write
syntax #include <prio.h> print32 pr_write( prfiledesc *fd, const void *buf, print32 amount);
parameters the function has the following
parameters: fd a pointer to the prfiledesc object for a file or socket.
PR_cnvtf
syntax #include <prdtoa.h> void pr_cnvtf ( char *buf, printn bufsz, printn prcsn, prfloat64 fval);
parameters the function has these
parameters: buf the address of the buffer in which to store the result.
NSPR API Reference
dresses memory-mapped i/o functions anonymous pipe function polling functions pollable events manipulating layers network addresses network address types and constants network address functions atomic operations pr_atomicincrement pr_atomicdecrement pr_atomicset interval timing interval time type and constants interval functions date and time types and constants time
parameter callback functions functions memory management operations memory allocation functions memory allocation macros string operations pl_strlen pl_strcpy pl_strdup pl_strfree floating point number to string conversion pr_strtod pr_dtoa pr_cnvtf long long (64-bit) integers bitmaps formatted printing linked lists linked list types prclist linked list macros...
CERT_FindCertByDERCert
syntax #include <cert.h> certcertificate *cert_findcertbydercert( certcertdbhandle *handle, secitem *dercert );
parameters handle in pointer to a certcertdbhandle representing the certificate database to look in dercert in pointer to an secitem whose type must be sidercertbuffer and whose data contains a der-encoded certificate description this function looks in the ?nsscryptocontext?
CERT_FindCertByIssuerAndSN
syntax #include <cert.h> certcertificate *cert_findcertbyissuerandsn ( certcertdbhandle *handle, certissuerandsn *issuerandsn );
parameters handle in pointer to a certcertdbhandle representing the certificate database to look in issuerandsn in pointer to a certissuerandsn that must be properly formed to contain the issuer name and the serial number (see [example]) description this function creates a certificate key using the issuerandsn and it then uses the key to find the matching certificate in the database.
4.3 Release Notes
new sqlite-based shareable certificate and key databases by prepending the string "sql:" to the directory path passed to configdir
parameter for crypomanager.initialize method or using the nss environment variable nss_default_db_type.
NSS_3.12.2_release_notes.html
bug 200704: pkcs11: invalid session handle 0 bug 205434: fully implement new libpkix cert verification api from bug 294531 bug 302670: use the installed libz.so where available bug 305693: shlibsign generates pqg for every run bug 311483: exposing includecertchain as a
parameter to sec_pkcs12addcertandkey bug 390527: get rid of pkixerrormsg variable in pkix_error bug 391560: libpkix does not consistently return pkix_validatenode tree that truly represent failure reasons bug 408260: certutil usage doesn't give enough information about trust arguments bug 412311: replace pr_interval_no_wait with pr_interval_no_timeout in client initialization calls bug 423839...
NSS 3.12.4 release notes
put file bug 493364: can't build with --disable-dbm option when not cross-compiling bug 493693: sse2 instructions for bignum are not implemented on os/2 bug 493912: sqlite3_reset should be invoked in sdb_findobjectsinit when error occurs bug 494073: update rsa/dsa powerupself tests to be compliant for 2011 bug 494087: passing null as the value of cert_pi_trustanchors causes a crash in cert_pkixset
param bug 494107: during nss_nodb_init(), softoken tries but fails to load libsqlite3.so crash [@ @0x0 ] bug 495097: sdb_mapsqlerror returns signed int bug 495103: nss_initreadwrite(sql:<dbdir>) causes nss to look for sql:<dbdir>/libnssckbi.so bug 495365: add const to the 'nickname'
parameter of sec_certnicknameconflict bug 495656: nss_initreadwrite(sql:<configdir>) leaves behind a pkcs11.txu file if l...
NSS 3.14.2 release notes
bug 373108 - fixed a bug where, under certain circumstances, when applications supplied invalid/out-of-bounds
parameters for aes encryption, a double free may occur.
NSS 3.14.3 release notes
new types ck_nss_mac_constant_time_
params -
parameters for use with ckm_nss_hmac_constant_time and ckm_nss_ssl3_mac_constant_time.
NSS 3.14 release notes
the following types have been added in nss 3.14 certchainverifycallback (in certt.h) certchainverifycallbackfunc (in certt.h) cert_pi_chainverifycallback, a new option for certval
paramintype (in certt.h) a new error code: sec_error_application_callback_error (in secerr.h) new for pkcs #11 pkcs #11 mechanisms: ckm_aes_cts ckm_aes_ctr ckm_aes_gcm (see warnings against using c_encryptupdate/c_decryptupdate above) ckm_sha224_key_derivation ckm_sha256_key_derivation ckm_sha384_key_derivation ...
NSS 3.17 release notes
new macros in ssl.h ssl_reuse_server_ecdhe_key notable changes in nss 3.17 the manual pages for the certutil and pp tools have been updated to document the new
parameters that had been added in nss 3.16.2.
NSS 3.45 release notes
arily strip leading 0's from key material during pkcs11 import (cve-2019-11719) bug 1515342 - more thorough input checking (cve-2019-11729) bug 1552208 - prohibit use of rsassa-pkcs1-v1_5 algorithms in tls 1.3 (cve-2019-11727) bug 1227090 - fix a potential divide-by-zero in makepfromqandseed from lib/freebl/pqg.c (static analysis) bug 1227096 - fix a potential divide-by-zero in pqg_verify
params from lib/freebl/pqg.c (static analysis) bug 1509432 - de-duplicate code between mp_set_long and mp_set_ulong bug 1515011 - fix a mistake with chacha20-poly1305 test code where tags could be faked.
NSS 3.48 release notes
er than 1.3 after helloretryrequest bug 1596450 - added a simplified and unified mac implementation for hmac and cmac behind pkcs#11 bug 1522203 - remove an old pentium pro performance workaround bug 1592557 - fix prng known-answer-test scripts bug 1586176 - encryptupdate should use maxout not block size (cve-2019-11745) bug 1593141 - add `notbefore` or similar "beginning-of-validity-period"
parameter to mozilla::pkix::trustdomain::checkrevocation bug 1591363 - fix a pbkdf2 memory leak in nsc_generatekey if key length > max_key_len (256) bug 1592869 - use arm neon for ctr_xor bug 1566131 - ensure sha-1 fallback disabled in tls 1.2 bug 1577803 - mark pkcs#11 token as friendly if it implements ckp_public_certificates_token bug 1566126 - power ghash vector acceleration bug 1589073 - use...
NSS 3.52 release notes
note: this change modifies the ck_gcm_
params struct to include the ulivbits field which, prior to pkcs #11 v3.0, was ambiguously defined and not included in the nss definition.
NSS 3.53 release notes
bugs fixed in nss 3.53 bug 1640260 - initialize pbe
params (asan fix) bug 1618404 - set cka_nss_server_distrust_after for symantec root certs bug 1621159 - set cka_nss_server_distrust_after for consorci aoc, grca, and sk id root certs bug 1629414 - ppc64: correct compilation error between vmx vs.
nss tech note2
display the sequence of pkcs #11 calls, and the
parameters given to them.
PKCS11 FAQ
does nss support the use of pkcs #11 callbacks specified in the pnotify and papplication
parameters for c_opensession?
PKCS11 Implement
the nss always passes null, as required by the pkcs #11 specification, in the single c_initialize
parameter preserved.
FC_CancelFunction
name fc_cancelfunction - cancel a function running in parallel syntax ck_rv fc_cancelfunction( ck_session_handle hsession );
parameters hsession [in] session handle.
FC_CloseAllSessions
syntax ck_rv fc_closeallsessions( ck_slot_id slotid );
parameters slotid [in] the id of the token's slot.
FC_CloseSession
syntax ck_rv fc_closesession( ck_session_handle hsession );
parameters hsession [in] the session handle to be closed.
FC_CopyObject
syntax ck_rv fc_copyobject( ck_session_handle hsession, ck_object_handle hobject, ck_attribute_ptr ptemplate, ck_ulong uscount, ck_object_handle_ptr phnewobject );
parameters hsession [in] session handle.
FC_CreateObject
syntax ck_rv fc_createobject( ck_session_handle hsession, ck_attribute_ptr ptemplate, ck_ulong ulcount, ck_object_handle_ptr phobject );
parameters hsession [in] session handle.
FC_Decrypt
syntax ck_rv fc_decrypt( ck_session_handle hsession, ck_byte_ptr pencrypteddata, ck_ulong usencrypteddatalen, ck_byte_ptr pdata, ck_ulong_ptr pusdatalen );
parameters hsession [in] session handle.
FC_DecryptDigestUpdate
name fc_decryptdigestupdate - continue a multi-part decrypt and digest operation syntax ck_rv fc_decryptdigestupdate( ck_session_handle hsession, ck_byte_ptr pencryptedpart, ck_ulong ulencryptedpartlen, ck_byte_ptr ppart, ck_ulong_ptr pulpartlen );
parameters hsession [in] session handle.
FC_DecryptFinal
syntax ck_rv fc_decryptfinal( ck_session_handle hsession, ck_byte_ptr plastpart, ck_ulong_ptr puslastpartlen );
parameters hsession [in] session handle.
FC_DecryptInit
syntax ck_rv fc_decryptinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey );
parameters hsession [in] session handle.
FC_DecryptUpdate
syntax ck_rv fc_decryptupdate( ck_session_handle hsession, ck_byte_ptr pencryptedpart, ck_ulong usencryptedpartlen, ck_byte_ptr ppart, ck_ulong_ptr puspartlen );
parameters hsession [in] session handle.
FC_DecryptVerifyUpdate
name fc_decryptverifyupdate - continue a multi-part decrypt and verify operation syntax ck_rv fc_decryptverifyupdate( ck_session_handle hsession, ck_byte_ptr pencrypteddata, ck_ulong ulencrypteddatalen, ck_byte_ptr pdata, ck_ulong_ptr puldatalen );
parameters hsession [in] session handle.
FC_DeriveKey
name fc_derivekey - derive a key from a base key syntax ck_rv fc_derivekey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hbasekey, ck_attribute_ptr ptemplate, ck_ulong usattributecount, ck_object_handle_ptr phkey );
parameters hsession [in] session handle.
FC_DestroyObject
syntax ck_rv fc_destroyobject( ck_session_handle hsession, ck_object_handle hobject );
parameters hsession [in] session handle.
FC_Digest
syntax ck_rv fc_digest( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr pdigest, ck_ulong_ptr pusdigestlen );
parameters hsession [in] session handle.
FC_DigestEncryptUpdate
name fc_digestencryptupdate - continue a multi-part digest and encryption operation syntax ck_rv fc_digestencryptupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong ulpartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pulencryptedpartlen );
parameters hsession [in] session handle.
FC_DigestFinal
syntax ck_rv fc_digestfinal( ck_session_handle hsession, ck_byte_ptr pdigest, ck_ulong_ptr puldigestlen );
parameters hsession [in] session handle.
FC_DigestInit
syntax ck_rv fc_digestinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism );
parameters hsession [in] session handle.
FC_DigestKey
syntax ck_rv fc_digestkey( ck_session_handle hsession, ck_object_handle hkey );
parameters hsession [in] session handle.
FC_DigestUpdate
syntax ck_rv fc_digestupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong uspartlen );
parameters hsession [in] session handle.
FC_Encrypt
syntax ck_rv fc_encrypt( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr pencrypteddata, ck_ulong_ptr pusencrypteddatalen );
parameters hsession [in] session handle.
FC_EncryptFinal
syntax ck_rv fc_encryptfinal( ck_session_handle hsession, ck_byte_ptr plastencryptedpart, ck_ulong_ptr puslastencryptedpartlen );
parameters hsession [in] session handle.
FC_EncryptInit
syntax ck_rv fc_encryptinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey );
parameters hsession[in] handle to the session.
FC_EncryptUpdate
syntax ck_rv fc_encryptupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong uspartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pusencryptedpartlen );
parameters hsession [in] session handle.
FC_Finalize
syntax ck_rv fc_finalize (ck_void_ptr preserved);
parameters fc_finalize has one
parameter: preserved must be null description fc_finalize shuts down the nss cryptographic module in the fips mode of operation.
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 usmaxobjectcount, ck_ulong_ptr pusobjectcount );
parameters hsession [in] session handle.
FC_FindObjectsFinal
syntax ck_rv fc_findobjectsfinal( ck_session_handle hsession, );
parameters hsession [in] session handle.
FC_GenerateKey
name fc_generatekey - generate a new key syntax ck_rv fc_generatekey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_attribute_ptr ptemplate, ck_ulong ulcount, ck_object_handle_ptr phkey );
parameters hsession [in] session handle.
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 uspublickeyattributecount, ck_attribute_ptr pprivatekeytemplate, ck_ulong usprivatekeyattributecount, ck_object_handle_ptr phpublickey, ck_object_handle_ptr phprivatekey );
parameters hsession [in] session handle.
FC_GenerateRandom
syntax ck_rv fc_generaterandom( ck_session_handle hsession, ck_byte_ptr prandomdata, ck_ulong ulrandomlen );
parameters hsession [in] session handle.
FC_GetAttributeValue
syntax ck_rv fc_getattributevalue( ck_session_handle hsession, ck_object_handle hobject, ck_attribute_ptr ptemplate, ck_ulong uscount );
parameters hsession [in] session handle.
FC_GetFunctionList
syntax ck_rv fc_getfunctionlist(ck_function_list_ptr *ppfunctionlist);
parameters fc_getfunctionlist has one
parameter: ppfunctionlist [output] the address of a variable that will receive a pointer to the list of function pointers.
FC_GetFunctionStatus
name fc_getfunctionstatus - get the status of a function running in parallel syntax ck_rv fc_getfunctionstatus( ck_session_handle hsession );
parameters hsession [in] session handle.
FC_GetInfo
syntax ck_rv fc_getinfo(ck_info_ptr pinfo);
parameters fc_getinfo has one
parameter: pinfo points to a ck_info structure description fc_getinfo returns general information about the pkcs #11 library.
FC_GetMechanismInfo
syntax ck_rv fc_getmechanisminfo( ck_slot_id slotid, ck_mechanism_type type, ck_mechanism_info_ptr pinfo );
parameters fc_getmechanisminfo takes three
parameters: slotid [input] type [input] .
FC_GetMechanismList
syntax ck_rv fc_getmechanismlist( ck_slot_id slotid, ck_mechanism_type_ptr pmechanismlist, ck_ulong_ptr puscount );
parameters fc_getmechanismlist takes three
parameters: slotid [input] pinfo [output] the address of a variable that will receive a pointer to the list of function pointers.
FC_GetObjectSize
syntax ck_rv fc_getobjectsize( ck_session_handle hsession, ck_object_handle hobject, ck_ulong_ptr pussize );
parameters hsession [in] session handle.
FC_GetOperationState
syntax ck_rv fc_getoperationstate( ck_session_handle hsession, ck_byte_ptr poperationstate, ck_ulong_ptr puloperationstatelen );
parameters hsession [in] handle of the open session.
FC_GetSessionInfo
syntax ck_rv fc_getsessioninfo( ck_session_handle hsession, ck_session_info_ptr pinfo );
parameters hsession [in] the open session handle.
FC_GetSlotInfo
syntax ck_rv fc_getslotinfo( ck_slot_id slotid, ck_slot_info_ptr pinfo );
parameters fc_getslotinfo takes two
parameters: slotid [in] pinfo [out] the address of a ck_slot_info structure.
FC_GetSlotList
syntax ck_rv fc_getslotlist( ck_bbool tokenpresent, ck_slot_id_ptr pslotlist, ck_ulong_ptr pulcount );
parameters tokenpresent [in] if true only slots with a token present are included in the list, otherwise all slots are included.
FC_GetTokenInfo
syntax ck_rv fc_gettokeninfo(ck_slot_id slotid, ck_token_info_ptr pinfo);
parameters fc_gettokeninfo has two
parameters: slotid the id of the token's slot pinfo points to a ck_token_info structure description fc_gettokeninfo returns information about the token in the specified slot.
FC_InitPIN
syntax ck_rv fc_initpin( ck_session_handle hsession, ck_char_ptr ppin, ck_ulong ulpinlen );
parameters fc_initpin() takes three
parameters: hsession[input] session handle.
FC_InitToken
syntax ck_rv fc_inittoken( ck_slot_id slotid, ck_char_ptr ppin, ck_ulong ulpinlen, ck_char_ptr plabel );
parameters fc_inittoken() has the following
parameters: slotid the id of the token's slot ppin the password of the security officer (so) ulpinlen the length in bytes of the so password plabel points to the label of the token, which must be padded with spaces to 32 bytes and not be null-terminated description fc_inittoken() initializes a brand new token or re-initializes a token that was initialized before.
FC_Login
syntax ck_rv fc_login( ck_session_handle hsession, ck_user_type usertype, ck_char_ptr ppin, ck_ulong ulpinlen );
parameters fc_login() takes four
parameters: hsession [in] a session handle usertype [in] the user type (cku_so or cku_user) ppin [in] a pointer that points to the user's pin ulpinlen [in] the length of the pin description fc_login() logs a user into a token.
FC_Logout
syntax ck_rv fc_logout( ck_session_handle hsession );
parameters hsession [in] session handle.
FC_OpenSession
syntax ck_rv fc_opensession( ck_slot_id slotid, ck_flags flags, ck_void_ptr papplication, ck_notify notify, ck_session_handle_ptr phsession );
parameters fc_opensession has the following
parameters: slotid [in] the id of the token's slot.
FC_SeedRandom
syntax ck_rv fc_seedrandom( ck_session_handle hsession, ck_byte_ptr pseed, ck_ulong usseedlen );
parameters hsession [in] session handle.
FC_SetAttributeValue
syntax ck_rv fc_setattributevalue( ck_session_handle hsession, ck_object_handle hobject, ck_attribute_ptr ptemplate, ck_ulong uscount );
parameters hsession [in] session handle.
FC_SetOperationState
syntax ck_rv fc_setoperationstate( ck_session_handle hsession, ck_byte_ptr poperationstate, ck_ulong uloperationstatelen, ck_object_handle hencryptionkey, ck_object_handle hauthenticationkey );
parameters hsession [in] handle of the open session.
FC_SetPIN
syntax ck_rv fc_setpin( ck_session_handle hsession, ck_char_ptr poldpin, ck_ulong uloldlen, ck_char_ptr pnewpin, ck_ulong ulnewlen );
parameters fc_setpin takes five
parameters: hsession [input] the session's handle poldpin [input] points to the old pin.
FC_Sign
syntax ck_rv fc_sign( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr psignature, ck_ulong_ptr pussignaturelen );
parameters hsession [in] session handle.
FC_SignEncryptUpdate
name fc_signencryptupdate - continue a multi-part signing and encryption operation syntax ck_rv fc_signencryptupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong ulpartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pulencryptedpartlen );
parameters hsession [in] session handle.
FC_SignFinal
syntax ck_rv fc_signfinal( ck_session_handle hsession, ck_byte_ptr psignature, ck_ulong_ptr pussignaturelen );
parameters hsession [in] session handle.
FC_SignInit
syntax ck_rv fc_signinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey );
parameters hsession [in] session handle.
FC_SignRecover
syntax ck_rv fc_signrecover( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr psignature, ck_ulong_ptr pussignaturelen );
parameters hsession [in] session handle.
FC_SignRecoverInit
syntax ck_rv fc_signrecoverinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey );
parameters hsession [in] session handle.
FC_SignUpdate
syntax ck_rv fc_signupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong uspartlen );
parameters hsession [in] session handle.
FC_UnwrapKey
name fc_unwrapkey - unwrap a key syntax ck_rv fc_unwrapkey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hunwrappingkey, ck_byte_ptr pwrappedkey, ck_ulong uswrappedkeylen, ck_attribute_ptr ptemplate, ck_ulong usattributecount, ck_object_handle_ptr phkey );
parameters hsession [in] session handle.
FC_Verify
syntax ck_rv fc_verify( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr psignature, ck_ulong ussignaturelen );
parameters hsession [in] session handle.
FC_VerifyFinal
syntax ck_rv fc_verifyfinal( ck_session_handle hsession, ck_byte_ptr psignature, ck_ulong ussignaturelen );
parameters hsession [in] session handle.
FC_VerifyInit
syntax ck_rv fc_verifyinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey );
parameters hsession [in] session handle.
FC_VerifyRecover
syntax ck_rv fc_verifyrecover( ck_session_handle hsession, ck_byte_ptr psignature, ck_ulong ussignaturelen, ck_byte_ptr pdata, ck_ulong_ptr pusdatalen );
parameters hsession [in] session handle.
FC_VerifyRecoverInit
syntax ck_rv fc_verifyrecoverinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey );
parameters hsession [in] session handle.
FC_VerifyUpdate
syntax ck_rv fc_verifyupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong uspartlen );
parameters hsession [in] session handle.
FC_WaitForSlotEvent
syntax ck_rv fc_waitforslotevent(ck_flags flags, ck_slot_id_ptr pslot ck_void_ptr preserved);
parameters fc_waitforslotevent takes three
parameters: [input] flags [input] pslot.
FC_WrapKey
name fc_wrapkey - wrap a key syntax ck_rv fc_wrapkey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hwrappingkey, ck_object_handle hkey, ck_byte_ptr pwrappedkey, ck_ulong_ptr puswrappedkeylen );
parameters hsession [in] session handle.
NSC_InitToken
syntax ck_rv nsc_inittoken( ck_slot_id slotid, ck_char_ptr ppin, ck_ulong ulpinlen, ck_char_ptr plabel );
parameters nsc_inittoken() has the following
parameters: slotid the id of the token's slot ppin the password of the security officer (so) ulpinlen the length in bytes of the so password plabel points to the label of the token, which must be padded with spaces to 32 bytes and not be null-terminated description nsc_inittoken() initializes a brand new token or re-initializes a token that was initialized before.
NSC_Login
syntax ck_rv nsc_login( ck_session_handle hsession, ck_user_type usertype, ck_char_ptr ppin, ck_ulong ulpinlen );
parameters nsc_login() takes four
parameters: hsession [in] a session handle usertype [in] the user type (cku_so or cku_user) ppin [in] a pointer that points to the user's pin ulpinlen [in] the length of the pin description nsc_login() logs a user into a token.
NSS Key Functions
syntax include <key.h> include <keyt.h> void seckey_destroyprivatekey(seckeyprivatekey *key);
parameter this function has the following
parameter: key a pointer to the private key structure to destroy.
FIPS mode of operation
fc_verifyinit fc_verify fc_verifyupdate fc_verifyfinal fc_verifyrecoverinit fc_verifyrecover dual-function cryptographic functions fc_digestencryptupdate fc_decryptdigestupdate fc_signencryptupdate fc_decryptverifyupdate key management functions fc_generatekey: dsa domain
parameters (pqg) fc_generatekeypair: dsa, rsa, and ecdsa.
NSS reference
encryption/decryption hashing key generation generate keys, key pairs, and domain
parameters.
sslkey.html
syntax #include <key.h> #include <keyt.h> void seckey_destroyprivatekey(seckeyprivatekey *key);
parameter this function has the following
parameter: key a pointer to the private key structure to destroy.
NSS Tools modutil
(y/n) y using installer script "installer_script" successfully parsed installation script current platform is winnt::x86 using installation
parameters for platform winnt::x86 installed file crypto.dll to c:/winnt/system32/crypto.dll installed file setup.exe to ./pk11inst.dir/setup.exe executing "./pk11inst.dir/setup.exe"...
Necko Interfaces Overview
celed at once via the load group's nsirequest::cancel method nsitransport represents a physical connection, such as a file descriptor or a socket used directly by protocol handler implementations (as well as by mailnews and chatzilla) synchronous i/o methods: openinputstream, openoutputstream asynchronous i/o methods: asyncread, asyncwrite nsitransport::asyncread takes a nsistreamlistener
parameter original document information author(s): darin fisher last updated date: december 10, 2001 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Tutorial: Embedding Rhino
the null
parameter tells initstandardobjects to create and return a scope object that we use in later calls.
Rhino Examples
the check
param.js script is a useful tool to check that @
param tags in java documentation comments match the
parameters in the corresponding java method.
SpiderMonkey Internals
all state associated with an interpreter instance is passed through formal
parameters to the interpreter entry point; most implicit state is collected in a type named jscontext.
JIT Optimization Outcomes
the interpreted callee function either has too many
parameters or is called with too many arguments.
JSAPI Cookbook
/* jsapi */ js::rootedvalue x(cx); if (!y.isobject()) return throwerror(cx, global, "
parameter y must be an object.", __file__, __line__); /* see the #throw example */ js::rootedobject yobj(cx, &y.toobject()); if (!js_getproperty(cx, yobj, "myprop", &x)) return false; setting a property // javascript y.myprop = x; see "getting a property", above, concerning the case where y is not an object.
History Service Design
this is possible through a relevance algorithm that assigns a
param called frecency to every page in history, see the places frecency algorithm for major informations.
Places Developer Guide
lacesdatabase).dbconnection; } and then to get the a redirected visit_id from another visit_id: function getfromvisit(visit_id) { var sql = <cdata><![cdata[ select from_visit from moz_places, moz_historyvisits where moz_historyvisits.id = :visit_id and moz_places.id = moz_historyvisits.place_id; ]]></cdata>.tostring(); var sql_stmt = getplacesdbconn.createstatement(sql); sql_stmt.
params.visit_id = visit_id; var from_visit; try { // here we can't use the "executeasync" method since have to return a // result right-away.
Retrieving part of the bookmarks tree
result, pass the folder id to setfolders in your query object: query.setfolders([toolbarfolder], 1); run the query the executequery and executequeries functions will return an nsinavhistoryresult object containing the results of your query: var result = historyservice.executequery(query, options); get the results when you are querying for exactly one folder grouped by folder with no fancy query
parameters such as keywords or date ranges (as in this example), the root of the result will be an nsinavhistorycontainerresultnode corresponding to your folder.
Using the Places annotation service
etitemannotationdouble(aitemid, aname, avalue, aflags, aexpiration); setitemannotationbinary(aitemid, aname, avalue, adatalen, aflags, aexpiration); from javascript there are two simple function to perform all of these operations: setpageannotation(auri, aname, avalue, aflags, aexpiration); setitemannotation(aitemid, aname, avalue, aflags, aexpiration); these annotations all take similar
parameters: uri or itemid: this is the nsiuri of the page to annotate, or for items in the places database, the id of the item.
Places
using the places keywords api how to manage places keywords querying places how to query the bookmarks and history system with specific
parameters.
The Publicity Stream API
count the maximum number of events to return, with preference given to more recent events [make this preference its own
parameter?].
Aggregating the In-Memory Datasource
private: nscomptr<nsisupports> minner; }; construct the datasource delegate when your object is constructed (or, at worst, when somebody qi's for it): rv = nscomponentmanager::createinstance( krdfinmemorydatasourcecid, this, /* the "outer" */ nscomtypeinfo<nsisupports>::getiid(), getter_addrefs(minner)); note passing this as the "outer"
parameter.
Bundling multiple binary components
create small wrappers for calling the methods, as you may need to thunk
parameters depending on how much has changed between gecko versions.
XPCOM hashtable guide
le 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.
Components.Constructor
syntax var func = [ new ] components.constructor(contractid [, interfacename [, initializer ] ]);
parameters contractid a string containing the contract id of the component interfacename if given, nsisupports.queryinterface() will be called on each newly-created instance with the interface named by this string initializer if given, a string containing the name of a function which will be called on the newly-created instance, using the arguments provided to the created function when called description components.constructor() is a handy shortcut for creating instances of xpcom components.
Components.Exception
syntax var exception = [ new ] components.exception([ message [, result [, stack [, data ] ] ] ]);
parameters message a string which can be displayed in the error console when your exception is thrown or in other developer-facing locations, defaulting to 'exception' result the nsresult value of the exception, which defaults to components.results.ns_error_failure stack an xpcom stack to be set on the exception (defaulting to the current stack chain) data any additional data you might wan...
Components.ID
syntax var interfaceid = [ new ] components.id(iid);
parameters iid a string of the format '{00000000-0000-0000-0000-000000000000}' giving the interface id of the interface description components.id creates interface ids for use in implementing methods like queryinterface, getinterfaces, and other methods that take interface ids as
parameters.
Components.results
components.results is a read-only object whose properties are the names listed as the first
parameters of the macros in js/xpconnect/src/xpc.msg (also at table of errors), with the value of each corresponding to that constant's value.
nsIConverterInputStream
void init( in nsiinputstream astream, in string acharset, in long abuffersize, in prunichar areplacementchar );
parameters astream the source stream which is read and converted.
nsICookieConsent
nscookiestatus getconsent( in nsiuri uri, in nsihttpchannel httpchannel, in boolean isforeign, out nscookiepolicy policy );
parameters uri the uri to find the policy for.
nsICookiePromptService
long cookiedialog( in nsidomwindow parent, in nsicookie cookie, in acstring hostname, in long cookiesfromhost, in boolean changingcookie, out boolean rememberdecision );
parameters parent the parent window for the dialog.
nsICurrentCharsetListener
ts.classes["@mozilla.org/intl/currentcharsetlistener;1"] .createinstance(components.interfaces.nsicurrentcharsetlistener); method overview void setcurrentcharset(in wstring charset); void setcurrentcomposercharset(in wstring charset); void setcurrentmailcharset(in wstring charset); methods setcurrentcharset() void setcurrentcharset( in wstring charset );
parameters charset setcurrentcomposercharset() void setcurrentcomposercharset( in wstring charset );
parameters charset setcurrentmailcharset() void setcurrentmailcharset( in wstring charset );
parameters charset ...
nsIDOMEventGroup
boolean issameeventgroup( in nsidomeventgroup other );
parameters other instance of nsidomeventgroup object to compare against.
nsIDOMFontFaceList
nsidomfontface item( in unsigned long index );
parameters index the index into the array of the font face object to return.
nsIDOMGeoPositionCallback
void handleevent( in nsidomgeoposition position );
parameters position an nsidomgeoposition object indicating the updated location information.
nsIDOMGeoPositionErrorCallback
void handleevent( in nsidomgeoposition position );
parameters position the error that occurred, as an nsidomgeopositionerror object.
nsIDOMGlobalPropertyInitializer
method overview jsval init(in nsidomwindow window); methods init() jsval init( in nsidomwindow window );
parameters window the window to which the global property is being attached.
nsIDOMHTMLSourceElement
the codecs
parameter may be specified and might be necessary to specify exactly how the resource is encoded.
nsIDOMMouseScrollEvent
ng typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in long axis );
parameters typearg the type of event.
nsIDOMMozTouchEvent
boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in unsigned long streamidarg );
parameters streamidarg the value to assign to the streamid attribute; this uniquely identifies the finger generating the touch events.
nsIDOMOrientationEvent
void initprogressevent( in domstring eventtypearg, in boolean canbubblearg, in boolean cancelablearg, in double x, in double y, in double z );
parameters eventtypearg the type of event.
nsIDOMProgressEvent
void initprogressevent( in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in boolean lengthcomputablearg, in unsigned long long loadedarg, in unsigned long long totalarg );
parameters typearg the type of event.
NS_StringContainerFinish
#include "nsstringapi.h" void ns_stringcontainerfinish( nsstringcontainer& astring );
parameters astring [in] a nsstringcontainer instance that is no longer needed.
NS_StringCopy
#include "nsstringapi.h" nsresult ns_stringcopy( nsastring& adeststring, const nsastring& asrcstring );
parameters adeststring [in] a nsastring instance to be modified.
NS_StringCutData
#include "nsstringapi.h" nsresult ns_stringcutdata( nsastring& astring, pruint32 acutstart, pruint32 acutlength );
parameters astring [in] a nsastring instance to be modified.
NS_StringInsertData
#include "nsstringapi.h" nsresult ns_stringinsertdata( nsacstring& astring, pruint32 aoffset, const prunichar* adata, pruint32 adatalength = pr_uint32_max );
parameters astring [in] a nsacstring instance to be modified.
NS_StringSetDataRange
#include "nsstringapi.h" nsresult ns_stringsetdatarange( nsastring& astring, pruint32 acutstart, pruint32 acutlength, const prunichar* adata, pruint32 adatalength = pr_uint32_max );
parameters astring [in] a nsastring instance to modify.
nsGetModuleProc
#include "nsxpcom.h" typedef nsresult (pr_callback *nsgetmoduleproc)( nsicomponentmanager *acompmgr, nsifile* alocation, nsimodule** aresult );
parameters acompmgr [in] the xpcom component manager.
Using nsIDirectoryService
this is done by passing a directory to ns_initxpcom or, for embedding, as the first
parameter to ns_initembedding.
XPCOM
if the referent object is destroyed before the weak reference, the pointer inside the weak reference is set to nsnull.working with multiple versions of interfacesin this short note we illustrate how one can update an xpcom module in order for it to work in both firefox 2 and firefox 3, even if the interfaces have changed in the interim.working with out
parameterswrappedjsobjectwrappedjsobject is a property sometimes available on xpconnect wrappers.
Filelink Providers
this function is called automatically once the dom content is done loading, and is passed a single
parameter - the provider instance whose data is being displayed.
MailNews Filters
how to add a filter action add your new action to nsimsgfilteraction add code to file out the new action here add new action to the rulesactiontable add string for the new action to the filter editor dtd file add new action to the filter editor js code add new action to the xbl widget in the filter editor if your action has a
parameter, add code to initialize the ui editing an existing filter here and to save to the filter here add your action to filter.properties so it will show up in the filter log.
Mail and RDF
finally, it would convert the result of this call to an rdf literal, and pass it back through the return
parameter of gettarget().
Declaring and Using Callbacks
if two arguments are passed to the callback constructor, the second is used as the this
parameter: function myjscallback() { alert(this.message); }; var receiver = { message: 'hi there!' }; var callback = funcptrtype(myjscallback, receiver); // alerts with 'hi there' when the callback is invoked if three arguments are passed to the callback constructor, the third argument is used as a sentinel value which the callback returns if an exception is thrown.
Declaring types
pointers declaring a pointer type as a pointer to a specific type is done by passing as a
parameter to the ctypes.pointertype() method a ctype object indicating the type to which the pointer should refer: const intptr = new ctypes.pointertype(ctypes.int); in this example, intptr is equivalent to this declaration in c: typedef int *intptr; you can similarly declare a pointer type as a pointer to any user-defined type, including structures: const userrecord = new ctypes.structtype("use...
ctypes.open
th; // "file:///c:/users/vayeate/appdata/roaming/mozilla/firefox/profiles/aecgxse.unnamed%20profile%201/extensions/youraddon@jetpack.xpi!/mysubfolder/mycfunctionsforunix.so" if your add-on is a bootstrap add-on, then you don't need to use this method to convert a chrome:// path; instead, on startup procedure of the bootstrap add-on obtain the file and/or jar path from installpath from the adata
parameter.
AudioWorkletNode.port - Web APIs
// ping-pong-processor.js class pingpongprocessor extends audioworkletprocessor { constructor (...args) { super(...args) this.port.onmessage = (e) => { console.log(e.data) this.port.postmessage('pong') } } process (inputs, outputs,
parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph.
AudioWorkletNodeOptions - Web APIs
parameterdata optional an object containing the initial values of custom audio
param objects on this node (in its
parameters property), with key being the name of a custom
parameter and value being its initial value.
AudioWorkletProcessor.port - Web APIs
// ping-pong-processor.js class pingpongprocessor extends audioworkletprocessor { constructor (...args) { super(...args) this.port.onmessage = (e) => { console.log(e.data) this.port.postmessage('pong') } } process (inputs, outputs,
parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph.
AuthenticatorAttestationResponse.attestationObject - Web APIs
examples var publickey = { challenge: /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16), name: "jdoe@example.com", displayname: "john doe" }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var attestationobj = newcredentialinfo.response.attestationobject; // this will be a cbor encoded arraybuffer // do something with the response // (sending it back to the relying party server maybe?) }).catch(function (err) { co...
AuthenticatorAttestationResponse - Web APIs
examples var publickey = { challenge: /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16), name: "jdoe@example.com", displayname: "john doe" }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var response = newcredentialinfo.response; // do something with the response // (sending it back to the relying party server maybe?) }).catch(function (err) { console.error(err); }); specifications specification statu...
AuthenticatorResponse - Web APIs
server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); getting an authenticatorattestationresponse var publickey = { challenge: /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16), name: "jdoe@example.com", displayname: "john doe" }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var attestationresponse = newcredentialinfo.response; }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentia...
BaseAudioContext.createDelay() - Web APIs
syntax var delaynode = audioctx.createdelay(maxdelaytime);
parameters maxdelaytime optional the maximum amount of time, in seconds, that the audio signal can be delayed by.
BaseAudioContext.createGain() - Web APIs
syntax var gainnode = audiocontext.creategain(); return value a gainnode which takes as input one or more audio sources and outputs audio whose volume has been adjusted in gain (volume) to a level specified by the node's gainnode.gain a-rate
parameter.
BaseAudioContext.createIIRFilter() - Web APIs
syntax var iirfilter = audiocontext.createiirfilter(feedforward, feedback);
parameters feedforward an array of floating-point values specifying the feedforward (numerator) coefficients for the transfer function of the iir filter.
BaseAudioContext.decodeAudioData() - Web APIs
syntax older callback syntax: baseaudiocontext.decodeaudiodata(arraybuffer, successcallback, errorcallback); newer promise-based syntax: promise<decodeddata> baseaudiocontext.decodeaudiodata(arraybuffer);
parameters arraybuffer an arraybuffer containing the audio data to be decoded, usually grabbed from xmlhttprequest, windoworworkerglobalscope.fetch() or filereader.
BasicCardRequest.supportedNetworks - Web APIs
legal values are defined in the w3c's document card network identifiers approved for use with payment request api, and are currently: amex cartebancaire diners discover jcb mastercard mir unionpay visa example the following example shows a sample definition of the first
parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
Using the Permissions API - Web APIs
nied,geosettings); } else if (result.state == 'denied') { report(result.state); geobtn.style.display = 'inline'; } result.onchange = function() { report(result.state); } }); } function report(state) { console.log('permission ' + state); } handlepermission(); permission descriptors the permissions.query() method takes a permissiondescriptor dictionary as a
parameter — this contains the name of the api you are interested in.
PositionOptions - Web APIs
the positionoptions dictionary describes an object containing option properties to pass as a
parameter of geolocation.getcurrentposition() and geolocation.watchposition().
ProgressEvent.initProgressEvent() - Web APIs
do not use it anymore, use the standard constructor, progressevent(), to create a synthetic progressevent syntax progress.initprogressevent(typearg, canbubblearg, cancelablearg, lengthcomputable, loaded, total);
parameters typearg is a domstring identifying the specific type of animation event that occurred.
ProgressEvent - Web APIs
30" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="181" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">progressevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor progressevent() creates a progressevent event with the given
parameters.
PublicKeyCredential.id - Web APIs
examples var publickey = { challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var id = newcredentialinfo.id; // do something with the id // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err...
PublicKeyCredential.rawId - Web APIs
examples var options = { challenge: new uint8array(26) /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey: options }) .then(function (pubkeycredential) { var rawid = pubkeycredential.rawid; // do something with rawid }).catch(function (err) { // deal with any error }); specifications specification status comment web authentication: an api for accessing p...
PublicKeyCredential.response - Web APIs
examples var options = { challenge: new uint8array(16) /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16) /* from the server */, name: "jdoe@example.com", displayname: "john doe" }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey: options }) .then(function (pubkeycredential) { var response = pubkeycredential.response; var clientextresults = pubkeycredential.getclientextensionresults(); // send response and client extensions to the server so that it can validate // and create credentials }).catch(fun...
PublicKeyCredential - Web APIs
var publickey = { challenge: /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16), name: "jdoe@example.com", displayname: "john doe" }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var response = newcredentialinfo.response; var clientextensionsresults = newcredentialinfo.getclientextensionresults(); }).catch(function (err) { console.error(err); }); getting an existing instance of publickeycredential here, we fe...
PublicKeyCredentialCreationOptions.attestation - Web APIs
examples var publickey = { attestation: "indirect", challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status commen...
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
ticatorattachment: "cross-platform", requireresidentkey: true, userverification: "required" }, challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment ...
PublicKeyCredentialCreationOptions.challenge - Web APIs
examples var publickey = { challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status commen...
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
key", // the id for john-doe@example.com id : new uint8array(26) /* another id */ } ], challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment ...
PublicKeyCredentialCreationOptions.extensions - Web APIs
les var publickey = { extensions:{ uvi: true, loc: false, uvm: false, exts: true }, challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycred
params: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // mybuffer will contain the result of any of the processing of the extensions var mybuffer = newcredentialinfo.getclientextensionresults(); // send attestation response and client extensions // to the server to proceed with the registration // ...
WEBGL_color_buffer_float - Web APIs
extended methods this extension extends webglrenderingcontext.renderbufferstorage(): the internalformat
parameter now accepts ext.rgba32f_ext and ext.rgb32f_ext ( ).
WEBGL_compressed_texture_pvrtc - Web APIs
constants the compressed texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() (where the height and width
parameters must be powers of 2) and compressedtexsubimage2d() (where the the height and width
parameters must equal the current values of the existing texture and the xoffset and yoffset
parameters must be 0).
WEBGL_compressed_texture_s3tc - Web APIs
examples var ext = ( gl.getextension('webgl_compressed_texture_s3tc') || gl.getextension('moz_webgl_compressed_texture_s3tc') || gl.getextension('webkit_webgl_compressed_texture_s3tc') ); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_s3tc_dxt5_ext, 512, 512, 0, texturedata); gl.tex
parameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.tex
parameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl_compressed_texture_s3tcthe definition of 'webgl_compressed_texture_s3tc' in that specification.
WEBGL_compressed_texture_s3tc_srgb - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_s3tc_srgb'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_srgb_s3tc_dxt1_ext, 512, 512, 0, texturedata); gl.tex
parameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.tex
parameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl_compressed_texture_s3tc_srgbthe definition of 'webgl_compressed_texture_s3tc_srgb' in that specification.
WEBGL_draw_buffers - Web APIs
constants this extension exposes new constants, which can be used in the gl.framebufferrenderbuffer(), gl.framebuffertexture2d(), gl.getframebufferattachment
parameter() ext.drawbufferswebgl(), and gl.get
parameter() methods.
WakeLock.request() - Web APIs
syntax var wakelock = navigator.wakelock.request(type);
parameters type options are as follows: 'screen': requests a screen wake lock.
WebGL2RenderingContext.texSubImage3D() - Web APIs
pixels); void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, glintptr offset);
parameters target a glenum specifying the binding point (target) of the active texture.
WebGL2RenderingContext.uniform[1234][uif][v]() - Web APIs
l srclength); void gl.uniform4iv(location, data, optional srcoffset, optional srclength); void gl.uniform1uiv(location, data, optional srcoffset, optional srclength); void gl.uniform2uiv(location, data, optional srcoffset, optional srclength); void gl.uniform3uiv(location, data, optional srcoffset, optional srclength); void gl.uniform4uiv(location, data, optional srcoffset, optional srclength);
parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
ptional srclength); void gl.uniformmatrix4x3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix2x4fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3x4fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4fv(location, transpose, data, optional srcoffset, optional srclength);
parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
WebGL2RenderingContext.vertexAttribI4[u]i[v]() - Web APIs
syntax void gl.vertexattribi4i(index, v0, v1, v2, v3); void gl.vertexattribi4ui(index, v0, v1, v2, v3); void gl.vertexattribi4iv(index, value); void gl.vertexattribi4uiv(index, value);
parameters index a gluint specifying the position of the vertex attribute to be modified.
WebGLProgram - Web APIs
var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); if ( !gl.getprogram
parameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw 'could not compile webgl program.
WebGLQuery - Web APIs
when working with webglquery objects, the following methods of the webgl2renderingcontext are useful: webgl2renderingcontext.createquery() webgl2renderingcontext.deletequery() webgl2renderingcontext.isquery() webgl2renderingcontext.beginquery() webgl2renderingcontext.endquery() webgl2renderingcontext.getquery() webgl2renderingcontext.getquery
parameter() examples creating a webglquery object in this example, gl must be a webgl2renderingcontext.
WebGLRenderingContext.bufferSubData() - Web APIs
syntax // webgl1: void gl.buffersubdata(target, offset, arraybuffer srcdata); void gl.buffersubdata(target, offset, arraybufferview srcdata); // webgl2: void gl.buffersubdata(target, dstbyteoffset, arraybufferview srcdata, srcoffset, length);
parameters target a glenum specifying the binding point (target).
WebGLRenderingContext.texImage2D() - Web APIs
th, height, border, format, type, htmlvideoelement source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, imagebitmap source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, imagedata source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, arraybufferview srcdata, srcoffset);
parameters target a glenum specifying the binding point (target) of the active texture.
WebGLRenderingContext.texSubImage2D() - Web APIs
set, yoffset, width, height, format, type, htmlvideoelement source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, imagebitmap source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, imagedata source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, arraybufferview srcdata, srcoffset);
parameters target a glenum specifying the binding point (target) of the active texture.
WebGLRenderingContext.uniform[1234][fi][v]() - Web APIs
; void gl.uniform2i(location, v0, v1); void gl.uniform2iv(location, value); void gl.uniform3f(location, v0, v1, v2); void gl.uniform3fv(location, value); void gl.uniform3i(location, v0, v1, v2); void gl.uniform3iv(location, value); void gl.uniform4f(location, v0, v1, v2, v3); void gl.uniform4fv(location, value); void gl.uniform4i(location, v0, v1, v2, v3); void gl.uniform4iv(location, value);
parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
WebGLRenderingContext.uniformMatrix[234]fv() - Web APIs
syntax webglrenderingcontext.uniformmatrix2fv(location, transpose, value); webglrenderingcontext.uniformmatrix3fv(location, transpose, value); webglrenderingcontext.uniformmatrix4fv(location, transpose, value);
parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
WebGLRenderingContext.vertexAttrib[1234]f[v]() - Web APIs
syntax void gl.vertexattrib1f(index, v0); void gl.vertexattrib2f(index, v0, v1); void gl.vertexattrib3f(index, v0, v1, v2); void gl.vertexattrib4f(index, v0, v1, v2, v3); void gl.vertexattrib1fv(index, value); void gl.vertexattrib2fv(index, value); void gl.vertexattrib3fv(index, value); void gl.vertexattrib4fv(index, value);
parameters index a gluint specifying the position of the vertex attribute to be modified.
WebGLShader - Web APIs
function createshader (gl, sourcecode, type) { // compiles either a shader of type gl.vertex_shader or gl.fragment_shader var shader = gl.createshader( type ); gl.shadersource( shader, sourcecode ); gl.compileshader( shader ); if ( !gl.getshader
parameter(shader, gl.compile_status) ) { var info = gl.getshaderinfolog( shader ); throw 'could not compile webgl program.
WebGLSync - Web APIs
when working with webglsync objects, the following methods of the webgl2renderingcontext are useful: webgl2renderingcontext.fencesync() webgl2renderingcontext.deletesync() webgl2renderingcontext.issync() webgl2renderingcontext.clientwaitsync() webgl2renderingcontext.waitsync() webgl2renderingcontext.getsync
parameter() examples creating a webglsync object in this example, gl must be a webgl2renderingcontext.
Hello GLSL - Web APIs
); gl.shadersource(fragmentshader,source); gl.compileshader(fragmentshader); program = gl.createprogram(); gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.detachshader(program, vertexshader); gl.detachshader(program, fragmentshader); gl.deleteshader(vertexshader); gl.deleteshader(fragmentshader); if (!gl.getprogram
parameter(program, gl.link_status)) { var linkerrlog = gl.getprograminfolog(program); cleanup(); document.queryselector("p").innerhtml = "shader program did not link successfully.
Hello vertex attributes - Web APIs
); gl.shadersource(fragmentshader,source); gl.compileshader(fragmentshader); program = gl.createprogram(); gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.detachshader(program, vertexshader); gl.detachshader(program, fragmentshader); gl.deleteshader(vertexshader); gl.deleteshader(fragmentshader); if (!gl.getprogram
parameter(program, gl.link_status)) { var linkerrlog = gl.getprograminfolog(program); cleanup(); document.queryselector("p").innerhtml = "shader program did not link successfully.
Textures from code - Web APIs
); gl.shadersource(fragmentshader,source); gl.compileshader(fragmentshader); program = gl.createprogram(); gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.detachshader(program, vertexshader); gl.detachshader(program, fragmentshader); gl.deleteshader(vertexshader); gl.deleteshader(fragmentshader); if (!gl.getprogram
parameter(program, gl.link_status)) { var linkerrlog = gl.getprograminfolog(program); cleanup(); document.queryselector("p").innerhtml = "shader program did not link successfully.
Compressed texture formats - Web APIs
if supported, it will return an extension object with constants for the added formats and the formats will also be returned by calls to gl.get
parameter(gl.compressed_texture_formats).
Animating textures in WebGL - Web APIs
gl.tex
parameteri(gl.texture_2d, gl.texture_wrap_s, gl.clamp_to_edge); gl.tex
parameteri(gl.texture_2d, gl.texture_wrap_t, gl.clamp_to_edge); gl.tex
parameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); return texture; } here's what the updatetexture() function looks like; this is where the real work is done: function updatetexture(gl, texture, video) { const level = 0; const internalformat...
Introduction to WebRTC protocols - Web APIs
for example, lines providing media descriptions have the type "m", so those lines are referred to as "m-lines." for more information to learn more about sdp, see the following useful resources: specification: rfc 4566: sdp: session description protocol iana registry of sdp
parameters ...
A simple RTCDataChannel sample - Web APIs
our example's remote peer, on the other hand, ignores the status change events, except for logging the event to the console: function handlereceivechannelstatuschange(event) { if (receivechannel) { console.log("receive channel's status has changed to " + receivechannel.readystate); } } the handlereceivechannelstatuschange() method receives as an input
parameter the event which occurred; this will be an rtcdatachannelevent.
Taking still photos with WebRTC - Web APIs
note: this takes advantage of the fact that the htmlvideoelement interface looks like an htmlimageelement to any api that accepts an htmlimageelement as a
parameter, with the video's current frame presented as the image's contents.
WebSocket() - Web APIs
syntax var awebsocket = new websocket(url [, protocols]);
parameters url the url to which to connect; this should be the url to which the websocket server will respond.
WebSocket.protocol - Web APIs
the websocket.protocol read-only property returns the name of the sub-protocol the server selected; this will be one of the strings specified in the protocols
parameter when creating the websocket object, or the empty string if no connection is established.
Writing WebSocket client applications - Web APIs
the websocket constructor accepts one required and one optional
parameter: websocket = new websocket(url, protocols); url the url to which to connect; this should be the url to which the websocket server will respond.
Lighting a WebXR setting - Web APIs
a tapering rate
parameter defines how quickly the brightness of the light falls off at the edges of the cone of light, and, as with point lights, an attenuation
parameter controls how the light fades over distance.
Movement, orientation, and motion: A WebXR example - Web APIs
the time elapsed since the last frame was rendered (in seconds) is computed by subtracting the previous frame's timestamp, lastframetime, from the current time as specified by the time
parameter and then multiplying by 0.001 to convert milliseconds to seconds.
Basic concepts behind Web Audio API - Web APIs
audio buffers: frames, samples and channels an audiobuffer takes as its
parameters a number of channels (1 for mono, 2 for stereo, etc), a length, meaning the number of sample frames inside the buffer, and a sample rate, which is the number of sample frames played per second.
Attestation and Assertion - Web APIs
-prior to android key attestation, the only option for android devices was to create android safetynet attestations fido u2f - security keys that implement the fido u2f standard use this format none - browsers may prompt users whether they want a site to be allowed to see their attestation data and/or may remove attestation data from the authenticator's response if the `attestation`
parameter in `navigator.credentials.create()` is set to `none` the purpose of attestation is to cryptographically prove that a newly generated key pair came from a specific device.
Microdata - HTML: Hypertext Markup Language
due to the implementation of additional marking
parameters of schema's vocabulary, the indexation of information in russian-language web-pages became considerably more successful.
Content negotiation - HTTP
it is comma-separated lists of mime types, each combined with a quality factor, a
parameter indicating the relative degree of preference between the different mime types.
Accept-Charset - HTTP
using content negotiation, the server selects one of the encodings, uses it, and informs the client of its choice within the content-type response header, usually in a charset=
parameter.
Alt-Svc - HTTP
use of the persist=1
parameter ensures that the entry is not deleted through such changes.
Content-Location - HTTP
esponse header accept: application/json, text/json content-location: /documents/foo.json accept: application/xml, text/xml content-location: /documents/foo.xml accept: text/plain, text/* content-location: /documents/foo.txt these urls are examples — the site could serve the different filetypes with any url patterns it wishes, such as a query string
parameter: /documents/foo?format=json, /documents/foo?format=xml, and so on.
CSP: referrer - HTTP
"unsafe-url" send a full url (stripped from
parameters) when performing a same-origin or cross-origin request.
Content-Type - HTTP
it also needs to have a mime type of its parsed value (ignoring
parameters) of either application/x-www-form-urlencoded, multipart/form-data, or text/plain.
Keep-Alive - HTTP
header type general header forbidden header name yes syntax keep-alive:
parameters directives
parameters a comma-separated list of
parameters, each consisting of an identifier and a value separated by the equal sign ('=').
JavaScript Guide - JavaScript
tax & comments declarations variable scope variable hoisting data structures and types literals control flow and error handling if...else switch try/catch/throw error objects loops and iteration for while do...while break/continue for..in for..of functions defining functions calling functions function scope closures arguments &
parameters arrow functions expressions and operators assignment & comparisons arithmetic operators bitwise & logical operators conditional (ternary) operator numbers and dates number literals number object math object date object text formatting string literals string object template literals internationalization regular expressions indexed collections...
Classes - JavaScript
class animal { constructor(name) { this.name = name; } speak() { console.log(`${this.name} makes a noise.`); } } class dog extends animal { constructor(name) { super(name); // call the super class constructor and pass in the name
parameter } speak() { console.log(`${this.name} barks.`); } } let d = new dog('mitzie'); d.speak(); // mitzie barks.
TypeError: cyclic object value - JavaScript
the snippet below illustrates how to find and filter (thus causing data loss) a cyclic reference by using the replacer
parameter of json.stringify(): const getcircularreplacer = () => { const seen = new weakset(); return (key, value) => { if (typeof value === "object" && value !== null) { if (seen.has(value)) { return; } seen.add(value); } return value; }; }; json.stringify(circularreference, getcircularreplacer()); // {"otherdata":123} ...
TypeError: "x" is not a non-null object - JavaScript
examples property descriptor expected when methods like object.create() or object.defineproperty() and object.defineproperties() are used, the optional descriptor
parameter expects a property descriptor object.
Method definitions - JavaScript
syntax const obj = { get property() {}, set property(value) {}, property(
parameters… ) {}, *generator(
parameters… ) {}, async property(
parameters… ) {}, async* generator(
parameters… ) {}, // with computed keys get [property]() {}, set [property](value) {}, [property](
parameters… ) {}, *[generator](
parameters… ) {}, async [property](
parameters… ) {}, async* [generator](
parameters… ) {}, }; description the shorthand syntax is si...
Array.prototype.reduceRight() - JavaScript
syntax arr.reduceright(callback(accumulator, currentvalue[, index[, array]])[, initialvalue])
parameters callback function to execute on each value in the array, taking four arguments: accumulator the value previously returned in the last invocation of the callback, or initialvalue, if supplied.
Array.prototype.flat() - JavaScript
syntax var newarray = arr.flat([depth]);
parameters depth optional the depth level specifying how deep a nested array structure should be flattened.
Array.prototype.flatMap() - JavaScript
syntax var new_array = arr.flatmap(function callback(currentvalue[, index[, array]]) { // return element for new_array }[, thisarg])
parameters callback function that produces an element of the new array, taking three arguments: currentvalue the current element being processed in the array.
JavaScript reference - JavaScript
arguments arrow functions default
parameters rest
parameters additional reference pages lexical grammar data types and data structures strict mode deprecated features ...
Authoring MathML - MathML
given a foo.tex latex file, you can use these simple commands: latexmlc --dest foo.html foo.tex # generate a html5 document foo.html latexmlc --dest foo.epub foo.tex # generate an epub document foo.epub to handle the case of browsers without mathml support, you can use the --javascript
parameter to tell latexml to include one of the fallback scripts: latexmlc --dest foo.html --javascript=https://fred-wang.github.io/mathml.css/mspace.js foo.tex # add the css fallback latexmlc --dest foo.html --javascript=https://fred-wang.github.io/mathjax.js/mpadded-min.js foo.tex # add the mathjax fallback if your latex document is big, you might want to split it into several small pages rat...
Populating the page: how browsers work - Web Performance
this mechanism is designed so that two entities attempting to communicate—in this case the browser and web server—can negotiate the
parameters of the network tcp socket connection before transmitting data, often over https.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
fetch('./sendnotification', { method: 'post', headers: { 'content-type': 'application/json' }, body: json.stringify({ subscription: subscription, payload: payload, delay: delay, ttl: ttl, }), }); }; when the button is clicked, fetch asks the server to send the notification with the given
parameters: payload is the text that to be shown in the notification, delay defines a delay in seconds until the notification will be shown, and ttl is the time-to-live setting that keeps the notification available on the server for a specified amount of time, also defined in seconds.
enable-background - SVG: Scalable Vector Graphics
the optional <x>, <y>, <width>, and <height>
parameters are <number> values that indicate the subregion of the container elementʼs user space where access to the background image is allowed to happen.
lang - SVG: Scalable Vector Graphics
the glyph was meant to be used if the xml:lang attribute exactly matched one of the languages given in the value of this
parameter, or if the xml:lang attribute exactly equaled a prefix of one of the languages given in the value of this
parameter such that the first tag character following the prefix was "-".
name - SVG: Scalable Vector Graphics
value <name> default value none animatable yes <name> this value is the name which is used as the first
parameter for icc color specifications within fill, stroke, stop-color, flood-color and lighting-color property values to identify the color profile to use for the icc color specification and the name which can be the value of the color-profile property.
overflow - SVG: Scalable Vector Graphics
it has the same
parameter values and meaning as the css overflow property, however, the following additional points apply: if it has a value of visible, the attribute has no effect (i.e., a clipping rectangle is not created).
systemLanguage - SVG: Scalable Vector Graphics
the attribute evaluates to "true" if one of the language tags indicated by user preferences is a case-insensitive match or prefix (followed by a "-") of one of the language tags given in the value of this
parameter.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
or of child <title> implementation status unknown spaces in svg view fragments implementation status unknown pixel: and percent: spatial media fragments implementation status unknown linking to <view> elements does not cause implicit box transformation to show nearest ancestor <svg> element implementation status unknown unspecified svg view fragment
parameters don't cause corresponding attributes to be reset to initial values implementation status unknown viewtarget attribute of <view> and corresponding svg view fragment
parameter removed implementation status unknown fragment-only urls are always same-document implementation status unknown additional attributes on <a> implemented (bug 1451823) scripti...