Search completed in 1.16 seconds.
Setting up your own test automation environment - Learn web development
objective: to show how to
set up a selenium testing environment locally and run tests with it, and how to integrate it with tools like lambdatest, sauce labs, and browserstack.
...see
setting up a selenium-webdriver project for more details of selenium
setups for different languages.
...
setting up selenium in node to start with,
set up a new npm project, as discussed in
setting up node and npm in the last chapter.
...And 15 more matches
RTCPeerConnection.setLocalDescription() - Web APIs
the rtcpeerconnection method
setlocaldescription() changes the local description associated with the connection.
... if
setlocaldescription() is called while a connection is already in place, it means renegotiation is underway (possibly to adapt to changing network conditions).
... because descriptions will be exchanged until the two peers agree on a configuration, the description submitted by calling
setlocaldescription() does not immediately take effect.
...And 15 more matches
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
the xrreferencespace interface's getoff
setreferencespace() method returns a new reference space object which describes the relative difference in position between the object on which the method is called and a given point in 3d space.
... the object returned by getoff
setreferencespace() is an xrreferencespace if called on an xrreferencespace, or an xrboundedreferencespace if called on an object of that type.
... in other words, when you have an object in 3d space and need to position another object relative to that one, you can call getoff
setreferencespace(), passing into it the position and orientation you want the second object to have relative to the position and orientation of the object on which you call getoff
setreferencespace().
...And 13 more matches
Set-Cookie - HTTP
the
set-cookie http response header is used to send a cookie from the server to the user agent, so the user agent can send it back to the server later.
... to send multiple cookies, multiple
set-cookie headers should be sent in the same response.
... browsers block frontend javascript code from accessing the
set cookie header, as required by the fetch spec, which defines
set-cookie as a forbidden response-header name that must be filtered out from any response exposed to frontend code.
...And 13 more matches
KeyframeEffect.setKeyframes() - Web APIs
the
setkeyframes() method of the keyframeeffect interface replaces the keyframes that make up the affected keyframeeffect with a new
set of keyframes.
... syntax existingkeyframeeffect.
setkeyframes(keyframes); parameters keyframes a keyframe object or null.
... if
set to null, the keyframes are replaced with a sequence of empty keyframes.
...And 12 more matches
XRReferenceSpace: reset event - Web APIs
the re
set event is sent to an xrreferencespace object when a discontinuity is detected in either the native origin or the effective origin, causing a jump in the position or orientation of objects oriented using the reference space.
... in the case of xrboundedreferencespace objects, the re
set event can also be fired when the boundsgeometry changes.
... bubbles yes cancelable no interface xrreferencespaceevent event handler property onre
set usage notes the re
set event indicates that the coordinate system has been re
set or reconfigured by changing the reference space's origin, moving and rotating it as indicated by the event's transform property.
...And 12 more matches
JS_SetPropertyAttributes
set the attributes for a specified property.
... syntax jsbool js_
setpropertyattributes(jscontext *cx, jsobject *obj, const char *name, unsigned int attrs, jsbool *foundp); jsbool js_
setucpropertyattributes(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int attrs, jsbool *foundp); name type description cx jscontext * the context in which to
set the property attributes.
... obj jsobject * object for which to
set property attributes.
...And 11 more matches
handler.set() - JavaScript
the handler.
set() method is a trap for
setting a property value.
... syntax const p = new proxy(target, {
set: function(target, property, value, receiver) { } }); parameters the following parameters are passed to the
set() method.
... property the name or symbol of the property to
set.
...And 11 more matches
Setting Up a Development Environment - Archive of obsolete content
after
setting up make, you should be able to open a command line window, run "make -ver", and get the installed version of make as output.
... we recommend you
set up make in your system, since our examples come with all the necessary files to build and install the resulting xpi using this tool.
...the "bash -c" part forces komodo to use bash, which for some reason can't be
set properly as the default command shell.
...And 9 more matches
DataTransfer.setDragImage() - Web APIs
however, if a custom image is desired, the datatransfer.
setdragimage() method can be used to
set the custom image to be used.
...these coordinates define the off
set into the image where the mouse cursor should be.
... syntax void datatransfer.
setdragimage(img | element, xoff
set, yoff
set); arguments img | element an image element element to use for the drag feedback image.
...And 9 more matches
FontFaceSet - Web APIs
the fontface
set interface of the css font loading api manages the loading of font-faces and querying of their download status.
... properties fontface
set.status read only indicates the font-face's loading status.
... fontface
set.ready read only promise which resolves once font loading and layout operations have completed.
...And 9 more matches
RTCPeerConnection.setConfiguration() - Web APIs
the rtcpeerconnection.
setconfiguration() method
sets the current configuration of the rtcpeerconnection based on the values included in the specified rtcconfiguration object.
... the most common use case for this method (and even then, probably not a very common use case) is to replace the
set of ice servers to be used.
...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.
...And 9 more matches
Window.pageYOffset - Web APIs
the read-only window property pageyoff
set is an alias for scrolly; as such, it returns the number of pixels the document is currently scrolled along the vertical axis (that is, up or down) with a value of 0.0, indicating that the top edge of the document is currently aligned with the top edge of the window's content area.
... there is slightly better support for pageyoff
set than for scrolly in older browsers, but if you're not concerned about browsers more than a handful of years old, you can use either one.
... the corresponding pagexoff
set property, which returns the number of pixels scrolled along the horizontal axis (left and right), is an alias for scrollx.
...And 9 more matches
offset-path - CSS: Cascading Style Sheets
the off
set-path css property specifies a motion path for an element to follow and defines the element's positioning within the parent container or svg coordinate system.
... syntax /* default */ off
set-path: none; /* function values */ off
set-path: ray(45deg closest-side contain); /* url */ off
set-path: url(#path); /* shapes */ off
set-path: circle(50% at 25% 25%); off
set-path: in
set(50% 50% 50% 50%); off
set-path: polygon(30% 0%, 70% 0%, 100% 50%, 30% 100%, 0% 70%, 0% 30%); off
set-path: path('m 0,200 q 200,200 260,80 q 290,20 400,0 q 300,100 400,200'); /* geometry boxes */ off
set-path: margin-box; off
set-path: stroke-box; /* global values */ off
set-path: inherit; off
set-path: initial; off
set-path: un
set; values ray() taking up to three values, defines a path that is a line segment starting from the position of the box and proceeds in the direction defined by the specified angle similar to the css gradient angle where 0deg is up, with positive angle...
... <basic-shape> specifies a css shape including circle(), ellipse(), in
set(), polygon(), or path().
...And 9 more matches
<input type="reset"> - HTML: Hypertext Markup Language
<input> elements of type "re
set" are rendered as buttons, with a default click event handler that re
sets all of the inputs in the form to their initial values.
... you should usually avoid including re
set buttons in your forms.
... value a domstring used as the button's label events click supported common attributes type and value idl attributes value methods none value an <input type="re
set"> element's value attribute contains a domstring that is used as the button's label.
...And 9 more matches
JS_GetPropertyAttrsGetterAndSetter
retrieve the attributes, getter, and
setter of a specified property.
... syntax jsbool js_getpropertyattrsgetterand
setter(jscontext *cx, jsobject *obj, const char *name, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *
setterp); jsbool js_getucpropertyattrsgetterand
setter(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *
setterp); jsbool js_getpropertyattrsgetterand
setterbyid(jscontext *cx, jsobject *obj, jsid id, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *
setterp); // added in spidermonkey 1.8.1 name type description cx jscontext * the context in which to perform the property lookup.
... namelen size_t (only in js_getucpropertyattrsgetterand
setter) the length of name in characters; or (size_t) -1 to indicate that name is null-terminated.
...And 7 more matches
JS_SetElement
syntax /* added in spidermonkey 31 */ bool js_
setelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlevalue v); bool js_
setelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handleobject v); bool js_
setelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlestring v); bool js_
setelement(jscontext *cx, js::handleobject obj, uint32_t index, int32_t v); bool js_
setelement(jscontext *cx, js::handleobject obj, uint32_t index, uint32_t v); bool js_
setelement(jscontext *cx, js::handleobject obj, uint32_t index, double v); /* obsolete since jsapi 29 */ bool js_
setelement(jscontext *cx, js::handleobjec...
...t obj, uint32_t index, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to
set the element.
... index uint32_t index number of the element to
set.
...And 7 more matches
JS_SetOptions
enables and disables options on a jscontext, replacing all previously
set options.
... syntax uint32 js_
setoptions(jscontext *cx, uint32 options); name type description cx jscontext * a context on which to
set options.
... options uint32 the new
set of options.
...And 7 more matches
JS_SetParent
sets the parent for an object.
... syntax bool js_
setparent(jscontext *cx, js::handleobject obj, js::handleobject parent); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... obj js::handleobject pointer to the object for which to
set the parent.
...And 7 more matches
AudioListener.setPosition() - Web APIs
the
setposition() method of the audiolistener interface defines the position of the listener.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.
setposition(1,1,1); returns void.
...in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which
set new values for the panner position via the positionpanner() function.
...And 7 more matches
HTMLElement.offsetHeight - Web APIs
the htmlelement.off
setheight read-only property returns the height of an element, including vertical padding and borders, as an integer.
... typically, off
setheight is a measurement in pixels of the element's css height, including any borders, padding, and horizontal scrollbars (if rendered).
... if the element is hidden (for example, by
setting style.display on the element or one of its ancestors to "none"), then 0 is returned.
...And 7 more matches
HTMLImageElement.srcset - Web APIs
the htmlimageelement property src
set is a string which identifies one or more image candidate strings, separated using commas (,) each specifying image resources to use under given circumstances.
... the src
set property, along with the sizes property, are a crucial component in designing responsive web sites, as they can be used together to make pages that use appropriate images for the rendering situation.
... syntax htmlimageelement.src
set = imagecandidatestrings; let src
set = htmlimageelement.src
set; value a usvstring containing a comma-separated list of one or more image candidate strings to be used when determining which image resource to present inside the <img> element represented by the htmlimageelement.
...And 7 more matches
HTMLOrForeignElement.dataset - Web APIs
the data
set read-only property of the htmlorforeignelement interface provides read/write access to all the custom data attributes (data-*)
set on the element.
...note that the data
set property itself can be read, but not directly written.
... instead, all writes must be to the individual properties within the data
set, which in turn represent the data attributes.
...And 7 more matches
PannerNode.setOrientation() - Web APIs
the
setorientation() method of the pannernode interface defines the direction the audio source is playing in.
... syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.
setorientation(1,0,0); returns void.
...in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which
set new values for the panner position via the positionpanner() function.
...And 7 more matches
Lighting a WebXR setting - Web APIs
because the webxr device api relies on other technologies—namely, webgl and frameworks based upon it—to perform all rendering, texturing, and lighting of a scene, the same general lighting concepts apply to webxr
settings or scenes as to any other webgl-generated display.
... components of a light source a light source has three major components; each component is in essence a type of light there are three kinds of light that can affect the color and brightness of objects and their pixels as displayed on the viewer's screen or head
set.
...while some of these are also useful in any other 3d
setting, most are specific to virtual reality and, in some cases even more so, to augmented reality.
...And 7 more matches
@charset - CSS: Cascading Style Sheets
the @char
set css at-rule specifies the character encoding used in the style sheet.
...if several @char
set at-rules are defined, only the first one is used, and it cannot be used inside a style attribute on an html element or inside the <style> element where the character
set of the html page is relevant.
... @char
set "utf-8"; this at-rule is useful when using non-ascii characters in some css properties, like content.
...And 7 more matches
mask-border-outset - CSS: Cascading Style Sheets
the mask-border-out
set css property specifies the distance by which an element's mask border is
set out from its border box.
... syntax /* <length> value */ mask-border-out
set: 1rem; /* <number> value */ mask-border-out
set: 1.5; /* vertical | horizontal */ mask-border-out
set: 1 1.2; /* top | horizontal | bottom */ mask-border-out
set: 30px 2 45px; /* top | right | bottom | left */ mask-border-out
set: 7px 12px 14px 5px; /* global values */ mask-border-out
set: inherit; mask-border-out
set: initial; mask-border-out
set: un
set; the mask-border-out
set property may be specified as one, two, three, or four values.
... when one value is specified, it applies the same out
set to all four sides.
...And 7 more matches
handler.setPrototypeOf() - JavaScript
the handler.
setprototypeof() method is a trap for object.
setprototypeof().
... syntax const p = new proxy(target, {
setprototypeof: function(target, prototype) { } }); parameters the following parameters are passed to the
setprototypeof() method.
... return value the
setprototypeof() method returns true if the [[prototype]] was successfully changed, otherwise false.
...And 7 more matches
Reflect.set() - JavaScript
the static reflect.
set() method works like
setting a property on an object.
... syntax reflect.
set(target, propertykey, value[, receiver]) parameters target the target object on which to
set the property.
... propertykey the name of the property to
set.
...And 7 more matches
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.
... description the browser calls npp_
setwindow after creating the instance to allow drawing to begin.
... subsequent calls to npp_
setwindow indicate changes in size or position; these calls pass the same npwindow object each time, but with different values.
...And 6 more matches
Set a breakpoint - Firefox Developer Tools
there are many different types of breakpoint that can be
set in the debugger; this article covers standard (unconditional) breakpoints and conditional breakpoints.
... breakpoints in brief breakpoints are very useful when debugging javascript — you basically
set a point in your code where you would like execution of the code to pause.
... the source pane context menu in the source pane, you can handle
setting breakpoints by bringing up the context menu over a line number.
...And 6 more matches
AudioListener.setOrientation() - Web APIs
the
setorientation() method of the audiolistener interface defines the orientation of the listener.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.
setorientation(0,0,-1,0,1,0); returns void.
...in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which
set new values for the panner position via the positionpanner() function.
...And 6 more matches
Element.setAttribute() - Web APIs
sets the value of an attribute on the specified element.
... syntax element.
setattribute(name, value); parameters name a domstring specifying the name of the attribute whose value is to be
set.
... the attribute name is automatically converted to all lower-case when
setattribute() is called on an html element in an html document.
...And 6 more matches
PannerNode.setVelocity() - Web APIs
the
setvelocity() method of the pannernode interface defines the velocity vector of the audio source — how fast it is moving and in what direction.
... syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.
setvelocity(0,0,17); returns void.
...in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which
set new values for the panner position via the positionpanner() function.
...And 6 more matches
Range.setEnd() - Web APIs
the range.
setend() method
sets the end position of a range to be located at the given off
set into the specified node x.
setting the end point above (higher in the document) than the start point will result in a collapsed range with the start and end points both
set to the specified end position.
... syntax range.
setend(endnode, endoff
set); parameters endnode the node inside which the range should end.
... endoff
set an integer greater than or equal to zero representing the off
set for the end of the range from the start of endnode.
...And 6 more matches
WebGLRenderingContext.polygonOffset() - Web APIs
the webglrenderingcontext.polygonoff
set() method of the webgl api specifies the scale factors and units to calculate depth values.
... the off
set is added before the depth test is performed and before the value is written into the depth buffer.
... syntax void gl.polygonoff
set(factor, units); parameters factor a glfloat which
sets the scale factor for the variable depth off
set for each polygon.
...And 6 more matches
XMLHttpRequest.responseType - Web APIs
the xmlhttprequest property respon
setype is an enumerated string value specifying the type of data contained in the response.
...if an empty string is
set as the value of respon
setype, the default value of text is used.
... syntax var type = xmlhttprequest.respon
setype; xmlhttprequest.respon
setype = type; value a string taken from the xmlhttprequestrespon
setype enum which specifies what type of data the response contains.
...And 6 more matches
border-image-outset - CSS: Cascading Style Sheets
the border-image-out
set css property
sets the distance by which an element's border image is
set out from its border box.
... the parts of the border image that are rendered outside the element's border box with border-image-out
set do not trigger overflow scrollbars and don't capture mouse events.
... syntax /* <length> value */ border-image-out
set: 1rem; /* <number> value */ border-image-out
set: 1.5; /* vertical | horizontal */ border-image-out
set: 1 1.2; /* top | horizontal | bottom */ border-image-out
set: 30px 2 45px; /* top | right | bottom | left */ border-image-out
set: 7px 12px 14px 5px; /* global values */ border-image-out
set: inherit; border-image-out
set: initial; border-image-out
set: un
set; the border-image-out
set property may be specified as one, two, three, or four values.
...And 6 more matches
counter-reset - CSS: Cascading Style Sheets
the counter-re
set css property re
sets a css counter to a given value.
... syntax /*
set "my-counter" to 0 */ counter-re
set: my-counter; /*
set "my-counter" to -1 */ counter-re
set: my-counter -1; /*
set "counter1" to 1, and "counter2" to 4 */ counter-re
set: counter1 1 counter2 4; /* cancel any re
set that could have been
set in less specific rules */ counter-re
set: none; /* global values */ counter-re
set: inherit; counter-re
set: initial; counter-re
set: un
set; the counter-re
set property is specified as either one of the following: a <...
...you may specify as many counters to re
set as you want, with each name or name-number pair separated by a space.
...And 6 more matches
counter-set - CSS: Cascading Style Sheets
the counter-
set css property
sets a css counter to a given value.
... syntax /*
set "my-counter" to 0 */ counter-
set: my-counter; /*
set "my-counter" to -1 */ counter-
set: my-counter -1; /*
set "counter1" to 1, and "counter2" to 4 */ counter-
set: counter1 1 counter2 4; /* cancel any counter that could have been
set in less specific rules */ counter-
set: none; /* global values */ counter-
set: inherit; counter-
set: initial; counter-
set: un
set; the counter-
set property is specified as either one of the following: a <custom-ident> naming the counter, followed optionally by an <integer>.
... you may specify as many counters to re
set as you want, with each name or name-number pair separated by a space.
...And 6 more matches
image-set() - CSS: Cascading Style Sheets
the image-
set() css function notation is a method of letting the browser pick the most appropriate css image from a given
set, primarily for high pixel density screens.
...the image-
set() function delivers the most appropriate image resolution for a user’s device, providing a
set of image options — each with an associated resolution declaration — from which the browser picks the most appropriate for the device and
settings.
... image-
set() allows the author to provide options rather than determining what each individual user needs.
...And 6 more matches
offset-anchor - CSS: Cascading Style Sheets
the off
set-anchor css property specifies the point inside the box of an element travelling along an off
set-path that is actually moving along the path.
... syntax /* keyword values */ off
set-anchor: top; off
set-anchor: bottom; off
set-anchor: left; off
set-anchor: right; off
set-anchor: center; off
set-anchor: auto; /* <percentage> values */ off
set-anchor: 25% 75%; /* <length> values */ off
set-anchor: 0 0; off
set-anchor: 1cm 2cm; off
set-anchor: 10ch 8em; /* edge off
sets values */ off
set-anchor: bottom 10px right 20px; off
set-anchor: right 3em bottom 10px; /* global values */ off
set-anchor: inherit; off
set-anchor: initial; off
set-anchor: un
set; values auto off
set-anchor is given the same value as the element's transform-origin, unless off
set-path is none, in which case it takes its value from off
set-position.
...| [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]where <length-percentage> = <length> | <percentage> examples
setting various off
set-anchor values in the following example, we have three <div> elements nested in <section> elements.
...And 6 more matches
Object.setPrototypeOf() - JavaScript
the object.
setprototypeof() method
sets the prototype (i.e., the internal [[prototype]] property) of a specified object to another object or null.
...in addition, the effects of altering inheritance are subtle and far-flung, and are not limited to simply the time spent in the object.
setprototypeof(...) statement, but may extend to any code that has access to any object whose [[prototype]] has been altered.
...until engine developers address this issue, if you are concerned about performance, you should avoid
setting the [[prototype]] of an object.
...And 6 more matches
Reflect.setPrototypeOf() - JavaScript
the static reflect.
setprototypeof() method is the same method as object.
setprototypeof(), except for its return type.
... it
sets the prototype (i.e., the internal [[prototype]] property) of a specified object to another object or to null, and returns true if the operation was successful, or false otherwise.
... syntax reflect.
setprototypeof(target, prototype) parameters target the target object of which to
set the prototype.
...And 6 more matches
JS_SetGCCallback
syntax void js_
setgccallback(jsruntime *rt, jsgccallback cb, void *data); jsgccallback js_
setgccallback(jscontext *cx, jsgccallback cb); // obsolete since jsapi 13 jsgccallback js_
setgccallbackrt(jsruntime *rt, jsgccallback cb); // obsolete since jsapi 13 name type description cx jscontext * (for the old js_
setgccallback) any jscontext.
... the gc callback of the associated jsruntime is
set.
... rt jsruntime * the jsruntime for which to
set the gc callback.
...And 5 more matches
Headers.set() - Web APIs
the
set() method of the headers interface
sets a new value for an existing header inside a headers object, or adds the header if it does not already exist.
... the difference between
set() and headers.append is that if the specified header already exists and accepts multiple values,
set() overwrites the existing value with the new one, whereas headers.append appends the new value to the end of the
set of values.
... syntax myheaders.
set(name, value); parameters name the name of the http header you want to
set to a new value.
...And 4 more matches
ImageCapture.getPhotoSettings() - Web APIs
the getphoto
settings() method of the imagecapture interface returns a promise that resolves with a photo
settings object containing the current photo configuration
settings.
... syntax const
settingspromise = imagecapture.getphoto
settings() return value a promise that resolves with a photo
settings object containing the following properties: filllightmode: the flash
setting of the capture device, one of "auto", "off", or "on".
...the user agent selects the closest width value to this
setting if it only supports discrete heights.
...And 4 more matches
MediaSession.setActionHandler() - Web APIs
the
setactionhandler() property of the mediasession interface
sets an event handler for a media session action.
... syntax navigator.mediasession.
setactionhandler(type, callback) parameters type a domstring representing an action type to listen for.
... description to remove a previously-established action handler, call
setactionhandler() again, specifying null as the callback.
...And 4 more matches
Node.setUserData() - Web APIs
the node.
setuserdata() method allows a user to attach (or remove) data to an element, without needing to modify the dom.
... the node.getuserdata and node.
setuserdata methods are no longer available from web content.
... htmlelement.data
set or weakmap can be used instead.
...And 4 more matches
OscillatorNode.setPeriodicWave() - Web APIs
the
setperiodicwave() method of the oscillatornode interface is used to point to a periodicwave defining a periodic waveform that can be used to shape the oscillator's output, when type is custom.
... this replaces the now-obsolete oscillatornode.
setwavetable().
... syntax oscillatornode.
setperiodicwave(wave); parameters wave a periodicwave object representing the waveform to use as the shape of the oscillator's output.
...And 4 more matches
RTCRtpSender.setParameters() - Web APIs
the
setparameters() 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,
setparameters() 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.
setparameters(parameters) parameters parameters an object conforming with the rtcrtpsendparameters dictionary, specifying options for the rtcrtpsender; these include potential codecs that could be use for encoding the sender's track.
...And 4 more matches
RTCRtpTransceiver.setCodecPreferences() - Web APIs
the rtcrtptransceiver method
setcodecpreferences() configures the transceiver's codecs given a list of rtcrtpcodeccapability objects specifying the new preferences for each codec.
... the specified
set of codecs and configurations will be used for all future connections including this transceiver until this method is called again.
... when preparing to open an rtcpeerconnection, you can change the codec parameters from the user agent's default configuration by calling
setcodecparameters() before calling either rtcpeerconnection.createoffer() or createanswer().
...And 4 more matches
SVGFEOffsetElement - Web APIs
the svgfeoff
setelement interface corresponds to the <feoff
set> element.
...,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfeoff
setelement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfeoff
setelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this int...
... svgfeoff
setelement.in1 read only an svganimatedstring corresponding to the in attribute of the given element.
...And 4 more matches
font-variation-settings - CSS: Cascading Style Sheets
the font-variation-
settings css property provides low-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values.
... syntax /* use the default
settings */ font-variation-
settings: normal; /*
set values for variable font axis names */ font-variation-
settings: "xhgt" 0.7; /* global values */ font-variation-
settings: inherit; font-variation-
settings: initial; font-variation-
settings: un
set; values this property's value can take one of two forms: normal text is laid out using default
settings.
...each
setting is always one or more pairs consisting of a <string> of 4 ascii characters followed by a <number> indicating the axis value to
set.
...And 4 more matches
offset - CSS: Cascading Style Sheets
the off
set css shorthand property
sets all the properties required for animating an element along a defined path.
... constituent properties this property is a shorthand for the following css properties: off
set-anchor off
set-distance off
set-path off
set-position off
set-rotate syntax /* off
set position */ off
set: auto; off
set: 10px 30px; off
set: none; /* off
set path */ off
set: ray(45deg closest-side); off
set: path('m 100 100 l 300 100 l 200 300 z'); off
set: url(arc.svg); /* off
set path with distance and/or rotation */ off
set: url(circle.svg) 100px; off
set: url(circle.svg) 40%; off
set: url(circle.svg) 30deg; off
set: url(circle.svg) 50px 20deg; /* including off
set anchor */ off
set: ray(45deg closest-side) / 40px 20px; off
set: url(arc.svg) 2cm / 0.5cm 3cm; off
set: url(arc.svg) 30deg / 50px 100px; formal definition initial valueas ...
...each of the properties of the shorthand:off
set-position: autooff
set-path: noneoff
set-distance: 0off
set-anchor: autooff
set-rotate: autoapplies totransformable elementsinheritednopercentagesas each of the properties of the shorthand:off
set-position: refertosizeofcontainingblockoff
set-distance: refer to the total path lengthoff
set-anchor: relativetowidthandheightcomputed valueas each of the properties of the shorthand:off
set-position: for <length> the absolute value, otherwise a percentageoff
set-path: as specifiedoff
set-distance: for <length> the absolute value, otherwise a percentageoff
set-anchor: for <length> the absolute value, otherwise a percentageoff
set-rotate: as specifiedanimation typeas each of the properties of the shorthand:off
set-position: a positionoff
set-path: as <angle>, <basic-sh...
...And 4 more matches
set:difference() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes
set:difference() returns the difference between two node-
sets.
... in other words, it returns a node-
set whose nodes are in one node-
set but not in the other.
... the template version of
set:difference applies templates to these nodes in
set:difference mode, copying the nodes so that a result tree fragment consisting of the nodes is returned.
...And 4 more matches
set:leading() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes
set:leading() returns the nodes in one node-
set that come before the first node in the other node-
set.
... syntax
set:leading(node
set1, node
set2) parameters node
set1 the node
set to find nodes in that precede the first node in the second node
set.
... node
set2 the node
set to compare against.
...And 4 more matches
set:trailing() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes
set:trailing() returns the nodes in one node-
set that come after the first node in the other node-
set.
... syntax
set:trailing(node
set1, node
set2) parameters node
set1 the node
set to find nodes in that follow the first node in the second node
set.
... node
set2 the node
set to compare against.
...And 4 more matches
Setting up adaptive streaming media sources - Developer guides
let's say you want to
set up an adaptive streaming media source on a server, to be consumed inside an html5 media element.
... ondemand profile this profile will allow switching between streams 'on demand' - that is to say that you only need provide a
set of contiguous files and specify the bandwidth for each one and the appropriate file will be chosen automatically.
...pd xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemalocation="urn:mpeg:dash:schema:mpd:2011 dash-mpd.xsd" type="static" mediapresentationduration="pt654s" minbuffertime="pt2s" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011"> <baseurl>http://example.com/ondemand/</baseurl> <period> <!-- english audio --> <adaptation
set mimetype="audio/mp4" codecs="mp4a.40.5" lang="en" subsegmentalignment="true" subsegmentstartswithsap="1"> <representation id="1" bandwidth="64000"> <baseurl>elephantsdream_aac48k_064.mp4.dash</baseurl> </representation> </adaptation
set> <!-- video --> <adaptation
set mimetype="video/mp4" codecs="avc1.42401e" subsegmentalignment="true" subsegmentstartswithsap="1"> ...
...And 4 more matches
Accept-Charset - HTTP
the accept-char
set request http header advertises which character encodings the client understands.
... 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 char
set= parameter.
...but for a better user experience, this is rarely done and the accept-char
set header is ignored.
...And 4 more matches
PR_SetThreadPriority
sets the priority of a specified thread.
... 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.
... priority the priority you want to
set.
...it is preferable for a thread to specify itself in the thread parameter when it calls pr_
setthreadpriority.
PR_SetThreadPrivate
sets per-thread private data.
... 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.
... description if the thread already has non-null private data associated with it, and if the destructor function for the index is known (not null), nspr calls the destructor function associated with the index before
setting the new data value.
... the only way to eliminate thread private data at an index prior to the thread's termination is to call pr_
setthreadprivate with a null argument.
JS::SetOutOfMemoryCallback
syntax void js::
setoutofmemorycallback(jsruntime *rt, js::outofmemorycallback cb, void *data); name type description rt jsruntime * the jsruntime for which to
set the gc callback.
...added in spidermonkey 38 callback syntax typedef void (* outofmemorycallback)(jscontext *cx, void *data); name type description data void * data parameter passed to js::
setoutofmemorycallback.
... js::
setoutofmemorycallback
sets a callback function for it.
... see also mxr id search for js::
setoutofmemorycallback mxr id search for js::outofmemorycallback bug 969415 bug 987995 - added data parameter ...
JS_SET_TRACING_DETAILS
this article covers features introduced in spidermonkey 1.8
set debugging information about the next thing to be traced by a jstracer.
... syntax js_
set_tracing_details(trc, printer, arg, index) name type description trc jstracer * the tracer whose debugging hooks are to be
set.
... description
set debugging information about a reference to a traceable thing to prepare for the following call to js_calltracer.
...mxr id search for js_
set_tracing_details ...
JS_SetCompartmentNameCallback
this article covers features introduced in spidermonkey 17
set callback function to name each compartment.
... syntax void js_
setcompartmentnamecallback(jsruntime *rt, jscompartmentnamecallback callback); name type description cx jsruntime * the runtime to
set the callback function.
... description js_
setcompartmentnamecallback
sets callback function which will be called to name the compartment.
... see also mxr id search for js_
setcompartmentnamecallback mxr id search for jscompartmentnamecallback bug 777528 ...
JS_SetDestroyCompartmentCallback
this article covers features introduced in spidermonkey 17
set the callback function for each compartment being destroyed.
... syntax void js_
setdestroycompartmentcallback(jsruntime *rt, jsdestroycompartmentcallback callback); name type description cx jsruntime * the runtime to
set the callback function.
... description js_
setdestroycompartmentcallback
sets callback function which will be called when sweeping each compartment of the runtime, before deleting the compartment.
... see also mxr id search for js_
setdestroycompartmentcallback mxr id search for jsdestroycompartmentcallback bug 737365 ...
JS_SetGCZeal
syntax void js_
setgczeal(jscontext *cx, uint8_t zeal, uint32_t frequency); name type description cx jscontext * a context.
... the gc zeal level of the associated jsruntime is
set.
... description js_
setgczeal
sets the level of additional garbage collection to perform for a runtime, for the purpose of finding or reproducing bugs.
...(in a debug build of gecko, you can also
set the current gc zeal level using the javascript.options.gczeal preference.) see also mxr id search for js_
setgczeal mxr id search for js_gc_zeal js_schedulegc bug 308429 bug 650978 ...
JS_SetICUMemoryFunctions
sets the memory allocation and deallocation functions used by the icu internationalization library.
... syntax bool js_
seticumemoryfunctions(js_icuallocfn allocfn, js_icureallocfn reallocfn, js_icufreefn freefn); type description allocfn js_icuallocfn an allocation function.
... description js_
seticumemoryfunctions
sets the allocator functions used by the icu internationalization library.
...mxr id search for js_
seticumemoryfunctions.
JS_SetPendingException
sets the current exception being thrown within a context.
... syntax void js_
setpendingexception(jscontext *cx, js::handlevalue v); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... description js_
setpendingexception
sets the current exception being thrown within a context.
...see also mxr id search for js_
setpendingexception js_isexceptionpending js_getpendingexception js_clearpendingexception js_reportpendingexception ...
JS_SetVersionForCompartment
syntax void js_
setversionforcompartment(jscompartment *compartment, jsversion version); name type description compartment jscompartment * pointer to a js compartment.
... version jsversion version of javascript to
set compartment to.
... description js_
setversionforcompartment attempts to
set the version of javascript to version for a specified compartment, compartment.
... see also mxr id search for js_
setversionforcompartment jsversion js_getversion js_versiontostring js_stringtoversion bug 880917 ...
Setting up CDT to work on SpiderMonkey
there is a guide for
setting up cdt to work with the mozilla codebase, but it does not cover
setting things up for just spidermonkey instead of the whole mozilla codebase.
... step 2 - installing eclipse and
setting up the project the following run-down is a condensed and updated version of what is explained in much more detail for the entire mozilla codebase.
... step 3 - index all the code to let cdt know about the build, it has to invoke make itself (or, as is done in the guide for the whole mozilla codebase on mdn, read a log of the build), which can be
setup with these simple steps: open the project's properties by selecting its root and clicking "properties" in the "file" menu and select "c/c++ build".
... under the "builder
settings" group tab, deactivate "use default build command".
mozIStorageResultSet
the mozistorageresult
set interface represents a
set of results from a storage statement.
... storage/public/mozistorageresult
set.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview mozistoragerow getnextrow(); methods getnextrow() returns the next row from the result
set.
...return value a mozistoragerow object containing the next row from the result
set, or null if there are no more results.
nsIMicrosummarySet
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides access to
sets of microsummaries returned from the nsimicrosummaryservice.
....0) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void addobserver(in nsimicrosummaryobserver observer); nsisimpleenumerator enumerate(); void removeobserver(in nsimicrosummaryobserver observer); methods addobserver() add a microsummary observer to this microsummary
set.
... adding an observer to a
set is the equivalent of adding it to each constituent microsummary.
... enumerate() retrieve an nsisimpleenumerator of microsummaries in the
set.
NS_CStringSetData
« xpcom api reference summary the ns_cstring
setdata function copies data into the string's internal buffer.
... #include "nsstringapi.h" nsresult ns_cstring
setdata( nsacstring& astring, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to modify.
... return values the ns_cstring
setdata function returns ns_ok if successful.
... example nscstringcontainer str; rv = ns_cstringcontainerinit(str); if (ns_succeeded(rv)) { rv = ns_cstring
setdata(str, "hello world"); if (ns_succeeded(rv)) { // now, pass |str| to some function expecting a |const nsacstring&| parameter.
NS_CStringSetDataRange
« xpcom api reference summary the ns_cstring
setdatarange function copies data into a section of the string's internal buffer.
... #include "nsstringapi.h" nsresult ns_cstring
setdatarange( nsacstring& astring, pruint32 acutstart, pruint32 acutlength, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to modify.
... return values the ns_cstring
setdatarange function returns ns_ok if successful.
...g& str, const nsacstring& matchval, const nsacstring& newval) { const char* sp, *mp, *np; pruint32 sl, ml, nl; sl = ns_cstringgetdata(str, &sp); ml = ns_cstringgetdata(matchval, &mp); nl = ns_cstringgetdata(newval, &np); for (const char* iter = sp; iter <= sp + sl - ml; ++iter) { if (memcmp(iter, mp, ml) == 0) { pruint32 off
set = iter - sp; ns_cstring
setdatarange(str, off
set, ml, np, nl); sl = ns_cstringgetdata(str, &sp); iter = sp + off
set + nl - 1; } } } history this function was frozen for mozilla 1.7.
NS_StringSetData
« xpcom api reference summary the ns_string
setdata function copies data into the string's internal buffer.
... #include "nsstringapi.h" nsresult ns_string
setdata( nsastring& astring, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsastring instance to modify.
... return values the ns_string
setdata function returns ns_ok if successful.
... example code nsstringcontainer str; rv = ns_stringcontainerinit(str); if (ns_succeeded(rv)) { rv = ns_string
setdata(str, "hello world"); if (ns_succeeded(rv)) { // now, pass |str| to some function expecting a |const nsastring&| parameter.
NS_StringSetDataRange
« xpcom api reference summary the ns_string
setdatarange function copies data into a section of the string's internal buffer.
... #include "nsstringapi.h" nsresult ns_string
setdatarange( nsastring& astring, pruint32 acutstart, pruint32 acutlength, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsastring instance to modify.
... return values the ns_string
setdatarange function returns ns_ok if successful.
... const nsastring& matchval, const nsastring& newval) { const prunichar* sp, *mp, *np; pruint32 sl, ml, nl; sl = ns_stringgetdata(str, &sp); ml = ns_stringgetdata(matchval, &mp); nl = ns_stringgetdata(newval, &np); for (const prunichar* iter = sp; iter <= sp + sl - ml; ++iter) { if (memcmp(iter, mp, ml) == 0) { pruint32 off
set = iter - sp; ns_string
setdatarange(str, off
set, ml, np, nl); sl = ns_stringgetdata(str, &sp); iter = sp + off
set + nl - 1; } } } history this function was frozen for mozilla 1.7.
AbstractRange.endOffset - Web APIs
the endoff
set property of the abstractrange interface returns the off
set into the end node of the range's end position.
... syntax var endoff
set = range.endoff
set; value an integer value indicating the number of characters into the node indicated by endcontainer at which the final character of the range is located.
... specifications specification status comment domthe definition of 'endoff
set' in that specification.
... living standard static rangethe definition of 'endoff
set' in that specification.
AbstractRange.startOffset - Web APIs
the read-only startoff
set property of the abstractrange interface returns the off
set into the start node of the range's start position.
... syntax var startoff
set = range.startoff
set value an integer value indicating the number of characters into the node indicated by startcontainer at which the first character of the range is located.
... specifications specification status comment domthe definition of 'startoff
set' in that specification.
... living standard static rangethe definition of 'startoff
set' in that specification.
Document.enableStyleSheetsForSet() - Web APIs
enables the style sheets matching the specified name in the current style sheet
set, and disables all other style sheets (except those without a title, which are always enabled).
... syntax document.enablestylesheetsfor
set(name); parameters name the name of the style sheets to enable.
... this method never affects the values of document.laststylesheet
set or document.preferredstylesheet
set.
... example document.enablestylesheetsfor
set("some style sheet
set name"); ...
Document.preferredStyleSheetSet - Web APIs
the preferredstylesheet
set property returns the preferred style sheet
set as
set by the page author.
... syntax preferredstylesheet
set = document.preferredstylesheet
set on return, preferredstylesheet
set indicates the author's preferred style sheet
set.
... if there isn't a preferred style sheet
set defined by the author, the empty string ("") is returned.
... example if (document.preferredstylesheet
set) { console.log("the preferred style sheet
set is: " + document.preferredstylesheet
set); } else { console.log("there is no preferred style sheet."); } ...
FontFace.featureSettings - Web APIs
the feature
settings property of the fontface interface retrieves or
sets infrequently used font features that are not available from a font's variant properties.
... it is equivalent to the font-feature-
settings descriptor.
... syntax var feature
settingdescriptor = fontface.feature
settings; fontface.feature
settings = feature
settingdescriptor; value a cssomstring containing a descriptor.
... specifications specification status comment css font loading module level 3the definition of 'feature
settings' in that specification.
FontFaceSet.ready - Web APIs
the ready readonly property of the fontface
set interface returns a promise that resolves to the given fontface
set.
... syntax fontface
set.ready.then(function(fontface
set) { // ...
... }); returns a promise that resolves to the given fontface
set.
... specifications specification status comment css font loading module level 3the definition of 'fontface
set' in that specification.
FormData.set() - Web APIs
the
set() method of the formdata interface
sets a new value for an existing key inside a formdata object, or adds the key/value if it does not already exist.
... the difference between
set() and formdata.append is that if the specified key does already exist,
set() will overwrite all existing values with the new one, whereas formdata.append will append the new value onto the end of the existing
set of values.
... 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.
... example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you can
set key/value pairs on this using formdata.
set: formdata.
set('username', 'chris'); formdata.
set('userpic', myfileinput.files[0], 'chris.jpg'); if the sent value is different than string or blob it will be automatically converted to string: formdata.
set('name', 72); formdata.get('name'); // "72" specifications specification status comment xmlhttprequestthe definition of 's...
HTMLMediaElement.setMediaKeys() - Web APIs
the
setmediakeys() property of the htmlmediaelement interface returns a promise that resolves to the passed mediakeys, which are those used to decrypt media during playback.
... syntax var promise = htmlmediaelement.
setmediakeys(mediakeys); parameters mediakeys a reference to a mediakeys object that the htmlmediaelement can use for decryption of media data during playback.
... specifications specification status comment encrypted media extensionsthe definition of '
setmediakeys()' in that specification.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet
setmediakeyschrome full support yesedge full support 13firefox full support yesie ?
HTMLSelectElement.setCustomValidity() - Web APIs
the htmlselectelement.
setcustomvalidity() method
sets the custom validity message for the selection element to the specified message.
... syntax selectelt.
setcustomvalidity(string); parameters string is the domstring containing the error message.
... specifications specification status comment html living standardthe definition of 'htmlselectelement.
setcustomvalidity()' in that specification.
... html5the definition of 'htmlselectelement.
setcustomvalidity()' in that specification.
MediaSessionActionDetails.seekOffset - Web APIs
the mediasessionactiondetails dictionary's seekoff
set property is an optional value passed into the action handler callback to provide the number of seconds the seekforward and seekbackward actions should move the playback time by.
... syntax let mediasessionactiondetails = { seekoff
set: deltatimeinseconds }; let deltatime = mediasessionactiondetails.seekoff
set; value a floating-point value indicating the time delta in seconds by which to move the playback position relative to its current timestamp.
... if the off
set isn't specified, the user agent will choose an appropriate off
set automatically.
... specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.seekoff
set' in that specification.
MediaSource.setLiveSeekableRange() - Web APIs
the
setliveseekablerange() method of the mediasource interface
sets the range that the user can seek to in the media element.
... syntax mediasource.
setliveseekablerange(start, end) parameters start the start of the seekable range to
set in seconds measured from the beginning of the source.
... end the end of the seekable range to
set in seconds measured from the beginning of the source.
... return value undefined example // tbd specifications specification status comment media source extensionsthe definition of '
setliveseekablerange()' in that specification.
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.
... if the signalingstate is
set to "closed", an invalidstateerror is raised.
... syntax pc.
setidentityprovider(domainname [, protocol] [, username]); there is no return value for this method.
... example var pc = new peerconnection(); pc.
setidentityassertion("developer.mozilla.org"); specifications specification status comment identity for webrtcthe definition of 'rtcpeerconnection.
setidentityprovider()' in that specification.
Range.setEndAfter() - Web APIs
the range.
setendafter() method
sets the end position of a range relative to another node.
... syntax range.
setendafter(referencenode); parameters referencenode the node to end the range after.
... example var range = document.createrange(); var referencenode = document.getelementsbytagname('div').item(0); range.
setendafter(referencenode); specifications specification status comment domthe definition of 'range.
setendafter()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.
setendafter()' in that specification.
Range.setEndBefore() - Web APIs
the range.
setendbefore() method
sets the end position of a range relative to another node.
... syntax range.
setendbefore(referencenode); parameters referencenode the node to end the range before.
... example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.
setendbefore(referencenode); specifications specification status comment domthe definition of 'range.
setendbefore()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.
setendbefore()' in that specification.
Range.setStartAfter() - Web APIs
the range.
setstartafter() method
sets the start position of a range relative to a node.
... syntax range.
setstartafter(referencenode); parameters referencenode the node to start the range after.
... example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.
setstartafter(referencenode); specifications specification status comment domthe definition of 'range.
setstartafter()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.
setstartafter()' in that specification.
Range.setStartBefore() - Web APIs
the range.
setstartbefore() method
sets the start position of a range relative to another node.
... syntax range.
setstartbefore(referencenode); parameters referencenode the node before which the range should start.
... example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.
setstartbefore(referencenode); specifications specification status comment domthe definition of 'range.
setstartbefore()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.
setstartbefore()' in that specification.
SVGSetElement - Web APIs
the svg
setelement interface corresponds to the <
set> element.
..."#fff" stroke="#d4dde4" stroke-width="2px" /><text x="386" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svganimationelement</text></a><polyline points="291,89 281,84 281,94 291,89" stroke="#d4dde4" fill="none"/><line x1="281" y1="89" x2="251" y2="89" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svg
setelement" target="_top"><rect x="121" y="65" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="186" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svg
setelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interfac...
... specifications specification status comment svg animations level 2the definition of 'svg
setelement' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svg
setelement' in that specification.
StaticRange.endOffset - Web APIs
the endoff
set property of the staticrange interface returns the off
set into the end node of the range's end position.
... syntax var endoff
set = staticrange.endoff
set value an integer value indicating the number of characters into the node indicated by endcontainer at which the final character of the range is located.
... specifications specification status comment domthe definition of 'endoff
set' in that specification.
... living standard static rangethe definition of 'endoff
set' in that specification.
StaticRange.startOffset - Web APIs
the read-only startoff
set property of the staticrange interface returns the off
set into the start node of the range's start position.
... syntax var startoff
set = staticrange.startoff
set value an integer value indicating the number of characters into the node indicated by startcontainer at which the first character of the range is located.
... specifications specification status comment domthe definition of 'startoff
set' in that specification.
... living standard static rangethe definition of 'startoff
set' in that specification.
Window.setCursor() - Web APIs
the window.
setcursor() method
sets the cursor for the current window.
... example function
setbusycursor(enable) { window.
setcursor(enable ?
... "wait" : "auto"); } notes the cursor isn't re
set until it's
set back to auto.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet
setcursor non-standardchrome no support noedge no support nofirefox no support noie ?
XRReferenceSpace.onreset - Web APIs
the xrreferencespace interface's onre
set event handler property can be
set to a function which is called when the xrreferencespace receives a re
set event, signaling that the xr device has experienced a discontinuity large enough to require that the position and/or orientation of the origin be significantly altered to compensate.
... syntax xrreferencespace.onre
set = eventhandler; eventhandler = xrreferencespace.onre
set; value an event handler function which will be called whenever the re
set event is received by the xrreferencespace.
... usage notes see the re
set event documentation for further details.
... specifications specification status comment webxr device apithe definition of 'onre
set' in that specification.
font-variation-settings - CSS: Cascading Style Sheets
the font-variation-
settings css descriptor allows authors to specify low-level opentype or truetype font variations in the @font-face rule.
... syntax /* use the default
settings */ font-variation-
settings: normal; /*
set values for opentype axis names */ font-variation-
settings: "xhgt" 0.7; values normal text is laid out using default
settings.
...each
setting is always a <string> of 4 ascii characters, followed by a <number> indicating the axis value.
... formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax normal | [ <string> <number> ]# examples
setting font weight and stretch in a @font-face rule @font-face { font-family: 'opentypefont'; src: url('open_type_font.woff2') format('woff2'); font-weight: normal; font-style: normal; font-variation-
settings: 'wght' 400, 'wdth' 300; } specifications specification status comment css fonts module level 4the definition of 'font-variation-
settings' in that specification.
inset-inline-end - CSS: Cascading Style Sheets
the in
set-inline-end css property defines the logical inline end in
set of an element, which maps to a physical in
set depending on the element's writing mode, directionality, and text orientation.
... /* <length> values */ in
set-inline-end: 3px; in
set-inline-end: 2.4em; /* <percentage>s of the width or height of the containing block */ in
set-inline-end: 10%; /* keyword value */ in
set-inline-end: auto; /* global values */ in
set-inline-end: inherit; in
set-inline-end: initial; in
set-inline-end: un
set; the shorthand for in
set-inline-start and in
set-inline-end is in
set-inline.
... syntax values the in
set-inline-end property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-width of containing blockcomputed valuesame as box off
sets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples
setting inline end off
set html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; position: relative; in
set-inline-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'in
set-inline-end' in that specification.
inset-inline-start - CSS: Cascading Style Sheets
the in
set-inline-start css property defines the logical inline start in
set of an element, which maps to a physical off
set depending on the element's writing mode, directionality, and text orientation.
... /* <length> values */ in
set-inline-start: 3px; in
set-inline-start: 2.4em; /* <percentage>s of the width or height of the containing block */ in
set-inline-start: 10%; /* keyword value */ in
set-inline-start: auto; /* global values */ in
set-inline-start: inherit; in
set-inline-start: initial; in
set-inline-start: un
set; the shorthand for in
set-inline-start and in
set-inline-end is in
set-inline.
... syntax values the in
set-inline-start property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-width of containing blockcomputed valuesame as box off
sets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples
setting inline start off
set html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; position: relative; in
set-inline-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'in
set-inline-start' in that specification.
offset-rotate - CSS: Cascading Style Sheets
the off
set-rotate css property defines the orientation/direction of the element as it is positioned along the off
set-path.
... syntax /* follow the path direction, with optional additional angle */ off
set-rotate: auto; off
set-rotate: auto 45deg; /* follow the path direction but facing the opposite direction of `auto` */ off
set-rotate: reverse; /* keep a constant rotation regardless the position on the path */ off
set-rotate: 90deg; off
set-rotate: .5turn; auto the element is rotated by the angle of the direction of the off
set-path, relative to the positive x-axis.
... formal definition initial valueautoapplies totransformable elementsinheritednocomputed valueas specifiedanimation typeas <angle>, <basic-shape> or <path()> formal syntax [ auto | reverse ] | <angle> examples
setting element orientation along its off
set path html <div></div> <div></div> <div></div> css div { width: 40px; height: 40px; background: #2bc4a2; margin: 20px; clip-path: polygon(0% 0%, 70% 0%, 100% 50%, 70% 100%, 0% 100%, 30% 50%); animation: move 5000ms infinite alternate ease-in-out; off
set-path: path('m20,20 c20,50 180,-10 180,20'); } div:nth-child(1) { off
set-rotate: auto...
...; } div:nth-child(2) { off
set-rotate: auto 90deg; } div:nth-child(3) { off
set-rotate: 30deg; } @keyframes move { 100% { off
set-distance: 100%; } } result specifications specification status comment motion path module level 1the definition of 'off
set-rotate' in that specification.
outline-offset - CSS: Cascading Style Sheets
the outline-off
set css property
sets the amount of space between an outline and the edge or border of an element.
... syntax /* <length> values */ outline-off
set: 3px; outline-off
set: 0.2em; /* global values */ outline-off
set: inherit; outline-off
set: initial; outline-off
set: un
set; values <length> the width of the space between the element and its outline.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea length formal syntax <length> examples
setting outline off
set in pixels html <p>gallia est omnis divisa in partes tres.</p> css p { outline: 1px dashed red; outline-off
set: 10px; background: yellow; border: 1px solid blue; margin: 15px; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-off
set' in that specification.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetoutline-off
setchrome full support 1edge full support 15firefox full support 1.5ie no support noopera full support 9.5safari full support 1.2webv...
unset - CSS: Cascading Style Sheets
the un
set css keyword re
sets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.
... un
set can be applied to any css property, including the css shorthand all.
... examples color html <p>this text is red.</p> <div class="foo"> <p>this text is also red.</p> </div> <div class="bar"> <p>this text is green (default inherited value).</p> </div> css .foo { color: blue; } .bar { color: green; } p { color: red; } .bar p { color: un
set; } result border html <p>this text has a red border.</p> <div> <p>this text has a red border.</p> </div> <div class="bar"> <p>this text has a black border (initial default, not inherited).</p> </div> css div { border: 1px solid green; } p { border: 1px solid red; } .bar p { border-color: un
set; } result specifications specification status comment css cascading and inheritance level 4the definition of 'un
set' in that specification.
... css cascading and inheritance level 3the definition of 'un
set' in that specification.
set:distinct() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes
set:distinct() returns a sub
set of the nodes in the specified node-
set, returning only nodes with unique string values.
... syntax
set:distinct(node
set) parameters node
set the node-
set in which to find unique nodes.
... returns a node-
set containing the nodes that have unique string values.
... specifications exslt -
set:distinct ...
<frameset> - HTML: Hypertext Markup Language
the html <frame
set> element is used to contain <frame> elements.
... cols this attribute specifies the number and size of horizontal spaces in a frame
set.
... rows this attribute specifies the number and size of vertical spaces in a frame
set.
... example <frame
set cols="50%,50%"> <frame src="https://udn.realityripple.com/docs/web/html/element/frame
set" /> <frame src="https://udn.realityripple.com/docs/web/html/element/frame" /> </frame
set> ...
Date.prototype.setFullYear() - JavaScript
the
setfullyear() method
sets the full year for a specified date according to local time.
... syntax dateobj.
setfullyear(yearvalue[, monthvalue[, datevalue]]) parameters yearvalue an integer specifying the numeric value of the year, for example, 1995.
... 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.
... examples using
setfullyear() var thebigday = new date(); thebigday.
setfullyear(1997); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
setfullyear' in that specification.
Date.prototype.setHours() - JavaScript
the
sethours() method
sets the hours for a specified date according to local time, and returns the number of milliseconds since january 1, 1970 00:00:00 utc until the time represented by the updated date instance.
... 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 a parameter you specify is outside of the expected range,
sethours() attempts to update the date information in the date object accordingly.
... examples using
sethours() var thebigday = new date(); thebigday.
sethours(7); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
sethours' in that specification.
Date.prototype.setMinutes() - JavaScript
the
setminutes() method
sets the minutes for a specified date according to local time.
... 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 a parameter you specify is outside of the expected range,
setminutes() attempts to update the date information in the date object accordingly.
... examples using
setminutes() var thebigday = new date(); thebigday.
setminutes(45); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
setminutes' in that specification.
Date.prototype.setSeconds() - JavaScript
the
setseconds() method
sets the seconds for a specified date according to local time.
... 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.
... if a parameter you specify is outside of the expected range,
setseconds() attempts to update the date information in the date object accordingly.
... examples using
setseconds() var thebigday = new date(); thebigday.
setseconds(30); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
setseconds' in that specification.
Date.prototype.setTime() - JavaScript
the
settime() method
sets the date object to the time represented by a number of milliseconds since january 1, 1970, 00:00:00 utc.
... syntax dateobj.
settime(timevalue) parameters timevalue an integer representing the number of milliseconds since 1 january 1970, 00:00:00 utc.
... description use the
settime() method to help assign a date and time to another date object.
... examples using
settime() var thebigday = new date('july 1, 1999'); var sameasbigday = new date(); sameasbigday.
settime(thebigday.gettime()); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
settime' in that specification.
Date.prototype.setUTCDate() - JavaScript
the
setutcdate() method
sets the day of the month for a specified date according to universal time.
... 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.
... examples using
setutcdate() var thebigday = new date(); thebigday.
setutcdate(20); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
setutcdate' in that specification.
Date.prototype.setUTCFullYear() - JavaScript
the
setutcfullyear() method
sets the full year for a specified date according to universal time.
... syntax dateobj.
setutcfullyear(yearvalue[, monthvalue[, dayvalue]]) parameters yearvalue an integer specifying the numeric value of the year, for example, 1995.
... 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.
... examples using
setutcfullyear() var thebigday = new date(); thebigday.
setutcfullyear(1997); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
setutcfullyear' in that specification.
Date.prototype.setUTCHours() - JavaScript
the
setutchours() method
sets the hour for a specified date according to universal time, and returns the number of milliseconds since january 1, 1970 00:00:00 utc until the time represented by the updated date instance.
... syntax dateobj.
setutchours(hoursvalue[, minutesvalue[, secondsvalue[, msvalue]]]) parameters hoursvalue an integer between 0 and 23, representing the hour.
... if a parameter you specify is outside of the expected range,
setutchours() attempts to update the date information in the date object accordingly.
... examples using
setutchours() var thebigday = new date(); thebigday.
setutchours(8); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
setutchours' in that specification.
Date.prototype.setUTCMilliseconds() - JavaScript
the
setutcmilliseconds() method
sets the milliseconds for a specified date according to universal time.
... 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.
... examples using
setutcmilliseconds() var thebigday = new date(); thebigday.
setutcmilliseconds(500); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
setutcmilliseconds' in that specification.
Date.prototype.setUTCMinutes() - JavaScript
the
setutcminutes() method
sets the minutes for a specified date according to universal time.
... syntax dateobj.
setutcminutes(minutesvalue[, secondsvalue[, msvalue]]) parameters minutesvalue an integer between 0 and 59, representing the minutes.
... if a parameter you specify is outside of the expected range,
setutcminutes() attempts to update the date information in the date object accordingly.
... examples using
setutcminutes() var thebigday = new date(); thebigday.
setutcminutes(43); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
setutcminutes' in that specification.
Date.prototype.setUTCMonth() - JavaScript
the
setutcmonth() method
sets the month for a specified date according to universal time.
... syntax dateobj.
setutcmonth(monthvalue[, dayvalue]) parameters monthvalue an integer between 0 and 11, representing the months january through december.
... if a parameter you specify is outside of the expected range,
setutcmonth() attempts to update the date information in the date object accordingly.
... examples using
setutcmonth() var thebigday = new date(); thebigday.
setutcmonth(11); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
setutcmonth' in that specification.
Date.prototype.setUTCSeconds() - JavaScript
the
setutcseconds() method
sets the seconds for a specified date according to universal time.
... syntax dateobj.
setutcseconds(secondsvalue[, msvalue]) parameters secondsvalue an integer between 0 and 59, representing the seconds.
... if a parameter you specify is outside of the expected range,
setutcseconds() attempts to update the date information in the date object accordingly.
... examples using
setutcseconds() var thebigday = new date(); thebigday.
setutcseconds(20); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
setutcseconds' in that specification.
Map.prototype.set() - JavaScript
the
set() method adds or updates an element with a specified key and a value to a map object.
... syntax mymap.
set(key, value) parameters key the key of the element to add to the map object.
... examples using
set() let mymap = new map() // add new elements to the map mymap.
set('bar', 'foo') mymap.
set(1, 'foobar') // update an element in the map mymap.
set('bar', 'baz') using the
set() with chaining since the
set() method returns back the same map object, you can chain the method call like below: // add new elements to the map with chaining.
... mymap.
set('bar', 'foo') .
set(1, 'foobar') .
set(2, 'baz'); specifications specification ecmascript (ecma-262)the definition of 'map.prototype.
set' in that specification.
Set.prototype.add() - JavaScript
the add() method appends a new element with a specified value to the end of a
set object.
... syntax my
set.add(value); parameters value the value of the element to add to the
set object.
... return value the
set object.
... examples using the add method var my
set = new
set(); my
set.add(1); my
set.add(5).add('some text'); // chainable console.log(my
set); //
set [1, 5, "some text"] specifications specification ecmascript (ecma-262)the definition of '
set.prototype.add' in that specification.
Set.prototype.entries() - JavaScript
the entries() method returns a new iterator object that contains an array of [value, value] for each element in the
set object, in insertion order.
... for
set objects there is no key like in map objects.
... syntax my
set.entries() return value a new iterator object that contains an array of [value, value] for each element in the given
set, in insertion order.
... examples using entries() var my
set = new
set(); my
set.add('foobar'); my
set.add(1); my
set.add('baz'); var
setiter = my
set.entries(); console.log(
setiter.next().value); // ["foobar", "foobar"] console.log(
setiter.next().value); // [1, 1] console.log(
setiter.next().value); // ["baz", "baz"] specifications specification ecmascript (ecma-262)the definition of '
set.prototype.entries' in that specification.
Set.prototype.has() - JavaScript
the has() method returns a boolean indicating whether an element with the specified value exists in a
set object or not.
... syntax my
set.has(value); parameters value the value to test for presence in the
set object.
... return value returns true if an element with the specified value exists in the
set object; otherwise false.
... examples using the has method var my
set = new
set(); my
set.add('foo'); my
set.has('foo'); // returns true my
set.has('bar'); // returns false var
set1 = new
set(); var obj1 = {'key1': 1};
set1.add(obj1);
set1.has(obj1); // returns true
set1.has({'key1': 1}); // returns false because they are different object references
set1.add({'key1': 1}); // now
set1 contains 2 entries specifications specification ecmascript (ecma-262)the definition of '
set.prototype.has' in that specification.
Set.prototype.size - JavaScript
the size accessor property returns the number of (unique) elements in a
set object.
... description the value of size is an integer representing how many entries the
set object has.
... a
set accessor function for size is undefined; you cannot change this property.
... examples using size var my
set = new
set(); my
set.add(1); my
set.add(5); my
set.add('some text') my
set.size; // 3 specifications specification ecmascript (ecma-262)the definition of '
set.prototype.size' in that specification.
Set.prototype.values() - JavaScript
the values() method returns a new iterator object that contains the values for each element in the
set object in insertion order.
... the keys() method is an alias for this method (for similarity with map objects); it behaves exactly the same and returns values of
set elements.
... syntax my
set.values(); return value a new iterator object containing the values for each element in the given
set, in insertion order.
... examples using values() var my
set = new
set(); my
set.add('foo'); my
set.add('bar'); my
set.add('baz'); var
setiter = my
set.values(); console.log(
setiter.next().value); // "foo" console.log(
setiter.next().value); // "bar" console.log(
setiter.next().value); // "baz" specifications specification ecmascript (ecma-262)the definition of '
set.prototype.values' in that specification.
WeakSet.prototype.add() - JavaScript
the add() method appends a new object to the end of a weak
set object.
...the object to add to the weak
set collection.
... return value the weak
set object.
... examples using add var ws = new weak
set(); ws.add(window); // add the window object to the weak
set ws.has(window); // true // weak
set only takes objects as arguments ws.add(1); // results in "typeerror: invalid value used in weak
set" in chrome // and "typeerror: 1 is not a non-null object" in firefox specifications specification ecmascript (ecma-262)the definition of 'weak
set.prototype.add' in that specification.
WeakSet.prototype.has() - JavaScript
the has() method returns a boolean indicating whether an object exists in a weak
set or not.
...the object to test for presence in the weak
set.
... return value boolean returns true if an element with the specified value exists in the weak
set object; otherwise false.
... examples using the has method var ws = new weak
set(); var obj = {}; ws.add(window); my
set.has(window); // returns true my
set.has(obj); // returns false specifications specification ecmascript (ecma-262)the definition of 'weak
set.prototype.has' in that specification.
<xsl:attribute-set> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:attribute-
set> element creates a named
set of attributes, which can then be applied as whole to the output document, in a manner similar to named styles in css.
... syntax <xsl:attribute-
set name=name use-attribute-
sets=list-of-names> <xsl:attribute> </xsl:attribute-
set> required attributes name specifies the name of the attribute
set.
... optional attributes use-attribute-
sets builds an attribute
set from other attribute
sets.
... the names of the contributing
sets must be separated with whitespace characters and must not directly or indirectly embed themselves.
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.
...xsltprocessor provides three javascript methods to interact with these parameters: xsltprocessor.
setparameter(), xsltprocessor.getparameter() and xsltprocessor.removeparameter().
...
setparameter requires a third argument - namely the value to which the parameter will be
set.
... figure 7 : parameters /* xslt: <xsl:param name="myorder" /> */ // javascript: var sortval = xsltprocessor.getparameter(null, "myorder"); if (sortval == "" || sortval == "descending") xsltprocessor.
setparameter(null, "myorder", "ascending"); else xsltprocessor.
setparameter(null, "myorder", "descending"); ...
Locked config settings - Archive of obsolete content
putting into place locked configuration
settings this feature exists for mozilla and firefox, but not for thunderbird locked
settings can be put into a mozilla.cfg file in the c:\program files\mozilla.org\mozilla directory.
...the encoding is a simple "byte-shifting" with an off
set of 13 (netscape 4 used a similar encoding, but with a of 7 instead).
...moreover, some
settings (such as mail & news configuration) unfortunately seem to be inaccessible to mozilla.cfg, which means that these cannot be locked.
currentset - Archive of obsolete content
« xul reference home current
set not in seamonkey 1.x type: comma-separated string the current
set of displayed items on the toolbar.
... this isn't necessary the *current*
set, i.e.
... it might not be equal the value of the current
set property which is computed from the actual dom ...
broadcasterset - Archive of obsolete content
the broadcaster
set and its descendants are not displayed.
... examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
popupset - Archive of obsolete content
this element is optional; the given elements need not appear in a popup
set container.
... examples <popup
set> <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </popup
set> <label value="right click for popup" context="clipmenu"/> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, t...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements popup, menupopup ...
HTMLIFrameElement.setActive()
the
setactive() method of the htmliframeelement
sets the current <iframe> as the active frame, which has an effect on how it is prioritized by the process manager.
... syntax instanceofhtmliframeelement.
setactive(boolean); returns void.
... example var browser = document.queryselector('iframe'); browser.
setactive(); specification not part of any specification.
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.
... description
setting concurrency controls the number of virtual processors that nspr uses to implement its m x n threading model.
...on those where it is not available, pr_
setconcurrency is ignored.
PR_SetLogBuffering
sets the level of buffering for the log file.
... 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.
... returns nothing description this function
sets the size of the buffer used in nspr logging.
inset-block - CSS: Cascading Style Sheets
the in
set-block css property defines the logical block start and end off
sets of an element, which maps to physical off
sets depending on the element's writing mode, directionality, and text orientation.
... /* <length> values */ in
set-block: 3px 10px; in
set-block: 2.4em 3em; in
set-block: 10px; /* value applied to start and end */ /* <percentage>s of the width or height of the containing block */ in
set-block: 10% 5%; /* keyword value */ in
set-block: auto; /* global values */ in
set-block: inherit; in
set-block: initial; in
set-block: un
set; constituent properties this property is a shorthand for the following css properties: in
set-block-end in
set-block-start syntax values the in
set-block property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box off
sets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'>{1,2} examples
setting block start and end off
sets html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; position: relative; in
set-block: 20px 50px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'in
set-block' in that specification.
inset-inline - CSS: Cascading Style Sheets
the in
set-inline css property defines the logical start and end off
sets of an element in the inline direction, which maps to physical off
sets depending on the element's writing mode, directionality, and text orientation.
... /* <length> values */ in
set-inline: 3px 10px; in
set-inline: 2.4em 3em; in
set-inline: 10px; /* value applied to start and end */ /* <percentage>s of the width or height of the containing block */ in
set-inline: 10% 5%; /* keyword value */ in
set-inline: auto; /* global values */ in
set-inline: inherit; in
set-inline: initial; in
set-inline: un
set; constituent properties this property is a shorthand for the following css properties: in
set-inline-end in
set-inline-start syntax values the in
set-inline property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-width of containing blockcomputed valuesame as box off
sets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'>{1,2} examples
setting inline start and end off
sets html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; position: relative; in
set-inline: 20px 50px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'in
set-inline' in that specification.
inset - CSS: Cascading Style Sheets
the in
set css property, though part of the logical specification, doesn't define logical block or inline off
sets, and instead defines physical off
sets, regardless of the element's writing mode, directionality, and text orientation.
... /* <length> values */ in
set: 10px; /* value applied to all edges */ in
set: 4px 8px; /* top/bottom left/right */ in
set: 5px 15px 10px; /* top left/right bottom */ in
set: 2.4em 3em 3em 3em; /* top right bottom left */ /* <percentage>s of the width (left/right) or height (top/bottom) of the containing block */ in
set: 10% 5% 5% 5%; /* keyword value */ in
set: auto; /* global values */ in
set: inherit; in
set: initial; in
set: un
set; syntax values the in
set property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box off
sets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'>{1,4} examples
setting off
sets for an element html <div> <span class="exampletext">example text</span> </div> css div { background-color: yellow; width: 150px; height: 120px; position: relative; } .exampletext { writing-mode: sideways-rl; position: absolute; in
set: 20px 40px 30px 10px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'in
set' in that specif...
DataView.prototype.byteOffset - JavaScript
the byteoff
set accessor property represents the off
set (in bytes) of this view from the start of its arraybuffer or sharedarraybuffer.
... description the byteoff
set property is an accessor property whose
set accessor function is undefined, meaning that you can only read this property.
... examples using the byteoff
set property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.byteoff
set; // 0 (no off
set specified) var dataview2 = new dataview(buffer, 3); dataview2.byteoff
set; // 3 (as specified when constructing the dataview) specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.byteoff
set' in that specification.
Date.prototype.setMilliseconds() - JavaScript
the
setmilliseconds() method
sets the milliseconds for a specified date according to local time.
... syntax dateobj.
setmilliseconds(millisecondsvalue) parameters millisecondsvalue a number between 0 and 999, representing the milliseconds.
... examples using
setmilliseconds() var thebigday = new date(); thebigday.
setmilliseconds(100); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.
setmilliseconds' in that specification.
Set.prototype.clear() - JavaScript
the clear() method removes all elements from a
set object.
... syntax my
set.clear(); return value undefined.
... examples using the clear method var my
set = new
set(); my
set.add(1); my
set.add('foo'); my
set.size; // 2 my
set.has('foo'); // true my
set.clear(); my
set.size; // 0 my
set.has('bar') // false specifications specification ecmascript (ecma-262)the definition of '
set.prototype.clear' in that specification.
TypedArray.prototype.byteOffset - JavaScript
the byteoff
set accessor property represents the off
set (in bytes) of a typed array from the start of its arraybuffer.
... description the byteoff
set property is an accessor property whose
set accessor function is undefined, meaning that you can only read this property.
... examples using the byteoff
set property var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.byteoff
set; // 0 (no off
set specified) var uint8 = new uint8array(buffer, 3); uint8.byteoff
set; // 3 (as specified when constructing uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.byteoff
set' in that specification.
WeakMap.prototype.set() - JavaScript
the
set() method adds a new element with a specified key and value to a weakmap object.
... syntax wm.
set(key, value); parameters key required.
... examples using the
set method var wm = new weakmap(); var obj = {}; // add new elements to the weakmap wm.
set(obj, 'foo').
set(window, 'bar'); // chainable // update an element in the weakmap wm.
set(obj, 'baz'); specifications specification ecmascript (ecma-262)the definition of 'weakmap.prototype.
set' in that specification.
defaultset - Archive of obsolete content
« xul reference home default
set not in seamonkey 1.x type: comma-separated list of item ids the default
set of displayed items on the toolbar.
... this should be
set to a comma-separated list of item ids from the toolbarpalette.
moveByOffset - Archive of obsolete content
« xul reference home movebyoff
set( off
set , isselecting, isselectingrange) return type: no return value if off
set is positive, adjusts the focused item forward by that many items.
... if off
set is negative, adjusts the focused item backward by that many items.
setSelectionRange - Archive of obsolete content
« xul reference home
setselectionrange( start, end ) return type: no return value
sets the selected portion of the textbox, where the start argument is the index of the first character to select and the end argument is the index of the character after the selection.
...
set both arguments to the same value to move the cursor to the corresponding position without selecting text.
documentCharsetInfo - Archive of obsolete content
« xul reference documentchar
setinfo obsolete since gecko 12.0 type: nsidocumentchar
setinfo this read-only property contains the nsidocumentchar
setinfo object for the document which is used to handle which character
set should be used to display the document.
... the properties of the nsidocumentchar
setinfo object were merged into the docshell in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9).
queryset - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
stringbundleset - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
toolbarset - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database,...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarspacer, toolbox ...
Index - Web APIs
in addition, it can execute multiple instances of a
set of elements.
... 19 abstractrange.endoff
set api, abstractrange, dom, dom api, end, property, range, read-only, reference, endoff
set, off
set the endoff
set property of the abstractrange interface returns the off
set into the end node of the range's end position.
... 21 abstractrange.startoff
set api, abstractrange, dom, dom api, property, range, read-only, reference, off
set, startoff
set the read-only startoff
set property of the abstractrange interface returns the off
set into the start node of the range's start position.
...And 597 more matches
sslfnc.html
nss_init nss_initreadwrite nss_nodb_init ssl_option
setdefault ssl_optiongetdefault ssl_cipherpref
setdefault ssl_cipherprefgetdefault ssl_clearsessioncache ssl_configserversessionidcache ssl_configmpserversidcache ssl_inheritmpserversidcache nss_init
sets up configuration files and performs other tasks required to run network security services.
...therefore, an application cannot use nss to perform any cryptographic operations until after it enables appropriate cipher suites by calling one of the ssl export policy functions: nss_
setdomesticpolicy, nss_
setexportpolicy, and nss_
setfrancepolicy configure the cipher suites for domestic, international, and french versions of software products with encryption features.
... ssl_cipherpolicy
set sets policy flags for individual cipher suites, one at a time.
...And 195 more matches
Index - Archive of obsolete content
43 clipboard add-on sdk interact with the system clipboard,
setting and getting its contents.
... 56 selection add-on sdk get and
set text and html selections in the current web page.
... 62 timers add-on sdk
set one-off and periodic timers.
...And 149 more matches
Bytecode Descriptions
this is used for code like ++obj[index], which must do both a jsop::getelem and a jsop::
setelem with the same property key.
...more fundamentally, the result of evaluating x-- is tonumeric(old value of x), a value that the sequence getlocal "x"; one; sub;
setlocal "x" does not give us.
...format: jof_elem, jof_propinit initprop
setter, inithiddenprop
setter operands: (uint32_t nameindex) stack: obj,
setter ⇒ obj define an accessor property on obj with the given
setter.
...And 104 more matches
Index
found 353 pages: # page tags and summary 1 network security services jss, nss, needsmigration network security services (nss) is a
set of libraries designed to support cross-platform development of security-enabled client and server applications.
...nss ships a predefined
set of ca certificates.
... this
set, including their trust assignments, is provided by nss as a software module, called ckbi (“built-in root certificates”), which also implements the pkcs#11 interface.
...And 88 more matches
Index
65 js::remove*root jsapi reference, obsolete, reference, référence(2), spidermonkey js::remove*root removes the variable that rp points to from the garbage collector's root
set.
... 67 js::
setlargeallocationfailurecallback jsapi reference, reference, référence(2), spidermonkey if a large allocation fails when calling pod_{calloc,realloc}cangc, the js engine may call the large-allocation- failure callback, if
set, to allow the embedding to flush caches, possibly perform shrinking gcs, etc.
...the allocation will then be retried (and may still fail.) 68 js::
setoutofmemorycallback jsapi reference, reference, référence(2), spidermonkey unlike the error reporter, which is only called if the exception for an oom bubbles up and is not caught, the js::outofmemorycallback is called immediately at the oom site to allow the embedding to capture the current state of heap allocation before anything is freed.
...And 86 more matches
nsIAnnotationService
method overview void
setpageannotation(in nsiuri auri, in autf8string aname, in nsivariant avalue, in long aflags, in unsigned short aexpiration); void
setitemannotation(in long long aitemid, in autf8string aname, in nsivariant avalue, in long aflags, in unsigned short aexpiration); void
setpageannotationstring(in nsiuri auri, in autf8string aname, in astring avalue, in long aflags, in unsigned short ae...
...xpiration); boolean
setitemannotationstring(in long long aitemid, in autf8string aname, in astring avalue, in long aflags, in unsigned short aexpiration); void
setpageannotationint32(in nsiuri auri, in autf8string aname, in long avalue, in long aflags, in unsigned short aexpiration); void
setitemannotationint32(in long long aitemid, in autf8string aname, in long avalue, in long aflags, in unsigned short aexpiration); void
setpageannotationint64(in nsiuri auri, in autf8string aname, in long long avalue, in long aflags, in unsigned short aexpiration); void
setitemannotationint64(in long long aitemid, in autf8string aname, in long long avalue, in long aflags, in unsigned short aexpiration); void
setpageannotationdouble(in nsiuri auri, in autf...
...8string aname, in double avalue, in long aflags, in unsigned short aexpiration); void
setitemannotationdouble(in long long aitemid, in autf8string aname, in double avalue, in long aflags, in unsigned short aexpiration); void
setpageannotationbinary(in nsiuri auri, in autf8string aname,[const, array, size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, in long aflags, in unsigned short aexpiration); void
setitemannotationbinary(in long long aitemid, in autf8string aname,[const, array, size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, in long aflags, in unsigned short aexpiration); nsivariant getpageannotation(in nsiuri auri, in autf8string aname); nsivariant getitemannotation(i...
...And 77 more matches
WebIDL bindings
notes: need to document the
setup for indexed and named
setters/creators/deleters.
... add an entry to dom/bindings/bindings.conf that
sets some basic information about the implementation of the interface.
... if the c++ type is not mozilla::dom::myinterface, you need to
set the 'nativetype' to the right type.
...And 67 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
lass="button"> delete line </div> </div> <div class="property"> <div class="ui-slider" data-topic="axis-rotation" data-info="rotation" data-min="-180" data-value="0" data-max="180"></div> </div> </div> <div id="tool-section" class="section"> <div class="title"> tool
settings </div> <div class="property"> <div class="name"> alpha background </div> <div id="canvas-bg"></div> <div id="add-axis" class="button"> add line </div> </div> <div id="order"> <div id="gradient-axes"></div> <div id="gradient-order"></div> ...
...transform: lowercase; line-height: inherit; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-
set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-input-slider-btn-
set:hover { background-color: #379b4a; cursor: pointer; } /* * ui slider */ .ui-slider { height: 20px; margin: 10px 0; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-...
...tion 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 color = new color(); color.
setrgba(r, g, b, 1); return color; } function rgbacolor(r, g, b, a) { var color = new color(); color.
setrgba(r, g, b, a); return color; } function hsvcolor(h, s, v) { var color = new color(); color.
sethsv(h, s, v); return color; } function hsvacolor(h, s, v, a) { var color = new color(); color.
sethsv(h, s, v); color.a = a; return color; } function hslcolor(h, s, l) {...
...And 65 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is created by
setting the type attribute of a textbox to autocomplete.
...the autocomplete functionality is handled through one of more session objects, each of which can return a
set of results given the current value of the textbox.
... the sessions can be
set using the searchsessions attribute or by calling the addsession method.
...And 63 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
previous overview: asynchronous next this tutorial looks at the traditional methods javascript has available for running code asychronously after a
set time period has elapsed, or at a regular interval (e.g.
... a
set number of times per second), discusses what they are useful for, and considers their inherent issues.
... these functions are:
settimeout() execute a specified block of code once after a specified time has elapsed.
...And 63 more matches
Index
46 components.utils.
setgczeal needstechnicalreview, xpcom, xpcom:language bindings, xpconnect this method lets scripts
set the zeal level for garbage collection.
... you can get details on what this method does in js_
setgczeal.
... 73
setting http request headers add-ons, extensions, http, xul, xulrunner http is one of the core technologies behind the web.
...And 63 more matches
Index - Archive of obsolete content
6 flexgroup "flexgroup" is used to group flexible elements together and should be
set to an integer.
... 30 browser.type xul attributes, xul reference type: one of the values below.the type of browser, which can be used to
set access of the document loaded inside the browser.
... 80 current
set needshelp, xul attributes, xul reference no summary!
...And 60 more matches
Color picker tool - CSS: Cascading Style Sheets
-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-
set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-input-slider-btn-
set:hover { background-color: #379b4a; cursor: pointer; } /* * color picker tool */ body { max-width: 1000px; margin: 0 auto; font-family: "segoe ui", arial, helvetica, sans-serif; box-shadow: 0 0 5px 0 #999; -moz-box-siz...
... } #picker-samples .sample[data-active='true'] { border-color: #999; } #picker-samples .sample[data-active='true']:after { content: ""; position: absolute; background: url('https://mdn.mozillademos.org/files/6065/arrow.png') center no-repeat; width: 100%; height: 12px; top: -12px; z-index: 2; } #picker-samples #add-icon { width: 100%; height: 100%; position: relative; box-shadow: in
set 0px 0px 2px 0px #ddd; } #picker-samples #add-icon:hover { cursor: pointer; border-color: #ddd; box-shadow: in
set 0px 0px 5px 0px #ccc; } #picker-samples #add-icon:before, #picker-samples #add-icon:after { content: ""; position: absolute; background-color: #eee; box-shadow: 0 0 1px 0 #eee; } #picker-samples #add-icon:before { width: 70%; height: 16%; top: 42%; left: 15%; } #picker-s...
...tion 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 color = new color(); color.
setrgba(r, g, b, 1); return color; } function rgbacolor(r, g, b, a) { var color = new color(); color.
setrgba(r, g, b, a); return color; } function hsvcolor(h, s, v) { var color = new color(); color.
sethsv(h, s, v); return color; } function hsvacolor(h, s, v, a) { var color = new color(); color.
sethsv(h, s, v); color.a = a; return color; } function hslcolor(h, s, l) {...
...And 58 more matches
nsIDOMWindowUtils
ekeyevent(in long anativekeyboardlayout, in long anativekeycode, in long amodifierflags, in astring acharacters, in astring aunmodifiedcharacters); void sendnativemouseevent(in long ascreenx, in long ascreeny, in long anativemessage, in long amodifierflags, in nsidomelement aelement); nsiquerycontenteventresult sendquerycontentevent(in unsigned long atype, in unsigned long aoff
set, in unsigned long alength, in long ax, in long ay); obsolete since gecko 31.0 nsiquerycontenteventresult sendquerycontentevent(in unsigned long atype, in unsigned long aoff
set, in unsigned long alength, in long ax, in long ay, [optional] in unsigned long aadditionalflags); boolean sendselection
setevent(in unsigned long aoff
set, in unsigned long alength, in boolean areverse); ...
...obsolete since gecko 31.0 boolean sendselection
setevent(in unsigned long aoff
set, in unsigned long alength, [optional] in unsigned long aadditionalflags); void sendsimplegestureevent(in astring atype, in float ax, in float ay, in unsigned long adirection, in double adelta, in long amodifiers); void sendtextevent(in astring acompositionstring, in long afirstclauselength, in unsigned long afirstclauseattr, in long asecondclauselength, in unsigned long asecondclauseattr, in long athirdclauselength, in unsigned long athirdclauseattr, in long acaretstart, in long acaretlength); obsolete since gecko 26 boolean sendtouchevent(in astring atype, [array, size_is(count)] in pruint32 aidentifiers, [array, size_is(count)] in print32 axs, [array, size_is(count)] in pri...
...nt32 ays, [array, size_is(count)] in pruint32 arxs, [array, size_is(count)] in pruint32 arys, [array, size_is(count)] in float arotationangles, [array, size_is(count)] in float aforces, in pruint32 count, in long amodifiers, [optional] in boolean aignorerootscrollframe); void
setcssviewport(in float awidthpx, in float aheightpx); void
setdisplayport(in float axpx, in float aypx, in float awidthpx, in float aheightpx); void
setresolution(in float axresolution, in float ayresolution); void startpccountprofiling(); void stoppccountprofiling(); void suppresseventhandling(in boolean asuppress); void suspendtimeouts(); nsidomfile wrapdomfile(nsifile afile); attributes attribute type descripti...
...And 57 more matches
Box-shadow generator - CSS: Cascading Style Sheets
-action="hexa"></div> </div> </div> </div> </div> <div class="wrap-right"> <div id="shadow_properties" class="category"> <div class="title"> shadow properties </div> <div class="group"> <div class="group property"> <div class="ui-slider-name"> in
set </div> <div class="ui-checkbox" data-topic='in
set'></div> </div> <div class="slidergroup"> <div class="ui-slider-name"> position x </div> <div class="ui-slider-btn-
set" data-topic="posx" data-type="sub"></div> <div class="ui-slider" data-topic="posx" ...
... data-min="-500" data-max="500" data-step="1"> </div> <div class="ui-slider-btn-
set" data-topic="posx" data-type="add"></div> <div class="ui-slider-input" data-topic="posx" data-unit="px"></div> </div> <div class="slidergroup"> <div class="ui-slider-name"> position y </div> <div class="ui-slider-btn-
set" data-topic="posy" data-type="sub"></div> <div class="ui-slider" data-topic="posy" data-min="-500" data-max="500" data-step="1"> </div> <div class="ui-slider-btn-
set" data-topic="posy" data-type="add"></div> <div class="ui-slider-input" data-topic...
...="posy" data-unit="px"></div> </div> <div class="slidergroup"> <div class="ui-slider-name"> blur </div> <div class="ui-slider-btn-
set" data-topic="blur" data-type="sub"></div> <div class="ui-slider" data-topic="blur" data-min="0" data-max="200" data-step="1"> </div> <div class="ui-slider-btn-
set" data-topic="blur" data-type="add"></div> <div class="ui-slider-input" data-topic="blur" data-unit="px"></div> </div> <div class="slidergroup"> <div class="ui-slider-name"> spread </div> <div class="ui-slider-btn-
set" data-topic="...
...And 56 more matches
IAccessibleText
other-licenses/ia2/accessibletext.idlnot scriptable a structure containing a substring and the start and end off
sets in the enclosing string.
...this enum is used in textbeforeoff
set(), textatoff
set(), and textafteroff
set().
... method overview hresult addselection([in] long startoff
set, [in] long endoff
set ); [propget] hresult attributes([in] long off
set, [out] long startoff
set, [out] long endoff
set, [out] bstr textattributes ); [propget] hresult caretoff
set([out] long off
set ); [propget] hresult characterextents([in] long off
set, [in] enum ia2coordinatetype coordtype, [out] long x, [out] long y, [out] long width, [out] long height ); [propget] hresult ncharacters([out] long ncharacters ); [propget] hresult newtext([out] ia2textsegment newtext ); [propget] hresult nselections([out] long nselections ); [propget] hresult off
setatpoint([in] long x, [in] long y, [in] enum ia2coordinatetype coordtype, [out] long off
set ); [propget] hresult oldtext([out] ia2textsegment oldtext ); hresult removeselect...
...And 55 more matches
nsIDocShell
boolean isbeingdestroyed(); void loadstream(in nsiinputstream astream, in nsiuri auri, in acstring acontenttype, in acstring acontentchar
set, in nsidocshellloadinfo aloadinfo); native code only!
... void preparefornewcontentmodel(); void resumerefreshuris(); void
setchildoff
set(in unsigned long off
set); native code only!
... void
setcurrenturi(in nsiuri auri); void suspendrefreshuris(); void tabtotreeowner(in boolean forward, out boolean tookfocus); attributes attribute type description allowauth boolean certain dochshells (like the message pane) should not throw up auth dialogs because it can act as a password trojan.
...And 52 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is created by
setting the type attribute of the textbox to autocomplete.
..., forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, label, maxlength, maxrows, minresultsforpopup, open, popup, popupopen, searchcount, searchparam, selectionend, selectionstart, showcommentcolumn, showimagecolumn,size, tabindex, tabscrolling, textlength, textvalue, timeout, type, value methods getsearchat, onsearchcomplete, ontextentered, ontextreverted, select,
setselectionrange examples <textbox type="autocomplete" autocompletesearch="history"/> attributes accesskey type: character this should be
set to a character that is used as a shortcut key.
...if
set to false or omitted, the value must be selected from the list.
...And 51 more matches
StringView - Archive of obsolete content
|*| http://www.gnu.org/licenses/lgpl-3.0.html |*| \*/ function stringview (vinput, sencoding /* optional (default: utf-8) */, noff
set /* optional */, nlength /* optional */) { var ftaview, awhole, araw, fputoutptcode, fgetoutptchrsize, ninptlen, nstartidx = isfinite(noff
set) ?
... noff
set : 0, ntranscrtype = 15; if (sencoding) { this.encoding = sencoding.tostring(); } encswitch: switch (this.encoding) { case "utf-8": fputoutptcode = stringview.pututf8charcode; fgetoutptchrsize = stringview.getutf8charlength; ftaview = uint8array; break encswitch; case "utf-16": fputoutptcode = stringview.pututf16charcode; fgetoutptchrsize = stringview.getutf16charlength; ftaview = uint16array; break encswitch; case "utf-32": ftaview = uint32array; ntranscrtype &= 14; break encswitch; default: /* case "ascii", or case "binarystring" or unknown cases */ ftaview = uint8array; ntranscrtype &= 14; } typeswitch: switch (typeof vinput) { case "string": /* the input argumen...
...*/ ftaview = vinput.constructor; ninptlen = vinput.length; awhole = vinput.byteoff
set === 0 && vinput.length === ( ftaview === uint32array ?
...And 49 more matches
source-editor.jsm
next(boolean awrap); number findprevious(boolean awrap); event management void addeventlistener(string aeventtype, function acallback); void removeeventlistener(string aeventtype, function acallback); undo stack operations boolean canredo(); boolean canundo(); void endcompoundchange(); boolean redo(); void re
setundo(); void startcompoundchange(); boolean undo(); display management operations void focus(); number gettopindex(); boolean hasfocus(); void
settopindex(number atopindex); content management operations number getcharcount(); string getindentationstring(); string getlinedelimiter(); number ...
...getlinecount(); number getlineend(number alineindex, boolean aincludedelimiter); number getlinestart(number alineindex); string getmode(); string gettext([optional] number astart, [optional] number aend); string getselectedtext(); void
setmode(string amode); void
settext(string atext, [optional] number astart, [optional] number aend); selection operations void dropselection(); number getcaretoff
set(); object getcaretposition(); object getselection(); void
setcaretoff
set(number aoff
set); void
setcaretposition(number aline, [optional] number acolumn, [optional] number aalign); void
setselection(number astart, number aend); breakpoint management ...
... void addbreakpoint(number alineindex, [optional] string acondition); array getbreakpoints(); boolean removebreakpoint(number alineindex); properties attribute type description dirty boolean
set this value to false whenever you save the text; the editor will update it to true when the content is changed.
...And 49 more matches
Border-image generator - CSS: Cascading Style Sheets
ass="property"> <div class="name">fill</div> <div class="ui-checkbox" data-topic='slice-fill'></div> </div> </div> <!-- border-image-width --> <div id="border-width-control" class="category"> <div class="title"> border-image-width </div> </div> <!-- border-image-out
set --> <div id="border-out
set-control" class="category"> <div class="title"> border-image-out
set </div> </div> <!-- other-
settings --> <div id="aditional-properties" class="category"> <div class="title"> aditional-properties </div> <div class="property"> <div class="name"> repeat-x </...
...> <span id="out-border-slice" class="value"> </span> </div> <div class="css-property"> <span class="name"> border-image-width: </span> <span id="out-border-width" class="value"> </span> </div> <div class="css-property"> <span class="name"> border-image-out
set: </span> <span id="out-border-out
set" class="value"> </span> </div> <div class="css-property"> <span class="name"> border-image-repeat: </span> <span id="out-border-repeat" class="value"> </span> </div> <div class="css-property"> <span class="name"> borde...
...============================================================ */ .section { clear: both; padding: 0px; margin: 0px; } /* grouping * ========================================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column
setup * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-child { margin-left: 0; } /* all browsers except ie6 and lower */ /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input...
...And 46 more matches
HTMLInputElement - Web APIs
formaction string: returns /
sets the element's formaction attribute, containing the uri of a program that processes information submitted by the element.
... formenctype string: returns /
sets the element's formenctype attribute, containing the type of content that is used to submit the form to the server.
... formmethod string: returns /
sets the element's formmethod attribute, containing the http method that the browser uses to submit the form.
...And 45 more matches
Drawing and Event Handling - Plugins
for windowless plug-ins, the browser calls the npp_
setwindow method with an npwindow structure that represents a drawable.
... for windowed plug-ins, the browser calls the npp_
setwindow method with an npwindow structure that represents a window.
...the browser calls npp_
setwindow whenever the drawable changes.
...And 43 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
fixme: explain how
setting this option and use next listings if we want to run firefox displaying none of its gui and only the contents of a certain xul file, we can launch firefox and
set the option: -chrome file_url.xul another way, as shown in listing 1, is to use the window.opendialog() method, which can be used only within a xul window.
...we can also read in a stylesheet that we had
set up ourselves.
...you can explicitly
set or change this layout using the orient attribute, with options for horizontal and vertical.
...And 42 more matches
jspage - Archive of obsolete content
try(function(){return navigator.plugins["shockwave flash"].description; },function(){return new activexobject("shockwaveflash.shockwaveflash").getvariable("$version");})||"0 r0").match(/\d+/g);return{version:parseint(a[0]||0+"."+a[1],10)||0,build:parseint(a[2],10)||0}; })();function $exec(b){if(!b){return b;}if(window.execscript){window.execscript(b);}else{var a=document.createelement("script");a.
setattribute("type","text/javascript"); a[(browser.engine.webkit&&browser.engine.version<420)?"innertext":"text"]=b;document.head.appendchild(a);document.head.removechild(a);}return b;}native.uid=1; var $uid=(browser.engine.trident)?function(a){return(a.uid||(a.uid=[native.uid++]))[0];}:function(a){return a.uid||(a.uid=native.uid++);};var window=new native({name:"window",legacy:(browser.engine.triden...
...; b.push((c.length==1)?"0"+c:c);}return(d)?b:"#"+b.join("");}});function.implement({extend:function(a){for(var b in a){this[b]=a[b];}return this;},create:function(b){var a=this; b=b||{};return function(d){var c=b.arguments;c=(c!=undefined)?$splat(c):array.slice(arguments,(b.event)?1:0);if(b.event){c=[d||window.event].extend(c); }var e=function(){return a.apply(b.bind||null,c);};if(b.delay){return
settimeout(e,b.delay);}if(b.periodical){return
setinterval(e,b.periodical);}if(b.attempt){return $try(e); }return e();};},run:function(a,b){return this.apply(b,$splat(a));},pass:function(a,b){return this.create({bind:b,arguments:a});},bind:function(b,a){return this.create({bind:b,arguments:a}); },bindwithevent:function(b,a){return this.create({bind:b,arguments:a,event:true});},attempt:function(a,b){r...
...urn this.replace(b||(/\\?{([^{}]+)}/g),function(d,c){if(d.charat(0)=="\\"){return d.slice(1);}return(a[c]!=undefined)?a[c]:""; });}});hash.implement({has:object.prototype.hasownproperty,keyof:function(b){for(var a in this){if(this.hasownproperty(a)&&this[a]===b){return a;}}return null; },hasvalue:function(a){return(hash.keyof(this,a)!==null);},extend:function(a){hash.each(a||{},function(c,b){hash.
set(this,b,c);},this);return this;},combine:function(a){hash.each(a||{},function(c,b){hash.include(this,b,c); },this);return this;},erase:function(a){if(this.hasownproperty(a)){delete this[a];}return this;},get:function(a){return(this.hasownproperty(a))?this[a]:null; },
set:function(a,b){if(!this[a]||this.hasownproperty(a)){this[a]=b;}return this;},empty:function(){hash.each(this,function(b,a){delete ...
...And 41 more matches
Styling a Tree - Archive of obsolete content
setting properties instead, you must use the properties attribute on the rows or cells to
set one or more named properties.
...you can
set multiple properties by separating them with spaces.
...
set the property on a row or cell, as in the following example: <treerow properties="makeitblue"> css selectors for the tree the style sheet can take this property and use it to change the appearance of the row for unread messages or labels.
...And 38 more matches
Timing element visibility with the Intersection Observer API - Web APIs
its style looks like this: header { grid-column: 1 / -1; grid-row: 1; background-color: aliceblue; } grid-row is
set to 1, since we want the header to be placed in the top row of the site's grid.
...the sidebar is represented using an <aside> element, and is styled as follows: aside { grid-column: 1; grid-row: 2; background-color: cornsilk; padding: 5px 10px; } aside ul { padding-left: 0; } aside ul li { list-style: none; } aside ul li a { text-decoration: none; } the most important thing to note here is that the grid-column is
set to 1, to place the sidebar on the left-hand side of the screen.
...the grid-row is
set to 2, to place it alongside the site body.
...And 38 more matches
Shell global objects
these are the global objects that are
set up automatically by the spidermonkey js command-line interpreter when you start the program.
...the first call with a string argument
sets the source buffer.
...
setsharedarraybuffer() install the sharedarraybuffer object in the cross-worker mailbox.
...And 37 more matches
Redis Tips
but obviously, calling ice cream a nowhale food doesn't give you any sense of how good the ice cream is, or what
sets it apart from other kinds of food that aren't made from whale meat but that are also very unlike ice cream -- it just gives the whaling industry a way to lump together people who don't use their products.
... so rather than thinking about redis as a database with some kind of non-existent relationship to sql, think of it as a data structure server with a rich
set of commands for querying and manipulating those data structures over a network connection.
... redis data types include: strings hashes lists
sets ordered
sets (called z
sets in redis) transactions publishers and subscribers this table lists some common programming tasks and data structures, and suggests some redis functions or data structures for them: dictionary lookup
set, get,
setnx, etc.
...And 37 more matches
Applying styles and colors - Web APIs
fillstyle = color
sets the style used when filling shapes.
... strokestyle = color
sets the style for shapes' outlines.
...by default, the stroke and fill color are
set to black (css color value #000000).
...And 37 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
instead of configuring end user individual preferences files (~/.mozilla/default/randomdir/prefs.js) we now use a centralized default
set of preferences.
... autoconfig directives here we want to
set users central mail preferences: create one account from their login name, get their email address from an ldap request and
set the enterprise imap and smtp servers.
... thunderbird.cfg (version 1) here's the complete file, first we get the user login name from environment variables, then configure the ldap address book, create an email account, and configure imap and smtp: [root@calaz /usr/lib/thunderbird] $ cat thunderbird.cfg //put everything in a try/catch try { // 1) env variables if(getenv("user") != "") { // *nix
settings var env_user = getenv("user"); var env_home = getenv("home"); } else { // windows
settings var env_user = getenv("username"); var env_home = getenv("homepath"); } var env_mozdebug= getenv("mozilla_debug"); // var env_user = prompt("indiquez votre login", toto); // 2) lock general preferences //ldap address book lockpref("ldap_2.prefs_migrated", true); lockpref("ldap_2.servers.ldap...
...And 36 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
<input type="range" name="range" min="0" max="25"/> html5 re
set a button that re
sets the contents of the form to default values.
... <input type="re
set" name="re
set"/> search a single-line text field for entering search strings.
...since every <input> element, regardless of type, is based on the htmlinputelement interface, they technically share the exact same
set of attributes.
...And 36 more matches
textbox - Archive of obsolete content
imeout, type, value, wrap, wraparound properties accessibletype, clickselectsall, decimalplaces, decimalsymbol, defaultvalue, disabled, editor, emptytext, increment, inputfield, label, max, maxlength, min, placeholder, readonly, searchbutton, selectionend, selectionstart, size, spinbuttons, tabindex, textlength, timeout, type, value, valuenumber, wraparound methods decrease, increase, re
set, select,
setselectionrange style classes plain examples <vbox> <label control="your-name" value="enter your name:"/> <textbox id="your-name" value="john"/> </vbox> attributes cols type: integer for multiline textboxes, the number of columns to display.
...if this attribute is
set, the element is disabled.
...do not
set the attribute to true, as this will suggest you can
set it to false to enable the element again, which is not the case.
...And 33 more matches
JSAPI User Guide
the next section explains how to
set them up, using jsapi functions.
...it can compile and execute scripts, get and
set object properties, call javascript functions, convert javascript data from one type to another, create objects, and so on.
...for maximum ecmascript standard compliance, applications should also use js_
setoptions to enable jsoption_varobjfix.
...And 33 more matches
nsIHttpChannel
//www.example.com/", null, null); method overview void getoriginalresponseheader(in acstring aheader, in nsihttpheadervisitor avisitor); acstring getrequestheader(in acstring aheader); acstring getresponseheader(in acstring header); boolean isnocacheresponse(); boolean isnostoreresponse(); void redirectto(in nsiuri anewuri); void
setemptyrequestheader(in acstring aheader); void
setreferrerwithpolicy(in nsiuri referrer, in unsigned long referrerpolicy); void
setrequestheader(in acstring aheader, in acstring avalue, in boolean amerge); void
setresponseheader(in acstring header, in acstring value, in boolean merge); void visitoriginalresponseheaders(in nsihttpheadervisitor avisitor); ...
...this should be
set to false, for example, if the application knows that the corresponding document is likely to be very large.
... this attribute may only be
set before the channel is opened.
...And 33 more matches
IME handling guide
and editor
sets these ime selections from mozilla::textrangetype which are sent by mozilla::widgetcompositionevent as mozilla::textrangearray.
...then, startcomposition(),
setpendingcomposition(), flushpendingcomposition(), commitcomposition(), etc.
...the mdata value is a selected string at dispatching the dom event and it's automatically
set by textcomposition.
...And 31 more matches
JavaScript Daemons Management - Archive of obsolete content
the following daemons management framework is the major version of
setinterval – a little framework.
... advantages of this approch: abstraction passage of this object to javascript timers (both
setinterval and
settimeout) optimisation (avoiding closures) modularity the code the code of this framework is split into three files: daemon.js (the core) daemon-safe.js (an extension of the core which adds a replacement of
setinterval with a recursive invocation of
settimeout) daemon-methods.js (a wide and highly scalable collection of methods) the only independent module is daemon.js: ...
... 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.
...And 30 more matches
Fundamental text and font styling - Learn web development
here we'll go through all the basic fundamentals of text/font styling in detail, including
setting font weight, family and style, font shorthand, text alignment and other effects, and line and letter spacing.
...but it was a rare occasion such as this that he did.</p> you can find the finished example on github (see also the source code.) color the color property
sets the color of the foreground content of the selected elements (which is usually the text, but can also include a couple of other things, such as an underline or overline placed on text using the text-decoration property).
...but it was a rare occasion such as this that he did.</p> font families to
set a different font on your text, you use the font-family property — this allows you to specify a font (or list of fonts) for the browser to apply to the selected elements.
...And 30 more matches
Gecko info for Windows accessibility vendors
we have chosen a sub
set of readonly methods in the dom needed for assistive technology vendors.
... the msaa tree and the dom tree are parallel structures, although the msaa tree is a sub
set of the dom tree.
...both controlled_by and controller_for are
set in markup from the single dynamic content accessibility dynamic content aaa:controls attribute.
...And 30 more matches
Hacking Tips
therefore, the jit frames do not appear until you
settle on the next breakpoint.
... to work-around this issue you can use the recording feature of gdb, to step one instruction, and
settle back to where you came from with the following
set of gdb commands: (gdb) record full (gdb) si (gdb) record goto 0 (gdb) record stop if you have a core file, you can use the gdb unwinder the same way, or do everything from the command line as follow: $ gdb -ex 'enable unwinder .* spidermonkey' -ex 'bt 0' -ex 'thread apply all backtrace' -ex 'quit' out/dist/bin/js corefile the gdb unwinder is supposed to be loaded by dist/bin/js-gdb.py and load python scripts which are located in js/src/gdb/mozilla under gdb.
...
setting a breakpoint in the generated code (from gdb, x86 / x86-64, arm) to
set a breakpoint the generated code of a specific jsscript compiled with ionmonkey.
...And 30 more matches
button - Archive of obsolete content
it is typically rendered as a grey out
set rectangle.
...op, dir, disabled, dlgtype, group, icon, image, label, open, orient, tabindex, type properties accesskey, accessibletype, autocheck, checkstate, checked, command, crop, dir, disabled, dlgtype, group, image, label, open, orient, tabindex, type examples <button label="press me" oncommand="alert('you pressed me!');"/> attributes accesskey type: character this should be
set to a character that is used as a shortcut key.
...this means that the button acts like a checkbox except that there is a third state which must be
set manually by adjusting the check state.
...And 29 more matches
toolbarbutton - Archive of obsolete content
em 2"/> </menupopup> </toolbarbutton> </toolbar> <toolbar id="radio-toolbar"> <toolbarbutton accesskey="1" label="radio 1" type="radio" group="radiogroup"/> <toolbarbutton accesskey="2" label="radio 2" type="radio" group="radiogroup"/> <toolbarbutton accesskey="3" label="radio 3" type="radio" group="radiogroup"/> </toolbar> attributes accesskey type: character this should be
set to a character that is used as a shortcut key.
...this means that the button acts like a checkbox except that there is a third state which must be
set manually by adjusting the check state.
... if you wish to have different behavior for how the states are adjusted,
set the autocheck attribute to false and adjust the state with a script.
...And 29 more matches
2D maze game with device orientation - Game development
the phaser framework provides you with a
set of tools that will speed up development and help handle generic tasks needed to complete the game, so you can focus on the game idea itself.
...the folder structure is quite straightforward: the starting point is the index.html file where we initialize the framework and
set up an <canvas> to render the game on.
...
setting up the canvas we will be rendering our game on canvas, but we won't do it manually — this will be taken care of by the framework.
...And 29 more matches
JSAPI reference
runtimes and contexts js_init added in spidermonkey 31 js_shutdown struct jsruntime js_newruntimeobsolete since jsapi 52 js_destroyruntime js_getruntimeprivate js_
setruntimeprivate js_
setnativestackquota added in spidermonkey 17 js_contextiteratorobsolete since jsapi 52 js_finish obsolete since jsapi 19 struct jscontext js_newcontext js_destroycontext js_destroycontextnogc js_
setcontextcallback enum jscontextop js_getruntime js_getparentruntime added in spidermonkey 31 js_getobjectruntime added in spidermonkey 17 js_getcontex...
...tprivate js_
setcontextprivate js_getsecondcontextprivate added in spidermonkey 17 js_
setsecondcontextprivate added in spidermonkey 17 js_
setinterruptcallback added in spidermonkey 31 js_getinterruptcallback added in spidermonkey 31 js_requestinterruptcallback added in spidermonkey 31 js_checkforinterrupt added in jsapi 45 js_destroycontextmaybegc obsolete since jsapi 14 js_
setbranchcallback obsolete since javascript 1.9.1 js_
setoperationcallback obsolete since jsapi 30 js_getoperationcallback obsolete since jsapi 30 js_triggeroperationcallback obsolete since jsapi 30 js_clearoperationcallback obsolete since javascript 1.9.1 js_getoperationlimit obsolete since javascript 1.9.1 js_
setoperationlimit obsolete since javascript 1.9.1 js_max_operation_limit obsolete since javas...
...cript 1.9.1 js_operation_weight_base obsolete since javascript 1.9.1 js_
setthreadstacklimit obsolete since jsapi 13 js_
setscriptstackquota obsolete since javascript 1.8.6 js_
setoptions obsolete since jsapi 27 js_getoptions obsolete since jsapi 27 js_toggleoptions obsolete since jsapi 27 enum jsversion jsversion_ecma_3 jsversion_1_6 jsversion_1_7 jsversion_1_8 jsversion_ecma_5 jsversion_default jsversion_unknown jsversion_latest js_getimplementationversion js_getversion js_
setversionforcompartment added in spidermonkey 31 js_stringtoversion js_versiontostring js_
setversion obsolete since jsapi 25 js::currentglobalornull added in spidermonkey 31 js_getglobalforscopechain obsolete since jsapi 25 js_getglobalobject obsolete since jsa...
...And 29 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
in this article, we'll make use of information introduced in the previous articles in our webxr tutorial series to construct an example which animates a rotating cube around which the user can move freely using a vr head
set, keyboard, and/or mouse.
... while reading this article and the accompanying source code, it's helpful to keep in mind that the display for a 3d head
set is a single screen, divided in half.
...contrarily, when rendering the right eye, the viewport is
set to restrict drawing to the right half of the surface.
...And 29 more matches
CustomizableUI.jsm
this is analogous to the old current
set attribute.
...in order to register such a toolbar,
set the 'overflowable' property to true, and provide the id of the anchor in the 'anchor' property.
... onwidgetre
set(anode, acontainer) fired after a re
set to default placements moves a widget's node to a different location.
...And 28 more matches
nsIAccessibleText
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void addselection(in long startoff
set, in long endoff
set); nsiaccessible getattributerange(in long off
set, out long rangestartoff
set, out long rangeendoff
set); obsolete since gecko 1.9.1 wchar getcharacteratoff
set(in long off
set); void getcharacterextents(in long off
set, out long x, out long y, out long width, out long height, in unsigned long coordtype); long getoff
setatpoint(in long x, in long y, in unsigned long coordtype); void getrangeextents(in long startoff
set, in long endoff
set, out long x, out long y, out long width, out long height, in unsigned long co...
...ordtype); void getselectionbounds(in long selectionnum, out long startoff
set, out long endoff
set); astring gettext(in long startoff
set, in long endoff
set); astring gettextafteroff
set(in long off
set, in nsaccessibletextboundary boundarytype, out long startoff
set, out long endoff
set); astring gettextatoff
set(in long off
set, in nsaccessibletextboundary boundarytype, out long startoff
set, out long endoff
set); nsipersistentproperties gettextattributes(in boolean includedefattrs, in long off
set, out long rangestartoff
set, out long rangeendoff
set); astring gettextbeforeoff
set(in long off
set, in nsaccessibletextboundary boundarytype, out long startoff
set, out long endoff
set); void removeselection(in long selectionnum); void scrollsubstringto(in long startindex, in long endindex, in ...
...unsigned long scrolltype); void scrollsubstringtopoint(in long startindex, in long endindex, in unsigned long coordinatetype, in long x, in long y); void
setselectionbounds(in long selectionnum, in long startoff
set, in long endoff
set); attributes attribute type description caretoff
set long the current current caret off
set.
...And 28 more matches
Creating a cross-browser video player - Developer guides
le="no video playback possible, please download the video from the link below" /> </object> <!-- offer download --> <a href="video/tears-of-steel-battle-clip-medium.mp4">download mp4</a> </video> <figcaption>© blender foundation | <a href="http://mango.blender.org">mango.blender.org</a></figcaption> </figure> even though this player will define its own custom control
set, the controls attribute is still added to the <video> element, and the player's default control
set is switched off later with javascript.
... a poster image is defined for the video, and the preload attribute is
set to metadata, which informs the browser that it should initially only attempt to load the metadata from the video file rather than the entire video file.
... note: ie9 behaves differently than most other browsers when a poster attribute is
set.
...And 28 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
5 api codingscripting, glossary, infrastructure an api (application programming interface) is a
set of features and rules that exist inside a software program (the application) enabling interaction with it through software - as opposed to a human user interface.
... utf-8 is the most common character
set and includes the graphemes of the most popular human languages.
... 73 character
set glossary, character encoding, character
set a character
set is an encoding system to let computers know how to recognize character, including letters, numbers, punctuation marks, and whitespace.
...And 27 more matches
AsyncTestUtils extended framework
bringing messages into the picture synthetic
set definitions most of the code involved in creating synthetic messages takes an object that defines how to generate the
set.
...(see the bottom of this page for links to the source files.) count: 10 the number of messages that should be in the
set.
...(we will probably auto-correct that in the future.) if your
set definition was {count: 3, age: {days: 7}, age_incr: {days: -1}}, then you would generate messages from 7, 6, and 5 days ago.
...And 27 more matches
nsIDOMXULElement
from: nsidomelement last changed in gecko 1.9 (firefox 3) method overview void blur(); void click(); void docommand(); void focus(); nsidomnodelist getelementsbyattribute(in domstring name, in domstring value); nsidomnodelist getelementsbyattributens(in domstring namespaceuri, in domstring name, in domstring value); attributes attribute type description align domstring gets/
sets the value of the element's align attribute.
...removes the attribute if you
set it to false.
... classname domstring gets/
sets the value of the element's class attribute.
...And 27 more matches
Component; nsIPrefBranch
this object may be obtained from the preferences service (nsiprefservice) and used to get and
set default and/or user preferences across the application.
...for example, if this object is created with the root "browser.startup.", the preferences "browser.startup.page", "browser.startup.homepage", and "browser.startup.homepage_override" can be accessed by simply passing "page", "homepage", or "homepage_override" to the various get/
set methods.
...avalue); long getintpref(in string aprefname,requires gecko 54 [optional] in long adefaultvalue); long getpreftype(in string aprefname); void lockpref(in string aprefname); boolean prefhasuservalue(in string aprefname); boolean prefislocked(in string aprefname); void removeobserver(in string adomain, in nsiobserver aobserver); void re
setbranch(in string astartingat); void
setboolpref(in string aprefname, in long avalue); void
setcharpref(in string aprefname, in string avalue); requires gecko 58 void
setstringpref(in string aprefname, in utf8string avalue); void
setcomplexvalue(in string aprefname, in nsiidref atype, in nsisupports avalue); void
setintpref(in string aprefname, in long a...
...And 27 more matches
tab - Archive of obsolete content
afterselected, beforeselected, command, crop, disabled, first-tab, image, label, last-tab, linkedpanel, oncommand, pending, pinned, selected, tabindex, unread, validate, value properties accesskey, accessibletype, command, control, crop, disabled, image, label, linkedpanel, selected, tabindex, value examples (example needed) attributes accesskey type: character this should be
set to a character that is used as a shortcut key.
... afterselected type: boolean this is
set to true if the tab is immediately after the currently selected tab.
... this is automatically
set when needed and you shouldn't adjust it manually.
...And 26 more matches
nsIFaviconService
afaviconuri); obsolete since gecko 22.0 nsiuri getfaviconforpage(in nsiuri apageuri); obsolete since gecko 22.0 nsiuri getfaviconimageforpage(in nsiuri apageuri); obsolete since gecko 22.0 nsiuri getfaviconlinkforicon(in nsiuri afaviconuri); boolean isfailedfavicon(in nsiuri afaviconuri); void removefailedfavicon(in nsiuri afaviconuri); void
setandloadfaviconforpage(in nsiuri apageuri, in nsiuri afaviconuri, in boolean aforcereload, in unsigned long afaviconloadtype, [optional] in nsifavicondatacallback acallback); obsolete since gecko 22.0 void
setfavicondata(in nsiuri afaviconuri, [const,array,size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, in prtime aexpiration); obsolete since gecko 22...
....0 void
setfavicondatafromdataurl(in nsiuri afaviconuri, in astring adataurl, in prtime aexpiration); obsolete since gecko 22.0 void
setfaviconurlforpage(in nsiuri apageuri, in nsiuri afaviconuri); obsolete since gecko 22.0 attributes attribute type description defaultfavicon nsiuri the default favicon uri.
...this cache will also be written to if you use
setandloadfaviconforpage() method and it encounters an error while fetching an icon.
...And 26 more matches
nsISessionStore
astring gettabstate(in nsidomnode atab); astring gettabvalue(in nsidomnode atab, in astring akey); astring getwindowstate(in nsidomwindow awindow); astring getwindowvalue(in nsidomwindow awindow, in astring akey); void init(in nsidomwindow awindow); void persisttabattribute(in astring aname); void restorelastsession(); void
setbrowserstate(in astring astate); void
settabstate(in nsidomnode atab, in astring astate); void
settabvalue(in nsidomnode atab, in astring akey, in astring astringvalue); void
setwindowstate(in nsidomwindow awindow, in astring astate, in boolean aoverwrite); void
setwindowvalue(in nsidomwindow awindow, in astring akey, in astring astringvalue); nsidomno...
...de undoclo
setab(in nsidomwindow awindow, in unsigned long aindex); nsidomwindow undoclosewindow(in unsigned long aindex); attributes attribute type description canrestorelastsession boolean is it possible to restore the previous session.
... return value the string value that was previously assigned to akey using nsisessionstore.
settabvalue(), or an empty string if no value is
set for that key.
...And 24 more matches
Debugger.Script - Firefox Developer Tools
getalloff
sets() if the instance refers to a jsscript, return an arrayl describing the relationship between bytecode instruction off
sets and source code positions in this script.l is sparse, and indexed by source line number.
...if there is code forline, then l[line] is an array of off
sets of byte code instructions that are entry points to that line.
... a[i] = i*i; calling getalloff
sets() on that code might yield an array like this: [[0], [5, 20], , [10]] this array indicates that: the first line’s code starts at off
set 0 in the script; the for statement head has two entry points at off
sets 5 and 20 (for the initialization, which is performed only once, and the loop test, which is performed at the start of each iteration); the third line has no code; and the fourth line begins at off
set 10.
...And 24 more matches
CanvasRenderingContext2D - Web APIs
this code draws a house: //
set line width ctx.linewidth = 10; // wall ctx.strokerect(75, 140, 150, 110); // door ctx.fillrect(130, 190, 40, 60); // roof ctx.beginpath(); ctx.moveto(50, 140); ctx.lineto(150, 60); ctx.lineto(250, 140); ctx.closepath(); ctx.stroke(); the resulting drawing looks like this: reference drawing rectangles there are three methods that immediately draw rectangles to the canvas.
... canvasrenderingcontext2d.clearrect()
sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black, erasing any previously drawn content.
... canvasrenderingcontext2d.
setlinedash()
sets the current line dash pattern.
...And 24 more matches
Starting up and shutting down a WebXR session - Web APIs
before you can begin to render your augmented or virtual reality scenario, you need to create and
set up the webxr session, and you should know how to shut it down properly as well.
...with the extension in place, you can open up a developer tools panel that lets you control the position and orientation of the head
set and any hand controllers, as well as button presses on the controllers.
... emulator usage while somewhat awkward compared to using an actual head
set, this makes it possible to experiment with and developer webxr code on a desktop computer, where webxr isn't normally available.
...And 24 more matches
Client-side storage - Learn web development
this lets you persist data for long-term storage, save sites or documents for offline use, retain user-specific
settings for your site, and more.
... saving data and as
sets locally so a site will be quicker (and potentially less expensive) to download, or be usable without a network connection.
... note: there are limits to the amount of data you can store using client-side storage apis (possibly both per individual api and cumulatively); the exact limit varies depending on the browser and possibly based on user
settings.
...And 23 more matches
OS.File for the main thread
} let promise = file.write(view.subarray(pos, chunksize)); // write a sub
set of |data| return promise.then(function onsuccess(bytes) { return loop(pos + bytes); // ...
... file.close(); }, function onerror(reason) { file.close(); throw reason; }); return promise; } or a variant using task.js (or at least the sub
set already present on mozilla-central): let writestream = function writestream(data, outfile, chunksize) { return task.spawn(function() { let view = new uint8array(data); let pos = 0; while (pos < view.bytelength) { pos += yield outfile.write(view.subarray(pos, chunksize)); } outfile.close(); }).then( null, function onfailure(reason) { outfile.close(); throw ...
...void> move(in string sourcepath, in string destpath); promise<uint8array> read(in string path, [optional] in object options); promise<void> remove(in string path, [optional] in object options); promise<void> removeemptydir(in string path, [optional] in object options); promise<void> removedir(in string path, [optional] in object options); promise<void>
setcurrentdirectory(in string path); promise<void>
setdates(in string path, in date|number accessdate, in date|number modificationdate); promise<void>
setpermissions(in string path, in object options ); promise<file.info> stat(in string path, [optional] in object options); promise<void> unixsymlink(in string targetpath, in string createpath); promise<void...
...And 23 more matches
certutil
-t re
set the key database or token.
...the format of the validity-time argument is yymmddhhmmss[+hhmm|-hhmm|z], which allows off
sets to be
set relative to the validity end time.
... when specifying an off
set time, use yymmddhhmmss+hhmm or yymmddhhmmss-hhmm for adding or subtracting time, respectively.
...And 23 more matches
HTMLTextAreaElement - Web APIs
01" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmltextareaelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties accesskey string: returns /
sets the element's accesskey attribute.
... autocapitalize string: returns /
sets the element's capitalization behavior for user input.
... autocomplete autofocus boolean: returns /
sets the element's autofocus attribute, indicating that the control should have input focus when the page loads cols unsigned long: returns /
sets the element's cols attribute, indicating the visible width of the text area.
...And 23 more matches
Video player styling basics - Developer guides
ss-bar"></span> </progress> </div> <button id="mute" type="button" data-state="mute">mute/unmute</button> <button id="volinc" type="button" data-state="volup">vol+</button> <button id="voldec" type="button" data-state="voldown">vol-</button> <button id="fs" type="button" data-state="go-fullscreen">fullscreen</button> </div> related css alteration the previous article simply
set the display property of the video controls to block in order to display them.
... this "data-state" idea is also used for
setting the current state of buttons within the video control
set, which allows specific state styling.
... javascript as mentioned above, a data-state attribute is used in various places for styling purposes and these are
set using javascript.
...And 23 more matches
ui/button/toggle - Archive of obsolete content
by default the badge's color is red, but you can
set your own color using the badgecolor property, specified as a css <color> value: var { togglebutton } = require("sdk/ui/button/toggle"); var button = togglebutton({ id: "my-button1", label: "my button1", icon: "./icon-16.png", onchange: changed, badge: 0, badgecolor: "#00aaaa" }); function changed(state) { button.badge = state.badge + 1; if (state.checked) { bu...
...con-32.png", "64": "./icon-64.png" }, onchange: handlechange }); var panel = panels.panel({ contenturl: self.data.url("panel.html"), onhide: handlehide }); function handlechange(state) { if (state.checked) { panel.show({ position: button }); } } function handlehide() { button.state('window', {checked: false}); } disabling buttons you can disable a button by
setting its disabled property to true.
...at the root is the global state, then there's a state you can
set for each window, then a state you can
set for each tab.
...And 22 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
setting up your development environment in order to develop (and test) extensions in a most convenient way it is recommended to apply some changes to firefox.
... in the following you will find a brief description how to do so; a more detailed one can be found under
setting up an extension development environment.
... create a development profile if you want to partition your everyday browsing environment from your development environment in firefox,
set up a second profile for development.
...And 22 more matches
listitem - Archive of obsolete content
properties accesskey, accessible, checked, control, crop, current, disabled, image, label, selected, tabindex, value style classes listitem-iconic examples <listbox id="thelist"> <listitem label="ruby"/> <listitem label="emerald"/> <listitem label="sapphire" selected="true"/> <listitem label="diamond"/> </listbox> attributes accesskey type: character this should be
set to a character that is used as a shortcut key.
... use hasattribute() to determine whether this attribute is
set instead of getattribute().
... for buttons, the type attribute must be
set to checkbox or radio for this attribute to have any effect.
...And 22 more matches
A first splash into JavaScript - Learn web development
example — guess the number game in this article we'll show you how to build up the simple game you can see below: top hidden code <!doctype html> <html> <head> <meta char
set="utf-8"> <title>number guessing game</title> <style> html { font-family: sans-serif; } body { width: 50%; max-width: 800px; min-width: 480px; margin: 0 auto; } .lastresult { color: white; padding: 3px; } </style> </head> <body> <h1>number guessing ...
... here let randomnumber = math.floor(math.random() * 100) + 1; const guesses = document.queryselector('.guesses'); const lastresult = document.queryselector('.lastresult'); const loworhi = document.queryselector('.loworhi'); const guesssubmit = document.queryselector('.guesssubmit'); const guessfield = document.queryselector('.guessfield'); let guesscount = 1; let re
setbutton; function checkguess() { let userguess = number(guessfield.value); if (guesscount === 1) { guesses.textcontent = 'previous guesses: '; } guesses.textcontent += userguess + ' '; if (userguess === randomnumber) { lastresult.textcontent = 'congratulations!
... you got it right!'; lastresult.style.backgroundcolor = 'green'; loworhi.textcontent = '';
setgameover(); } else if (guesscount === 10) { lastresult.textcontent = '!!!game over!!!'; loworhi.textcontent = '';
setgameover(); } else { lastresult.textcontent = 'wrong!'; lastresult.style.backgroundcolor = 'red'; if(userguess < randomnumber) { loworhi.textcontent = 'last guess was too low!' ; } else if(userguess > randomnumber) { loworhi.textcontent = 'last guess was too high!'; } } guesscount++; guessfield.value = ''; } guesssubmit.addeventlistener('click', checkguess); function
setgameover() { guessfield.disabled = true; guesssubmit.d...
...And 22 more matches
NS ConvertASCIItoUTF16 external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find ...
... 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.
... 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() ...
...And 22 more matches
NS ConvertUTF8toUTF16 external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find ...
... 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.
... 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() ...
...And 22 more matches
PromiseFlatString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind ...
... 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.
... 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() ...
...And 22 more matches
nsAString (External)
94,733,342" href="http://developer.mozilla.org/en/ns_convertutf8toutf16_external" shape="rect" title="ns_convertutf8toutf16_external"> <area alt="" coords="757,294,869,342" href="http://developer.mozilla.org/en/nsliteralstring_(external)" shape="rect" title="nsliteralstring_(external)"> </map> method overview beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendin...
... 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.
...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* adat...
...And 22 more matches
nsAutoString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind ...
... 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.
... 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() ...
...And 22 more matches
nsDependentString external
class declaration dependent strings method overview constructors rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lower...
... 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.
... 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() ...
...And 22 more matches
nsDependentSubstring external
class declaration substrings method overview constructors rebind beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const prunichar*, print32 (*) compare(const nsastring&, print32 (*) equals(const prunichar*, print32 (*) equals(const nsastring&, print32 (*) operator< operator<...
... 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.
... 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() ...
...And 22 more matches
nsStringContainer (External)
class declaration method overview beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar ...
... 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.
... 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() ...
...And 22 more matches
nsString external
class declaration basic strings method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral ...
... 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.
... 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() ...
...And 22 more matches
nsIPromptService
you need to wrap them in a temporary object, which can be either empty or have a value property
set to the out parameter type.
... button title flags these flags are used along with button position flags to
set the labels of buttons in the prompt.
... constant value description button_delay_enable 67108864 standard buttons flags constant value description std_ok_cancel_buttons 513 selects the standard
set of ok/cancel buttons.
...And 22 more matches
Drag Operations - Web APIs
when an image or link is dragged, the url of the image or link is
set as the drag data, and a drag begins.
... to make other html elements draggable, three things must be done:
set the draggable="true" on the element that you wish to make draggable.
...
set the drag data in the above listener.
...And 22 more matches
WebGL model view projection - Web APIs
webglbox constructor the constructor looks like this: function webglbox() { //
setup the canvas and webgl context this.canvas = document.getelementbyid('canvas'); this.canvas.width = window.innerwidth; this.canvas.height = window.innerheight; this.gl = mdn.createcontext(canvas); var gl = this.gl; //
setup a webgl program, anything part of the mdn object is defined outside of this article this.webglprogram = mdn.createwebglprogramfromids(gl, 'vertex-shader', 'fra...
... webglbox.prototype.draw = function(
settings) { // create some attribute data; these are the triangles that will end being // drawn to the screen.
... var data = new float32array([ //triangle 1
settings.left,
settings.bottom,
settings.depth,
settings.right,
settings.bottom,
settings.depth,
settings.left,
settings.top,
settings.depth, //triangle 2
settings.left,
settings.top,
settings.depth,
settings.right,
settings.bottom,
settings.depth,
settings.right,
settings.top,
settings.depth ]); // use webgl to draw this onto the screen.
...And 22 more matches
Fundamentals of WebXR - Web APIs
what webxr is and isn't webxr is an api for web content and apps to use to interface with mixed reality hardware such as vr head
sets and glasses with integrated augmented reality features.
... this includes both managing the process of rendering the views needed to simulate the 3d experience and the ability to sense the movement of the head
set or other motion sensing apparatus to provide the needed data to let you update the imagery shown to the user based on that movement.
... another key difference is that webxr has integrated support for the advanced input controllers that are used with most mixed reality head
sets, while webvr relied on the gamepad api to support the controllers.
...And 22 more matches
DataView - JavaScript
var littleendian = (function() { var buffer = new arraybuffer(2); new dataview(buffer).
setint16(0, 256, true /* littleendian */); // int16array uses the platform's endianness.
... function getuint64(dataview, byteoff
set, littleendian) { // split 64-bit number into two 32-bit (4-byte) parts const left = dataview.getuint32(byteoff
set, littleendian); const right = dataview.getuint32(byteoff
set+4, littleendian); // combine the two 32-bit values const combined = littleendian?
... const bigint = window.bigint, bigthirtytwo = bigint(32), bigzero = bigint(0); function getuint64bigint(dataview, byteoff
set, littleendian) { // split 64-bit number into two 32-bit (4-byte) parts const left = bigint(dataview.getuint32(byteoff
set|0, !!littleendian)>>>0); const right = bigint(dataview.getuint32((byteoff
set|0) + 4|0, !!littleendian)>>>0); // combine the two 32-bit values and return return littleendian ?
...And 22 more matches
SVG documentation index - SVG: Scalable Vector Graphics
36 by svg, svg attribute the by attribute specifies a relative off
set value for an attribute that will be modified during an animation.
... 39 class reference, svg, svg attribute assigns a class name or
set of class names to an element.
...their custom data are available via the svgelement interface of the element the attributes belong to, with the svgelement.data
set property.
...And 22 more matches
prefwindow - Archive of obsolete content
each pane will usually group together a
set of related preferences.
...you can also
set the lastselected attribute on the prefwindow tag to the id of the pane to start with.
... normally, you would not
set this attribute as it will be
set automatically such that the default pane is the same as the one showing when the preferences dialog was last closed.
...And 21 more matches
tabbrowser - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is used for holding a
set of read-only views of web documents.
... attributes autocompleteenabled, autocompletepopup, autoscroll, contentcontextmenu, contenttooltip, handlectrlpageupdown, onbookmarkgroup, onnewtab, tabmodalpromptshowing properties browsers, cangoback, cangoforward, contentdocument, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentchar
setinfo, homepage, markupdocumentviewer, securityui, selectedbrowser, selectedtab, sessionhistory, tabcontainer, tabs, visibletabs, webbrowserfind, webnavigation, webprogress methods addprogresslistener, addtab, addtabsprogresslistener,appendgroup, getbrowseratindex, getbrowserindexfordocument, getbrowserfordocument, getbrowserfortab, geticon, getnotificationbox, gettabforbrowser, gettabmodalprompt...
...box, goback, gobackgroup, goforward, goforwardgroup, gohome, gotoindex, loadgroup, loadonetab, loadtabs, loaduri, loaduriwithflags, movetabto, pintab, reload, reloadalltabs, reloadtab, reloadwithflags, removealltabsbut, removecurrenttab, removeprogresslistener, removetab, removetabsprogresslistener,replacegroup, selecttabatindex,
seticon, showonlythe
setabs, stop, unpintab attributes autocompleteenabled type: boolean
set to true to enable autocomplete of fields.
...And 21 more matches
Responsive images - Learn web development
objective: learn how to use features like src
set and the <picture> element to implement responsive image solutions on websites.
...here's a simple example: this works well on a wide screen device, such as a laptop or desktop (you can see the example live and find the source code on github.) we won't discuss the css much in this lesson, except to say that: the body content has been
set to a maximum width of 1200 pixels — in viewports above that width, the body remains at 1200px and centers itself in the available space.
... the header image has been
set so that its center always stays in the center of the header, no matter what width the heading is
set at.
...And 21 more matches
Introduction to automated testing - Learn web development
commercial cross-browser testing apps like lambdatest, sauce labs, browserstack, and testingbot are based on selenium, but allow you to access their
set up remotely using a simple interface, saving you the hassle of
setting up your own testing system.
... we will look at how to
set up your own selenium-based testing system in the next article.
... in this article, we'll look at how to
set up a task runner, and use the basic functionality of commercial systems like the ones mentioned above.
...And 21 more matches
PKCS11 Implement
installing modules and informing the user of changes in the cryptographic modules
settings.
...if the ckf_removable_device flag is
set, nss also calls c_getslotinfo whenever it looks up slots to make sure the token is present.
... if the ckf_removable_device flag is not
set, nss uses that token information without checking again.
...And 21 more matches
Python binding for NSS
nss/nspr objects which have "get" and "
set" api function calls are exposed as python properties.
...also, any "global" values which are
set in python-nss are actually thread-local.
... examples of this are the various callbacks which can be
set and their parameters.
...And 21 more matches
sslintro.html
warning: some of the ssl header files provided as part of nss 2.0 include both public apis documented in the nss 2.0 documentation
set and private apis intended for internal use by the nss implementation of ssl.
... initialization initialization includes
setting up configuration files,
setting global defaults, and
setting up callback functions.
... pk11_
setpasswordfunc.
...And 21 more matches
Using IndexedDB - Web APIs
if everything succeeds, a success event (that is, a dom event whose type property is
set to "success") is fired with request as its target.
...otherwise, if there was any problem, an error event (that is, a dom event whose type property is
set to "error") is fired at request.
... creating or updating the version of the database when you create a new database or increase the version number of an existing database (by specifying a higher version number than you did previously, when opening a database), the onupgradeneeded event will be triggered and an idbversionchangeevent object will be passed to any onversionchange event handler
set up on request.result (i.e., db in the example).
...And 21 more matches
Signaling and video calling - Web APIs
note: if you try out the example on glitch, please note that any changes made to the code will immediately re
set any connections.
...the server supports several message types to handle tasks, such as registering new users,
setting usernames, and sending public chat messages.
... an icecandidate event is sent to the rtcpeerconnection to complete the process of adding a local description using pc.
setlocaldescription(offer).
...And 21 more matches
Advanced techniques: Creating and sequencing audio - Web APIs
when the instrument plays, it will move across this
set of beats and loop the bar.
...however, instead of using the standard waves that come by default, we're going to create our own using the periodicwave interface and values
set in a wavetable.
... the oscillator now we can create an oscillatornode and
set its wave to the one we've created: function playsweep() { let osc = audioctx.createoscillator(); osc.
setperiodicwave(wave); osc.frequency.value = 440; osc.connect(audioctx.destination); osc.start(); osc.stop(audioctx.currenttime + 1); } controlling amplitude this is great, but wouldn't it be nice if we had an amplitude envelope to go with it?
...And 21 more matches
Keyed collections - JavaScript
« previousnext » this chapter introduces collections of data which are indexed by a key; map and
set objects contain elements which are iterable in the order of insertion.
... let sayings = new map(); sayings.
set('dog', 'woof'); sayings.
set('cat', 'meow'); sayings.
set('elephant', 'toot'); sayings.size; // 3 sayings.get('dog'); // woof sayings.get('fox'); // undefined sayings.has('bird'); // false sayings.delete('dog'); sayings.has('dog'); // false for (let [key, value] of sayings) { console.log(key + ' goes ' + value); } // "cat goes meow" // "elephant goes toot" sayings.clear(); sayings.size; // 0 ...
...objects allow you to
set keys to values, retrieve those values, delete keys, and detect whether something is stored at a key.
...And 21 more matches
Date - JavaScript
host system) time zone and off
set.
... in addition to methods to read and alter individual components of the local date and time (such as getday() and
sethours()), there are also versions of the same methods that read and manipulate the date and time using utc (such as getutcday() and
setutchours()).
...(negative values are returned for prior times.) date.prototype.gettimezoneoff
set() returns the time-zone off
set in minutes for the current locale.
...And 21 more matches
Elements - Archive of obsolete content
css: div { -moz-binding: url(mybinding.xml#default); } dom: elementreference.style.mozbinding = "url(mybinding.xml#default)"; in both cases above we are using binding with id="default" contained in file mybinding.xml starting with firefox 3, you can also use a data: url to embed the binding inline: div { -moz-binding: url(data:text/xml;char
set=utf-8,%3c%3fxml%20version%3d%221.0%22%3f%3e%0a%3cbindings%20id%3d%22xbltestbindings%22%20xmlns%3d%22http%3a//www.mozilla.org/xbl%22%3e%0a%20%20%3cbinding%20id%3d%22xbltest%22%3e%3ccontent%3epass%3c/content%3e%3c/binding%3e%0a%3c/bindings%3e%0a); } since data: urls don't support fragment identifiers, the first binding found in the embedded xml is used instead.
... for clarity's sake, here's what the embedded xml in the previous example looks like: <?xml version="1.0"?> <bindings id="xbltestbindings" xmlns="http://www.mozilla.org/xbl"> <binding id="xbltest"><content>pass</content></binding> </bindings> only css declarations provide an easy way to attach bindings to any
set of elements.
...by
setting this attribute, you can have an element have the layout and display characteristics of an existing element.
...And 20 more matches
listbox - Archive of obsolete content
navigation, itemcount, listboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoff
set, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <listbox id="thelist"> <listitem label="ruby"/> <listitem label="emerald"/> <listitem label="sapphire" selected="true"/> <listitem label="diamond"/> </listbox> <listbox id="thelist" rows="10" width="400"> <listhead> <listheader label="1ct ...
...ementbyid('thelist'); gems = [ {gem: "ruby", price: "$3,500 - $4,600"}, {gem: "emerald", price: "$700 - 4,250"}, {gem: "blue sapphire", price: "$3,400 - $4,500"}, {gem: "diamond", price: "$5,600 - $16,000"} ]; for (var i = 0; i < gems.length; i++) { var row = document.createelement('listitem'); var cell = document.createelement('listcell'); cell.
setattribute('label', gems[i].gem); row.appendchild(cell); cell = document.createelement('listcell'); cell.
setattribute('label', gems[i].price ); row.appendchild(cell); thelist.appendchild(row); } attributes disabled type: boolean indicates whether the element is disabled or not.
... if this attribute is
set, the element is disabled.
...And 20 more matches
menulist - Archive of obsolete content
tem, contains, getindexofitem, getitematindex, insertitemat, removeallitems, removeitemat, select examples <menulist> <menupopup> <menuitem label="option 1" value="1"/> <menuitem label="option 2" value="2"/> <menuitem label="option 3" value="3"/> <menuitem label="option 4" value="4"/> </menupopup> </menulist> attributes accesskey type: character this should be
set to a character that is used as a shortcut key.
... depending on the platform and theme being used, some elements will have
set a maximum width so they will always appear cropped.
...if this attribute is
set, the element is disabled.
...And 20 more matches
Index - Learn web development
this
set of articles aims to provide complete beginners to web development with all that they need to start coding websites.
... 13 aprender y obtener ayuda beginner, learn, learning, web development, getting help it is great that you are putting some time into learning a new
set of skills, but there are good practices to employ that will make your learning more effective.
... 20 how do you
set up a local testing server?
...And 20 more matches
nsIMsgDBHdr
it is also mandatory to
set msghdr.folder.msgdatabase = null after performing this kind of operations to prevent leaking.
... method overview astring getproperty(in string propertyname); void
setproperty(in string propertyname, in astring propertystr); void
setstringproperty(in string propertyname, in string propertyvalue); string getstringproperty(in string propertyname); unsigned long getuint32property(in string propertyname); void
setuint32property(in string propertyname, in unsigned long propertyval); void markread(in boolean read); void markflagged(in boolean flagged); void markhasattachments(in boolean hasattachments); void
setprioritystring(in string priority); unsigned long orflags(in unsigned long flags); unsigned long andflags(in unsigned long ...
...flags); void
setreferences(in string references); acstring getstringreference(in long refnum); void
setrecipientsarray(in string names, in string addresses,in unsigned long numaddresses); void
setcclistarray(in string names, in string addresses,in unsigned long numaddresses); void
setbcclistarray(in string names, in string addresses,in unsigned long numaddresses);new in thunderbird 3.1 [noscript] void getauthorcollationkey(out octetptr key, out unsigned long len); [noscript] void getsubjectcollationkey(out octetptr key, out unsigned long len); [noscript] void getrecipientscollationkey(out octetptr key, out unsigned long len); attributes attribute type description isread boolean readon...
...And 20 more matches
Using HTTP cookies - HTTP
cookies are mainly used for three purposes: session management logins, shopping carts, game scores, or anything else the server should remember personalization user preferences, themes, and other
settings tracking recording and analyzing user behavior cookies were once used for general client-side storage.
... creating cookies after receiving an http request, a server can send one or more
set-cookie headers with the response.
...additional restrictions to a specific domain and path can be
set, limiting where the cookie is sent.
...And 20 more matches
HTTP Index - HTTP
30 reason: credential is not supported if the cors header ‘access-control-allow-origin’ is ‘*’ cors, corsnotsupportingcredentials, cross-origin, error, http, https, messages, reasons, security, console, troubleshooting the cors request was attempted with the credentials flag
set, but the server is configured using the wildcard ("*") as the value of access-control-allow-origin, which doesn't allow the use of credentials.
... 33 reason: expected ‘true’ in cors header ‘access-control-allow-credentials’ cors, corsmissingallowcredentials, cross-origin, error, http, https, messages, reasons, security, console, troubleshooting the cors request requires that the server permit the use of credentials, but the server's access-control-allow-credentials header's value isn't
set to true to enable their use.
...browsers
set adequate values for this header depending on the context where the request is done: when fetching a css stylesheet a different value is
set for the request than when fetching an image, video or a script.
...And 20 more matches
Details of the object model - JavaScript
a class defines all of the properties that characterize a certain
set of objects (considering methods and fields in java, or members in c++, to be properties).
... a class is abstract rather than any particular member in a
set of objects it describes.
... for example, the employee class could represent the
set of all employees.
...And 20 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
in order to
set universalxpconnect privileges, you need to run the code in listing 2.
... listing 2:
setting privileges netscape.security.privilegemanager.enableprivilege('universalxpconnect'); note: this is unneeded when the code is part of an extension, and will result in rejection if submitted to addons.mozilla.org.
...on windows vista, it will be located at c:\users\username\appdata\roaming\mozilla\firefox\profiles\random number.default\ ; on windows xp or 2000, it will be c:\documents and
settings\username\application data\mozilla\firefox\profiles\random number.default\ ; on linux, it will be ~/.mozilla/firefox/random number.default/ ; on mac os x, it will be ~/library/application support/firefox/profiles/random number.default/ in the interests of security, delete these lines from prefs.js after finishing these tests.
...And 19 more matches
richlistbox - Archive of obsolete content
vigation, itemcount, scrollboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoff
set, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <richlistbox> <richlistitem> <description>a xul description!</description> </richlistitem> <richlistitem> <button label="a xul button"/> </richlistitem> </richlistbox> the richlistbox element contains multiple richlistitem elements, which ca...
...if this attribute is
set, the element is disabled.
...do not
set the attribute to true, as this will suggest you can
set it to false to enable the element again, which is not the case.
...And 19 more matches
tree - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container which can be used to hold a tabular or hierarchical
set of rows of elements.
... if you would like to allow the tree to be horizontally scrolled, simply
set the width attributes for each column to make the tree wider than its containing object.
...the custom view should be attached to the tree by
setting its view property.
...And 19 more matches
UI pseudo-classes - Learn web development
:valid and :invalid, and :in-range and :out-of-range: target form controls that are valid/invalid according to form validation constraints
set on them, or in-range/out-of-range.
...with the disabled html attribute
set), and read-write or read-only form controls (e.g.
... with the readonly html attribute
set).
...And 19 more matches
Working with Svelte stores - Learn web development
a store is simply an object with a subscribe() method that allows interested parties to be notified whenever the store value changes, and an optional
set() method that allows you to
set new values for the store.
... this
setup allows us to work with stores in a reactive way.
...if you implement the subscribe() and
set() methods, like we'll do later, the reactive $store syntax will also apply to your stores.
...And 19 more matches
Mozilla internal string guide
*/ void replacetabs(nsastring& data) { char16_t* cur = data.beginwriting(); char16_t* end = data.endwriting(); for (; cur < end; ++cur) { if (char16_t('\t') == *cur) *cur = char16_t(' '); } } you may change the length of a string via
setlength().
... int pos = 0; while (cur < end) { if (char16_t('\t') != *cur) { ++pos; ++cur; } else { len += 3; data.
setlength(len); // after
setlength, read `cur` and `end` again cur = data.beginwriting() + pos; end = data.endwriting(); // move the remaining data over if (pos < len - 1) memmove(cur + 4, cur + 1, (len - 1 - pos) * sizeof(char16_t)); // fill the tab with spaces *cur = char16_t(' '); *(cur + 1) = char16_t(' '); *(cur + 2) = char16_t(' '...
...); *(cur + 3) = char16_t(' '); pos += 4; cur += 4; } } } if a string buffer becomes smaller while writing it, use
setlength to inform the string class of the new size: /** * remove every tab character from `data` */ void removetabs(nsastring& data) { int len = data.length(); char16_t* cur = data.beginwriting(); char16_t* end = data.endwriting(); while (cur < end) { if (char16_t('\t') == *cur) { len -= 1; end -= 1; if (cur < end) memmove(cur, cur + 1, (end - cur) * sizeof(char16_t)); } else { cur += 1; } } data.
setlength(len); } note that using beginwriting() to make a string longer is not ok.
...And 19 more matches
NS ConvertUTF16toUTF8 external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... 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.
... 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() ...
...And 19 more matches
NS LossyConvertUTF16toASCII external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... 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.
... 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() ...
...And 19 more matches
PromiseFlatCString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar ...
... 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.
... 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() ...
...And 19 more matches
nsACString (External)
16toascii_external" shape="rect" title="ns_lossyconvertutf16toascii_external"> <area alt="" coords="803,294,925,342" href="http://developer.mozilla.org/en/nsliteralcstring_(external)" shape="rect" title="nsliteralcstring_(external)"></map> method overview beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< ...
... 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.
... 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() ...
...And 19 more matches
nsCAutoString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar ...
... 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.
... 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() ...
...And 19 more matches
nsCStringContainer (External)
class declaration method overview beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const char*, print32 (*) compare(const nsacstring&, print32 (*) equals(const char*, print32 (*) equals(const nsacstring&, print32 (*) operator< operator<= operator== operator>= operat...
... 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.
... 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() ...
...And 19 more matches
nsCString external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... 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.
... 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() ...
...And 19 more matches
nsDependentCString external
class declaration method overview constructors rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind ...
... 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.
... 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() ...
...And 19 more matches
nsDependentCSubstring external
class declaration method overview constructors rebind beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfin...
... 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.
... 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() ...
...And 19 more matches
nsLiteralCString (External)
class declaration method overview rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... 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.
... 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() ...
...And 19 more matches
nsLiteralString (External)
class declaration method overview rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting
setlength length isempty
setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... 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.
... 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() ...
...And 19 more matches
nsIHTMLEditor
id insertelementatselection(in nsidomelement aelement, in boolean adeleteselection); void insertfromdrop(in nsidomevent aevent); void inserthtml(in astring ainputstring); void inserthtmlwithcontext(in astring ainputstring, in astring acontextstr, in astring ainfostr, in astring aflavor, in nsidomdocument asourcedoc, in nsidomnode adestinationnode, in long adestinationoff
set, in boolean adeleteselection); void insertlinkaroundselection(in nsidomelement aanchorelement); boolean isanonymouselement(in nsidomelement aelement); void makeorchangelist(in astring alisttype, in boolean entirelist, in astring abullettype); boolean nodeisblock(in nsidomnode node); void pastenoformatting(in long aselectiontype); void rebuildd...
...siatom aproperty, in astring aattribute, in astring avalue); void removeinlineproperty(in nsiatom aproperty, in astring aattribute); void removeinsertionlistener(in nsicontentfilter infilter); void removelist(in astring alisttype); void replaceheadcontentswithhtml(in astring asourcetoinsert); void selectelement(in nsidomelement aelement); void
setbackgroundcolor(in astring acolor); void
setbodyattribute(in astring aattr, in astring avalue); void
setcaretafterelement(in nsidomelement aelement); void
setcssinlineproperty(in nsiatom aproperty, in astring aattribute, in astring avalue); void
setdocumenttitle(in astring atitle); void
setinlineproperty(in nsiatom aproperty, in astring aattribute, in a...
...string avalue); void
setparagraphformat(in astring aparagraphformat); void updatebaseurl(); attributes attribute type description iscssenabled boolean a boolean which is true is the htmleditor has been instantiated with css knowledge and if the css pref is currently checked.
...And 19 more matches
nsIMsgFolder
inherits from: nsisupports method overview void startfolderloading(); void endfolderloading(); void updatefolder(in nsimsgwindow awindow); nsimsgfilterlist getfilterlist(in nsimsgwindow msgwindow); void
setfilterlist(in nsimsgfilterlist filterlist); void forcedbclosed(); void delete(); void deletesubfolders(in nsisupportsarray folders, in nsimsgwindow msgwindow); void propagatedelete(in nsimsgfolder folder, in boolean deletestorage,in nsimsgwindow msgwindow); void recursivedelete(in boolean deletestorage, in nsimsgwindow msgwindow); void createsu...
...ow msgwindow, in nsimsgfolder oldfolder); astring generateuniquesubfoldername(in astring prefix,in nsimsgfolder otherfolder); void updatesummarytotals(in boolean force); void summarychanged(); long getnumunread(in boolean deep); long gettotalmessages(in boolean deep); void clearnewmessages(); void clearrequirescleanup(); void
setflag(in unsigned long flag); void clearflag(in unsigned long flag); boolean getflag(in unsigned long flag); void toggleflag(in unsigned long flag); void onflagchange(in unsigned long flag); void
setprefflag(); nsimsgfolder getfolderswithflag(in unsigned long flags, in unsigned long resultsize, out unsigned long numfolders); nsisupports...
... void acquiresemaphore(in nsisupports semholder); void releasesemaphore(in nsisupports semholder); boolean testsemaphore(in nsisupports semholder); void getnewmessages(in nsimsgwindow awindow, in nsiurllistener alistener); void writetofoldercache(in nsimsgfoldercache foldercache, in boolean deep); long getnumnewmessages(in boolean deep); void
setnumnewmessages(in long numnewmessages); acstring generatemessageuri(in nsmsgkey msgkey); void addmessagedispositionstate(in nsimsgdbhdr amessage,in nsmsgdispositionstate adispositionflag); void markmessagesread(in nsisupportsarray messages, in boolean markread); void markallmessagesread(); void markmessagesflagged(in nsisupportsarray messages, in boolea...
...And 19 more matches
nsIWritablePropertyBag2
xpcom/ds/nsiwritablepropertybag2.idlscriptable this interface extends nsipropertybag2 with methods for
setting properties.
... 1.0 66 introduced gecko 1.8 inherits from: nsipropertybag2 last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void
setpropertyasacstring(in astring prop, in acstring value); void
setpropertyasastring(in astring prop, in astring value); void
setpropertyasautf8string(in astring prop, in autf8string value); void
setpropertyasbool(in astring prop, in boolean value); void
setpropertyasdouble(in astring prop, in double value); void
setpropertyasint32(in astring prop, in print32 value); void
setpropertyasint64(in astring prop, in print64 value); void
setpropertyasinterface(in astring prop, in nsisupports value); void
setpropertyasuint32(in astring prop, in p...
...ruint32 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.
...And 19 more matches
WebGLRenderingContext - Web APIs
webglrenderingcontext.viewport()
sets the viewport.
... webglrenderingcontext.blendcolor()
sets the source and destination blending factors.
... webglrenderingcontext.blendequation()
sets both the rgb blend equation and alpha blend equation to a single equation.
...And 19 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
the location and movement of the user's head
set represent their head's position and orientation in the virtual environment.
... representing a position using a reference space as covered in defining spatial relationships with reference spaces in geometry and reference spaces in webxr, reference spaces establish a local coordinate system which is off
set from another coordinate system that is itself defined by some other space.
... the first is described above: applying a reference space to an off
set (or vice-versa, since the result is the same) to determine the transform matrix that represents the resulting location in the space's coordinate system.
...And 19 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.off
set parameter.
...for example, perhaps you have a
set of oscillators, and two of them need to share the same, configurable volume, or you have a filter that's been applied to certain inputs but not to all of them.
...since constantsourcenode's off
set value is simply sent straight through to all of its outputs, it acts as a splitter for that value, sending it to each connected parameter.
...And 19 more matches
Variable fonts guide - CSS: Cascading Style Sheets
this allows for common typographic techniques such as
setting different size headings in different weights for better readability at each size, or using a slightly narrower width for data-dense displays.
...the lower-level syntax (font-variation-
settings) was the first mechanism implemented in order to test the early implementations of variable font support, and is necessary to utilize new or custom axes beyond the five registered ones.
...therefore wherever possible, the appropriate property should be used, with the lower-level syntax of font-variation-
settings only being used to
set values or axes not available otherwise.
...And 19 more matches
ui/button/action - Archive of obsolete content
by default the badge's color is red, but you can
set your own color using the badgecolor property, specified as a css <color> value: var { togglebutton } = require("sdk/ui/button/toggle"); var button = togglebutton({ id: "my-button1", label: "my button1", icon: "./icon-16.png", onchange: changed, badge: 0, badgecolor: "#00aaaa" }); function changed(state) { button.badge = state.badge + 1; if (state.checked) { bu...
... disabling buttons you can disable a button by
setting its disabled property to true.
... you can
set state to be specific to a window or tab using the button's state() method.
...And 18 more matches
Menu - Archive of obsolete content
methods add(items) clear() contexton(node) hide() insertbefore(newitems, target) item(target) popupon(node) remove(target) replace(target, newitems) re
set()
set(items) show(anchornode) add(items) adds items to the menu.
...this method and
set() are the recommended methods of adding items to a menu.
... re
set() reverts all the changes to the menu that the feature has made.
...And 18 more matches
Space Manager Detailed Design - Archive of obsolete content
* * @return pr_true if there are bands and pr_false if there are no bands */ prbool ymost(nscoord& aymost) const; /** * returns a band starting at the specified y-off
set.
... * * the local coordinate space origin, the y-off
set, and the max size * describe a rectangle that's used to clip the underlying band of * available space, i.e.
... * {0, ayoff
set, amaxsize.width, amaxsize.height} in the local * coordinate space * * @param ayoff
set the y-off
set of where the band begins.
...And 18 more matches
Adding Properties to XBL-defined Elements - Archive of obsolete content
the xbl interface javascript and the dom provide access to get and
set the properties of elements.
...that way, all you need is to get a reference to the element (using document.getelementbyid or a similar function) and then get or
set the additional properties and call the methods on it.
...you can use the name from a script to get and
set the value.
...And 18 more matches
menuseparator - Archive of obsolete content
if this value is
set, it overrides an assigned key
set in the key attribute.
... accesskey type: character this should be
set to a character that is used as a shortcut key.
... command type: id
set to the id of a command element that is being observed by the element.
...And 18 more matches
preference - Archive of obsolete content
attributes disabled, instantapply, inverted, name, onchange, readonly, tabindex, type properties defaultvalue, disabled, hasuservalue, inverted, locked, name, preferences, readonly, tabindex, type, value, valuefrompreferences methods re
set examples <preferences> <preference id="pref_id" name="preference.name" type="int"/> </preferences> see preferences system for a complete example.
...if this attribute is
set, the element is disabled.
...do not
set the attribute to true, as this will suggest you can
set it to false to enable the element again, which is not the case.
...And 18 more matches
Responsive design - Learn web development
as more diverse screen sizes became available, the concept of responsive web design (rwd) appeared, a
set of practices that allows web pages to alter their layout and appearance to suit different screen widths, resolutions, etc.
...using a very simple technique of
setting the max-width property to 100%, images would scale down smaller if their containing column became narrower than the image's intrinsic size, but never grow larger.
... it is important to understand that responsive web design isn't a separate technology — it is a term used to describe an approach to web design or a
set of best practices, used to create a layout that can respond to the device being used to view the content.
...And 18 more matches
Styling lists - Learn web development
dt>green salad</dt> <dd>that green healthy stuff that many of us just use to garnish kebabs.</dd> </dl> if you go to the live example now and investigate the list elements using browser developer tools, you'll notice a couple of styling defaults: the <ul> and <ol> elements have a top and bottom margin of 16px (1em) and a padding-left of 40px (2.5em.) the list items (<li> elements) have no
set defaults for spacing.
... the <dl> element has a top and bottom margin of 16px (1em), but no padding
set.
...ub, and find the source code too.) the css used for the text styling and spacing is as follows: /* general styles */ html { font-family: helvetica, arial, sans-serif; font-size: 10px; } h2 { font-size: 2rem; } ul,ol,dl,p { font-size: 1.5rem; } li, p { line-height: 1.5; } /* description list styles */ dd, dt { line-height: 1.5; } dt { font-weight: bold; } the first rule
sets a sitewide font and a baseline font size of 10px.
...And 18 more matches
Basic native form controls - Learn web development
in this particular article we will look at the original
set of form controls, available in all browsers since the early days of the web.
... objective: to understand in detail the original
set of native form widgets available in browsers for collecting data, and how to implement them using html.
... you've already met some form elements, including <form>, <field
set>, <legend>, <textarea>, <label>, <button>, and <input>.
...And 18 more matches
TypeScript support in Svelte - Learn web development
typescript: optional static typing for javascript typescript is a super
set of javascript that provides features such as optional static typing, classes, interfaces, and generics.
... best of all, javascript code is valid typescript code; typescript is a super
set of javascript.
...in this section we'll show you how to
setup a svelte project with typescript support to give it a try.
...And 18 more matches
Displaying Places information using views
you may specify the attribute directly in the xul or
set its corresponding property via javascript.
...for more complicated queries or queries whose uris you plan on changing, you will want to
set the view's place property dynamically using javascript.
... note that in the latter case it is not sufficient to call
setattribute on the element; use the element's place property instead.
...And 18 more matches
Starting WebLock
this is where a new service that manages
sets of related data comes in handy.
... the nsicategoryservice maintains
sets of name-value pairs like the one below.
...each category contains a
set of name-value pairs.
...And 18 more matches
nsISelectionController
void charactermove(in boolean forward, in boolean extend); boolean checkvisibility(in nsidomnode node, in short startoff
set, in short endoff
set); void completemove(in boolean forward, in boolean extend); void completescroll(in boolean forward); boolean getcaretenabled(); short getdisplayselection(); nsiselection getselection(in short type); void intralinemove(in boolean forward, in boolean extend); void line...
...olean forward, in boolean extend); void repaintselection(in short type); void scrollhorizontal(in boolean left); void scrollline(in boolean forward); void scrollpage(in boolean forward); void scrollselectionintoview(in short type, in short region, in short flags); void selectall(); void
setcaretenabled(in boolean enabled); void
setcaretreadonly(in boolean readonly); void
setcaretvisibilityduringselection(in boolean visibility); void
setcaretwidth(in short pixels); obsolete since gecko 1.8 void
setdisplayselection(in short toggle); void wordextendfordelete(in boolean forward); native code only!
... selection_on 2 selection_disabled 3 selection_attention 4 scroll constants constant value description scroll_synchronous 1<<1 if
set scrolls the selection into view before returning.
...And 18 more matches
Web Video Text Tracks Format (WebVTT) - Web APIs
crédit de transcription 00:04.000 --> 00:05.000 transcrit par célestes™ ::cue(#\31) { color: lime; } ::cue(#crédit\ de\ transcription) { color: red; } positioning of text tracks is also supported, by including positioning information after the timings in a cue, as seen below (see cue
settings for more information): webvtt 00:00:00.000 --> 00:00:04.000 position:10%,line-left align:left size:35% where did he go?
... optional cue
settings with at least one space before the first and between each
setting.
...00:30.739 --> 00:00:34.074 00:00:34.159 --> 00:00:35.743 00:00:35.827 --> 00:00:40.122 example 11 - overlapping cue timing examples 00:00:00.000 --> 00:00:10.000 00:00:05.000 --> 00:01:00.000 00:00:30.000 --> 00:00:50.000 example 12 - non-overlapping cue timing examples 00:00:00.000 --> 00:00:10.000 00:00:10.000 --> 00:01:00.581 00:01:00.581 --> 00:02:00.100 00:02:01.000 --> 00:02:01.000 cue
settings cue
settings are optional components used to position where the cue payload text will be displayed over the video.
...And 18 more matches
Border-radius generator - CSS: Cascading Style Sheets
============================================================ */ .section { clear: both; padding: 0px; margin: 0px; } /* grouping * ========================================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column
setup * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-child { margin-left: 0; } /* all browsers except ie6 and lower */ /* * ui component */ .ui-input-slider-container { height: 20px; margin: 10px 0; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-...
...-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-
set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-input-slider-btn-
set:hover { background-color: #379b4a; cursor: pointer; } /* * ui component */ /* checkbox */ .ui-checkbox { text-align: center; font-size: 16px; font-family: "segoe ui", arial, helvetica, sans-serif; line-height: 1.5em; co...
... -moz-user-select: text; -webkit-user-select: text; -ms-user-select: text; user-select: text; float: right; } javascript content 'use strict'; /** * ui-inputslidermanager */ var inputslidermanager = (function inputslidermanager() { var subscribers = {}; var sliders = []; var inputcomponent = function inputcomponent(obj) { var input = document.createelement('input'); input.
setattribute('type', 'text'); input.addeventlistener('click', function(e) { this.select(); }); input.addeventlistener('change', function(e) { var value = parseint(e.target.value); if (isnan(value) === true)
setvalue(obj.topic, obj.value); else
setvalue(obj.topic, value); }); subscribe(obj.topic, function(value) { input.value = value + obj.unit; }); return inp...
...And 18 more matches
this - JavaScript
it can't be
set by assignment during execution, and it may be different each time the function is called.
... es5 introduced the bind() method to
set the value of a function's this regardless of how it's called, and es2015 introduced arrow functions which don't provide their own this binding (it retains the this value of the enclosing lexical context).
... since the following code is not in strict mode, and because the value of this is not
set by the call, this will default to the global object, which is window in a browser.
...And 18 more matches
Enhanced Extension Installation - Archive of obsolete content
if it is, a small
set of metadata about it is written to the appropriate datasource (name, version, a flag to tell the system to properly install it on the next startup), and it is added to the appropriate type container.
...a copy of the xpi file the item was installed from is
set aside since the xpinstall system cleans up the temporary file it hands to the extension system.
...[hklm|hkcu]\software\mozilla\firefox\extensions given these goals, and the likelihood of future goals, such as potential for extensions to the xulrunner framework, common drop zones for xpis etc it makes sense to have the
set of install locations be customizable.
...And 17 more matches
JXON - Archive of obsolete content
there are some cases in which the whole content of an xml document must be read from the javascript interpreter (like for web-apps languages or
settings xml documents, for example).
...don't use yourrequest.respon
setext!
... in order to avoid conflicts, the representation of nodes and attributes names is case insensitive (always rendered in lower case), so objects' local property names
set using javascript must always have some kind of capitalization (that is, at least one capital letter somewhere in their names), as you can see below.
...And 17 more matches
panel - Archive of obsolete content
<panel id="thepanel"> <hbox align="start"> <image src="warning.png"/> <vbox> <description value="you have 6 new messages."/> <hbox> <button label="read mail"/> <button label="new message"/> </hbox> </vbox> </hbox> </panel> <description value="6 new messages" popup="thepanel"/> attributes backdrag type: boolean
setting the backdrag attribute on a xul panel lets the user move the panel by clicking and dragging anywhere on its background area.
... close type: boolean if the panel has a titlebar,
set the panel's close attribute to true to have a close button appear on the titlebar.
...if it is not
set, it defaults to the platform behavior.
...And 17 more matches
Introducing a complete toolchain - Learn web development
we'll go all the way from
setting up a sensible development environment and putting transformation tools in place to actually deploying your app on netlify.
... in this article we'll introduce the case study,
set up our development environment, and
set up our code transformation tools.
... tools used in our toolchain in this article we're going to use the following tools and features: jsx, a react-related
set of syntax extensions that allow you to do things like defining component structures inside javascript.
...And 17 more matches
NSS tools : modutil
modutil can add and delete pkcs #11 modules, change passwords on security databases,
set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
... o with the -changepw command, the password on the nss internal module cannot be
set or changed, since this password is stored in the key database.
... usage and examples creating database files before any operations can be performed, there must be a
set of security databases available.
...And 17 more matches
NSS tools : modutil
modutil can add and delete pkcs #11 modules, change passwords on security databases,
set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
... o with the -changepw command, the password on the nss internal module cannot be
set or changed, since this password is stored in the key database.
... usage and examples creating database files before any operations can be performed, there must be a
set of security databases available.
...And 17 more matches
Introduction to the JavaScript shell
after following the build documentation and installing the built shell using make install, you can run the shell in interactive mode using the command: js [ if you get " symbol lookup error: ./js: undefined symbol: pr_
setcurrentthreadname" e.g.
... environment options there are some environment variables that can be
set to alter js shell behavior.
... if value is specified, it must be convertable to a positive uint32; gcparam()
sets gc parameter name to value.
...And 17 more matches
nsITextInputProcessor
next, you can
set the composition string or dispatch keyboard events.
... the following example
sets "foo-bar-buzz", "bar" is selected clause to convert, and caret position is the end of the selected clause: // first,
sets composition string.
... tip.
setpendingcompositionstring("foo-bar-buzz"); // next, append clauses.
...And 17 more matches
Index - Firefox Developer Tools
found 158 pages: # page tags and summary 1 firefox developer tools developing mozilla, guide, tools, web development, web development:tools, l10n:priority firefox developer tools is a
set of web developer tools built into firefox.
...the referent’s properties do not appear directly as properties of the debugger.object instance; the debugger can access them only through methods like debugger.object.prototype.getownpropertydescriptor and debugger.object.prototype.defineproperty, ensuring that the debugger will not inadvertently invoke the referent’s getters and
setters.
... 25 tutorial:
set a breakpoint this page shows how you can try out the debugger api yourself using firefox’s scratchpad.
...And 17 more matches
BluetoothCharacteristicProperties - Web APIs
full support 56notes disabled notes linux and versions of windows earlier than 10.disabled from version 56: this feature is behind the #enable-experimental-web-platform-features preference (needs to be
set to enabled).
... full support ≤79notes disabled notes linux and versions of windows earlier than 10.disabled from version ≤79: this feature is behind the #enable-experimental-web-platform-features preference (needs to be
set to enabled).
... full support 56notes disabled notes linux and versions of windows earlier than 10.disabled from version 56: this feature is behind the #enable-experimental-web-platform-features preference (needs to be
set to enabled).
...And 17 more matches
Window - Web APIs
window.location gets/
sets the location, or current url, of the window object.
... window.name gets/
sets the name of the window.
... window.pagexoff
set read only an alias for window.scrollx.
...And 17 more matches
@font-feature-values - CSS: Cascading Style Sheets
@style
set specifies a feature name that will work with the style
set() functional notation of font-variant-alternates.
... a styl
set feature value definition allows an unlimited number of values: ident1: 2 4 12 1 maps to the opentype values ss02, ss04, ss12, and ss01.
... formal syntax @font-feature-values <family-name># { <feature-value-block-list> }where <family-name> = <string> | <custom-ident>+<feature-value-block-list> = <feature-value-block>+where <feature-value-block> = <feature-type> '{' <feature-value-declaration-list> '}'where <feature-type> = @stylistic | @historical-forms | @style
set | @character-variant | @swash | @ornaments | @annotation<feature-value-declaration-list> = <feature-value-declaration>where <feature-value-declaration> = <custom-ident>: <integer>+; examples using @style
set in a @font-feature-values rule /* at-rule for "nice-style" in font one */ @font-feature-values font one { @style
set { nice-style: 12; } } /* at-rule for "nice-style" in font two */...
...And 17 more matches
Basic concepts of flexbox - CSS: Cascading Style Sheets
everything we do with flexbox refers back to these axes, so it is worth understanding how they work from the out
set.
... the cross axis the cross axis runs perpendicular to the main axis, therefore if your flex-direction (main axis) is
set to row or row-reverse the cross axis runs down the columns.
...to create a flex container, we
set the value of the area's container's display property to flex or inline-flex.
...And 17 more matches
OpenType font features guide - CSS: Cascading Style Sheets
these are all referred to as opentype features, and are made available to use on the web via specific properties and a low-level control property — font-feature-
settings.
... in addition to broad feature
sets like ligatures or lining figures (numerals that line up evenly as opposed to 'oldstyle', which look more like lower-case letters), there are also very specific ones such as stylistic
sets (which might include several specific variants of glyphs meant to be used together), alternates (which might be one or more variants of the letter 'a'), or even language-specific alterations for east asian languages.
...they are all defined and shown here, but many will only work using the lower-level font-feature-
settings property.
...And 17 more matches
box-shadow - CSS: Cascading Style Sheets
you can
set multiple effects separated by commas.
... a box shadow is described by x and y off
sets relative to the element, blur and spread radius, and color.
... syntax /* keyword values */ box-shadow: none; /* off
set-x | off
set-y | color */ box-shadow: 60px -16px teal; /* off
set-x | off
set-y | blur-radius | color */ box-shadow: 10px 5px 5px black; /* off
set-x | off
set-y | blur-radius | spread-radius | color */ box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2); /* in
set | off
set-x | off
set-y | color */ box-shadow: in
set 5em 1em gold; /* any number of shadows, separated by commas */ box-shadow: 3px 3px red, -1...
...And 17 more matches
HTML documentation index - HTML: Hypertext Markup Language
36 html attribute reference attribute, attributes, beginner, configuring, element attributes, elements, html, reference,
settings, web elements in html have attributes; these are additional values that configure the elements or adjust their behavior in various ways to meet the criteria the users want.
...depending on the element, the attribute can be a cors
settings attribute.
... 44 html attribute: multiple attribute, attributes, constraint validation the boolean multiple attribute, if
set, means the form control accepts one or more values.
...And 17 more matches
Promise - JavaScript
note: a promise is said to be
settled if it is either fulfilled or rejected, but not pending.
... you will also hear the term resolved used with promises — this means that the promise is
settled or “locked in” to match the state of another promise.
... chained promises the methods promise.then(), promise.catch(), and promise.finally() are used to associate further action with a promise that becomes
settled.
...And 17 more matches
Repackaging Firefox - Archive of obsolete content
using an extension makes it far easier to keep track of your changes easily when the time comes to upgrade to new versions of firefox, and also ensures, when
set-up correctly, that users are able to safely receive firefox updates from mozilla.
... if you already have an extension that you want to bundle with firefox, and don't want to bundle an extra extension solely to
set a few defaults, you can do everything you need to do in your existing extension.
... however, it's still recommended that you look through this tutorial, as it contains tips specific for creating extensions of this type, and there are a few options that you will need to
set to ensure a smooth upgrade path for users.
...And 16 more matches
MenuItems - Archive of obsolete content
<key
set> <key id="open-key" modifiers="accel" key="o"/> <key id="close-key" modifiers="accel" key="c"/> </key
set> <menubar> <menu label="view"> <menupopup> <menuitem label="open" key="open-key"/> <menuitem label="close" key="close-key"/> </menupopup> </menu> </menubar> the two menuitems are associated with a key using the key attribute.
... it should be
set to the id of a key element within the same document.
... although there isn't usually a need to do so, you can also
set a custom label for the keyboard shortcut on the menu using the acceltext attribute.
...And 16 more matches
Fundamental CSS comprehension - Learn web development
grab the css resources text file — this contains a
set of raw selectors and rule
sets that you'll need to study and combine to answer part of this assessment.
... basic
setup: first of all, create a new file in the same directory as your html and image files.
... the first two rule
sets in the css resource file are yours, for free!
...And 16 more matches
CSS values and units - Learn web development
previous overview: building blocks next every property used in css has a value or
set of values that are allowed for that property, and taking a look at any property page on mdn will help you understand the values that are valid for any particular property.
... in the following example we have
set the color of our heading using a keyword, and the background using the rgb() function: h1 { color: black; background-color: rgb(197,93,161); } a value in css is a way to define a collection of allowable sub-values.
...the first box has a width
set in pixels.
...And 16 more matches
Legacy layout methods - Learn web development
you imagine your layout as a
set number of columns (e.g.
...first, of all, apply the following to your html to provide some basic
setup: body { width: 90%; max-width: 900px; margin: 0 auto; } the body will be 90% of the viewport wide until it gets to 900px wide, in which case it will stay fixed at this width and center itself in the viewport.
...if we want the two <div>s to be floated alongside one another, we need to
set their widths to total 100% of the width of their parent element or smaller so they can fit alongside one another.
...And 16 more matches
Styling links - Learn web development
styling some links now we've looked at the default states in some detail, let's look at a typical
set of link styles.
... to start off with, we'll write out our empty rule
sets: a { } a:link { } a:visited { } a:focus { } a:hover { } a:active { } this order is important because the link styles build on one another, for example the styles in the first rule will apply to all the subsequent ones, and when a link is being activated, it is also being hovered over.
... next, we use the a:link and a:visited selectors to
set a couple of color variations on unvisited and visited links, so they are distinct.
...And 16 more matches
Graceful asynchronous programming with Promises - Learn web development
this is useful for
setting up a sequence of async operations to work correctly.
... the code that the video chat application would use might look something like this: function handlecallbutton(evt) {
setstatusmessage("calling..."); navigator.mediadevices.getusermedia({video: true, audio: true}) .then(chatstream => { selfviewelem.srcobject = chatstream; chatstream.gettracks().foreach(track => mypeerconnection.addtrack(track, chatstream));
setstatusmessage("connected"); }).catch(err => {
setstatusmessage("failed to connect"); }); } this function starts by usi...
...ng a function called
setstatusmessage() to update a status display with the message "calling...", indicating that a call is being attempted.
...And 16 more matches
Making decisions in your code — conditionals - Learn web development
a
set of curly braces, inside which we have some code — this can be any code we like, and it only runs if the condition returns true.
... another
set of curly braces, inside which we have some more code — this can be any code we like, and it only runs if the condition is not true — or in other words, the condition is false.
...it'd be up to us to provide a mechanism for the parent to
set the shoppingdone variable to true if the child did the shopping.
...And 16 more matches
React interactivity: Events and state - Learn web development
it should end up looking something like this: function handlesubmit(e) { e.preventdefault(); alert('hello, world!'); } to use this function, add an onsubmit attribute to the <form> element, and
set its value to the handlesubmit function: <form onsubmit={handlesubmit}> now if you head back to your browser and click on the "add" button, your browser will show you an alert dialog with the words "hello, world!" — or whatever you chose to write there.
... write the following above your handlesubmit() function, inside form(): const [name,
setname] = usestate('use hooks!'); what's going on in this line of code?
... we are
setting the initial name value as "use hooks!".
...And 16 more matches
NSS functions
function name/documentation source code nss versions nss_getclientauthdata mxr 3.2 and later nss_
setdomesticpolicy mxr 3.2 and later nss_
setexportpolicy mxr 3.2 and later nss_
setfrancepolicy mxr 3.2 and later nssssl_versioncheck mxr 3.2.1 and later ssl_authcertificate mxr 3.2 and later ssl_authcertificatehook mxr 3.2 and later ssl_badcerthook mxr 3.2 and later ssl_certdbhandle
set mxr 3.
...2 and later ssl_canbypass mxr 3.11.7 and later ssl_cipherpolicyget mxr 3.2 and later ssl_cipherpolicy
set mxr 3.2 and later ssl_cipherprefget mxr 3.2 and later ssl_cipherprefgetdefault mxr 3.2 and later ssl_cipherpref
set mxr 3.2 and later ssl_cipherpref
setdefault mxr 3.2 and later ssl_clearsessioncache mxr 3.2 and later ssl_configmpserversidcache mxr 3.2 and later ssl_configsecureserver mxr 3.2 and later ssl_configserversessionidcache mxr 3.2 and later ssl_datapending mxr 3.2 and later ssl_forcehandshake mxr 3.2 and later ssl_forcehandshakewithtimeout mxr 3.11.4 and later ssl_ge...
...nd later ssl_handshakecallback mxr 3.2 and later ssl_importfd mxr 3.2 and later ssl_inheritmpserversidcache mxr 3.2 and later ssl_invalidatesession mxr 3.2 and later ssl_localcertificate mxr 3.4 and later ssl_optionget mxr 3.2 and later ssl_optiongetdefault mxr 3.2 and later ssl_option
set mxr 3.2 and later ssl_option
setdefault mxr 3.2 and later ssl_peercertificate mxr 3.2 and later ssl_preencryptedfiletostream mxr 3.2 and later ssl_preencryptedstreamtofile mxr 3.2 and later ssl_rehandshake mxr 3.2 and later ssl_rehandshakewithtimeout mxr 3.11.4 and later ssl_re
sethandshake m...
...And 16 more matches
JSAPI Cookbook
lean"; var isobject = typeof v === "object" && v !== null; /* jsapi */ js::rootedvalue v(cx, computesomevalue()); bool isstring = v.isstring(); bool isnumber = v.isnumber(); bool isint32 = v.isint32(); // note: internal representation, not numeric value bool isnull = v.isnull(); bool isboolean = v.isboolean(); bool isobject = v.isobject(); // note: not broken like typeof === "object" is :-) to
set a value use a correspondingly named member mutator function, or assign the result of the correspondingly named standalone function: // javascript var v; v = 0; v = 0.5; v = somestring; v = null; v = undefined; v = false; /* jsapi */ js::rootedvalue v(cx); js::rootedstring somestring(cx, ...); v.
setint32(0); // or: v = js::int32value(0); v.
setdouble(0.5); // or: v = js::double...
...value(0.5); v.
setstring(somestring); // or: v = js::stringvalue(somestring); v.
setnull(); // or: v = js::nullvalue(); v.
setundefined(); // or: v = js::undefinedvalue(); v.
setboolean(false); // or: v = js::booleanvalue(false); finding the global object many of these recipes require finding the current global object first.
...} defining a function // javascript function justforfun() { return null; } /* jsapi */ bool justforfun(jscontext *cx, unsigned argc, js::value *vp) { js::callargs args = js::callargsfromvp(argc, vp); args.rval().
setnull(); return true; } ...
...And 16 more matches
IAccessibleEditableText
the substrings used with this interface are specified as follows: if startoff
set is less than endoff
set, the substring starts with the character at startoff
set and ends with the character just before endoff
set.
... if endoff
set is lower than startoff
set, the result is the same as a call with the two arguments exchanged.
...refer to the @ref _specialoff
sets "special off
sets for use in the iaccessibletext and iaccessibleeditabletext methods" for information about a special off
set constant that can be used in iaccessibleeditabletext methods.
...And 16 more matches
Storage
re
set the statement.
... binding one
set of parameters if you only have one row to insert, or are using the synchronous api you'll need to use this method.
... binding multiple
sets of parameters starting in gecko 1.9.2 (firefox 3.6), there's a new, more convenient way to bind multiple
sets of parameters at once prior to executing your statement asynchronously.
...And 16 more matches
BluetoothRemoteGATTDescriptor - Web APIs
bluetoothremotegattdescriptor.writevalue()
sets the value property to the bytes contained in an arraybuffer and returns a promise.
... full support 57notes disabled notes linux and versions of windows earlier than 10.disabled from version 57: this feature is behind the #enable-experimental-web-platform-features preference (needs to be
set to enabled).
... full support ≤79notes disabled notes linux and versions of windows earlier than 10.disabled from version ≤79: this feature is behind the #enable-experimental-web-platform-features preference (needs to be
set to enabled).
...And 16 more matches
HTMLMediaElement - Web APIs
htmlmediaelement.controlslist read only returns a domtokenlist that helps the user agent select what controls to show on the media element whenever the user agent shows its own
set of controls.
... htmlmediaelement.crossorigin a domstring indicating the cors
setting for this media element.
...
setting this value seeks the media to the new time.
...And 16 more matches
Geometry and reference spaces in WebXR - Web APIs
however, in order to provide the ability to present scenes in true 3d using xr head
sets and other such equipment, webxr has additional concepts that must be understood.
...like an architect or a
set designer, you have the power to create moods and experiences through a physical environment.
... the directionality of the coordinate system can be seen in the following diagram: an xrrigidtransform called the origin off
set is used to transform points from the space's own effective coordinate system to the xr device's native coordinate system.
...And 16 more matches
Web audio spatialization basics - Web APIs
this is done by
setting the different properties of the pannernode object instance in relation to that movement, to emulate spacialization.
... let's create our context and listener and
set the listener's position to emulate a person looking into our room: const audiocontext = window.audiocontext || window.webkitaudiocontext; const audioctx = new audiocontext(); const listener = audioctx.listener; const posx = window.innerwidth/2; const posy = window.innerheight/2; const posz = 300; listener.positionx.value = posx; listener.positiony.value = posy; listener.positionz.value = posz-...
...here we are
setting the listener to be in the middle of the viewport and slightly in front of our boombox.
...And 16 more matches
background-position - CSS: Cascading Style Sheets
the background-position css property
sets the initial position for each background image.
... the position is relative to the position layer
set by background-origin.
...ax /* keyword values */ background-position: top; background-position: bottom; background-position: left; background-position: right; background-position: center; /* <percentage> values */ background-position: 25% 75%; /* <length> values */ background-position: 0 0; background-position: 1cm 2cm; background-position: 10ch 8em; /* multiple images */ background-position: 0 0, center; /* edge off
sets values */ background-position: bottom 10px right 20px; background-position: right 3em bottom 10px; background-position: bottom 10px right; background-position: top right 10px; /* global values */ background-position: inherit; background-position: initial; background-position: un
set; the background-position property is specified as one or more <position> values, separated by commas.
...And 16 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
use both width and height to
set the intrinsic size of the image, allowing it to take up space before it loads, to mitigate content layout shifts.
... responsive image hints with sizes and src
set (see also the <picture> element and our responsive images tutorial).
... image loading errors if an error occurs while loading or rendering an image, and an onerror event handler has been
set on the error event, that event handler will get called.
...And 16 more matches
Object.defineProperty() - JavaScript
an accessor descriptor is a property described by a getter-
setter pair of functions.
...when the property is accessed, this function is called without arguments and with this
set to the object through which the property is accessed (this may not be the object on which the property is defined due to inheritance).
...
set a function which serves as a
setter for the property, or undefined if there is no
setter.
...And 16 more matches
Introduction to using XPath in JavaScript - XPath
document.evaluate this method evaluates xpath expressions against an xml based document (including html documents), and returns a xpathresult object, which can be a single node or a
set of nodes.
... specifying the return type the returned variable xpathresult from document.evaluate can either be composed of individual nodes (simple types), or a collection of nodes (node-
set types).
... node-
set types the xpathresult object allows node-
sets to be returned in 3 principal different types: iterators snapshots first nodes iterators when the specified result type in the resulttype parameter is either: unordered_node_iterator_type ordered_node_iterator_type the xpathresult object returned is a node-
set of matched nodes which will behave as an iterator, allowing us to access the ...
...And 16 more matches
Focus and Selection - Archive of obsolete content
this attribute should be
set to a number.
...that means that you can order the elements by
setting indices on elements in sequence.
... usually, however, you would not
set the tabindex attribute.
...And 15 more matches
browser - Archive of obsolete content
attributes autocompleteenabled, autocompletepopup, autoscroll, disablehistory, disableglobalhistory, disablesecurity, droppedlinkhandler, homepage, showcaret, src, type properties accessibletype, cangoback, cangoforward, contentdocument, contentprincipal, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentchar
setinfo, homepage, markupdocumentviewer, messagemanager, preferences, securityui, sessionhistory, webbrowserfind, webnavigation, webprogress methods addprogresslistener, goback, goforward, gohome, gotoindex, loaduri, loaduriwithflags, reload, reloadwithflags, removeprogresslistener, stop, swapdocshells examples <!-- shows mozilla homepage inside a groupbox --> <groupbox flex="1"> <caption...
... label="mozilla homepage"/> <browser type="content" src="http://www.mozilla.org" flex="1"/> </groupbox> attributes autocompleteenabled type: boolean
set to true to enable autocomplete of fields.
... autoscroll type: boolean
set to false to disable autoscroll for this browser.
...And 15 more matches
datepicker - Archive of obsolete content
there are several ways to
set the selected day.
... in xul, the value attribute may be
set to a value of the form yyyy-mm-dd to initialize the datepicker to a certain date.
... to change the selected date, the value property may be used to
set a new value in the form yyyy-mm-dd.
...And 15 more matches
menu - Archive of obsolete content
if this value is
set, it overrides an assigned key
set in the key attribute.
... accesskey type: character this should be
set to a character that is used as a shortcut key.
... depending on the platform and theme being used, some elements will have
set a maximum width so they will always appear cropped.
...And 15 more matches
radio - Archive of obsolete content
ties accesskey, accessibletype, control, crop, disabled, image, label, radiogroup, selected, tabindex, value examples <radiogroup> <radio id="orange" label="red" accesskey="r"/> <radio id="violet" label="green" accesskey="g" selected="true"/> <radio id="yellow" label="blue" accesskey="b" disabled="true"/> </radiogroup> attributes accesskey type: character this should be
set to a character that is used as a shortcut key.
... command type: id
set to the id of a command element that is being observed by the element.
... depending on the platform and theme being used, some elements will have
set a maximum width so they will always appear cropped.
...And 15 more matches
tabs - Archive of obsolete content
attributes closebutton, disableclose, disabled, onclo
setab, onnewtab, onselect,
setfocus, selectedindex, tabbox, tabindex, tooltiptextnew, value, properties accessibletype, disabled, itemcount, selectedindex, selecteditem, tabindex, value, methods advanceselectedtab, appenditem, getindexofitem, getitematindex, insertitemat, removeitemat examples (example needed) attributes closebutton obsolete since gecko 1.9.2 type: bo...
...olean if this attribute is
set to true, the tabs row will have a "new tab" button and "close" button on the ends.
...you can
set an image to the "new tab" and "close" buttons by applying them to the tabs-newbutton and tabs-closebutton classes respectively.
...And 15 more matches
The box model - Learn web development
if we
set display: flex; on an element, the outer display type is block, but the inner display type is changed to flex.
... any direct children of this box will become flex items and will be laid out according to the rules
set out in the flexbox spec, which you'll learn about later on.
...these elements would normally be inline, however, one of the elements has a class of block, and we have
set it to display: block.
...And 15 more matches
Client-side form validation - Learn web development
this is called client-side form validation, and helps ensure data submitted matches the requirements
set forth in the various form controls.
...when you enter data, the browser and/or the web server will check to see that the data is in the correct format and within the constraints
set by the application.
... minlength and maxlength: specifies the minimum and maximum length of textual data (strings) min and max: specifies the minimum and maximum values of numerical input types type: specifies whether the data needs to be a number, an email address, or some other specific pre
set type.
...And 15 more matches
Introduction to events - Learn web development
in the case of the web, events are fired inside the browser window, and tend to be attached to a specific item that resides in it — this might be a single element,
set of elements, the html document loaded in the current tab, or the entire browser window.
...we are listening for the click event firing, by
setting the onclick event handler property to equal an anonymous function containing code that generates a random rgb color and
sets the <body> background-color equal to it.
...btn.textcontent, or btn.style), but it is a special type — when you
set it to be equal to some code, that code is run when the event fires on the button.
...And 15 more matches
Debugging on Mac OS X
macos 10.15 went further, requiring applications to be notarized with hardened runtime enabled in order to launch (ignoring workarounds.) when run on earlier macos versions, notarization and hardened runtime
settings have no effect.
...to work around that, the steps below have you initialize the project outside the mozilla source tree, close the project, copy the .xcodeproj project "file" into the source tree, and then reopen the project to finish
setting it up.
...after you click ok, xcode should open the
settings window for the new scheme.
...And 15 more matches
JS::CompileOptions
callers should
set this flag for cross-origin scripts, and it will be propagated appropriately to child scripts and passed back in jserrorreports.
... bool
setfile(jscontext *cx, const char *f) duplicate null-terminated string f for filename().
... bool
setfileandline(jscontext *cx, const char *f, unsigned l) duplicate null-terminated string f for filename() and
set lineno property.
...And 15 more matches
NS_ConvertASCIItoUTF16
class declaration method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assi...
...gn assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsautostring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 15 more matches
NS_ConvertUTF8toUTF16
class declaration method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assi...
...gn assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsautostring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 15 more matches
nsAdoptingString
method overview constructors operator= operator const prunichar* operator[] get find rfind rfindchar findcharin
set rfindcharin
set equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid ...
...s equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsxpidlstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 15 more matches
nsAutoString
names: nsautostring for wide characters nscautostring for narrow characters method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid ...
...s equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsfixedstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 15 more matches
nsDependentString
method overview constructors assertvalid rebind operator= get find rfind rfindchar findcharin
set rfindcharin
set equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid ...
...s equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 15 more matches
nsFixedString
class declaration method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assi...
...gn assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 15 more matches
nsPromiseFlatString
class declaration method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assi...
...gn assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 15 more matches
nsString
method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid ...
...s equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsastring_internal data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 15 more matches
nsXPIDLString
names: nsxpidlstring for wide characters nsxpidlcstring for narrow characters method overview constructors operator const prunichar* operator[] operator= get find rfind rfindchar findcharin
set rfindcharin
set equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid ...
...s equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 15 more matches
nsICacheEntryDescriptor
inherits from: nsicacheentryinfo last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void close(); void doom(); void doomandfailpendingrequests(in nsresult status); string getmetadataelement(in string key); void markvalid(); nsiinputstream openinputstream(in unsigned long off
set); nsioutputstream openoutputstream(in unsigned long off
set); void
setdatasize(in unsigned long size); void
setexpirationtime(in pruint32 expirationtime); void
setmetadataelement(in string key, in string value); void visitmetadata(in nsicachemetadatavisitor visitor); attributes attribute type description accessgranted nscacheaccessmode get the access granted to this descriptor.
... cacheelement nsisupports get or
set the cache data element.
... securityinfo nsisupports get or
set security info on the cache entry for this descriptor.
...And 15 more matches
Debugger - Firefox Developer Tools
it is an accessor property with a getter and
setter: assigning to it enables or disables this debugger instance; reading it produces true if the instance is enabled, or false otherwise.
...
setting this to false inhibits the ahead-of-time asm.js compiler and forces asm.js code to run as normal javascript.
... this is an accessor property with a getter and
setter.
...And 15 more matches
Element - Web APIs
when used as a
setter, replaces the element with nodes parsed from the given string.
...
set using the part attribute), returned as a domtokenlist.
... element.scrollleft is a number representing the left scroll off
set of the element.
...And 15 more matches
Using the Web Animations API - Web APIs
and unlike pure, declarative css, javascript also lets us dynamically
set values from properties to durations.
... the css version here’s a tumbling animation written in css showing alice falling down the rabbit hole that leads to wonderland (see the full code on codepen): notice that the background moves, alice spins, and her color changes at an off
set from her spinning.
... representing keyframes the first thing we need is to create a keyframe object corresponding to our css @keyframes block: var alicetumbling = [ { transform: 'rotate(0) translate3d(-50%, -50%, 0)', color: '#000' }, { color: '#431236', off
set: 0.3}, { transform: 'rotate(360deg) translate3d(-50%, -50%, 0)', color: '#000' } ]; here we’re using an array containing multiple objects.
...And 15 more matches
Getting started with HTML - Learn web development
if you make a mistake, you can clear your work using the re
set button.
...</textarea> <div class="controls"> <input id="re
set" type="button" value="re
set" /> <input id="solution" type="button" value="show solution" /> </div> html { font-family: 'open sans light',helvetica,arial,sans-serif; } h2 { font-size: 16px; } .a11y-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } var textarea = document.getelementbyid('code'); var re
set = do...
...cument.getelementbyid('re
set'); var solution = document.getelementbyid('solution'); var output = document.queryselector('.output'); var code = textarea.value; var userentry = textarea.value; function updatecode() { output.innerhtml = textarea.value; } re
set.addeventlistener('click', function() { textarea.value = code; userentry = textarea.value; solutionentry = htmlsolution; solution.value = 'show solution'; updatecode(); }); solution.addeventlistener('click', function() { if(solution.value === 'show solution') { textarea.value = solutionentry; solution.value = 'hide solution'; } else { textarea.value = userentry; solution.value = 'show solution'; } updatecode(); }); var htmlsolution = '<em>this is my text.</em>'; var solutionentry = htmlsolution; text...
...And 14 more matches
Inheritance in JavaScript - Learn web development
= 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.
...
setting teacher()'s prototype and constructor reference all is good so far, but we have a problem.
...after adding the last line, teacher.prototype's constructor property is now equal to person(), because we just
set teacher.prototype to reference an object that inherits its properties from person.prototype!
...And 14 more matches
React interactivity: Editing, filtering, conditional rendering - Learn web development
add the edittask() function inside your app component, in the same place as the other functions: function edittask(id, newname) { const editedtasklist = tasks.map(task => { // if this task has the same id as the edited task if (id === task.id) { // return {...task, name: newname} } return task; });
settasks(editedtasklist); } pass edittask into our <todo /> components as a prop in the same way we did with deletetask: const tasklist = tasks.map(task => ( <todo id={task.id} name={task.name} completed={task.completed} key={task.id} toggletaskcompleted={toggletaskcompleted} deletetask={deletetask} edittask={edittask} /> )); now open todo.js.
...first, import usestate into the todo component like we did before with the app component, by updating the first import statement to this: import react, { usestate } from "react"; we'll now use this to
set an isediting state, the default state of which should be false.
... add the following line just inside the top of your todo(props) { … } component definition: const [isediting,
setediting] = usestate(false); next, we're going to rethink the <todo /> component — from now on, we want it to display one of two possible “templates", rather than the single template it's used so far: the "view" template, when we are just viewing a todo; this is what we’ve used in rest of the tutorial so far.
...And 14 more matches
Embedding API for Accessibility
text zoom on a per-window basis the nsidomwindow::gettextzoom(float *zoomfactor) and nsidomwindow::
settextzoom(float zoomfactor) methods can be used to
set a wide range of text zoom factors on a content window.
...for double-sized text, use nsidomwindow::
settextzoom(2.0); using accessibility preferences there are a number of prefs related to accessibility.
...be aware that in debug builds, this can cause a great number of assertions (bug 71598) to use prefs in embedding, use something like the following code: #include "nsipref.h"; nsresult rv; nscomptr<nsipref> prefs(do_getservice(ns_pref_contractid, &rv)); prefs->
setboolpref("bool.pref.name", pr_true /* or pr_false */); prefs->
setintpref("int.pref.name", newvalue); prefs->
setcharpref("string.pref.name", newcharstarvalue); to manually add a pref to your
settings, add a line like the following to your prefs.js: user_pref("accessibility.browsewithcaret", true); accessibility prefs reference the following is a description of what accessibility prefs giv...
...And 14 more matches
Multiple Firefox profiles
a profile in firefox is the collection of
settings, customizations, add-ons, and other personalizations that a user has made or installed into their copy of firefox.
...having different profiles would help separate work and personal life, or allow each family member to have his or her own
set of bookmarks,
settings, and add-ons.
...it takes little time to
set up a new profile, and once it is complete, all of your firefox versions will update separately and can be run simultaneously.
...And 14 more matches
Exact Stack Rooting
storing a gcpointer in a gcthing storing your gcpointer inside of a gcthing that is already in the live
set is the easiest way to keep a gcthing to the live
set.
... gcpointers that reside in gcthings fall into one of these cases: storage in a normal property, storage in a reserved slot, or storage with js_{get|
set}private.
... do not use js_
setprivate.
...And 14 more matches
JIT Optimization Strategies
optimization information is currently collected for the following operations: getproperty (obj.prop)
setproperty (obj.prop = val) getelement (obj[elemname])
setelement (obj[elemname] = val) call (func(...)) at each operation site, ionmonkey tries a battery of strategies, from the most optimized but most restrictive to the least optimized but least restrictive.
...
setproperty
setprop_common
setter optimizes access to properties which are implemented by a
setter function, where the
setter is shared between multiple types.
... this optimization applies most often when the property access site is polymorphic, but all the object types are derived variants of a single base class, where the property access refers to a
setter on the base class.
...And 14 more matches
JSPropertyOp
jspropertyop and jsstrictpropertyop are the type of property getter and
setter callbacks in the jsapi.
... they are also the types of the jsclass.addproperty, getproperty, and
setproperty callbacks, which are called during object property accesses.
...a jspropertyop may be installed on an individual property as a getter or
setter; or it may be installed on a jsclass to hook property gets,
sets, or adds.
...And 14 more matches
TPS Tests
the python test runner will read a test file (in javascript format),
setup one or more firefox profiles with the necessary extensions and preferences, then launch firefox and pass the test file to the extension.
... the extension will read the test file and perform a series of actions specified therein, such as populating a
set of bookmarks, syncing to the sync server, making bookmark modifications, etc.
... a test file may contain an arbitrary number of sections, each involving the same or different profiles, so that one test file may be used to test the effect of syncing and modifying a common
set of data (from a single sync account) over a series of different events and clients.
...And 14 more matches
NS_ConvertUTF16toUTF8
class declaration a helper class that converts a utf-16 string to utf-8 method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set compare equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercas...
...eequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nscautostring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 14 more matches
NS_LossyConvertUTF16toASCII
class declaration a helper class that converts a utf-16 string to ascii in a lossy manner method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set compare equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequals...
...ascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nscautostring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 14 more matches
nsAdoptingCString
method overview constructors operator= operator const char* operator[] get find rfind rfindchar findcharin
set rfindcharin
set compare equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty ...
...s equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsxpidlcstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 14 more matches
nsCAutoString
names: nsautostring for wide characters nscautostring for narrow characters method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set compare equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat ...
...ualsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsfixedcstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 14 more matches
nsCString
method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set compare equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty ...
...s equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsacstring_internal data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 14 more matches
nsDependentCString
method overview constructors assertvalid rebind operator= get find rfind rfindchar findcharin
set rfindcharin
set compare equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty ...
...s equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nscstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 14 more matches
nsFixedCString
class declaration method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set compare equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(c...
...har assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nscstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 14 more matches
nsPromiseFlatCString
class declaration method overview constructors operator= get find rfind rfindchar findcharin
set rfindcharin
set compare equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(c...
...har assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nscstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 14 more matches
nsXPIDLCString
names: nsxpidlstring for wide characters nsxpidlcstring for narrow characters method overview constructors operator const char* operator[] operator= get find rfind rfindchar findcharin
set rfindcharin
set compare equalsignorecase tofloat tointeger mid left right
setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty ...
...s equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nscstring data members no public members.
... @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param aoff
set tells us where in this string to start searching @param acount tells us how far from the off
set we are to search.
...And 14 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.
... method overview void asyncopen(in nsistreamlistener alistener, in nsisupports acontext); nsiinputstream open(); attributes attribute type description contentchar
set acstring the character
set of the channel's content if available and if applicable.
...
setting contentchar
set before the channel has been opened provides a hint to the channel on what the char
set should be.
...And 14 more matches
nsICompositionStringSynthesizer
stringsynthesizer = domwindowutils.createcompositionstringsynthesizer(); for example, when you create a composition whose composing string is "foo-bar-buzz" and "bar" is selected to convert, then, first, you need to start composition: domwindowutils.sendcompositionevent("compositionstart", "", ""); next, dispatch composition string with crause information and caret information (optional): //
set new composition string with .
setstring().
... compositionstringsynthesizer.
setstring("foo-bar-buzz"); //
set clause information with .appendclause().
... compositionstringsynthesizer.appendclause("foo-".length, compositionstringsynthesizer.attr_convertedtext); compositionstringsynthesizer.appendclause("bar".length, compositionstringsynthesizer.attr_selectedconvertedtext); compositionstringsynthesizer.appendclause("-buzz".length, compositionstringsynthesizer.attr_convertedtext); //
set caret position in the composition string.
...And 14 more matches
nsISelection
as a service: var selection = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsiselection); method overview void addrange(in nsidomrange range); void collapse(in nsidomnode parentnode, in long off
set); [noscript,notxpcom,nostdcall] boolean collapsed(); void collapsenative(in nsidomnode parentnode, in long off
set); native code only!
... void collap
setoend(); void collap
setostart(); boolean containsnode(in nsidomnode node, in boolean partlycontained); void deletefromdocument(); void extend(in nsidomnode parentnode, in long off
set); void extendnative(in nsidomnode parentnode, in long off
set); native code only!
... anchoroff
set long the off
set within the (text) node where the selection begins.
...And 14 more matches
Intersection Observer API - Web APIs
this
set of values serves to grow or shrink each side of the root element's bounding box before computing intersections.
... targeting an element to be observed once you have created the observer, you need to give it a target element to watch: let target = document.queryselector('#listitem'); observer.observe(target); // the callback we
setup for the observer will be executed now for the first time // it waits until we assign a target to our observer (even if the target is currently not visible) whenever the target meets a threshold specified for the intersectionobserver, the callback is invoked.
... the root intersection rectangle can be adjusted further by
setting the root margin, rootmargin, when creating the intersectionobserver.
...And 14 more matches
A simple RTCDataChannel sample - Web APIs
starting up when the script is run, we
set up an load event listener, so that once the page is fully loaded, our startup() function is called.
... function startup() { connectbutton = document.getelementbyid('connectbutton'); disconnectbutton = document.getelementbyid('disconnectbutton'); sendbutton = document.getelementbyid('sendbutton'); messageinputbox = document.getelementbyid('message'); receivebox = document.getelementbyid('receivebox'); //
set event listeners for user interface widgets connectbutton.addeventlistener('click', connectpeers, false); disconnectbutton.addeventlistener('click', disconnectpeers, false); sendbutton.addeventlistener('click', sendmessage, false); } this is quite straightforward.
... we grab references to all the page elements we'll need to access, then
set event listeners on the three buttons.
...And 14 more matches
Using DTMF with WebRTC - Web APIs
when the tone buffer is empty, indicating that all the tones have been sent, a tonechange event with its tone property
set to "" (an empty string) is delivered to the connection object.
...this will be obtained while
setting up the connection, in the gotstream() function shown in adding the audio to the connection.
...they'll get
set up when the page is first loaded.
...And 14 more matches
Inputs and input sources - Web APIs
by combining these two types of input with the changing of viewing position and/or orientation through the head
set or other mechanisms, you can create an interactive simulated environment.
... properties of input sources each individual xrinputsource has a
set of properties that describe the input's available axes and buttons, which hand the user's holding it in, and how the input source is used to handle targeting within the 3d space.
...it can also be
set to none if the controller isn't hand-held, or if it's unknown which hand the controller is in.
...And 14 more matches
Using CSS transitions - CSS: Cascading Style Sheets
css transitions let you decide which properties to animate (by listing them explicitly), when the animation will start (by
setting a delay), how long the transition will last (by
setting a duration), and how the transition will run (by defining a timing function, e.g.
...as it doesn't make sense to animate some properties, the list of animatable properties is limited to a finite
set.
... note: the
set of properties that can be animated is changing as the specification develops.
...And 14 more matches
Style System Overview - Archive of obsolete content
“re
set”: 'border', 'background', etc.
... detail: !important declarations cause an extra rule object cssimportantrule to be created since they are in a separate part of the cascade other nsistylerule implementations nshtmlmappedattributes represents stylistic html attributes turned into a style rule (one instance per unique
set of attributes) bodyrule handles marginwidth/marginheight mixes on body and on frame.
... the cascade style
setimpl manages the different origins of rules in the cascade (ua, user, author) style
set gets the nsistyleruleprocessor implementations from the style sheets, and the css stylesheets force one cssruleprocessor per origin (rather than one per stylesheet).
...And 13 more matches
JavaScript Client API - Archive of obsolete content
engine governs the synchronizing of a specific
set of information.
...it is possible for other components, including 3rd party extensions, to supplement the
set of engines and synchronize their own data.
...have a look at one of the following files: services/sync/modules/engines/bookmarks.js services/sync/modules/engines/history.js
setting up a js module the code for your custom sync engine should live in a js module.
...And 13 more matches
Template Logging - Archive of obsolete content
this corresponds to the id attribute
set on a generated row.
...these types of errors are also logged to the console, however, these types of errors are logged whether the logging flag is
set or not.
... querytype attribute doesn't specify a valid query processor this error indicates that the querytype attribute is
set to an unrecognized value.
...And 13 more matches
XBL Example - Archive of obsolete content
you could put anything within the pages, however, this widget might be useful for a
set of images.
...the selectedindex is inherited by the deck, so we may
set the initial page in the xul.
...we could
set a value, but instead it will calculated later.
...And 13 more matches
treecol - Archive of obsolete content
depending on the platform and theme being used, some elements will have
set a maximum width so they will always appear cropped.
...if the cycler attribute is not
set, the cell is a regular text cell.
... dragging type: boolean this attribute will be
set to true if the column is being dragged.
...And 13 more matches
Building up a basic demo with the PlayCanvas engine - Game development
environment
setup to start developing with playcanvas, you don't need much.
... <!doctype html> <html> <head> <meta char
set="utf-8"> <title>mdn games: playcanvas demo</title> <style> body { margin: 0; padding: 0; } canvas { width: 100%; height: 100%; } </style> </head> <body> <script src="playcanvas-latest.js"></script> <canvas id="application-canvas"></canvas> <script> var canvas = document.getelementbyid("application-canvas"); /* all our javascript code goes here */ </script> </bo...
...dy> </html> it contains some basic information like the document <title>, and some css to
set the width and height of the <canvas> element that playcanvas will use to 100% so that it will fill the entire available viewport space.
...And 13 more matches
JavaScript basics - Learn web development
these include: browser application programming interfaces (apis) built into web browsers, providing functionality such as dynamically creating html and
setting css styles; collecting and manipulating a video stream from a user's webcam, or generating 3d graphics and audio samples.
... following that, the code
set the value of the myheading variable's textcontent property (which represents the content of the heading) to hello world!.
...here we select the <html> element,
setting its onclick handler property equal to an anonymous (i.e.
...And 13 more matches
Choosing the right approach - Learn web development
single delayed operation repeating operation multiple sequential operations multiple simultaneous operations no yes (recursive callbacks) yes (nested callbacks) no code example an example that loads a resource via the xmlhttprequest api (run it live, and see the source): function loadas
set(url, type, callback) { let xhr = new xmlhttprequest(); xhr.open('get', url); xhr.respon
setype = type; xhr.onload = function() { callback(xhr.response); }; xhr.send(); } function displayimage(blob) { let objecturl = url.createobjecturl(blob); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); } loadas
set('coffee.jpg', 'b...
... further information introducing asynchronous javascript, in particular async callbacks
settimeout()
settimeout() is a method that allows you to run a function after an arbitrary amount of time has passed.
... single delayed operation repeating operation multiple sequential operations multiple simultaneous operations yes yes (recursive timeouts) yes (nested timeouts) no code example here the browser will wait two seconds before executing the anonymous function, then will display the alert message (see it running live, and see the source code): let mygreeting =
settimeout(function() { alert('hello, mr.
...And 13 more matches
Midas
internet explorer supports the ability to make an entire document editable by
setting the designmode property of the document object; this is how midas is invoked in gecko.
... properties document.designmode by
setting this property to "on", the document becomes editable.
... this command will
set the background color of the document.
...And 13 more matches
gtstd.html
upgraded documentation may be found in the current nss reference getting started with ssl chapter 2 getting started with ssl this chapter describes how to
set up your environment, including certificate and key databases.
... ssl, pkcs #11, and the default security databases
setting up the certificate and key databases building nss programs ssl, pkcs #11, and the default security databases the basic relationships among the nss libraries are described in introduction to network security services.
...you can use communicator to
set up client certificate databases by obtaining certificates from either a public ca or from a certificate server such as netscape certificate management system.
...And 13 more matches
Places utilities for JavaScript
r); boolean showminimaladdmultibookmarkui(array nsiuri aurilist); boolean showbookmarkproperties(int aid); boolean showfolderproperties(int aid); boolean showaddfolderui(string atitle, int adefaultinsertionpoint, boolean ashowpicker); array object getannotationsforuri(nsiuri auri); array object getannotationsforitem(int aitemid); void
setannotationsforuri(nsiuri auri, object aannos); void
setannotationsforuri(int aitemid, object aannos); getviewfornode(nsidomnode anode); void markpageastyped(string aurl); void markpageasfollowedbookmark(string aurl); boolean checkurlsecurity(nsinavhistoryresultnode aurinode); string getquerystringforfolder(int afolderid); string getdes...
...criptionfromdocument(nsidomdocument doc); string
setpostdataforbookmark(int aboomarkid, string apostdata); string getpostdataforbookmark(int aboomarkid); array string geturlandpostdataforkeyword(string akeyword); string getitemdescription(int aitemid); nsinavhistoryresultnode getmostrecentbookmarkforuri(nsiuri auri); nsinavhistoryresultnode getmostrecentfolderforfeeduri(nsiuri auri); nsinavhistoryresultnode geturlsforcontainernode(nsinavhistoryresultnode anode); void opencontainernodeintabs(nsinavhistoryresultnode anode, nsidomevent aevent); void openurinodesintabs(array nsinavhistoryresultnode anodes, nsidomevent aevent); void createmenuitemfornode(nsinavhistoryresultnode anode, acontainersmap); ...
...if
set, the folder picker would be hidden unless ashowpicker is
set to true, in which case the dialog only uses the folder identifier from the insertion point as the initially selected item in the folder picker.
...And 13 more matches
nsIAccessibleEditableText
the operations it supports includes
setting text attributes and text contents while also replacing old text of an object with new text.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void copytext(in long startpos, in long endpos); void cuttext(in long startpos, in long endpos); void deletetext(in long startpos, in long endpos); void inserttext(in astring text, in long position); void pastetext(in long position); void
setattributes(in long startpos, in long endpos, in nsisupports attributes); unimplemented void
settextcontents(in astring text); attributes attribute type description associatededitor nsieditor returns an editor associated with the accessible.
... void copytext( in long startpos, in long endpos ); parameters startpos start off
set of the text to be copied into the clipboard.
...And 13 more matches
nsIMsgIdentity
inherits from: nsisupports method overview void clearallvalues(); void copy(in nsimsgidentity identity); astring getunicharattribute(in string name); void
setunicharattribute(in string name, in astring value); acstring getcharattribute(in string name); void
setcharattribute(in string name, in acstring value); boolean getboolattribute(in string name); void
setboolattribute(in string name, in boolean value); long getintattribute(in string name); void
setintattribute(in string name, in long value); ...
...if this is
set, this is the smtp server that should be used for the message send.
...if this is
set, the return receipt menu item on the compose window will be checked.
...And 13 more matches
nsIMsgIncomingServer
e, in nsimsgwindow amsgwindow, out boolean okayvalue); astring getunicharattribute(in string name); astring getunicharvalue(in string attr); boolean isnewhdrduplicate(in nsimsgdbhdr anewhdr); void onuserorhostnamechanged(in acstring oldname, in acstring newname); void performbiff(in nsimsgwindow amsgwindow); void performexpand(in nsimsgwindow amsgwindow); void removefiles(); void
setboolattribute(in string name, in boolean value); void
setboolvalue(in string attr, in boolean value); void
setcharattribute(in string name, in acstring value); void
setcharvalue(in string attr, in acstring value); void
setdefaultlocalpath(in nsilocalfile adefaultlocalpath); void
setfilevalue(in string relpref, in string abspref, in nsilocalfile avalue); void
setfilterlist(in nsimsgfilt...
...erlist afilterlist); void
setintattribute(in string name, in long value); void
setintvalue(in string attr, in long value); void
setunicharattribute(in string name, in astring value); void
setunicharvalue(in string attr, in astring value); void shutdown(); void storepassword(); astring tostring(); void writetofoldercache(in nsimsgfoldercache foldercache); attributes attribute type description accountmanagerchrome astring read only.
...by default this value is
set to true via global pref 'allows_specialfolders_usage' (mailnews.js).
...And 13 more matches
nsINavHistoryQuery
this is important because, if the user has their profile on a networked drive, query latency can be non-negligible method overview nsinavhistoryquery clone(); void getfolders([optional ]out unsigned long count, [retval,array,size_is(count)] out long long folders); void gettransitions([optional] out unsigned long count, [retval,array,size_is(count)] out unsigned long transitions); void
setfolders([const,array, size_is(foldercount)] in long long folders, in unsigned long foldercount); void
settransitions([const,array, size_is(count)] in unsigned long transitions, in unsigned long count); attributes attribute type description absolutebegintime prtime read only: retrieves the begin time value that the currently loaded reference points + off
set resolve to.
... absoluteendtime prtime read only: retrieves the end time value that the currently loaded reference points + off
set resolve to.
...
setting it to an empty string is a real query and will match any uri that has no host name (local files and such).
...And 13 more matches
nsISelectionPrivate
method overview void addselectionlistener(in nsiselectionlistener newlistener); void endbatchchanges(); void getcachedframeoff
set(in nsiframe aframe, in print32 inoff
set, in nspointref apoint); native code only!
... void getrangesforinterval(in nsidomnode beginnode, in print32 beginoff
set, in nsidomnode endnode, in print32 endoff
set, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results); void getrangesforintervalarray(in nsinode beginnode, in print32 beginoff
set, in nsinode endnode, in print32 endoff
set, in boolean allowadjacent, in rangearray results); native code only!
... void getrangesforintervalcomarray(in nsidomnode beginnode, in print32 beginoff
set, in nsidomnode endnode, in print32 endoff
set, in prbool allowadjacent, in rangearray results); native code only!
...And 13 more matches
Autoconfiguration in Thunderbird
in many cases, people should be able to download and install thunderbird, enter their real name, email address and password in the account
setup wizard and have a fully functioning mail client and get and send their mail as securely as possible.
... mechanisms thunderbird gets the server
settings via different means, each of which is intended for different cases: ispdb the ispdb is a central database, currently hosted by the thunderbird project, but free to use for any client.
... it contains
settings for the world's largest isps.
...And 13 more matches
AbstractRange - Web APIs
endcontainer read only the dom node in which the end of the range, as specified by the endoff
set property, is located.
... endoff
set read only an integer value indicating the off
set, in characters, from the beginning of the node's contents to the beginning of the range represented by the range object.
... startcontainer read only the dom node in which the beginning of the range, as specified by the startoff
set property, is located.
...And 13 more matches
Using files from web applications - Web APIs
example: showing file(s) size the following example shows a possible use of the size property: <!doctype html> <html> <head> <meta char
set="utf-8"> <title>file(s) size</title> </head> <body> <form name="uploadform"> <div> <input id="uploadinput" type="file" name="myfiles" multiple> selected files: <span id="filenum">0</span>; total size: <span id="filesize">0</span> </div> <div><input type="submit" value="send file"></div> </form> <script> function updatesize() { let nbytes = 0, ...
...after creating the new filereader object, we
set up its onload function and then call readasdataurl() to start the read operation in the background.
...our implementation of this routine
sets the img element's src attribute to the loaded image which results in the image appearing in the thumbnail on the user's screen.
...And 13 more matches
A basic 2D WebGL animation example - Web APIs
the standard webgl global gl_position is then
set to the transformed and rotated vertex's position.
...then we
set the global gl_fragcolor to the value of the uniform uglobalcolor, which is
set by the javascript code to the color being used to draw the square.
...ctor; let uglobalcolor; let urotationvector; let avertexposition; // animation timing let previoustime = 0.0; let degreespersecond = 90.0; initializing the program is handled through a load event handler called startup(): window.addeventlistener("load", startup, false); function startup() { glcanvas = document.getelementbyid("glcanvas"); gl = glcanvas.getcontext("webgl"); const shader
set = [ { type: gl.vertex_shader, id: "vertex-shader" }, { type: gl.fragment_shader, id: "fragment-shader" } ]; shaderprogram = buildshaderprogram(shader
set); aspectratio = glcanvas.width/glcanvas.height; currentrotation = [0, 1]; currentscale = [1.0, aspectratio]; vertexarray = new float32array([ -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.5,...
...And 13 more matches
Coordinate systems - CSS: Cascading Style Sheets
the position is specified as the number of pixels off
set from the origin along each dimension of the context.
... dimensions in the coordinate systems used by web technologies, convention dictates that the horizontal off
set is called the x-coordinate, where a negative value indicates a position to the left of the origin and a positive value is to the right of the origin.
... the y-coordinate specifies the vertical off
set, with a negative value being above the origin and a positive value being below the origin.
...And 13 more matches
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
in this first example, i am using flexbox to lay out a
set of boxes.
... i have also
set the flex-wrap property to wrap, so that if the space in the container becomes too narrow to maintain the flex basis, items will wrap onto a new row.
...we do not need to
set anything on the items themselves; they will lay themselves out one into each cell of the created grid.
...And 13 more matches
font - CSS: Cascading Style Sheets
the font css shorthand property
sets all the different properties of an element's font.
... alternatively, it
sets an element's font to a system font.
... as with any shorthand property, any individual value that is not specified is
set to its corresponding initial value (possibly overriding values previously
set using non-shorthand properties).
...And 13 more matches
mask - CSS: Cascading Style Sheets
as well as the properties listed below, the mask shorthand also re
sets mask-border to its initial value.
... it is therefore recommended to use the mask shorthand rather than other shorthands or the individual properties to override any mask
settings earlier in the cascade.
... this will ensure that mask-border has also been re
set to allow the new styles to take effect.
...And 13 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.
... the optional third parameter
sets whether the request is asynchronous.
... note that if you want to post data, you may have to
set the mime type of the request.
...And 13 more matches
Localizations and character encodings - Developer guides
the <meta> element's char
set attribute is used to specify the page's character encoding.
... to specify that a page is using, for example, the utf-8 character encoding (as per the recommendation), simply place the following line in the <head> block: <meta char
set="utf-8"> details and browser internals when the encoding is declared by web content like the html specification requires, firefox will use that encoding for turning the bytes into the internal representation.
...for most locales, the fallback encoding is windows-1252 (often called iso-8859-1), which was the encoding emitted by most windows applications in the 1990s and a super
set of the encoding emitted by most unix applications in the 1990s as a deployed in the america has and in western europe.
...And 13 more matches
Index - HTTP
browsers
set adequate values for this header depending on the context where the request is done: when fetching a css stylesheet a different value is
set for the request than when fetching an image, video or a script.
... 3 accept-char
set content negotiation, http, http header, reference, request header the accept-char
set request http header advertises which character
set the client is able to understand.
...browsers usually don't
set this header as the default value for each content type is usually correct and transmitting it would allow easier fingerprinting.
...And 13 more matches
dominant-baseline - SVG: Scalable Vector Graphics
when the initial value, auto, would give an undesired result, this property can be used to explicitly
set the desired scaled-baseline-table.
... if the computed baseline-shift value actually shifts the baseline, then the baseline-table font-size component is
set to the value of the font-size attribute on the element on which the dominant-baseline attribute occurs, otherwise the baseline-table font-size remains the same as that of the element.
... use-script the dominant-baseline and the baseline-table components are
set by determining the predominant script of the character data content.
...And 13 more matches
Understanding WebAssembly text format - WebAssembly
getting and
setting locals and parameters locals/parameters can be read and written by the body of the function with the local.get and local.
set instructions.
... the local.get/local.
set commands refer to the item to be got/
set by its numeric index: parameters are referred to first, in order of their declaration, followed by locals in order of their declaration.
...you could swap out the i32 for any of the other available types, and change the value of the const to whatever you like (here we’ve
set the value to 42).
...And 13 more matches
Running Tamarin performance tests - Archive of obsolete content
running the performance tests requires the following steps:
set the avm environment variable to the path of the avmshell executable.
...
set the builtinabc environment variable to the path of the builtin.abc.
... (in the tamarin-redux/generated directory)
set the shellabc environment variable to the path of the shell_toplevel.abc.
...And 12 more matches
Tamarin build documentation - Archive of obsolete content
example call to build on an x86_64 machine with the 10.5 sdk: $ ../configure.py --mac-sdk=105 --target=x86_64-darwin if asc is not
set, you will need to add asc.jar to the utils directory in tamarin-redux (bug 631641).
... download ftp://ftp.mozilla.org/pub/js/tamarin/builds/asc/latest/asc.jar put it in utils/ building tamarin for android 2.3.3 on mac public sdk/ndk
setup to build tamarin for android you will need an sdk/ndk.
... the
setup procedure below creates an android sdk/ndk entirely from publicly available sources.
...And 12 more matches
Install script template - Archive of obsolete content
ion); if (err != 0) { // call initinstall again in case illegal characters in plid err = initinstall(software_name, software_name, version); if (err != 0) cancelinstall(err); } //addfiles to current browser block var pluginsfolder = getfolder("plugins"); //verify disk space if(verifydiskspace(pluginsfolder, plugin_size+component_size)) { // start installing plugin shared library re
seterror(); // install the plugin shared library to the current browser's plugin directory errblock1 = addfile (plid, version, plugin_file, pluginsfolder, null); if (errblock1!=0) { logcomment("could not add " + plugin_file + " to " + pluginsfolder + ":" + errblock1); cancelinstall(errblock1); } // start installing xpt file if this is a scriptable plugin // install to the plugins dire...
...ory can be avoided for xpt files errblock1 = addfile (plid, version, component_file, pluginsfolder, null); if (errblock1!=0) { logcomment("could not add " + component_file + " to " + pluginsfolder + ":" + errblock1); cancelinstall(errblock1); } } else { logcomment("cancelling current browser install due to lack of space..."); cancellinstall(); } // secondary install block, which
sets up plugins and xpt in another location in addition to the current browser errblock2 = createsecondaryinstall(); // performinstall block, in which error conditions from previous blocks are checked.
... if(errblock2 == success) { // now take care of writing plids to the win32 registry err = writeplidsolution(); if(err!=success) { logcomment("could not write win32 keys as specified: " + err); } else { logcomment("plid entries are present in the win32 registry"); } } re
seterror(); err = performinstall(); if (err == success) refreshplugins(true); // call refreshplugins(true) if you'd like the web page which invoked the plugin to // reload.
...And 12 more matches
Popup Menus - Archive of obsolete content
first, an example: <popup
set> <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </popup
set> as can be seen here, a simple popup menu with three commands on it has been created.
...you will also notice that the id has been
set on the menupopup element itself.
... the popup
set element surrounds the entire popup menu declaration.
...And 12 more matches
richlistitem - Archive of obsolete content
if this attribute is
set, the element is disabled.
...do not
set the attribute to true, as this will suggest you can
set it to false to enable the element again, which is not the case.
...to change the selection,
set either the selectedindex or selecteditem property of the containing element.
...And 12 more matches
timepicker - Archive of obsolete content
to specify the initial, use the value attribute
set to a value of either the form hh:mm:ss or hh:mm.
...to avoid this, you can use the workaround described here, i.e., use window.
settimeout(actual-event-handler-function, 0); to queue up your event handler to run after the rest of the picker's change event handlers.
...if this attribute is
set, the element is disabled.
...And 12 more matches
Looping code - Learn web development
in pseudocode, this would look something like the following: loop(food = 0; foodneeded = 10) { if (food >= foodneeded) { exit loop; // we have enough food; let's go home } else { food += 2; // spend an hour collecting 2 more food // loop will then run again } } so the amount of food needed is
set at 10, and the amount the farmer currently has is
set at 0.
...let's say we wanted to draw 100 random circles on a <canvas> element (press the update button to run the example again and again to see different random
sets): hidden code <!doctype html> <html> <head> <meta char
set="utf-8"> <title>random canvas circles</title> <style> html { width: 100%; height: inherit; background: #ddd; } canvas { display: block; } body { margin: 0; } button { position: absolute; top: 5px; left: 5px; ...
... inside the parentheses we have three items, separated by semi-colons: an initializer — this is usually a variable
set to a number, which is incremented to count the number of times the loop has run.
...And 12 more matches
Fetching data from the server - Learn web development
originally page loading on the web was simple — you'd send a request for a website to a server, and as long as nothing went wrong, the as
sets that made the web page would be downloaded and displayed on your computer.
... the trouble with this model is that whenever you want to update any part of the page, for example, to display a new
set of products or load a new page, you've got to load the entire page again.
... to speed things up even further, some sites also store as
sets and data on the user's computer when they are first requested, meaning that on subsequent visits they use the local versions instead of downloading fresh copies when the page is first loaded.
...And 12 more matches
Index
if the user already has an email account, the user can switch to the original account
setup wizard.
... 13 autoconfig: how to create a configuration file autoconfiguration, thunderbird authoritative definition 14 autoconfiguration in thunderbird moved to autoconfiguration 15 buddy icons in mail
seth spitzer mozilla is now able to show icons in the message header area and the addressbook card pane.
... (see this document for info about that.) for the addressbook card pane, the icon will show is on disk at: <profile home>/nim/<value of pref aim.session.screenname>/picture/<screenname for card>.gif if aim.session.screenname is not
set, the icon will not appear.
...And 12 more matches
AudioListener - Web APIs
properties the position, forward, and up value are
set and retrieved using different syntaxes.
... retrieval is done by accessing, for example, audiolistener.positionx, while
setting the same property is done with audiolistener.positionx.value.
... methods audiolistener.
setorientation()
sets the orientation of the listener.
...And 12 more matches
Background Tasks API - Web APIs
falling back to
settimeout because the background tasks api is fairly new, your code may need to be able to work on browsers that don't yet support it.
... you can do so with a simple shim that uses
settimeout() as a fallback option.
... this isn't a polyfill, since it's not functionally identical;
settimeout() doesn't let you make use of idle periods, but instead runs your code when possible, leaving us to do the best we can to avoid causing the user to experience performance lag.
...And 12 more matches
Using Service Workers - Web APIs
but the overriding problem is that there still isn’t a good overall control mechanism for as
set caching and custom network requests.
... the previous attempt — appcache — seemed to be a good idea because it allowed you to specify as
sets to cache really easily.
...using a service worker you can easily
set an app up to use cached as
sets first, thus providing a default experience even when offline, before then getting more data from the network (commonly known as offline first).
...And 12 more matches
Rendering and the WebXR frame animation callback - Web APIs
once your webxr environment has been
set up and an xrsession created to represent an ongoing xr environment session, you need to provide frames of the scene to the xr device for rendering.
... before you can render the virtual environment, you need to establish a webxr session by creating an xrsession using the navigator.xr.requestsession() method; you also need to associate the session with a framebuffer and perform other
setup tasks.
... these
setup tasks are described in the article
setting up and shutting down a webxr session.
...And 12 more matches
WebXR Device API - Web APIs
the webxr device api implements the core of the webxr feature
set, managing the selection of output devices, render the 3d scene to the chosen device at the appropriate frame rate, and manage motion vectors created using input controllers.
... webxr-compatible devices include fully-immersive 3d head
sets with motion and orientation tracking, eyeglasses which overlay graphics atop the real world scene passing through the frames, and handheld mobile phones which augment reality by capturing the world with a camera and augment that scene with computer-generated imagery.
...once both eyes' perspectives on the scene have been rendered, the resulting framebuffer is delivered to the webxr device to be presented to the user through their head
set or other appropriate display device.
...And 12 more matches
Using Web Workers - Web APIs
back in the main thread, we use onmessage again, to respond to the message sent back from the worker: myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); } here we grab the message event data and
set it as the textcontent of the result paragraph, so the user can see the result of the calculation.
...previously executed code (including code deferred using window.
settimeout()) will still be functional though.
...when the onmessage event handler in the parent thread is
setup, or when the start() method is explicitly called in the parent thread).
...And 12 more matches
ARIA live regions - Accessibility
aria-live: the aria-live=politeness_
setting is used to
set the priority with which screen reader should treat updates to live regions - the possible
settings are: off, polite or assertive.
... the default
setting is off.
... html <field
set> <legend>planet information</legend> <label for="planetsselect">planet:</label> <select id="planetsselect" aria-controls="planetinfo"> <option value="">select a planet…</option> <option value="mercury">mercury</option> <option value="venus">venus</option> <option value="earth">earth</option> <option value="mars">mars</option> </select> <button id="renderplanet...
...And 12 more matches
Accessibility: What users can do to browse more safely - Accessibility
this article discusses making web content accessible for those with vestibular disorders, and those who support them, by taking advantage of personalization and accessibility
settings built into the operating systems.
... taking advantage of personalization
settings can help prevent exposure to content leading to seizures and / or other physical reactions.
... personalization and accessibility
settings from the article, "understanding success criterion 2.3.1: three flashes or below threshold" "flashing can be caused by the display, the computer rendering the image or by the content being rendered.
...And 12 more matches
Architecture - Accessibility
when you have an nsiaccessiblehypertext, you can ask for its links, which is the sub
set of children from the nsiaccessible hierarchy that are not text or whitespace.
...the children of a hypertext object are a super
set of the links it exposes.
... how does an at deal with text (a) to get the embedded object for an embedded object char: linkindex = iahypertext::getlinkindex(off
set) iahyperlink*object = iahypertext::getlink(linkindex) iaccessible* accessible = qi/qs(object) (b) to get the off
set in the parent text for a given embedded object: qi/qa to iahyperlink if not successful, then it is not embedded in text, so it's position in parent should be determined just by ia2::indexinparent, which will return its child off
set within the parent.
...And 12 more matches
font-size - CSS: Cascading Style Sheets
the font-size css property
sets the size of the font.
...t-size: xx-small; font-size: x-small; font-size: small; font-size: medium; font-size: large; font-size: x-large; font-size: xx-large; font-size: xxx-large; /* <relative-size> values */ font-size: smaller; font-size: larger; /* <length> values */ font-size: 12px; font-size: 0.8em; /* <percentage> values */ font-size: 80%; /* global values */ font-size: inherit; font-size: initial; font-size: un
set; the font-size property is specified in one of the following ways: as one of the absolute-size or relative-size keywords as a <length> or a <percentage>, relative to the parent element's font size values xx-small, x-small, small, medium, large, x-large, xx-large, xxx-large absolute-size keywords, based on the user's default font size (which is medium).
... keywords keywords are a good way to
set the size of fonts on the web.
...And 12 more matches
position - CSS: Cascading Style Sheets
the position css property
sets how an element is positioned in a document.
... relative the element is positioned according to the normal flow of the document, and then off
set relative to itself based on the values of top, right, bottom, and left.
... the off
set does not affect the position of any other elements; thus, the space given for the element in the page layout is the same as if position were static.
...And 12 more matches
<input type="range"> - HTML: Hypertext Markup Language
events change and input supported common attributes autocomplete, list, max, min, and step idl attributes list, value, and valueasnumber methods stepdown() and stepup() validation there is no pattern validation available; however, the following forms of automatic validation are performed: if the value is
set to something which can't be converted into a valid floating-point number, validation fails because the input is suffering from a bad input.
...the default value is halfway between the specified minimum and maximum—unless the maximum is actually less than the minimum, in which case the default is
set to the value of the min attribute.
...rangeelem.min : rangeelem.min + (rangeelem.max - rangeelem.min)/2; if an attempt is made to
set the value lower than the minimum, it is
set to the minimum.
...And 12 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
always
set the label and tooltiptext attributes of a toolbarbutton.
...
setting the image for a toolbar button is done with css: #xulschoolhello-hello-world-button { list-style-image: url("chrome://xulschoolhello/skin/hello-world.png"); } it's not really that simple to
set the image for a toolbar button, because we need to consider the appearance of the button on different systems, and also consider the different button states, but we'll get into that further ahead.
... <window id="main-window"> <toolbox id="navigator-toolbox"> <toolbar id="xulschoolhello-toolbar" toolbarname="&xulschoolhello.toolbarname.label;" accesskey="&xulschoolhello.toolbar.accesskey;" customizable="true" mode="icons" context="toolbar-context-menu" default
set="xulschoolhello-hello-world-button" insertbefore="personaltoolbar" /> </toolbox> </window> (note for mac os x: <window id="main-window"> and </window> are not required) our toolbar is added as a child of the toolbox element in the main browser window.
...And 11 more matches
Handling Preferences - Archive of obsolete content
preferences are used to store
settings and information to change their default behavior.
...this is where the user's
settings are stored.
... user preferences: the file user.js in the user's profile directory holds additional preferences the user has
set.
...And 11 more matches
Adding preferences to an extension - Archive of obsolete content
establish the defaults in order to
set a default preference for the stock to monitor, we need to add a new folder to our extension's package, called "defaults", which in turn contains another folder called "preferences".
...er to receive notifications of preference changes this.prefs = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice) .getbranch("extensions.stockwatcher2."); this.prefs.addobserver("", this, false); this.tickersymbol = this.prefs.getcharpref("symbol").touppercase(); this.refreshinformation(); window.
setinterval(this.refreshinformation, 10*60*1000); } }, our object has two member variables.
... now that we're monitoring the preferences, we can
set up to watch the stock information and display it in the status bar panel.
...And 11 more matches
Running Tamarin acceptance tests - Archive of obsolete content
running the tamarin test suite requires the following steps:
set the avm environment variable to the path of the avmplus executable (avmshell).
...
set the builtinabc environment variable to the path of the generated/builtin.abc.
...
set the asc environment variable, as described above.
...And 11 more matches
Splitters - Archive of obsolete content
set this to open, the default, to have the split panel initially open, or
set it to collapsed to have one of the panels shrunk down (collapsed) and the other occupying all of the space.
... collapse this indicates which side of the panel should collapse when the splitter notch (or grippy) is clicked or
set into a collapsed state.
...
set this to before for the element before the splitter, or after for the element after the splitter.
...And 11 more matches
description - Archive of obsolete content
the text can be
set either with the value attribute or by placing text inside the open and close description tags.
... the value attribute is used to
set text that appears in a single line.
... depending on the platform and theme being used, some elements will have
set a maximum width so they will always appear cropped.
...And 11 more matches
radiogroup - Archive of obsolete content
if this attribute is
set, the element is disabled.
...do not
set the attribute to true, as this will suggest you can
set it to false to enable the element again, which is not the case.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use
setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use
setuserdata() (future-proof and clean, but not easily serializable).
...And 11 more matches
Building up a basic demo with Three.js - Game development
in this article we'll take you through the real basics of using three, including
setting up a development environment, structuring the necessary html, the fundamental objects of three, and how to build up a basic demo.
... environment
setup to start developing with three.js, you don't need much.
... html structure here's the html structure we will use: <!doctype html> <html> <head> <meta char
set="utf-8"> <title>mdn games: three.js demo</title> <style> body { margin: 0; padding: 0; } canvas { width: 100%; height: 100%; } </style> </head> <body> <script src="three.min.js"></script> <script> var width = window.innerwidth; var height = window.innerheight; /* all our javascript code goes here */ </script> </body> </html> it contains some basic information like the document <title>...
...And 11 more matches
HTML text fundamentals - Learn web development
if you make a mistake, you can always re
set it using the re
set button.
... my legs are made of cardboard and i am married to a fish.</textarea> <div class="playable-buttons"> <input id="re
set" type="button" value="re
set"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } var textarea = document.getelementbyid('code'); var re
set = document.getelementbyid('re
set'); var solu...
...tion = document.getelementbyid('solution'); var output = document.queryselector('.output'); var code = textarea.value; var userentry = textarea.value; function updatecode() { output.innerhtml = textarea.value; } re
set.addeventlistener('click', function() { textarea.value = code; userentry = textarea.value; solutionentry = htmlsolution; solution.value = 'show solution'; updatecode(); }); solution.addeventlistener('click', function() { if(solution.value === 'show solution') { textarea.value = solutionentry; solution.value = 'hide solution'; } else { textarea.value = userentry; solution.value = 'show solution'; } updatecode(); }); var htmlsolution = '<h1>my short story</h1>\n<p>i am a statistician and my name is trish.</p>\n<p>my legs are made of cardboard...
...And 11 more matches
Getting started with Vue - Learn web development
objective: to
setup a local vue development environment, create a starter app, and understand the basics of how it works.
...there are a few pre
set ones, and you can make your own.
..."in dedicated config files" will put your config
settings for things like eslint into their own, dedicated files.
...And 11 more matches
Release phase
you've
setup up your local and remote environments, you've selected your l10n tools and projects, done some localization and even some testing!
...we'll primarily focus on getting your release repository
setup and the mercurial commands you'll need to know to use that repository.
...hs] default = hg.mozilla.org/releases/l10n-central/x-testing default-push = ssh://hg.mozilla.org/releases/l10n-central/x-testing if you haven't already cloned the remote repository, enter this command: hg clone ssh://hg.mozilla.org/releases/l10n-central/x-testing mercurial will let you know that it's cloning the repository: destination directory: x-testing requesting all changes adding change
sets adding manifests adding file changes added 4 change
sets with 242 changes to 239 files updating to branch default 239 files updated, 0 files merged, 0 files removed, 0 files unresolved the default push url is the same as the default pull url (i.e., ssh://hg.mozilla.org/releases/l10n-central/x-testing).
...And 11 more matches
NSS environment variables
there is a separate
set of environment variables that affect how nss is built, documented below.
... variable type description introduced in version nsrandcount integer (byte count)
sets the maximum number of bytes to read from the file named in the environment variable nsrandfile (see below).
... nss_ssl_enable_renegotiation string ([0|n|n], [1|u|u], [2|r|r], [3|t|t]) (definition for nss 3.12.6 and above)
sets how tls renegotiation is handled [1|u|u]: ssl_renegotiate_unrestricted server and client are allowed to renegotiate without any restrictions.
...And 11 more matches
NSS Tools modutil
you can use the tool to add and delete pkcs #11 modules, change passwords,
set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
... with the -changepw command, the password on the netscape internal module cannot be
set or changed, since this password is stored in key3.db.
... creating a
set of security management database files (key3.db, cert8.db, and secmod.db): -create displaying basic module information or detailed information about the contents of a given module: -list [modulename] adding a pkcs #11 module, which includes
setting a supporting library file, enabling ciphers, and
setting default provider status for various security mechanisms: -add modulename -libfile library-file [-ciphers cipher-enable-list] [-mechanisms mechanism-list] adding a pkcs #11 module from an existing jar file: -jar jar-fil...
...And 11 more matches
JS_DefineProperty
syntax bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, js::handlevalue value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, js::handleobject value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, js::handlestring value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, int32_t value, unsigned attrs,...
... jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, uint32_t value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, double value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::handlevalue value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t ...
...namelen, js::handleobject value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::handlestring value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, int32_t value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, uint32_t value, unsigned attrs, jsnative getter = nullp...
...And 11 more matches
nsIDialogParamBlock
inherits from: nsisupports last changed in gecko 1.7 method overview print32 getint( in print32 inindex ); wstring getstring( in print32 inindex ); void
setint( in print32 inindex, in print32 inint ); void
setnumberstrings( in print32 innumstrings ); void
setstring( in print32 inindex, in wstring instring); attributes attribute type description objects nsimutablearray a place where you can store an nsimutablearray to pass nsisupports.
... methods getint() get a previously
set integer.
... return value the previously
set integer, or 0 if no integer has been previously
set at that index.
...And 11 more matches
nsINavHistoryService
toolkit/components/places/nsinavhistoryservice.idlscriptable this interface provides complex query functions, more fine-grained getters and
setters.
...yquery aqueries, in unsigned long aquerycount, in nsinavhistoryqueryoptions options); void addobserver(in nsinavhistoryobserver observer, in boolean ownsweak); void removeobserver(in nsinavhistoryobserver observer); void runinbatchmode(in nsinavhistorybatchcallback acallback, in nsisupports aclosure); void importhistory(in nsifile file); astring getchar
setforuri(in nsiuri auri); astring
setchar
setforuri(in nsiuri auri, in astring achar
set); attributes attribute type description hashistoryentries boolean true if there is any history.
... transition_typed 2 this transition type is
set when the user typed the url to get to the page.
...And 11 more matches
Using the clipboard
ass var res = nssupportsstring(); // store the javascript string that we want to wrap in the new nsisupportsstring object res.data = str; return res; } // create a constructor for the built-in transferable class const nstransferable = components.constructor("@mozilla.org/widget/transferable;1", "nsitransferable"); // create a wrapper to construct an nsitransferable instance and
set its source to the given window, when necessary function transferable(source) { var res = nstransferable(); if ('init' in res) { // when passed a window object, find a suitable privacy context for it.
...trans.
settransferdata("text/unicode", supportsstring(str), str.length * 2); the first line gets the transferring component which implements nsitransferable.
...then, the function
settransferdata is called which copies the data from the string into the transferable.
...And 11 more matches
Debugger.Object - Firefox Developer Tools
the referent's properties do not appear directly as properties of the debugger.object instance; the debugger can access them only through methods like debugger.object.prototype.getownpropertydescriptor and debugger.object.prototype.defineproperty, ensuring that the debugger will not inadvertently invoke the referent's getters and
setters.
... unless otherwise specified, these methods are not invocation functions; if a call would cause debuggee code to run (say, because it gets or
sets an accessor property whose handler is debuggee code, or because the referent is a proxy whose traps are debuggee code), the call throws a debugger.debuggeewouldrun exception.
...
setproperty(name,value) storevalue as the value of the referent's property namedname, creating the property if it does not exist.name must be a string;value must be a debuggee value.
...And 11 more matches
Edit fonts - Firefox Developer Tools
for standard (static) fonts, you will be able to change the
settings listed below size the font-size for the inspected element.
... this can be
set using em, rem, %, px, vh, or vw units.
... note: if you want to use a different unit such as pt for font-size or line-height, you can
set the property value applied to the currently inspected element to use that unit via the rules view, and the font editor will automatically pick it up and make it available in the associated units dropdown menu.
...And 11 more matches
BasicCardResponse - Web APIs
no support noedge no support ≤18 — 79firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true) and the dom.payments.request.supportedregions preference (needs to be
set to a comma-delineated list of one or more 2-character iso country codes indicating the countries in which to support payments (for example, us,ca.).
... nochrome android full support 57firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true) and the dom.payments.request.supportedregions preference (needs to be
set to a comma-delineated list of one or more 2-character iso country codes indicating the countries in which to support payments (for example, us,ca.).
...no support noedge no support ≤18 — 79firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
...And 11 more matches
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
var cell = document.createelement("td"); var celltext = document.createtextnode("cell in row "+i+", column "+j); cell.appendchild(celltext); row.appendchild(cell); } // add the row to the end of the table body tblbody.appendchild(row); } // put the <tbody> in the <table> tbl.appendchild(tblbody); // appends <table> into <body> body.appendchild(tbl); //
sets the border attribute of tbl to 2; tbl.
setattribute("border", "2"); } note the order in which we created the elements and the text node: first we created the <table> element.
... example:
setting the background color of a paragraph getelementsbytagname(tagnamevalue) is a method available in any dom element or the root document element.
... html <body> <input type="button" value="
set paragraph background color" onclick="
set_background()"> <p>hi</p> <p>hello</p> </body> javascript function
set_background() { // get a list of all the body elements (there will only be one), // and then select the zeroth (or first) such element mybody = document.getelementsbytagname("body")[0]; // now, get all the p elements that are descendants of the body mybodyelements = mybody.getelementsbytagname("p"); // get the second item of the list of p elements myp = mybodyelements[1]; myp.style.background = "rgb(255,0,0)"; } in this example, we
set the myp vari...
...And 11 more matches
MouseEvent.initMouseEvent() - Web APIs
this method must be called to
set the event before it is dispatched, using eventtarget.dispatchevent().
... syntax event.initmouseevent(type, canbubble, cancelable, view, detail, screenx, screeny, clientx, clienty, ctrlkey, altkey, shiftkey, metakey, button, relatedtarget); parameters type the string to
set the event's type to.
...
sets the value of event.bubbles.
...And 11 more matches
WebGLRenderingContext.vertexAttribPointer() - Web APIs
syntax void gl.vertexattribpointer(index, size, type, normalized, stride, off
set); parameters index a gluint specifying the index of the vertex attribute that is to be modified.
... stride a glsizei specifying the off
set in bytes between the beginning of consecutive vertex attributes.
... off
set a glintptr specifying an off
set in bytes of the first component in the vertex attribute array.
...And 11 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
cameras and relative movement when a classic live-action movie is filmed, the actors are on a
set and move about the
set as they perform, with one or more cameras watching their moves.
... the cameras may be fixed in place, but they may also be
set up to move around as well, tracking the movement of the performers, dollying in and out to achieve emotional impact, and so forth.
... in business applications, the 3d camera is used to simply
set the apparent size and perspective when rendering things such as graphs and charts.
...And 11 more matches
Window.open() - Web APIs
tip: note that in some browsers, users can override the windowfeatures
settings and enable (or prevent the disabling of) features position and size features windowfeatures parameter can specify the position and size of the new window.
...an off
set is universally implemented by browser manufacturers (it is 29 pixels in ie6 sp2 with the default theme) and its purpose is to help users to notice new windows opening.
... if the most recently used window was maximized, then there is no off
set: the new window will be maximized as well.
...And 11 more matches
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
the following code would
set the flex-grow property to 2, flex-shrink to 1 and flex-basis to auto.
... in the following examples i am working with flex-direction
set to row, therefore the size of items will always come from their width.
...if flex-basis is
set to auto then to work out the initial size of the item the browser first checks if the main size of the item has an absolute size
set.
...And 11 more matches
Basic Shapes - CSS: Cascading Style Sheets
in
set() the in
set() type defines a rectangle, which may not seem very useful as simply floating an item will give you a rectangular shape around it.
... however the in
set() types enables the definition of off
sets, thus pulling the content in over the shape.
... therefore in
set() takes four values for the top, right, bottom and left values plus a final value for border-radius.
...And 11 more matches
Syntax - CSS: Cascading Style Sheets
each property has a
set of valid values, defined by a formal grammar, as well as a semantic meaning, implemented by the browser engine.
... css declarations
setting css properties to specific values is the core function of the css language.
... css rule
sets if style sheets could only apply a declaration to each element of a web page, they would be pretty useless.
...And 11 more matches
tooltip - Archive of obsolete content
depending on the platform and theme being used, some elements will have
set a maximum width so they will always appear cropped.
... noautohide type: boolean if this attribute is
set to false or omitted, the tooltip will automatically disappear after a few seconds.
... if this attribute is
set to true, this will not happen and the tooltip will only hide when the user moves the mouse to another element.
...And 10 more matches
WAI-ARIA basics - Learn web development
a whole new
set of problems as web apps started to get more complex and dynamic, a new
set of accessibility features and problems started to appear.
... enter wai-aria wai-aria (web accessibility initiative - accessible rich internet applications) is a specification written by the w3c, defining a
set of additional html attributes that can be applied to elements to provide additional semantics and improve accessibility wherever it is lacking.
...in these situations, aria can help to provide what's missing with a combination of roles like button, listbox, or tabgroup, and properties like aria-required or aria-posin
set to provide further clues as to functionality.
...And 10 more matches
Introduction to CSS layout - Learn web development
we also have entire layout methods that are switched on via specific display values, for example css grid and flexbox, which alter how elements inside the element they are
set on are laid out.
...everything in normal flow has a value of display, used as the default way that elements they are
set on behave.
...this is due to them becoming flex items and being affected by some initial values that flexbox
sets on the flex container.
...And 10 more matches
How CSS is structured - Learn web development
you reference an external css stylesheet from an html <link> element: <!doctype html> <html> <head> <meta char
set="utf-8"> <title>my css experiment</title> <link rel="stylesheet" href="styles.css"> </head> <body> <h1>hello world!</h1> <p>this is my first css example</p> </body> </html> the css stylesheet file might look like this: h1 { color: blue; background-color: yellow; border: 1px solid black; } p { color: red; } the href attribute of the <link> element needs to referen...
... the html for an internal stylesheet might look like this: <!doctype html> <html> <head> <meta char
set="utf-8"> <title>my css experiment</title> <style> h1 { color: blue; background-color: yellow; border: 1px solid black; } p { color: red; } </style> </head> <body> <h1>hello world!</h1> <p>this is my first css example</p> </body> </html> in some circumstances, internal stylesheets can be useful.
...the implementation of an inline style in an html document might look like this: <!doctype html> <html> <head> <meta char
set="utf-8"> <title>my css experiment</title> </head> <body> <h1 style="color: blue;background-color: yellow;border: 1px solid black;">hello world!</h1> <p style="color:red;">this is my first css example</p> </body> </html> avoid using css in this way when possible.
...And 10 more matches
Advanced form styling - Learn web development
firefox
settled on this because web developers mostly seemed to be using the -webkit- prefixed version, so it was better for compatibility.
... interestingly,
setting border/background on the search field also fixes this problem, as it disables or "breaks" the aqua appearance too.
...ndows 10) chrome 77 (macos), safari 13, opera chrome 63 (windows 10) internet explorer 11 (windows 10) edge 16 (windows 10) using appearence: none on radios/checkboxes as we showed before, you can remove the default appearance of a checkbox or radio button altogether with appearance:none; let's take this example html: <form> <field
set> <legend>fruit preferences</legend> <p> <label> <input type="checkbox" name="fruit-1" value="cherry"> i like cherry </label> </p> <p> <label> <input type="checkbox" name="fruit-2" value="banana" disabled> i can't like banana </label> </p> <p> <label> <input type="checkbox" name="fruit-3" value="strawber...
...And 10 more matches
Debugging on Windows
enable it by going its configuration menu in "debug > other debugging targets > child process debugging
settings", and ticking the box.
... changing/
setting the executable to debug vc++ 6.0: to change or
set the executable to debug, go to project >
settings..., debug tab and select general from the drop down list.
... 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.
...And 10 more matches
JavaScript-DOM Prototypes in Mozilla
prototype
setup on an xpconnect wrapped dom node in mozilla when a dom node is accessed from javascript in mozilla, the native c++ dom node is wrapped using xpconnect and the wrapper is exposed to javascript as the javascript representation of the dom node.
...all the methods that are supposed to show up on this jsobject are actually not properties of the object itself, but rather properties of the prototype of the jsobject for the wrapper (unless the c++ object's class info has the flag nsixpcscriptable::dont_share_prototype
set, but lets assume that's not the case here).
... var obj = document.images[0]; here, obj will not really have any properties (except for the standard jsobject properties such as constructor, and the non-standard __parent__, __proto__, etc.), all the dom functionality of obj comes from obj's prototype (obj.__proto__) that xpconnect
sets up when exposing the first image in document to javascript.
...And 10 more matches
SpiderMonkey 1.8.5
getters and
setters of type jspropertyop took an id parameter of type jsval.
...many getters and
setters simply ignore the id anyway; if the value is needed, use js_idtovalue.
... the type of
setters has changed from jspropertyop to jsstrictpropertyop (to accomodate es5 strict mode).
...And 10 more matches
Places Developer Guide
overview places is the umbrella term for a
set of apis for managing browsing history and uri metadata first introduced in firefox 3.
...var history = cc["@mozilla.org/browser/nav-history-service;1"] .getservice(ci.nsinavhistoryservice); var query = history.getnewquery(); query.
setfolders([myfolderid], 1); var result = history.executequery(query, history.getnewqueryoptions()); // the root property of a query result is an object representing the folder you specified above.
...wser/nav-bookmarks-service;1"] .getservice(ci.nsinavbookmarksservice); var history = cc["@mozilla.org/browser/nav-history-service;1"] .getservice(ci.nsinavhistoryservice); var query = history.getnewquery(); // specify folders to be searched var folders = [bookmarks.toolbarfolder, bookmarks.bookmarksmenufolder, bookmarks.unfiledbookmarksfolder]; query.
setfolders(folders, folders.length); // specify terms to search for, matches against title, url and tags query.searchterms = "firefox"; var options = history.getnewqueryoptions(); options.querytype = options.query_type_bookmarks; var result = history.executequery(query, options); // the root property of a query result is an object representing the folder you specified above.
...And 10 more matches
nsIDBFolderInfo
omponents.interfaces.nsidbfolderinfo); method overview long andflags(in long flags); void changeexpungedbytes(in long delta); void changenummessages(in long delta); void changenumunreadmessages(in long delta); boolean getbooleanproperty(in string propertyname, in boolean defaultvalue); void getcharacter
set(out acstring char
set, out boolean overriden); void getcharacter
setoverride(out boolean character
setoverride); obsolete since gecko 1.8 string getcharptrcharacter
set(); string getcharptrproperty(in string propertyname); void getlocale(in nsstring result); native code only!
...obsolete since gecko 1.8 astring getproperty(in string propertyname); nsidbfolderinfo gettransferinfo(); unsigned long getuint32property(in string propertyname, in unsigned long defaultvalue); void initfromtransferinfo(in nsidbfolderinfo transferinfo); long orflags(in long flags); void
setbooleanproperty(in string propertyname, in boolean apropertyvalue); void
setcharacter
set(in string char
set); void
setcharacter
setoverride(in boolean character
setoverride); obsolete since gecko 1.8 void
setcharptrproperty(in string apropertyname, in string apropertyvalue); void
sethighwater(in nsmsgkey highwater, in boolean force); ...
... void
setlocale(in nsstring locale); native code only!
...And 10 more matches
nsIMessenger
method overview void
setdisplaychar
set(in acstring achar
set); void
setwindow(in nsidomwindow ptr, in nsimsgwindow msgwindow); void openurl(in acstring aurl); void loadurl(in nsidomwindow ptr, in acstring aurl); void launchexternalurl(in acstring aurl); boolean canundo(); boolean canredo(); unsigned long getundotransactiontype(); unsigned long getredo...
...transactiontype(); void undo(in nsimsgwindow msgwindow); void redo(in nsimsgwindow msgwindow); void sendunsentmessages(in nsimsgidentity aidentity, in nsimsgwindow amsgwindow); void
setdocumentchar
set(in acstring character
set); void saveas(in acstring auri, in boolean aasfile, in nsimsgidentity aidentity, in astring amsgfilename); void openattachment(in acstring contenttpe, in acstring url, in acstring displayname, in acstring messageuri, in boolean isexternalattachment); void saveattachment(in acstring contenttpe, in acstring url, in acstring displayname, in acstring messageuri, in boolean isexternalattachment); void saveallattachments(in unsigned long count, [array, size_is(count)] in string contenttypearray, [array, si...
... methods
setdisplaychar
set()
sets the character
set for the displayed message.
...And 10 more matches
Examine and edit CSS - Firefox Developer Tools
you can: toggle pseudo-classes; toggle classes; add a new rule; change the display based on the color scheme preference (as of firefox 72, you must
set devtools.inspector.color-scheme-simulation.enabled to true in the configuration editor to enable this feature); change the display based on print media rules.
... to view user-agent styles (i.e., browser-default css rules), enable "inspector > show browser styles" under the developer tool
settings panel.
... (note that this
setting is independent of the "browser styles" checkbox in the computed view.) user-agent styles are displayed against a different background, and the link to the filename and line number contains the prefix (user agent): element {} rule the element {} rule at the top of the rules list isn't actually a css rule.
...And 10 more matches
about:debugging - Firefox Developer Tools
when about:debugging opens, on the left-hand side, you'll see a sidebar with two options and information about your remote debugging
setup:
setup use the
setup tab to configure the connection to your remote device.
... if your about:debugging page is different from the one displayed here, go to about:config, find and
set the option devtools.aboutdebugging.new-enabled to true.
...
setup tab connecting to a remote device firefox supports debugging over usb with android devices, using the about:debugging page.
...And 10 more matches
Using the CSS Painting API - Web APIs
registerpaint('headerhighlight', class { /* define if alphatransparency is allowed alpha is
set to true by default.
... if
set to false, all colours used on the canvas will be fully opaque */ static get contextoptions() { return { alpha: true }; } /* ctx is the 2d drawing context a sub
set of the html5 canvas api.
...the 2d rendering context is a sub
set of the html5 canvas api; the version available to houdini (called the paintrenderingcontext2d) is a further sub
set containing most of the features available in the full canvas api with the exception of the canvasimagedata, canvasuserinterface, canvastext, and canvastextdrawingstyles apis.
...And 10 more matches
Basic animations - Web APIs
save the canvas state if you're changing any
setting (such as styles, transformations, etc.) which affect the canvas state and you want to make sure the original state is used each time a frame is drawn, you need to save that original state.
... scheduled updates first there's the window.
setinterval(), window.
settimeout(), and window.requestanimationframe() functions, which can be used to call a specific function over a
set period of time.
...
setinterval(function, delay) starts repeatedly executing the function specified by function every delay milliseconds.
...And 10 more matches
Transformations - Web APIs
the current values of the following attributes: strokestyle, fillstyle, globalalpha, linewidth, linecap, linejoin, miterlimit, linedashoff
set, shadowoff
setx, shadowoff
sety, shadowblur, shadowcolor, globalcompositeoperation, font, textalign, textbaseline, direction, imagesmoothingenabled.
...each time the restore() method is called, the last saved state is popped off the stack and all saved
settings are restored.
... a save and restore canvas state example this example tries to illustrate how the stack of drawing states functions by drawing a
set of consecutive rectangles.
...And 10 more matches
Document.evaluate() - Web APIs
number_type 1 a result
set containing a single number.
... string_type 2 a result
set containing a single string.
... boolean_type 3 a result
set containing a single boolean value.
...And 10 more matches
HTMLMarqueeElement - Web APIs
htmlmarqueeelement.behavior
sets how the text is scrolled within the marquee.
... htmlmarqueeelement.bgcolor
sets the background color through color name or hexadecimal value.
... htmlmarqueeelement.direction
sets the direction of the scrolling within the marquee.
...And 10 more matches
Key Values - Web APIs
vk_modechange (0x1f) gdk_key_mode_switch (0xff7e) gdk_key_script_switch (0xff7e) qt::key_mode_switch (0x0100117e) keycode_switch_char
set (95) "nextcandidate" the next candidate function key.
... keyboardevent.key value description virtual keycode windows mac linux android "hangulmode" the hangul (korean character
set) mode key, which toggles between hangul and english entry modes.
... vk_oem_finish (0xf1) gdk_key_katakana (0xff26) qt::key_katakana (0x01001126) "romaji" [5] the romaji key; selects the roman character
set.
...And 10 more matches
RTCPeerConnection - Web APIs
if it has not yet been
set, this is null.peeridentity read only the read-only rtcpeerconnection property peeridentity returns a javascript promise that resolves to an rtcidentityassertion which contains a domstring identifying the remote peer.pendinglocaldescription read only the read-only property rtcpeerconnection.pendinglocaldescription returns an rtcsessiondescription object describing a pending configuration change fo...
...if this hasn't been
set yet, this is null.sctp the read-only sctp property on the rtcpeerconnection interface returns an rtcsctptransport describing the sctp transport over which sctp data is being sent and received.
...the event is sent immediately after the call
setremotedescription() and doesn't wait for the result of the sdp negotiation.onconnectionstatechangethe rtcpeerconnection.onconnectionstatechange property specifies an eventhandler which is called to handle the connectionstatechange event when it occurs on an instance of rtcpeerconnection.
...And 10 more matches
User Timing API - Web APIs
mark events are named by the application and can be
set at any location in an application.
... the mark's performance entry will have the following property values: entrytype -
set to "mark".
... name -
set to the "name" given when the mark was created.
...And 10 more matches
Matrix math for the web - Web APIs
these matrices consist of a
set of 16 values arranged in a 4x4 grid.
...for a typical position,
setting w to 1 will make the math work out.
...able name to each part of the matrix, a column and row number let c0r0 = matrix[ 0], c1r0 = matrix[ 1], c2r0 = matrix[ 2], c3r0 = matrix[ 3]; let c0r1 = matrix[ 4], c1r1 = matrix[ 5], c2r1 = matrix[ 6], c3r1 = matrix[ 7]; let c0r2 = matrix[ 8], c1r2 = matrix[ 9], c2r2 = matrix[10], c3r2 = matrix[11]; let c0r3 = matrix[12], c1r3 = matrix[13], c2r3 = matrix[14], c3r3 = matrix[15]; // now
set some simple names for the point let x = point[0]; let y = point[1]; let z = point[2]; let w = point[3]; // multiply the point against each part of the 1st column, then add together let resultx = (x * c0r0) + (y * c0r1) + (z * c0r2) + (w * c0r3); // multiply the point against each part of the 2nd column, then add together let resulty = (x * c1r0) + (y * c1r1) + (z * c1r2) + (w * ...
...And 10 more matches
WebRTC connectivity - Web APIs
it’s any sort of channel of communication to exchange information before
setting up a connection, whether by email, post card or a carrier pigeon...
... the caller calls rtcpeerconnection.
setlocaldescription() to
set that offer as the local description (that is, the description of the local end of the connection).
... after
setlocaldescription(), the caller asks stun servers to generate the ice candidates the caller uses the signaling server to transmit the offer to the intended receiver of the call.
...And 10 more matches
Migrating from webkitAudioContext - Web APIs
the example below shows old code which downloads an audio file over the network, and then decoded it using createbuffer(): var xhr = new xmlhttprequest(); xhr.open("get", "/path/to/audio.ogg", true); xhr.respon
setype = "arraybuffer"; xhr.send(); xhr.onload = function() { var decodedbuffer = context.createbuffer(xhr.response, false); if (decodedbuffer) { // decoding was successful, do something useful with the audio buffer } else { alert("decoding the audio buffer failed"); } }; converting this code to use decodeaudiodata() is relatively simple, as can be seen below: var xhr = new xmlhttp...
...request(); xhr.open("get", "/path/to/audio.ogg", true); xhr.respon
setype = "arraybuffer"; xhr.send(); xhr.onload = function() { context.decodeaudiodata(xhr.response, function onsuccess(decodedbuffer) { // decoding was successful, do something useful with the audio buffer }, function onfailure() { alert("decoding the audio buffer failed"); }); }; note that the decodeaudiodata() method is asynchronous, which means that it will return immediately, and then when the decoding finishes, one of the success or failure callback functions will get called depending on whether the audio decoding was successful.
... renaming of audioparam.
settargetvalueattime the
settargetvalueattime() method on the audioparam interface has been renamed to
settargetattime().
...And 10 more matches
Logical properties for floating and positioning - CSS: Cascading Style Sheets
logical property or value physical property or value float: inline-start float: left float: inline-end float: right clear: inline-start clear: left clear: inline-end clear: right in
set-inline-start left in
set-inline-end right in
set-block-start top in
set-block-end bottom text-align: start text-align: left text-align: end text-align: right in addition to these mapped properties there are some additional shorthand properties made possible by being able to address block and inline dimensions.
... these have no mapping to physical properties, aside from the in
set property.
... logical property purpose in
set-inline
sets both of the above in
set values for the inline dimension simultaneously.
...And 10 more matches
Audio and Video Delivery - Developer guides
rting 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.
... javascript audio var myaudio = document.createelement('audio'); if (myaudio.canplaytype('audio/mpeg')) { myaudio.
setattribute('src','audiofile.mp3'); } else if (myaudio.canplaytype('audio/ogg')) { myaudio.
setattribute('src','audiofile.ogg'); } myaudio.currenttime = 5; myaudio.play(); we
set the source of the audio depending on the type of audio file the browser supports, then
set the play-head 5 seconds in and attempt to play it.
... javascript video var myvideo = document.createelement('video'); if (myvideo.canplaytype('video/mp4')) { myvideo.
setattribute('src','videofile.mp4'); } else if (myvideo.canplaytype('video/webm')) { myvideo.
setattribute('src','videofile.webm'); } myvideo.width = 480; myvideo.height = 320; we
set the source of the video depending on the type of video file the browser supports we then
set the width and height of the video.
...And 10 more matches
<input type="password"> - HTML: Hypertext Markup Language
value a domstring representing a password, or empty events change and input supported common attributes autocomplete, inputmode, maxlength, minlength, pattern, placeholder, readonly, required, and size idl attributes selectionstart, selectionend, selectiondirection, and value methods select(),
setrangetext(), and
setselectionrange() value the value attribute contains a domstring whose value is the current contents of the text editing control being used to enter the password.
...when
setting the value of a password control, line feed and carriage return characters are stripped out of the value.
...its value can, however, still be changed from javascript code that directly
sets the value of the htmlinputelement.value property.
...And 10 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
a “simple request” is one that meets all the following conditions: one of the allowed methods: get head post apart from the headers automatically
set by the user agent (for example, connection, user-agent, or the other headers defined in the fetch spec as a “forbidden header name”), the only headers which are allowed to be manually
set are those which the fetch spec defines as a “cors-safelisted request-header”, which are: accept accept-language content-language content-type (but note the additional requirements below) dpr ...
... the following is an example of a request that will be preflighted: const xhr = new xmlhttprequest(); xhr.open('post', 'https://bar.other/resources/post-here/'); xhr.
setrequestheader('x-pingother', 'pingpong'); xhr.
setrequestheader('content-type', 'application/xml'); xhr.onreadystatechange = handler; xhr.send('<person><name>arun</name></person>'); the example above creates an xml body to send with the post request.
... also, a non-standard http x-pingother request header is
set.
...And 10 more matches
JavaScript data types and data structures - JavaScript
special non-data but structural type for any constructed object instance also used as data structures: new object, new array, new map, new
set, new weakmap, new
set, new date and almost everything made with new keyword; function : a non-data structure, though it also answers for typeof operator: typeof instance === "function".
...javascript offers other means to represent a
set of booleans (like an array of booleans, or an object with boolean values assigned to named properties).
...it is a
set of "elements" of 16-bit unsigned integer values.
...And 10 more matches
Inheritance and the prototype chain - JavaScript
since ecmascript 2015, the [[prototype]] is accessed using the accessors object.getprototypeof() and object.
setprototypeof().
... here is what happens when trying to access a property: // let's create an object o from function f with its own properties a and b: let f = function () { this.a = 1; this.b = 2; } let o = new f(); // {a: 1, b: 2} // add properties in f function's prototype f.prototype.b = 3; f.prototype.c = 4; // do not
set the prototype f.prototype = {b:3,c:4}; this will break the prototype chain // o.[[prototype]] has properties b and c.
... code link
setting a property to an object creates an own property.
...And 10 more matches
XPCOM Stream Guide
primitive input streams type native class contract id interface how to bind to a data source generic nsstorageinputstream n/a nsiinputstream, nsiseekablestream storagestream.newinputstream(); string (8-bit characters) nsstringstream @mozilla.org/io/string-input-stream;1 nsistringinputstream stream.
setdata(data, length); file nsfileinputstream @mozilla.org/network/file-input-stream;1 nsifileinputstream stream.init(file, ioflags, perm, behaviorflags); zip nsjarinputstream n/a nsiinputstream zipreader.getinputstream(zipentry); similarly, each of these implements nsioutputstream.
... you can get an nsichannel object from the io service's newchannel(spec, char
set, baseuri) method or its .newchannelfromuri(uri) method.
...stream: var outstream = components.classes["@mozilla.org/storagestream;1"] .createinstance(components.interfaces.nsistoragestream) .getoutputstream(); var instream = components.classes["@mozilla.org/io/string-input-stream;1"] .createinstance(components.interfaces.nsistringinputstream); var data = "hello world"; instream.
setdata(data, data.length); while (instream.available()) { outstream.writefrom(instream, instream.available()); } note this is an inefficient example: the only important part is how to feed the output stream.
...And 9 more matches
imgIContainer
void init(in print32 awidth, in print32 aheight, in imgicontainerobserver aobserver); obsolete since gecko 2.0 void lockimage(); void removeframe(in gfxiimageframe item); obsolete since gecko 1.9.2 void requestdecode(); void requestdiscard(); void requestrefresh([const] in timestamp atime); violates the xpcom interface guidelines void re
setanimation(); void restoredatadone(); native code only!
... obsolete since gecko 2.0 void
setdiscardable(in string amimetype); native code only!
... obsolete since gecko 2.0 void
setframeblendmethod(in unsigned long framenumber, in print32 ablendmethod); obsolete since gecko 2.0 void
setframedisposalmethod(in unsigned long framenumber, in print32 adisposalmethod); obsolete since gecko 2.0 void
setframehasnoalpha(in unsigned long framenumber); obsolete since gecko 2.0 void
setframetimeout(in unsigned long framenumber, in print32 atimeout); obsolete since gecko 2.0 void startanimation(); obsolete since gecko 2.0 void stopanimation(); obsolete since gecko 2.0 void unlockimage(); attributes attribute type description animated boolean whether this image is animated.
...And 9 more matches
mozIAsyncFavicons
method overview void getfaviconurlforpage(in nsiuri apageuri, in nsifavicondatacallback acallback); void getfavicondataforpage(in nsiuri apageuri, in nsifavicondatacallback acallback); void
setandfetchfaviconforpage(in nsiuri apageuri, in nsiuri afaviconuri, in boolean aforcereload, in unsigned long afaviconloadtype, [optional] in nsifavicondatacallback acallback); void replacefavicondata(in nsiuri afaviconuri, [const,array,size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, [optional] in prtime aexpiration); void repl...
...
setandfetchfaviconforpage() declares that a given page uses a favicon with the given uri and attempts to fetch and save the icon data by loading the favicon uri through a asynchronous network request.
... note: this function is identical to nsifaviconservice.
setandloadfaviconforpage() void
setandfetchfaviconforpage( in nsiuri apageuri, in nsiuri afaviconuri, in boolean aforcereload, in unsigned long afaviconloadtype, in nsifavicondatacallback acallback optional ); parameters apageuri uri of the page whose favicon is being
set.
...And 9 more matches
nsICookiePermission
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview nscookieaccess canaccess(in nsiuri auri, in nsichannel achannel); boolean can
setcookie(in nsiuri auri, in nsichannel achannel, in nsicookie2 acookie, inout boolean aissession, inout print64 aexpiry); nsiuri getoriginatinguri(in nsichannel achannel); void
setaccess(in nsiuri auri, in nscookieaccess aaccess); constants constant value description access_default 0 nscookieaccess's access default value access_allow 1 nscookieaccess's access allow value access_deny 2 nscookieaccess's access deny value access_session 8 add...
... methods canaccess() tests whether or not the given uri/channel may access the cookie database, either to
set or get cookies.
...can
setcookie() tests whether or not the given uri/channel may
set a specific cookie.
...And 9 more matches
nsICookieService
netwerk/cookie/public/nsicookieservice.idlscriptable provides methods for
setting and getting cookies in the context of a page load.
... batch-deleted a
set of cookies were deleted as part of a purge operation.
... cookie-rejected broadcast whenever the user's preferences cause a cookie to be rejected from being
set.
...And 9 more matches
nsIDOMElement
name); nsidomnodelist getelementsbytagnamens(in domstring namespaceuri, in domstring localname); boolean hasattribute(in domstring name); boolean hasattributens(in domstring namespaceuri, in domstring localname); void removeattribute(in domstring name) nsidomattr removeattributenode(in nsidomattr oldattr) void removeattributens(in domstring namespaceuri, in domstring localname) void
setattribute(in domstring name, in domstring value) nsidomattr
setattributenode(in nsidomattr newattr) nsidomattr
setattributenodens(in nsidomattr newattr) void
setattributens(in domstring namespaceuri, in domstring qualifiedname, in domstring value) attributes attribute type description tagname domstring the element tag name.
...hasattribute() check if the element have this attribute
set.
... boolean hasattribute( in domstring name ); parameters name attribute name return value a boolean, true if the given attribute is
set.
...And 9 more matches
nsILocalFile
void reveal(); void
setrelativedescriptor(in nsilocalfile fromfile, in acstring relativedesc); attributes attribute type description diskspaceavailable print64 the number of bytes available to non-superuser on the disk volume containing the nsilocalfile.
...must be in the native file system character
set.
... the result returned from this method may be used with
setrelativedescriptor() to initialize a nsilocalfile instance.
...And 9 more matches
nsIPrintingPrompt
returning ns_ok assumes that the print
settings object was correctly filled in and if it does not have valid fields for printer name, and so on.
... defaults for platform service: showprintdialog - displays a native dialog showpage
setup() - displays a xul dialog showprogress() - displays a xul dialog summary for windows embedders: stated once again: there is no "fallback" native platform support in gfx for the displaying of the native print dialog.
...you can then fly you own dialog and then properly fill in the print
settings object before calling nsiwebbrowserprint's print method.
...And 9 more matches
nsISHEntry
boolean hasdetachededitor(); violates the xpcom interface guidelines boolean hasdynamicallyaddedchild(); boolean isdynamicallyadded(); void
seteditordata(in nsdocshelleditordataptr adata); violates the xpcom interface guidelines void
setissubframe(in boolean aflag); void
setscrollposition(in long x, in long y); void
settitle(in astring atitle); void
setuniquedocidentifier(); void
seturi(in nsiuri auri); void
setviewerbounds(in nsintrect bounds); native code only!
... void syncpresentationstate(); attributes attribute type description cachekey nsisupports
set and get the cache key for the entry.
... statedata nsistructuredclonecontainer get/
set data associated with this history state via a pushstate() call, serialized using structured clone.
...And 9 more matches
nsIXPCScriptable
for example, callers must guarantee that they
set the *_retval of the various methods that return a boolean to pr_true before making the call.
...j); prbool addproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool delproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool getproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool
setproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool enumerate(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); prbool newenumerate(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 enum_op, in jsvalptr statep, out jsid idp); prbool newresolve(in nsixpc...
...l val); jsobjectptr outerobject(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); jsobjectptr innerobject(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); void postcreateprototype(in jscontextptr cx, in jsobjectptr proto); attributes attribute type description classname string scriptableflags pruint32 the bitwise or'd
set of flags (define below) that indicate the behavior of this object.
...And 9 more matches
Network request list - Firefox Developer Tools
you can override this behavior by checking "enable persistent logs" in the
settings.
...a re
set columns command is available on the context menu to re
set the columns to their initial configuration.
...you can drag to manually
set the size of column.
...And 9 more matches
Using dynamic styling information - Web APIs
to modify styles to a document using css syntax, one can insert rules or insert <style> tags whose innerhtml property is
set to the desired css.
... modify an element's style the element style property (see also the section "dom style object" below) can also be used to get and
set the styles on an element.
... however, this property only returns style attributes that have been
set in-line (e.g, <td style="background-color: lightblue"> returns the string "background-color:lightblue", or directly for that element using element.style.propertyname, even though there may be other styles on the element from a stylesheet).
...And 9 more matches
Using Fetch - Web APIs
instead, it will resolve normally (with ok status
set to false), and it will only reject on network failure or if anything prevented the request from completing.
...
set-cookie headers from other sites are silently ignored.
... fetch won’t send cookies, unless you
set the credentials init option.
...And 9 more matches
Fullscreen API - Web APIs
dictionaries fullscreenoptions provides optional
settings you can specify when calling requestfullscreen().
... view live examples watching for the enter key when the page is loaded, this code is run to
set up an event listener to watch for the enter key.
...alternate name alternate name uses the non-standard name: webkitisfullscreenfirefox full support 64 full support 64 no support 49 — 65disabled disabled from version 49 until version 65 (exclusive): this feature is behind the full-screen-api.unprefix.enabled preference (needs to be
set to true).
...And 9 more matches
HTMLElement - Web APIs
htmlorforeignelement.data
set read only returns a domstringmap with which script can read and write the element's custom data attributes (data-*) .
... htmlelement.dropzone read only returns a dom
settabletokenlist reflecting the dropzone global attribute and describing the behavior of the element regarding a drop operation.
... htmlelement.itemtype read only returns a dom
settabletokenlist… htmlelement.itemid is a domstring representing the item id.
...And 9 more matches
Dragging and Dropping Multiple Items - Web APIs
caution: all of the methods and properties with a moz prefix (such as moz
setdataat() are gecko specific interfaces.
...these are methods that mirror the types property as well as the getdata(),
setdata() and cleardata() methods, however, they take an additional argument that specifies the index of the item to retrieve, modify or remove.
...
setting and getting with indices the moz
setdataat() method allows you to add multiple items during a dragstart event.
...And 9 more matches
Recommended Drag Types - Web APIs
caution: all methods and properties in this document with a moz prefix, such as moz
setdataat(), will only work with gecko-based browsers.
...for example: event.datatransfer.
setdata("text/plain", "this is text to drag"); dragging text in textboxes and selections on web pages is done automatically by the browser, so you do not need to handle it yourself.
...for example: var dt = event.datatransfer; dt.
setdata("text/uri-list", "https://www.mozilla.org"); dt.
setdata("text/plain", "https://www.mozilla.org"); as usual,
set the text/plain type last, as a fallback for the text/uri-list type.
...And 9 more matches
KeyboardEvent() - Web APIs
keyboardeventinitoptional is a keyboardeventinit dictionary, having the following fields: "key", optional and defaulting to "", of type domstring, that
sets the value of keyboardevent.key.
... "code", optional and defaulting to "", of type domstring, that
sets the value of keyboardevent.code.
... "location", optional and defaulting to 0, of type unsigned long, that
sets the value of keyboardevent.location.
...And 9 more matches
Recording a media element - Web APIs
notice that the playback panel doesn't have autoplay
set (so the playback doesn't start as soon as media arrives), and it has controls
set, which tells it to show the user controls to play, pause, and so forth.
...
setting up global variables we start by establishing some global variables we'll need.
...the last, recordingtimems, is
set to 5000 milliseconds (5 seconds); this specifies the length of the videos we'll record.
...And 9 more matches
Taking still photos with WebRTC - Web APIs
initialization we start by wrapping the whole script in an anonymous function to avoid global variables, then
setting up various variables we'll be using.
... video.addeventlistener('canplay', function(ev){ if (!streaming) { height = video.videoheight / (video.videowidth/width); video.
setattribute('width', width); video.
setattribute('height', height); canvas.
setattribute('width', width); canvas.
setattribute('height', height); streaming = true; } }, false); this callback does nothing unless it's the first time it's been called; this is tested by looking at the value of our streaming variable, which is false the first time this method is ru...
... if this is indeed the first run, we
set the video's height based on the size difference between the video's actual size, video.videowidth, and the width at which we're going to render it, width.
...And 9 more matches
Using the Web Speech API - Web APIs
speechrecognitionlist.addfromstring(grammar, 1); we then add the speechgrammarlist to the speech recognition instance by
setting it to the value of the speechrecognition.grammars property.
... we also
set a few other properties of the recognition instance before we move on: speechrecognition.continuous: controls whether continuous results are captured (true), or just a single result each time recognition is started (false).
... speechrecognition.lang:
sets the language of the recognition.
...And 9 more matches
Using the Web Storage API - Web APIs
you can access these values like an object, or with the storage.getitem() and storage.
setitem() methods.
... these three lines all
set the (same) color
setting entry: localstorage.color
setting = '#a4509b'; localstorage['color
setting'] = '#a4509b'; localstorage.
setitem('color
setting', '#a4509b'); note: it's recommended to use the web storage api (
setitem, getitem, removeitem, key, length) to prevent the pitfalls associated with using plain objects as key-value stores.
...these mechanisms are available via the window.sessionstorage and window.localstorage properties (to be more precise, in supporting browsers the window object implements the windowlocalstorage and windowsessionstorage objects, which the localstorage and sessionstorage properties are members of) — invoking one of these will create an instance of the storage object, through which data items can be
set, retrieved, and removed.
...And 9 more matches
ARIA: grid role - Accessibility
aria-multiselectable if aria-multiselectable is
set to true, multiple items in the grid can be selected.
... aria-readonly if the user can navigate the grid but not change the value or values of the grid, the aria-readonly should be
set to true.
... page down moves focus down an author-determined number of rows, typically scrolling so the bottom row in the currently visible
set of rows becomes one of the first visible rows.
...And 9 more matches
ARIA: listbox role - Accessibility
all selected options have aria-selected
set to true.
... all options that are not selected have aria-selected
set to false.
... aria-multiselectable include and
set to true if the user can select more than one option.
...And 9 more matches
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
in this next example, i have a
set of floated cards.
... as a concession for older browsers, i have
set a min-height on the items, and hope that my content editors won’t add too much content and make a mess of the layout!
...however, the width i have assigned to the list items themselves still applies, and it now makes those items a third of the width of the track: if i re
set the width to auto, then this will stop the float behavior happening for older browsers.
...And 9 more matches
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
to round off this
set of guides to css grid layout, i am going to walk through a few different layouts, which demonstrate some of the different techniques you can use when designing with grid layout.
...as you can see from this
set of examples, there is often more than one way to achieve the result you want with grid layout.
...staying outside of any media queries i am now going to
set up the layout for the mobile width.
...And 9 more matches
border - CSS: Cascading Style Sheets
the border shorthand css property
sets an element's border.
... it
sets the values of border-width, border-style, and border-color.
... constituent properties this property is a shorthand for the following css properties: border-color border-style border-width syntax /* style */ border: solid; /* width | style */ border: 2px dotted; /* style | color */ border: out
set #f33; /* width | style | color */ border: medium dashed green; /* global values */ border: inherit; border: initial; border: un
set; the border property may be specified using one, two, or three of the values listed below.
...And 9 more matches
clamp() - CSS: Cascading Style Sheets
note that using clamp() for font sizes, as in these examples, allows you to
set a font-size that grows with the size of the viewport, but doesn't go below a minimum font-size or above a maximum font-size.
... the <body> element's width is
set as min(1000px, calc(70% + 100px)).
... this means that the width will be
set at 1000px, unless the result of calc(70% + 100px) is less than 1000px, in which case it will be
set to that value instead.
...And 9 more matches
revert - CSS: Cascading Style Sheets
thus, it re
sets the property to its inherited value if it inherits from its parent or to the default value established by the user agent's stylesheet (or by user styles, if any exist).
... if used within the user agent's default styles, this keyword is functionally equivalent to un
set.
... the revert keyword works exactly the same as un
set in many cases.
...And 9 more matches
transform-origin - CSS: Cascading Style Sheets
the transform-origin css property
sets the origin for an element's transformations.
... syntax /* one-value syntax */ transform-origin: 2px; transform-origin: bottom; /* x-off
set | y-off
set */ transform-origin: 3cm 2px; /* x-off
set-keyword | y-off
set */ transform-origin: left 2px; /* x-off
set-keyword | y-off
set-keyword */ transform-origin: right top; /* y-off
set-keyword | x-off
set-keyword */ transform-origin: top right; /* x-off
set | y-off
set | z-off
set */ transform-origin: 2px 30% 10px; /* x-off
set-keyword | y-off
set | z-off
set */ transform-origin: left 5px -3px; /...
...* x-off
set-keyword | y-off
set-keyword | z-off
set */ transform-origin: right bottom 2cm; /* y-off
set-keyword | x-off
set-keyword | z-off
set */ transform-origin: bottom right 2cm; /* global values */ transform-origin: inherit; transform-origin: initial; transform-origin: un
set; the transform-origin property may be specified using one, two, or three values, where each value represents an off
set.
...And 9 more matches
<input type="time"> - HTML: Hypertext Markup Language
you can
set a default value for the input by including a valid time in the value attribute when creating the <input> element, like so: <label for="appt-time">choose an appointment time: </label> <input id="appt-time" type="time" name="appt-time" value="13:30"> you can also get and
set the date value in javascript using the htmlinputelement.value property, for example: var timecontrol = document.queryse...
...if the specified string isn't a valid time, no maximum value is
set.
...if the value specified isn't a valid time string, no minimum value is
set.
...And 9 more matches
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
permitted parents <meta char
set>, <meta http-equiv>: a <head> element.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlmetaelement the type of metadata provided by the meta element can be one of the following: if the name attribute is
set, the meta element provides document-level metadata, applying to the whole page.
... if the http-equiv attribute is
set, the meta element is a pragma directive, providing information equivalent to what can be given by a similarly-named http header.
...And 9 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
however, this can be useful when creating media elements whose source will be
set at a later time, under user control.
... controlslist the controlslist attribute, when specified, helps the browser select what controls to show on the media element whenever the browser shows its own
set of controls (e.g.
...if the server does not give credentials to the origin site (by not
setting the access-control-allow-origin: http header), the image will be tainted, and its usage restricted.
...And 9 more matches
HTML elements reference - HTML: Hypertext Markup Language
it groups a
set of <h1>–<h6> elements.
... <i> the html idiomatic text element (<i>) represents a range of text that is
set off from the normal text for some reason, such as idiomatic text, technical terms, taxonomical designations, among others.
... <tbody> the html table body element (<tbody>) encapsulates a
set of table rows (<tr> elements), indicating that they comprise the body of the table (<table>).
...And 9 more matches
Autoplay guide for media and Web Audio APIs - Web media technologies
autoplay availability as a general rule, you can assume that media will be allowed to autoplay only if at least one of the following is true: the audio is muted or its volume is
set to 0 the user has interacted with the site (by clicking, tapping, pressing keys, etc.) if the site has been whitelisted; this may happen either automatically if the browser determines that the user engages with media frequently, or manually through preferences or other user interface features if the autoplay feature policy is used to grant autoplay support to an <iframe> and its document.
...this
sets the autoplay property on the element to true, and when autoplay is true, the media will automatically begin to play as soon as possible after the following have occurred: the page is allowed to use autoplay functionality the element has been created during page load enough media has been received to begin playback and continue to play through to the end of the media without interruption, as...
...nor is there an exception thrown or a callback you can
set up or even a flag on the media element that tells you if autoplay worked.
...And 9 more matches
dev/panel - Archive of obsolete content
you can
set the constructor up manually if you like, or you can use the add-on sdk core/heritage module to simplify the mechanics of inheriting from panel.
... you can use the class utility function: const { panel } = require("dev/panel"); const { class } = require("sdk/core/heritage"); const mypanel = class({ extends: panel, label: "my panel", tooltip: "my new devtool", icon: "./my-devtool.png", url: "./my-devtool.html",
setup: function(options) { // my
setup goes here }, dispose: function() { // my teardown goes here }, onready: function() { // i can send messages to // the panel document here } }); alternatively, you can use the extend function: const { extend } = require("sdk/core/heritage"); function mypanel() {}; mypanel.prototype = extend(panel.prototype, { label: "my panel", tooltip: "...", ....
... optional
setup function a function that will be called when the panel is created.
...And 8 more matches
JavaScript timers - Archive of obsolete content
but there are some javascript native functions (timers) which allow us to delay the execution of arbitrary instructions:
settimeout()
setinterval()
setimmediate() requestanimationframe() the
settimeout() function is commonly used if you wish to have your function called once after the specified delay.
... the
setinterval() function is commonly used to
set a delay for functions that are executed again and again, such as animations.
... the
setimmediate() function can be used instead of the
settimeout(fn, 0) method to execute heavy operations in ie.
...And 8 more matches
Adding Events and Commands - Archive of obsolete content
for example: <button label="&xulschoolhello.defaultgreeting.label;" oncommand="xulschoolchrome.browseroverlay.changegreeting(event);" /> then on the javascript code you would have something like this: changegreeting : function(aevent) { // more stuff aevent.target.
setattribute("label", somenewgreeting); } the target in this example is the button element, so clicking on it will change its text.
... first you need to add a broadcaster element to your xul code, as a child of a broadcaster
set element.
... <broadcaster
set id="xulschoolhello-broadcaster
set"> <broadcaster id="xulschoolhello-online-broadcaster" /> </broadcaster
set> these elements are completely invisible, so you can put them anywhere.
...And 8 more matches
Custom XUL Elements with XBL - Archive of obsolete content
person.
setattribute("name", name); person.
setattribute("greeting", greeting); // ...
...}, this is where the advantage of xbl is obvious: we only need to create a single node and
set some attributes.
... the xbl:inherits attribute lets your inner xul use the attributes that are
set on the node.
...And 8 more matches
Search Extension Tutorial (Draft) - Archive of obsolete content
changing default search
setting from extensions many add-ons, for monetization or other reasons, change several search-related
settings at install time.
...due to the large volume of user complaints regarding hidden
settings being changed against their will, and not being restored after the add-ons responsible are disabled, mozilla will take any steps necessary to mitigate the impact of offending add-ons.
... in particular, changing the location bar search keyword url in a way which is not automatically re
set when the add-on is removed will result in a re
set prompt for users.
...And 8 more matches
Index of archived content - Archive of obsolete content
s javascript daemons management label and description lookupnamespaceuri lookupprefix miscellaneous modules on page load page loading post data to window preferences progress listeners queryselector ro
setta running applications svg animation svg general scrollbar sidebar stringview tabbox toolbar tree uri parsing view source for xul applications windows xml-related code snippets xml:base support in old ...
...tensions and themes from web pages interaction between privileged and non-privileged pages jetpack processes legacy add-ons legacy extensions for firefox for android api accounts.jsm browserapp addtab clo
setab deck getbrowserfordocument getbrowserforwindow gettabforbrowser gettabforid gettabforwindow loaduri quit selecttab tabs helperapps.jsm home.jsm ...
... connecting to remote content custom xul elements with xbl getting started with firefox extensions handling preferences intercepting page loads introduction javascript object management local storage mozilla documentation roadmap observer notifications
setting up a development environment the box model the essentials of an extension useful mozilla community sites user notifications and alerts xpcom objects performance best practices in extensions search extension tutorial (draft) security best practic...
...And 8 more matches
Monitoring downloads - Archive of obsolete content
setting up when the extension loads, it will do some housekeeping chores.
... the end time and download speed // are both
set to 0 at first, since we don't know those yet.
....opendatabase(this.dbfile); statement = dbconn.createstatement("replace into items values " + "(?1, ?2, ?3, 0, 0.0, 0)"); statement.bindstringparameter(0, adownload.source.spec); statement.bindint64parameter(1, adownload.size); statement.bindint64parameter(2, adownload.starttime); statement.execute(); statement.re
set(); dbconn.close(); break; // record the completion (whether failed or successful) of the download case components.interfaces.nsidownloadmanager.download_finished: case components.interfaces.nsidownloadmanager.download_failed: case components.interfaces.nsidownloadmanager.download_canceled: this.logtransfercompleted(adownload); break; } }, we...
...And 8 more matches
Building accessible custom components in XUL - Archive of obsolete content
(the firefox interface itself is built in xul, as well as the graphical interface presented by firefox extensions.) xul itself has a much richer
set of built-in controls than html.
...(technically, it draws the border inside the element instead of outside.) <code> grid.spreadsheet description:focus, grid.spreadsheet label:focus { outline: 1px dotted black; outline-off
set: -2px; } </code> however, neither of those are our biggest problem.
...we need to
set the containing grid to be focusable, which will put the spreadsheet itself in the tab order.
...And 8 more matches
OpenClose - Archive of obsolete content
the menu element has an open property which may be
set to true to open the menu, or false to close the menu.
... a menu may be closed by a script by
setting the open property to false, the reverse of what would be done to open the menu.
...if both menus are open and the open property on the submenu is
set to false, the submenu will close, yet the parent file menu will remain open.
...And 8 more matches
Element Positioning - Archive of obsolete content
note that the css global skin of the xul application may also specify a min-width for the buttons and other elements, thus if simply
setting the width property does not
set the button width as you expect, try also to modify the button min-width property.
... by
setting either of the two properties, the element will be created with that width and height.
... flexible elements are those that have a flex attribute
set to a value greater than 0.
...And 8 more matches
Using the Editor from XUL - Archive of obsolete content
now we
set up the editorshell by calling its init() method, telling it what type of editor we want (text or html), pointing it at the webshellwindow to use, and telling it the content node that it lives on: editorshell.init(); editorshell.
seteditortype(editortype); editorshell.webshellwindow = window; editorshell.contentwindow = window._content; the webshellwindow (a
settable attribute on nsieditorshe...
... the contentwindow (another
settable attribute on nsieditorshell) points to the xul element which is to become editable.
... editorstartup() does some other minor bits of
setup before finally kicking off the url load, which the most important part here.
...And 8 more matches
The Implementation of the Application Object Model - Archive of obsolete content
the html content tree structure for a single document is represented as a
set of objects that can be accessed and manipulated.
...in a similar fashion, xul's content tree for a single window is represented as a
set of objects that can be accessed and manipulated.
...if xul is dropped from the picture, then dialogs would have to be described using native widgetry (unless you're willing to design an html dialog system, which still wouldn't cut it without extending html), and communicator would have to ship with both widget
sets.
...And 8 more matches
label - Archive of obsolete content
attributes accesskey, control, crop, disabled, href, value properties accesskey, accessibletype, control, crop, disabled, value style classes header, indent, monospace, plain, small-margin, text-link examples <label value="email address" control="email"/> <textbox id="email"/> attributes accesskey type: character this should be
set to a character that is used as a shortcut key.
... depending on the platform and theme being used, some elements will have
set a maximum width so they will always appear cropped.
...if this attribute is
set, the element is disabled.
...And 8 more matches
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
following standards is certainly not a new organizational phenomenon; organizations require their employees to follow common rules, or a common
set of standards all the time.
...all businesses are expected and required to follow the guidelines
set forth by the fasb.
... interoperability the key to interoperability is
settling on a standard that has a potential for long-term use.
...And 8 more matches
Advanced styling effects - Learn web development
the css: p { margin: 0; } article { max-width: 500px; padding: 10px; background-color: red; background-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.25)); } .simple { box-shadow: 5px 5px 5px rgba(0,0,0,0.7); } this gives us the following result: you'll see that we've got four items in the box-shadow property value: the first length value is the horizontal off
set — the distance to the right the shadow is off
set from the original box (or left, if the value is negative).
... the second length value is the vertical off
set — the distance downwards that the shadow is off
set from the original box (or upwards, if the value is negative).
... other box shadow features unlike text-shadow, box-shadow has an in
set keyword available — putting this at the start of a shadow declaration causes it to become an inner shadow, rather than an outer shadow.
...And 8 more matches
What’s in the head? Metadata in HTML - Learn web development
let's revisit the simple html document we covered in the previous article: <!doctype html> <html> <head> <meta char
set="utf-8"> <title>my test page</title> </head> <body> <p>this is my page</p> </body> </html> the html head is the contents of the <head> element — unlike the contents of the <body> element (which are displayed on the page when loaded in a browser), the head's content is not displayed on the page.
...in the above example, the head is quite small: <head> <meta char
set="utf-8"> <title>my test page</title> </head> in larger pages however, the head can get quite full.
... specifying your document's character encoding in the example we saw above, this line was included: <meta char
set="utf-8"> this element simply specifies the document's character encoding — the character
set that the document is permitted to use.
...And 8 more matches
Getting started with Svelte - Learn web development
we will see how svelte works and what
sets it apart from the rest of the frameworks and tools we've seen so far.
... then we will learn how to
setup our development environment, create a sample app, understand the structure of the project, and see how to run it locally and build it for production.
... objective: to
setup a local svelte development environment, create and build a starter app, and understand the basics of how it works.
...And 8 more matches
Handling common JavaScript problems - Learn web development
note: eslint takes a bit more
setup and configuration than jshint, but it is more powerful too.
... under breakpoints, you'll see the details of the break-point you have
set.
...this
settles it — our xmlhttprequest call is returning the json as text, not json.
...And 8 more matches
Creating Sandboxed HTTP Connections
setting up an http connection the first step in
setting up an http connection from an url (stored in a string) is to create an nsiuri out of it.
...amlistener(callbackfunc); gchannel.notificationcallbacks = listener; gchannel.asyncopen(listener, null); function streamlistener(acallbackfunc) { this.mcallbackfunc = acallbackfunc; } streamlistener.prototype = { mdata: "", // nsistreamlistener onstartrequest: function (arequest, acontext) { this.mdata = ""; }, ondataavailable: function (arequest, acontext, astream, asourceoff
set, alength) { var scriptableinputstream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); scriptableinputstream.init(astream); this.mdata += scriptableinputstream.read(alength); }, onstoprequest: function (arequest, acontext, astatus) { if (components.issuccesscode(astatus)) { // re...
...in order to manipulate cookies, the nsichannel needs to be converted into a nsihttpchannel by using queryinterface (qi): var httpchannel = asubject.queryinterface(components.interfaces.nsihttpchannel); cookies are actually part of the http header, nsihttpchannel provides four methods for working with headers: two for getting and
setting request headers, and two for getting and
setting response headers.
...And 8 more matches
Error codes returned by Mozilla APIs
ns_error_null_pointer (0x80004003) an error occurred because a value was
set to null when this was not expected.
... ns_error_file_unrecognized_path (0x80520001) this error occurs when an attempt is made to
set a path that isn't valid for the platform.
... ns_error_file_access_denied (0x80520015) an operation was not performed on a file because the file cannot be accessed, typically because the permissions
set for the file do not allow the operation.
...And 8 more matches
JNI.jsm
working with arrays creating/preallocating a typed array methods cdata .get(number aindex); cdata .getelements(number astart, number alength); void .
set(number aindex, cdata avalue); void .
setelements(number astart, [array, size_is(arr.length > number anynumber > 0)] in cdata avalsarray); .get() gets the value of the element in the array at given aindex.
... void
setelements(number astart, number alength); parameters astart the position to start
setting elements of the array in.
... .
set()
sets an element in the array at given aindex to the given aval.
...And 8 more matches
QA phase
note: remember all of those pre-requisite tools we asked you to install in the initial
setup?
... please either follow the above structure closely or adjust the commands below according to your custom
setup.
...
set your language using the quick locale switcher or locale switcher add-ons by navigating to tools->language->your localization's language code.
...And 8 more matches
NSS API Guidelines
currently, ocsp checking
settings are exported through certhi.
...fortezza is a
set of security algorithms, used by the u.s.
... here is an example from lib/base/ba
set.h: #ifdef debug static const char ba
set_cvs_id[] = "@(#) $rcsfile: nss-guidelines.html, v $ $revision: 48936 $ $date: 2009-08-11 07:45:57 -0700 (tue, 11 aug 2009) $ $name$"; #endif /* debug */ the difference, between this and id, is that id has some useless information (every file is "experimental"), and doesn't have name.
...And 8 more matches
NSS PKCS11 Functions
secmod_loadusermodule secmod_unloadusermodule secmod_openuserdb secmod_closeuserdb pk11_findcertfromnickname pk11_findkeybyanycert pk11_getslotname pk11_gettokenname pk11_ishw pk11_ispresent pk11_isreadonly pk11_
setpasswordfunc secmod_loadusermodule load a new pkcs #11 module based on a modulespec.
...this pointer is
set with ssl_
setpkcs11pinarg during ssl configuration.
...the pk11_findcertfromnickname function calls the password callback function
set with pk11_
setpasswordfunc and passes it the pointer specified by the wincx parameter.
...And 8 more matches
pkfnc.html
pk11_findcertfromnickname pk11_findkeybyanycert pk11_getslotname pk11_gettokenname pk11_ishw pk11_ispresent pk11_isreadonly pk11_
setpasswordfunc pk11_findcertfromnickname finds a certificate from its nickname.
...this pointer is
set with ssl_
setpkcs11pinarg during ssl configuration.
... the pk11_findcertfromnickname function calls the password callback function
set with pk11_
setpasswordfunc and passes it the pointer specified by the wincx parameter.
...And 8 more matches
Web Replay
getting started to enable web replay (macos and firefox nightly only), go to devtools
settings and select "enable webreplay".
... rewind to breakpoint when paused, if there are any breakpoints
set then the rewind button will run back and stop at the last time a breakpoint was
set.
... mainly, pointer values may differ between recording and replay, and the points where gcs occur, and the
set of objects collected, may differ.
...And 8 more matches
nsIFocusManager
adeep, out nsidomwindow afocusedwindow); pruint32 getlastfocusmethod(in nsidomwindow window); void movecarettofocus(in nsidomwindow awindow); void elementisfocusable(in nsidomelement aelement, in unsigned long aflags); nsidomelement movefocus(in nsidomwindow awindow, in nsidomelement astartelement, in unsigned long atype, in unsigned long aflags); void
setfocus(in nsidomelement aelement, in unsigned long aflags); void windowhidden(in nsidomwindow awindow); native code only!
...
setting the activewindow raises it, and focuses the current child window's current element, if any.
...
setting this to null or to a non-top-level window throws an ns_error_invalid_arg exception.
...And 8 more matches
nsIMicrosummaryService
ry/service;1"] .getservice(components.interfaces.nsimicrosummaryservice); method overview void addgenerator(in nsiuri generatoruri); nsimicrosummary createmicrosummary(in nsiuri pageuri, in nsiuri generatoruri); nsisimpleenumerator getbookmarks(); nsimicrosummarygenerator getgenerator(in nsiuri generatoruri); nsimicrosummary
set getmicrosummaries(in nsiuri pageuri, in long long bookmarkid); nsimicrosummary getmicrosummary(in long long bookmarkid); boolean hasmicrosummary(in long long bookmarkid); nsimicrosummarygenerator installgenerator(in nsidomdocument xmldefinition); boolean ismicrosummary(in long long bookmarkid, in nsimicrosummary microsummary); nsimicrosummary refreshmi...
...crosummary(in long long bookmarkid); void removemicrosummary(in long long bookmarkid); void
setmicrosummary(in long long bookmarkid, in nsimicrosummary microsummary); methods addgenerator() install the microsummary generator from the resource at the supplied uri.
...getbookmarks() get the
set of bookmarks with microsummaries.
...And 8 more matches
nsIMsgDatabase
last changed in gecko 1.9 (firefox 3) inherits from: nsidbchangeannouncer method overview void open(in nsilocalfile afoldername, in boolean acreate, in boolean aleaveinvaliddb); void forcefolderdbclosed(in nsimsgfolder afolder); void close(in boolean aforcecommit); void commit(in nsmsgdbcommit committype); void forceclosed(); void clearcachedhdrs; void re
sethdrcachesize(in unsigned long size); nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); nsimsgdbhdr getmsghdrformessageid(in string messageid); boolean containskey(in nsmsgkey key); nsimsgdbhdr createnewhdr(in nsmsgkey key); void addnewhdrtodb(in nsimsgdbhdr newhdr, in boolean notify); nsimsgdbhdr copyhdrfromexistinghdr(in nsmsgkey key, in nsimsgdbhdr existinghdr, in boolean addhdrtodb); ...
...it); void deleteheader(in nsimsgdbhdr msghdr, in nsidbchangelistener instigator,in boolean commit, in boolean notify); void removeheadermdbrow(in nsimsgdbhdr msghdr); void undodelete(in nsimsgdbhdr msghdr); void markmarked(in nsmsgkey key, in boolean mark, in nsidbchangelistener instigator); void markoffline(in nsmsgkey key, in boolean offline, in nsidbchangelistener instigator); void
setlabel(in nsmsgkey key, in nsmsglabelvalue label); void
setstringproperty(in nsmsgkey akey, in string aproperty, in string avalue); void markimapdeleted(in nsmsgkey key, in boolean deleted, in nsidbchangelistener instigator); void applyretention
settings(in nsimsgretention
settings amsgretention
settings, in boolean adeleteviafolder); boolean hasnew(); void clearnewlist(in boolean notify); ...
... void
setattributesonpendinghdr(in nsimsgdbhdr pendinghdr, in string property, in string propertyval, in long flags); void createcollationkey(in astring sourcestring, out octetptr key, out unsigned long len); native code only!
...And 8 more matches
nsIUTF8ConverterService
inherits from: nsisupports last changed in gecko 1.7 method overview autf8string convertstringtoutf8(in acstring astring, in string achar
set, in boolean askipcheck); autf8string converturispectoutf8(in acstring aspec, in string achar
set); methods convertstringtoutf8() ensure that astring is encoded in utf-8.
... if not, convert to utf-8 assuming it's encoded in achar
set and return the converted string in utf-8.
... autf8string convertstringtoutf8( in acstring astring, in string achar
set, in boolean askipcheck, in boolean aallowsubstitution ); parameters astring a string to ensure its utf8ness.
...And 8 more matches
nsIWebProgressListener
this flag is
set when a request is initiated.
... the request is complete when onstatechange() is called for the same request with the state_stop flag
set.
...this flag is
set in addition to state_is_request.
...And 8 more matches
nsIXPConnect
sobjectptr anewscope); obsolete since gecko 1.9.1 nsixpconnectjsobjectholder reparentwrappednativeiffound(in jscontextptr ajscontext, in jsobjectptr ascope, in jsobjectptr anewparent, in nsisupports acomobj); void restorewrappednativeprototype(in jscontextptr ajscontext, in jsobjectptr ascope, in nsiclassinfo aclassinfo, in nsixpconnectjsobjectholder aprototype); void
setdebugmodewhenpossible(in prbool mode); native code only!
... void
setdefaultsecuritymanager(in nsixpcsecuritymanager amanager, in pruint16 flags); nsixpcfunctionthistranslator
setfunctionthistranslator(in nsiidref aiid, in nsixpcfunctionthistranslator atranslator); void
setreportalljsexceptions(in boolean reportalljsexceptions); void
setsafejscontextforcurrentthread(in jscontextptr cx); void
setsecuritymanagerforjscontext(in jscontextptr ajscontext, in nsixpcsecuritymanager amanager, in pruint16 flags); void syncjscontexts(); void updatexows(in jscontextptr ajscontext, in nsixpconnectwrappednative aobject, in pruint32 away); native code only!
... cx the context to use when
setting up the evaluation of the script.
...And 8 more matches
XPIDL
ing only chars in range \u0000-\u00ff permitted most of the time you don't want to use this type but autf8string or acstring unsigned long uint32_t uint32_t* number unsigned long long uint64_t uint64_t* number unsigned short uint16_t uint16_t* number wchar char16_t char16_t* string full unicode
set permitted wstring const char16_t* char16_t** string full unicode
set permitted most of the time you don't want to use this type but astring.
... nsqiresult void* void** object should only be used with methods that act like queryinterface autf8string const nsacstring& nsacstring& string full unicode
set permitted (translated to utf-8) acstring const nsacstring& nsacstring& string only chars in range \u0000-\u00ff permitted astring const nsastring& nsastring& string full unicode
set permitted jsval const jsval& jsval* anything jsid jsid jsid* not allowed promise mozilla::dom::promise* mozilla::dom...
...attributes in idl are akin to javascript properties, in that they are a getter and (optionally) a
setter pair.
...And 8 more matches
DOM Inspector internals - Firefox Developer Tools
dom inspector from a high-level perspective the dom inspector primary ui consists of some toolbars and a panel
set.
... the panel
set contains two panels.
...(internally, a panel may be loosely referred to as a "pane", but a panel
set is always referred to as a "panel
set".) a panel's purpose is to manage available viewers.
...And 8 more matches
Break on DOM mutation - Firefox Developer Tools
a dom mutation breakpoint pauses the code when the dom node on which you have
set the breakpoint is modified.
... you
set a dom mutation breakpoint in the page inspector.
... navigate to the dom node in which you are interested and use the context menu to
set the breakpoint.
...And 8 more matches
Debugger.Source - Firefox Developer Tools
the text generation is disabled if the debugger has the allowwasmbinarysource property
set, the "[wasm]" value will be returned in this case.
... binary if the instance refers to webassembly code and the debugger has the allowwasmbinarysource property
set, a uint8array that contains the webassembly bytecode.
... (on the web, the translator may provide the source map url in a specially formatted comment in the javascript source code, or via a header in the http reply that carried the generated javascript.) this property is writable, so you can change the source map url by
setting it.
...And 8 more matches
Responsive Design Mode - Firefox Developer Tools
controlling responsive design mode with responsive design mode enabled, the content area for web pages is
set to the screen size for a mobile device.
... initially, it's
set to 320 x 480 pixels.
...from left to right, the display includes: name of the selected device - a drop-down list that includes whatever devices you have selected from the device
settings screen.
...And 8 more matches
HTMLFormElement - Web APIs
only specified values can be
set.
...only specified values can be
set.
... htmlformelement.acceptchar
set a domstring reflecting the value of the form's accept-char
set html attribute, representing the character encoding that the server accepts.
...And 8 more matches
PannerNode - Web APIs
the orientation and position value are
set and retrieved using different syntaxes, since they're stored as audioparam values.
...while
setting the same property is done with pannernode.positionx.value.
... pannernode.
setposition() defines the position of the audio source relative to the listener (represented by an audiolistener object stored in the audiocontext.listener attribute.) pannernode.
setorientation() defines the direction the audio source is playing in.
...And 8 more matches
WebGL2RenderingContext.texSubImage3D() - Web APIs
syntax void gl.texsubimage3d(target, level, xoff
set, yoff
set, zoff
set, width, height, depth, format, type, arraybufferview?
... srcdata, optional srcoff
set); void gl.texsubimage3d(target, level, xoff
set, yoff
set, zoff
set, width, height, depth, format, type, imagebitmap?
... pixels); void gl.texsubimage3d(target, level, xoff
set, yoff
set, zoff
set, width, height, depth, format, type, imagedata?
...And 8 more matches
Keyframe Formats - Web APIs
element.animate(), keyframeeffect.keyframeeffect(), and keyframeeffect.
setkeyframes() all accept objects formatted to represent a
set of keyframes.
... element.animate([ { // from opacity: 0, color: "#fff" }, { // to opacity: 1, color: "#000" } ], 2000); off
sets for each keyframe can be specified by providing an off
set value.
... element.animate([ { opacity: 1 }, { opacity: 0.1, off
set: 0.7 }, { opacity: 0 } ], 2000); note: off
set values, if provided, must be between 0.0 and 1.0 (inclusive) and arranged in ascending order.
...And 8 more matches
Web Audio API best practices - Web APIs
it has cross-browser support and, provides a useful sub
set of functionality.
... when working with an audiocontext, if you create the audio context from inside a click event the state should automatically be
set to running.
... here is a simple example of creating the context from inside a click event: const button = document.queryselector('button'); button.addeventlistener('click', function() { const audioctx = new audiocontext(); }, false); if however, you create the context outside of a user gesture, its state will be
set to suspended and it will need to be started after user interaction.
...And 8 more matches
Visualizations with Web Audio API - Web APIs
creating a waveform/oscilloscope to create the oscilloscope visualisation (hat tip to soledad penadés for the original code in voice-change-o-matic), we first follow the standard pattern described in the previous section to
set up the buffer: analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); next, we clear the canvas of what had been drawn on it before to get ready for the new visualization display: canvasctx.clearrect(0, 0, width, height); we now define the draw() function: function draw() { in here, we use requestanimationframe() to keep looping...
... the drawing function once it has been started: var drawvisual = requestanimationframe(draw); next, we grab the time domain data and copy it into our array analyser.getbytetimedomaindata(dataarray); next, fill the canvas with a solid colour to start canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height);
set a line width and stroke colour for the wave we will draw, then begin drawing a path canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); determine the width of each segment of the line to be drawn by dividing the canvas width by the array length (equal to the frequencybincount, as defined earlier on), then define an x variable to define the position to move to for drawing each segment of the line.
... first, we again
set up our analyser and data array, then clear the current canvas display with clearrect().
...And 8 more matches
XPathResult.resultType - Web APIs
constants result type defined constant value description any_type 0 a result
set containing whatever type naturally results from evaluation of the expression.
... note that if the result is a node-
set then unordered_node_iterator_type is always the resulting type.
... unordered_node_iterator_type 4 a result node-
set containing all the nodes matching the expression.
...And 8 more matches
XPathResult - Web APIs
methods xpathresult.iteratenext() if the result is a node
set, this method iterates over it and returns the next node from it or null if there are no more nodes.
... constants result type defined constant value description any_type 0 a result
set containing whatever type naturally results from evaluation of the expression.
... note that if the result is a node-
set then unordered_node_iterator_type is always the resulting type.
...And 8 more matches
ARIA: tab role - Accessibility
when working with elements with the tab role, when they are selected or active, they should have their aria-selected attribute
set to true, otherwise it should be
set to false.
... when a tab is selected or active, its controlled tabpanel should have its aria-expanded and hidden attributes
set to true, otherwise they should be
set to false.
... required javascript features while there are ways to build tab-like functionality without javascript, there are no substitute combination of html and css only that will provide the same
set of functionality that's required above for accessible tabs with content.
...And 8 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
a
set of system messages that confer accessibility-related events such as focus changes, changes to document content and state changes in ui objects like checkboxes.
...at least one major screen reader has a feature to turn highlight tracking off, but that's only a global
setting, and turning off highlight tracking globally also turns off the speaking of menu items.
...for example, when you
set window focus, windows will generate an event_object_focus event an a role_window object it also generated for you.
...And 8 more matches
Using CSS animations - CSS: Cascading Style Sheets
animations consist of two components, a style describing the css animation and a
set of keyframes that indicate the start and end states of the animation’s style, as well as possible intermediate waypoints.
... animation-direction configures whether or not the animation should alternate direction on each run through the sequence or re
set to the start point and repeat itself.
...to avoid this problem put the element to be animated in a container, and
set overflow:hidden on the container.
...And 8 more matches
Box alignment in Flexbox - CSS: Cascading Style Sheets
the first item overrides the align-items values
set on the group by
setting align-self to center.
... the axes and flex-direction flexbox respects the writing mode of the document, therefore if you are working in english and
set justify-content to flex-end this will align the items to the end of the flex container.
... if you are working with flex-direction
set to row, this alignment will be in the inline direction.
...And 8 more matches
CSS Box Alignment - CSS: Cascading Style Sheets
the first item overrides the align-items value
set on the group by
setting align-self to center.
...the first item overrides the align-items
set on the group by
setting align-self to center.
... when aligning items on the inline axis you will use the properties which begin with justify-: justify-items justify-self justify-content when aligning items on the block axis you will use the properties that begin align-: align-items align-self align-content flexbox adds an additional complication in that the above is true when flex-direction is
set to row.
...And 8 more matches
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
" "a a a a b b b b" "c c c c d d d d" "c c c c d d d d"; align-items: start; } .item1 { grid-area: a; } .item2 { grid-area: b; } .item3 { grid-area: c; } .item4 { grid-area: d; } <div class="wrapper"> <div class="item1">item 1</div> <div class="item2">item 2</div> <div class="item3">item 3</div> <div class="item4">item 4</div> </div> keep in mind that once you
set align-items: start, the height of each child <div> will be determined by the contents of the <div>.
... the align-items property
sets the align-self property for all of the child grid items.
... this means that you can
set the property individually, by using align-self on a grid item.
...And 8 more matches
<input type="color"> - HTML: Hypertext Markup Language
note:
setting the value to anything that isn't a valid, fully-opaque, rgb color in hexadecimal notation will result in the value being
set to #000000.
... in particular, you can't use css's standardized color names, or any css function syntax, to
set the value.
...#009900aa) will also result in the color being
set to #000000.
...And 8 more matches
<input type="month"> - HTML: Hypertext Markup Language
you can
set a default value for the input control by including a month and year inside the value attribute, like so: <label for="bday-month">what month were you born in?</label> <input id="bday-month" type="month" name="bday-month" value="2017-06"> one thing to note is that the displayed date format differs from the actual value; most user agents display the month and year in a locale-appropriate form,...
... based on the
set locale of the user's operating system, whereas the date value is always formatted yyyy-mm.
... you can also get and
set the date value in javascript using the htmlinputelement.value property, for example: <label for="bday-month">what month were you born in?</label> <input id="bday-month" type="month" name="bday-month" value="2017-06"> var monthcontrol = document.queryselector('input[type="month"]'); monthcontrol.value = '1978-06'; additional attributes in addition to the attributes common to <input> elements, month inputs offer the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the latest year and month to accept as a valid input ...
...And 8 more matches
<input type="text"> - HTML: Hypertext Markup Language
events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size idl attributes list, value methods select(),
setrangetext() and
setselectionrange().
...its value can, however, still be changed by javascript code directly
setting the htmlinputelement.value property.
...since character widths vary, this may or may not be exact and should not be relied upon to be so; the resulting input may be narrower or wider than the specified number of characters, depending on the characters and the font (font
settings in use).
...And 8 more matches
Focus management with Vue refs - Learn web development
to give users a better experience, we'll add code to control the focus so that it gets
set to the edit field when the edit form is shown.
...in order to
set focus, we need to understand a little bit more about how vue works internally.
... instead, if you need to access the underlying dom nodes (like when
setting focus), you can use vue refs.
...And 7 more matches
How Mozilla's build system works
there is roughly one moz.build file per directory or per
set of related directories.
...the execution environment is strictly controlled, so moz.build files can only perform a limited
set of operations.
... assigning to a well-defined
set of variables whose name is uppercase.
...And 7 more matches
Gecko Logging
if (moz_log_test(slogger, loglevel::warning)) { int elapsed = time::nowms() - start; if (elapsed > 1000) { moz_log(slogger, loglevel::warning, ("loop took %dms!", elapsed)); } } if (i != 10) { moz_log(slogger, loglevel::error, ("i should be 10!")); } } enabling logging the log level for a module is controlled by
setting an environment variable before launching the application.
... it can also be adjusted by
setting prefs.
...
set moz_log="example_logger:3" in the windows command prompt (cmd.exe), don't use quotes:
set moz_log=example_logger:3 if you want this on geckoview example, use the following adb command to launch process: adb shell am start -n org.mozilla.geckoview_example/.geckoviewactivity --es env0 "moz_log=example_logger:3" there are special module names to change logging behavior.
...And 7 more matches
Performance best practices for Firefox front-end engineers
hide your panels if you’re adding a new xul <xul:popup> or <xul:panel> to a document,
set the hidden attribute to true by default.
... return window.getcomputedstyle(node).display; }); return display == "none"; } see detecting and avoiding synchronous reflow for a more advanced example of getting layout information, and then
setting it safely, without causing flushes.
... here’s a simple example, cribbed from this blog post by paul rouget: div1.style.margin = "200px"; // line 1 var height1 = div1.clientheight; // line 2 div2.classlist.add("foobar"); // line 3 var height2 = div2.clientheight; // line 4 dosomething(height1, height2); // line 5 at line 1, we’re
setting some style information on a dom node that’s going to result in a reflow - but (at just line 1) it’s okay, because that reflow will happen after the style calculation.
...And 7 more matches
Embedding Tips
normally it provide some functionality that is required from lots of places such as looking up preference
settings, creating new windows, locating files, displaying prompt or password dialog boxes and so on.
...call the nsiwebbrowserprint::print() method supplying a print
settings object (e.g.
... that returned from nsiwebbrowserprint::getglobalprint
settings) that you wish to print the page with.
...And 7 more matches
L10n Checks
the easiest way is to just run: $ hg clone http://hg.mozilla.org/users/akalla_aviary.pl/silme-patched/ $ cd silme-patched/ $ sudo python
setup.py install or, if you're on windows: $ hg clone http://hg.mozilla.org/users/akalla_aviary.pl/silme-patched/ $ cd silme-patched/ $ python
setup.py install running it mercurial source (source) mode l10n checks gathers the directories to compare from an ini file, usually found in $app/locales/l10n.ini.
...ab-cd browser chrome/browser browser.dtd +backforwardmenu.tooltip +fullzoomenlargecmd.commandkey3 +fullzoomreducecmd.commandkey2 +fullzoomre
setcmd.commandkey2 +organizebookmarks.label -showallbookmarkscmd2.label migration/migration.dtd -importfromfile.accesskey -importfromfile.label +importfromhtmlfile.accesskey +importfromhtmlfile.label you can assume changed strings when you see entities removed and added with a similar name.
...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 lo...
...And 7 more matches
GC and CC logs
you'll need to disable sandboxing by
setting moz_disable_content_sandbox=t when you run firefox.
...you'll need to disable sandboxing by
setting moz_disable_content_sandbox=t when you run firefox.
... on desktop firefox you can override the default location of the log files by
setting the moz_cc_log_directory environment variable.
...And 7 more matches
SpiderMonkey 1.8
a handful of changes are not backwards-compatible: the result of assigning to a property with a
setter has changed (bug 312354).
... the security apis js_
setcheckobjectaccesscallback, js_
setprincipalstranscoder, and js_
setobjectprincipalsfinder are still present but are deprecated in this release.
... in spidermonkey 1.8.1 they will be removed and replaced with a new
set of apis (js_getsecuritycallbacks and friends, bug 451729).
...And 7 more matches
A Web PKI x509 certificate primer
in general, x509 certificates bind a signature to a validity period, a public key, a subject, an issuer, and a
set of extensions.
...for ca certificates the keycertsign bit must be
set.
...self-sign csr (using sha256) and append the extensions described in the file "openssl x509 -req -sha256 -days 3650 -in example.csr -signkey key.pem -
set_serial $any_integer -extfile openssl.ss.cnf -out example.pem" you can now use example.pem as your certfile cas included in firefox when you visit a secure website, firefox will validate the website’s certificate by checking that the certificate that signed it is valid, and checking that the certificate that signed the parent certificate is valid and so forth up to a root certificate that...
...And 7 more matches
Using the Places history service
nsinavhistoryservice: complex query functions, more fine-grained getters and
setters.
...new code should use nsinavhistoryservice.
setpagedetails.
... nsinavhistoryservice.addvisit: this is an advanced function that allows the caller to
set the exact referring visit, the time, the session, etc.
...And 7 more matches
nsINavHistoryQueryOptions
excludequeries boolean
set to true to exclude queries ("place:" uris) from the query results.
... excludereadonlyfolders boolean
set to true to exclude read-only folders from the query results.
... expandqueries boolean when
set, allows items with "place:" uris to appear as containers, with the container's contents filled in from the stored query.
...And 7 more matches
nsIProtocolHandler
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean allowport(in long port, in string scheme); nsichannel newchannel(in nsiuri auri); nsiuri newuri(in autf8string aspec, in string aoriginchar
set, in nsiuri abaseuri); attributes attribute type description defaultport long the default port is the port the protocol uses by default.
... note: starting with firefox 3, one of uri_loadable_by_anyone, uri_dangerous_to_load, uri_is_ui_resource, or uri_is_local_file must be
set on every protocol handler.
... current versions of firefox assume that the uri has uri_loadable_by_anyone
set, but this will not work starting with the mozilla 2 platform.
...And 7 more matches
nsISeekableStream
inherits from: nsisupports last changed in gecko 1.7 method overview void seek(in long whence, in long long off
set); void
seteof(); long long tell(); constants constant value description ns_seek_
set 0 specifies that the off
set is relative to the start of the stream.
... ns_seek_cur 1 specifies that the off
set is relative to the current position in the stream.
... ns_seek_end 2 specifies that the off
set is relative to the end of the stream.
...And 7 more matches
nsISocketTransport
inherits from: nsitransport last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) note: connection
setup is triggered by opening an input or output stream, it does not start on its own.
... completion of the connection
setup is indicated by a status_connected_to notification to the event sink (if
set).
... unsigned long gettimeout(in unsigned long atype); boolean isalive(); void
settimeout(in unsigned long atype, in unsigned long avalue); attributes attribute type description connectionflags unsigned long a bitmask that can be used to modify underlying behavior of the socket connection.
...And 7 more matches
nsIWindowMediator
void removelistener(in nsiwindowmediatorlistener alistener); void
setzlevel(in nsixulwindow awindow, in pruint32 azlevel); native code only!
... void
setzposition(in nsixulwindow inwindow, in unsigned long inposition, in nsixulwindow inbelow); native code only!
...if
set to zlevelbelow the window will be placed below iobelow.
...And 7 more matches
nsIAbCard/Thunderbird3
from: nsiabitem method overview nsivariant getproperty(in autf8string name, in nsivariant defaultvalue); [noscript] astring getpropertyasastring(in string name); [noscript] autf8string getpropertyasautf8string(in string name); [noscript] pruint32 getpropertyasuint32(in string name); [noscript] boolean getpropertyasbool(in string name); 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); void delet...
... firstname astring shorthand for getproperty and
setproperty.
... lastname astring shorthand for getproperty and
setproperty.
...And 7 more matches
Mozilla
all top level document loading (navigation) channels are
set chooseapplicationcache flag, which happens in nsdocshell::douriload().
... channels having that flag
set are searching for nsiapplicationcache object prior inspecting normal http cache.
... chrome registration chrome is the
set of user interface elements of the application window that are outside the window's content area.
...And 7 more matches
Animation - Web APIs
animation.effect gets and
sets the animationeffectreadonly associated with this animation.
... animation.id gets and
sets the string used to identify the animation.
... animation.playbackrate gets or
sets the playback rate of the animation.
...And 7 more matches
AudioParam.value - Web APIs
the web audio api's audioparam interface property value gets or
sets the value of this audioparam at the current time.
... initially, the value is
set to audioparam.defaultvalue.
...
setting value has the same effect as calling audioparam.
setvalueattime with the time returned by the audiocontext's currenttime property..
...And 7 more matches
MediaStreamTrack - Web APIs
properties in addition to the properties listed below, mediastreamtrack has constrainable properties which can be
set using applyconstraints() and accessed using getconstraints() and get
settings().
... see capabilities, constraints, and
settings to learn how to correctly work with constrainable properties.
... note: you can implement standard "mute" functionality by
setting enabled to false.
...And 7 more matches
PointerEvent.PointerEvent() - Web APIs
pointereventinitoptional is a pointereventinit dictionary, having the following fields: pointerid — optional and defaulting to 0, of type long, that
sets the value of the instance's pointerevent.pointerid.
... width — optional and defaulting to 1, of type double, that
sets the value of the instance's pointerevent.width.
... height — optional and defaulting to 1, of type double, that
sets the value of the instance's pointerevent.height.
...And 7 more matches
RTCPeerConnection.addTrack() - Web APIs
the rtcpeerconnection method addtrack() adds a new media track to the
set of tracks which will be transmitted to the other peer.
...ia() to obtain a stream from a user's camera and microphone, then adds each track from the stream to the peer connection, without specifying a stream for each track: async opencall(pc) { const gumstream = await navigator.mediadevices.getusermedia( {video: true, audio: true}); for (const track of gumstream.gettracks()) { pc.addtrack(track); } } the result is a
set of tracks being sent to the remote peer, with no stream associations.
...ion to a remote peer: async opencall(pc) { const gumstream = await navigator.mediadevices.getusermedia( {video: true, audio: true}); for (const track of gumstream.gettracks()) { pc.addtrack(track, gumstream); } } the remote peer might then use a track event handler that looks like this: pc.ontrack = ({streams: [stream]} => videoelem.srcobject = stream; this
sets the video element's current stream to the one that contains the track that's been added to the connection.
...And 7 more matches
RTCPeerConnection.createOffer() - Web APIs
icerestart optional to restart ice on an active connection,
set this to true.
... to emulate this behavior in modern implementations, the presence of this member with a value false, will
set the direction of all existing audio transceivers to exclude reception (i.e.
...
set to either "sendonly" or "inactive").
...And 7 more matches
Range - Web APIs
range.endoff
set read only returns a number representing where in the endcontainer the range ends.
... range.startoff
set read only returns a number representing where in the startcontainer the range starts.
... range.
setstart()
sets the start position of a range.
...And 7 more matches
Using the Screen Capture API - Web APIs
there are three new constraints added to mediatrackconstraints (as well as to mediatracksupportedconstraints and mediatrack
settings) for configuring a screen capture stream: cursor indicates whether or not to capture the mouse cursor, and if so, whether to do so all the time or only while the mouse is in motion.
...
setup first, some constants are
set up to reference the elements on the page to which we'll need access: the <video> into which the captured screen contents will be streamed, a box into which logged output will be drawn, and the start and stop buttons that will turn on and off capture of screen imagery.
... the object displaymediaoptions contains the mediastreamconstraints to pass into getdisplaymedia(); here, the cursor property is
set to always, indicating that the mouse cursor should always be included in the captured media.
...And 7 more matches
WebGLRenderingContext.texSubImage2D() - Web APIs
syntax // webgl 1: void gl.texsubimage2d(target, level, xoff
set, yoff
set, width, height, format, type, arraybufferview?
... pixels); void gl.texsubimage2d(target, level, xoff
set, yoff
set, format, type, imagedata?
... pixels); void gl.texsubimage2d(target, level, xoff
set, yoff
set, format, type, htmlimageelement?
...And 7 more matches
Clearing with colors - Web APIs
set up the rendering context and then just clear it solid green.
... note that css
sets the background color of the canvas to black, so when the canvas turns green we know that webgl's magic has worked.
...first, we
set the clear color to green, using the method clearcolor().
...And 7 more matches
Animating textures in WebGL - Web APIs
getting access to the video the first step is to create the <video> element that we'll use to retrieve the video frames: // will
set to true when video can be copied to texture var copyvideo = false; function
setupvideo(url) { const video = document.createelement('video'); var playing = false; var timeupdate = false; video.autoplay = true; video.muted = true; video.loop = true; // waiting for these 2 events ensures // there is data in the video video.addeventlistener('playing', function() { playing ...
...we
set it to autoplay, mute the sound, and loop the video.
... we then
set up two events to make sure the video is playing and the time has been updated.
...And 7 more matches
Using IIR filters - Web APIs
for instance, if you want to filter lower frequencies from your sound, you can
set the type to highpass and then
set which frequency to filter from (or cut off).
...and this is where the iir filter node is useful — you can create your own if none of the alaready available
settings is right for what you want.
... with the iirfilter node it's up to you to
set what feedforward and feedback values the filter needs — this determines the characteristics of the filter.
...And 7 more matches
ARIA Test Cases - Accessibility
- - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - checkbox simple checkbox testcases:
set aria-checked="false" for unchecked both remove or
set attribute for unchecked case -- also includes an invalid and required checkbox hierarchical (newly added test not in test results yet) dojo nightly build expected at behavior: screen reader should speak the accessible name followed by both the type being checkbox and the state (checked, unchecked).
... markup used: role="checkbox" aria-checked="true" or "false" notes: need testcase where aria-checked attribute is removed instead of
set to false results: at firefox ie opera safari jaws 9 - - n/a n/a jaws 10 pass fail (changes not spoken) fail fail voiceover (leopard) n/a n/a - fail window-eyes pass pass fail (unchecked presented as checked, ie exposing incorrect state for no aria-checked attribute) fail fail nvda fail on #2 -- repetitive text spoken, first checkbox toggle speaks incorrect state n/a fail fail zoom (leopard) pass n/a pass pass ...
... zoomtext pass - fail fail orca pass n/a - - tristate checkbox testcases: both remove or un
set for unchecked case expected at behavior: screen reader should announce accessible name, role and state.
...And 7 more matches
Alerts - Accessibility
here is a simple form: <form method="post" action="post.php"> <field
set> <legend>please enter your contact details</legend> <label for="name">your name (required):</label> <input name="name" id="name" aria-required="true"/> <br /> <label for="email">e-mail address (required):</label> <input name="email" id="email" aria-required="true"/> <br /> <label for="website">website (optional):</label> <input name="website" id="websi...
...te"/> </field
set> <label for="message">please enter your message (required):</label> <br /> <textarea name="message" id="message" rows="5" cols="80" aria-required="true"></textarea> <br /> <input type="submit" name="submit" value="send message"/> <input type="re
set" name="re
set" value="re
set form"/> </form> checking for validity and notifying the user form validations consists of several steps: checking if the e-mail address or entered name are valid.
... each field has a
set of criteria which must be met in order to pass validation.
...And 7 more matches
Accessibility documentation index - Accessibility
2 aria aria, accessibility, html accessible rich internet applications (aria) is a
set of attributes that define ways to make web content and web applications (especially those developed with javascript) more accessible to people with disabilities.
... 5 aria annotations aria, accessibility, wai-aria, annotations, comments, details, suggestions wai-aria version 1.3 sees the addition of a
set of new features, collectively known as aria annotations, which allow the creation of accessible annotations inside web documents.
...aria-invalid can also be used to indicate that a required field has not been filled in.the attribute should be programmatically
set as a result of a validation process.
...And 7 more matches
<basic-shape> - CSS: Cascading Style Sheets
the <basic-shape> css data type represents a shape used in the clip-path, shape-outside, and off
set-path properties.
... in
set() in
set( <shape-arg>{1,4} [round <border-radius>]?
... ) defines an in
set rectangle.
...And 7 more matches
border-image - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-image-out
set border-image-repeat border-image-slice border-image-source border-image-width syntax /* source | slice */ border-image: linear-gradient(red, blue) 27; /* source | slice | repeat */ border-image: url("/images/border.png") 27 space; /* source | slice | width */ border-image: linear-gradient(red, blue) 27 / 35px; /* source | slice | width | out
set | repeat */ border-image: url("/images/bor...
... <'border-image-out
set'> the distance of the border image from the element's outside edge.
...see border-image-out
set.
...And 7 more matches
filter - CSS: Cascading Style Sheets
ur(5px); filter: brightness(0.4); filter: contrast(200%); filter: drop-shadow(16px 16px 20px blue); filter: grayscale(50%); filter: hue-rotate(90deg); filter: invert(75%); filter: opacity(25%); filter: saturate(30%); filter: sepia(60%); /* multiple filters */ filter: contrast(175%) brightness(3%); /* use no filter */ filter: none; /* global values */ filter: inherit; filter: initial; filter: un
set; with a function, use the following: filter: <filter-function> [<filter-function>]* | none for a reference to an svg <filter> element, use the following: filter: url(file.svg#filter-element-id) interpolation if both the beginning and end filters have a function list of the same length without <url>, each of their filter functions is interpolated according to its specific rules.
...a drop shadow is effectively a blurred, off
set version of the input image's alpha mask drawn in a particular color, composited below the image.
... the function accepts a parameter of type <shadow> (defined in css3 backgrounds), with the exception that the in
set keyword is not allowed.
...And 7 more matches
grid - CSS: Cascading Style Sheets
the grid css property is a shorthand property that
sets all of the explicit and implicit grid properties in a single declaration.
...the sub-properties you don’t specify are
set to their initial value, as normal for shorthands.
... also, the gutter properties are not re
set by this shorthand.
...And 7 more matches
overflow - CSS: Cascading Style Sheets
the overflow css shorthand property
sets the desired behavior for an element's overflow — i.e.
... constituent properties this property is a shorthand for the following css properties: overflow-x overflow-y syntax /* keyword values */ overflow: visible; overflow: hidden; overflow: clip; overflow: scroll; overflow: auto; overflow: hidden visible; /* global values */ overflow: inherit; overflow: initial; overflow: un
set; the overflow property is specified as one or two keywords chosen from the list of values below.
...otherwise, both overflow-x and overflow-y are
set to the same value.
...And 7 more matches
pointer-events - CSS: Cascading Style Sheets
the pointer-events css property
sets under what circumstances (if any) a particular graphic element can become the target of pointer events.
...siblefill; /* svg only */ pointer-events: visiblestroke; /* svg only */ pointer-events: visible; /* svg only */ pointer-events: painted; /* svg only */ pointer-events: fill; /* svg only */ pointer-events: stroke; /* svg only */ pointer-events: all; /* svg only */ /* global values */ pointer-events: inherit; pointer-events: initial; pointer-events: un
set; the pointer-events property is specified as a single keyword chosen from the list of values below.
... none the element is never the target of pointer events; however, pointer events may target its descendant elements if those descendants have pointer-events
set to some other value.
...And 7 more matches
Adding captions and subtitles to HTML5 video - Developer guides
"video/sintel-short.webm" type="video/webm"> <track label="english" kind="subtitles" srclang="en" src="captions/vtt/sintel-en.vtt" default> <track label="deutsch" kind="subtitles" srclang="de" src="captions/vtt/sintel-de.vtt"> <track label="español" kind="subtitles" srclang="es" src="captions/vtt/sintel-es.vtt"> </video> as you can see, each <track> element has the following attributes
set: kind is given a value of subtitles, indicating the type of content the files contain label is given a value indicating which language that subtitle
set is for — for example english or deutsch — these labels will appear in the user interface to allow the user to easily select which subtitle language they want to see.
... the default attribute is
set on the english <track> element, indicating to the browser that this is the default subtitle file definition to use when subtitles have been turned on and the user has not made a specific selection.
...similar to the video controls, if a browser supports html5 video subtitles, there will be a button provided within the native control
set to access them.
...And 7 more matches
Cross-browser audio basics - Developer guides
here's an example of creating an <audio> element,
setting the media to play, playing and pausing, and then playing from 5 seconds into the audio: var myaudio = document.createelement('audio'); if (myaudio.canplaytype('audio/mpeg')) { myaudio.
setattribute('src','audiofile.mp3'); } if (myaudio.canplaytype('audio/ogg')) { myaudio.
setattribute('src','audiofile.ogg'); } alert('play'); myaudio.play(); alert('stop'); myaudio.pause(); alert('pla...
... myaudio.pause(); note: there is no stop method — to implement a stop function, you'd have to pause the media then
set the currenttime property value to 0.
... currenttime the currenttime property gets or
sets the current time the audio should play at.
...And 7 more matches
<input type="checkbox"> - HTML: Hypertext Markup Language
note: radio buttons are similar to checkboxes, but with an important distinction — radio buttons are grouped into a
set in which only one radio button can be selected at a time, whereas checkboxes allow you to turn single values on and off.
... <field
set> <legend>choose your interests</legend> <div> <input type="checkbox" id="coding" name="interest" value="coding"> <label for="coding">coding</label> </div> <div> <input type="checkbox" id="music" name="interest" value="music"> <label for="music">music</label> </div> </field
set> in this example you will see that we've given each checkbox the same name.
...see the below example: <field
set> <legend>choose your interests</legend> <div> <input type="checkbox" id="coding" name="interest" value="coding" checked> <label for="coding">coding</label> </div> <div> <input type="checkbox" id="music" name="interest" value="music"> <label for="music">music</label> </div> </field
set> providing a bigger hit area for your checkboxes in the above examples, you may have...
...And 7 more matches
<input type="tel"> - HTML: Hypertext Markup Language
value a domstring representing a telephone number, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, and size idl attributes list, selectionstart, selectionend, selectiondirection, and value methods select(),
setrangetext(),
setselectionrange() value the <input> element's value attribute contains a domstring that either represents a telephone number or is an empty string ("").
...its value can, however, still be changed by javascript code directly
setting the htmlinputelement.value property.
...since character widths vary, this may or may not be exact and should not be relied upon to be so; the resulting input may be narrower or wider than the specified number of characters, depending on the characters and the font (font
settings in use).
...And 7 more matches
<link>: The External Resource Link element - HTML: Hypertext Markup Language
as this attribute is only used when rel="preload" or rel="prefetch" has been
set on the <link> element.
... it specifies the type of content being loaded by the <link>, which is necessary for request matching, application of correct content security policy, and
setting of correct accept request header.
... font css @font-face image <img> and <picture> elements with src
set or image
set attributes, svg <image> elements, css *-image rules object <object> elements script <script> elements, worker importscripts style <link rel=stylesheet> elements, css @import track <track> elements video <video> elements worker worker, sharedworker crossorigin this enumerated at...
...And 7 more matches
<textarea> - HTML: Hypertext Markup Language
the above example demonstrates a number of features of <textarea>: an id attribute to allow the <textarea> to be associated with a <label> element for accessibility purposes a name attribute to
set the name of the associated data point submitted to the server when the form is submitted.
...
setting these is a good idea for consistency, as browser defaults can differ.
...if this attribute is not specified, the control inherits its
setting from the containing element, for example <field
set>; if there is no containing element when the disabled attribute is
set, the control is enabled.
...And 7 more matches
Proxy - JavaScript
this example uses the
set handler.
... let validator = {
set: function(obj, prop, value) { if (prop === 'age') { if (!number.isinteger(value)) { throw new typeerror('the age is not an integer'); } if (value > 200) { throw new rangeerror('the age seems invalid'); } } // the default behavior to store the value obj[prop] = value; // indicate success return true; } }; const person = new proxy({}, validator); person.age = 100; console.log(person.age); // 100 person.age = 'young'; // throws an exception person.age = 300; // throws an exception extending constructor a function proxy could easily extend a constructor with a new constructor.
...here's how using the
set handler.
...And 7 more matches
GLSL Shaders - Game development
the purpose of the vertex shader is to
set up the gl_position variable — this is a special, global, and built-in glsl variable.
...the purpose of the fragment shader is to
set up the gl_fragcolor variable.
... environment
setup to start with the webgl shaders you don't need much.
...And 6 more matches
Implementing controls using the Gamepad API - Game development
next, we
set up two event listeners to get the data: window.addeventlistener("gamepadconnected", gamepadapi.connect); window.addeventlistener("gamepaddisconnected", gamepadapi.disconnect); due to security policy, you have to interact with the controller first while the page is visible for the event to fire.
...we then
set the turbo property to true.
... (we could use the gamepad.connected boolean for this purpose, but we wanted to have a separate variable for turning on turbo mode without needing to have a gamepad connected, for reasons explained above.) disconnect: function(evt) { gamepadapi.turbo = false; delete gamepadapi.controller; console.log('gamepad disconnected.'); }, the disconnect function
sets the gamepad.turbo property to false and removes the variable containing the gamepad object.
...And 6 more matches
Plug-in Development Overview - Gecko Plugin API Reference
set up your development environment properly.
... for this the version stamp of the embedded resource of the plug-in dll should contain the following
set of string/value pairs: mimetype: for mime types fileextents: for file extensions fileopenname: for file open template productname: for plug-in name filedescription: for description language: for language in use in the mime types and file extensions strings, multiple values are separated by the "|" character, for example: video/quicktime|audio/aiff|image/jpeg the version stamp will...
... be loaded only if it has been created with the language
set to "us english" and the character
set to "windows multilingual" in your development environment.
...And 6 more matches
Sizing items in CSS - Learn web development
the natural or intrinsic size of things html elements have a natural size,
set before they are affected by any css.
...
setting a specific size we can of course give elements in our design a specific size.
...as we discovered in our previous lesson on overflow, a
set height can cause content to overflow if there is more content than the element has space to fit inside it.
...And 6 more matches
Styling tables - Learn web development
table-layout: fixed; width: 100%; border-collapse: collapse; border: 3px solid purple; } thead th:nth-child(1) { width: 30%; } thead th:nth-child(2) { width: 20%; } thead th:nth-child(3) { width: 15%; } thead th:nth-child(4) { width: 35%; } th, td { padding: 20px; } the most important parts to note are as follows: a table-layout value of fixed is generally a good idea to
set on your table, as it makes the table behave a bit more predictably by default.
...this is why we've selected the four different headings with the thead th:nth-child(n) (:nth-child) selector ("select the nth child that is a <th> element in a sequence, inside a <thead> element") and given them
set percentage widths.
...by default, when you
set borders on table elements, they will all have spacing between them, as the below image illustrates: this doesn't look very nice (although it might be the look you want, who knows?) with border-collapse: collapse;
set, the borders collapse down into one, which looks much better: we've put a border around the whole table, which is needed because we'll be putting some borders round the table head...
...And 6 more matches
What are browser developer tools? - Learn web development
these tools do a range of things, from inspecting currently-loaded html, css and javascript to showing which as
sets the page has requested and how long they took to load.
... find out more find more out about the inspector in different browsers: firefox page inspector ie dom explorer chrome dom inspector (opera's inspector works the same as this) safari dom inspector and style explorer the javascript debugger the javascript debugger allows you to watch the value of variables and
set breakpoints, places in your code that you want to pause execution and identify the problems that prevent your code from executing properly.
... source code
set breakpoints where you want to pause execution.
...And 6 more matches
Images in HTML - Learn web development
if you
set the image size too big, you'll end up with images that look grainy, fuzzy, or too small, and wasting bandwidth downloading an image that is not fitting the user's needs.
...
set the image's correct width and height (hint: it is 200px wide and 171px high), then experiment with other values to see what the effect is.
...
set a title on the image.
...And 6 more matches
From object to iframe — other embedding technologies - Learn web development
these were embedded in a master document called a frame
set, which allowed you to specify the area on the screen that each frame filled, rather like sizing the columns and rows of a table.
... if you make a mistake, you can always re
set it using the re
set button.
... playable code <h2>live output</h2> <div class="output" style="min-height: 250px;"> </div> <h2>editable code</h2> <p class="a11y-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="input" style="width: 95%;min-height: 100px;"> </textarea> <div class="playable-buttons"> <input id="re
set" type="button" value="re
set"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = document.getelementbyid('code'); const re
set = document.getelementbyid('re
set'); cons...
...And 6 more matches
Working with JSON - Learn web development
next, add the following two lines — here we are
setting the respon
setype to json, so that xhr knows that the server will be returning json, and that this should be converted behind the scenes into a javascript object.
... then we send the request with the send() method: request.respon
setype = 'json'; request.send(); the last bit of this section involves waiting for the response to return from the server, then dealing with it.
...here we first create an <h1> element with createelement(),
set its textcontent to equal the squadname property of the object, then append it to the header using appendchild().
...And 6 more matches
Getting started with Ember - Learn web development
previous overview: client-side javascript frameworks next in our first ember article we will look at how ember works and what it's useful for, install the ember toolchain locally, create a sample app, and then do some initial
setup to get it ready for development.
...in ember, opinions are a
set of conventions that help increase the efficiency of developers at the cost of having to learn those conventions.
...most importantly, it is a super
set of html — meaning that anyone who knows html can make meaningful contributions to any ember project with minimal fear of breaking code.
...And 6 more matches
Deployment and next steps - Learn web development
set up and deploy “./mdn-svelte-tutorial”?
..../ auto-detected project
settings (svelte): - build command: `npm run build` or `rollup -c` - output directory: public - development command: sirv public --single --dev --port $port ?
... want to override the
settings?
...And 6 more matches
Styling Vue components with CSS - Learn web development
to start with, create a file called re
set.css in the src/as
sets directory.
... while this tutorial will not be using such tools, it's good to know that when including such code in the as
sets folder it will be processed automatically.
... add the following contents to the re
set.css file: /*re
set.css*/ /* re
sets */ *, *::before, *::after { box-sizing: border-box; } *:focus { outline: 3px dashed #228bec; } html { font: 62.5% / 1.15 sans-serif; } h1, h2 { margin-bottom: 0; } ul { list-style: none; padding: 0; } button { border: none; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; color: inherit; font: inherit; line-height: normal; -webkit-font-smoothing: inherit; -moz-osx-font-smoothing: inherit; -webkit-appearance: none; } button::-moz-focus-inner { border: 0; } button, input, optgroup, select, textarea { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0; } button, input { /* 1 */ overflow: visible; } input[type="text"] { bo...
...And 6 more matches
Understanding client-side JavaScript frameworks - Learn web development
in this
set of articles, we are aiming to give you a comfortable starting point to help you begin learning frameworks.
...we'll discover a little bit of detail about its background and use cases,
set up a basic react toolchain on our local computer, and create and play with a simple starter app, learning a bit about how react works in the process.
...getting started with ember in our first ember article we will look at how ember works and what it's useful for, install the ember toolchain locally, create a sample app, and then do some initial
setup to get it ready for development.
...And 6 more matches
Handling common HTML and CSS problems - Learn web development
previous overview: cross browser testing next with the scene
set, we'll now look specifically at the common cross-browser problems you will come across in html and css code, and what tools can be used to prevent problems from happening, or fix problems that occur.
...you can still refer to them by their names, and style them with css, for example — you just need to make sure they are behaving as you want them to, for example
setting display: block; on all of the new semantic elements (such as <article>, <aside>, etc.), but only in old versions of ie that don't recognise them (so, ie 8 and lower).
... background-color: #ff0000; background-color: rgba(255,0,0,1); box-shadow: in
set 1px 1px 3px rgba(255,255,255,0.4), in
set -1px -1px 3px rgba(0,0,0,0.4); } button:hover { background-color: rgba(255,0,0,0.5); } button:active { box-shadow: in
set 1px 1px 3px rgba(0,0,0,0.4), in
set -1px -1px 3px rgba(255,255,255,0.4); } here we are providing an rgba background-color that changes opacity on hover to give the user a hint that the button is interact...
...And 6 more matches
Adding a new CSS property
(which
set the property is in is given in the specification, which says "inherited: yes" or "inherited: no" in the property's definition.) also note that some of the style structs intentionally contain only properties
set/re
set by a particular common shorthand property; this improves the effectiveness of some of the performance and memory optimizations done with the rule tree, and thus we should avoid addi...
...ng a property not re
set by that shorthand to such a struct.
... if the property's values can be expressed as a single value, or as a space-separated or comma-separated list of values that can be described by the variant_* flags (also in nscssprops.h), you should use css_property_parse_value or css_property_parse_value_list, and
set the appropriate variant_* flags in the entry in nscssproplist.h (and maybe also css_property_value_list_uses_commas).
...And 6 more matches
Download
this property can become true, then it can be re
set to false when a canceled download is restarted.
... error read only downloaderror when the download fails, this is
set to a downloaderror instance indicating the cause of the failure.
...this property is re
set to null when a failed download is restarted.
...And 6 more matches
NetUtil.jsm
method overview nsiasyncstreamcopier asynccopy(nsiinputstream asource, nsioutputstream asink, [optional] acallback) void asyncfetch(asource, acallback) nsichannel newchannel(awhattoload, [optional] aoriginchar
set, [optional] nsiuri abaseuri) nsiuri newuri(atarget, [optional] aoriginchar
set, [optional] nsiuri abaseuri) string readinputstreamtostring(ainputstream, acount, aoptions) attributes attribute type description ioservice nsiioservice returns a reference to nsiioservice.
... createinstance(ci.nsistringinputstream); istream.
setdata(test_data, test_data.length); netutil.asynccopy(istream, ostream, function(aresult) { if (!components.issuccesscode(aresult)) { // an error occurred!
...}); remarks note: if you specify an nsichannel as the input source, and its notification callbacks have already been
set, callers are responsible for implementing nsibadcertlistener and nsisslerrorlistener.
...And 6 more matches
Bootstrapping a new locale
when a localization team is registered and your hg repository is
set up for a locale, you can then clone the existing mozilla release branch (i.e.
...boutrobots.dtd places aboutsessionrestore.dtd preferences aboutsupport.dtd quitdialog.properties basemenuoverlay.dtd safemode.dtd browser.dtd safebrowsing browser.properties sanitize.dtd credits.dtd search.properties enginemanager.dtd searchbar.dtd enginemanager.properties
setdesktopbackground.dtd feeds shellservice.properties history sidebar migration tabbrowser.dtd openlocation.dtd tabbrowser.properties openlocation.properties as a localizer, you are responsible for localizing each of the ".dtd" and ".properties" in *all* of the sub-directories found in your ab-cd directory.
... the l10n-drivers will help
set up an experimental hg repository in bit bucket.
...And 6 more matches
Localizing with Koala
due to a bug in koala (bug 21930), it is recommended that you don't choose a path that contains spaces (like c:\documents and
settings\user\...).
...
setup wizard will open.
...the easy way involves opening the console and issuing the following commands: c:\users\stas> cd c:\mozilla\l10n\application\firefox c:\mozilla\l10n\application\firefox> rmdir 3.6 c:\mozilla\l10n\application\firefox> hg clone http://hg.mozilla.org/releases/mozilla-1.9.2 3.6 requesting all changes adding change
sets adding manifests adding file changes added 33099 change
sets with 158636 changes to 50664 files (+9 heads) updating working directory 40357 files updated, 0 files merged, 0 files removed, 0 files unresolved configure the locale locale id: x-testing (put your locale's code) version: 3.6 location: choose the folder where you want to keep the localized files or leave empty for now check "mercur...
...And 6 more matches
Refcount tracing and balancing
refcount tracing logs calls to addref and release, preferably for a particular
set of classes, including call-stacks in symbolic form (on platforms that support this).
... note: due to an issue with the sandbox on windows (bug 1345568), refcount logging currently requires the moz_disable_content_sandbox environment variable to be
set.
... xpcom_mem_refcnt_log
setting this environment variable enables refcount tracing.
...And 6 more matches
PRTimeParameters
syntax #include <prtime.h> typedef struct prtimeparameters { print32 tp_gmt_off
set; print32 tp_dst_off
set; } prtimeparameters; description each geographic location has a standard time zone, and if daylight saving time (dst) is practiced, a daylight time zone.
... the prtimeparameters structure represents the local time zone information in terms of the off
set (in seconds) from gmt.
... the overall off
set is broken into two components: tp_gmt_off
set the off
set of the local standard time from gmt.
...And 6 more matches
PR_Seek
moves the current read-write file pointer by an off
set expressed as a 32-bit integer.
... syntax #include <prio.h> print32 pr_seek( prfiledesc *fd, print32 off
set, prseekwhence whence); parameters the function has the following parameters: fd a pointer to a prfiledesc object.
... off
set a value, in bytes, used with the whence parameter to
set the file pointer.
...And 6 more matches
PR_Seek64
moves the current read-write file pointer by an off
set expressed as a 64-bit integer.
... syntax #include <prio.h> print64 pr_seek64( prfiledesc *fd, print64 off
set, prseekwhence whence); parameters the function has the following parameters: fd a pointer to a prfiledesc object.
... off
set a value, in bytes, used with the whence parameter to
set the file pointer.
...And 6 more matches
nss tech note2
it works by inserting a special
set of entry points between nss and the module.
... to enable the module logger, you must
set the environment variable nss_debug_pkcs11_module to the name of the target module.
...for example, to log the softoken on windows, use:
set nss_debug_pkcs11_module=nss internal pkcs #11 module the logger is available by default in debug builds.
...And 6 more matches
Property cache
the opcodes that take advantage of the property cache, as of june 2009, are: getprop, get{x,this,arg,local}prop, and length; name;
setprop, bindname, and
setname; callprop and callname; and {inc,dec}name and name{inc,dec}.
...to be more precise regarding property specs, y's properties have the same names, getters,
setters, property attributes, and slot off
sets, and they are in the same order, as x's properties at t0.
...(the existence of this property is guaranteed by the basic layout guarantee above.) (informally: two objects with the same shape have the same method properties.) branded object guarantee — if at time t0 the object x has shape s; and x is branded (x->branded()); and x has an own property p, which is a writable, function-valued data property with the stub getter and
setter and a slot; and at time t1 an object y has shape s; and no shape-regenerating gc occurred; then y is x, and at time t1 x's own property p has the same function value it had at time t0.
...And 6 more matches
JSClass
syntax struct jsclass { const char *name; uint32_t flags; /* optional since spidermonkey 37 */ jspropertyop addproperty; jsdeletepropertyop delproperty; jspropertyop getproperty; jsstrictpropertyop
setproperty; jsenumerateop enumerate; jsresolveop resolve; jsconvertop convert; /* obsolete since spidermonkey 44 */ /* optional since spidermonkey 25 */ jsfinalizeop finalize; /* optional */ jsclassinternal reserved0; /* obsolete since spidermonkey 13 */ jscheckaccessop checkaccess; /* obsolete since spidermonkey 29 */ ...
...
setproperty jsstrictpropertyop a hook called when
setting a property.
... this is the default
setter for the class.
...And 6 more matches
mozIStorageStatement
n autf8string asqlstatement); obsolete since gecko 1.9.1 void finalize(); mozistoragestatement clone(); autf8string getparametername(in unsigned long aparamindex); unsigned long getparameterindex(in autf8string aname); autf8string getcolumnname(in unsigned long acolumnindex); unsigned long getcolumnindex(in autf8string aname); void re
set(); astring escapestringforlike(in astring avalue, in wchar aescapechar); void bindparameters(in mozistoragebindingparamsarray aparameters); mozistoragebindingparamsarray newbindingparamsarray(); void bindutf8stringparameter(in unsigned long aparamindex, in autf8string avalue); void bindstringparameter(in unsigned long aparamindex, in astring avalue);...
... params mozistoragestatementparams the current list of named parameters, which may be
set.
... re
set() re
sets the bound parameters and statement execution state.
...And 6 more matches
nsICachingChannel
the value of this attribute is usually only
settable during the processing of a channel's onstartrequest.
...the value of this attribute should be
set before opening the channel.
...a cache key retrieved from a particular instance of nsicachingchannel could be
set on another instance of nsicachingchannel provided the underlying implementations are compatible and provided the new channel instance was created with the same uri.
...And 6 more matches
nsIContentViewer
void loadcomplete(in unsigned long astatus); void loadstart(in nsisupports adoc); void move(in long ax, in long ay); void open(in nsisupports astate, in nsishentry ashentry); void pagehide(in boolean isunload); boolean permitunload([optional] in boolean acallercloseswindow); boolean requestwindowclose(); void re
setclosewindow(); void
setbounds([const] in nsintrectref abounds); native code only!
... void
setdocumentinternal(in nsidocumentptr adocument, in boolean aforcereuseinnerwindow); native code only!
... [noscript,notxpcom,nostdcall] void
setnavigationtiming(in nsdomnavigationtimingptr atiming); void
setpagemode(in boolean apagemode, in nsiprint
settings aprint
settings); void show(); void stop(); void unload(); obsolete since gecko 1.8 attributes attribute type description container nsisupports domdocument nsidomdocument enablerendering boolean obsolete since gecko 2.0 historyentry nsishentry get the history entry that this viewer will save itself into when destroyed.
...And 6 more matches
nsIFile
an alternate form operates on characters strings encoded in the "native" char
set.
... a string containing characters encoded in the native char
set cannot be safely passed to javascript via xpconnect.
... void normalize(); file openansifiledesc(in string mode); prfiledescstar opennsprfiledesc(in long flags, in long mode); void renameto(in nsifile newparentdir, in astring newname); void remove(in boolean recursive); void reveal(); void
setrelativedescriptor(in nsifile fromfile, in acstring relativedesc); attributes attribute type description directoryentries nsisimpleenumerator returns an enumeration of the elements in a directory.
...And 6 more matches
nsIHttpServer
*/ void registercontenttype(in string extension, in string type); /** *
sets the handler used to display the contents of a directory if * the directory contains no index page.
... * * @param handler * an object which will handle any requests for directories which * do not contain index pages, or null to re
set to the default * index handler; if while the server is running the handler * throws an exception while responding to a request, an http 500 * response will be returned.
... */ void
setindexhandler(in nsihttprequesthandler handler); /** represents the locations at which this server is reachable.
...And 6 more matches
nsIIOService
netwerk/base/public/nsiioservice.idlscriptable this interface provides a
set of url parsing utility functions.
... .getservice(components.interfaces.nsiioservice); method overview boolean allowport(in long aport, in string ascheme); acstring extractscheme(in autf8string urlstring); unsigned long getprotocolflags(in string ascheme); nsiprotocolhandler getprotocolhandler(in string ascheme); nsichannel newchannel(in autf8string aspec, in string aoriginchar
set, in nsiuri abaseuri); obsolete since gecko 48 nsichannel newchannel2(in autf8string aspec, in string aoriginchar
set, in nsiuri abaseuri, in nsidomnode aloadingnode, in nsiprincipal aloadingprincipal, in nsiprincipal atriggeringprincipal, in uint32_t asecurityflags, in uint32_t acontentpolicytype); nsichannel newchannelfromuri(in nsiuri auri); obsolete since gecko 48 ns...
...loadinfo); nsichannel newchannelfromuriwithproxyflags2(in nsiuri auri, in nsiuri aproxyuri, in uint32_t aproxyflags,in nsidomnode aloadingnode, in nsiprincipal aloadingprincipal, in nsiprincipal atriggeringprincipal, in uint32_t asecurityflags, in uint32_t acontentpolicytype); nsiuri newfileuri(in nsifile afile); nsiuri newuri(in autf8string aspec, in string aoriginchar
set, in nsiuri abaseuri); attributes attribute type description offline boolean returns true if networking is in "offline" mode.
...And 6 more matches
nsIPrefService
inherits from: nsisupports last changed in gecko 1.7 method overview nsiprefbranch getbranch(in string aprefroot); nsiprefbranch getdefaultbranch(in string aprefroot); void readuserprefs(in nsifile afile); void re
setprefs(); void re
setuserprefs(); void savepreffile(in nsifile afile); methods getbranch() call to get a preferences "branch" which accesses user preference data.
... using a
set method on this object will always create or
set a user preference value.
... when using a get method a user
set value will be returned if one exists, otherwise a default value will be returned.
...And 6 more matches
nsIScriptableIO
classes["@mozilla.org/io/scriptable-io;1"] .getservice(); scriptableio.getfile("profile", "cookies.txt"); method overview nsifile getfile(in astring alocation, in astring afilename); nsifile getfilewithpath(in astring afilepath); nsisupports newinputstream(in nsivariant abase, in astring amode, [optional] in astring achar
set, [optional] in astring areplacechar, [optional] in unsigned long abuffersize); nsisupports newoutputstream(in nsivariant abase, in astring amode, [optional] in astring achar
set, [optional] in astring areplacechar, [optional] in unsigned long abuffersize, [optional] in unsigned long apermissions); nsiuri newuri(in nsivariant auri); methods getfile() retriev...
... nsisupports newinputstream( in nsivariant abase, in astring amode, [optional] in astring achar
set, [optional] in astring areplacechar, [optional] in unsigned long abuffersize ); parameters abase the base object from which to read.
...the default character
set is utf-8; to read text in another character
set,
set the achar
set argument to the desired character
set.
...And 6 more matches
nsIScrollable
thod overview long getcurscrollpos(in long scrollorientation); obsolete since gecko 29.0 long getdefaultscrollbarpreferences(in long scrollorientation); void getscrollbarvisibility(out boolean verticalvisible, out boolean horizontalvisible); void getscrollrange(in long scrollorientation, out long minpos, out long maxpos); obsolete since gecko 29.0 void
setcurscrollpos(in long scrollorientation, in long curpos); obsolete since gecko 29.0 void
setcurscrollposex(in long curhorizontalpos, in long curverticalpos); obsolete since gecko 29.0 void
setdefaultscrollbarpreferences(in long scrollorientation, in long scrollbarpref); void
setscrollrange(in long scrollorientation, in long minpos, in long maxpos); obsolete since gecko 29...
....0 void
setscrollrangeex(in long minhorizontalpos, in long maxhorizontalpos, in long minverticalpos, in long maxverticalpos); obsolete since gecko 29.0 constants scroll orientations scroll orientations a scrollbar can be in.
...when passing this in to a method you are requesting or
setting data for the horizontal scrollbar.
...And 6 more matches
nsIXULTemplateBuilder
the structure of a template is as follows: <rootnode datasources="" ref=""> <template> <query
set> <query></query> <rule> <conditions>...</conditions> <bindings>...</bindings> <action>...</action> </rule> </query
set> </template> </rootnode> the datasources attribute on the root node is used to identify the source of data to be used.
...the <query
set> element contains a single query and one or more <rule> elements.
... there may be more than one <query
set> if multiple queries are desired, and this element is optional if only one query is needed -- in that case the <query> and <rule>s are allowed to be children of the <template> node.
...And 6 more matches
Mail composition back end
this can be
set for the various modes of delivery.
... nsimessage *msgtoreplace, - if the delivery mode is
set to nsmsgsaveasdraft, this is a pointer to the the nsimessage object for the message that needs to be replaced const char *attachment1_type, const char *attachment1_body, pruint32 attachment1_body_length, - the full text of the first attachment is provided via `attachment1_type' `attachment1_body' and `attachment1_body_length'.
...this can be
set for the various modes of delivery.
...And 6 more matches
Plug-in Development Overview - Plugins
set up your development environment properly.
... for this the version stamp of the embedded resource of the plug-in dll should contain the following
set of string/value pairs: mimetype: for mime types fileextents: for file extensions fileopenname: for file open template productname: for plug-in name filedescription: for description language: for language in use in the mime types and file extensions strings, multiple values are separated by the "|" character, for example: video/quicktime|audio/aiff|image/jpeg the version stamp will...
... be loaded only if it has been created with the language
set to "us english" and the character
set to "windows multilingual" in your development environment.
...And 6 more matches
Use watchpoints - Firefox Developer Tools
by
setting a watchpoint on the property, rather than a breakpoint at a particular line, you can discover where that access occurs.
... there are three types of watchpoints: get,
set, and get or
set.
... a get watchpoint pauses whenever a property is read; a
set watchpoint pauses whenever a property value changes; a get or
set watchpoint pauses whenever a property value is accessed in either way.
...And 6 more matches
Debugger.Memory - Firefox Developer Tools
allocation site tracking the javascript engine marks each new object with the call stack at which it was allocated, if: the object is allocated in the scope of a global object that is a debuggee of some debugger instancedbg; and dbg.memory.trackingallocationsites is
set to true.
... allocation logging ifdbg is a debugger instance, and dbg.memory.trackingallocationsites is
set to true, then the javascript engine logs each object allocated bydbg’s debuggee code.
...you can control the limit on the log’s size by
setting dbg.memory.maxallocationsloglength.
...And 6 more matches
Debugger.Object - Firefox Developer Tools
the referent’s properties do not appear directly as properties of the debugger.object instance; the debugger can access them only through methods like debugger.object.prototype.getownpropertydescriptor and debugger.object.prototype.defineproperty, ensuring that the debugger will not inadvertently invoke the referent’s getters and
setters.
... once a promise is
settled, it will generally notify its dependent promises and forget about them, so this is most useful on pending promises.
... promi
setimetoresolution if the referent is a promise, this is the number of milliseconds elapsed between when the promise was created and when it was resolved.
...And 6 more matches
AudioParam - Web APIs
an audioparam 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.
... audioparam.value represents the parameter's current value as of the current time; initially
set to the value of defaultvalue.
... methods audioparam.
setvalueattime() schedules an instant change to the value of the audioparam at a precise time, as measured against audiocontext.currenttime.
...And 6 more matches
Constraint validation API - Web APIs
concepts and usage certain html form controls, such as <input>, <select> and <textarea>, can restrict the format of allowable values, using attributes like required and pattern to
set basic constraints.
... extensions to other interfaces the constraint validation api extends the interfaces for the form-associated elements listed below with a number of new properties and methods (elements that can have a form attribute that indicates their form owner): htmlbuttonelement htmlfield
setelement htmlinputelement htmlobjectelement htmloutputelement htmlselectelement htmltextareaelement properties validity a read-only property that returns a validitystate object, whose properties represent validation errors for the value of that element.
...this will be displayed in the ui if the element is the only form control with a validity problem; if a custom error message is
set using
setcustomvalidity(), this will be shown.
...And 6 more matches
Document.cookie - Web APIs
it serves as a getter and
setter for the actual values of the cookies.
...note that you can only
set/update a single cookie at a time using this method.
... consider also that: any of the following cookie attribute values can optionally follow the key-value pair, specifying the cookie to
set/update, and preceded by a semi-colon separator: ;path=path (e.g., '/', '/mydir') if not specified, defaults to the current path of the current document location.
...And 6 more matches
ElementCSSInlineStyle.style - Web APIs
the style property is used to get as well as
set the inline style of an element.
...the style property has the same (and highest) priority in the css cascade as an inline style declaration
set via the style attribute.
...
setting styles styles should not be
set by assigning a string directly to the style property (as in elt.style = "color: blue;"), since it is considered read-only, as the style attribute returns a cssstyledeclaration object which is also read-only.
...And 6 more matches
ImageCapture.takePhoto() - Web APIs
syntax const blobpromise = imagecaptureobj.takephoto([photo
settings]) parameters photo
settings optional an object that
sets options for the photo to be taken.
... the available options are: filllightmode: the flash
setting of the capture device, one of "auto", "off", or "flash".
...the user agent selects the closest height value to this
setting if it only supports discrete heights.
...And 6 more matches
Basic concepts - Web APIs
dom events always have a type property (in indexeddb, it is most commonly
set to "success" or "error").
...it uses queries on an index that produces a cursor, which you use to iterate across the result
set.
...each origin has its own associated
set of databases.
...And 6 more matches
KeyboardEvent.key - Web APIs
if the key is held down further and the key produces a character key, then the event continues to be emitted in a platform implementation dependent interval and the keyboardevent.repeat read only property is
set to true.
... if the key produces a character key that would result in a character being inserted into possibly an <input>, <textarea> or an element with htmlelement.contenteditable
set to true, the beforeinput and input event types are fired in that order.
... in sequence 1 & 3, the keyboardevent.key attribute is defined and is
set appropriately to a value according to the rules defined ealier.
...And 6 more matches
Media Session API - Web APIs
for example, to
set the current state of the media session to playing: navigator.mediasession.playbackstate = "playing"; interfaces mediametadata allows a web page to provide rich media metadata, for display in a platform ui.
... mediapositionstate used to contain information about the current playback position, playback speed, and overall media duration when calling the mediasession method
setpositionstate() to establish the media's length, playback position, and playback speed.
...e: 'image/png' }, { src: 'https://dummyimage.com/192x192', sizes: '192x192', type: 'image/png' }, { src: 'https://dummyimage.com/256x256', sizes: '256x256', type: 'image/png' }, { src: 'https://dummyimage.com/384x384', sizes: '384x384', type: 'image/png' }, { src: 'https://dummyimage.com/512x512', sizes: '512x512', type: 'image/png' }, ] }); navigator.mediasession.
setactionhandler('play', function() { /* code excerpted.
...And 6 more matches
SVGAngle - Web APIs
setting this attribute will cause valueinspecifiedunits and valueasstring to be updated automatically to reflect this
setting.
... exceptions on
setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read-only attribute, or when the object itself is read-only.
...
setting this attribute will cause value and valueasstring to be updated automatically to reflect this
setting.
...And 6 more matches
SVGLength - Web APIs
xmlns="http://www.w3.org/2000/svg"> <script type="text/javascript"><![cdata[ function start() { var rect = document.getelementbyid("myrect"); var val = rect.x.baseval; // read x in pixel and cm units console.log("value: " + val.value + ", valueinspecifiedunits: " + val.unittype + ": " + val.valueinspecifiedunits + ", valueasstring: " + val.valueasstring); //
set x = 20pt and read it out in pixel and pt units val.newvaluespecifiedunits(svglength.svg_lengthtype_pt, 20); console.log("value: " + val.value + ", valueinspecifiedunits " + val.unittype + ": " + val.valueinspecifiedunits + ", valueasstring: " + val.valueasstring); // convert x = 20pt to inches and read out in pixel and inch units val.converttospecifiedunits(svgle...
...
setting this attribute will cause valueinspecifiedunits and valueasstring to be updated automatically to reflect this
setting.
... exceptions on
setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only attribute or when the object itself is read only.
...And 6 more matches
WebGL constants - Web APIs
each
set of two vertices is treated as a separate line segment.
...each
set of three vertices creates a separate triangle.
... constant name value description func_add 0x8006 passed to blendequation or blendequationseparate to
set an addition blend function.
...And 6 more matches
Writing a WebSocket server in C# - Web APIs
networkstream methods: write(byte[] buffer, int off
set, int size) writes bytes from buffer, off
set and size determine length of message.
... read(byte[] buffer, int off
set, int size) reads bytes to buffer.
... off
set and size determine the length of the message.
...And 6 more matches
Functions and classes available to Web Workers - Web APIs
in addition to the standard javascript
set of functions (such as string, array, object, json, etc), there are a variety of functions available from the dom to workers.
...cope yes, on workerglobalscope yes, on workerglobalscope yes, on window cleartimeout() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window dump() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window
setinterval() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window
settimeout() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window importscripts() yes, on workerglobalscope yes, on workerglobalscope yes, on worke...
...the specifics of how it works vary from browser to browser, but there is a de facto
set of features that are typically provided.
...And 6 more matches
HTML in XMLHttpRequest - Web APIs
also, html support is only available if the respon
setype property has been
set to "document".
... this limitation avoids wasting time parsing html uselessly when legacy code uses xmlhttprequest in the default mode to retrieve respon
setext for text/html resources.
... usage retrieving an html resource as a dom using xmlhttprequest works just like retrieving an xml resource as a dom using xmlhttprequest, except you can't use the synchronous mode and you have to explicitly request a document by assigning the string "document" to the respon
setype property of the xmlhttprequest object after calling open() but before calling send().
...And 6 more matches
Sending and Receiving Binary Data - Web APIs
receiving binary data using javascript typed arrays the respon
setype property of the xmlhttprequest object can be
set to change the expected response type from the server.
...the response property will contain the entity body according to respon
setype, as an arraybuffer, blob, document, json, or string.
... var oreq = new xmlhttprequest(); oreq.open("get", "/myfile.png", true); oreq.respon
setype = "arraybuffer"; oreq.onload = function (oevent) { var arraybuffer = oreq.response; // note: not oreq.respon
setext if (arraybuffer) { var bytearray = new uint8array(arraybuffer); for (var i = 0; i < bytearray.bytelength; i++) { // do something with each byte in the array } } }; oreq.send(null); you can also read a binary file as a blob by
setting the string "blob" to the respon
setype property...
...And 6 more matches
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.respon
setext); } 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.
...*/) { var xhr = new xmlhttprequest(); xhr.callback = callback; xhr.arguments = array.prototype.slice.call(arguments, 2); xhr.onload = xhrsuccess; xhr.onerror = xhrerror; xhr.open("get", url, true); xhr.send(null); } usage: function showmessage(message) { console.log(message + this.respon
setext); } loadfile("message.txt", showmessage, "new message!\n\n"); the signature of the utility function loadfile declares (i) a target url to read (via an http get request), (ii) a function to execute on successful completion of the xhr operation, and (iii) an arbitrary list of additional arguments that are passed through the xhr object (via the arguments property) to the success callback funct...
...this is done by
setting the value of the timeout property on the xmlhttprequest object, as shown in the code below: function loadfile(url, timeout, callback) { var args = array.prototype.slice.call(arguments, 3); var xhr = new xmlhttprequest(); xhr.ontimeout = function () { console.error("the request for " + url + " timed out."); }; xhr.onload = function() { if (xhr.readystate ==...
...And 6 more matches
ARIA: feed role - Accessibility
<article aria-posin
set="427" aria-
setsize="-1">...</article> <article aria-posin
set="428" aria-
setsize="-1">...</article> <article aria-posin
set="429" aria-
setsize="-1">...</article> ...
...if the addition of articles occupies the main browser thread, make sure to
set aria-busy="true" on the feed itself, and make sure to
set it back to false when processing ends, or the user may not see the updates.
... if the number of articles is known,
set aria-
setsize on the articles themselves.
...And 6 more matches
Keyboard-navigable JavaScript widgets - Accessibility
when
set to 0, the element becomes focusable by keyboard and script.
... when
set to -1, the element becomes focusable by script, but it does not become part of the keyboard focus order.
...to do this, authors can
set tabindex to any positive number.
...And 6 more matches
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
afari on iossamsung internet:is()chrome full support 68notes disabled full support 68notes disabled notes combinators in the selector list argument may not match correctly (see bug 842157).disabled from version 68: this feature is behind the #enable-experimental-web-platform-features preference (needs to be
set to enabled).
... no support 66 — 71notes alternate name disabled notes combinators in the selector list argument may not match correctly (see bug 842157).alternate name uses the non-standard name: :matches()disabled from version 66 until version 71 (exclusive): this feature is behind the #enable-experimental-web-platform-features preference (needs to be
set to enabled).
...e non-standard name: :-webkit-any()edge full support 79notes disabled full support 79notes disabled notes combinators in the selector list argument may not match correctly (see bug 842157).disabled from version 79: this feature is behind the #enable-experimental-web-platform-features preference (needs to be
set to enabled).
...And 6 more matches
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
this article provides a
set of mixins for those who want to mess around with flexbox using the native support of current browsers.
... this
set uses: fallbacks using 2009 'box' syntax (ff and older webkit) and prefixed syntaxes (ie10, webkit browsers without flex wrapping) final standards syntax (ff, safari, chrome, ie11+, edge, opera) this was inspired by: http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ with help from: http://w3.org/tr/css3-flexbox/ http://the-echoplex.net/flexyboxes/ http://msdn.microsoft.com/en-us/library/ie/hh772069(v=vs.85).aspx http://css-tricks.com/using-flexbox/ a complete guide to flexbox | css-tricks visual guide to css3 flexbox: flexbox playground | note: mixins are not currently supported natively in browsers.
...lexbox; display: flex; } //using this mixin %flexbox { @include flexbox; } @mixin inline-flex { display: -webkit-inline-box; display: -moz-inline-box; display: -webkit-inline-flex; display: -ms-inline-flexbox; display: inline-flex; } %inline-flex { @include inline-flex; } flexbox direction the flex-direction property specifies how flex items are placed in the flex container, by
setting the direction of the flex container's main axis.
...And 6 more matches
Shorthand properties - CSS: Cascading Style Sheets
shorthand properties are css properties that let you
set the values of multiple other css properties simultaneously.
... tricky edge cases even if they are very convenient to use, there are a few edge cases to keep in mind when using them: a value which is not specified is
set to its initial value.
... that sounds anecdotal, but it really means that it overrides previously
set values.
...And 6 more matches
font-variant - CSS: Cascading Style Sheets
the font-variant css shorthand property allows you to
set all the font variants for a font.
... you can also
set the css level 2 (revision 1) values of font-variant, (that is, normal or small-caps), by using the font shorthand.
... constituent properties this property is a shorthand for the following css properties: font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric syntax font-variant: small-caps; font-variant: common-ligatures small-caps; /* global values */ font-variant: inherit; font-variant: initial; font-variant: un
set; values normal specifies a normal font face; each of the longhand properties has an initial value of normal.
...And 6 more matches
font-weight - CSS: Cascading Style Sheets
the font-weight css property
sets the weight (or boldness) of the font.
... the weights available depend on the font-family that is currently
set.
...mal; font-weight: bold; /* keyword values relative to the parent */ font-weight: lighter; font-weight: bolder; /* numeric keyword values */ font-weight: 100; font-weight: 200; font-weight: 300; font-weight: 400;// normal font-weight: 500; font-weight: 600; font-weight: 700;// bold font-weight: 800; font-weight: 900; /* global values */ font-weight: inherit; font-weight: initial; font-weight: un
set; the font-weight property is specified using any one of the values listed below.
...And 6 more matches
mask-border - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: mask-border-mode mask-border-out
set mask-border-repeat mask-border-slice mask-border-source mask-border-width syntax /* source | slice */ mask-border: url('border-mask.png') 25; /* source | slice | repeat */ mask-border: url('border-mask.png') 25 space; /* source | slice | width */ mask-border: url('border-mask.png') 25 / 35px; /* source | slice | width | out
set | repeat | mode */ mask-border: url('border-mask.png') 25 / 35px / 12px space alpha; values <'mask-border-source'> the source image.
... <'mask-border-out
set'> the distance of the border mask from the element's outside edge.
...see mask-border-out
set.
...And 6 more matches
<position> - CSS: Cascading Style Sheets
the <position> (or <bg-position>) css data type denotes a two-dimensional coordinate used to
set a location relative to an element box.
... it is used in the background-position and off
set-anchor properties.
... syntax the <position> data type is specified with one or two keywords, with optional off
sets.
...And 6 more matches
Audio and video manipulation - Developer guides
html we can
set up our video player and <canvas> element like this: <video id="my-video" controls="true" width="480" height="270" crossorigin="anonymous"> <source src="https://udn.realityripple.com/samples/5b/8cd6da9c65.webm" type="video/webm"> <source src="https://udn.realityripple.com/samples/6f/08625b424a.m4v" type="video/mp4"> </video> <canvas id="my-canvas" width="480" height="270"></canvas> javascri...
... var processor = { timercallback: function() { if (this.video.paused || this.video.ended) { return; } this.computeframe(); var self = this;
settimeout(function () { self.timercallback(); }, 16); // roughly 60 frames per second }, doload: function() { this.video = document.getelementbyid("my-video"); this.c1 = document.getelementbyid("my-canvas"); this.ctx1 = this.c1.getcontext("2d"); var self = this; this.video.addeventlistener("play", function() { self.width = self.video.width; self.height = self.video.height; self.timercallback(); }, false); }, computeframe: function() { this.ctx1.drawimage(this.video, 0, 0, this.width, this.height); var frame = this.
...for efficiency, you should consider using requestanimationframe() instead of
settimeout() when running on browsers that support it.
...And 6 more matches
Rich-Text Editing in Mozilla - Developer guides
setting up rich-text editing rich-text editing is initialized by
setting the designmode property of a document to "on", such as the document inside an iframe.
... once designmode has been
set to "on", the document becomes a rich-text editing area and the user can type into it as if it were a textarea.
... similarly,
setting contenteditable to "true" allows you to make individual elements of a document editable.
...And 6 more matches
<input type="email"> - HTML: Hypertext Markup Language
its value can, however, still be changed by javascript code directly
setting the htmlinputelement.value property.
...since character widths vary, this may or may not be exact and should not be relied upon to be so; the resulting input may be narrower or wider than the specified number of characters, depending on the characters and the font (font
settings in use).
... this does not
set a limit on how many characters the user can enter into the field.
...And 6 more matches
<input type="number"> - HTML: Hypertext Markup Language
you can
set a default value for the input by including a number inside the value attribute, like so: <input id="number" type="number" value="42"> additional attributes in addition to the attributes commonly supported by all <input> types, inputs of type number support these attributes: attribute description list the id of the <datalist> element that contains the optional pre...
...its value can, however, still be changed by javascript code directly
setting the htmlinputelement.value property.
...when you create a number input with the proper type value, number, you get automatic validation that the entered text is a number, and usually a
set of up and down buttons to step the value up and down.
...And 6 more matches
<input type="radio"> - HTML: Hypertext Markup Language
<input> elements of type radio are generally used in radio groups—collections of radio buttons describing a
set of related options.
... note: checkboxes are similar to radio buttons, but with an important distinction: radio buttons are designed for selecting one value out of a
set, whereas checkboxes let you turn individual values on and off.
... for example, if your form needs to ask the user for their preferred contact method, you might create three radio buttons, each with the name property
set to contact but one with the value email, one with the value phone, and one with the value mail.
...And 6 more matches
Standard metadata names - HTML: Hypertext Markup Language
standard metadata names defined in the html specification the html specification defines the following
set of standard metadata names: application-name: the name of the application running in the web page.
... the browser will use this information in tandem with the user's browser or device
settings to determine what colors to use for everything from background and foregrounds to form controls and scrollbars.
...browser
settings can ignore this rule and ios10+ ignores it by default.
...And 6 more matches
Function.prototype.bind() - JavaScript
the bind() method creates a new function that, when called, has its this keyword
set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.
...when using bind to create a function (supplied as a callback) inside a
settimeout, any primitive value passed as thisarg is converted to object.
...o the ecmascript 5 // internal iscallable function throw new typeerror('function.prototype.bind - what is trying to be bound is not callable'); } var baseargs= arrayprototypeslice.call(arguments, 1), baseargslength = baseargs.length, ftobind = this, fnop = function() {}, fbound = function() { baseargs.length = baseargslength; // re
set to default base arguments baseargs.push.apply(baseargs, arguments); return ftobind.apply( fnop.prototype.isprototypeof(this) ?
...And 6 more matches
Strict mode - JavaScript
strict mode isn't just a sub
set: it intentionally has different semantics from normal code.
...eval code, function code, event handler attributes, strings passed to windowtimers.
settimeout(), and related functions are entire scripts, and invoking strict mode in them works as expected.
...syntax error 197 + 142; var sumwithoctal = 0o10 + 8; console.log(sumwithoctal); // 16 seventh, strict mode in ecmascript 2015 forbids
setting properties on primitive values.
...And 6 more matches
Web audio codec guide - Web media technologies
additionally, webrtc implementations generally use a sub
set of these codecs for their encoding and decoding of media, and may support additional codecs as well, for optimal cross-platform support of video and audio conferencing, and to integrate better with legacy telecommunication solutions.
... each channel may substantially increase the encoded audio size, depending on contents and encoder
settings.
... audio encoder configuration effects on quality and size feature effect on quality effect on size lossless compression no loss of fidelity unlikely to get more than 40-50% compression lossy compression always some loss of fidelity; the higher the compression, the more the loss compression of up to 80-95% possible quality
setting the higher the quality, the better the fidelity of the encoded audio the higher the fidelity, the larger the resulting file becomes, though the amount of change varies from codec to codec bit rate the higher the bit rate, the higher the quality can be the higher the bit rate, the larger the encoded file is likely to be audio frequency bandwidth if there is any...
...And 6 more matches
RDF in Mozilla FAQ - Archive of obsolete content
the open directory data
set is available as a (huge) rdf/xml dump.
...y, you can create one directly using the xpcom component manager, as the following code fragment illustrates: // create an rdf/xml datasource using the xpcom component manager var ds = components .classes["@mozilla.org/rdf/datasource;1?name=xml-datasource"] .createinstance(components.interfaces.nsirdfdatasource); // the nsirdfremotedatasource interface has the interfaces // that we need to
setup the datasource.
...by
setting // ablocking to true, we could force it to be synchronous, but this // is generally a bad idea, because your ui will completely lock up!
...And 5 more matches
Index - Game development
in this article we'll take you through the real basics of using babylon.js, including
setting up a development environment, structuring the necessary html, and writing the javascript code.
... 21 building up a basic demo with three.js 3d, animation, beginner, canvas, games, tutorial, webgl, camera, lighting, rendering, three.js in this article we'll take you through the real basics of using three, including
setting up a development environment, structuring the necessary html, the fundamental objects of three, and how to build up a basic demo.
...now let's move on to look at how to
set up the game to be controlled using a console gamepad, using the gamepad api.
...And 5 more matches
Audio for Web games - Game development
here's an example of an audio sprite player — first let's
set up the user interface in html: <audio id="myaudio" src="https://udn.realityripple.com/samples/f0/2909c16512.mp3"></audio> <button data-start="18" data-stop="19">0</button> <button data-start="16" data-stop="17">1</button> <button data-start="14" data-stop="15">2</button> <button data-start="12" data-stop="13">3</button> <button data-start="10" data-stop="11">4</button> <button data-start="8" da...
...recording this off
set and querying the playing track's current time gives you enough information to synchronize separate pieces of audio.
... let's create another async function to
set up the sample — we can combine the two async functions in a nice promise pattern to perform further actions when each file is loaded and buffered: async function loadfile(filepath) { const track = await getfile(filepath); return track; } let's also create a playtrack() function, which we can call once a file has been fetched.
...And 5 more matches
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
when used in conjunction with xpointer (firefox supports a sub
set of it, and is used in the code sample below), xinclude can also target just specific portions of a document for inclusion.
... var acceptlanguage = xinclude.getattribute('accept-language'); // "accept-language: "+x var xifallback = xinclude.getelementsbytagnamens('http://www.w3.org/2001/xinclude', 'fallback')[0]; // only one such child is allowed if (href === '' || href === null) { // points to same document if empty (null is equivalent to empty string) href = null; //
set for uniformity in testing below if (parse === 'xml' && xpointer === null) { alert('there must be an xpointer attribute present if "href" is empty an parse is "xml"'); return false; } } else if (href.match(/#$/, '') || href.match(/^#/, '')) { alert('fragment identifiers are disallowed in...
...e'); return false; } var j; var xincludeparent = xinclude.parentnode; try { netscape.security.privilegemanager.enableprivilege('universalxpconnect universalbrowserread'); // necessary with file:///-located files trying to reach external sites if (href !== null) { var response, respon
setype; var request = new xmlhttprequest(); request.open('get', href, false); request.
setrequestheader('if-modified-since', 'thu, 1 jan 1970 00:00:00 gmt'); request.
setrequestheader('cache-control', 'no-cache'); if (accept) { request.
setrequestheader('accept', accept); ...
...And 5 more matches
Mobile accessibility - Learn web development
if you've
set a passcode or pattern for unlocking your device, you will then be taken to the relevant entry screen to enter it.
... to turn it on, go to your
settings app and select accessibility > voiceover.
... note: some older ios devices have the voiceover menu at
settings app > general > accessibility > voiceover.
...And 5 more matches
Styling web forms - Learn web development
these include the following elements: <form> <field
set> and <legend> single-line text <input>s (e.g.
...by default it is always positioned over the top border of its <field
set> parent, near the top left corner.
... to position it somewhere else, for example inside the field
set somewhere, or near the bottom left corner, you need to rely on positioning.
...And 5 more matches
Image gallery - Learn web development
project brief you have been provided with some html, css and image as
sets and a few lines of javascript code; you need to write the necessary javascript to turn this into a working program.
... it
sets the width of any images inside the thumb-bar <div> (so-called "thumbnail" images) to 20%, and floats them to the left so they sit next to one another on a line.
... looping through the images we've already provided you with lines that store a reference to the thumb-bar <div> inside a constant called thumbbar, create a new <img> element,
set its src attribute to a placeholder value xxx, and append this new <img> element inside thumbbar.
...And 5 more matches
Useful string methods - Learn web development
to actually update the value of the browsertype variable in a real program, you'd have to
set the variable value to be the result of the operation; it doesn't just update the substring value automatically.
... each example comes with a "re
set" button, which you can use to re
set the code if you make a mistake and can't get it working again, and a "show solution" button you can press to see a potential answer if you get really stuck.
...n']; for (let i = 0; i < greetings.length; i++) { let input = greetings[i]; // your conditional test needs to go inside the parentheses // in the line below, replacing what's currently there if (greetings[i]) { let listitem = document.createelement('li'); listitem.textcontent = input; list.appendchild(listitem); } } </textarea> <div class="playable-buttons"> <input id="re
set" type="button" value="re
set"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = document.getelementbyid('code'); const re
set = document.getelementbyid('re
set'); con...
...And 5 more matches
Object building practice - Learn web development
some javascript that serves to
set up the <canvas> element and provide a general function that we're going to use.
... next, we
set constants called width and height, and the width and height of the canvas element (represented by the canvas.width and canvas.height properties) to equal the width and height of the browser viewport (the area that the webpage appears on — this can be gotten from the window.innerwidth and window.innerheight properties).
... note that we are chaining multiple assignments together, to get the variables all
set quicker — this is perfectly ok.
...And 5 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
to create this we'll receive the todos array as a prop, and
set the disabled property of each button accordingly.
...in the same fashion as we saw earlier, we'll create a nameel variable inside todo.svelte and call nameel.focus() after
setting the editing variable to true.
... open the file components/todo.svelte and add a nameel variable declaration, just below your editing and name declarations: let nameel // reference to the name input dom node now update your onedit() function like so: function onedit() { editing = true // enter editing mode nameel.focus() //
set focus to name input } and finally, bind nameel to the <input> field, by updating it like so: <input bind:value={name} bind:this={nameel} type="text" id="todo-{todo.id}" autocomplete="off" class="todo-text" /> however, when you try the updated app you'll get an error along the lines of "typeerror: nameel is undefined" in the console when you press a todo's edit button.
...And 5 more matches
Accessibility/LiveRegionDevGuide
in iaccessible2, iaccessibletext::get_oldtext and iaccessibletext::get_newtext are used to acquire the text and off
sets.
...(at-spi only) a global variable can be
set in a document:load:complete event listener and re
set in a object:state-changed:busy listener.
...if atomic is
set to "true", it means that the region must be presented as a whole while atomic="false" (default) indicates that the region can stand on it's own.
...And 5 more matches
Overview of Mozilla embedding APIs
the webbrowser exposes a
set of interfaces which allow the embedding application to control activity and respond to changes within this client area.
...to facilitate this, a
set of global functions are available to access the nsmemory methods without requiring an instance of the nsmemory service (see nsmemory.h).
...contract-id: ns_webbrowser_contractid implemented interfaces: nsiwebbrowser nsiwebnavigation nsiwebbrowser
setup nsiwebbrowserpersist nsiwebbrowserfind nsiwebbrowserprint nsiwebbrowserfocus nsibasewindow requestor interfaces: nsidomwindow nsidomdocument nsiwebprogress nsiclipboardcommands nsiprompt related interfaces: nsiprompt nsiwebbrowserchrome nsiwebbrowsersitewindow nsiwebprogresslistener nsicontextmenulistener nsiprintoptions overview: most of gecko's functionali...
...And 5 more matches
HTTP Cache
anonymous load boolean flag app id number (0 for no app) is-in-browser boolean flag helper functions to create nsiloadcontextinfo objects: c++ consumers: functions at loadcontextinfo.h exported header js consumers: resource://gre/modules/loadcontextinfo.jsm module methods two storage objects created with the same
set of nsiloadcontextinfo arguments are identical, containing the same cache entries.
... other parallel consumers, if any, are blocked until the writer calls
setvalid on the cache entry.
... when the server responds positively (in case of an http server with a 206 response code) the writer (in this order) opens the output stream on the cache entry and calls
setvalid to unblock other pending openers.
...And 5 more matches
Internationalized Domain Names (IDN) Support in Mozilla Browsers
until recently domain names allowed only a sub
set of 7-bit ascii characters.
... as the internet has spread to non-english speaking people around the world, it has become increasingly clear that forcing them to use domain names written only in a sub
set of the latin alphabet is not ideal.
...at the network protocol level, there is no change in the restriction that only a sub
set of ascii characters be used in url/uri.
...And 5 more matches
Index
7 l10n testing with xcode firefox for ios, localization once you have your l10n testing environment
set up in xcode, testing your firefox on ios localization is a breeze.
... 11 localization prerequisites internationalization, localization, delete to work on localization, you need a sub
set of the mozilla build prerequisites.
... 13 initial
setup localization as a pre-requisite to contributing to the l10n program, you need to have access to code, tools, and a properly configured local environment (i.e., your personal computer).
...And 5 more matches
nss tech note1
off
set† .
...if templates are nested, the off
set applies to the location of the current component within the target component, typically the decoded sequence.
...the following macros are provided for tag numbers within the universal class : sec_asn1_boolean, sec_asn1_integer, sec_asn1_bit_string, sec_asn1_octet_string, sec_asn1_null, sec_asn1_object_id, sec_asn1_object_descriptor,† sec_asn1_real, sec_asn1_enumerated, sec_asn1_embedded_pdv, sec_asn1_utf8_string, sec_asn1_sequence, sec_asn1_
set, sec_asn1_numeric_string, sec_asn1_printable_string, sec_asn1_t61_string, sec_asn1_teletex_string, sec_asn1_t61_string, sec_asn1_videotex_string, sec_asn1_ia5_string, sec_asn1_utc_time, sec_asn1_generalized_time, sec_asn1_graphic_string, sec_asn1_visible_string, sec_asn1_general_string, sec_asn1_universal_string, sec_asn1_bmp_string note that for sec_asn1_
set and sec_asn1_sequence types, you mu...
...And 5 more matches
JS_ClearContextThread
syntax jsword js_clearcontextthread(jscontext *cx); jsword js_
setcontextthread(jscontext *cx); name type description cx jscontext * the context to transfer from one thread to another.
... description an application that creates or uses a jscontext in one thread, then uses or destroys it in another thread, must use js_clearcontextthread and js_
setcontextthread to transfer the jscontext safely from one thread to the other.
... before thread b uses the jscontext, it must call js_
setcontextthread.
...And 5 more matches
JS_DefineElement
syntax /* added in spidermonkey 38 (jsapi 32) */ bool js_defineelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlevalue value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handleobject value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlestring value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineelement(jsc...
...ontext *cx, js::handleobject obj, uint32_t index, int32_t value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineelement(jscontext *cx, js::handleobject obj, uint32_t index, uint32_t value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); bool js_defineelement(jscontext *cx, js::handleobject obj, uint32_t index, double value, unsigned attrs, jsnative getter = nullptr, jsnative
setter = nullptr); /* obsolete since jsapi 32 */ js_defineelement(jscontext *cx, jsobject *obj, uint32_t index, jsval value, jspropertyop getter, jsstrictpropertyop
setter, unsigned attrs); ...
...
setter jsnative or jsstrictpropertyop
setproperty method for specifying a new property value.
...And 5 more matches
JS_DefinePropertyWithTinyId
syntax jsbool js_definepropertywithtinyid( jscontext *cx, jsobject *obj, const char *name, int8 tinyid, jsval value, jspropertyop getter, jspropertyop
setter, unsigned int attrs); jsbool js_defineucpropertywithtinyid( jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, int8 tinyid, jsval value, jspropertyop getter, jspropertyop
setter, unsigned int attrs); name type description cx jscontext * the context in which to define the property.
... tinyid int8 8-bit id to aid in sharing getter and
setter callbacks among properties.
...
setter jspropertyop
setproperty method for specifying a new property value.
...And 5 more matches
SpiderMonkey 1.8.7
a compartment is a global object, a context, and a
set of related objects with no outside references (crosscompartment wrappers excepted).
...global objects must also have the jsclass_global_flags flag
set.
... merely
setting jsclass_is_global is insufficient.
...And 5 more matches
An Overview of XPCOM
the best way to tackle a project of this size is to divide it into smaller, more manageable pieces, use a component programming model, and to organize related
sets of components into modules.
...this is the contractual agreement of this unencapsulated class: a
set of rules that define when each method can be called and what it is expected to do.
...if there isn't a match, the class returns an error and
sets the out value to null.
...And 5 more matches
Using XPCOM Utilities to Make Things Easier
generic xpcom module macros the work in the previous chapter was useful in
setting up the generic component code.
... the module macros include one
set of macros that define the exported nsgetmodule entry point, the required nsimodule implementation code and another that creates a generic factory for your implementation class.
...historically, it gets called in the constructor for your class and
sets mrefcnt to zero.
...And 5 more matches
mozIStorageConnection
[optional] in mozistoragestatementcallback acallback ); void executesimplesql(in autf8string asqlstatement); boolean indexexists(in autf8string aindexname); void preload(); obsolete since gecko 1.9 void removefunction(in autf8string afunctionname); mozistorageprogresshandler removeprogresshandler(); void rollbacktransaction(); void
setgrowthincrement(in print32 aincrement, in autf8string adatabasename); mozistorageprogresshandler
setprogresshandler(in print32 agranularity, in mozistorageprogresshandler ahandler); boolean tableexists(in autf8string atablename); attributes attribute type description connectionready boolean indicates if the connection is open and ready to u...
...the version will be reported as 0 if it is not
set.
... note: the statements may be reused immediately, and the statements do not need to be re
set individually.
...And 5 more matches
nsIContentPrefService2
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.
... void removebysubdomainandname(in astring domain, in astring name, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void removeglobal(in astring name, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void removeobserverforname(in astring name, in nsicontentprefobserver observer); void
set(in astring domain, in astring name, in nsivariant value, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
setglobal(in astring name, in nsivariant value, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); methods addobserverforname() registers an observer that will be notified whenever a preference with the given na...
...me is
set() or removed.
...And 5 more matches
nsISearchEngine
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void addparam(in astring name, in astring value, in astring respon
setype); nsisearchsubmission getsubmission(in astring data, [optional] in astring respon
setype, [optional] in astring purpose); boolean supportsrespon
setype(in astring respon
setype); attributes attribute type description alias astring an optional shortcut alias for the engine.
...void addparam( in astring name, in astring value, in astring respon
setype ); parameters name the name of the parameter to add.
... respon
setype since an engine can have several different request urls, differentiated by response types, this parameter selects a request to add parameters to.
...And 5 more matches
nsISecurityCheckedComponent
inherits from: nsisupports last changed in gecko 1.7 capability strings in gecko, a "capability" is a string identifying a
set of actions that code is allowed to perform.
... this includes creating instances of arbitrary xpcom objects and calling methods and
setting properties on them.
... for example, this capability allows code to
set the value of <input type="file"> and access an arbitrary file on disk.
...And 5 more matches
nsIURI
netwerk/base/public/nsiuri.idlscriptable this is an interface for an uniform resource identifier with internationalization support, offering attributes that allow
setting and querying the basic components of a uri, and methods for performing basic operations on uris.
... to create an nsiuri object, you should use nsiioservice.newuri(), like this: function makeuri(aurl, aoriginchar
set, abaseuri) { var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); return ioservice.newuri(aurl, aoriginchar
set, abaseuri); } components of a uri prepath path scheme userpass host port ref ftp :// username@password @ hostname ...
... originchar
set acstring the char
set of the document from which this uri originated.
...And 5 more matches
nsIWebBrowserChrome
inherits from: nsisupports last changed in gecko 0.9.6 method overview void destroybrowserwindow(); void exitmodaleventloop(in nsresult astatus); boolean iswindowmodal(); void
setstatus(in unsigned long statustype, in wstring status); void showasmodal(); void sizebrowserto(in long acx, in long acy); attributes attribute type description chromeflags unsigned long the chrome flags for this browser chrome.
...the browser chrome may be told to
set the webbrowser object to a new object by
setting this attribute.
... in this case the implementer is responsible for taking the new webbrowser object and doing any necessary initialization or
setup as if it had created the webbrowser itself.
...And 5 more matches
MailNews fakeserver
writing a new fakeserver since the number of protocols we use is very small, most people shouldn't have to write an entirely new daemon and handler
setup by themselves.
...
setmultiline the new value of multiline nothing the value is a boolean, with true invoking multiline mode.
...using fakeserver in xpcshell tests since there are three different components of fakeserver, a total of four objects need to be
set up in a fakeserver test on top of other testing.
...And 5 more matches
about:debugging (before Firefox 68) - Firefox Developer Tools
whether or not system add-ons appear in the list on this page depends on the
setting of the devtools.aboutdebugging.showsystemaddons preference.
... if you need to see system add-ons, navigate to about:config and make sure that this value is
set to true.
...checking the box
sets both preferences to true, and unchecking it
sets them both to false.
...And 5 more matches
Consistent list indentation - CSS: Cascading Style Sheets
this is why, in every browser except internet explorer for windows, markers are placed outside any border
set for an <li> element, assuming the value of list-style-position is outside.
...in internet explorer and opera, the lists are indented by
setting a left margin of 40 pixels on the <ul> element.
... gecko, on the other hand,
sets a left padding of 40 pixels for the <ul> element, so given the exact same styles as were used to produce figure 5, loading the example into a gecko-based browser gives us figure 6.
...And 5 more matches
CSS reference - CSS: Cascading Style Sheets
-end-colorborder-block-end-styleborder-block-end-widthborder-block-startborder-block-start-colorborder-block-start-styleborder-block-start-widthborder-block-styleborder-block-widthborder-bottomborder-bottom-colorborder-bottom-left-radiusborder-bottom-right-radiusborder-bottom-styleborder-bottom-widthborder-collapseborder-colorborder-end-end-radiusborder-end-start-radiusborder-imageborder-image-out
setborder-image-repeatborder-image-sliceborder-image-sourceborder-image-widthborder-inlineborder-inline-colorborder-inline-endborder-inline-end-colorborder-inline-end-styleborder-inline-end-widthborder-inline-startborder-inline-start-colorborder-inline-start-styleborder-inline-start-widthborder-inline-styleborder-inline-widthborder-leftborder-left-colorborder-left-styleborder-left-widthborder-radiusb...
...-right-styleborder-right-widthborder-spacingborder-start-end-radiusborder-start-start-radiusborder-styleborder-topborder-top-colorborder-top-left-radiusborder-top-right-radiusborder-top-styleborder-top-widthborder-widthbottom@bottom-centerbox-decoration-breakbox-shadowbox-sizingbreak-afterbreak-beforebreak-insidebrightness()ccalc()caption-sidecaret-colorch@character-variantcharacter-variant()@char
set:checkedcircle()clamp()clearclipclip-pathcm<color>colorcolor-adjustcolumn-countcolumn-fillcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-spancolumn-widthcolumnsconic-gradient()containcontentcontrast()<counter>counter-incrementcounter-re
setcounter-
set@counter-stylecounters()cross-fade()cubic-bezier()::cue::cue-regioncursor<custom-ident>d:defaultdeg<dimension>:dirdire...
...y-listitem><display-outside>dpcmdpidppxdrop-shadow()eelement()ellipse()em:emptyempty-cells:enabledenv()exffallback (@counter-style)filter<filter-function>:first:first-child::first-letter (:first-letter)::first-line (:first-line):first-of-typefit-content()<flex>flexflex-basisflex-directionflex-flowflex-growflex-shrinkflex-wrapfloat:focusfont@font-facefont-familyfont-family (@font-face)font-feature-
settingsfont-feature-
settings (@font-face)@font-feature-valuesfont-kerningfont-language-overridefont-optical-sizingfont-sizefont-size-adjustfont-stretchfont-stretch (@font-face)font-stylefont-style (@font-face)font-synthesisfont-variantfont-variant (@font-face)font-variant-alternatesfont-variant-capsfont-variant-east-asianfont-variant-ligaturesfont-variant-numericfont-variant-positionfont-variation-s...
...And 5 more matches
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
source image examples before diving in to look at the results of using different kinds of source images and seeing how they look when used with background-size, it would be helpful to look at a few example source images that have different dimensions and sizing
settings.
...in addition, the backgrounds have background-repeat
set to no-repeat for clarity.
... automatic sizing using "auto" for both dimensions if background-size is
set to auto or auto auto, rule 2 says that rendering must preserve any intrinsic ratio that's provided.
...And 5 more matches
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
they are
set using custom property notation (e.g., --main-color: black;) and are accessed using the var() function (e.g., color: var(--main-color);).
...like any other property, this is written inside a rule
set, like so: element { --main-bg-color: brown; } note that the selector given to the rule
set defines the scope that the custom property can be used in.
...the background color is
set to brown in several places.
...And 5 more matches
all - CSS: Cascading Style Sheets
the all shorthand css property re
sets all of an element's properties except unicode-bidi, direction, and css custom properties.
... it can
set properties to their initial or inherited values, or to the values specified in another stylesheet origin.
... syntax /* global values */ all: initial; all: inherit; all: un
set; /* css cascading and inheritance level 4 */ all: revert; the all property is specified as one of the css global keyword values.
...And 5 more matches
animation-direction - CSS: Cascading Style Sheets
the animation-direction css property
sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward.
... it is often convenient to use the shorthand property animation to
set all animation properties at once.
... syntax /* single animation */ animation-direction: normal; animation-direction: reverse; animation-direction: alternate; animation-direction: alternate-reverse; /* multiple animations */ animation-direction: normal, reverse; animation-direction: alternate, reverse, normal; /* global values */ animation-direction: inherit; animation-direction: initial; animation-direction: un
set; values normal the animation plays forwards each cycle.
...And 5 more matches
background-position-x - CSS: Cascading Style Sheets
the background-position-x css property
sets the initial horizontal position for each background image.
... the position is relative to the position layer
set by background-origin.
... background-position-x: 25%; /* <length> values */ background-position-x: 0px; background-position-x: 1cm; background-position-x: 8em; /* side-relative values */ background-position-x: right 3px; background-position-x: left 25%; /* multiple values */ background-position-x: 0px, center; /* global values */ background-position-x: inherit; background-position-x: initial; background-position-x: un
set; the background-position-x property is specified as one or more values, separated by commas.
...And 5 more matches
background-position-y - CSS: Cascading Style Sheets
the background-position-y css property
sets the initial vertical position for each background image.
... the position is relative to the position layer
set by background-origin.
...ckground-position-y: 25%; /* <length> values */ background-position-y: 0px; background-position-y: 1cm; background-position-y: 8em; /* side-relative values */ background-position-y: bottom 3px; background-position-y: bottom 10%; /* multiple values */ background-position-y: 0px, center; /* global values */ background-position-y: inherit; background-position-y: initial; background-position-y: un
set; the background-position-y property is specified as one or more values, separated by commas.
...And 5 more matches
background - CSS: Cascading Style Sheets
the background shorthand css property
sets all background style properties at once, such as color, image, origin and size, or repeat method.
...if included once, it
sets both background-origin and background-clip.
... if it is included twice, the first occurrence
sets background-origin, and the second
sets background-clip.
...And 5 more matches
border-image-slice - CSS: Cascading Style Sheets
four slice lines,
set a given distance from their respective sides, control the size of the regions.
...it is discarded by default, but is used like a background image if the keyword fill is
set.
... the border-image-repeat, border-image-width, and border-image-out
set properties determine how these regions are used to form the final border image.
...And 5 more matches
bottom - CSS: Cascading Style Sheets
the bottom css property participates in
setting the vertical position of a positioned element.
... the effect of bottom depends on how the element is positioned (i.e., the value of the position property): when position is
set to absolute or fixed, the bottom property specifies the distance between the element's bottom edge and the bottom edge of its containing block.
... when position is
set to relative, the bottom property specifies the distance the element's bottom edge is moved above its normal position.
...And 5 more matches
flex - CSS: Cascading Style Sheets
the flex css shorthand property
sets how a flex item will grow or shrink to fit the space available in its flex container.
...itial; flex: none; /* one value, unitless number: flex-grow */ flex: 2; /* one value, width/height: flex-basis */ flex: 10em; flex: 30%; flex: min-content; /* two values: flex-grow | flex-basis */ flex: 1 30px; /* two values: flex-grow | flex-shrink */ flex: 2 2; /* three values: flex-grow | flex-shrink | flex-basis */ flex: 2 2 10%; /* global values */ flex: inherit; flex: initial; flex: un
set; the flex property may be specified using one, two, or three values.
...this is equivalent to
setting "flex: 0 1 auto".
...And 5 more matches
font-variant-numeric - CSS: Cascading Style Sheets
ng-values> */ font-variant-numeric: tabular-nums; /* <numeric-spacing-values> */ font-variant-numeric: diagonal-fractions; /* <numeric-fraction-values> */ font-variant-numeric: stacked-fractions; /* <numeric-fraction-values> */ font-variant-numeric: oldstyle-nums stacked-fractions; /* global values */ font-variant-numeric: inherit; font-variant-numeric: initial; font-variant-numeric: un
set; this property can take one of two forms: either the keyword value normal or one or more of the other values listed below, space-separated, in any order.
...two values are possible: lining-nums activating the
set of figures where numbers are all lying on the baseline.
... oldstyle-nums activating the
set of figures where some numbers, like 3, 4, 7, 9 have descenders.
...And 5 more matches
grid-area - CSS: Cascading Style Sheets
if four <grid-line> values are specified, grid-row-start is
set to the first value, grid-column-start is
set to the second value, grid-row-end is
set to the third value, and grid-column-end is
set to the fourth value.
... when grid-column-end is omitted, if grid-column-start is a <custom-ident>, grid-column-end is
set to that <custom-ident>; otherwise, it is
set to auto.
... when grid-row-end is omitted, if grid-row-start is a <custom-ident>, grid-row-end is
set to that <custom-ident>; otherwise, it is
set to auto.
...And 5 more matches
quotes - CSS: Cascading Style Sheets
the quotes css property
sets how the browser should render quotation marks that are added using the open-quotes or close-quotes values of the css content property.
... syntax /* keyword value */ quotes: none; quotes: auto; /* <string> values */ quotes: "«" "»"; /*
set open-quote and close-quote to the french quotation marks */ quotes: "«" "»" "‹" "›"; /*
set two levels of quotation marks */ /* global values */ quotes: inherit; quotes: initial; quotes: un
set; values none the open-quote and close-quote values of the content property produce no quotation marks.
... auto appropriate quote marks will be used for whatever language value is
set on the selected elements (i.e.
...And 5 more matches
shape-outside - CSS: Cascading Style Sheets
syntax /* keyword values */ shape-outside: none; shape-outside: margin-box; shape-outside: content-box; shape-outside: border-box; shape-outside: padding-box; /* function values */ shape-outside: circle(); shape-outside: ellipse(); shape-outside: in
set(10px 10px 10px 10px); shape-outside: polygon(10px 10px, 20px 20px, 30px 30px); shape-outside: path('m0.5,1 c0.5,1,0,0.7,0,0.3 a0.25,0.25,1,1,1,0.5,0.3 a0.25,0.25,1,1,1,1,0.3 c1,0.7,0.5,1,0.5,1 z'); /* <url> value */ shape-outside: url(image.png); /* <gradient> value */ shape-outside: linear-gradient(45deg, rgba(255, 255, 255, 0) 150px, red 150px); /* global values */ shape-outside: initial; sh...
...ape-outside: inherit; shape-outside: un
set; the shape-outside property is specified using the values from the list below, which define the float area for float elements.
... <basic-shape> the float area is computed based on the shape created by of one of in
set(), circle(), ellipse(), polygon(), or as added in the level 2 specification path().
...And 5 more matches
DOM onevent handlers - Developer guides
you can specify an on<…> event handler for a particular event (such as click) for a given object in different ways: adding an html attribute named on<eventtype>: <button onclick="handleclick()">, or by
setting the corresponding property from javascript: document.queryselector("button").onclick = function(event) { … }.
... non-element objects event handlers can also be
set with properties on non-element objects that generate events, like window, document, xmlhttprequest, and others.
...when the element is built from the html, the value of its onevent attributes are copied to the dom object that represents the element, so that accessing the attributes' values using javascript will get the value
set in the html.
...And 5 more matches
disabled - HTML: Hypertext Markup Language
the disabled attribute is supported by <button>, <command>, <field
set>, <keygen>, <optgroup>, <option>, <select>, <textarea> and <input>.
...if this attribute is not specified, the control inherits its
setting from the containing element, for example field
set; if there is no containing element with the disabled attribute
set, and the control itself does not have the attribute, then the control is enabled.
... note: if a <field
set> is disabled, the descendant form controls are all disabled, with the exception of form controls within the <legend>.
...And 5 more matches
HTML attribute: multiple - HTML: Hypertext Markup Language
the boolean multiple attribute, if
set, means the form control accepts one or more values.
... depending on the type, the form control may have a different appearance if the multiple attribute is
set.
...most browsers displaying a scrolling list box for a <select> control with the multiple attribute
set versus a single line dropdown when the attribute is ommitted.
...And 5 more matches
Date and time formats used in HTML - HTML: Hypertext Markup Language
character
set dates and times in html are always strings which use the ascii character
set.
... when you
set the value of a datetime-local input, the string is normalized into a standard form.
... time zone off
set string a time zone off
set string specifies the off
set in either a positive or a negative number of hours and minutes from the standard time base.
...And 5 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
however, this can be useful when creating media elements whose source will be
set at a later time, under user control.
...if the server does not give credentials to the origin site (by not
setting the access-control-allow-origin: http header), the image will be tainted, and its usage restricted.
...see cors
settings attributes for additional information.
...And 5 more matches
<button>: The Button element - HTML: Hypertext Markup Language
setting autocomplete="off" on the button disables this feature; see bug 654072.
...(if this attribute is not
set, the <button> is associated with its ancestor <form> element, if any.) this attribute lets you associate <button> elements to <form>s anywhere in the document, not just inside a <form>.
... multipart/form-data: use to submit <input> elements with their type attributes
set to file.
...And 5 more matches
<input type="search"> - HTML: Hypertext Markup Language
idl attributes value methods select(),
setrangetext(),
setselectionrange().
...its value can, however, still be changed by javascript code directly
setting the htmlinputelement.value property.
...since character widths vary, this may or may not be exact and should not be relied upon to be so; the resulting input may be narrower or wider than the specified number of characters, depending on the characters and the font (font
settings in use).
...And 5 more matches
<input type="week"> - HTML: Hypertext Markup Language
you can
set a default value for the input by including a value inside the value attribute, like so: <label for="week">what week would you like to start?</label> <input id="week" type="week" name="week" value="2017-w01"> one thing to note is that the displayed format may differ from the actual value, which is always formatted yyyy-www.
... you can also get and
set the value in javascript using the input element's value property, for example: var weekcontrol = document.queryselector('input[type="week"]'); weekcontrol.value = '2017-w45'; additional attributes in addition to the attributes common to <input> elements, week inputs offer the following attributes: attribute description max the latest year and week to accept as valid input min the earliest year and week to accept as valid input readonly a boolean which, if present, indicates that the user cannot edit the field's contents step the stepping...
...its value can, however, still be changed by javascript code directly
setting the htmlinputelement.value property.
...And 5 more matches
<script>: The Script element - HTML: Hypertext Markup Language
see cors
settings attributes for a more descriptive explanation of its valid arguments.
... defer this boolean attribute is
set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing domcontentloaded.
... nomodule this boolean attribute is
set to indicate that the script should not be executed in browsers that support es2015 modules — in effect, this can be used to serve fallback scripts to older browsers that do not support modular javascript code.
...And 5 more matches
<tbody>: The Table Body element - HTML: Hypertext Markup Language
the html table body element (<tbody>) encapsulates a
set of table rows (<tr> elements), indicating that they comprise the body of the table (<table>).
...possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textual content so that the content is justified in the cell char, aligning the textual content on a special character with a minimal off
set, defined by the char and charoff attributes.
... if this attribute is not
set, the left value is assumed.
...And 5 more matches
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
the html <tfoot> element defines a
set of rows summarizing the columns of the table.
...possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textual content so that the content is justified in the cell char, aligning the textual content on a special character with a minimal off
set, defined by the char and charoff attributes unimplemented (see bug 2212).
... if this attribute is not
set, the left value is assumed.
...And 5 more matches
<thead>: The Table Head element - HTML: Hypertext Markup Language
the html <thead> element defines a
set of rows defining the head of the columns of the table.
...possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textual content so that the content is justified in the cell char, aligning the textual content on a special character with a minimal off
set, defined by the char and charoff attributes unimplemented (see bug 2212).
... if this attribute is not
set, the left value is assumed.
...And 5 more matches
Using the application cache - HTML: Hypertext Markup Language
you do not need to list all pages you want cached in the manifest file, the browser implicitly adds every page that the user visits and that has the manifest attribute
set to the application cache.
... subsequent visits to that document cause the browser to load the document and other as
sets specified in the manifest file from the application cache (not from the server).
...safari has a similar "empty cache"
setting in its preferences but a browser restart may also be required.
...And 5 more matches
MIME types (IANA media types) - HTTP
each type has its own
set of possible subtypes, and a mime type always has both a type and a subtype, never just one or the other.
... 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 char
set parameter can be used to specify the character
set used for the characters in the data.
... if no char
set is specified, the default is ascii (us-ascii) unless overridden by the user agent's
settings.
...And 5 more matches
SameSite cookies - HTTP
the samesite attribute of the
set-cookie http response header allows you to declare if your cookie should be restricted to a first-party or same-site context.
...
set-cookie: flavor=choco; samesite=none to fix this, you will have to add the secure attribute to your samesite=none cookies.
...
set-cookie: flavor=choco; samesite=none; secure a secure cookie is only sent to the server with an encrypted request over the https protocol.
...And 5 more matches
Redirections in HTTP - HTTP
in that case, try a <meta> element with its http-equiv attribute
set to refresh in the <head> of the page.
...always
set it to 0 for accessibility compliance.
... javascript redirections redirections in javascript are performed by
setting a url string to the window.location property, loading the new page: window.location = "https://example.com/"; like html redirections, this can't work on all resources, and obviously, this will only work on clients that execute javascript.
...And 5 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
const pi = 3.14; // variable pi is
set pi = 1; // will throw an error because you cannot change a constant variable.
... control structures javascript has a similar
set of control structures to other languages in the c family.
...it can also be used to
set and get properties with names that are reserved words: obj.for = 'simon'; // syntax error, because 'for' is a reserved word obj['for'] = 'simon'; // works fine starting in ecmascript 5, reserved words may be used as object property names "in the buff".
...And 5 more matches
Intl.Locale.prototype.numeric - JavaScript
if numeric is
set to false, there will be no special handling of numeric values in strings.
... if numeric is
set to true, then the locale will take numeric characters into account when collating strings.
... examples
setting the numeric value via the locale string in the unicode locale string spec, the values that numeric represents correspond to the key kn.
...And 5 more matches
Map - JavaScript
maps object is similar to map—both let you
set keys to values, retrieve those values, delete keys, and detect whether something is stored at a key.
...
setting object properties
setting object properties works for map objects as well, and can cause considerable confusion.
... therefore, this appears to work in a way: let wrongmap = new map() wrongmap['bla'] = 'blaa' wrongmap['bla2'] = 'blaaa2' console.log(wrongmap) // map { bla: 'blaa', bla2: 'blaaa2' } but that way of
setting a property does not interact with the map data structure.
...And 5 more matches
Promise.prototype.then() - JavaScript
the behavior of the handler function follows a specific
set of rules.
...the value received and returned is: " + value); return value; }); // instantly logging the value of thenprom console.log(thenprom); // using
settimeout we can postpone the execution of a function to the moment the stack is empty
settimeout(() => { console.log(thenprom); }); // logs, in order: // promise {[[promisestatus]]: "pending", [[promisevalue]]: undefined} // "this gets called after the end of the main stack.
...the below snippet simulates asynchronous code with the
settimeout function.
...And 5 more matches
TypedArray - JavaScript
set value and get value etc., operate on that array buffer address.
...these objects all have a common syntax for their constructors: new typedarray(); new typedarray(length); new typedarray(typedarray); new typedarray(object); new typedarray(buffer [, byteoff
set [, length]]); where typedarray is a constructor for one of the concrete types.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
...And 5 more matches
eval() - JavaScript
thus, any use of eval() will force the browser to do long expensive variable name lookups to figure out where the variable exists in the machine code and
set its value.
..."a.b.c" var result = getdescendantprop(obj, proppath);
setting a property that way works similarly: function
setdescendantprop(obj, desc, value) { var arr = desc.split('.'); while (arr.length > 1) { obj = obj[arr.shift()]; } return obj[arr[0]] = value; } var obj = {a: {b: {c: 0}}}; var proppath = getproppath(); // returns e.g.
... "a.b.c" var result =
setdescendantprop(obj, proppath, 1); // obj.a.b.c will now be 1 use functions instead of evaluating snippets of code javascript has first-class functions, which means you can pass functions as arguments to other apis, store them in variables and objects' properties, and so on.
...And 5 more matches
<mpadded> - MathML
the mathml <mpadded> element is used to add extra padding and to
set the general adjustment of position and size of enclosed contents.
... depth
sets or increments the depth.
... height
sets or increments the height.
...And 5 more matches
Web video codec guide - Web media technologies
lossy compression to some degree, artifacts and other forms of quality degradation wil occur, depending on the specific codec and how much compression is being applied the more the encoded video is allowed to deviate from the source, the easier it is to accomplish higher compression rates quality
setting the higher the quality configuration, the more like the original media the encoded video will look in general, higher quality
settings will result in larger encoded video files; the degree to which this is true varies depending on the codec bit rate quality generally improves with higher bit rates higher bit rates inherently lead to larger output files the options ...
...each frame of video is presented by applying a
set of changes to the currently-visible frame.
... staircase effect the staircase effect is a spatial artifact that occurs when diagonal straight or curved edges that should be smooth take on a jagged appearance, looking somewhat like a
set of stair steps.
...And 5 more matches
Populating the page: how browsers work - Web Performance
dns lookup the first step of navigating to a web page is finding where the as
sets for that page are located.
... tcp handshake once the ip address is known, the browser
sets up a connection to the server via a tcp three-way handshake.
... <!doctype html> <html> <head> <meta char
set="utf-8"/> <title>my simple page</title> <link rel="stylesheet" src="styles.css"/> <script src="myscript.js"></script> </head> <body> <h1 class="heading">my page</h1> <p>a paragraph with a <a href="https://example.com/about">link</a></p> <div> <img src="myimage.jpg" alt="image description"/> </div> <script src="anotherscript.js"></script> </body> </html> this response for this...
...And 5 more matches
Navigation and resource timings - Web Performance
both provide the same read-only properties, but navigation timing measures the main document's timings whereas the resource timing provides the times for all the as
sets or resources called in by that main document and the resources' requested resources.
...if the transport layer fails after the start of the request and the connection is reopened, this property will be
set to the time corresponding to the new request.
... navigation timing when a user requests a web site or application, to populate the browser the user agent goes through a series of steps, including a dns lookup, tcp handshake, and ssl negotiation, before the user agent makes the actual request and the servers return the requested as
sets.
...And 5 more matches
Understanding latency - Web Performance
subsequent requests will have less latency because the connection to the server is already
set.
... the latency associated with a single as
set, especially a basic html page, may seem trivial.
...different browser developer tools have different pre
set options, the characteristics emulated include download speed, upload speed, and minimum latency, or the minimum amount of type it takes to send a packet of data.
...And 5 more matches
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
the default option is chosen when the user won't make a choice, and the other two are
set when the user clicks yes or no respectively.
... create a notification the example app creates a notification out of the available data — a game is picked at random, and the chosen one feeds the notification with the content: it
sets the game's name as the title, mentioning the author in the body, and showing the image as an icon: function randomnotification() { var randomitem = math.floor(math.random()*games.length); var notiftitle = games[randomitem].name; var notifbody = 'created by '+games[randomitem].author+'.'; var notifimg = 'data/img/'+games[randomitem].slug+'.jpg'; var options = { body: notifbody, icon: notifimg } var notif = new notification(notiftitle, options);
settimeout(randomnotification, 30000); } a ne...
...you can examine the service workers cookbook examples, try to
set up a push messaging server using firebase, or build your own server (using node.js for example).
...And 5 more matches
display - SVG: Scalable Vector Graphics
when applied to a container element,
setting display to none causes the container and all of its children to be invisible; thus, it acts on groups of elements as a group.
... when the display attribute is
set to none, then the given element does not become part of the rendering tree.
... it has implications for the <tspan>, <tref>, and <altglyph> elements, event processing, for bounding box calculations and for calculation of clipping paths: if display is
set to none on a <tspan>, <tref>, or <altglyph> element, then the text string is ignored for the purposes of text layout.
...And 5 more matches
dx - SVG: Scalable Vector Graphics
seven elements are using this attribute: <altglyph>, <fedropshadow>, <feoff
set>, <glyphref>, <text>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- lines materialized the position of the glyphs --> <line x1="0" x2="100%" y1="50%" y2="50%" /> <line x1="10%" x2="10%" y1="0" y2="100%" /> <line x1="60%" x2="60%" y1="0" y2="100%" /> <!-- some reference text --> <text x="10%" y="50%" fill="grey">svg</text> <!-- the same text with a shift along the x-axis --> <text dx="50%" x="10%" y="50%">svg</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } altglyph warning: as ...
... value list of <length> default value none animatable yes fedropshadow for <fedropshadow>, dx defines the x off
set of the droped shadow.
... the unit used to resolve the value of the attribute is
set by the primitiveunits attribute of the <filter> element.
...And 5 more matches
dy - SVG: Scalable Vector Graphics
seven elements utilize this attribute: <altglyph>, <fedropshadow>, <feoff
set>, <glyphref>, <text>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- lines materialized the position of the glyphs --> <line x1="10%" x2="10%" y1="0" y2="100%" /> <line x1="0" x2="100%" y1="30%" y2="30%" /> <line x1="0" x2="100%" y1="80%" y2="80%" /> <!-- some reference text --> <text x="10%" y="30%" fill="grey">svg</text> <!-- the same text with a shift along the y-axis --> <text dy="50%" x="10%" y="30%">svg</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } altglyph warning: a...
... value list of <length> default value none animatable yes fedropshadow for <fedropshadow>, dy defines the y off
set of the dropped shadow.
... the unit used to resolve the value of the attribute is
set by the primitiveunits attribute of the <filter> element.
...And 5 more matches
<use> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 30 10" xmlns="http://www.w3.org/2000/svg"> <circle id="mycircle" cx="5" cy="5" r="4" stroke="blue"/> <use href="#mycircle" x="10" fill="blue"/> <use href="#mycircle" x="20" fill="white" stroke="red"/> <!-- stroke="red" will be ignored here, as stroke was already
set on mycircle.
... most attributes (except for x, y, width, height and (xlink:)href) do not override those
set in the ancestor.
...(this differs from how css style attributes override those
set 'earlier' in the cascade).
...And 5 more matches
Referer header: privacy and security concerns - Web security
for example, consider a "re
set password" page with a social media link in a footer.
... if the link was followed, depending on how information was shared the social media site may receive the re
set password url and may still be able to use the shared information, potentially compromising a user's security.
...a sensible application would remove such risks by making password re
set urls only usable for a single use, or when combined with a unique user token, and transmitting sensitive data in different ways.
...And 5 more matches
Private Properties - Archive of obsolete content
it is possible to read this section on its own, but to fully appreciate how namespaces work, and the problem they
set out to solve, it is recommended to read the entire article.
... to make a private property readable/writable from any function, it's common to define getter/
setter functions for the property, respectively: point.prototype.getx = function () { return this._x; }; point.prototype.
setx = function (x) { this._x = x; }; point.prototype.gety = function () { return this._y; }; point.prototype.
sety = function (y) { this._y = y; }; the above technique is simple and clearly expresses intent.
... using closures another common technique, is to define private properties as variables and their getter and
setter functions as a closure over these variables: function point(_x, _y) { this.getx = function () { return _x; }; this.
setx = function (x) { _x = x; }; this.gety = function () { return _y; }; this.
sety = function (y) { _y = y; }; } note that this technique requires member functions that need access to private properties to be defined on the object itself, instead of its prototype.
...And 4 more matches
selection - Archive of obsolete content
get and
set text and html selections in the current web page.
...ntiguous selections as html: var selection = require("sdk/selection"); if (!selection.iscontiguous) { for (var subselection in selection) { console.log(subselection.html); } } surround html selections with delimiters: var selection = require("sdk/selection"); selection.on('select', function () { selection.html = "\\\" + selection.html + "///"; }); globals properties text gets or
sets the current selection as plain text.
...
setting the selection removes all current selections, inserts the specified text at the location of the first selection, and selects the new text.
...And 4 more matches
jpm - Archive of obsolete content
installing jpm globally npm install jpm --global depending on your
setup, you might need to run this as an administrator: sudo npm install jpm --global installing jpm locally if you do not wish to, or are unable to, install jpm globally, you may instead install it locally: cd $home && npm install jpm to run jpm from a terminal when installed locally, you must add the directory "$home/node_modules/.bin/" to your terminal's path first.
...this is due to firefox 48, and later, not having the option to run add-ons which are unsigned.]: jpm run -b nightly you can
set the jpm_firefox_binary environment variable with the path to the version of firefox you want to run.
... when you invoke jpm run or jpm test without the -b option, jpm first checks jpm_firefox_binary, and use this as the path if it is
set.
...And 4 more matches
Default Preferences - Archive of obsolete content
introduction a key part of any extension is the default
settings that come with it.
... mozilla provides a simple way of shipping default
settings by allowing default preferences.
...user supplied prefs are
set using the gui and also by modifying a profile's prefs.js file (which uses the user_pref() function).
...And 4 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
fixme: figure 1: uncheck “exclude browser files.”
set up quicknote for the purposes of this explanation, we’re going to use the file-storage mechanism in quicknote1 for our debugger.
... fixme: figure 2: selecting source code inserting breakpoints now you’ll want to
set some breakpoints.
...in the quicknote example, we first
set one breakpoint and then stepped through it.
...And 4 more matches
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
passing around functions/code as strings often you'll want to pass functions or code to other functions, most notoriously
settimeout and addeventlistener.
...
settimeout("dosomething();", 100); addeventlistener("load", "myaddon.init(); myaddon.onload();", true);
setinterval(am_i_a_string_or_function_reference_qmark, 100); that in itself is certainly not elegant, but it may also become a security issue if you pass code that was externally retrieved (or at least contains bits of externally retrieved data): // do not use!
...
settimeout("alert('" + xhr.respon
setext + "');", 100); // attacker manipulated respon
setext to contain "attack!'); format_computer(); alert('done"
settimeout("alert('attack!'); format_computer(); alert('done');", 100); as a general rule of thumb, just don't pass code around as strings and execute it by calling eval,
settimeout and friends.
...And 4 more matches
The Essentials of an Extension - Archive of obsolete content
the chrome.manifest file chrome is the
set of user interface elements of the application window that are outside of a window's content area.
...so we
settled on the letter "l".
... dtd strings are resolved and
set when the document is being loaded.
...And 4 more matches
Signing an XPI - Archive of obsolete content
you can either
set this permanently via control panel->system properties->advanced->environment variables->system variables or do it each time you run the tools from the command-line (preferably using a batch file).
... c:\>
set path=c:\apps\nss-3.11.4\bin\;c:\apps\nss-3.11.4\lib\;c:\apps\nspr-4.6\lib\;%path% an easier way is to copy everything from your new directories c:\apps\nss-3.11.4\ and c:\apps\nspr-4.6\ including sub directories to the same directory - fx c:\apps\codesigning\ - and then run every command from that.
... enter new password: re-enter password: create a test certificate create a test certificate, using the -p option to
set a password for the new certificate c:\projects\codesigning\> signtool -g mytestcert -d .
...And 4 more matches
Promises - Archive of obsolete content
let resp = yield new promise((resolve, reject) => { let xhr = new xmlhttprequest; xhr.onload = resolve; xhr.onerror = reject; xhr.open("get", dataurl); xhr.respon
setype = "json"; xhr.send(); }); let data = resp.target.response; // use the response to construct form data object for the // second request.
... notifyuser(resp.target.respon
setext); }); example using promise-based helper the following example relies on the helper function defined below.
... let xhr = yield request(dataurl, { respon
setype: "json" }); let data = xhr.response; // use the response to construct form data object for the // second request.
...And 4 more matches
Creating a dynamic status bar extension - Archive of obsolete content
we end up reloading data from each of the windows once in 10 minutes - fixing this by creating a js component responsible for communication with the server is a good idea for one of the future articles startup: function() { this.refreshinformation(); window.
setinterval(this.refreshinformation, 10*60*1000); }, this starts by calling our refreshinformation() function, which is responsible for fetching and displaying stock ticker information in the status bar panel.
...after doing that, we install an interval routine on the browser window by calling window.
setinterval().
...
setting the httprequest.onload property to our inforeceived() function configures the request to call inforeceived() when the response is received from the server.
...And 4 more matches
Using content preferences - Archive of obsolete content
this makes it possible to write an extension that lets the user customize the appearance of specific web sites (
setting the font size larger on sites that use obnoxiously small fonts, for instance).
... the content preferences service, implemented by nsicontentprefservice, offers functions for
setting and retrieving preferences for specific sites or in the global preference space; global preferences are used whenever a site-specific preference isn't available.
...example:
setting and retrieving preferences this example demonstrates how to save a preference and then retrieve its value.
...And 4 more matches
Documentation for BiDi Mozilla - Archive of obsolete content
this is determined in nstextfragment::
setto the page includes a element with the attribute dir=rtl, either explicitly (nsgenerichtmlelement::mapcommonattributesinto), or as a consequence of a style rule (mapdeclarationtextinto in nscssstylerule.cpp) all these cases use nsdocument::enablebidi to
set the flag mbidienabled.
... framemanager::
setframeproperty is used to
set the following flags and pointers (for terminology see the specification of the uba): embeddinglevel: the embedding level of the frame textclass: the text class of the frame.
..."reordering" of frames is accomplished by
setting the appropriate frame coordinates.
...And 4 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
unlike many other application frameworks, you are not limited to the widget
set we provide, nor limited to the "look and feel" of the native os.
...open source and freely available, gecko is small in size and modular and achieves rendering speed superior to all other browser engines - which makes it perfect for embedding into both desktop applications such as browsers and new devices such as browsing appliances and
set top boxes.
... supporting gecko technologies provide a complete
set of resources for efficient development, including full support of web standards, a cross-platform/cross-device user interface language, an extensible architecture and embedding technologies.
...And 4 more matches
Windows stub installer - Archive of obsolete content
the windows stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...windows/
setup/> how do we get
setup to debug the windows stub installer?
... build your entire mozilla tree, which should build the stub installer in the
setup directory as well.
... (if you need to rebuild stub installer, got to /mozilla/xpinstall/wizard/windows/
setup and type "nmake /f makefile.win") go to mozilla/xpinstall/wizard/windows/builder on the shell prompt type "perl build.pl".
...And 4 more matches
Sorting Results - Archive of obsolete content
there are two additional attributes used for sorting, which you may
set on a column to specify the initial sort.
...only one column should have this attribute
set, as a tree may only be sorted by one column at a time.
...the sortactive attribute may be
set to true or false and specifies which column the tree is sorted by.
...And 4 more matches
Tree Widget Changes - Archive of obsolete content
you can create a checkbox column by
setting the type attribute of a column to checkbox.
... <treecol type="checkbox"> you can then
set or clear the checkbox for a particular cell in that column by
setting the value attribute to true, or leaving out the attribute.
...(do not
set id of the column to be 'checked' it will cause problems with the css) treechildren::-moz-tree-checkbox(checked) { /* css for checked cells */ list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif"); } in addition, checkmark columns support editing: <tree editable="true"> <treecols> <treecol type="checkbox" editable="true"> ...
...And 4 more matches
Advanced Rules - Archive of obsolete content
member element the next element is the member element, which is used to iterate through a
set of child resources.
...ather/cities"> <rdf:li resource="http://www.xulplanet.com/rdf/weather/city/paris"/> <rdf:li resource="http://www.xulplanet.com/rdf/weather/city/manchester"/> <rdf:li resource="http://www.xulplanet.com/rdf/weather/city/melbourne"/> <rdf:li resource="http://www.xulplanet.com/rdf/weather/city/kiev"/> </rdf:seq> <rdf:description about="http://www.xulplanet.com/rdf/weather/city/paris"> <city
set:name>paris</city
set:name> </rdf:description> .
...thus the parent will be the value of the list variable, which has been
set to the root resource 'http://www.xulplanet.com/rdf/weather/cities'.
...And 4 more matches
Broadcasters and Observers - Archive of obsolete content
<broadcaster
set> <broadcaster id="isoffline" label="offline"/> </broadcaster
set> any elements that are watching the broadcaster will be modified automatically whenever the broadcaster has its label attribute changed.
...like other non-displayed elements, the broadcaster
set element serves as a placeholder for broadcasters.
... you should declare all your broadcasters inside a broadcaster
set element so that they are all kept together.
...And 4 more matches
Modifying a XUL Interface - Archive of obsolete content
you can then
set attributes of the element using the
setattribute() function and append it to the xul document using the appendchild() function.
... for example, the following will add a button to a xul window: example 1 : source view <script> function addbutton(){ var abox = document.getelementbyid("abox"); var button = document.createelement("button"); button.
setattribute("label","a new button"); abox.appendchild(button); } </script> <box id="abox" width="200"> <button label="add" oncommand="addbutton();"/> </box> this example has two parts a box container element in xul.
... addbutton() then assigns the label 'a new button' to the button using the
setattribute() function.
...And 4 more matches
More Tree Features - Archive of obsolete content
to create a
set of nested rows, all we need to do is add a second treechildren element inside the parent treeitem.
...essentially, a treeitem element can contain either single rows which are declared with the treerow element or a
set of rows which are declared with the treechildren element.
...for a content tree view, this will
set the open attribute to reflect the current state.
...And 4 more matches
iframe - Archive of obsolete content
<menuitem label="slashdot" value="http://slashdot.org"/> <menuitem label="sourceforge" value="http://sf.net" /> <menuitem label="freshmeat" value="http://freshmeat.net"/> </menupopup> </menulist> <iframe id="myframe" flex="1"/> <script> function donav(obj) { var url = obj.selecteditem.value; // note the firstchild is the menupopup element document.getelementbyid('myframe').
setattribute('src', url); } </script> attributes showcaret type: boolean whether or not to cause a typing caret to be visible in the content area.
... the type of browser, which can be used to
set access of the document loaded inside the browser.
... if this is not
set, the loaded document has the same access as the window containing the browser.
...And 4 more matches
tabbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container used to display a
set of tabbed pages of elements.
... handlectrltab type: boolean if
set to true or omitted, the tabbox will switch to the next tab when the control and tab keys are pressed.
...if this attribute is
set to false, these keys do not navigate between tabs.
...And 4 more matches
toolbox - Archive of obsolete content
you can associate an external toolbar with a toolbox for the purpose of managing your toolbars by
setting the toolboxid property on the toolbar.
... properties accessible, customtoolbarcount, externaltoolbars, palette, toolbar
set methods appendcustomtoolbar, collap
setoolbar, expandtoolbar examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="toolbox example" width="300"> <toolbox> <toolbar> <toolbarbutton label="back"/> <toolbarbutton label="forward"/> <toolbarbutton label="hom...
...ave two toolbars inside of one toolbox above." width="20"/> </window> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessible type: nsiaccessible returns the accessibility object for the element.
...And 4 more matches
treecell - Archive of obsolete content
you can
set the text for the cell using the label attribute.
... properties type: space-separated list of property names
sets the properties of the element, which can be used to style the element.
... src type: uri
set this to the uri of an image to appear in the tree cell.
...And 4 more matches
wizardpage - Archive of obsolete content
next type: id
set to the pageid of the next wizardpage after this one.
... when
set, the page with this pageid is displayed when the next button is pressed.
... pageid type: id this attribute should be
set to a string that identifies the page's identifer in the wizard.
...And 4 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
for an overview of ssl, see "introduction to ssl." for an overview of encryption and decryption, see "encryption and decryption." information on digital signatures is available from "digital signatures." public-key cryptography is a
set of well-established techniques and standards for protecting communications from eavesdropping, tampering, and impersonation attacks.
...however, it's important to note that these two assumptions are true only if unauthorized personnel have not gained access to the user's machine or password, the password for the client software's private key database has been
set, and the software is
set up to request the password at reasonable frequent intervals.
... ssl protocol signed and encrypted email single sign-on object signing ssl protocol the secure sockets layer (ssl) protocol is a
set of rules governing server authentication, client authentication, and encrypted communication between servers and clients.
...And 4 more matches
Building a Theme - Archive of obsolete content
setting up the development environment themes and extensions are packaged and distributed in zip files or bundles, with the xpi (pronounced “zippy”) file extension.
...this gives us a base
set of styles to work with.
... browser to chrome/browser/ communicator to chrome/communicator/ you should end up with this directory structure: <ext path>/ /install.rdf /chrome.manifest /chrome/ browser/ communicator/ global/ mozapps/ after this, it would be a good idea to read the article
setting up extension development environment and follow the directions there.
...And 4 more matches
Using SSH to connect to CVS - Archive of obsolete content
introduction this document is a guide to
setting up access to cvs.mozilla.org using ssh.
...
setting up cvs to use ssh in your system's environment, make sure thatcvs_rsh is
set to whatever your ssh binary is called; a full path is not necessary if ssh is already in your path.
...if you don't already run ssh-agent on your computer, it's probably easiest to start it up whenever you
set up your environment to checkout and build mozilla.
...And 4 more matches
Using workers in extensions - Archive of obsolete content
that file, ticker_worker.js, is shown here: var symbol = ""; function refreshinformation() { if (!symbol) { throw "no symbol
set!"; } var fullurl = "http://quote.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&e=.csv&s=" + symbol; function inforeceived() { var output = httprequest.respon
setext; if (output) { postmessage(output.trim()); } httprequest = null; } var httprequest = new xmlhttprequest(); httprequest.open("get", fullurl, true); httprequest.onload = inforeceived; httprequest.s...
...end(null); }
setinterval(function() { refreshinformation(); }, 10*60*1000); onmessage = function(event) { if (event.data) { symbol = event.data.touppercase(); } refreshinformation(); } when the worker thread is started, the main body of this code (in lines 26-35) is executed.
... it starts by
setting up an interval handler (in lines 26-28) that calls refreshinformation() every 10 minutes.
...And 4 more matches
CSS - Archive of obsolete content
obsolete css features -moz-bindingthe -moz-binding css property is used by mozilla-based applications to attach an xbl binding to a dom element.-moz-border-bottom-colorsin mozilla applications like firefox, the -moz-border-bottom-colors css property
sets a list of colors for the bottom border.-moz-border-left-colorsin mozilla applications like firefox, the -moz-border-left-colors css property
sets a list of colors for the left border.-moz-border-right-colorsin mozilla applications like firefox, the -moz-border-right-colors css property
sets a list of colors for the right border.-moz-border-top-colorsin mozilla applications like firefox, the -moz-border-top-colors css property
sets a list of colors for the top border.-moz-stack-sizing-moz-stack-sizing is an extended css property.
...it only works on mac os x.-ms-acceleratorthe -ms-accelerator css property is a microsoft extension that
sets or retrieves a string indicating whether the object represents a keyboard shortcut.-ms-block-progressionthe -ms-block-progression css property is a microsoft extension that specifies the block progression and layout orientation.-ms-content-zoom-chainingthe -ms-content-zoom-chaining css property is a microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit duri...
...n that specifies where zoom snap-points are located.-ms-content-zoom-snap-typethe -ms-content-zoom-snap-type css property is a microsoft extension that specifies how zooming is affected by defined snap-points.-ms-content-zoomingthe -ms-content-zooming css property is a microsoft extension that specifies whether zooming is enabled.-ms-filterthe -ms-filter css property is a microsoft extension that
sets or retrieves the filter or collection of filters applied to an object.-ms-flow-fromthe -ms-flow-from css property is a microsoft extension that gets or
sets a value identifying a region container in the document that accepts the content flow from the data source.-ms-flow-intothe -ms-flow-into css property is a microsoft extension that gets or
sets a value identifying an iframe container in the d...
...And 4 more matches
JSObject - Archive of obsolete content
setmember
sets the value of a property of a javascript object.
...
setslot
sets the value of an array element of a javascript object.
... declaration public void removemember(string name)
setmember method.
...And 4 more matches
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
giving the fish some style with the markup all
set, it was time to style.
... floating fish with the cards
set up to float, the next step was to place the images appropriately.
...since the image was floated, any background or border we
set on the h3 would "slide under" the image; this is an expected effect with floated elements.
...And 4 more matches
Implementation Status - Archive of obsolete content
n title status notes bugs 3.1 namespaces supported 3.2.1 common attributes supported 3.2.2 linking attributes supported 3.2.3 single-node binding attributes supported 3.2.4 node-
set binding attributes supported 3.2.5 model item property attributes partial in some cases a loop error can occur on valid bindings 302168; 3.3.1 model supported 3.3.2 instance partial instance element with two child element does not trigger exception 3373...
... xforms-model-destruct supported 4.3.1 xforms-rebuild supported 4.3.2 xforms-recalculate supported 4.3.3 xforms-revalidate supported 4.3.4 xforms-refresh supported 4.3.5 xforms-re
set supported 4.3.6 xforms-next xforms-previous supported 4.3.7 xforms-focus supported 4.3.8 xforms-help xforms-hint supported 4.3.9 xforms-submit partial see section 11.2 for more details 4.
...pload supported 8.1.7 range partial 316355; 343523; 8.1.8 trigger supported 8.1.9 submit supported 8.1.10 select partial @selection does not work, select inside repeat may not work correctly, select that mixes item
sets with items may show them in the wrong order 282840; 371595; 372127; 8.1.11 select1 partial there are some resize issues, select/deselect/valuechange firing in wrong order.
...And 4 more matches
Desktop mouse and keyboard controls - Game development
inside them we can get the code of the key that was pressed from the keycode property of the event object, see which key it is, and then
set the proper variable.
... left arrow: function keydownhandler(event) { if(event.keycode == 39) { rightpressed = true; } else if(event.keycode == 37) { leftpressed = true; } if(event.keycode == 40) { downpressed = true; } else if(event.keycode == 38) { uppressed = true; } } the keyuphandler looks almost exactly the same as the keydownhandler above, but instead of
setting the pressed variables to true, we would
set them to false.
... if the left arrow is pressed (⬅︎; key code 37), we can
set the leftpressed variable to true and in the draw function perform the action assigned to it — move the ship left: function draw() { ctx.clearrect(0, 0, canvas.width, canvas.height); if(rightpressed) { playerx += 5; } else if(leftpressed) { playerx -= 5; } if(downpressed) { playery += 5; } else if(uppressed) { playery -= 5; } ctx.drawimage(img, playerx, playery); requestanimationframe(draw); } the draw function first clears the whole canvas — we draw everything from scratch on every single frame.
...And 4 more matches
Build the brick field - Game development
setting up the brick variables the overall aim of this lesson is to render a few lines of code for the bricks, using a nested loop that works through a two-dimensional array.
... first however we need to
set up some variables to define information about the bricks such as their width and height, rows and columns, etc.
... var brickrowcount = 3; var brickcolumncount = 5; var brickwidth = 75; var brickheight = 20; var brickpadding = 10; var brickoff
settop = 30; var brickoff
setleft = 30; here we've defined the number of rows and columns of bricks , their width and height, the padding between the bricks so they won't touch each other and a top and left off
set so they won't start being drawn right from the edge of the canvas.
...And 4 more matches
Paddle and keyboard controls - Game development
to listen for key presses, we will
set up two event listeners.
... add the following lines just above the
setinterval() line at the bottom of your javascript: document.addeventlistener("keydown", keydownhandler, false); document.addeventlistener("keyup", keyuphandler, false); when the keydown event is fired on any of the keys on your keyboard (when they are pressed), the keydownhandler() function will be executed.
...the relevant variable in each case is
set to true.
...And 4 more matches
Build the brick field - Game development
to begin with we've included the brickinfo object, as this will come in handy very soon: function initbricks() { brickinfo = { width: 50, height: 20, count: { row: 3, col: 7 }, off
set: { top: 50, left: 60 }, padding: 10 }; } this brickinfo object will hold all the information we need: the width and height of a single brick, the number of rows and columns of bricks we will see on screen, the top and left off
set (the location on the canvas where we shall start to draw the bricks) and the padding between each row and column of bricks.
...fill in the contents as shown below: for(c=0; c<brickinfo.count.col; c++) { for(r=0; r<brickinfo.count.row; r++) { var brickx = 0; var bricky = 0; newbrick = game.add.sprite(brickx, bricky, 'brick'); game.physics.enable(newbrick, phaser.physics.arcade); newbrick.body.immovable = true; newbrick.anchor.
set(0.5); bricks.add(newbrick); } } here we're looping through the rows and columns to create the new bricks and place them on the screen.
... the newly created brick is enabled for the arcade physics engine, it's body is
set to be immovable (so it won't move when hit by the ball), and we're also
setting the anchor to be in the middle and adding the brick to the group.
...And 4 more matches
Organizing your CSS - Learn web development
keep it consistent if you get to
set the rules for the project or are working alone, then the most important thing to do is to keep things consistent.
...if spaces, how many spaces?) having a
set of rules you always follow reduces the amount of mental overhead needed when writing css, as some of the decisions are already made.
...you will typically have rules
set up for: body p h1, h2, h3, h4, h5 ul and ol the table properties links in this section of the stylesheet we are providing default styling for the type on the site,
setting up a default style for data tables and lists and so on.
...And 4 more matches
How can we design for all types of users? - Learn web development
absolute units absolute units are not proportionally calculated but refer to a size
set in stone, so to speak, and are expressed most of the time in pixels (px).
...modern browsers get around this rule by pretending that you're asking for "16 pixels when the user
sets a zoom factor of 100%".
...relative units are friendlier to accessibility because they respect the
settings on the user's system.
...And 4 more matches
HTML basics - Learn web development
for example, content could be structured within a
set of paragraphs, a list of bulleted points, or using images and data tables.
...let's revisit the code we put into our index.html example (which we first met in the dealing with files article): <!doctype html> <html> <head> <meta char
set="utf-8"> <title>my test page</title> </head> <body> <img src="images/firefox-icon.png" alt="my test image"> </body> </html> here, we have the following: <!doctype html> — the doctype.
...in the mists of time, when html was young (around 1991/92), doctypes were meant to act as links to a
set of rules that the html page had to follow to be considered good html, which could mean automatic error checking and other useful things.
...And 4 more matches
Adding vector graphics to the Web - Learn web development
troubleshooting and cross-browser support for browsers that don't support svg (ie 8 and below, android 2.3 and below), you could reference a png or jpg from your src attribute and use a src
set attribute (which only recent browsers recognize) to reference the svg.
... this being the case, only supporting browsers will load the svg — older browsers will load the png instead: <img src="equilateral.png" alt="triangle with equal sides" src
set="equilateral.svg"> you can also use svgs as css background images, as shown below.
... if your svgs aren't showing up at all, it might be because your server isn't
set up properly.
...And 4 more matches
Getting Started with Chat
general rules and etiquette once you have your client
set up (see software below) and are connected, there are some basic rules you should follow to ensure the most enjoyable and productive experience: as with all mozilla forums and events, agreeing to our community participation guidelines is a requirement for participation.
...for example, you can connect using ssl or a non-secure connection, and you can configure the client to automatically connect to a server and join a particular
set of channels when you start the client.
... channels here is a list of channels you should be aware of as a member of the mozilla community: (remember to use irc.mozilla.org and port 6697 or 6667 for your server
settings) #qa a channel for qa discussion #developers a channel for mozilla development discussion #sumo a channel for support with firefox for more information about the mozilla irc network and more channels, go here.
...And 4 more matches
WebRequest.jsm
to perform one of these operations, include a property with the appropriate name in the object returned from the listener, and assign it the desired value, as detailed in the table below: operation available in return property cancel onbeforerequest cancel boolean value
set to true.
... redirect onbeforesendheaders redirecturl string
set to the url to redirect the request to.
... this is only included if you
set "requestheaders" in the opt_extrainfospec argument.
...And 4 more matches
BloatView
xpcom_mem_bloat_log if
set, this causes a bloat log to be printed on program exit, and each time nstracerefcnt::dumpstatistics is called.
... you can
set these environment variables to any of the following values.
...0 nsstylecontextdata 736 259808 325312 489440 338560 1413120 141312 220800 -11040 94944 446016 nslinelayout 1100 2200 225500 402600 562100 1192400 0 0 0 0 0 nslocalfile 424 558832 19928 1696 1272 581728 72080 1272 424 -424 73352 the first
set of columns, bytes allocated, shows the amount of memory allocated for the first log file (blank.txt), the difference between the first log file and the second (mozilla.txt), the difference between the second log file and the third (yahoo.txt), the difference between the third log file and the fourth (netscape.txt), and the total amount of memory allocated in the fourth log file.
...And 4 more matches
Investigating leaks using DMD heap scan mode
firefox’s dmd heap scan mode tracks the
set of all live blocks of malloc-allocated memory and their allocation stacks, and allows you to log these blocks, and the values stored in them, to a file.
...however, in that case it may be easier to use refcount logging, or rr with a conditional breakpoint
set on calls to release() for the leaking object, to see what object actually does the release that causes the leaked object to go away.
...first, in toolkit/components/terminator/nsterminator.cpp, delete everything in runwatchdog but the call to ns_
setcurrentthreadname.
...And 4 more matches
DMD
to have dmd active while running it, you just need to
set the environment variable dmd=1 when running.
...you can do this by running: adb push $objdir/dist/bin/libdmd.so /sdcard/ second, you will need to make an executable wrapper for fennec which
sets an environment variable before launching it.
... (if you are familiar with the recommended "--es env0" method for
setting environment variables when launching fennec, note that you cannot use this method here because those are processed too late in the startup process.
...And 4 more matches
I/O Functions
only the ascii character
set is supported.
... list of functions: pr_openudpsocket pr_newudpsocket pr_opentcpsocket pr_newtcpsocket pr_importtcpsocket pr_connect pr_connectcontinue pr_accept pr_bind pr_listen pr_shutdown pr_recv pr_send pr_recvfrom pr_sendto pr_transmitfile pr_acceptread pr_getsockname pr_getpeername pr_getsocketoption pr_
setsocketoption converting between host and network addresses pr_ntohs pr_ntohl pr_htons pr_htonl pr_familyinet memory-mapped i/o functions the memory-mapped i/o functions allow sections of a file to be mapped to memory regions, allowing read-write accesses to the file to be accomplished by normal memory accesses.
...pollable events are implemented using a pipe or a pair of tcp sockets connected via the loopback address, therefore
setting and/or waiting for pollable events are expensive operating system calls.
...And 4 more matches
NSS 3.12.6 release notes
this
setting was the default prior 3.12.5 and makes products vulnerable.
... nss_ssl_require_safe_negotiation values: 1: requiresafenegotiation = true un
set: requiresafenegotiation = false controls whether safe renegotiation indication is required for initial handshake.
...the default
setting for this option is false.
...And 4 more matches
NSS 3.20 release notes
new functions in ssl.h ssl_dhegrouppref
set - configure the
set of allowed/enabled dhe group parameters that can be used by nss for a server socket.
... new types in sslt.h ssldhegrouptype - enumerates the
set of dhe parameters embedded in nss that can be used with function ssl_dhegrouppref
set 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.
...they can be enabled with the new socket option ssl_enable_server_dhe and the ssl_option
set or the ssl_option
setdefault api.
...And 4 more matches
NSS sources building testing
nss/cmd contains a
set of various tool programs that are built using nss.
...in order to run the tools, you should
set your system environment to use the libraries of your build from the "lib" directory, e.g., using the ld_library_path or dyld_library_path environment variable.
...after the build on your computer has succeeded, before you can run the tests on your computer, it might be necessary to
set additional environment variables.
...And 4 more matches
PKCS11 FAQ
nss may enumerate all the permanment certificates in a token (cka_token
set to true).
...this value is
set when the key is generated, so that nss will be able to find the key when the certificate for that key is loaded.
...nss uses installed random number generators if pkcs11_mech_random_flag is
set in the installer script.
...And 4 more matches
NSS tools : crlutil
crl generation script syntax crl generation script file has the following syntax: * line with comments should have # as a first symbol of a line *
set "this update" or "next update" crl fields: update=yyyymmddhhmmssz nextupdate=yyyymmddhhmmssz field "next update" is optional.
... 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.
...should be
set to 1 if this extension is critical or 0 otherwise.
...And 4 more matches
NSS tools : vfychain
modutil can add and delete pkcs #11 modules, change passwords on security databases,
set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
...options -a the following certfile is base64 encoded -b yymmddhhmmz validate date (default: now) -d directory database directory -f enable cert fetching from aia url -o oid
set policy oid for cert validation(format oid.1.2.3) -p use pkix library to validate certificate by calling: * cert_verifycertificate if specified once, * cert_pkixverifycert if specified twice and more.
...where: -g test-type
sets status checking test type.
...And 4 more matches
OLD SSL Reference
initialization initializing caches configuration communication functions used by callbacks cleanup chapter 2 getting started with ssl this chapter describes how to
set up your environment, including certificate and key databases, to run the nss sample code.
... ssl, pkcs #11, and the default security databases
setting up the certificate and key databases
setting up the ca db and certificate
setting up the server db and certificate
setting up the client db and certificate verifying the server and client certificates building nss programs chapter 3 selected ssl types and structures this chapter describes some of the most important types and structures used with the functions described in the rest of this document, and how to manage the memory used for them.
... ssl initialization functions nss_init nss_initreadwrite nss_nodb_init ssl_option
setdefault ssl_optiongetdefault ssl_cipherpref
setdefault ssl_cipherprefgetdefault ssl_clearsessioncache ssl_configserversessionidcache initializing multi-processing with a shared ssl server cache ssl_configmpserversidcache ssl_inheritmpserversidcache ...
...And 4 more matches
NSS_3.12.3_release_notes.html
the information in this table is excerpted from https://developer.mozilla.org/en/nss_reference/nss_environment_variables environment variable value type description nsrandcount integer (byte count)
sets the maximum number of bytes to read from the file named in the environment variable nsrandfile (see below).
... if
set to to "1" or un
set, softoken will trigger an assertion failure in debug builds, and will report an error in non-debug builds.
... if
set to "disabled", softoken will ignore forks, and behave as it did in older versions.
...And 4 more matches
NSS Tools crlutil
crl generation script syntax: crl generation script file has the following syntax: line with comments should have <bold>#</bold> as a first symbol of a line
set "this update" or "next update" crl fields: update=yyyymmddhhmmssz nextupdate=yyyymmddhhmmssz field "next update" is optional.
... 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.
...should be
set to 1 if this extension is critical or 0 otherwise.
...And 4 more matches
NSS tools : crlutil
crl generation script syntax crl generation script file has the following syntax: * line with comments should have # as a first symbol of a line *
set "this update" or "next update" crl fields: update=yyyymmddhhmmssz nextupdate=yyyymmddhhmmssz field "next update" is optional.
... 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.
...should be
set to 1 if this extension is critical or 0 otherwise.
...And 4 more matches
NSS tools : vfychain
modutil can add and delete pkcs #11 modules, change passwords on security databases,
set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
... options -a the following certfile is base64 encoded -b yymmddhhmmz validate date (default: now) -d directory database directory -f enable cert fetching from aia url -o oid
set policy oid for cert validation(format oid.1.2.3) -p use pkix library to validate certificate by calling: * cert_verifycertificate if specified once, * cert_pkixverifycert if specified twice and more.
... where: -g test-type
sets status checking test type.
...And 4 more matches
Rhino scopes and contexts
scopes a scope is a
set of javascript objects.
...this is a large topic in itself, but for our purposes it gives us an easy way to share a
set of read-only variables across multiple scopes.
... to do this we
set an object's prototype.
...And 4 more matches
SpiderMonkey Build Documentation
see js_
setgczeal() for details.
...tables, shell scripts /usr/local/bin --bindir libraries, data /usr/local/lib --libdir architecture-independent data /usr/local/share --sharedir c header files /usr/local/include --includedir for convenience, you can pass the configure script an option of the form --prefix=<prefixdir>, which substitutes <prefixdir> for /usr/local in all the
settings above, in one step.
... specifying compilers and compiler flags if you want to use a compiler other than the one the configure script chooses for you by default, you can
set the cxx variable in the environment when you run configure.
...And 4 more matches
How to embed the JavaScript engine
onnewglobalhook)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const char *script = "'hello'+'world, it is '+new date()"; const char *filename = "noname"; int lineno = 1; js::compileoptions opts(cx); opts.
setfileandline(filename, lineno); bool ok = js::evaluate(cx, global, opts, script, strlen(script), &rval); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return 0; } spidermonkey 45 // following code might be needed in som...
...onnewglobalhook)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const char *script = "'hello'+'world, it is '+new date()"; const char *filename = "noname"; int lineno = 1; js::compileoptions opts(cx); opts.
setfileandline(filename, lineno); bool ok = js::evaluate(cx, opts, script, strlen(script), &rval); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return 0; } spidermonkey 52 #include "jsapi.h" #include "js/initialization.h...
...alhook, options)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const char *script = "'hello'+'world, it is '+new date()"; const char *filename = "noname"; int lineno = 1; js::compileoptions opts(cx); opts.
setfileandline(filename, lineno); bool ok = js::evaluate(cx, opts, script, strlen(script), &rval); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_shutdown(); return 0; } build and run the hello world example build command line depends on the os and the tools.
...And 4 more matches
Tracing JIT
a fragmento is a resource-management object that allocates and stores a
set of fragments and pages, and manages their lifecycle.
...a fragment's code is stored in a
set of associated pages and guardrecords allocated from the fragment's owning fragmento.
... it then imports the
set of jsval values from the spidermonkey interpreter that the trace is known to read or write during its execution.
...And 4 more matches
SpiderMonkey Internals
atoms play three roles: as literals referred to by unaligned 16-bit immediate bytecode operands, as unique string descriptors for efficient property name hashing, and as members of the root gc
set for exact gc.
...in general, both functions inside spidermonkey and jsapi callback functions signal errors by calling js_reporterror or one of its variants, or js_
setpendingexception, and returning js_false or null.
...at most one trap per bytecode can be
set.
...And 4 more matches
JS::Remove*Root
this article covers features introduced in spidermonkey 31 unregister a pointer to a gc thing so that it is no longer a member of the garbage collector's root
set.
... vp js::heap<js::value> address of the js::value variable to remove from the root
set.
... rp js::heap<jsstring *> address of the jsstring * variable to remove from the root
set.
...And 4 more matches
JSClass.flags
if this flag is
set, each instance of the class has a field for private data.
... the field can be accessed using js_getprivate and js_
setprivate.
...this is only meaningful if spidermonkey is built with xpconnect and the jsclass_has_private flag is also
set.
...And 4 more matches
JS_Remove*Root
unregisters a pointer to a gc thing so that it is no longer a member of the garbage collector's root
set.
... vp jsval * address of the jsval variable to remove from the root
set.
... spp jsstring * address of the jsstring* variable to remove from the root
set.
...And 4 more matches
TPS Bookmark Lists
a bookmark as
set list is an object with one or more key-value pairs.
...changes: an object containing new properties to be
set for this bookmark when this as
set list is used in a modify action.
...changes: an object containing new properties to be
set for this livemark when this as
set list is used in a modify action.
...And 4 more matches
Secure Development Guidelines
147483647 unsigned int 0 - +4294967295 64 signed long long -9223372036854775808 - +9223372036854775807 unsigned long long 0 - +18446744073709551615 int vuln_funct(int size) { char buf[1024]; if (size > sizeof(buf) - 1) return -1; } signedness issues: don’t mix signed and unsigned integers use unsigned integers for sizes, off
sets, and indexes casting and truncation example: void vuln_funct() { u_int32_t size1 = 0xffffffff; u_int16_t size2 = size1; void *ptr = malloc(size2); if (!ptr) exit(exit_failure); memcpy(ptr, user_data, size1); } casting issues: sign extension example: int main() { int32_t new_size = 0; int8_t size = 0xff; new_size = size; printf("0x%...
...08x\r\n", new_size); } casting issues: sign extension prevention be careful with signed integers use unsigned integers for sizes, off
sets, and indexes denial of service: divide by zero example: int main() { int a, b; if (argc != 3) return 1; a = atoi(argv[1]); b = atoi(argv[2]); return a/b; } denial of service: divide int_min by -1 example: int main(int argc, char **argv) { int a, b; if (argc != 3) return 1; a = atoi(argv[1]); b = atoi(argv[2]); return b ?
...ormat string bugs example: int main(int argc, char *argv[]) { if (argc > 1) printf(argv[1]); } format string bugs: prevention easy to fix: always use a format string specifier: int main(int argc, char *argv[]) { if (argc > 1) printf("%s", argv[1]); } double free example: void* ptr = malloc(1024); if (error) { free(ptr); } free(ptr); double free: prevention
set a pointer to null when it’s freed valgrind or malloc debugging can help detect those bugs use after free accessing data after a free() or delete can lead to undefined behavior some debug tools might be able catch some cases un-initialized data example: int main() { char *uninitialized_ptr; printf("0x%08x\r\n", uninitialized_ptr); return 0; } $ ./test 0x8fe0103 ...
...And 4 more matches
Gecko object attributes
applied to: grid, heading, listitem, row, tablist exposed in aria: aria-level posin
set if this item is in a group, what is the item number within the group, where the size is defined by the
setsize attribute.
... the first item should have posin
set="1", and the last item should have a posin
set value equal to the
setsize.
... applied to: listitem, option exposed in aria: aria-posin
set setsize if this item is in a group, this indicates the number of items in the group.
...And 4 more matches
Using the Places annotation service
setting an annotation the annotation provides a variety of scriptable and non-scriptable
setters for annotations on both pages and on items in the places database (see nsiannotationservice.idl for the exact declarations).
... from c++ you must use the
setter for the explicit data type being saved:
setpageannotationstring(auri, aname, avalue, aflags, aexpiration);
setpageannotationint32(auri, aname, avalue, aflags, aexpiration);
setpageannotationint64(auri, aname, avalue, aflags, aexpiration);
setpageannotationdouble(auri, aname, avalue, aflags, aexpiration);
setpageannotationbinary(auri, aname, adata, adatalen, aflags, aexpiration); and likewise for items in the places database:
setitemannotationstring(aitemid, aname, avalue, aflags, aexpiration);
setitemannotationint32(aitemid, aname, avalue, aflags, aexpiration);
setitemannotationint64(aitemid, aname, avalue, aflags, aexpiration);
setitemannotationdouble(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.
...And 4 more matches
Components.utils.Sandbox
window objects and nsiprincipal carry additional information such as origin attributes and same-origin privilege changes caused by
setting document.domain.
... passing a content window object,
setting wantxrays:true (default) and using an extended principal provides a clean, isolated execution environment in which javascript code that needs web apis (such as accessing the window's dom) can be executed without interference from untrusted content code.
... if the sandbox interacts with untrusted content this should be
set to false when possible to further reduce possible attack surface.
...And 4 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).
...recipients may
set this to true to abort the close.
... topic subject data description chrome-document-global-created nsidomwindow null sent immediately after a chrome document window has been
set up, but before any script code has been executed.
...And 4 more matches
nsIAppShellService
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by: @mozilla.org/appshell/appshellservice;1 as a service: var appshellservice = components.classes["@mozilla.org/appshell/appshellservice;1"] .getservice(components.interfaces.nsiappshellservice); method overview void clo
setoplevelwindow(in nsixulwindow awindow); obsolete since gecko 1.8 void createhiddenwindow(in nsiappshell aappshell); native code only!
...obsolete since gecko 1.8 methods clo
setoplevelwindow() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) close a window.
... void clo
setoplevelwindow( in nsixulwindow awindow ); parameters awindow a window.
...And 4 more matches
nsIContentView
method overview void scrollby(in float dxpx, in float dypx); void scrollto(in float xpx, in float ypx); void
setscale(in float xscale, in float yscale); attributes attribute type description contentheight float read only.
... scrollx float horizontal scroll off
set in chrome-document css pixels.
... when this view is active (that is it is being painted because it's in the visible region of the screen), this value is at first lined up with the content's scroll off
set.
...And 4 more matches
nsIDOMHTMLAudioElement
last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsidomhtmlmediaelement method overview unsigned long long mozcurrentsampleoff
set(); void moz
setup(in pruint32 channels, in pruint32 rate); [implicit_jscontext] unsigned long mozwriteaudio(in jsval data); methods mozcurrentsampleoff
set() non-standard this feature is non-standard and is not on a standards track.
... returns the current off
set of the audio stream, specified as the number of samples that have played since the beginning of the stream.
... unsigned long long mozcurrentsampleoff
set(); parameters none.
...And 4 more matches
nsIEditor
66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 18.0 (firefox 18.0 / thunderbird 18.0 / seamonkey 2.15) method overview [noscript] void init(in nsidomdocument doc, in nsicontent aroot, in nsiselectioncontroller aselcon, in unsigned long aflags); void
setattributeorequivalent(in nsidomelement element, in astring sourceattrname, in astring sourceattrvalue, in boolean asuppresstransaction); void removeattributeorequivalent(in nsidomelement element, in domstring sourceattrname, in boolean asuppresstransaction); void postcreate(); void predestroy(in boolean adestroyingframes); selected content removal voi...
...d deleteselection(in short action, in short stripwrappers); document info and file methods void re
setmodificationcount(); long getmodificationcount(); void incrementmodificationcount(in long amodcount); void incrementmodificationcount(in long amodcount); transaction methods void dotransaction(in nsitransaction txn); void enableundo(in boolean enable); void undo(in unsigned long count); void canundo(out boolean isenabled, out boolean canundo); void redo(in unsigned long count); void canredo(out boolean isenabled, out boolean canredo); void begintransaction(); void endtransaction(); void beginplaceholdertransaction(in nsiatom name); void endplaceholdert...
...ransaction(); boolean shouldtxn
setselection(); void
setshouldtxn
setselection(in boolean should); inline spellchecking methods nsiinlinespellchecker getinlinespellchecker(in boolean autocreate); void syncrealtimespell(); void
setspellcheckuseroverride(in boolean enable); clipboard methods void cut(); boolean cancut(); void copy(); boolean cancopy(); void paste(in long aselectiontype); boolean canpaste(in long aselectiontype); selection methods void selectall(); void beginningofdocument(); void endofdocument(); drag/drop methods boolean candrag(in nsidomevent aevent); void dodrag(in nsidomevent aevent); void ...
...And 4 more matches
nsIFileInputStream
inherits from: nsiinputstream last changed in gecko 1.7 method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants constant value description delete_on_close 1<<1 if this is
set, the file will be deleted by the time the stream is closed.
... close_on_eof 1<<2 if this is
set, the file will close automatically when the end of the file is reached.
... reopen_on_rewind 1<<3 if this is
set, the file will be reopened whenever seek(0) occurs.
...And 4 more matches
nsIFileView
to create an instance, use: var fileview = components.classes["@mozilla.org/filepicker/fileview;1"] .createinstance(components.interfaces.nsifileview); method overview void
setdirectory(in nsifile directory); void
setfilter(in astring filterstring); void sort(in short sorttype, in boolean reversesort); attributes attribute type description reversesort boolean if true results will be sorted in ascending order.
... methods
setdirectory()
set the directory to be browsed.
... void
setdirectory( in nsifile directory ); parameters directory the directory to be browsed.
...And 4 more matches
nsIMimeConverter
method overview string encodemimepartiistr(in string header, in boolean structured, in string mailchar
set, in long fieldnamelen, in long encodedwordsize); string encodemimepartiistr_utf8(in autf8string header, in boolean structured, in string mailchar
set, in long fieldnamelen, in long encodedwordsize); string decodemimeheadertocharptr(in string header, in string default_char
set, in boolean override_char
set, in boolean eatcontinuations); astring decodemimeheader(in string header, in string default_char
set, in boolean override_char
set, in boolean eatcontinuations); mim...
...); mimeencoderdata *qpencoderinit(in mimeconverteroutputcallback output_fn, in void *closure); void encoderdestroy(in mimeencoderdata *data, in boolean abort_p); long encoderwrite(in mimeencoderdata *data, in string buffer, in long size); methods encodemimepartiistr() an variant of encodemimepartiistr_utf8() which treats the header as written in the given char
set.
... string encodemimepartiistr(in string header, in boolean structured, in string mailchar
set, in long fieldnamelen, in long encodedwordsize); parameters propertyname the name of the property to retrieve.
...And 4 more matches
nsITaggingService
tagcontainericonspec autf8string retrieves the url spec for the tag container icon methods taguri() this method tags a uri with the given
set of tags.
... current tags
set for the url persist.
... tags in atags which are already
set for the given uri are ignored.
...And 4 more matches
nsITraceableChannel
method overview nsistreamlistener
setnewlistener(in nsistreamlistener alistener); methods
setnewlistener() replaces the channel's current listener with a new one, returning the listener previously assigned to the channel.
... nsistreamlistener
setnewlistener( in nsistreamlistener alistener ); parameters alistener an nsistreamlistener to be notified of events on the http channel.
... implementing nsistreamlistener the nsistreamlistener passed to
setnewlistener() should implement the following methods, which are called to notify it of events that occur on the http stream: onstartrequest: an http request is beginning.
...And 4 more matches
nsITransport
method overview void close(in nsresult areason); nsiinputstream openinputstream(in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegmentcount); nsioutputstream openoutputstream(in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegmentcount); void
seteventsink(in nsitransporteventsink asink, in nsieventtarget aeventtarget); constants open flags.
... asegmentsize if open_unbuffered is not
set, then this parameter specifies the size of each buffer segment (pass 0 to use default value).
... asegmentcount if open_unbuffered is not
set, then this parameter specifies the maximum number of buffer segments (pass 0 to use default value).
...And 4 more matches
nsITreeView
n col); boolean isselectable(in long row, in nsitreecolumn col); boolean isseparator(in long index); boolean issorted(); void performaction(in wstring action); void performactiononcell(in wstring action, in long row, in nsitreecolumn col); void performactiononrow(in wstring action, in long row); void selectionchanged(); void
setcelltext(in long row, in nsitreecolumn col, in astring value); void
setcellvalue(in long row, in nsitreecolumn col, in astring value); void
settree(in nsitreeboxobject tree); void toggleopenstate(in long index); attributes attribute type description rowcount long the total number of rows in the tree (including the offscreen rows).
...
setcelltext()
setcelltext is called when the contents of the cell have been edited by the user.
... void
setcelltext( in long row, in nsitreecolumn col, in astring value ); parameters row the row of the cell.
...And 4 more matches
nsIWindowWatcher
clients may expect this property to be always current, so to properly integrate this component the application will need to keep it current by
setting the property as the active window changes.
... this component must be initialized at application startup by calling
setwindowcreator().
...ewprompter(in nsidomwindow aparent); nsidomwindow getwindowbyname(in wstring atargetname, in nsidomwindow acurrentwindow); nsisimpleenumerator getwindowenumerator(); nsidomwindow openwindow(in nsidomwindow aparent, in string aurl, in string aname, in string afeatures, in nsisupports aarguments); void registernotification(in nsiobserver aobserver); void
setwindowcreator(in nsiwindowcreator creator); void unregisternotification(in nsiobserver aobserver); attributes attribute type description activewindow nsidomwindow the watcher serves as a global storage facility for the current active (front most non-floating-palette-type) window, storing and returning it on demand.
...And 4 more matches
nsIXSLTProcessor
= components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createinstance(components.interfaces.nsixsltprocessor); method overview void clearparameters(); nsivariant getparameter(in domstring namespaceuri, in domstring localname); void importstylesheet(in nsidomnode style); void removeparameter(in domstring namespaceuri, in domstring localname); void re
set(); void
setparameter(in domstring namespaceuri, in domstring localname, in nsivariant value); nsidomdocument transformtodocument(in nsidomnode source); nsidomdocumentfragment transformtofragment(in nsidomnode source, in nsidomdocument output); methods clearparameters() removes all
set parameters from this nsixsltprocessor.
...getparameter() gets a parameter if previously
set by
setparameter().
... removeparameter() removes a parameter, if
set.
...And 4 more matches
nsIXULBrowserWindow
method overview astring onbeforelinktraversal(in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab); void
setjsdefaultstatus(in astring status); void
setjsstatus(in astring status); void
setoverlink(in astring link, in nsidomelement element); methods onbeforelinktraversal() called before traversing a link to determine the appropriate target into which to load the link.
...
setjsdefaultstatus()
sets the default status according to javascript's version of the default status.
... void
setjsdefaultstatus( in astring status ); parameters status the status string.
...And 4 more matches
Address Book examples
use the nsiabcollection.readonly attribute to determine the read-only status of an address book adding contacts create a card and
set its properties using the nsiabcard interface (see the interface documentation for property names supported by the application): let card = components.classes["@mozilla.org/addressbook/cardproperty;1"] .createinstance(components.interfaces.nsiabcard); card.
setproperty("firstname", "john"); card.
setproperty("lastname", "smith"); card.primaryemail = "john@invalid.com"; now...
... editing contacts once you have obtained a card from an nsiabdirectory (see above), you can edit it in a two step process, firstly, change the properties that you to edit: card.
setproperty("firstname", "jane"); card.
setproperty("lastname", "doe"); secondly, call modifycard to save the card in the database.
... use the
setproperty/getproperty functions on nsiabcard to
set your property in the same way as you would do with normal properties: card.
setproperty("random1", "xyz"); card.
setproperty("random2", "foo"); ...
...And 4 more matches
Filelink Providers
the account
setup dialog the account
setup dialog allows the user to select what account type they would like to create from a menulist.
... a provider implementation can choose what information it gets from the user from the
setup dialog by pointing the
settingsurl attribute of their nsimsgcloudfileprovider implementation to a chrome url for an xhtml page that contains a form with the extra information.
... note: the
setup dialog window should resize itself automatically in order to fit the content of the iframe without scrollbars.
...And 4 more matches
Creating a Custom Column
getting started in this example we will be developing a small extension that will be adding a column that will display the "reply-to:" field of an email (if it exists, it if often not
set).
... if you are unfamiliar with the
setup and creation of an extension please read building a thunderbird extension.
...for this we overlay messenger.xul, by placing the following line in our chrome.manifest file: overlay chrome://messenger/content/messenger.xul chrome://replyto_col/content/replyto_col_overlay.xul now that our overlay is
set up we need to connect a column to the current columns that exist.
...And 4 more matches
Virtualenv
creating a virtualenv installs
setuptools (or optionally distribute) into the virtual environment.
...if you do not have pip or easy_install, you will need to download from pypi or clone from the github virtualenv repository, extract from the tarball (in the pypi case), and run python
setup.py install.
... it will require it to be part of a clone of the github repository or have internet access to fetch
setuptools.
...And 4 more matches
Using COM from js-ctypes
#include <sapi.h> struct myispvoicevtbl; struct myispvoice { struct myispvoicevtbl* lpvtbl; }; struct myispvoicevtbl { /* start inherit from iunknown */ void* queryinterface; void* addref; ulong (__stdcall *release)(struct myispvoice*); /* end inherit from iunknown */ /* start inherit from ispnotifysource */ void*
setnotifysink; void*
setnotifywindowmessage; void*
setnotifycallbackfunction; void*
setnotifycallbackinterface; void*
setnotifywin32event; void* waitfornotifyevent; void* getnotifyeventhandle; /* end inherit from ispnotifysource */ /* start inherit from ispeventsource */ void*
setinterest; void* getevents; void* getinfo; /* end inherit from ispeventsour...
...ce */ /* start ispvoice */ void*
setoutput; void* getoutputobjecttoken; void* getoutputstream; void* pause; void* resume; void*
setvoice; void* getvoice; hresult (__stdcall *speak)(struct myispvoice*, lpcwstr pwcs, dword dwflags, ulong* pulstreamnumber); void* speakstream; void* getstatus; void* skip; void*
setpriority; void* getpriority; void*
setalertboundary; void* getalertboundary; void*
setrate; void* getrate; void*
setvolume; void* getvolume; void* waituntildone; void*
setsyncspeaktimeout; void* getsyncspeaktimeout; void* speakcompleteevent; void* isuisupported; void* displayui; /* end ispvoice */ }; int main(void) { if (succeeded(coinitialize(n...
... 'lpvtbl': ispvoicevtbl.ptr }]); ispvoicevtbl.define([ // start inherit from iunknown { 'queryinterface': ctypes.voidptr_t }, { 'addref': ctypes.voidptr_t }, { 'release': ctypes.functiontype(callback_abi, ulong, // return [ ispvoice.ptr ]).ptr }, // end inherit from iunknown // start inherit from ispnotifysource // can
set to ctypes.voidptr_t if arent going to use it { '
setnotifysink': ctypes.voidptr_t }, { '
setnotifywindowmessage': ctypes.voidptr_t }, { '
setnotifycallbackfunction': ctypes.voidptr_t }, { '
setnotifycallbackinterface': ctypes.voidptr_t }, { '
setnotifywin32event': ctypes.voidptr_t }, { 'waitfornotifyevent': ctypes.voidptr_t }, { 'getnotifyeventhandle': ctypes.voidptr_t }, ...
...And 4 more matches
Debugger-API - Firefox Developer Tools
rogram in the process of running a timer callback function: a running javascript program and its debugger shadows this diagram shows the various types of shadow objects that make up the debugger api (which all follow some general conventions): a debugger.object represents a debuggee object, offering a reflection-oriented api that protects the debugger from accidentally invoking getters,
setters, proxy traps, and so on.
...given a debugger.script, one can
set breakpoints, translate between source positions and bytecode off
sets (a deviation from the “source level” design principle), and find other static characteristics of the code.
...you can also
set onstep and onpop handlers on frames.
...And 4 more matches
Examine and edit HTML - Firefox Developer Tools
then you will find strange gaps between elements, even if you haven’t
set any margin or padding on them.
...the shadow root is signified by a node named #shadow-root — you can click its expansion arrow to see the full contents of the shadow dom, and then manipulate the contained nodes in a similar way to other part of the page's dom (although with a limited feature
set — you can't, for example, drag and drop or delete shadow dom nodes).
... (change pseudo-class) hover
set the :hover css pseudo-class.
...And 4 more matches
AudioListener.dopplerFactor - Web APIs
in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which
set new values for the panner position via the positionpanner() function.
... note how we have used some feature detection to either give the browser the newer property values (like audiolistener.forwardx) for
setting position, etc.
... if it supports those, or older methods (like audiolistener.
setorientation()) if it still supports those but not the new properties.
...And 4 more matches
BaseAudioContext.createPanner() - Web APIs
in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which
set new values for the panner position via the positionpanner() function.
... note how we have used some feature detection to either give the browser the newer property values (like audiolistener.forwardx) for
setting position, etc.
... if it supports those, or older methods (like audiolistener.
setorientation()) if it still supports those but not the new properties.
...And 4 more matches
DedicatedWorkerGlobalScope - Web APIs
workerlocation is a specific location object, mostly a sub
set of the location for browsing scopes, but adapted to workers.
...workernavigator is a specific navigator object, mostly a sub
set of the navigator for browsing scopes, but adapted to workers.
... workerglobalscope.performance read only returns the performance object associated with the worker, which is a regular performance object, but with a sub
set of its properties and methods available.
...And 4 more matches
Element.innerHTML - Web APIs
the element property innerhtml gets or
sets the html or xml markup contained within the element.
...
setting the value of innerhtml removes all of the element's descendants and replaces them with nodes constructed by parsing the html given in the string htmlstring.
... exceptions syntaxerror an attempt was made to
set the value of innerhtml using a string which is not properly-formed html.
...And 4 more matches
Element.outerHTML - Web APIs
it can also be
set to replace the element with nodes parsed from the given string.
...
setting the value of outerhtml replaces the element and all of its descendants with a new dom tree constructed by parsing the specified htmlstring.
... exceptions syntaxerror an attempt was made to
set outerhtml using an html string which is not valid.
...And 4 more matches
FontFace - Web APIs
fontface.family a cssomstring that retrieves or
sets the family of the font.
... fontface.feature
settings a cssomstring that retrieves or
sets infrequently used font features that are not available from a font's variant properties.
... it is equivalent to the font-feature-
settings descriptor.
...And 4 more matches
Using the Gamepad API - Web APIs
if the browser is able to map controls on the device to that layout the mapping property will be
set to the string standard.
...we have done this below using window.
setinterval(); once the object is available the gamepad info is outputted, the game loop is started, and the interval is cleared using window.clearinterval().
... interval =
setinterval(pollgamepads, 500); } function pollgamepads() { var gamepads = navigator.getgamepads ?
...And 4 more matches
HTMLImageElement.src - Web APIs
syntax htmlimageelement.src = newsource; let src = htmlimageelement.src; value when providing only a single image, rather than a
set of images from which the browser selects the best match for the viewport size and display pixel density, the src attribute is a usvstring specifying the url of the desired image.
... this can be
set either within the html itself using the src content attribute, or programmatically by
setting the element's src property.
... if you use the src
set content attribute to provide multiple image options for different display pixel densities, the url specified by the src attribute is used in one of two ways: as a fallback for browsers that don't support src
set.
...And 4 more matches
HTMLImageElement - Web APIs
htmlimageelement.crossorigin a domstring specifying the cors
setting for this image element.
... see cors
settings attributes for further details.
... htmlimageelement.src
set a usvstring reflecting the src
set html attribute.
...And 4 more matches
HTMLInputElement.stepUp() - Web APIs
the htmlinputelement.stepup() method increments the value of a numeric type of <input> element by the value of the step attribute, or the default step value if the step attribute is not explicitly
set.
...t 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 method will not cause the value to exceed the
set max value, or defy the constraints
set by the step attribute.
...And 4 more matches
Using microtasks in JavaScript with queueMicrotask() - Web APIs
a timeout or interval created with
settimeout() or
setinterval() is reached, causing the corresponding callback to be added to the task queue.
...they're a highly specialized feature of modern browser-based javascript development, allowing you to schedule code to jump in front of other things in the long
set of things waiting to happen on the user's computer.
...when it is found in the cache data isn't cached data is cached fetching data data fetched loaded data fetching data loaded data data fetched even worse, sometimes the element's data property will be
set and other times it won't be by the time this code finishes running.
...And 4 more matches
Using the MediaStream Recording API - Web APIs
if you are not interested in css and want to get straight to the javascript, skip to the basic app
setup section.
...instead, the problem was solved by making the third container's height equal to 100% of the parent height, minus the heights and padding of the other two: .sound-clips { box-shadow: in
set 0 3px 4px rgba(0,0,0,0.7); background-color: rgba(0,0,0,0.1); height: calc(100% - 240px - 0.7rem); overflow: scroll; } note: calc() has good support across modern browsers too, even going back to internet explorer 9.
...ground-color: #999; background-image: linear-gradient(to top right, rgba(0,0,0,0), rgba(0,0,0,0.5)); } last, we write a rule to say that when the checkbox is checked (when we click/focus the label), the adjacent <aside> element will have its horizontal translation value changed and transition smoothly into view: input[type=checkbox]:checked ~ aside { transform: translatex(0); } basic app
setup to grab the media stream we want to capture, we use getusermedia().
...And 4 more matches
PannerNode.distanceModel - Web APIs
in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which
set new values for the panner position via the positionpanner() function.
... note how we have used some feature detection to either give the browser the newer property values (like audiolistener.forwardx) for
setting position, etc.
... if it supports those, or older methods (like audiolistener.
setorientation()) if it still supports those but not the new properties.
...And 4 more matches
PannerNode.maxDistance - Web APIs
in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which
set new values for the panner position via the positionpanner() function.
... note how we have used some feature detection to either give the browser the newer property values (like audiolistener.forwardx) for
setting position, etc.
... if it supports those, or older methods (like audiolistener.
setorientation()) if it still supports those but not the new properties.
...And 4 more matches
PannerNode.panningModel - Web APIs
in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which
set new values for the panner position via the positionpanner() function.
... note how we have used some feature detection to either give the browser the newer property values (like audiolistener.forwardx) for
setting position, etc.
... if it supports those, or older methods (like audiolistener.
setorientation()) if it still supports those but not the new properties.
...And 4 more matches
Using the Resource Timing API - Web APIs
resource loading phases an application can get timestamps for the various phases of resource loading such as redirection, dns lookup, and tcp connection
setup.
...the
setresourcetimingbuffersize() method
sets the resource performance entry buffer size to the specified number of resource performance entries.
...performance data buffer not cleared (still have `" + p.length + "` items"); } function
set_resource_timing_buffer_size(n) { if (performance === undefined) { console.log("= performance.
setresourcetimingbuffersize(): peformance not supported"); return; } // check if performance.
setresourcetimingbuffersize() is supported console.log ("= performance.
setresourcetimingbuffersize()"); var supported = typeof performance.
setresourcetimingbuffersize == "function"; if (support...
...And 4 more matches
SVGTransform - Web APIs
interface overview also implement none methods void
setmatrix(in svgmatrix matrix) void
settranslate(in float tx, in float ty) void
setscale(in float sx, in float sy) void
setrotate(in float angle, in float cx, in float cy) void
setskewx(in float angle) void
setskewy(in float angle) properties readonly unsigned short type readonly float angle readonly svgmatrix matrix ...
... 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.
...
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
SharedWorkerGlobalScope - Web APIs
workerlocation is a specific location object, mostly a sub
set of the location for browsing scopes, but adapted to workers.
...workernavigator is a specific navigator object, mostly a sub
set of the navigator for browsing scopes, but adapted to workers.
... workerglobalscope.performance read only returns the performance object associated with the worker, which is a regular performance object, but with a sub
set of its properties and methods available.
...And 4 more matches
SpeechSynthesisUtterance - Web APIs
speechsynthesisutterance.lang gets and
sets the language of the utterance.
... speechsynthesisutterance.pitch gets and
sets the pitch at which the utterance will be spoken at.
... speechsynthesisutterance.rate gets and
sets the speed at which the utterance will be spoken at.
...And 4 more matches
WebGLRenderingContext.getUniformLocation() - Web APIs
uniform[1234][fi][v]()
sets the uniform's value to the specified value, which may be a single floating point or integer number, or a 2-4 component vector specified either as a list of values or as a float32array or int32array.
... uniformmatrix[234][fv]()
sets the uniform's value to the specified matrix, possibly with transposition.
... example in this example, taken from the animatescene() method in the article a basic 2d webgl animation example, obtains the locations of three uniforms from the shading program, then
sets the value of each of the three uniforms.
...And 4 more matches
Simple color animation - Web APIs
the timer and the timer handler function establish the animation loop, a
set of drawing commands that are executed at a regular period (typically, every frame; in this case, once per second).
...-onoff"> press here to <strong>[verb goes here]</strong> the animation </button> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : inline-block; font-size : inherit; margin : auto; padding : 0.6em; } window.addeventlistener("load", function
setupanimation (evt) { "use strict" window.removeeventlistener(evt.type,
setupanimation, false); // a variable to hold a timer that drives the animation.
... var button = document.queryselector("#animation-onoff"); var verb = document.queryselector("strong"); function startanimation(evt) { button.removeeventlistener(evt.type, startanimation, false); button.addeventlistener("click", stopanimation, false); verb.innerhtml="stop"; //
setup animation loop by redrawing every second.
...And 4 more matches
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
remote peer on the remote peer, when we receive an sdp offer with the directionality
set to "sendonly", we handle it using the holdrequested() method, which accepts as input an sdp offer string.
... async function holdrequested(offer) { try { await peerconnection.
setremotedescription(offer); await audiotransceiver.sender.replacetrack(null); audiotransceiver.direction = "recvonly"; await sendanswer(); } catch(err) { /* handle the error */ } } the steps taken here are:
set the remote description to the specified offer by calling rtcpeerconnection.
setremotedescription().
...
set the audio transceiver's direction property to "recvonly", instructing the transceiver to only accept audio and not to send any.
...And 4 more matches
Using bounded reference spaces - Web APIs
among the various reference spaces available in the webxr
set of apis, the bounded-floor reference space is somehwat unique.
... this diagram defines the boundaries of room with the origin in the center, as required, and a
set of 12 points representing the vertices of the available physical space.
...on; spacetype = "bounded-floor"; xrsession.requestreferencespace(spacetype) .then(onrefspacecreated) .catch(() => { spacetype = "local-floor"; xrsession.requestreferencespace(spacetype) .then(onrefspacecreated) .catch(handleerror); }); } function onrefspacecreated(refspace) { xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl) }); // now
set up matrices, create a secondary reference space to // transform the viewer's pose, and so forth.
...And 4 more matches
Using the Web Audio API - Web APIs
example code our boombox looks like this: note the retro cas
sette deck with a play button, and vol and pan sliders to allow you to alter the volume and stereo panning.
...s there's a method that allows us to do just that — audiocontext.createmediaelementsource: // get the audio element const audioelement = document.queryselector('audio'); // pass it into the audio context const track = audiocontext.createmediaelementsource(audioelement); note: the <audio> element above is represented in the dom by an object of type htmlmediaelement, which comes with its own
set of functionality.
... // select our play button const playbutton = document.queryselector('button'); playbutton.addeventlistener('click', function() { // check if context is in suspended state (autoplay policy) if (audiocontext.state === 'suspended') { audiocontext.resume(); } // play or pause track depending on state if (this.data
set.playing === 'false') { audioelement.play(); this.data
set.playing = 'true'; } else if (this.data
set.playing === 'true') { audioelement.pause(); this.data
set.playing = 'false'; } }, false); we also need to take into account what to do when the track finishes playing.
...And 4 more matches
ARIA annotations - Accessibility
wai-aria version 1.3 sees the addition of a
set of new features, collectively known as aria annotations, which allow the creation of accessible annotations inside web documents.
... to provide a semantic association between the document content being annotated and the annotation, an aria-details attribute can be
set on the annotated content that contains the id of the annotated element.
...you’ll see examples of most of these later on in the article, but briefly: aria-label="" can be
set on an element to provide a brief descriptive label when it isn't appropriate to have the label actually appearing in the ui, for example a search input in a horizontal nav bar.
...And 4 more matches
ARIA: textbox role - Accessibility
to create a multi-line text box which supports line breaks, as in an html <textarea>,
set aria-multiline="true".
... <label for="txtbox">enter your five-digit zipcode</label> <input type="text" placeholder="5-digit zipcode" id="txtbox"/> <!-- multi-line text area --> <label for="txtboxmultiline">enter the tags for the article</label> <textarea id="txtboxmultiline" required></textarea> where a text field is read-only, indicated this by
setting aria-readonly="true" on the element.
... if list or both is
set, the aria-controls and aria-haspopup attributes should also be included.
...And 4 more matches
-moz-context-properties - CSS: Cascading Style Sheets
if you reference an svg image in a webpage (such as with the <img> element or as a background image), the svg image can coordinate with the embedding element (its context) to have the image adopt property values
set on the embedding element.
... syntax /* keyword values */ -moz-context-properties: fill; -moz-context-properties: fill, stroke; /* global values */ -moz-context-properties: inherit; -moz-context-properties: initial; -moz-context-properties: un
set; values fill expose the fill value
set on the image to the embedded svg.
... stroke expose the stroke value
set on the image to the embedded svg.
...And 4 more matches
@viewport - CSS: Cascading Style Sheets
@viewport { width: 100vw; /*
sets the width of the actual viewport to the device width*/ } note: the use of <meta name="viewport"> tag overrides @viewport syntax the at-rule contains a
set of nested descriptors in a css block that is delimited by curly braces.
... width a shorthand descriptor for
setting both min-width and max-width.
... height a shorthand descriptor for
setting both min-height and max-height.
...And 4 more matches
Detecting CSS animation support - CSS: Cascading Style Sheets
we assume that animation is not supported by
setting animation to false.
... we
set the animationstring to animation which is the property we want to
set later on.
... we create an array of browser prefixes to loop over and we
set pfx to an empty string.
...And 4 more matches
Basic Concepts of Multicol - CSS: Cascading Style Sheets
multiple-column layout, usually referred to as multicol, is a specification for laying out content into a
set of column boxes much like columns in a newspaper.
... the column-width property the column-width property is used to
set the optimal width for every column box.
... the columns shorthand you can use the columnsshorthand to
set column-count and column-width.
...And 4 more matches
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
if we position an item using absolute positioning, we use these physical keywords as off
set values to push the item around.
...one has no text-align property
set, the second has text-align
set to left.
... .wrapper > p { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; margin: 1em; color: #d9480f; max-width: 300px; } <div class="wrapper"> <p style="writing-mode: horizontal-tb">i have writing mode
set to the default <code>horizontal-tb</code></p> <p style="writing-mode: vertical-rl">i have writing mode
set to <code>vertical-rl</code></p> </div> writing modes in grid layouts if we now take a look at a grid layout example, we can see how changing the writing mode means changing our idea of where the block and inline axis are.
...And 4 more matches
Grid template areas - CSS: Cascading Style Sheets
if you wanted a fixed width image area, then you could
set the image column as a pixel width, and assign the text area 1fr.
... before using any shorthand it is worth remembering that shorthands not only enable the
setting of many properties in one go, they also act to re
set things to their initial values that you do not, or cannot
set in the shorthand.
... therefore if you use a shorthand, be aware that it may re
set things you have applied elsewhere.
...And 4 more matches
display - CSS: Cascading Style Sheets
the display css property
sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex.
... formally, the display property
sets an element's inner and outer display types.
... the outer type
sets an element's participation in flow layout; the inner type
sets the layout of children.
...And 4 more matches
margin-left - CSS: Cascading Style Sheets
the margin-left css property
sets the margin area on the left side of an element.
... syntax /* <length> values */ margin-left: 10px; /* an absolute length */ margin-left: 1em; /* relative to the text size */ margin-left: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-left: auto; /* global values */ margin-left: inherit; margin-left: initial; margin-left: un
set; the margin-left property is specified as the keyword auto, or a <length>, or a <percentage>.
... value of display value of float value of position computed value of auto comment inline, inline-block, inline-table any static or relative 0 inline layout mode block, inline, inline-block, block, table, inline-table, list-item, table-caption any static or relative 0, except if both margin-left and margin-right are
set to auto.
...And 4 more matches
margin-right - CSS: Cascading Style Sheets
the margin-right css property
sets the margin area on the right side of an element.
... syntax /* <length> values */ margin-right: 20px; /* an absolute length */ margin-right: 1em; /* relative to the text size */ margin-right: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-right: auto; /* global values */ margin-right: inherit; margin-right: initial; margin-right: un
set; the margin-right property is specified as the keyword auto, or a <length>, or a <percentage>.
... value of display value of float value of position computed value of auto comment inline, inline-block, inline-table any static or relative 0 inline layout mode block, inline, inline-block, block, table, inline-table, list-item, table-caption any static or relative 0, except if both margin-left and margin-right are
set to auto.
...And 4 more matches
mask-border-slice - CSS: Cascading Style Sheets
the mask-border-slice css property divides the image
set by mask-border-source into regions.
... syntax /* all sides */ mask-border-slice: 30%; /* vertical | horizontal */ mask-border-slice: 10% 30%; /* top | horizontal | bottom */ mask-border-slice: 30 30% 45; /* top | right | bottom | left */ mask-border-slice: 7 12 14 5; /* using the `fill` keyword */ mask-border-slice: 10% fill 7 12; /* global values */ mask-border-slice: inherit; mask-border-slice: initial; mask-border-slice: un
set; the mask-border-slice property may be specified using one to four <number-percentage> values to represent the position of each image slice.
... values <number> represents an edge off
set in pixels for raster images and coordinates for vector images.
...And 4 more matches
outline-style - CSS: Cascading Style Sheets
the outline-style css property
sets the style of an element's outline.
... syntax /* keyword values */ outline-style: auto; outline-style: none; outline-style: dotted; outline-style: dashed; outline-style: solid; outline-style: double; outline-style: groove; outline-style: ridge; outline-style: in
set; outline-style: out
set; /* global values */ outline-style: inherit; outline-style: initial; outline-style: un
set; the outline-style property is specified as any one of the values listed below.
... in
set the outline makes the box look as though it were embedded in the page.
...And 4 more matches
outline - CSS: Cascading Style Sheets
the outline css shorthand property
set all the outline properties in a single declaration.
... constituent properties this property is a shorthand for the following css properties: outline-color outline-style outline-width syntax /* style */ outline: solid; /* color | style */ outline: #f66 dashed; /* style | width */ outline: in
set thick; /* color | style | width */ outline: green solid 3px; /* global values */ outline: inherit; outline: initial; outline: un
set; the outline property may be specified using one, two, or three of the values listed below.
... values <'outline-color'>
sets the color of the outline.
...And 4 more matches
text-shadow - CSS: Cascading Style Sheets
each shadow is described by some combination of x and y off
sets from the element, blur radius, and color.
... syntax /* off
set-x | off
set-y | blur-radius | color */ text-shadow: 1px 1px 2px black; /* color | off
set-x | off
set-y | blur-radius */ text-shadow: #fc0 1px 0 10px; /* off
set-x | off
set-y | color */ text-shadow: 5px 5px #558abb; /* color | off
set-x | off
set-y */ text-shadow: white 2px 5px; /* off
set-x | off
set-y /* use defaults for color and blur-radius */ text-shadow: 5px 10px; /* global values */ text-shadow: inherit; text-shadow: initial; text-shadow: un
set; this property is specified as a comma-separated list of shadows.
...the first two <length> values are the <off
set-x> and <off
set-y> values.
...And 4 more matches
text-underline-position - CSS: Cascading Style Sheets
the text-underline-position css property specifies the position of the underline which is
set using the text-decoration property's underline value.
... syntax /* single keyword */ text-underline-position: auto; text-underline-position: under; text-underline-position: left; text-underline-position: right; /* multiple keywords */ text-underline-position: under left; text-underline-position: right under; /* global values */ text-underline-position: inherit; text-underline-position: initial; text-underline-position: un
set; syntax values auto the user agent uses its own algorithm to place the line at or under the alphabetic baseline.
...if the font file doesn't include this information, behave as if auto was
set, with the browser choosing an appropriate position.
...And 4 more matches
top - CSS: Cascading Style Sheets
the effect of top depends on how the element is positioned (i.e., the value of the position property): when position is
set to absolute or fixed, the top property specifies the distance between the element's top edge and the top edge of its containing block.
... when position is
set to relative, the top property specifies the distance the element's top edge is moved below its normal position.
... when position is
set to sticky, the top property is used to compute the sticky-constraint rectangle.
...And 4 more matches
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
see cors
settings attributes for details on how the crossorigin attribute is used.
...consider the html5 boilerplate apache server configuration file for cors images, shown below: <ifmodule mod_
setenvif.c> <ifmodule mod_headers.c> <filesmatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
setenvif origin ":" is_cors header
set access-control-allow-origin "*" env=is_cors </filesmatch> </ifmodule> </ifmodule> in short, this configures the server to allow graphic files (those with the extensions ".bmp", ".cur", ".gif", ".ico", ".jpg", ".jpeg", ".png", ".svg", ".svgz", an...
... the key is to use the crossorigin attribute by
setting crossorigin on the htmlimageelement into which the image will be loaded.
...And 4 more matches
<col> - HTML: Hypertext Markup Language
possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textual content so that the content is justified in the cell if this attribute is not
set, its value is inherited from the align of the <colgroup> element this <col> element belongs too.
... note: to achieve the same effect as the left, center, right or justify values: do not try to
set the text-align property on a selector giving a <col> element.
...
set a to zero and b to the position of the column in the table, e.g.
...And 4 more matches
<input type="button"> - HTML: Hypertext Markup Language
<input type="button" value="click me"> if you don't specify a value, you get an empty button: <input type="button"> using buttons <input type="button"> elements have no default behavior (their cousins, <input type="submit"> and <input type="re
set"> are used to submit and re
set forms, respectively).
... disabling and enabling a button to disable a button, simply specify the disabled global attribute on it, like so: <input type="button" value="disable me" disabled> you can enable and disable buttons at run time by simply
setting disabled to true or false.
...a
settimeout() function is then used to re
set the button back to its enabled state after two seconds.
...And 4 more matches
itemprop - HTML: Hypertext Markup Language
examples the example below shows the source for a
set of elements marked up with itemprop attributes, followed by a table showing the resulting structured data.
...the first item has two properties, "name",
set to "amanda", and "band",
set to another item.
... that second item has two further properties, "name",
set to "jazz band", and "size",
set to "12".
...And 4 more matches
Global attributes - HTML: Hypertext Markup Language
gend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onre
set, onresize, onscroll, onseeked, onseeking, onselect, onshow, onsort, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting.
...all such custom data are available via the htmlelement interface of the element the attribute is
set on.
... the htmlelement.data
set property gives access to them.
...And 4 more matches
Cache-Control - HTTP
cache-control: immutable cache-control: stale-while-revalidate=<seconds> cache-control: stale-if-error=<seconds> directives cacheability a response is normally cached by the browser if: it has a status code of 301, 302, 307, 308, or 410 and cache-control does not have no-store, or if proxy, does not have private and authorization is un
set either has a status code of 301, 302, 307, 308, or 410 or has public, max-age or s-maxage in cache-control or has expires
set public the response may be stored by any cache, even if the response is normally non-cacheable.
...although other directives may be
set, this alone is the only directive you need in preventing cached responses on modern browsers.
...
setting must-revalidate does not make sense because in order to go through revalidation you need the response to be stored in a cache, which no-store prevents.
...And 4 more matches
Closures - JavaScript
one way of doing this is to specify the font-size of the body element (in pixels), and then
set the size of the other elements on the page (such as headers) using the relative em unit: body { font-family: helvetica, arial, sans-serif; font-size: 12px; } h1 { font-size: 1.5em; } h2 { font-size: 1.2em; } such interactive text size buttons can change the font-size property of the body element, and the adjustments are picked up by other elements on the page thanks to the relative u...
... <p id="help">helpful notes will appear here</p> <p>e-mail: <input type="text" id="email" name="email"></p> <p>name: <input type="text" id="name" name="name"></p> <p>age: <input type="text" id="age" name="age"></p> function showhelp(help) { document.getelementbyid('help').innerhtml = help; } function
setuphelp() { var helptext = [ {'id': 'email', 'help': 'your e-mail address'}, {'id': 'name', 'help': 'your full name'}, {'id': 'age', 'help': 'your age (you must be over 16)'} ]; for (var i = 0; i < helptext.length; i++) { var item = helptext[i]; document.getelementbyid(item.id).onfocus = function() { showhelp(item.help); } } }
setuphelp(); try runni...
... the reason for this is that the functions assigned to onfocus are closures; they consist of the function definition and the captured environment from the
setuphelp function's scope.
...And 4 more matches
JavaScript modules - JavaScript
63edge full support 79firefox full support 67 full support 67 no support 66 — 67disabled disabled from version 66 until version 67 (exclusive): this feature is behind the javascript.options.dynamicimport preference (needs to be
set to true).
...android full support 63firefox android full support 67 full support 67 no support 66 — 67disabled disabled from version 66 until version 67 (exclusive): this feature is behind the javascript.options.dynamicimport preference (needs to be
set to true).
... introducing an example to demonstrate usage of modules, we've created a simple
set of examples that you can find on github.
...And 4 more matches
Using Promises - JavaScript
here's some code that uses createaudiofileasync(): function successcallback(result) { console.log("audio file ready at url: " + result); } function failurecallback(error) { console.error("error generating audio file: " + error); } createaudiofileasync(audio
settings, successcallback, failurecallback); modern functions return a promise that you can attach your callbacks to instead: if createaudiofileasync() were rewritten to return a promise, using it could be as simple as this: createaudiofileasync(audio
settings).then(successcallback, failurecallback); that's shorthand for: const promise = createaudiofileasync(audio
settings); promise.then(successc...
...the most obvious example is the
settimeout() function:
settimeout(() => saysomething("10 seconds passed"), 10*1000); mixing old-style callbacks and promises is problematic.
...
settimeout is to blame for this.
...And 4 more matches
Array.prototype.length - JavaScript
the length property of an object which is an instance of type array
sets or returns the number of elements in that array.
... var namelista = new array(4294967296); //2 to the 32nd power = 4294967296 var namelistc = new array(-100) //negative sign console.log(namelista.length); //rangeerror: invalid array length console.log(namelistc.length); //rangeerror: invalid array length var namelistb = []; namelistb.length = math.pow(2,32)-1; //
set array length less than 2 to the 32nd power console.log(namelistb.length); //4294967295 you can
set the length property to truncate an array at any time.
... when you extend an array by changing its length property, the number of actual elements increases; for example, if you
set length to 3 when it is currently 2, the array now contains 3 elements, which causes the third element to be a non-iterable empty slot.
...And 4 more matches
Object.create() - JavaScript
g requires that 'this' be a function adding the missing object-method directly to new object's "prototype" does not work either, since the new object does not have a real prototype (which is really the cause of all these problems) and one cannot be directly added: ocn = object.create( null ); // create "null" object (same as before) ocn.prototype.tostring = object.tostring; // error: cannot
set property 'tostring' of undefined ocn.prototype = {}; // try to create a prototype ocn.prototype.tostring = object.tostring; // since new object lacks method then try assigning it from standard-object > ocn.tostring() // error: ocn.tostring is not a function adding the missing object-method by using the standard-object as new object's prototype does not work either: ...
...ocn = object.create( null ); // create "null" object (same as before) object.
setprototypeof(ocn, object); //
set new object's prototype to the standard-object > ocn.tostring() // error: function.prototype.tostring requires that 'this' be a function some ok solutions again, adding the missing object-method directly from the standard-object does not work.
... as before) ocn.tostring = tostring; // since new object lacks method then assign it directly from generic version > ocn.tostring() // shows "[object object]" > "ocn is: " + ocn // shows "ocn is: [object object]" ob={}; ob.pn=ocn; ob.po=oco; // create a compound object (same as before) > showproperties(ob) // display top-level properties - po: [object object] - pn: [object object] however,
setting the generic prototype as the new object's prototype works even better: ocn = object.create( null ); // create "null" object (same as before) object.
setprototypeof(ocn, object.prototype); //
set new object's prototype to the "generic" object (not standard-object) (in addition to all the string-related functions shown above, this also adds:) > ocn.valueof() // shows {} > oc...
...And 4 more matches
Object.prototype.__proto__ - JavaScript
if you care about performance you should avoid
setting the [[prototype]] of an object.
... the __proto__ property of object.prototype is an accessor property (a getter function and a
setter function) that exposes the internal [[prototype]] (either an object or null) of the object through which it is accessed.
...it is deprecated in favor of object.getprototypeof/reflect.getprototypeof and object.
setprototypeof/reflect.
setprototypeof (though still,
setting the [[prototype]] of an object is a slow operation that should be avoided if performance is a concern).
...And 4 more matches
Promise.all() - JavaScript
in comparison, the promise returned by promise.all
settled() will wait for all input promises to complete, regardless of whether or not one rejects.
... var p1 = promise.resolve(3); var p2 = 1337; var p3 = new promise((resolve, reject) => {
settimeout(() => { resolve("foo"); }, 100); }); promise.all([p1, p2, p3]).then(values => { console.log(values); // [3, 1337, "foo"] }); if the iterable contains non-promise values, they will be ignored, but still counted in the returned promise array value (if the promise is fulfilled): // this will be counted as if the iterable passed is empty, so it gets fulfilled var p = promise.all([1,...
...2,3]); // this will be counted as if the iterable passed contains only the resolved promise with value "444", so it gets fulfilled var p2 = promise.all([1,2,3, promise.resolve(444)]); // this will be counted as if the iterable passed contains only the rejected promise with value "555", so it gets rejected var p3 = promise.all([1,2,3, promise.reject(555)]); // using
settimeout we can execute code after the stack is empty
settimeout(function() { console.log(p); console.log(p2); console.log(p3); }); // logs // promise { <state>: "fulfilled", <value>: array[3] } // promise { <state>: "fulfilled", <value>: array[4] } // promise { <state>: "rejected", <reason>: 555 } asynchronicity or synchronicity of promise.all this following example demonstrates the asynchronicity (or synchronici...
...And 4 more matches
MathML attribute reference - MathML
depth <mpadded>
sets or increments the depth.
... displaystyle <mstyle>, <mtable> a boolean value specifying whether more vertical space is used for displayed equations or, if
set to false, a more compact layout is used to display formulas.
... href all used to
set a hyperlink to a specified uri.
...And 4 more matches
Media - Progressive web apps (PWAs)
this css (below) removes the navigation area when printing the document: @media print { #nav-area {display: none;} } some common media types are: screen color device display print printed paged media projection projected display all all media (the default) more details there are other ways to specify the media type for a
set of rules.
... a @page rule can
set the page margins.
... example this rule
sets the page margins to one inch on all four sides: @page {margin: 1in;} this rule ensures that every h1 element starts on a new page: h1 {page-break-before: always;} more details for full details of css support for paged media, see paged media in the css specification.
...And 4 more matches
Fills and Strokes - SVG: Scalable Vector Graphics
fill and stroke attributes painting basic coloring can be done by
setting two attributes on the node: fill and stroke.
... using fill
sets the color inside the object and stroke
sets the color of the line drawn around the object.
... there are additional stroke and fill properties available, including fill-rule, which specifies how to color in shapes that overlap themselves; stroke-miterlimit, which determines if a stroke should draw miters; and stroke-dashoff
set, which specifies where to start a dasharray on a line.
...And 4 more matches
Patterns - SVG: Scalable Vector Graphics
<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient1"> <stop off
set="5%" stop-color="white"/> <stop off
set="95%" stop-color="blue"/> </lineargradient> <lineargradient id="gradient2" x1="0" x2="0" y1="0" y2="1"> <stop off
set="5%" stop-color="red"/> <stop off
set="95%" stop-color="orange"/> </lineargradient> <pattern id="pattern" x="0" y="0" width=".25" height=".25"> <rect x="0" y="0" width="50" height="50" fill="skyblue"/> ...
...there are also x and y attributes available if you want to off
set the start point of this rectangle somewhere within your drawing.
...since, in this case, we wanted the pattern to repeat 4 times horizontally and vertically, the height and width are
set to 0.25.
...And 4 more matches
document - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the document finds a node-
set in an external document, or multiple external documents, and returns the resulting node-
set.
... syntax document(uri [,node-
set] ) arguments uri an absolute or relative uri of the document to be retrieved.
... node-
set (optional) an expression pointing to a node-
set in the external document that should be returned.
...And 4 more matches
simple-prefs - Archive of obsolete content
if you need to get and
set the general browser preferences, use preferences/service.
...this is used to access the preference from your add-on: console.log(require("sdk/simple-prefs").prefs.my
settingname); this means that it must be a valid javascript identifier.
... hidden a boolean value which, if present and
set to true, means that the preference won't appear in the add-ons manager interface, so users of your add-on won't be able to see or alter it.
...And 3 more matches
io/text-streams - Archive of obsolete content
(filename, "r"); if (!textreader.closed) { text = textreader.read(); textreader.close(); } } return text; } function writetexttofile(text, filename) { var fileio = require("sdk/io/file"); var textwriter = fileio.open(filename, "w"); if (!textwriter.closed) { textwriter.write(text); textwriter.close(); } } globals constructors textreader(inputstream, char
set) creates a buffered input stream that reads text from a backing stream using a given text encoding.
... char
set : string inputstream is expected to be in the character encoding named by this value.
...see nsichar
setconvertermanager.idl for documentation on how to determine other valid values for this.
...And 3 more matches
HTML in XUL for rich tooltips - Archive of obsolete content
script overlay titled overlay.js: <?xml version="1.0" encoding="utf-8"?> <overlay id="htmltip-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> <script type="application/x-javascript" src="overlay.js"/> <popup id="contentareacontextmenu"> <menuitem id="htmltip1" label="foo1" onmouseover="htmltip.onmou
setooltip(event)" tooltip="myhtmltip" /> <menuitem id="htmltip2" label="foo2" onmouseover="htmltip.onmou
setooltip(event)" tooltip="myhtmltip" /> </popup> <popup
set id="mainpopup
set"> <tooltip id="myhtmltip"> <html:div id="myhtmltipdiv" type="content"/> </tooltip> </popup
set> </overlay> insert your version of the foll...
...our customized tooltiphtml attribute for each element can be
set at any time.
... var htmltip = { onload: function() { //at any point you can save an html string to a xul attribute for later injection into the tooltip document.getelementbyid("htmltip1").
setattribute("tooltiphtml", "<font color='red'>red foo</font>") document.getelementbyid("htmltip2").
setattribute("tooltiphtml", "<font color='green'>green foo</font>") }, onmou
setooltip: function(event) { //get the html tooltip string assigned to the element that the mouse is over (which will soon launch the tooltip) var txt = event.target.getattribute("tooltiphtml"); // get the html div element that is inside the custom xul tooltip var div = document.getelementbyid("myhtmltipdiv"); //clear the html div element of any prior shown custom html while(div.firstchild) div.removechild(div.firstchild); //safely conv...
...And 3 more matches
Miscellaneous - Archive of obsolete content
if
set, you will receive dommousescroll events.
...if
set, you will not receive dommousescroll events.
...if
set, you will not receive dommousescroll events.
...And 3 more matches
Install Manifests - Archive of obsolete content
however, while <em:maxversion> is a required property, it is ignored unless you also
set <em:strictcompatibility> in the main <description> of your install.rdf (i.e.
... examples this declares a
set of add-on metadata to be displayed when the application is running in the de-de locale.
...to do so,
set optionstype to 3 and
set optionsurl to a the path of a page to open.
...And 3 more matches
Adding menus and submenus - Archive of obsolete content
instead of
setting the menupopup directly in the xul, you can use the onpopupshowing event to fill the children when the popup is about to be displayed.
...the type attribute must be
set to "checkbox".
... you can
set the checked attribute to "true" to check it by default.
...And 3 more matches
CSS3 - Archive of obsolete content
the choice of glyphs with specific opentype features via the css font-feature-
settings property.
... support for the css outline-off
set property giving more control on the position of the outline.
... support for the use of an <image> as the border with the css border-image, border-image-source, border-image-slice, border-image-width, border-image-out
set, and border-image-repeat properties.
...And 3 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
we still connect through a
set of links that mostly drive us to a new page, and we still occasionally lose track of where we are.
...with inner browsing, a simple request to retrieve the next
set of message headers that replace the currently viewed message headers can dramatically improve user experience.
...data loader component this component is a simple javascript function that
sets the src attribute of the hidden iframe, causing it to load an url (i.e., by establishing a request on the server side): /* triggers the iframe to retrieve new data */ function retrievedata() { bridgeframe.src = dataurl; } once a web page is loaded into the iframe, the data binder will be able to get the data from the iframe's page and
set the data into the main page's context.
...And 3 more matches
JavaScript crypto - Archive of obsolete content
to enable your document to receive these events, you must first tell the crypto system you are interested by
setting window.crypto.enablesmartcardevents to true.
... if (typeof(crypto.version) != "undefined") { crmfobject = crypto.generatecrmfrequest( "cn=" + form.name.value, form.password.value, authenticator, keytransportcert, "
setcrmfrequest();", 1024, null, "rsa-dual-use"); } return false; } function
setcrmfrequest() { form.cert_request.value = crmfobject.request; form.submit(); } form.onsubmit = validate; </script> on completion of the request, the ca may submit a page that looks something like this: <!doctype html> <h2>certificate request successful</h2> <p>hit 'load' to load your certific...
... mechanism flag definitions in general, most tokens should not
set any of the cipher flags.
...And 3 more matches
XUL Structure - Archive of obsolete content
the tree is then converted into a
set of objects that can be displayed on the screen.
... it is worth noting that the mozilla browser itself is actually just a
set of packages containing xul files, javascript and style sheets.
...each of these components, or packages, is made up of a
set of files that describe the user interface for it.
...And 3 more matches
XUL Changes for Firefox 1.5 - Archive of obsolete content
a
set of icons will appear across the top of the dialog allowing the user to switch panels.
... along with the new preference elements and some additional attributes for existing elements, they make it easy to
set preferences without having to use code.
... <radiogroup>
setting the value property on the <radiogroup> element selects the <radio> element in the group with the corresponding value.
...And 3 more matches
Accessibility/XUL Accessibility Reference - Archive of obsolete content
column see grid columns see grid command see keyboard shortcut tutorial command
set see keyboard shortcut tutorial deck only the currently selected deck layer can be focused.
... image <image src="images/img.xbm" tooltiptext='<!--image label-->'/> key see keyboard shortcut tutorial key
set see keyboard shortcut tutorial listbox <label control='listid'><!--label text--></label> <listbox id="listid"> <listitem value="val" label="<!--item text-->"/> </listbox> <label control='listid2' value='<!--list label-->' /> <listbox rows="5" id='listid2'> <listcols> <listcol/> <listcol/> <listcol/> </listcols> <listhead> <listheader label="...
...enu> </menubar> menulist <label value="<!--label text-->" control="comboid" /> <menulist id="comboid"> <menupopup> <menuitem label="<!--option1-->" /> <menuitem label="<!--option2-->" selected="true" /> <menuitem label="<!--option3-->" /> </menupopup> </menulist> menupopup see menulist and menubar popup see popup
set popup
set be careful regarding keyboard access of popups.
...And 3 more matches
notificationbox - Archive of obsolete content
the notifications may be placed at the bottom by
setting the dir attribute to reverse.
...urrentnotification, removenotification, removetransientnotifications, attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties currentnotification type: notification element the currently displayed notification element or null.
...sbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata appendnotification( label , value , image , priority , buttons, eventcallback ) return type: element create a new notification and display it.
...And 3 more matches
prefpane - Archive of obsolete content
a prefpane is made up of two parts, the preferences descriptions, which specify the
set of preferences that will be modified, and the user interface for adjusting those preferences.
... selected type: boolean this attribute will be
set to true for the currently selected prefpane.
... image type: image url gets and
sets the value of the image attribute.
...And 3 more matches
Archived Mozilla and build documentation - Archive of obsolete content
building transformiix standalone calicalendarview an object implementing calicalendarview is generally intended to serve as a way of manipulating a
set of dom nodes corresonding to a visual representation of calievent and calitodo objects.
... creating a hybrid cd creating a microsummary a microsummary generator is a
set of instructions for creating a microsummary from the content of a page.
... extension frequently asked questions this is quick
set of answers to the most common issues with extension development.
...And 3 more matches
NPClass - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npclass is a structure that holds a
set of pointers to functions that make up the behavior of an instance of an npclass (i.e.
... syntax struct npclass { uint32_t structversion; npallocatefunctionptr allocate; npdeallocatefunctionptr deallocate; npinvalidatefunctionptr invalidate; nphasmethodfunctionptr hasmethod; npinvokefunctionptr invoke; npinvokedefaultfunctionptr invokedefault; nphaspropertyfunctionptr hasproperty; npgetpropertyfunctionptr getproperty; np
setpropertyfunctionptr
setproperty; npremovepropertyfunctionptr removeproperty; npenumerationfunctionptr enumerate; npconstructfunctionptr construct; }; warning: don't call these routines directly.
...this is
set to np_class_struct_version, which is 1 in mozilla 1.8.*, 2 since mozilla 1.9a1, and 3 since firefox 3.0b1.
...And 3 more matches
NPWindow - Archive of obsolete content
ws_info unix: contains information about the plug-in's unix window environment; points to an np
setwindowcallbackstruct.
... the browser calls npp_
setvalue whenever the drawable changes.
...for windowed plug-ins, the browser calls the npp_
setwindow method with an npwindow structure that represents a drawable (a pointer to an npwindow allocated by the browser).
...And 3 more matches
Introduction to SSL - Archive of obsolete content
clients and servers may support different cipher suites, or
sets of ciphers, depending on factors such as the version of ssl they support, company policies regarding acceptable encryption strength, and government restrictions on export of ssl-enabled software.
... the ssl 2.0 and ssl 3.0 protocols support overlapping
sets of cipher suites.
...however, the steps involved can be summarized as follows (assuming the use of the cipher suites listed in "cipher suites with rsa key exchange"): the client sends the server the client's ssl version number, cipher
settings, randomly generated data, and other information the server needs to communicate with the client using ssl.
...And 3 more matches
Scratchpad - Archive of obsolete content
first you need to check "scratchpad" in the "default firefox developer tools" section of the
settings page.
...to do this check "enable chrome and add-on debugging" in the developer tool
settings.
... once you've done this, the environment menu has a browser option; once that's selected, your scope is the entire browser rather than just the page content, as you will see from examining some globals: window /* [object chromewindow] */ gbrowser /* [object xulelement] */ the scratchpad execution context is
set to browser when a snippet file has // -sp-context: browser on the first line.
...And 3 more matches
Using the W3C DOM - Archive of obsolete content
for example, the following short sample dynamically
sets the left margin of a <div> element with an id of "in
set" to half an inch: // in the html: <div id="in
set">sample text</div> document.getelementbyid("in
set").style.marginleft = ".5in"; note: internet explorer 5 through 7 have a flawed implementation of getelementbyid(), which returns the first element with a matching name or id (id versus name when using getelementbyid, msdn: getelementbyid me...
...eltop dom level 2: parseint(elemref.style.top, 10) ie5+: elemref.style.pixelleft = x; elemref.style.pixeltop = y; dom level 2: elemref.style.left = x + "px"; elemref.style.top = y + "px"; w3c dom2 reflection of an element's css properties keep in mind that according to the w3c recommendation, the values returned by the style property of an element reflect static
settings in the element's style attribute only, not the total "computed style" that includes any inherited style
settings from parent elements.
...so, if you want to get the element's inline style
settings for left and top as integers, parse the integer from the string by using parseint().
...And 3 more matches
Browser Feature Detection - Archive of obsolete content
e true true true borderbottomstyle true true true borderleftstyle true true true bottom true true true captionside true false true clear true true true clip true true true content true false true counterincrement true false true counterre
set true false true cue true false false cueafter true false false cuebefore true false false cursor true true true direction true true true elevation true false false emptycells true false true fontsizeadjust true false true fontstretch ...
...true false true left true true true markeroff
set true false true marks true false true maxheight true ie7 only true maxwidth true ie7 only true minheight true true true minwidth true ie7 only true orphans true false true outline true false true outlinecolor true false true outlinestyle true false true outlinewidth true false true overflow true true true page true false true pagebreakafter true true true pagebreakbefore true true true pagebreakinside true false true pause tru...
...tyle', 'supported': false}, {name: 'borderbottomstyle', 'supported': false}, {name: 'borderleftstyle', 'supported': false}, {name: 'bottom', 'supported': false}, {name: 'captionside', 'supported': false}, {name: 'clear', 'supported': false}, {name: 'clip', 'supported': false}, {name: 'content', 'supported': false}, {name: 'counterincrement', 'supported': false}, {name: 'counterre
set', 'supported': false}, {name: 'cue', 'supported': false}, {name: 'cueafter', 'supported': false}, {name: 'cuebefore', 'supported': false}, {name: 'cursor', 'supported': false}, {name: 'direction', 'supported': false}, {name: 'elevation', 'supported': false}, {name: 'emptycells', 'supported': false}, {name: 'fontsizeadjust', 'supported': false}, {name: 'fontstretch', 'supported':...
...And 3 more matches
-ms-filter - Archive of obsolete content
the -ms-filter css property is a microsoft extension that
sets or retrieves the filter or collection of filters applied to an object.
... code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/filter_8.htm -ms-filter: 'progid:dximagetransform.microsoft.motionblur(strength=50), progid:dximagetransform.microsoft.basicimage(mirror=1)'; the following example shows how to use an inline style sheet to
set the filter on an image.
... code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/filter_h.htm <img style="filter:progid:dximagetransform.microsoft.motionblur(strength=50) progid:dximagetransform.microsoft.basicimage(mirror=1)" src="/workshop/samples/author/dhtml/graphics/cone.jpg" height="80px" width="80px" alt="cone"> the following example shows how to use scripting to
set the filter on an image.
...And 3 more matches
Error.stackTraceLimit - Archive of obsolete content
the error.stacktracelimit property gets or
sets the stack trace limit, which is equivalent to the number of error frames to display.
... syntax error.stacktracelimit remarks you can
set the stacktracelimit property to any positive value between 0 and infinity.
... if the stacktracelimit property is
set to 0 at the time an error is thrown, no stack trace is shown.
...And 3 more matches
Old Proxy API - Archive of obsolete content
proxy.name = val (in the context of "
setting the value") receiver.name = val (if receiver inherits from a proxy and does not override name)
set: function(receiver, name, val) -> boolean function(receiver, name, val) { var desc = this.getownpropertydescriptor(name); if (desc) { if ('writable' in desc) { if (desc.writable) { desc.value = val; this.defineproperty(name, desc); retur...
...n true; } else { return false; } } else { // accessor if (desc.
set) { desc.
set.call(receiver, val); return true; } else { return false; } } } desc = this.getpropertydescriptor(name); if (desc) { if ('writable' in desc) { if (desc.writable) { // fall through } else { return false; } } else { // accessor if (desc.
set) { desc.
set.call(receiver, val); return true; } else { return false; } } } this.defineproperty(name, { value: val, writable: true, enumerable: true, configurable: true}); return true; } receiver is either the proxy or an object that inherits from the proxy.
...be careful of how you use the receiver argument in 'get' and '
set' traps.
...And 3 more matches
Common causes of memory leaks in extensions - Extensions
be careful with
setinterval/
settimeout using window.
setinterval() or window.
settimeout() can be problematic, too, when it comes to zombie compartments.
... consider the following example code that could be part of your browser.xul overlay: gbrowser.addeventlistener("domcontentloaded", function(evt) { var contentdoc = evt.originaltarget; var i = 0; // refresh the title once each second
setinterval(function() { contentdoc.title = ++i; }, 1000); }, false); one would normally expect that the interval (or timer) would be destroyed as soon as the document unloads, in the same way that event listeners are automatically destroyed.
... however, while this is still true, the window.
setinterval() in the example originates from the outer chrome window (browser.xul) and not from the content window.
...And 3 more matches
Building up a basic demo with Babylon.js - Game development
in this article we'll take you through the real basics of using babylon.js, including
setting up a development environment, structuring the necessary html, and writing the javascript code.
... environment
setup to start developing with babylon.js, you don't need much.
... html structure here's the html structure we will use: <!doctype html> <html> <head> <meta char
set="utf-8"> <title>mdn games: babylon.js demo</title> <style> html,body,canvas { margin: 0; padding: 0; width: 100%; height: 100%; font-size: 0; } </style> </head> <body> <script src="babylon.js"></script> <canvas id="render-canvas"></canvas> <script> var canvas = document.getelementbyid("render-canvas"); /* all our javascript code goes here */ </script> </body> </html> ...
...And 3 more matches
WebVR — Virtual Reality for the Web - Game development
the webvr api the webvr api is the central api for capturing information on vr devices connected to a computer and head
set position/orientation/velocity/acceleration information, and converting that into useful data you can use in your games and other applications.
... using the webvr api the webvr api is based on two concepts — sending stereoscopic images to both lenses in your head
set and receiving positional data for your head from the sensor, and those two are handled by hmdvrdevice (head-mounted display virtual reality device) and positionsensorvrdevice.
...evice) { ghmd = devices[i]; break; } } if (ghmd) { for (var i = 0; i < devices.length; ++i) { if (devices[i] instanceof positionsensorvrdevice && devices[i].hardwareunitid === ghmd.hardwareunitid) { gpositionsensor = devices[i]; break; } } } }); this code will loop through the available devices and assign proper sensors to the head
sets — the first devices array contains the connected devices, and a check is done to find the hmdvrdevice, and assign it to the ghmd variable — using this you can
set up the scene, getting the eye parameters,
setting the field of view, etc.
...And 3 more matches
asm.js - Game development
asm.js is a specification defining a sub
set of javascript that is highly optimizable.
... this article looks at exactly what is permitted in the asm.js sub
set, what improvements it confers, where and how you can make use of it, and further resources and examples.
... it is a very small, strict sub
set of javascript that only allows things like `while`, `if`, numbers, top-level named functions, and other simple constructs.
...And 3 more matches
Finishing up - Game development
we can also re
set the ball and the paddle positions when the player begins with their next life.
...if there are no lives left, the game is lost; if there are still some lives left, then the position of the ball and the paddle are re
set, along with the movement of the ball.
...requestanimationframe helps the browser render the game better than the fixed framerate we currently have implemented using
setinterval().
...And 3 more matches
Extra lives - Game development
add the following lines below the existing scoretext definition inside your create() function: livestext = game.add.text(game.world.width-5, 5, 'lives: '+lives, { font: '18px arial', fill: '#0095dd' }); livestext.anchor.
set(1,0); lifelosttext = game.add.text(game.world.width*0.5, game.world.height*0.5, 'life lost, click to continue', { font: '18px arial', fill: '#0095dd' }); lifelosttext.anchor.
set(0.5); lifelosttext.visible = false; the livestext and lifelosttext objects look very similar to the scoretext one — they define a position on the screen, the actual text to display, and the font styling.
... the former is anchored on its top right edge to align properly with the screen, and the latter is centered, both using anchor.
set().
... the lifelosttext will be shown only when the life is lost, so its visibility is initially
set to false.
...And 3 more matches
Initialize the framework - Game development
using your favourite text editor, create a new html document, save it as index.html, in a sensible location, and add the following code to it: <!doctype html> <html> <head> <meta char
set="utf-8" /> <title>gamedev phaser workshop - lesson 01: initialize the framework</title> <style>* { padding: 0; margin: 0; }</style> <script src="js/phaser.min.js"></script> </head> <body> <script> var game = new phaser.game(480, 320, phaser.canvas, null, { preload: preload, create: create, update: update }); function preload() {} function create() {} function...
... walking through what we have so far at this point we have a char
set defined, <title> and some basic css in the header to re
set the default margin and padding.
...the parameters are: the width and height to
set the <canvas> to.
...And 3 more matches
Physics - Game development
for proper collision detection between objects in our game we will need to have physics; this article introduces you to what's available in phaser, as well as demonstrating a typical simple
setup.
...add the following line at the bottom of the create() function: game.physics.enable(ball, phaser.physics.arcade); next, if we want to move our ball on the screen, we can
set velocity on its body.
... add the following line, again at the bottom of create(): ball.body.velocity.
set(150, 150); removing our previous update instructions remember to remove our old method of adding values to x and y from the update() function: function update() { ball.x += 1; ball.y += 1; } we are now handling this properly, with a physics engine.
...And 3 more matches
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
the content attribute is the attribute as you
set it from the content (the html code) and you can
set it or get it via element.
setattribute() or element.getattribute().
...for example, to
set an <input> element's maxlength to 42 using the content attribute, you have to call
setattribute("maxlength", "42") on that element.
...these are the attributes you can read or
set using javascript properties like element.foo.
...And 3 more matches
Accessible multimedia - Learn web development
the problem with native html5 controls html5 video and audio instances even come with a
set of inbuilt controls that allow you to control the media straight out of the box.
... basic
setup first, grab a copy of our custom-controls-start.html, custom-controls.css, rabbit320.mp4, and rabbit320.webm files and save them in a new directory on your hard drive.
...here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video> <div class="controls"> <button class="playpause">play</button> <button class="stop">stop</button> <button class="rwd">rwd</button> <button class="fwd">fwd</button> <div class="time">00:00</div> </div> </section> javascript basic
setup we've inserted some simple control buttons below our video.
...And 3 more matches
Sending form data - Learn web development
an http request consists of two parts: a header that contains a
set of global metadata about the browser's capabilities, and a body that can contain information necessary for the server to process the specific request.
... let's look at an example — this is the same form we looked at in the get section above, but with the method attribute
set to post.
...to get it working again, we have found that you can load up the mamp app, then choose the menu options mamp > preferences > php, and
set "standard version:" to "7.2.x" (x will differ depending on what version you have installed).
...And 3 more matches
Sending forms through JavaScript - Learn web development
something went wrong.' ); } ); //
set up our request xhr.open( 'post', 'https://example.com/cors.php' ); // add the required http header for form data post requests xhr.
setrequestheader( 'content-type', 'application/x-www-form-urlencoded' ); // finally, send our data.
...something went wrong.' ); } ); //
set up our request xhr.open( 'post', 'https://example.com/cors.php' ); // send our formdata object; http headers are
set automatically xhr.send( fd ); } btn.addeventlistener( 'click', function() { senddata( {test:'ok'} ); } ) here's the live result: using formdata bound to a form element you can also bind a formdata object to an <form> element.
..."send me!"> </form> but javascript takes over the form: window.addeventlistener( "load", function () { function senddata() { const xhr = new xmlhttprequest(); // bind the formdata object and the form element const fd = new formdata( form ); // define what happens on successful data submission xhr.addeventlistener( "load", function(event) { alert( event.target.respon
setext ); } ); // define what happens in case of error xhr.addeventlistener( "error", function( event ) { alert( 'oops!
...And 3 more matches
Using data attributes - Learn web development
data-* attributes allow us to store extra information on standard, semantic html elements without other hacks such as non-standard attributes, extra properties on dom, or node.
setuserdata().
...you could use getattribute() with their full html name to read them, but the standard defines a simpler way: a domstringmap you can read out via a data
set property.
... to get a data attribute through the data
set object, get the property by the part of the attribute name after data- (note that dashes are converted to camelcase).
...And 3 more matches
Introduction to client-side frameworks - Learn web development
angular uses typescript, a super
set of javascript that we’ll look at in a little more detail in the next chapter.
...it follows a similar pattern to the one we used to build a list item element: function builddeletebuttonel(id) { const button = document.createelement('button'); const textcontent = document.createtextnode('delete'); button.
setattribute('type', 'button'); button.appendchild(textcontent); return button; } this button doesn't do anything yet, but it will later once we decide to implement our delete feature.
...in a vanilla javascript app, you'd have to create your own
set of conventions to achieve this in an efficient, scalable way.
...And 3 more matches
Starting our Svelte Todo list app - Learn web development
if the task is not being edited, there's a checkbox to
set the completed status, and two buttons to edit or delete the task.
...
setting a value of true means that the button is pressed by default.
...replace the contents of the file public/global.css with the following: /* re
sets */ *, *::before, *::after { box-sizing: border-box; } *:focus { outline: 3px dashed #228bec; outline-off
set: 0; } html { font: 62.5% / 1.15 sans-serif; } h1, h2 { margin-bottom: 0; } ul { list-style: none; padding: 0; } button { border: none; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; color: inherit; font: inherit; line-height:...
...And 3 more matches
nsIDOMEvent
nbubblearg, in boolean cancelablearg); boolean isdispatchstopped(); violates the xpcom interface guidelines void preventbubble(); obsolete since gecko 24 void preventcapture(); obsolete since gecko 24 void preventdefault(); void serialize(in ipcmessageptr amsg, in boolean aserializeinterfacetype); violates the xpcom interface guidelines void
settarget(in nsidomeventtarget atarget); native code only!
... void
settrusted(in boolean atrusted); native code only!
...if the event was retargeted for some reason other than an anonymous boundary crossing, this will be
set to the target before the retargeting occurs.
...And 3 more matches
nsIEditorSpellCheck
estedword(); void ignorewordalloccurrences(in wstring word); void initspellchecker(in nsieditor editor, in boolean enableselectionchecking); void removewordfromdictionary(in wstring word); void replaceword(in wstring misspelledword, in wstring replaceword, in boolean alloccurrences); void savedefaultdictionary(); obsolete since gecko 9.0 void
setcurrentdictionary(in astring dictionary); void
setfilter(in nsitextservicesfilter filter); void uninitspellchecker(); void updatecurrentdictionary(); methods addwordtodictionary() adds the specified word to the current personal dictionary.
...
setcurrentdictionary() selects the main dictionary to use.
... void
setcurrentdictionary( in astring dictionary ); parameters dictionary the name of the dictionary to use.
...And 3 more matches
nsIHttpChannelInternal
6 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void getrequestversion(out unsigned long major, out unsigned long minor); void getresponseversion(out unsigned long major, out unsigned long minor); void httpupgrade(in acstring aprotocolname, in nsihttpupgradelistener alistener); void
setcookie(in string acookieheader); void
setupfallbackchannel(in string afallbackkey); attributes attribute type description canceled boolean returns true if and only if the channel has been canceled.
... channelisfordownload boolean external handlers may
set this to true to notify the channel that it is open on behalf of a download.
...
setcookie() helper method to
set a cookie with a consumer-provided cookie header, but using the channel's other information (uri's, prompters, date headers and so on.).
...And 3 more matches
nsIMsgMessageService
ri aurl); [noscript] void copymessages(in nsmsgkeyarrayptr keys, in nsimsgfolder srcfolder, in nsistreamlistener acopylistener, in boolean amovemessage, in nsiurllistener aurllistener, in nsimsgwindow amsgwindow, out nsiuri aurl); void displaymessage(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in string achar
setoverride, out nsiuri aurl); void openattachment(in string acontenttype, in string afilename, in string aurl, in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener); void savemessagetodisk(in string amessageuri, in nsifilespec afile, in boolean ageneratedummyenvelope, in nsiurllistener aurllistener, out nsiuri aurl, in b...
... amovemessage
set to true if you want the message to be moved.
... amovemessage
set to true if you want the message to be moved.
...And 3 more matches
nsIMsgWindow
you don't normally need to
set this, instead
set the domwindow property instead.
... notificationcallbacks nsiinterfacerequestor these are currently used to
set notification callbacks on protocol channels to handle things like bad cert exceptions.
... mailcharacter
set acstring this is used to track the character
set of the currently displayed message.
...And 3 more matches
nsIScriptableUnicodeConverter
acstring asrc); astring convertfrombytearray([const,array,size_is(acount)] in octet adata, in unsigned long acount); void converttobytearray(in astring astring,[optional] out unsigned long alen,[array, size_is(alen),retval] out octet adata); nsiinputstream converttoinputstream(in astring astring); attributes attribute type description char
set string current character
set.
... throws ns_error_uconv_noconv if the requested char
set is not supported.
... methods convertfromunicode() converts the data from unicode to one char
set.
...And 3 more matches
nsIStandardURL
to create an instance, use: var standardurl = components.classes["@mozilla.org/network/standard-url;1"] .createinstance(components.interfaces.nsistandardurl); method overview void init(in unsigned long aurltype, in long adefaultport, in autf8string aspec, in string aoriginchar
set, in nsiuri abaseuri); attributes attribute type description mutable boolean control whether or not this url can be modified.
... protocol handlers can
set this flag before handing out an url to ensure that it is not inadvertently modified.
...void init( in unsigned long aurltype, in long adefaultport, in autf8string aspec, in string aoriginchar
set, in nsiuri abaseuri ); parameters aurltype one of the constants listed above.
...And 3 more matches
nsITelemetry
isupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) implemented by: @mozilla.org/base/telemetry;1 as a service: let telemetry = components.classes["@mozilla.org/base/telemetry;1"] .getservice(components.interfaces.nsitelemetry); method overview jsval gethistogrambyid(in acstring id); jsval snapshothistograms(in uint32_t adata
set, in boolean asubsession, in boolean aclear); jsval getkeyedhistogrambyid(in acstring id); void capturestack(in acstring name); jsval snapshotcapturedstacks([optional] in boolean clear); nsisupports getloadedmodules(); jsval snapshotkeyedhistograms(in uint32_t adata
set, in boolean asubsession, in boolean aclear); void
sethistogramrecordingenab...
...led(in acstring id, in boolean enabled); void asyncfetchtelemetrydata(in nsifetchtelemetrydatacallback acallback); double mssinceprocessstart(); void scalaradd(in acstring aname, in jsval avalue); void scalar
set(in acstring aname, in jsval avalue); void scalar
setmaximum(in acstring aname, in jsval avalue); jsval snapshotscalars(in uint32_t adata
set, [optional] in boolean aclear); void keyedscalaradd(in acstring aname, in astring akey, in jsval avalue); void keyedscalar
set(in acstring aname, in astring akey, in jsval avalue); void keyedscalar
setmaximum(in acstring aname, in astring akey, in jsval avalue); jsval snapshotkeyedscalars(in uint32_t adata
set, [optional] in boolean aclear); void clear...
...scalars(); test only void flushbatchedchildtelemetry(); void recordevent(in acstring acategory, in acstring amethod, in acstring aobject, [optional] in jsval avalue, [optional] in jsval extra); void
seteventrecordingenabled(in acstring acategory, in boolean aenabled); jsval snapshotevents(in uint32_t adata
set, [optional] in boolean aclear); void registerevents(in acstring acategory, in jsval aeventdata); void registerscalars(in acstring acategoryname, in jsval ascalardata); void clearevents(); test only attributes attribute type description canrecordbase boolean a flag indicating if telemetry can record base data (fhr data).
...And 3 more matches
nsITransferable
nsisupportsarray flavorstransferablecanexport( ); nsisupportsarray flavorstransferablecanimport( ); void getanytransferdata( out string aflavor, out nsisupports adata, out unsigned long adatalen ); void gettransferdata( in string aflavor, out nsisupports adata, out unsigned long adatalen ); void init(in nsiloadcontext acontext); boolean islargedata
set( ); void removedataflavor( in string adataflavor ); void
settransferdata( in string aflavor, in nsisupports adata, in unsigned long adatalen ); attributes attribute type description converter nsiformatconverter an nsiformatconverter instance which implements the code needed to convert data into and out of the transferable given the supported...
...this can be
set to null if a load context is not available.
... islargedata
set() returns true if the data is large.
...And 3 more matches
nsIWebBrowser
the embedder must associate the two by
setting this property to point to the chrome object before creating the browser window via the browser's nsibasewindow interface.
...the embedder must explicitly
set this value back to nsnull if the chrome object is destroyed before the browser object.
...for optimal performance,
set it to false when appropriate.
...And 3 more matches
Getting Started Guide
for instance, here is a typical snippet of code (at its most compact) where you assign a xpcom interface pointer into a member variable, i.e., the body of a `
setter' function, side-by-side using raw xpcom interface pointers and nscomptrs.
...
setting a member variable.
... */ mfooptr = afooptr; additionally, the class using raw xpcom interface pointers will need a destructor to release mfooptr; and a constructor to ensure that mfooptr is initially
set to null (or some other reasonable value).
...And 3 more matches
customDBHeaders Preference
as you follow along the step-by-step guide in creating a custom column, you may want to consider a preference
setting that exposes custom header data for use in a custom column within thunderbird's main view.
...
setting the preferences although there are various ways to
set preferences, i tend to just navigate to the directory where my profile is stored and edit the user.js file with my favorite text editor.
... in addition to the preference outlined in
setting up extension development environment, you'll want to add the following preferences: // this allows you to add extra headers while composing messages user_pref("mail.compose.other.header", "x-superfluous,x-other,x-whatever"); // this enables the preservation of custom headers as incoming mail is processed user_pref( "mailnews.customdbheaders", "x-superfluous,x-other"); important: please pay careful attention to the case of the mailnews.customdbheaders preference.
...And 3 more matches
Add to iPhoto
initializing core foundation the init() method, which
sets everything up, looks like this: init: function() { this.lib = ctypes.open("/system/library/frameworks/corefoundation.framework/corefoundation"); // declaring all the apis goes here } shutting down core foundation while the core foundation system framework itself doesn't need to be shut down, we do need to close the library we opened using the js-ctypes api; that's where the shutdown() m...
... cfrange cfrange is a structure that identifies a range; that is, it identifies an off
set to an item in a list and a number of items.
...the string can be stored in any of a number of encodings, so you use assorted functions that know how to cope with different encodings to
set and get values of cfstrings, as well as to perform typical string operations.
...And 3 more matches
Working with ArrayBuffers
the following codeblock provides a basic example of getting and
setting uint8clampedarray and arraybuffer of imagedata: // context is a canvasrenderingcontext2d of some canvas var imagedata = context.getimagedata(x, y, w, h); var array = imagedata.data; // array is a uint8clampedarray var buffer = imagedata.data.buffer; // buffer is a arraybuffer // incomingbuffer is a typedarray var imagedata2 = context.createimagedata(w, h); imagedata2.data.
set(incomingbuffer...
...pixelbuffer.tostring(); // "ctypes.uint8_t.ptr(ctypes.uint64("0x352e0000"))" var imgwidth = 400; var imgheight = 400; var myimgdat = new imagedata(imgwidth, imgheight); method 1: passing arraytype cdata to uint8clampedarray.prototype.
set one method is to get into a js-ctypes array, and then
set it into the imagedata, as illustrated by the following code example.
... // cast pointer to array, to pass to uint8clampedarray.prototype.
set.
...And 3 more matches
Streams - Plugins
the plug-in can
set the output parameter type to one of these transmission modes: np_normal: (default): the plug-in can process the data progressively as it arrives from the network or file system through a series of calls to npp_writeready and npp_write.
... int32 npp_write(npp instance, npstream *stream, int32 off
set, int32 len, void *buf); the instance parameter is the current plug-in instance; the stream parameter specifies the current stream.
... the off
set parameter specifies the off
set, in bytes, of buf from the beginning of the data in the stream.
...And 3 more matches
Edit CSS filters - Firefox Developer Tools
once you have added an effect, enter the
settings you want and then press enter to update the effect.
... saving filter pre
sets from firefox 42 onwards, you can also add filters to a list of pre
sets.
... the list of pre
sets will be preserved between browser sessions, making it easy to apply the
settings in the future.
...And 3 more matches
Allocations - Firefox Developer Tools
to enable the allocations view, you must check "record allocations" in the performance tool
settings, before recording a profile.
...click this to see the places this function was called from: here you can see that signallater() was called from two places: removeinner() and
setselectioninner().
... self cost and total cost you'll see that there are separate
sets of columns for "self" and for "total".
...And 3 more matches
Style Editor - Firefox Developer Tools
you can switch autocomplete off in the style editor
settings.
... viewing original sources now, if you check "show original sources" in the style editor
settings, the links next to css rules in the rules view will link to the original sources in the style editor.
... first,
set up your preprocessor so it watches the original source and automatically regenerates the css when the source changes.
...And 3 more matches
AudioBufferSourceNode.start() - Web APIs
syntax audiobuffersourcenode.start([when][, off
set][, 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.
... off
set optional an off
set, specified as the number of seconds in the same time coordinate system as the audiocontext, to the time within the audio buffer that playback should begin.
... for example, to start playback halfway through a 10-second audio clip, off
set should be 5.
...And 3 more matches
ByteLengthQueuingStrategy - Web APIs
ingstrategy experimentalchrome full support 59edge full support 16firefox full support 57disabled full support 57disabled disabled from version 57: this feature is behind the dom.streams.enabled preference (needs to be
set to true) and the javascript.options.streams preference (needs to be
set to true).
...view android full support 59chrome android full support 59firefox android full support 57disabled full support 57disabled disabled from version 57: this feature is behind the dom.streams.enabled preference (needs to be
set to true) and the javascript.options.streams preference (needs to be
set to true).
...constructor experimentalchrome full support 59edge full support 16firefox full support 57disabled full support 57disabled disabled from version 57: this feature is behind the dom.streams.enabled preference (needs to be
set to true) and the javascript.options.streams preference (needs to be
set to true).
...And 3 more matches
Drawing shapes with canvas - Web APIs
« previousnext » now that we have
set up our canvas environment, we can get into the details of how to draw on the canvas.
... path methods methods to
set different paths for objects.
...every time this method is called, the list is re
set and we can start drawing new shapes.
...And 3 more matches
ConstantSourceNode - Web APIs
in addition, it can be used like a constructible audioparam by automating the value of its off
set 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 off
set parameter.
... properties inherits properties from its parent interface, audioscheduledsourcenode, and adds the following properties: off
set an audioparam which specifies the value that this source continuously outputs.
...And 3 more matches
CountQueuingStrategy - Web APIs
ingstrategy experimentalchrome full support 59edge full support 16firefox full support 57disabled full support 57disabled disabled from version 57: this feature is behind the dom.streams.enabled preference (needs to be
set to true) and the javascript.options.streams preference (needs to be
set to true).
...view android full support 59chrome android full support 59firefox android full support 57disabled full support 57disabled disabled from version 57: this feature is behind the dom.streams.enabled preference (needs to be
set to true) and the javascript.options.streams preference (needs to be
set to true).
...constructor experimentalchrome full support 59edge full support 16firefox full support 57disabled full support 57disabled disabled from version 57: this feature is behind the dom.streams.enabled preference (needs to be
set to true) and the javascript.options.streams preference (needs to be
set to true).
...And 3 more matches
Document.fonts - Web APIs
the fonts property of the document interface returns the fontface
set interface of the document.
... syntax let fontface
set = document.fonts; value the returned value is the fontface
set interface of the document.
... the fontface
set interface is useful for loading new fonts, checking the status of previously loaded fonts etc.
...And 3 more matches
HTMLButtonElement - Web APIs
re
set: the button re
sets the form.
...it is false if any conditions bar it from constraint validation, including: its type property is re
set or button; it has a <datalist> ancestor; or the disabled property is
set to true.
... methods inherits methods from its parent, htmlelement name return type description checkvalidity() boolean not supported for re
set or button elements.
...And 3 more matches
HTMLInputElement.stepDown() - Web APIs
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.
...the method will not cause the value to go below the min value
set or defy the constraints
set by the step attribute.
... if the value before invoking the stepdown() method is invalid, for example, if it doesn't match the constraints
set by the step attribute, invoking the stepdown() method will return a value that does match the form controls constraints.
...And 3 more matches
HTML Drag and Drop API - Web APIs
identify what is draggable making an element draggable requires adding the draggable attribute and the ondragstart global event handler, as shown in the following code sample: <script> function dragstart_handler(ev) { // add the target element's id to the data transfer object ev.datatransfer.
setdata("text/plain", ev.target.id); } window.addeventlistener('domcontentloaded', () => { // get the element by id const element = document.getelementbyid("p1"); // add the ondragstart event listener element.addeventlistener("dragstart", dragstart_handler); }); </script> <p id="p1" draggable="true">this element is draggable.</p> for more information, see: draggable attrib...
...the
setdata() method is used to add an item to the drag data, as shown in the following example.
... function dragstart_handler(ev) { // add different types of drag data ev.datatransfer.
setdata("text/plain", ev.target.innertext); ev.datatransfer.
setdata("text/html", ev.target.outerhtml); ev.datatransfer.
setdata("text/uri-list", ev.target.ownerdocument.location.href); } for a list of common data types used in drag-and-drop (such as text, html, links, and files), see recommended drag types.
...And 3 more matches
Ajax navigation example - Web APIs
first_page.php: <?php $page_title = "first page"; $as_json = false; if (is
set($_get["view_as"]) && $_get["view_as"] == "json") { $as_json = true; ob_start(); } else { ?> <!doctype html> <html> <head> <?php include "include/header.php"; echo "<title>" .
...{ echo json_encode(array("page" => $page_title, "content" => ob_get_clean())); } else { ?> </div> <p>this paragraph is shown only when the navigation starts from <strong>first_page.php</strong>.</p> <?php include "include/after_content.php"; echo "</body>\n</html>"; } ?> second_page.php: <?php $page_title = "second page"; $as_json = false; if (is
set($_get["view_as"]) && $_get["view_as"] == "json") { $as_json = true; ob_start(); } else { ?> <!doctype html> <html> <head> <?php include "include/header.php"; echo "<title>" .
...this content is stored into a php variable.</p>"; if (is
set($_get["view_as"]) && $_get["view_as"] == "json") { echo json_encode(array("page" => $page_title, "content" => $page_content)); } else { ?> <!doctype html> <html> <head> <?php include "include/header.php"; echo "<title>" .
...And 3 more matches
MediaSource - Web APIs
mediasource.activesourcebuffers read only returns a sourcebufferlist object containing a sub
set of the sourcebuffer objects contained within mediasource.sourcebuffers — the list of objects providing the selected video track, enabled audio tracks, and shown/hidden text tracks.
... mediasource.readystate read only returns an enum representing the state of the current mediasource, whether it is not currently attached to a media element (closed), attached and ready to receive sourcebuffer objects (open), or attached but the stream has been ended via mediasource.endofstream() (ended.) mediasource.duration gets and
sets the duration of the current media being presented.
... mediasource.clearliveseekablerange() clears a seekable range previously
set with a call to
setliveseekablerange().
...And 3 more matches
MediaTrackConstraints - Web APIs
the mediatrackconstraints dictionary is used to describe a
set of capabilities and the value or values each can take on.
... a constraints dictionary is passed into applyconstraints() to allow a script to establish a
set of exact (required) values or ranges and/or preferred values or ranges of values for the track, and the most recently-requested
set of custom constraints can be retrieved by calling getconstraints().
... to learn more about how constraints work, see capabilities, constraints, and
settings.
...And 3 more matches
MutationObserverInit - Web APIs
subtree optional
set to true to extend monitoring to the entire subtree of nodes rooted at target.
... childlist optional
set to true to monitor the target node (and, if subtree is true, its descendants) for the addition of new child nodes or removal of existing child nodes.
... attributes optional
set to true to watch for changes to the value of attributes on the node or nodes being monitored.
...And 3 more matches
Node - Web APIs
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 node.nodevalue returns /
sets the value of the current node.
... node.textcontent returns /
sets the textual content of an element and all its descendants.
... node.
setuserdata() allows a user to attach, or remove, domuserdata to the node.
...And 3 more matches
Using the Notifications API - Web APIs
">enable notifications</button> clicking this calls the asknotificationpermission() function: function asknotificationpermission() { // function to actually ask the permissions function handlepermission(permission) { // whatever the user answers, we make sure chrome stores the information if(!('permission' in notification)) { notification.permission = permission; } //
set the button to shown or hidden, depending on what the user answers if(notification.permission === 'denied' || notification.permission === 'default') { notificationbtn.style.display = 'block'; } else { notificationbtn.style.display = 'none'; } } // let's check if the browser supports notifications if (!('notification' in window)) { console.log("this browser does n...
...inside here we explicitly
set the notification.permission value (some old versions of chrome failed to do this automatically), and show or hide the button depending on what the user chose in the permission dialog.
...old versions of chrome didn't remove notifications automatically so you can do so after a
settimeout() only for those legacy versions in order to not remove notifications from notification trays on other browsers.
...And 3 more matches
PannerNode.coneInnerAngle - Web APIs
the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are off
set by the same amount in radians.
...it's more useful to off
set the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation.
...rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and off
set the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e.
...And 3 more matches
PannerNode.coneOuterAngle - Web APIs
the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are off
set by the same amount in radians.
...it's more useful to off
set the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation.
...rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and off
set the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e.
...And 3 more matches
PannerNode.coneOuterGain - Web APIs
the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are off
set by the same amount in radians.
...it's more useful to off
set the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation.
...rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and off
set the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e.
...And 3 more matches
PannerNode.orientationX - Web APIs
the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are off
set by the same amount in radians.
...it's more useful to off
set the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation.
...rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and off
set the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e.
...And 3 more matches
PannerNode.orientationY - Web APIs
the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are off
set by the same amount in radians.
...it's more useful to off
set the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation.
...rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and off
set the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e.
...And 3 more matches
PannerNode.orientationZ - Web APIs
the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are off
set by the same amount in radians.
...it's more useful to off
set the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation.
...rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and off
set the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e.
...And 3 more matches
Multi-touch interaction - Web APIs
the pointer is a hardware-agnostic device that can target a specific
set of screen coordinates.
... function
set_handlers(name) { // install event handlers for the given element var el=document.getelementbyid(name); el.onpointerdown = pointerdown_handler; el.onpointermove = pointermove_handler; // use same handler for pointer{up,cancel,out,leave} events since // the semantics for these events - in this app - are the same.
... el.onpointerup = pointerup_handler; el.onpointercancel = pointerup_handler; el.onpointerout = pointerup_handler; el.onpointerleave = pointerup_handler; } function init() {
set_handlers("target1");
set_handlers("target2");
set_handlers("target3"); } pointer down the pointerdown event is fired when a pointer (mouse, pen/stylus or touch point on a touchscreen) makes contact with the contact surface.
...And 3 more matches
RTCConfiguration - Web APIs
it may be passed into the constructor when instantiating a connection, or used with the rtcpeerconnection.getconfiguration() and rtcpeerconnection.
setconfiguration() methods, which allow inspecting and changing the configuration while a connection is established.
... the options include ice server and transport
settings and identity information.
...if this property isn't specified, a
set of certificates is generated automatically for each rtcpeerconnection instance.
...And 3 more matches
RTCPeerConnection.signalingState - Web APIs
for example, if you receive an answer while the signalingstate isn't "have-local-offer", you know that something is wrong, since you should only receive answers after creating an offer but before an answer has been received and passed into rtcpeerconnection.
setlocaldescription().
... "have-local-offer" the local peer has called rtcpeerconnection.
setlocaldescription(), passing in sdp representing an offer (usually created by calling rtcpeerconnection.createoffer()), and the offer has been applied successfully.
... "have-remote-offer" the remote peer has created an offer and used the signaling server to deliver it to the local peer, which has
set the offer as the remote description by calling rtcpeerconnection.
setremotedescription().
...And 3 more matches
RTCRtpSendParameters.encodings - Web APIs
the rtcrtpsendparameters dictionary's encodings property is an rtcrtpencodingparameters object providing configuration
settings for the encoder being used for the rtcrtpsender's track.
... syntax sendparameters.encodings = encodingparameterlist; encodingparameterlist = sendparameters.encodings; value an array of objects conforming to the rtcrtpencodingparameters dictionary, each of which contains properties which provide
settings and parameters that describe and configure a single codec that could be used to encode the track.
...this value can only be
set when creating the transceiver; after that, this value is read only.
...And 3 more matches
Selection API - Web APIs
yeschrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yesanchoroff
set experimentalchrome full support 1edge full support 12firefox full support yesie ?
... yeschrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yescollap
setoend experimentalchrome full support yesedge full support 12firefox full support yesie ?
... yeschrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yescollap
setostart experimentalchrome full support yesedge full support 12firefox full support yesie ?
...And 3 more matches
SourceBuffer.mode - Web APIs
the mode value is initially
set when the sourcebuffer is created using mediasource.addsourcebuffer().
... if timestamps already exist for the media segments, then the value will be
set to segments; if they don't, then the value will be
set to sequence.
... if you try to
set the mode property value to segments when the initial value is sequence, an exception will be thrown.
...And 3 more matches
SpeechRecognition - Web APIs
speechrecognition.grammars returns and
sets a collection of speechgrammar objects that represent the grammars that will be understood by the current speechrecognition.
... speechrecognition.lang returns and
sets the language of the current speechrecognition.
... if not specified, this defaults to the html lang attribute value, or the user agent's language
setting if that isn't
set either.
...And 3 more matches
Text.splitText() - Web APIs
the text.splittext() method breaks the text node into two nodes at the specified off
set, keeping both nodes in the tree as siblings.
... after the split, the current node contains all the content up to the specified off
set point, and a newly created node of the same type contains the remaining text.
...if the off
set is equal to the length of the original node, the newly created node has no data.
...And 3 more matches
Visual Viewport API - Web APIs
for example, what if you need a
set of image controls to remain on screen regardless of the pinch zoom level of the device?
...the object includes a
set of properties describing the viewport.
...when called it queries the off
setleft and height properties for values it uses in a css translate() method.
...And 3 more matches
Adding 2D content to a WebGL context - Web APIs
together, a
set of vertex and fragment shaders is called a shader program.
...that position is then multiplied by two 4x4 matrices we provide called uprojectionmatrix and umodelviewmatrix; gl_position is
set to the result.
... mat4.perspective(projectionmatrix, fieldofview, aspect, znear, zfar); //
set the drawing position to the "identity" point, which is // the center of the scene.
...And 3 more matches
WebGL best practices - Web APIs
set up your hot framebuffers ahead of time.
... in firefox,
setting the pref webgl.perf.max-warnings to -1 in about:config will enable performance warnings that include warnings about fb completeness invalidations.
...l 2 is analogous to the approach in opengl: https://jdashg.github.io/misc/async-gpu-downloads.html function clientwaitasync(gl, sync, flags, interval_ms) { return new promise((resolve, reject) => { function test() { const res = gl.clientwaitsync(sync, flags, 0); if (res == gl.wait_failed) { reject(); return; } if (res == gl.timeout_expired) {
settimeout(test, interval_ms); return; } resolve(); } test()); }); } async function getbuffersubdataasync( gl, target, buffer, srcbyteoff
set, dstbuffer, /* optional */ dstoff
set, /* optional */ length) { const sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.flush(); await clientwaitasync(gl, sync, 0, 10); gl.deletesync(sync); gl.bindbuffer(...
...And 3 more matches
Writing WebSocket servers - Web APIs
in many common
setups, a reverse proxy has already dealt with them.
...after the handshake succeeds, you have to use a different
set of codes (defined in section 7.4 of the spec).
... note: the server can send other headers like
set-cookie, or ask for authentication or redirects via other status codes, before sending the reply handshake.
...And 3 more matches
Window.devicePixelRatio - Web APIs
html <canvas id="canvas"></canvas> javascript var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); //
set display size (css pixels).
... var size = 200; canvas.style.width = size + "px"; canvas.style.height = size + "px"; //
set actual size in memory (scaled to account for extra pixel density).
...ctx.scale(scale, scale); ctx.fillstyle = "#bada55"; ctx.fillrect(10, 10, 300, 300); ctx.fillstyle = "#ffffff"; ctx.font = '18px arial'; ctx.textalign = 'center'; ctx.textbaseline = 'middle'; var x = size / 2; var y = size / 2; var textstring = "i love mdn"; ctx.filltext(textstring, x, y); monitoring screen resolution or zoom level changes in this example, we'll
set up a media query and watch it to see when the device resolution changes, so that we can check the value of devicepixelratio to handle any updates we need to.
...And 3 more matches
Privileged features - Web APIs
minimizable this
setting can only apply to dialog windows; minimizable requires dialog=yes.
...if
set to no or 0, this feature removes the titlebar from the new secondary window.
... mozilla and firefox users can force new windows to always render the titlebar by
setting dom.disable_window_open_feature.titlebar to true in about:config or in their user.js file.
...And 3 more matches
Window: popstate event - Web APIs
if the goal is to catch the moment when the new document state is already fully in place, a zero-delay
settimeout() method call should be used to effectively put its inner callback function that does the processing at the end of the browser event loop: window.onpopstate = () =>
settimeout(dosomething, 0); when popstate is sent when the transition occurs, either due to the user triggering the browser's "back" button or otherwise, the popstate event is near the end of the process to transition to the...
... if current-entry's title wasn't
set using one of the history api methods (pushstate() or replacestate(),
set the entry's title to the string returned by its document.title attribute.
... each form control within new-entry's document that has autocomplete configured with its autofill field name
set to off is re
set.
...And 3 more matches
Window.scrollY - Web APIs
example // make sure and go down to the second page if (window.scrolly) { window.scroll(0, 0); // re
set the scroll position to the top left of the document.
... the pageyoff
set property is an alias for the scrolly property: window.pageyoff
set === window.scrolly; // always true for cross-browser compatibility, use window.pageyoff
set instead of window.scrolly.
...a fully compatible example: var supportpageoff
set = window.pagexoff
set !== undefined; var iscss1compat = ((document.compatmode || "") === "css1compat"); var x = supportpageoff
set ?
...And 3 more matches
XMLHttpRequest.response - Web APIs
the xmlhttprequest response property returns the response's body content as an arraybuffer, blob, document, javascript object, or domstring, depending on the value of the request's respon
setype property.
... syntax var body = xmlhttprequest.response; value an appropriate object based on the value of respon
setype.
... you may attempt to request the data be provided in a specific format by
setting the value of respon
setype after calling open() to initialize the request but before calling send() to send the request to the server.
...And 3 more matches
XSLTProcessor - Web APIs
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.
setparameter(string namespaceuri, string localname, any value)
sets a parameter in the xslt stylesheet that was imported.
... (
sets the value of an <xsl:param>.) a null value for namespaceuri is treated the same as an empty string.
... [throws] void xsltprocessor.removeparameter(string namespaceuri, string localname) removes the parameter if it was previously
set.
...And 3 more matches
Web APIs
ource eventtarget extendableevent extendablemessageevent f featurepolicy federatedcredential fetchevent file fileentrysync fileerror fileexception filelist filereader filereadersync filerequest filesystem filesystemdirectoryentry filesystemdirectoryreader filesystementry filesystementrysync filesystemfileentry filesystemflags filesystemsync focusevent fontface fontface
set fontface
setloadevent formdata formdataentryvalue formdataevent fullscreenoptions g gainnode gamepad gamepadbutton gamepadevent gamepadhapticactuator geolocation geolocationcoordinates geolocationposition geolocationpositionerror geometryutils gestureevent globaleventhandlers gyroscope h htmlanchorelement htmlareaelement htmlaudioelement htmlbrelement htmlbaseelement htmlbasefontelem...
...ent htmlbodyelement htmlbuttonelement htmlcanvaselement htmlcollection htmlcontentelement htmldlistelement htmldataelement htmldatalistelement htmldetailselement htmldialogelement htmldivelement htmldocument htmlelement htmlembedelement htmlfield
setelement htmlfontelement htmlformcontrolscollection htmlformelement htmlframe
setelement htmlhrelement htmlheadelement htmlheadingelement htmlhtmlelement htmlhyperlinkelementutils htmliframeelement htmlimageelement htmlinputelement htmlisindexelement htmlkeygenelement htmllielement htmllabelelement htmllegendelement htmllinkelement htmlmapelement htmlmarqueeelement htmlmediaelement htmlmenuelement htmlmenuitemelement htmlmetaelement htmlmeterelement htmlmodelement htmlolistelement htmlobjectelement htmloptgroupelement htmloptionel...
...deviceinfo mediadevices mediaelementaudiosourcenode mediaencodingconfiguration mediaerror mediaimage mediakeymessageevent mediakeysession mediakeystatusmap mediakeysystemaccess mediakeysystemconfiguration mediakeys medialist mediametadata mediapositionstate mediaquerylist mediaquerylistevent mediaquerylistlistener mediarecorder mediarecordererrorevent mediasession mediasessionactiondetails media
settingsrange mediasource mediastream mediastreamaudiodestinationnode mediastreamaudiosourcenode mediastreamaudiosourceoptions mediastreamconstraints mediastreamevent mediastreamtrack mediastreamtrackaudiosourcenode mediastreamtrackaudiosourceoptions mediastreamtrackevent mediatrackconstraints mediatrack
settings mediatracksupportedconstraints merchantvalidationevent messagechannel messageevent ...
...And 3 more matches
ARIA: application role - Accessibility
in addition, a
set of so-called quick navigation keys has been established over the years that allows blind users to skim through a page via a certain element type.
...to be able to interact with a web page, a standard
set of widgets is recognized that, when pressing a certain key (usually the enter key) this mode is switched off.
... the application role is designed to provide a means for widgets that are not part of the standard
set to be accessible for direct interaction in ats that use both browse and focus modes for interacting with web content.
...And 3 more matches
ARIA: article role - Accessibility
it is usually
set on related content items such as comments, forum posts, newspaper articles or other items grouped together on one page.
...the aim of a
set of article sections is to indicate their relationship to one another.
... if an article is part of a feed, it can have the aria-posin
set and aria-
setsize attributes
set to indicate which position within the feed this particular article represents.
...And 3 more matches
ARIA: table role - Accessibility
within that container, each row has role="row"
set and contains child cells.
...the aria-colindex or aria-rowindex is
set to the position of a cell within the row or column, respectively.
...
set the value to the total number of columns in the full table.
...And 3 more matches
Web applications and ARIA FAQ - Accessibility
var progressbar = document.getelementbyid("percent-loaded"); //
set its aria roles and states, so that assistive technologies know what kind of widget it is.
... progressbar.
setattribute("role", "progressbar"); progressbar.
setattribute("aria-valuemin", 0); progressbar.
setattribute("aria-valuemax", 100); // create a function that can be called at any time to update the value of the progress bar.
... function updateprogress(percentcomplete) { progressbar.
setattribute("aria-valuenow", percentcomplete); } will adding aria change my page styles or behavior?
...And 3 more matches
Understandable - Accessibility
the simplest way to achieve this is to
set the lang attribute on the page's <html> element, giving it a value equal to the language code that best represents the language the page is written in.
... see
setting the primary language of the document.
...a <span> if no semantic element is available) to
set an appropriate language for it.
...And 3 more matches
Using multi-column layouts - CSS: Cascading Style Sheets
the column-count property
sets the number of columns to a particular number.
... </p> </div> css #col { column-count: 2; } result will display the content in two columns (if you're using a multi-column compliant browser): the column-width property
sets the minimum desired column width.
... if column-count is not also
set, then the browser will automatically make as many columns as fit in the available width.
...And 3 more matches
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
this means that if you have a
set of flex items that are too wide for their container, they will overflow it.
...if flex-direction is
set to row-reverse then the items will start from the end edge of the container and lay themselves out in reverse ordered lines.
... here i have
set flex-grow and flex-shrink to 0 to make inflexible flex items and am then controlling flexibility using percentages, just like we used to do in float layouts.
...And 3 more matches
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
you can see auto-placement in action in the simplest of ways by creating a grid on a
set of items.
...in this next example i have added to the layout by
setting odd items to span two tracks both for rows and columns.
... i do this with the grid-column-end and grid-row-end properties and
setting the value of this to span 2.
...And 3 more matches
Introducing the CSS Cascade - CSS: Cascading Style Sheets
finally, note that @import and @char
set obey specific algorithms and aren't affected by the cascade algorithm.
...although some constraints on user-agent stylesheets are
set by the html specification, browsers still have a lot of latitude: that means that significant differences exist from one browser to another.
... to simplify the development process, web developers often use a css re
set style sheet, forcing common properties values to a known state before beginning to make alterations to suit their specific needs.
...And 3 more matches
clip-path - CSS: Cascading Style Sheets
the clip-path css property creates a clipping region that
sets what part of an element should be shown.
... syntax /* keyword values */ clip-path: none; /* <clip-source> values */ clip-path: url(resources.svg#c1); /* <geometry-box> values */ clip-path: margin-box; clip-path: border-box; clip-path: padding-box; clip-path: content-box; clip-path: fill-box; clip-path: stroke-box; clip-path: view-box; /* <basic-shape> values */ clip-path: in
set(100px 50px); clip-path: circle(50px at 0 100px); clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); clip-path: path('m0.5,1 c0.5,1,0,0.7,0,0.3 a0.25,0.25,1,1,1,0.5,0.3 a0.25,0.25,1,1,1,1,0.3 c1,0.7,0.5,1,0.5,1 z'); /* box and shape values combined */ clip-path: padding-box circle(50px at 0 100px); /* global values */ clip-path: inherit; clip-path: initial; clip-path: un
set; the clip-path...
...if a viewbox attribute is specified for the element creating the svg viewport, the reference box is positioned at the origin of the coordinate system established by the viewbox attribute and the dimension of the size of the reference box is
set to the width and height values of the viewbox attribute.
...And 3 more matches
column-rule - CSS: Cascading Style Sheets
the column-rule shorthand css property
sets the width, style, and color of the line drawn between columns in a multi-column layout.
... it is a shorthand property that
sets the individual column-rule-* properties in a single, convenient declaration: column-rule-width, column-rule-style, and column-rule-color.
... note: as with all shorthand properties, any individual value that is not specified is
set to its corresponding initial value (possibly overriding values previously
set using non-shorthand properties).
...And 3 more matches
env() - CSS: Cascading Style Sheets
to tell the browser to use the whole available space on the screen, and so enabling us to use the env() variables, we need to add a new viewport meta value: <meta name="viewport" content="viewport-fit=cover" /> body { padding: env(safe-area-in
set-top, 20px) env(safe-area-in
set-right, 20px) env(safe-area-in
set-bottom, 20px) env(safe-area-in
set-left, 20px); } in addition, unlike custom properties, which cannot be used outside of declarations, the env() function can be used in place of any part of a property value, or any part of a descriptor (e.g.
... originally provided by the ios browser to allow developers to place their content in a safe area of the viewport, the safe-area-in
set-* values defined in the specification can be used to help ensure content is visible even to viewers using non‑rectangular displays.
... syntax /* using the four safe area in
set values with no fallback values */ env(safe-area-in
set-top); env(safe-area-in
set-right); env(safe-area-in
set-bottom); env(safe-area-in
set-left); /* using them with fallback values */ env(safe-area-in
set-top, 20px); env(safe-area-in
set-right, 1em); env(safe-area-in
set-bottom, 0.5vh); env(safe-area-in
set-left, 1.4rem); values safe-area-in
set-top, safe-area-in
set-right, safe-area-in
set-bottom, safe-area-in
set-left the safe-area-in
set-* variables are four environment variables that define a rectangle by its top, right, bottom, and left in
sets from the edge of the viewport, which is safe to put content into without risking it being cut off by the shape of a non‑rectangular display.
...And 3 more matches
drop-shadow() - CSS: Cascading Style Sheets
a drop shadow is effectively a blurred, off
set version of the input image's alpha mask, drawn in a specific color and composited below the image.
... syntax drop-shadow(off
set-x off
set-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 in
set keyword and spread parameters are not allowed.
... parameters off
set-x off
set-y (required) two <length> values that determine the shadow off
set.
...And 3 more matches
line-height - CSS: Cascading Style Sheets
the line-height css property
sets the height of a line box.
... it's commonly used to
set the distance between lines of text.
... syntax /* keyword value */ line-height: normal; /* unitless values: use this number multiplied by the element's font size */ line-height: 3.5; /* <length> values */ line-height: 3em; /* <percentage> values */ line-height: 34%; /* global values */ line-height: inherit; line-height: initial; line-height: un
set; the line-height property is specified as any one of the following: a <number> a <length> a <percentage> the keyword normal.
...And 3 more matches
mask-image - CSS: Cascading Style Sheets
the mask-image css property
sets the image that is used as mask layer for an element.
... mask-image: none; /* <mask-source> value */ mask-image: url(masks.svg#mask1); /* <image> values */ mask-image: linear-gradient(rgba(0, 0, 0, 1.0), transparent); mask-image: image(url(mask.png), skyblue); /* multiple values */ mask-image: image(url(mask.png), skyblue), linear-gradient(rgba(0, 0, 0, 1.0), transparent); /* global values */ mask-image: inherit; mask-image: initial; mask-image: un
set; syntax values none this keyword is interpreted as a transparent black image layer.
... formal definition initial valuenoneapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specified, but with <url> values made absoluteanimation typediscrete formal syntax <mask-reference>#where <mask-reference> = none | <image> | <mask-source>where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient><mask-source> = <url>where <image()> = image( <image-tags>?
...And 3 more matches
mask-position - CSS: Cascading Style Sheets
the mask-position css property
sets the initial position, relative to the mask position layer
set by mask-origin, for each defined mask image.
... /* keyword values */ mask-position: top; mask-position: bottom; mask-position: left; mask-position: right; mask-position: center; /* <position> values */ mask-position: 25% 75%; mask-position: 0px 0px; mask-position: 10% 8em; /* multiple values */ mask-position: top right; mask-position: 1rem 1rem, center; /* global values */ mask-position: inherit; mask-position: initial; mask-position: un
set; syntax one or more <position> values, separated by commas.
...relative or absolute off
sets can be given.
...And 3 more matches
max-block-size - CSS: Cascading Style Sheets
this is useful because the max-width is always used for horizontal sizes and max-height is always used for vertical sizes, and if you need to
set lengths based on the size of your text content, you need to be able to do so with the writing direction in mind.
... any time you would normally use max-height or max-width, you should instead use max-block-size to
set the maximum "height" of the content (even though this may not be a vertical value) and max-inline-size to
set the maximum "width" of the content (although this may instead be vertical rather than horizontal).
... syntax /* <length> values */ max-block-size: 300px; max-block-size: 25em; /* <percentage> values */ max-block-size: 75%; /* keyword values */ max-block-size: auto; max-block-size: max-content; max-block-size: min-content; max-block-size: fit-content(20em); /* global values */ max-block-size: inherit; max-block-size: initial; max-block-size: un
set; values the max-block-size property's value can be any value that's legal for the max-width and max-height properties: <length> defines the max-width as an absolute value.
...And 3 more matches
overscroll-behavior-block - CSS: Cascading Style Sheets
the overscroll-behavior-block css property
sets the browser's behavior when the block direction boundary of a scrolling area is reached.
... /* keyword values */ overscroll-behavior-block: auto; /* default */ overscroll-behavior-block: contain; overscroll-behavior-block: none; /* global values */ overscroll-behavior-block: inherit; overscroll-behavior-block: initial; overscroll-behavior-block: un
set; syntax the overscroll-behavior-block property is specified as a keyword chosen from the list of values below.
... contain default scroll overflow behavior is observed inside the element this value is
set on (e.g.
...And 3 more matches
overscroll-behavior-inline - CSS: Cascading Style Sheets
the overscroll-behavior-inline css property
sets the browser's behavior when the inline direction boundary of a scrolling area is reached.
... /* keyword values */ overscroll-behavior-inline: auto; /* default */ overscroll-behavior-inline: contain; overscroll-behavior-inline: none; /* global values */ overscroll-behavior-inline: inherit; overscroll-behavior-inline: initial; overscroll-behavior-inline: un
set; syntax the overscroll-behavior-inline property is specified as a keyword chosen from the list of values below.
... contain default scroll overflow behavior is observed inside the element this value is
set on (e.g.
...And 3 more matches
overscroll-behavior-x - CSS: Cascading Style Sheets
the overscroll-behavior-x css property
sets the browser's behavior when the horizontal boundary of a scrolling area is reached.
... /* keyword values */ overscroll-behavior-x: auto; /* default */ overscroll-behavior-x: contain; overscroll-behavior-x: none; /* global values */ overscroll-behavior-x: inherit; overscroll-behavior-x: initial; overscroll-behavior-x: un
set; syntax the overscroll-behavior-x property is specified as a keyword chosen from the list of values below.
... contain default scroll overflow behavior is observed inside the element this value is
set on (e.g.
...And 3 more matches
scroll-margin-inline - CSS: Cascading Style Sheets
the scroll-margin-inline shorthand property
sets the scroll margins of an element in the inline dimension.
... constituent properties this property is a shorthand for the following css properties: scroll-margin-inline-end scroll-margin-inline-start syntax /* <length> values */ scroll-margin-inline: 10px; scroll-margin-inline: 1em .5em ; /* global values */ scroll-margin-inline: inherit; scroll-margin-inline: initial; scroll-margin-inline: un
set; values <length> an out
set from the corresponding edge of the scroll container.
... description the scroll-margin values represent out
sets defining the scroll snap area that is used for snapping this box to the snapport.
...And 3 more matches
scroll-margin - CSS: Cascading Style Sheets
the scroll-margin shorthand property
sets all of the scroll margins of an element at once, assigning values much like the margin property does for margins of an element.
... constituent properties this property is a shorthand for the following css properties: scroll-margin-bottom scroll-margin-left scroll-margin-right scroll-margin-top syntax /* <length> values */ scroll-margin: 10px; scroll-margin: 1em .5em 1em 1em; /* global values */ scroll-margin: inherit; scroll-margin: initial; scroll-margin: un
set; values <length> an out
set from the corresponding edge of the scroll container.
... thus, the scroll-margin values represent out
sets defining the scroll snap area that is used for snapping this box to the snapport.
...And 3 more matches
transition-duration - CSS: Cascading Style Sheets
the transition-duration css property
sets the length of time a transition animation should take to complete.
... syntax /* <time> values */ transition-duration: 6s; transition-duration: 120ms; transition-duration: 1s, 15s; transition-duration: 10s, 30s, 230ms; /* global values */ transition-duration: inherit; transition-duration: initial; transition-duration: un
set; values <time> is a <time> denoting the amount of time the transition from the old value of a property to the new value should take.
...eight background-color font-size left top transform -webkit-transformv color; transition-duration:0.5s; transition-timing-function: ease-in-out; } function updatetransition() { var el = document.queryselector("div.box"); if (el) { el.classname = "box1"; } else { el = document.queryselector("div.box1"); el.classname = "box"; } return el; } var intervalid = window.
setinterval(updatetransition, 7000); transition-duration: 1s <div class="parent"> <div class="box">lorem</div> </div> .parent { width: 250px; height:125px;} .box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; -webkit-transition-property: width height background-color font-size left top -web...
...And 3 more matches
EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes exslt is a
set of extensions to xslt.
...sted below: common (exsl)the exslt common package provides basic functions that expand upon the capabilities of xslt.math (math)the exslt math package provides functions for working with numeric values and comparing nodes.regular expressions (regexp)the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascript style regular expressions.
sets (
set)the exslt
sets package offers functions that let you perform
set manipulation.strings (str)the exslt strings package provides functions that allow the manipulation of strings.
... functions exsl:node-
set() exsl:object-type() math the exslt math package provides functions for working with numeric values and comparing nodes.
...And 3 more matches
Event reference
form events event name fired when re
set the re
set button is pressed submit the submit button is pressed printing events event name fired when beforeprint the print dialog is opened afterprint the print dialog is closed text composition events event name fired when compositionstart the composition of a passage of text is prepared (...
... timeout progression is terminated due to pre
set time expiring.
... re
set event dom l2, html5 a form is re
set.
...And 3 more matches
Content categories - Developer guides
main content categories metadata content elements belonging to the metadata content category modify the presentation or the behavior of the rest of the document,
set up links to other documents, or convey other out of band information.
...they are: <a>, <abbr>, <address>, <article>, <aside>, <audio>, <b>,<bdo>, <bdi>, <blockquote>, <br>, <button>, <canvas>, <cite>, <code>, <command>, <data>, <datalist>, <del>, <details>, <dfn>, <div>, <dl>, <em>, <embed>, <field
set>, <figure>, <footer>, <form>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <header>, <hgroup>, <hr>, <i>, <iframe>, <img>, <input>, <ins>, <kbd>, <keygen>, <label>, <main>, <map>, <mark>, <math>, <menu>, <meter>, <nav>, <noscript>, <object>, <ol>, <output>, <p>, <picture>, <pre>, <progress>, <q>, <ruby>, <s>, <samp>, <script>, <section>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <svg>, <table>, ...
... <button> <field
set> <input> <keygen> <label> <meter> <object> <output> <progress> <select> <textarea> this category contains several sub-categories: listed elements that are listed in the form.elements and field
set.elements idl collections.
...And 3 more matches
HTML attribute: crossorigin - HTML: Hypertext Markup Language
depending on the element, the attribute can be a cors
settings attribute.
... the crossorigin content attribute on media elements is a cors
settings attribute.
... these attributes are enumerated, and have the following possible values: keyword description anonymous cors requests for this element will have the credentials flag
set to 'same-origin'.
...And 3 more matches
HTML attribute: rel - HTML: Hypertext Markup Language
the type of relationships is given by the value of the rel attribute, which, if present, must have a value that is an unordered
set of unique space-separated keywords, which are listed in the following table.
... not allowed link not allowed the rel attribute is relevant to the <link>, <a>, <area>, and <form> elements, but some values only relevant to a sub
set of those elements.
... modulepreload useful for improved performance, and relevant to the <link> anywhere in the document,
setting rel="modulepreload" tells the browser to preemptively fetch the script (and dependencies) and store it in the document's module map for later evaluation.
...And 3 more matches
<colgroup> - HTML: Hypertext Markup Language
possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textual content so that the content is justified in the cell char, aligning the textual content on a special character with a minimal off
set, defined by the char and charoff attributes.
... if this attribute is not
set, the left value is assumed.
... note: do not try to
set the text-align property on a selector giving a <colgroup> element.
...And 3 more matches
Link types - HTML: Hypertext Markup Language
if the type is
set to application/rss+xml or application/atom+xml, the link defines a syndication feed.
... otherwise, the link defines an alternative page, of one of these types: for another medium, like a handheld device (if the media attribute is
set) in another language (if the hreflang attribute is
set), in another format, such as a pdf (if the type attribute is
set) a combination of these <a>, <area>, <link> <form> archives defines a hyperlink to a document that contains an archive link to this one.
... <a>, <area>, <form> <link> noopener instructs the browser to open the link without granting the new browsing context access to the document that opened it — by not
setting the window.opener property on the opened window (it returns null).
...And 3 more matches
Preloading content with rel="preload" - HTML: Hypertext Markup Language
a simple example might look like this (see our js and css example source, and also live): <head> <meta char
set="utf-8"> <title>js and css preload example</title> <link rel="preload" href="style.css" as="style"> <link rel="preload" href="main.js" as="script"> <link rel="stylesheet" href="style.css"> </head> <body> <h1>bouncing balls</h1> <canvas></canvas> <script src="main.js" defer></script> </body> here we preload our css and javascript files so they will be available as soon as they a...
...
set the correct accept request headers for it.
... you can see an example of this in our video example (see the full source code, and also the live version): <head> <meta char
set="utf-8"> <title>video preload example</title> <link rel="preload" href="sintel-short.mp4" as="video" type="video/mp4"> <link rel="preload" href="sintel-short.webm" as="video" type="video/webm"> </head> <body> <video controls> <source src="sintel-short.mp4" type="video/mp4"> <source src="sintel-short.webm" type="video/webm"> <p>your browser doesn't support html5 video.
...And 3 more matches
Reason: CORS header 'Access-Control-Allow-Origin' missing - HTTP
if the server is under your control, add the origin of the requesting site to the
set of domains permitted access by adding it to the access-control-allow-origin header's value.
...private apis should never use *, and should instead have a specific domain or domains
set.
... in addition, the wildcard only works for requests made with the crossorigin attribute
set to anonymous, and it prevents sending credentials like cookies in requests.
...And 3 more matches
Proxy Auto-Configuration (PAC) file - HTTP
in chrome (versions 52 to 73), you can disable this by
setting pachttpsurlstrippingenabled to false in policy or by launching with the --unsafe-pac-url command-line flag (in chrome 74, only the flag works, and from 75 onward, there is no way to disable path-stripping; as of chrome 81, path-stripping does not apply to http urls, but there is interest in changing this behavior to match https); in firefox, the preference is network.proxy.autoconfig_url.incl...
...ed proxy should be used socks host:port the specified socks server should be used recent versions of firefox support as well: http host:port the specified proxy should be used https host:port the specified https proxy should be used socks4 host:port socks5 host:port the specified socks server (with the specified sock version) should be used if there are multiple semicolon-separated
settings, the left-most
setting will be used, until firefox fails to establish the connection to the proxy.
... the auto-config file should be saved to a file with a .pac filename extension: proxy.pac and the mime type should be
set to: application/x-ns-proxy-autoconfig next, you should configure your server to map the .pac filename extension to the mime type.
...And 3 more matches
HTTP Public Key Pinning (HPKP) - HTTP
extracting the base64 encoded public key information note: while the example below shows how to
set a pin on a server certificate, it is recommended to place the pin on the intermediate certificate of the ca that issued the server certificate, to ease certificates renewals and rotations.
...
setting up your webserver to include the hpkp header the concrete steps necessary to deliver the hpkp header depend on the web server you use.
...it is advised to verify that this
setup will work for your server.
...And 3 more matches
Concurrency model and the event loop - JavaScript
the function
settimeout is called with 2 arguments: a message to add to the queue, and a time value (optional; defaults to 0).
...however, if there are messages, the
settimeout message will have to wait for other messages to be processed.
... here is an example that demonstrates this concept (
settimeout does not run immediately after its timer expires): const s = new date().getseconds();
settimeout(function() { // prints out "2", meaning that the callback is not called immediately after 500 milliseconds.
...And 3 more matches
Groups and ranges - JavaScript
[xyz] [a-c] a character
set.
...you can specify a range of characters by using a hyphen, but if the hyphen appears as the first or last character enclosed in the square brackets it is taken as a literal hyphen to be included in the character
set as a normal character.
... it is also possible to include a character class in a character
set.
...And 3 more matches
InternalError: too much recursion - JavaScript
function loop(x) { if (x >= 10) // "x >= 10" is the exit condition return; // do stuff loop(x + 1); // the recursive call } loop(0);
setting this condition to an extremely high value, won't work: function loop(x) { if (x >= 1000000000000) return; // do stuff loop(x + 1); } loop(0); // internalerror: too much recursion this recursive function is missing a base case.
... function loop(x) { // the base case is missing loop(x + 1); // recursive call } loop(0); // internalerror: too much recursion class error: too much recursion class person{ constructor(){}
set name(name){ this.name = name; // recursive call } } const tony = new person(); tony.name = "tonisha"; // internalerror: too much recursion when a value is assigned to the property name (this.name = name;) javascript needs to
set that property.
... when this happens, the
setter function is triggered.
...And 3 more matches
Default parameters - JavaScript
however, it's often useful to
set a different default value.
... in the past, the general strategy for
setting defaults was to test parameter values in the function body and assign a value if they are undefined.
... to guard against this, something like the second line would be used, where b is
set to 1 if multiply is called with only one argument: function multiply(a, b) { b = (typeof b !== 'undefined') ?
...And 3 more matches
Promise.race() - JavaScript
description the race function returns a promise that is
settled the same way (and takes the same value) as the first promise that
settles amongst the promises of the iterable passed as an argument.
... if the iterable contains one or more non-promise value and/or an already
settled promise, then promise.race will resolve to the first of these values found in the iterable.
...ty of promise.race this following example demonstrates the asynchronicity of promise.race: // we are passing as argument an array of promises that are already resolved, // to trigger promise.race as soon as possible var resolvedpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.race(resolvedpromisesarray); // immediately logging the value of p console.log(p); // using
settimeout we can execute code after the stack is empty
settimeout(function(){ console.log('the stack is now empty'); console.log(p); }); // logs, in order: // promise { <state>: "pending" } // the stack is now empty // promise { <state>: "fulfilled", <value>: 33 } an empty iterable causes the returned promise to be forever pending: var foreverpendingpromise = promise.race([]); console.log...
...And 3 more matches
async function - JavaScript
async function foo() { const result1 = await new promise((resolve) =>
settimeout(() => resolve('1'))) const result2 = await new promise((resolve) =>
settimeout(() => resolve('2'))) } foo() note how the promise chain is not built-up in one go.
... async function foo() { const p1 = new promise((resolve) =>
settimeout(() => resolve('1'), 1000)) const p2 = new promise((_,reject) =>
settimeout(() => reject('2'), 500)) const results = [await p1, await p2] // do not do this!
... use promise.all or promise.all
settled instead.
...And 3 more matches
<mstyle> - MathML
displaystyle a boolean value specifying whether more vertical space is used for displayed equations or, if
set to false, a more compact layout is used to display formulas.
... the main effect is that larger versions of operators are displayed, when displaystyle is
set to true.
... lspace or voff
set do not apply to <mpadded>.
...And 3 more matches
Critical rendering path - Web Performance
some requests are blocking, which means the parsing of the rest of the html is halted until the imported as
set is handled.
...if another
set of starttag and endtag tokens come between a
set of starttag and endtags, you have a node inside a node, which is how we define the hierarchy of the dom tree.
... css has its own
set of rules for identifying valid tokens.
...And 3 more matches
Web Performance
to understand how to improve performance and perceived performance, it helps to understand how the browser works.recommended web performance timings: how long is too long?there are no clear
set rules as to what constitutes a slow pace when loading pages, but there are specific guidelines for indicating content will load (1 second), idling (50ms), animating (16.7s) and responding to user input (50 to 200ms).the business case for web performanceyou know web performance is important, but how do you convince clients and management to invest in performance and make it a priority.
...in this article, we'll covers methods for getting your font files as small as possible with efficient file formats and sub
setting.
...in this guide we'll discuss some alternative media formats, how to use them responsibly so that non-supporting browsers don't get left out in the cold, and some advanced guidance on transcoding your existing as
sets to them.
...And 3 more matches
Scripting - SVG: Scalable Vector Graphics
one can override default browser behaviors with the evt.preventdefault( ) method, add eventlisteners to objects with the syntax element.addeventlistener(event, function, usecapture), and
set element properties with syntax svgelement.style.
setproperty("fill-opacity", "0.0", "").
... note the existence of all three arguments
setting properties.
... function myrect(x,y,w,h,message){ this.message=message this.rect=document.createelementns("http://www.w3.org/2000/svg","rect") this.rect.
setattributens(null,"x",x) this.rect.
setattributens(null,"y",y) this.rect.
setattributens(null,"width",w) this.rect.
setattributens(null,"height",h) document.documentelement.appendchild(this.rect) this.rect.addeventlistener("click",this,false) this.handleevent= function(evt){ switch (evt.type){ case "click": alert(this.message) break; } } } inter-document scripting...
...And 3 more matches
Filter effects - SVG: Scalable Vector Graphics
to apply your created filter on a graphic element, you
set the filter attribute.
... <svg width="250" viewbox="0 0 200 85" xmlns="http://www.w3.org/2000/svg" version="1.1"> <defs> <!-- filter declaration --> <filter id="myfilter" filterunits="userspaceonuse" x="0" y="0" width="200" height="120"> <!-- off
setblur --> <fegaussianblur in="sourcealpha" stddeviation="4" result="blur"/> <feoff
set in="blur" dx="4" dy="4" result="off
setblur"/> <!-- litpaint --> <fespecularlighting in="blur" surfacescale="5" specularconstant=".75" specularexponent="20" lighting-color="#bbbbbb" result="specout"> <fepointlight x="-5000" y="-10000" z="20000"/> </fespecularlighting> <fecomposite in="specout" in2="sourcealpha" operator="in" result="specout"/> ...
... <fecomposite in="sourcegraphic" in2="specout" operator="arithmetic" k1="0" k2="1" k3="1" k4="0" result="litpaint"/> <!-- merge off
setblur + litpaint --> <femerge> <femergenode in="off
setblur"/> <femergenode in="litpaint"/> </femerge> </filter> </defs> <!-- graphic elements --> <g filter="url(#myfilter)"> <path fill="none" stroke="#d90000" stroke-width="10" d="m50,66 c-50,0 -50,-60 0,-60 h100 c50,0 50,60 0,60z" /> <path fill="#d90000" d="m60,56 c-30,0 -30,-40 0,-40 h80 c30,0 30,40 0,40z" /> <g fill="#ffffff" stroke="black" font-size="45" font-family="verdana" > <text x="52" y="52">svg</text> </g> </g> </svg> step 1 <fegaussianblur in="sourcealpha" std...
...And 3 more matches
SVG In HTML Introduction - SVG: Scalable Vector Graphics
source here is the source to the example: <html> <head> <title>xtech svg demo</title> <style> stop.begin { stop-color:yellow; } stop.end { stop-color:green; } body.invalid stop.end { stop-color:red; } #err { display:none; } body.invalid #err { display:inline; } </style> <script> function signalerror() { document.getelementbyid('body').
setattribute("class", "invalid"); } </script> </head> <body id="body" style="position:absolute; z-index:0; border:1px solid black; left:5%; top:5%; width:90%; height:90%;"> <form> <field
set> <legend>html form</legend> <p><label>enter something:</label> <input type="text"> <span id="err">incorrect value!</span></p> <p><input type="button" value="activate!" onclick="signalerro...
...r();"></p> </field
set> </form> <svg viewbox="0 0 100 100" preserveaspectratio="xmidymid slice" style="width:100%; height:100%; position:absolute; top:0; left:0; z-index:-1;"> <lineargradient id="gradient"> <stop class="begin" off
set="0%"/> <stop class="end" off
set="100%"/> </lineargradient> <rect x="0" y="0" width="100" height="100" style="fill:url(#gradient)" /> <circle cx="50" cy="50" r="30" style="fill:url(#gradient)" /> </svg> </body> </html> discussion the page is mainly regular html, css and javascript.
...the gradient color stops have their colors
set by css.
...And 3 more matches
Texts - SVG: Scalable Vector Graphics
setting font properties an essential part of a text is the font in which it is displayed.
... svg offers a
set of attributes, many similar to their css counterparts, to enable font selection.
... each of the following properties can be
set as an attribute or via a css declaration: font-family, font-style, font-weight, font-variant, font-stretch, font-size, font-size-adjust, kerning, letter-spacing, word-spacing and text-decoration.
...And 3 more matches
Subdomain takeovers - Web security
if an attacker can do this, they can potentially read cookies
set from the main domain, perform cross-site scripting, or circumvent content security policies, thereby enabling them to capture protected information (including logins) or send malicious content to unsuspecting users.
... during provisioning an attacker
sets up a virtual host for a subdomain name you bought on the hosting provider, before you get to do it.
... you
set up dns records to direct browsers that want to access blog.example.com so that they go to the virtual host.
...And 3 more matches
id - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the id function finds nodes matching the given ids and returns a node-
set containing the identified nodes.
... syntax id(expression ) arguments expression if expression is a node-
set, then the string value of each node in the node-
set is treated as an individual id.
... the returned node
set is the nodes corresponding to those ids.
...And 3 more matches
Content Scripts - Archive of obsolete content
the contentscript option treats the string itself as a script: // main.js var pagemod = require("sdk/page-mod"); var contentscriptvalue = 'document.body.innerhtml = ' + ' "<h1>page matches rule
set</h1>";'; pagemod.pagemod({ include: "*.mozilla.org", contentscript: contentscriptvalue }); the contentscriptfile option treats the string as a resource:// url pointing to a script file stored in your add-on's data directory.
... this add-on supplies a url pointing to the file "content-script.js", located in the data subdirectory under the add-on's root directory: // main.js var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: data.url("content-script.js") }); // content-script.js document.body.innerhtml = "<h1>page matches rule
set</h1>"; from firefox 34 onwards, you can use "./content-script.js" as an alias for self.data.url("content-script.js").
...this enables you to load a javascript library like jquery by url, then pass in a simple script inline that can use jquery: // main.js var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); var contentscriptstring = '$("body").html("<h1>page matches rule
set</h1>");'; pagemod.pagemod({ include: "*.mozilla.org", contentscript: contentscriptstring, contentscriptfile: data.url("jquery.js") }); unless your content script is extremely simple and consists only of a static string, don't use contentscript: if you do, you may have problems getting your add-on approved on amo.
...And 2 more matches
base64 - Archive of obsolete content
var base64 = require("sdk/base64"); var encodeddata = base64.encode("hello, world"); var decodeddata = base64.decode(encodeddata); globals functions encode(data, char
set) creates a base-64 encoded ascii string from a string of binary data.
... parameters data : string the data to encode char
set : string the char
set of the string to encode (optional).
...in order to encode and decode unicode strings, the char
set parameter needs to be
set: var base64 = require("sdk/base64"); var encodeddata = base64.encode(unicodestring, "utf-8"); returns string : the encoded string decode(data, char
set) decodes a string of data which has been encoded using base-64 encoding.
...And 2 more matches
request - Archive of obsolete content
the constructor takes a single parameter options which is used to
set several properties on the resulting request.
...this explicitly
sets the content-type header.
...to force the response to be interpreted as latin-1, use overridemimetype: var request = require("sdk/request").request; var quijote = request({ url: "http://www.latin1files.org/quijote.txt", overridemimetype: "text/plain; char
set=latin1", oncomplete: function (response) { console.log(response.text); } }); quijote.get(); anonymous boolean if true, the request will be sent without cookies or authentication headers.
...And 2 more matches
tabs - Archive of obsolete content
tivate", logdeactivate); tab.on("close", logclose); } function logshow(tab) { console.log(tab.url + " is loaded"); } function logactivate(tab) { console.log(tab.url + " is activated"); } function logdeactivate(tab) { console.log(tab.url + " is deactivated"); } function logclose(tab) { console.log(tab.url + " is closed"); } tabs.on('open', onopen); manipulate a tab you can get and
set various properties of tabs (but note that properties relating to the tab's content, such as the url, will not contain valid values until after the tab's ready event fires).
... by
setting the url property you can load a new page in the tab: var tabs = require("sdk/tabs"); tabs.on('activate', function(tab) { tab.url = "http://www.example.com"; }); run scripts in a tab you can attach a content script to the page hosted in a tab, and use that to access and manipulate the page's content (see the modifying the page hosted by a tab tutorial): var tabs = require("sdk/tabs"); tabs.on('activate', function(tab) { var worker = tab.attach({ contentscript: 'self.port.emit("html", document.body.innerhtml);' }); worker.port.on("html", function(message) { console.log(message) }) }); note that tab.attach is tab-centric: if the user navigates to a new page in the same tab, then the worker and content scripts will be reattached to the new page.
... title the title of the tab (usually the title of the page currently loaded in the tab) this property can be
set to change the tab title.
...And 2 more matches
lang/functional - Archive of obsolete content
this is similar to calling
settimeout with no wait (i.e.
...
settimeout(function () { ...
... delay(fn, ms, arguments) much like
settimeout, delay invokes a function after waiting a
set number of milliseconds.
...And 2 more matches
Modifying Web Pages Based on URL - Archive of obsolete content
script option and url pattern is given as include option is as follows: // import the page-mod api var pagemod = require("sdk/page-mod"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a message pagemod.pagemod({ include: "*.org", contentscript: 'document.body.innerhtml = ' + ' "<h1>page matches rule
set</h1>";' }); do as follows: create a new directory and navigate to it.
... $("body").html("<h1>page matches rule
set</h1>"); then download jquery to add-on's data directory, and load the script and jquery together (making sure to load jquery first).
...port the page-mod api var pagemod = require("sdk/page-mod"); // import the self api var self = require("sdk/self"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a message pagemod.pagemod({ include: "*.org", contentscriptfile: self.data.url("jquery-1.7.min.js"), contentscript: '$("body").html("<h1>page matches rule
set</h1>");' }); note, though, that you can't load a script from a web site.
...And 2 more matches
Localization - Archive of obsolete content
o.show(); } }); var hello = require("sdk/panel").panel({ height: 75, width: 150, contenturl: require("sdk/self").data.url("my-panel.html") }); given locale files for "en-us" and "fr" which provide translations of hello_id, the panel will now display "hello!" or "bonjour !", according to the current locale: the translation is inserted into the node which has the data-l10n-id attribute
set.
...hello_id= <blink>hello!</blink> localizing element attributes this feature is new in firefox 39 you can localize certain attributes of elements with an l10n-id by
setting its value with l10n-id.attributename in the properties file like: hello_id.accesskey= h the following attributes are supported: accesskey alt label title placeholder further the localization of the aria attributes aria-label, aria-valuetext and aria-moz-hint are supported with the same aliases as on firefox os: arialabel ariavaluetext ariamozhint using localized strings in javascript to reference localized strings from you...
... now when the browser's locale is
set to "en-us", users see this in the add-ons manager: when the browser's locale is
set to "fr", they see this: the menulist and the radio preference types have options.
...And 2 more matches
Extension Versioning, Update and Compatibility - Archive of obsolete content
simply create the boolean preference extensions.checkcompatibility and
set it to false.
...the problem is because of mime type that should be
set in the server for xhtml extension.
... <em:updatehash>sha256:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e64ad2e3a0b60120ca271ce6e6</em:updatehash> note: the value of updatehash, must start with the string of hashing algorithm, it is a common error to delete this prefix, when
setting new value to updatehash:sha256:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e64ad2e3a0b60120ca271ce6e6 when a hash is specified the downloaded file is compared with the hash and an error shown if it does not match.
...And 2 more matches
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
so, if we were to use fuel, we can do the following in the init function: init : function() { let firstrunpref = "extensions.xulschoolhello.firstrundone"; if (!application.prefs.getvalue(firstrunpref, false)) { application.prefs.
setvalue(firstrunpref, true); // all the rest of the first run code goes here.
...keep in mind that the user could have
set multiple firefox windows to open at startup, so there's a race condition on which window will run the first run code.
...if an add-on is uninstalled and later installed again, it might be desirable for preferences and other
settings to be kept.
...And 2 more matches
Connecting to Remote Content - Archive of obsolete content
let url = "http://www.example.com/"; let request = components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] .createinstance(components.interfaces.nsixmlhttprequest); request.onload = function(aevent) { window.alert("response text: " + aevent.target.respon
setext); }; request.onerror = function(aevent) { window.alert("error status: " + aevent.target.status); }; request.open("get", url, true); request.send(null); in this example we demonstrate how to make a xmlhttprequest call in asynchronous mode.
...in the onload callback function, the respon
setext parameter contains the server response as text.
...sending a post request requires you to
set the content type of the request and to pass the post data to the send() method as below.
...And 2 more matches
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
parse element namespace prefix (if none exists, default to defaultnamespace), and create element var elemns = namespace(elemnameorarray); var elem = doc.createelementns(elemns.namespace || jsontodom.defaultnamespace, elemns.shortname); //
set element's attributes and/or callback functions (eg.
...they're not in any namespace) elem.
setattributens(attrns.namespace || "", attrns.shortname, val); } } // create and append this element's children var childelems = array.slice(arguments, 2); childelems.foreach(function(childelem) { if (childelem != null) { elem.appendchild( childelem instanceof doc.defaultview.node ?
... ["div", {}, ["a", { href: href, key: "link", onclick: function (event) { alert(event.target.href); } }, text], ["span", { class: "stuff" }, "stuff"]]], document, nodes)); alert(nodes.link); function addentrytopopup(menupopup, doc, chromewindow) { var newitem = doc.createelement("menuitem"); newitem.
setattribute("value", "testvalue"); newitem.
setattribute("label", "another popup menu item"); menupopup.appendchild(newitem); }; var jsontemplatebtn = ["xul:toolbarbutton", { id: "mytestbutton", class: "toolbarbutton-1", type: "menu", label: "test button label", tooltiptext: "test button tooltip", removable: ...
...And 2 more matches
The Box Model - Archive of obsolete content
if you want an element to be flexible, you should
set its flexibility to 1.
...using the former allows the ui to scale proportionately depending on font size
settings, which are often changed by users with accessibility limitations.
...in order to have wrapping descriptions, you need to
set the text as a child node instead of using the value attribute: <description>&xulschoolhello.description.label;</description> even then, the text will extend as much as it can in a single line, so you need to add some css limits in order to make it wrap inside a xul dialog or window.
...And 2 more matches
Tabbed browser - Archive of obsolete content
here you should find a
set of useful code snippets to help you work with firefox's tabbed browser.
...var url = "https://developer.mozilla.org"; var tab = gbrowser.addtab(null, {relatedtocurrent: true}); gsessionstore.
settabstate(tab, json.stringify({ entries: [ { title: url } ], usertypedvalue: url, usertypedclear: 2, lastaccessed: tab.lastaccessed, index: 1, hidden: false, attributes: {}, image: null })); reusing tabs rather than open a new browser or new tab each and every time one is needed, it is good practice to try to re-use an existing tab which already displays the desired url--if...
... var browserenumerator = wm.getenumerator("navigator:browser"); var tabbrowser = browserenumerator.getnext().gbrowser; // create tab var newtab = tabbrowser.addtab(url); newtab.
setattribute(attrname, "xyz"); // focus tab tabbrowser.selectedtab = newtab; // focus *this* browser window in case another one is currently focused tabbrowser.ownerdocument.defaultview.focus(); } } the function can be called like so: openandreuseonetabperattribute("myextension-myattribute", "http://developer.mozilla.org/").
...And 2 more matches
XUL user interfaces - Archive of obsolete content
sabled="true"/> <label class="day" value="friday" disabled="true"/> <label class="day" value="saturday" disabled="true"/> </hbox> </row> </rows> </grid> <hbox class="buttons"> <button id="clear" label="clear" accesskey="c" oncommand="cleardate();"/> <button id="today" label="today" accesskey="t" oncommand="
settoday();"/> </hbox> </groupbox> <statusbar> <statusbarpanel id="status"/> </statusbar> </vbox> </window> make a new css file, style7.css.
...m; } .demo-group .buttons { -moz-box-pack: end; } /* the day-of-week labels */ .day { margin-left: 1em; } .day[disabled] { color: #777; } .day:first-child { margin-left: 4px; } /* the left column labels */ .text-prompt { padding-top: .25em; } /* the date input box */ #date-text { max-width: 8em; } /* the status bar */ statusbar { width: 100%; border: 1px in
set -moz-dialog; margin: 4px; padding: 0px 4px; } #status { padding: 4px; } #status[warning] { color: red; } make a new text file, script7.js.
... copy and paste the content from here, making sure that you scroll to get all of it: // xul demonstration var datebox, daybox, currentday, status; // elements // called by window onload function init() { datebox = document.getelementbyid("date-text") daybox = document.getelementbyid("day-box") status = document.getelementbyid("status")
settoday(); } // called by clear button function cleardate() { datebox.value = "" refresh() } // called by today button function
settoday() { var d = new date() datebox.value = (d.getmonth() + 1) + "/" + d.getdate() + "/" + d.getfullyear() refresh() } // called by date textbox function refresh() { var d = datebox.value var thedate = null showstatus(null) if (d != "") { try { var a = d.split("/") va...
...And 2 more matches
Creating a Web based tone generator - Archive of obsolete content
this function is called at a certain interval through the
setinterval() function.
...the function mozcurrentsampleoff
set() is used to know the position of the samples being played so that we can fill a 500 ms buffer of audio samples.
... var audio = new audio(); audio.moz
setup(1, samplerate); var currentwriteposition = 0; var prebuffersize = samplerate / 2; // buffer 500ms var tail = null; // the function called with regular interval to populate // the audio output buffer.
...And 2 more matches
Notes on HTML Reflow - Archive of obsolete content
a frame is rectangular, with width, height, and an off
set from the parent frame that contains it.
...for example, a <div> with a constrained width (e.g.,
set via the css width property) would note this in the reflow state object before flowing its children.
...a frame that decides it needs a dirty reflow
sets the ns_frame_is_dirty state bit on itself, and then calls the reflowdirtychild method on its parent frame.
...And 2 more matches
Dehydra Function Reference - Archive of obsolete content
msg is a string to output to customize the location info printed
set this._loc before calling print() include(file [, namespace]) include a javascript file into a namespace.
...include example include("map.js") // includes map.js into toplevel var map = {} include("map.js", map) // includes map.js into the map object require({version:, strict:, werror:, gczeal:}) require is used to
set runtime execution flags.
... version integer: this
sets js version similar to version() in js 1.7.
...And 2 more matches
Creating a Help Content Pack - Archive of obsolete content
a content pack is a packaged
set of files that describe help content.
...fine another rdf:li element like so: <rdf:li> <rdf:description nc:panelid="search" nc:datasources="" nc:emptysearchtext="[no matching items found.]" nc:emptysearchlink="chrome://foo/locale/bar.html"/> </rdf:li> nc:panelid should be
set to search.
... nc:datasources should be
set as with table of contents, index, and glossary definitions.
...And 2 more matches
Microsummary XML grammar reference - Archive of obsolete content
<pages> (required) identifies the
set of pages that the generator is able to summarize.
... the <pages> element the <pages> element identifies the
set of pages that the generator is able to summarize.
...the <include> element the <include> element identifies a
set of pages that the generator is able to summarize.
...And 2 more matches
Hacking wiki - Archive of obsolete content
for anonymous access use: svn co http://svn.mozilla.org/projects/deve...lla.org/trunk/ to see the skins properly, you'll need to also check out <tt>mozilla-org/css</tt> to get the css files needed: export cvsroot=:pserver:anonymous@cvs-mirror.mozilla.org:/www cvs login cvs co mozilla-org/css (when prompted to enter a password, type <tt>anonymous</tt>)
setting up copy the contents of the <tt>trunk</tt> folder and the <tt>css</tt> folder (note: the folder itself) into the <tt>www</tt> directory on your server.
...once you're done with the configuration script, copy the <tt>config/local
settings.php</tt> file it created to the parent directory and navigate to the location you installed mediawiki to.
...you can enable them by adding include("extensions/exampleext.php"); to the end of your <tt>local
settings.php</tt>.
...And 2 more matches
Remotely debugging Firefox for Metro - Archive of obsolete content
set up firefox for metro go to about:config in firefox for metro, and
set the following required preference: devtools.debugger.remote-enabled = true you may also want to
set these optional preferences: devtools.debugger.force-local = false (if you want to connect from a different machine over the network) devtools.debugger.remote-host (to change the tcp hostname where firefox will listen fo...
... this can be a security risk, especially if you also
set the force-local preference to false.)
set up firefox for desktop on the desktop, remote debugging is enabled by a
setting in the toolbox.
... open the toolbox, click the "
settings" button in the toolbar, and check "enable remote debugging" in the
settings tab.
...And 2 more matches
Merging TraceMonkey Repo - Archive of obsolete content
otherwise, you can run hg parents filename to find the change
sets which may have contributed to the conflict.
... inspecting the files at those two change
sets can be helpful: hg cat -c change
set filename once all the conflict markers are removed, you've performed the manual resolution, which you tell to mercurial by running hg resolve -m filename.
...for each bug in the results, find the corresponding change
sets that we just merged (i.e.
...And 2 more matches
Supporting private browsing mode - Archive of obsolete content
var pbs = components.classes["@mozilla.org/privatebrowsing;1"] .getservice(components.interfaces.nsiprivatebrowsingservice); var oldprivatemode = pbs.privatebrowsingmode; pbs.privatebrowsingenabled = true; /* this is all private */ pbs.privatebrowsingenabled = oldprivatemode; in this example, we save the current state of the private browsing mode
setting in the oldprivatemode variable, then turn on private browsing by
setting its value to true.
... from that point until we restore the original value of the private browsing mode
setting, things are done privately.
...itprivatebrowsing" in this._watcher) { this.watcher.onexitprivatebrowsing(); } } } else if (atopic == "quit-application") { this._os.removeobserver(this, "quit-application"); this._os.removeobserver(this, "private-browsing"); } }, get inprivatebrowsing() { return this._inprivatebrowsing; }, get watcher() { return this._watcher; },
set watcher(val) { this._watcher = val; } }; of special note is the fact that this helper object is designed to not break on versions of firefox without private browsing support (those prior to firefox 3.5).
...And 2 more matches
URIs and URLs - Archive of obsolete content
mantic interpretation of common syntactic conventions across different types of resource identifiers; it allows introduction of new types of resource identifiers without interfering with the way that existing identifiers are used; and, it allows the identifiers to be reused in many different contexts, thus permitting new applications or protocols to leverage a pre-existing, large, and widely-used
set of resource identifiers.
...the resource is the conceptual mapping to an entity or
set of entities, not necessarily the entity which corresponds to that mapping at any particular instance in time.
...the term "uniform resource locator" (url) refers to the sub
set of uri that identify resources via a representation of their primary access mechanism (e.g., their network "location"), rather than identifying the resource by name or by some other attribute(s) of that resource.
...And 2 more matches
Using gdb on wimpy computers - Archive of obsolete content
the best way to do this is to
set a breakpoint in main, let the program run until main and then turn off automatic library loading.
...(gdb) r starting program: /home/blizzard/src/mozilla/mozilla/dist/bin/./mozilla-bin breakpoint 1, main (argc=1, argv=0xbffff894) at nsapprunner.cpp:811 811 installunixsignalhandlers(argv[0]); (gdb)
set auto-solib-add 0 (gdb) c continuing.
...you can add this function to the .gdbinit file in your home directory: def prun tbreak main run
set auto-solib-add 0 end how do i load shared libraries?
...And 2 more matches
Writing textual data - Archive of obsolete content
some character encodings (utf-8, utf-16, utf-32) can represent "all" characters (the full repertoire of unicode) while others can only represent a sub
set of the full repertoire.
... writing to a stream in gecko 1.8 (seamonkey 1.0, firefox 1.5), you can use nsiconverteroutputstream: var char
set = "utf-8"; // can be any character encoding name that mozilla supports var os = components.classes["@mozilla.org/intl/converter-output-stream;1"] .createinstance(components.interfaces.nsiconverteroutputstream); // this assumes that fos is the nsioutputstream you want to write to os.init(fos, char
set, 0, 0x0000); os.writestring("umlaute: \u00fc \u00e4\n"); os.writestring("hebrew: \u05d0 \u05d1\n"); // etc.
... to instead write a replacement character in such cases, specify the character instead of 0x00: os.init(fos, char
set, 0, "?".charcodeat(0)); you can, of course, replace the "?" in that example with any other character.
...And 2 more matches
Binding Attachment and Detachment - Archive of obsolete content
-moz-binding value: none | [,]* <uri> | inherit initial value: none applies to: all elements (not generated content or pseudo-elements) inherited: no percentages: n/a the value of the -moz-binding property is a
set of urls that identify specific bindings.
... an individual url in the
set consists of the binding document's url and the binding's document-unique identifier.
... no bindings will be attached to elements that match the style rule, but are inside an element that has style display:none
set.
...And 2 more matches
buttons - Archive of obsolete content
you can
set its label with the buttonlabelextra1 attribute and its command with the ondialogextra1 attribute.
...you can
set its label with the buttonlabelextra2 attribute and its command with the ondialogextra2 attribute.
... note: if you don't want to display any buttons in the dialog box,
set the value of this attribute to "," (a single comma).
...And 2 more matches
RDF Datasources - Archive of obsolete content
you can use this datasource if you want to dynamically
set the datasource using a script, but don't want one initially or don't know its exact url.
...the ref attribute has been
set to the root element in the rdf file, which is the top-level seq.
...if we wanted to, we could
set the ref attribute to any of the other about attribute values to limit the
set of data that is returned.
...And 2 more matches
Tree Selection - Archive of obsolete content
« previousnext » the section will describe how to get and
set the selected items in a tree.
...if you add the seltype attribute to the tree,
set to the value single, the user may only select one row at a time.
...<tree id="tree
set" onselect="alert('you selected something!');"> tree indices the tree has a property currentindex, which can be used to get the currently selected item, where the first row is 0.
...And 2 more matches
command - Archive of obsolete content
see also: command attribute, command
set element attributes disabled, label, oncommand,reserved examples the following code will send a paste command (cmd_paste) to the currently focused element: // first include chrome://global/content/globaloverlay.js godocommand("cmd_paste"); example with two buttons <command
set><command id="cmd_openhelp" oncommand="alert('help');"/></command
set> <button label="help" command="cmd_openhelp"...
...if this attribute is
set, the element is disabled.
...do not
set the attribute to true, as this will suggest you can
set it to false to enable the element again, which is not the case.
...And 2 more matches
listhead - Archive of obsolete content
if this attribute is
set, the element is disabled.
...do not
set the attribute to true, as this will suggest you can
set it to false to enable the element again, which is not the case.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
...And 2 more matches
menubar - Archive of obsolete content
> <menuitem label="save" disabled="true"/> <menuitem label="close"/> <menuseparator/> <menuitem label="quit"/> </menupopup> </menu> <menu id="edit-menu" label="edit"> <menupopup id="edit-popup"> <menuitem label="undo"/> <menuitem label="redo"/> </menupopup> </menu> </menubar> attributes grippyhidden seamonkey only type: boolean when
set to true, the grippy will be hidden.
... when
set to false, the default, the grippy will be shown.
... statusbar type: id if you
set this attribute to the id of a statusbar element, the label on the statusbar will update to the statustext of the items on the menu as the user moves the mouse over them.
...And 2 more matches
stack - Archive of obsolete content
the bottom and right attributes can also be used in conjunction with top and left to
set the width and/or height of the children of the stack.
... when using these attributes to
set width or height, both attributes for the given axis must be explicitly
set, eg, if
setting width, both "left" and "right" must be
set.
... in some case,
setting the width or height this way may even be necessary because using the width/height attributes (eg, "width", "minwidth" and "maxwidth") inside a stack can sometimes produce unpredictable and undesireable results.
...And 2 more matches
where - Archive of obsolete content
attributes ignorecase, multiple, negate, rel, subject, value examples (example needed) attributes ignorecase type: boolean
set to true to indicate that the case does not matter when making comparisons.
... multiple type: boolean
set to true to indicate that the value contains multiple values separated by commas.
... negate type: boolean
set to true to indicate that the comparison should be reversed.
...And 2 more matches
Application Update - Archive of obsolete content
application
settings you will need to configure the following
settings in your application: branding the update process uses branding information,
setup branding for your application as described here: xulrunner tips icons the updater process for linux systems requires updater.png to be in your <application folder>/icons/, see https://bugzilla.mozilla.org/show_bug.cgi?id=706846 preferences // whether or n...
...pref("app.update.auto", true); // defines how the application update service notifies the user about updates: // // aum
set to: minor releases: major releases: // 0 download no prompt download no prompt // 1 download no prompt download no prompt if no incompatibilities // 2 download no prompt prompt // // see chart in nsupdateservice.js.in for more details // pref("app.update.mode", 1); // if
set to true, the update service will present no ui for any event.
...pref("app.update.url.details", "http://yourserver.net/yourpage"); // user-
settable override to app.update.url for testing purposes.
...And 2 more matches
Debugging a XULRunner Application - Archive of obsolete content
see also debugging javascript prefs
setting the following prefs will make your debugging life much easier!
... to output dump calls instead to a file,
set browser.dom.window.dump.file to the file destination where the log should be created and restart the application.
...to show errors in chrome javascript, the pref pref("javascript.options.showinconsole", true) must be
set.
...And 2 more matches
How to enable locale switching in a XULRunner application - Archive of obsolete content
normally the application locale is inherited from the os environment of the host system, however there are situations when you might want to give users the option to override the default
setting and choose a different locale.
...edit the application preferences file and
set "intl.locale.matchos" to false.
...defaults/preferences/prefs.js /* don't inherit os locale */pref("intl.locale.matchos", "false");/* choose own fallback locale; later it can be overridden by the user */pref("general.useragent.locale", "en-gb"); note that some distributions of xulrunner or firefox don't honour the "intl.locale.matchos"
setting, so in those cases you won't be able to override the os locale [debian iceweasel bug #417961].
...And 2 more matches
Mozprofile - Archive of obsolete content
in addition to creating profiles, mozprofile can install addons and
set preferences.
...command line usage mozprofile may be used to create profiles,
set preferences in profiles, or install addons into profiles.
...in addition, subclasses firefoxprofile and thundebirdprofile are available with pre
set preferences for those applications.
...And 2 more matches
Extentsions FAQ - Archive of obsolete content
the ietab (opens ie in a firefox tab) should be able do this if you
set it to always open "file://*" urls in an ie tab.
...also, check out this site to learn how to
set up a proxy: http://www.mozilla.org/projects/xpcom/proxies.html how to test a tab has been closed or not?
... //
setting the state document.getelementbyid("toolbar-button").
setattribute("toolbar-button", "on"); //or document.getelementbyid("toolbar-button").
setattribute("toolbar-button","off"); //css #myexten-toolbar-button[myexten-toolbar-button="on"] { list-style-image: url("chrome://myexten/skin/toolbar-button.png"); -moz-image-region: rect(0px 24px 24px 0px);} #myexten-toolbar-button[myexten-toolba...
...And 2 more matches
NPByteRange - Archive of obsolete content
syntax typedef struct _npbyterange { int32 off
set; /* negative off
set = from the end */ uint32 length; struct _npbyterange* next; } npbyterange; fields the data structure has the following fields: off
set off
set in bytes to the start of the requested range.
... this value may be either positive or negative: positive value: off
set from the beginning of the stream.
... negative value: off
set from the end of the stream.
...And 2 more matches
NP_Port - Archive of obsolete content
the np_port is valid for the lifetime of the npwindow, that is, until npp_
setwindow is called again with a different value or the instance is destroyed.
... save the current port
settings before changing the port for drawing.
...
set the desired port
settings before drawing.
...And 2 more matches
Theme changes in Firefox 4 - Archive of obsolete content
omni.jar firefox 4 achieves performance improvements by moving many of its internal parts from being standalone files or
sets of jar files into just one jar file; this reduces the amount of i/o needed to load firefox.
...the theme can now override the value by
setting a special css property on the toolbar.
... overriding the default values themes can override the value of the iconsize attribute on each toolbar by specifying a special value for the counter-re
set css property on the toolbar itself.
...And 2 more matches
Browser Detection and Cross Browser Support - Archive of obsolete content
if (document.all) { // ie4 height = document.body.off
setheight; } else if (document.layers) { // nn4 height = window.innerheight; } else { // other height = 0; } with the introduction of the w3c dom, the standard method document.getelementbyid became available in internet explorer 5 and later in netscape 6 (gecko).
...if (document.all) { // ie4 height = document.body.off
setheight; } else if (document.layers) { // nn4 height = window.innerheight; } else if (document.getelementbyid) { // they think this is gecko // but could be wrong!
... using noframes to support non-frames capable browsers <html> <head> <title>frames</title> </head> <frame
set rows="30,*"> <frame src="foo.html"> <frame src="bar.html"> <noframes> <body> <p> this page requires frames.
...And 2 more matches
Explaining basic 3D theory - Game development
vertex processing vertex processing is about combining the information about individual vertices into primitives and
setting their coordinates in the 3d space for the viewer to see.
...then there's view transformation which takes care of positioning and
setting the orientation of the camera in the 3d space.
... projection transformation (also called perspective transformation) then defines the camera
settings.
...And 2 more matches
Desktop gamepad controls - Game development
te the state of the gamepad's currently pressed buttons we will need a function that will do exactly that on every frame: function gamepadupdatehandler() { buttonspressed = []; if(controller.buttons) { for(var b=0; b<controller.buttons.length; b++) { if(controller.buttons[b].pressed) { buttonspressed.push(b); } } } } we first re
set the buttonspressed array to get it ready to store the latest info we'll write to it from the current frame.
... then, if the buttons are available we loop through them; if the pressed property is
set to true, then we add them to the buttonspressed array for later processing.
... the pressed() function gets the input data and
sets the information about it in our object, and the axes property stores the array containing the values signifying the amount an axis is pressed in the x and y directions, represented by a float in the (-1, 1) range.
...And 2 more matches
Mobile touch controls - Game development
pure javascript approach we could implement touch events on our own —
setting up event listeners and assigning relevant functions to them would be quite straightforward: var el = document.getelementsbytagname("canvas")[0]; el.addeventlistener("touchstart", handlestart); el.addeventlistener("touchmove", handlemove); el.addeventlistener("touchend", handleend); el.addeventlistener("touchcancel", handlecancel); this way, touching the game's <canvas> on the mobile screen ...
... use it for both cases: when the player touches the screen but doesn't move it (touchstart), and when the finger is moved on the screen (touchmove): document.addeventlistener("touchstart", touchhandler); document.addeventlistener("touchmove", touchhandler); the touchhandler function looks like this: function touchhandler(e) { if(e.touches) { playerx = e.touches[0].pagex - canvas.off
setleft - playerwidth / 2; playery = e.touches[0].pagey - canvas.off
settop - playerheight / 2; output.innerhtml = "touch: "+ " x: " + playerx + ", y: " + playery; e.preventdefault(); } } if the touch occurs (touches object is not empty), then we will have all the info we need in that object.
... we can get the first touch (e.touches[0], our example is not multitouch-enabled), extract the pagex and pagey variables and
set the player's ship position on the screen by subtracting the canvas off
set (distance from the canvas and the edge of the screen) and half the player's width and height.
...And 2 more matches
Crisp pixel art look with image-rendering - Game development
the steps to achieve this effect are: create a <canvas> element and
set its width and height attributes to the original, smaller resolution.
...
set its css width and height properties to be 2x or 4x the value of the html width and height.
... if the canvas was created with a 128 pixel width, for example, we would
set the css width to 512px if we wanted a 4x scale.
...And 2 more matches
Square tilemaps implementation: Scrolling maps - Game development
var startcol = math.floor(this.camera.x / map.tsize); var endcol = startcol + (this.camera.width / map.tsize); var startrow = math.floor(this.camera.y / map.tsize); var endrow = startrow + (this.camera.height / map.tsize); once we have the first tile, we need to calculate how much its rendering (and therefore the rendering of the other tiles) is off
set by.
...in our demo the shifting amount is stored in the off
setx and off
sety variables.
... var off
setx = -this.camera.x + startcol * map.tsize; var off
sety = -this.camera.y + startrow * map.tsize; with these values in place, the loop that renders the map is quite similar to the one used for rendering static tilemaps.
...And 2 more matches
Images, media, and form elements - Learn web development
there are some additional elements, such as <textarea> for multiline text input, and also elements used to contain and label parts of forms such as <field
set> and <legend>.
...you learned about the box-sizing property in our box model lesson and you can use this knowledge when styling forms to ensure a consistent experience when
setting widths and heights on form elements.
... for consistency it is a good idea to
set margins and padding to 0 on all elements, then add these back in when styling particular controls button, input, select, textarea { box-sizing: border-box; padding: 0; margin: 0; } other useful
settings in addition to the rules mentioned above, you should also
set overflow: auto on <textarea>s to stop ie showing a scrollbar when there is no need for one: textarea { overflow: auto; } putting it all together into a "re
set" as a final step, we can wrap up the various properties discussed above into the following "form re
set" to provide a consistent base to work from.
...And 2 more matches
Overflowing content - Learn web development
the first example is a box that has been restricted by
setting a height.
... to crop content when it overflows, you can
set overflow: hidden.
...to just scroll on the y axis, you could use the overflow-y property,
setting overflow-y: scroll.
...And 2 more matches
Floats - Learn web development
agnis dis parturient montes, nascetur ridiculus mus.</p> body { width: 90%; max-width: 900px; margin: 0 auto; font: .9em/1.2 arial, helvetica, sans-serif } .box { float: left; margin-right: 15px; width: 150px; height: 150px; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } so let's think about how the float works — the element with the float
set on it (the <div> element in this case) is taken out of the normal layout flow of the document and stuck to the left-hand side of its parent container (<body>, in this case).
...try changing the float value to right and replace margin-right with margin-left in the last rule
set to see what the result is.
...this involves inserting some generated content after the box which contains the float and wrapping content, and
setting that to clear both.
...And 2 more matches
Beginner's guide to media queries - Learn web development
a
set of css rules that will be applied if the test passes and the media type is correct.
... media types the possible types of media you can specify are: all print screen speech the following media query will only
set the body to 12pt if the page is printed.
... "or" logic in media queries if you have a
set of queries, any of which could match, then you can comma separate these queries.
...And 2 more matches
Positioning - Learn web development
static positioning static positioning is the default that every element gets — it just means "put the element into its normal position in the document layout flow — nothing special to see here." to demonstrate this, and get your example
set up for future sections, first add a class of positioned to the second <p> in the html: <p class="positioned"> ...
...try
setting top: 0; bottom: 0; left: 0; right: 0; and margin: 0; on your positioned elements and see what happens!
...this is done by
setting positioning on one of the element's ancestors — to one of the elements it is nested inside (you can't position it relative to an element it is not nested inside).
...And 2 more matches
What text editors are available? - Learn web development
try digging through the
settings of your editor and read the manual or documentation to see what its capabilities are.
... in particular (if possible in your editor), try to: change syntax highlighting
settings and colors play with indentation width,
setting it to an appropriate
setting for your needs check autosave and session saving
settings configure any available plugins and investigate how to get new ones change color schemes adjust view
settings and see how you can change the layout of the views check what programming languages/technologies your editor supports while you're learning the default
settings of most text editors should be fine to use, but it is important to become familiar with your chosen tools, so you can select the best one for your usage.
...that means, if you've
set your heart on an obscure text editor, you may have to compile it from source yourself (not for the faint-hearted).
...And 2 more matches
Common questions - Learn web development
tools and
setup questions related to the tools/software you can use to build websites.
... every browser features a
set of devtools for debugging html, css, and other web code.
... how do you
set up a local testing server?
...And 2 more matches
CSS property compatibility table for form controls - Learn web development
text and font color[1] yes yes if the border-color property is not
set, some webkit based browsers will apply the color property to the border as well as the font on <textarea>s.
... on opera the border-radius property is applied only if an explicit border is
set.
... buttons see the button, submit, and re
set input types and the <button> element.
...And 2 more matches
ESLint
in order to help people write standard-compliant code from the start and avoid wasting time during code reviews, a
set of eslint configuration files have been added to the code base so that javascript can be analyzed automatically.
... running eslint eslint comprises of a
set of rules that are used to analyse the code for correctness and style consistency.
...
setting up eslint ./mach eslint --
setup running eslint eslint can be run via: ./mach lint -l eslint you can limit running it to a specific directory with: ./mach lint -l eslint browser/components or work directory changes: ./mach lint -l eslint -w or outgoing commits only: ./mach lint -l eslint -o see ./mach eslint --help for more options when running eslint.
...And 2 more matches
Frame script loading and lifetime
if you've
set allowdelayedload, the script is loaded into a new tab as soon as it is created.
... to listen for an event, when your frame script is unloaded (due to tab close for instance), you must
set the third argument of addmessagelistener to true.
... for example, from bootstrap.js: services.mm.addmessagelistener( 'my-addon-id', { receivemessage: function() { console.log('incoming message from frame script:', amsg.data); } }, true // must
set this argument to true, otherwise sending message from framescript will not work during and after the unload event on the contentmessagemanager triggers ); then in your frame script, listen for the unload event of the message manager (which is the global this), and sending a message.
...And 2 more matches
Using the Browser API
the html an <iframe> is turned into a browser iframe by
setting the mozbrowser attribute on it: <iframe src="http://mozilla.org" mozbrowser> in addition, the <iframe> can be loaded in its own child process — separate to the page embedding this frame — by including the remote attribute.
...we then
set the browser iframe's src attribute to equal the value of the url bar, which causes the new url to be loaded in the iframe.
...when this fires, we
set the value inside the url bar input to be equal to the event object detail property — this is so that the url displayed continues to match the website being shown when the user navigates back and forth through the history.
...And 2 more matches
Extending a Protocol
once it's compiled, ./mach run and you should be able to spin up the developer console and type: navigator.echo("hi!"); that will return a pending promise that never
settles.
... our goal is now to get that to
settle with the value we sent in.
... async echo(nscstring data) returns (nscstring aresult); - the "returns" here translates to a mozpromise, with a resolver that will
settle a promise with the expected value.
...And 2 more matches
Assert.jsm
cted, message); undefined notstrictequal(actual, expected, message); undefined throws(block, expected, message); promise rejects(promise, expected, message); undefined greater(lhs, rhs, message); undefined greaterorequal(lhs, rhs, message); undefined less(lhs, rhs, message); undefined lessorequal(lhs, rhs, message); undefined
setreporter(reporterfunc); undefined report(failed, actual, expected, message, operator); constructor creates a new assert object.
... ok, equal, notequal, deepequal, notdeepequal, strictequal, notstrictequal, throws,
setreporter, report methods ok() pure assertion tests whether a value is truthy, as determined by !!guard.
... undefined lessorequal( lhs, rhs, message ); parameters lhs the left hand side of the operator rhs the right hand side of the operator message short explanation of the expected result
setreporter()
set a custom assertion report handler function.
...And 2 more matches
Localizing XLIFF files for iOS
go through the full xliff page adding <target></target> below each <source> tag
set to help you to identify strings that need to be translated.
... do not delete the <source> tag
sets.
... <trans-unit id="add to bookmarks"> <source>add to bookmarks</source> <target>your_translation_here</target> </trans-unit> provide translations of the strings in the <source> tag
sets by placing their translations in the <target> tag
sets beneath them.
...And 2 more matches
Mozilla Style System
nsistylerule an nsistylerule is animmutable
set of css property-value pairs.
... computed style (front end) the interface that the front end exposes to the rest of mozilla consists of a single nsstyle
set object and many nsstylecontext objects, each of which holds the computed style for an element, pseudo-element, or text node.
... the style
set provides the api managing the rule processors and for creating style contexts.
...And 2 more matches
Mozilla Style System Documentation
the pres context forwards these calls to its style
set object (style
setimpl, interface nsistyle
set), which does the real work (and also maintains the lists of stylesheets and owns the rule tree).
... these methods may all return an existing style context rather than a new one (see style
setimpl::getcontext), if there is a current style context with the same parent, that matches the same rules (a check that is easy because of the ruletree), and is for the same pseudo-element (or not for a pseudo-element, or a "non-element").
...each of the structs includes either only features that are inherited by default or single properties that are
set to the initial value by default (see css26.1.1), which is essential for the ruletree.
...And 2 more matches
Optimizing Applications For NSPR
one can only determine the immediate
setting of daylight savings time, not what it would be at some arbitrary time in the past or the future.
... windows 3.1 does not support 64 bit file off
sets.
... the nspr 64 bit file off
set apis map to windows 3.1 32 bit file off
set apis.
...And 2 more matches
PR_Open
pr_append 0x10 the file pointer is
set to the end of the file prior to each write.
... pr_sync 0x40 if
set, each write will wait for both the file data and file status to be physically updated.
... mode when pr_create_file flag is
set and the file is created, these flags define the access permission bits of the newly created file.
...And 2 more matches
NSPR API Reference
introduction to nspr nspr naming conventions nspr threads thread scheduling
setting thread priorities preempting threads interrupting threads nspr thread synchronization locks and monitors condition variables nspr sample code nspr types calling convention types algebraic types 8-, 16-, and 32-bit integer types signed integers unsigned integers 64-bit integer types floating-point integer type native os integer types miscellaneous types size type pointer difference types boolean types status type for return values threads threading types and constants threading functions creating, joining, and identifying threads controlling thread priorities cont...
...rolling per-thread private data interrupting and yielding
setting global thread concurrency getting a thread's scope process initialization identity and versioning name and version constants initialization and cleanup module initialization locks lock type lock functions condition variables condition variable type condition variable functions monitors monitor type monitor functions cached monitors cached monitor functions i/o types directory type file descriptor types file info types network address types types used with socket options functions type used with memory-mapped i/o off
set interpretation for seek functions i/o functions functions that operate on pathnames functions that act on file descriptors directory i/o f...
...unctions socket manipulation functions converting between host and network addresses 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_atomic
set 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 pr...
...And 2 more matches
Build instructions for JSS 4.3.x
build instructions for jss 4.3.x newsgroup: mozilla.dev.tech.crypto before building jss, you need to
set up your system as follows: build nspr/nss by following the nspr/nss build instructions, to check that nss built correctly, run all.sh (in mozilla/security/nss/tests) and examine the results (in mozilla/test_results/security/computername.#/results.html.
... cvs co -r jss_4_3_1_rtm mozilla/security/jss or cvs co -r jss_4_3_rtm mozilla/security/jss
setup environment variables needed for compiling java source.
...note, on windows platforms it is best to have java_home
set to a directory path that doest not have spaces.
...And 2 more matches
JSS Provider Notes
if you do not wish the provider to be installed, create a cryptomanager.initializationvalues object,
set its installjssprovider field to false, and pass the initializationvalues object to cryptomanager.initialize().
... in order to use a different token, use cryptomanager.
setthreadtoken().
... this
sets the token to be used by the jss jca provider in the current thread.
...And 2 more matches
Mozilla-JSS JCA Provider notes
if you do not wish the provider to be installed, create a cryptomanager.initializationvalues object,
set its installjssprovider field to false, and pass the initializationvalues object to cryptomanager.initialize().
...in order to use a different token, use cryptomanager.
setthreadtoken().
... this
sets the token to be used by the jss jca provider in the current thread.
...And 2 more matches
NSS 3.14 release notes
the following functions have been added to the libssl library included in nss 3.14 ssl_versionrangeget (in ssl.h) ssl_versionrangegetdefault (in ssl.h) ssl_versionrangegetsupported (in ssl.h) ssl_versionrange
set (in ssl.h) ssl_versionrange
setdefault (in ssl.h) to better ensure interoperability with peers that support tls 1.1, nss has altered how it handles certain ssl protocol layer events.
... the following functions have been added to the libssl library included in nss 3.14: dtls_importfd (in ssl.h) dtls_gethandshaketimeout (in ssl.h) ssl_getsrtpcipher (in ssl.h) ssl_
setrtpciphers (in ssl.h) support for aes-gcm support for aes-gcm has been added to the nss pkcs #11 module (softoken), based upon the draft 7 of pkcs #11 v2.30.
...the defaults now better match the
set that most major web browsers enable by default.
...And 2 more matches
NSS 3.21 release notes
new in nss 3.21 new functionality certutil now supports a --rename option to change a nickname (bug 1142209) tls extended 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_option
set -
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.
... in ssl.h ssl_getpreliminarychannelinfo - obtains information about a tls channel prior to the handshake being completed, for use with the callbacks that are invoked during the handshake ssl_signaturepref
set - configures the enabled 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_signaturepref
set in utilpars.h nssutil_argparsemodulespecex - takes a module spec and breaks it into shared library string, module name stri...
... ckm_tls_kdf ck_tls_mac_params{_ptr} - parameters {or pointer} for ckm_tls_mac in sslt.h sslhashtype - identifies a hash function sslsignatureandhashalg - identifies a signature and hash function sslpreliminarychannelinfo - provides information about the session state prior to handshake completion new macros in nss.h nss_rsa_min_key_size - used with nss_option
set and nss_optionget to
set or get the minimum rsa key size nss_dh_min_key_size - used with nss_option
set and nss_optionget to
set or get the minimum dh key size nss_dsa_min_key_size - used with nss_option
set and nss_optionget to
set or get the minimum dsa key size in pkcs11t.h ckm_tls12_master_key_derive - derives tls 1.2 master secret ckm_tls12_key_and_mac_derive - derives tls...
...And 2 more matches
NSS 3.24 release notes
this mode is triggered by
setting the database password to the empty string.
... in fips mode, you may move from level 1 to level 2 (by
setting an appropriate password), but not the reverse.
...use this new function in place of ssl_configsecureserver, ssl_configsecureserverwithcertchain, ssl_
setstapledocspresponses, and ssl_
setsignedcerttimestamps.
...And 2 more matches
NSS 3.30 release notes
nss 3.30 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_30_rtm/src/ new in nss 3.30 new functionality in the pkcs#11 root ca module (nssckbi), cas with positive trust are marked with a new boolean attribute, cka_nss_mozilla_ca_policy,
set to true.
... applications that need to distinguish them from other other root cas, may use the exported function pk11_hasattribute
set.
... in pk11pub.h pk11_hasattribute
set - allows to check if a pkcs#11 object in a given slot has a specific boolean attribute
set.
...And 2 more matches
NSS 3.35 release notes
if a master password was
set on the dbm database, then the initial migration may be partial, and migration of keys from dbm to sql will be delayed, until this master password is provided to nss.
... the signatures of functions ssl_option
set, ssl_optionget, ssl_option
setdefault and ssl_optiongetdefault have been modified, to take a printn argument rather than prbool.
... in order to ease transitions, experimental functions return secfailure and
set the ssl_error_unsupported_experimental_api code if the selected api is not available.
...And 2 more matches
NSS 3.45 release notes
if no such certificates can be found, returns secsuccess and
sets *results to null.
... note: in 3.45 the sslchannelinfo is left unmodified, while an upcoming change in 3.46 will
set sslchannelinfo.authkeybits to that of the delegated credential for better policy enforcement.
... from fiat-crypto bug 1551129 - support static linking on windows bug 1552262 - expose a function pk11_findrawcertswithsubject for finding certificates with a given subject on a given slot bug 1546229 - add ipsec ike support to softoken bug 1554616 - add support for the elbrus lcc compiler (<=1.23) bug 1543874 - expose an external clock for ssl this adds new experimental functions: ssl_
settimefunc, ssl_createantireplaycontext, ssl_
setantireplaycontext, and ssl_releaseantireplaycontext.
...And 2 more matches
nss tech note8
that is, the client session lifetime was not separately
settable from the server session lifetime.
...there was no api function by which client programs could
set these values.
... for server programs, the function for initializing the server session cache would
set these two variables according to two of the arguments to that function.
...And 2 more matches
PKCS #11 Module Specs
a new ck_c_initialize_args structure is defined as typedef struct ck_c_initialize_args { ck_createmutex createmutex; ck_destroymutex destroymutex; ck_lockmutex lockmutex; ck_unlockmutex unlockmutex; ck_flags flags; ck_void_ptr libraryparameters; ck_void_ptr preserved; } ck_c_initialize_args; applications/libraries must
set libraryparameters to null if no parameter value is specified.
...
setting this flags means nss will not try to authenticate to the token when searching for certificates.
... this removes spurious password prompts, but if incorrectly
set it can also cause nss to miss certificates in a token until that token is explicitly logged in.
...And 2 more matches
NSC_InitToken
ckr_device_error: failed to re
set the key database.
... examples application usage nsc_inittoken() is used to re
set the password for the key database when the user forgets the password.
... the "re
set password" button of the mozilla application suite and seamonkey (in preferences->privacy & security->master passwords) calls nsc_inittoken().
...And 2 more matches
GC Rooting Guide
if you use these types directly, or create classes, structs or arrays that contain them, you must follow the rules
set out in this guide.
...js::mutablehandle<t> is exactly like a js::handle<t> except that it adds a .
set(t &t) method and must be created from a js::rooted<t> explicitly.
... if (!waserror) valueout.
set(resultvalue); return waserror; } void otherfunction(jscontext *cx) { js::rootedvalue value(cx); bool success = maybegetvalue(cx, &value); // ...
...And 2 more matches
JIT Optimization Outcomes
singleton one of the types present in the type
set was a singleton type, preventing the optimization from being enabled.
... inconsistentfieldoff
set the off
set of an unboxed field is not consistent across all the different types of objects it could be accessed from.
... accessnottypedarray accessnotstring statictypedarrayuint32 statictypedarraycantcomputemask outofbounds getelemstringnotcached nonnativereceiver indextype
setelemnondensenontanotcached nosimdjitsupport optimization failed because simd jit support was not enabled.
...And 2 more matches
JSErrorReport
callers should
set this flag for cross-origin scripts, and it will be propagated appropriately to child scripts and passed back in jserrorreports.
...a jserrorreporter might choose to ignore a jserrorreport that has this flag
set, since the exception may be caught and handled by javascript code.
...
set linebuf to point at the buffer before your application executes a script.
...And 2 more matches
JSFastNative
native methods must not call js_callee after calling js_
set_rval.
... native methods must not call js_this after calling js_
set_rval.
... native methods must not call js_this_object after calling js_
set_rval.
...And 2 more matches
JSNewResolveOp
jsnewresolveop is the type of the jsclass.resolve callback when the jsclass_new_resolve bit is
set in the jsclass.flags field.
...on success, the resolve hook must
set *objp to the object in which the property has been defined, or null if it was not defined.
...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.
...And 2 more matches
JSObjectOps.getProperty
jsobjectops.getproperty,
setproperty, and deleteproperty are high-level callbacks that implement object property accesses.
... each of these callbacks is responsible for everything involved with an individual property access operation, including: any locking necessary for thread safety; security checks; finding the property, including walking the prototype chain if needed; calling the lower-level jsclass hooks; calling getters or
setters; and actually getting,
setting, or deleting the property once it is found.
... contrast jsclass.getproperty, jsclass.
setproperty, and jsclass.delproperty, which are hooks called during property accesses and don't have to implement any of that.
...And 2 more matches
JSObjectOps.getRequiredSlot
the jsobjectops.getrequiredslot and
setrequiredslot callbacks get and
set a required slot—one that should already have been allocated.
... syntax typedef jsval (*jsgetrequiredslotop)(jscontext *cx, jsobject *obj, uint32 slot); typedef jsbool (*js
setrequiredslotop)(jscontext *cx, jsobject *obj, uint32 slot, jsval v); name type description cx jscontext * the js context in which we access the slot.
... v jsval the value to store in the slot, for js
setrequiredslotop.
...And 2 more matches
JS_GetGCParameter
syntax uint32_t js_getgcparameter(jsruntime *rt, jsgcparamkey key); void js_
setgcparameter(jsruntime *rt, jsgcparamkey key, uint32_t value); uint32_t js_getgcparameterforthread(jscontext *cx, jsgcparamkey key); // added in spidermonkeysidebar 17 void js_
setgcparameterforthread(jscontext *cx, jsgcparamkey key, uint32_t value); // added in spidermonkeysidebar 17 name type description rt jsruntime * the runtime to configure.
... key jsgcparamkey specifies which garbage collection parameter to get or
set.
... value uint32_t (js_
setgcparameter only) the value to assign to the parameter.
...And 2 more matches
JS_GetSecurityCallbacks
syntax /* added in spidermonkey 17 */ void js_
setsecuritycallbacks(jsruntime *rt, const jssecuritycallbacks *callbacks); const jssecuritycallbacks * js_getsecuritycallbacks(jsruntime *rt); /* obsolete since jsapi 13 */ jssecuritycallbacks * js_
setcontextsecuritycallbacks(jscontext *cx, jssecuritycallbacks *callbacks); jssecuritycallbacks * js_getruntimesecuritycallbacks(jsruntime *rt); jssecuritycallbacks * js_
setruntimesecuritycallbacks(jsruntime *rt, jssecuritycallbacks *callbacks); name type description rt jsruntime * a runtime to get/
set the security callbacks.
... description js_
setsecuritycallbacks
sets the runtime's security callbacks to callbacks.
... it allows the embedding to control certain aspects of js code execution based on security
settings of the global object the code is executed in.
...And 2 more matches
JS_NewGlobalObject
clasp->flags must have the jsclass_global_flags bits
set.
...it initially has no prototype either, since it is typically the first object created; call js_initstandardclasses to create all the standard objects, including object.prototype, and
set the global object's prototype.
...but this creates a problem for consumers that need to
set slots on the global to put it in a consistent state.
...And 2 more matches
JS_ScheduleGC
this article covers features introduced in spidermonkey 17
set nextscheduled parameter of gc.
...the gc zeal level of the associated jsruntime is
set.
... description js_schedulegc
sets the nextscheduled parameter of gc.
...And 2 more matches
Mozilla Projects
internet explorer supports the ability to make an entire document editable by
setting the designmode property of the document object; this is how midas is invoked in gecko.
... network security services network security services (nss) is a
set of libraries designed to support cross-platform development of security-enabled client and server applications.
... personal security manager (psm) personal security manager (psm) consists of a
set of libraries that perform cryptographic operations on behalf of a client application.
...And 2 more matches
Mork
at its core, it can be viewed as a
set of rows, collections of name-value pairs, which can be organized into various tables.
...the file is a collection of top-level structures, of which there exists four: dictionaries, tables, rows, and groups (change
sets).
...meta-rows do not appear to be used at all, although the parser seems to consider
setting the char
set, row scope, and atom scope.
...And 2 more matches
History Service Design
char
set for pages: allows
setting and reading char
set for each page.
... once the database connection has been
set-up the schema version of the database is checked.
...if a page can be added we first check if it exists already, then it is added or updated accordingly to the previous check, and common attributes are
set based on concurrent visit properties.
...And 2 more matches
extIPreferenceBranch
the root branch is
set based on the context of the owner.
... method overview boolean has(in astring aname) extipreference get(in astring aname) nsivariant getvalue(in astring aname, in nsivariant adefaultvalue) void
setvalue(in astring aname, in nsivariant avalue) void re
set() attributes attribute type description root readonly attribute astring the name of the branch root.
...
setvalue()
sets the value of a preference with the given name.
...And 2 more matches
XPCOM hashtable guide
a hashtable is a data construct that stores a
set of items.
... hashtables are useful for
sets of data that need swift random access; with non-integral keys or non-contiguous integral keys; or where items will be frequently added or removed.
... hashtables should not be used for
sets that need to be sorted; very small data
sets (less than 12-16 items); data that does not need random access.
...And 2 more matches
Detailed XPCOM hashtable guide
a hashtable is a data construct that stores a
set of items.
... hashtables are useful for
sets of data that need swift random access; with non-integral keys or non-contiguous integral keys; or where items will be frequently added or removed.
... hashtables should not be used for
sets that need to be sorted; very small data
sets (less than 12-16 items); data that does not need random access.
...And 2 more matches
Introduction to XPCOM for the DOM
interface to a
set of methods that manipulate an object (often represented by a class), without worrying about the details of the implementation.
... the attributes of the interface become two functions: a getter, and a
setter.
...the class that implements the interface has to explicitly implement each method and implement the
setter and the getter of each attribute defined on the interface.
...And 2 more matches
nsACString_internal
cii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar data members no public members.
... 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 off
set equals prbool equals(const nsacstring_internal&) const - source equality parameters nsacstring_internal& <anonymous> prbool equals(const nsacstring_internal&, const nscstringcomparator&) const - source parameters nsacstring_internal& <anonymous> nscstringcomparator& <anonymous> prbool equals(const char*) const - source parameters char* data prbool equals(const char*, cons...
...nt32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring_internal&, pruint32) - source parameters nsacstring_internal& str pruint32 pos void insert(const nscsubstringtuple&, pruint32) - source parameters nscsubstringtuple& tuple pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength
setcapacity void
setcapacity(pruint32) - source buffer sizing parameters pruint32 newcapacity
setlength void
setlength(pruint32) - source parameters pruint32 newlength truncate void truncate(pruint32) - source parameters pruint32 newlength getdata pruint32 getdata(const char**) const - source get a const pointer to the string's internal buffer.
...And 2 more matches
nsAString_internal
cii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar data members no public members.
...t32 i operator[] prunichar operator[](pruint32) const - source parameters pruint32 i first prunichar first() const - source last prunichar last() const - source countchar pruint32 countchar(prunichar) const - source parameters prunichar <anonymous> findchar print32 findchar(prunichar, pruint32) const - source parameters prunichar <anonymous> pruint32 off
set equals prbool equals(const nsastring_internal&) const - source equality parameters nsastring_internal& <anonymous> prbool equals(const nsastring_internal&, const nsstringcomparator&) const - source parameters nsastring_internal& <anonymous> nsstringcomparator& <anonymous> prbool equals(const prunichar*) const - source parameters prunichar* data prbool equals(const prunich...
...t32) - source parameters prunichar* data pruint32 pos pruint32 length void insert(const nsastring_internal&, pruint32) - source parameters nsastring_internal& str pruint32 pos void insert(const nssubstringtuple&, pruint32) - source parameters nssubstringtuple& tuple pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength
setcapacity void
setcapacity(pruint32) - source buffer sizing parameters pruint32 newcapacity
setlength void
setlength(pruint32) - source parameters pruint32 newlength truncate void truncate(pruint32) - source parameters pruint32 newlength getdata pruint32 getdata(const prunichar**) const - source get a const pointer to the string's internal buffer.
...And 2 more matches
nsDependentCSubstring
cii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsacstring_internal data members no public members.
... 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 off
set equals prbool equals(const nsacstring_internal&) const - source equality parameters nsacstring_internal& <anonymous> prbool equals(const nsacstring_internal&, const nscstringcomparator&) const - source parameters nsacstring_internal& <anonymous> nscstringcomparator& <anonymous> prbool equals(const char*) const - source parameters char* data prbool equals(const char*, cons...
...nt32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring_internal&, pruint32) - source parameters nsacstring_internal& str pruint32 pos void insert(const nscsubstringtuple&, pruint32) - source parameters nscsubstringtuple& tuple pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength
setcapacity void
setcapacity(pruint32) - source buffer sizing parameters pruint32 newcapacity
setlength void
setlength(pruint32) - source parameters pruint32 newlength truncate void truncate(pruint32) - source parameters pruint32 newlength getdata pruint32 getdata(const char**) const - source get a const pointer to the string's internal buffer.
...And 2 more matches
nsDependentSubstring
cii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut
setcapacity
setlength truncate getdata getmutabledata
setisvoid stripchar base classes nsastring_internal data members no public members.
...t32 i operator[] prunichar operator[](pruint32) const - source parameters pruint32 i first prunichar first() const - source last prunichar last() const - source countchar pruint32 countchar(prunichar) const - source parameters prunichar <anonymous> findchar print32 findchar(prunichar, pruint32) const - source parameters prunichar <anonymous> pruint32 off
set equals prbool equals(const nsastring_internal&) const - source equality parameters nsastring_internal& <anonymous> prbool equals(const nsastring_internal&, const nsstringcomparator&) const - source parameters nsastring_internal& <anonymous> nsstringcomparator& <anonymous> prbool equals(const prunichar*) const - source parameters prunichar* data prbool equals(const prunich...
...t32) - source parameters prunichar* data pruint32 pos pruint32 length void insert(const nsastring_internal&, pruint32) - source parameters nsastring_internal& str pruint32 pos void insert(const nssubstringtuple&, pruint32) - source parameters nssubstringtuple& tuple pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength
setcapacity void
setcapacity(pruint32) - source buffer sizing parameters pruint32 newcapacity
setlength void
setlength(pruint32) - source parameters pruint32 newlength truncate void truncate(pruint32) - source parameters pruint32 newlength getdata pruint32 getdata(const prunichar**) const - source get a const pointer to the string's internal buffer.
...And 2 more matches
mozIJSSubScriptLoader
method overview jsval loadsubscript(in string url, in object targetobj optional, in string char
set optional); jsval loadsubscriptwithoptions(in string url, in object options); methods loadsubscript() synchronously loads and executes the script from the specified url.
... jsval loadsubscript( in string url, in object targetobj optional, in string char
set 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.
... char
set an optional string to specify the character encoding of the file.
...And 2 more matches
nsIAnnotationObserver
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void onitemannotationremoved(in long long aitemid, in autf8string aname); void onitemannotation
set(in long long aitemid, in autf8string aname); void onpageannotationremoved(in nsiuri auri, in autf8string aname); void onpageannotation
set(in nsiuri apage, in autf8string aname); methods onitemannotationremoved() this method is called when an annotation is deleted for an item.
... onitemannotation
set() this method is called when an annotation value is
set for an item.
...void onitemannotation
set( in long long aitemid, in autf8string aname ); parameters aitemid the item on which the annotation is to be
set.
...And 2 more matches
nsIBrowserHistory
note: if removing fewer than 10 pages, calling this repeatedly is preferable over calling removepages(), since that's about the point at which the overhead of
setting up a batch operation doesn't make sense anymore.
... note: if removing fewer than 10 pages, calling removepage() repeatedly is preferable over calling this, since that's about the point at which the overhead of
setting up a batch operation doesn't make sense anymore.
... adobatchnotify obsolete since gecko 9.0 if
set to true, the beginupdatebatch and endupdatebatch events are sent; otherwise, no notification of changes to the history is provided.
...And 2 more matches
nsICollection
it provides basic operations on those items like: getting,
setting, appending, removing, and so on.
...ed in gecko 1.7 method overview void appendelement(in nsisupports item); void clear(); pruint32 count(); nsienumerator enumerate(); nsisupports getelementat(in pruint32 index); void queryelementat(in pruint32 index, in nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result); void removeelement(in nsisupports item); void
setelementat(in pruint32 index, in nsisupports item); methods appendelement() appends a new item to the collection.
...
setelementat() replaces an item at a specified index in the collection with a new one.
...And 2 more matches
nsICommandLineRunner
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsicommandline method overview void init(in long argc, in nscharptrarray argv, in nsifile workingdir, in unsigned long state); void run(); void
setwindowcontext(in nsidomwindow awindow); attributes attribute type description helptext autf8string process and combine the help text provided by each command-line handler.
...it assumes a native character
set.
... on windows the character
set is utf-8, not the native codepage.
...And 2 more matches
nsIContentPrefService
nsivariant agroup); nsipropertybag2 getprefsbyname(in astring aname); boolean haspref(in nsivariant agroup, in astring aname); void removegroupedprefs(); void removeobserver(in astring aname, in nsicontentprefobserver aobserver); void removepref(in nsivariant agroup, in astring aname); void removeprefsbyname(in astring aname); void
setpref(in nsivariant agroup, in astring aname, in nsivariant avalue); attributes attribute type description dbconnection mozistorageconnection the database connection to the content preferences database.
...
setpref()
sets the value of a preference for a particular uri.
... void
setpref( in nsivariant agroup, in astring aname, in nsivariant avalue ); parameters agroup the group for which to
set 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.
...And 2 more matches
nsIDOMChromeWindow
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void beginwindowmove(in nsidomevent mousedownevent); void getattention(); void getattentionwithcyclecount(in long acyclecount); void maximize(); void minimize(); void notifydefaultbuttonloaded(in nsidomelement defaultbutton); void restore(); void
setcursor(in domstring cursor); attributes attribute type description browserdomwindow nsibrowserdomwindow the related nsibrowserdomwindow instance which provides access to yet another layer of utility functions by chrome script.
...if
set to -1, cycles indefinitely until window is brought into the foreground.
...when this method is called on windows, gecko moves the mouse cursor to center of the button if the auto cursor snap
setting is enabled on the system.
...And 2 more matches
nsIDOMWindow
it represents a single window object that may contain child windows if the document in the window contains an html frame
set document, or if the document contains iframe elements.
... name domstring get or
set the name of this window.
... textzoom float get or
set the document scale factor as a multiplier of the default size.
...And 2 more matches
nsIINIParser
ini sections are * defined by square brakets and look like this: [
settings] * all entries below such a section definition belong to that * section (until the next section).
...function getinivalue (inifile, section, prop) { var inifact = components.manager.getclassobjectbycontractid( "@mozilla.org/xpcom/ini-parser-factory;1", components.interfaces.nsiiniparserfactory ); var iniparser = inifact.createiniparser(inifile); try { return iniparser.getstring(section,prop); } catch(e) { return undefined; } } // usage: var lang = getinivalue(file,"
setting","language"); enumerating sections this example gets a list of all the sections in the ini file.
... // get all sections in the ini file var sectenum = iniparser.getsections(); // save the sections in an array var sections = []; while (sectenum && sectenum.hasmore()) { var section = sectenum.getnext(); // add an array entry for each section sections.push(section); } enumerating keys this example shows how to fetch the values for all the keys in the section named "
setting".
...And 2 more matches
nsIINIParserWriter
once the writer object is created, you can use the
setstring() method to
set the value of a property within a given section; the section is created if it hasn't been yet.
... method overview void
setstring(in autf8string asection, in autf8string akey, in autf8string avalue); void writefile([optional] in nsifile ainifile, [optional] in unsigned long aflags); constants file writing constants these constants are specified when calling writefile(), in order to change its behavior.
... methods
setstring()
set the value of a property string for a particular section and key.
...And 2 more matches
nsILivemarkService
in astring name, in nsiuri siteuri, in nsiuri feeduri, in long index); nsiuri getfeeduri(in long long container); long long getlivemarkidforfeeduri(in nsiuri afeeduri); nsiuri getsiteuri(in long long container); boolean islivemark(in long long folder); void reloadalllivemarks(); void reloadlivemarkfolder(in long long folderid); void
setfeeduri(in long long container, in nsiuri feeduri); void
setsiteuri(in long long container, in nsiuri siteuri); void start(); void stopupdatelivemarks(); methods createlivemark() creates a new livemark.
...
setfeeduri() this method
sets the uri of the feed associated with a livemark container.
... void
setfeeduri( in long long container, in nsiuri feeduri ); parameters container the folder id of a livemark container.
...And 2 more matches
nsILocalFileMac
obsolete since gecko 1.9.2 boolean ispackage(); void launchwithdoc(in nsilocalfile adoctoload, in boolean alaunchinbackground); void opendocwithapp(in nsilocalfile aapptoopenwith, in boolean alaunchinbackground); void
setfiletypeandcreatorfromextension(in string aextension); obsolete since gecko 1.9.2 void
setfiletypeandcreatorfrommimetype(in string amimetype); obsolete since gecko 1.9.2 attributes attribute type description bundledisplayname astring returns the display name of the application bundle (usually the human readable name of the application) read only.
... constants constant value description current_process_creator 0x8000000 use with
setfiletype() to specify the signature of current process.
...
setfiletypeandcreatorfromextension() obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0)
sets the file type and creator code from a file extension internet config is used to determine the mapping.
...And 2 more matches
nsILoginManager
nsilogininfo logins); boolean getloginsavingenabled(in astring ahost); void modifylogin(in nsilogininfo oldlogin, in nsisupports newlogindata); void removealllogins(); void removelogin(in nsilogininfo alogin); void searchlogins(out unsigned long count, in nsipropertybag matchdata, [retval, array, size_is(count)] out nsilogininfo logins); void
setloginsavingenabled(in astring ahost, in boolean isenabled); methods addlogin() stores a new login in the login manager.
... note: this method will attempt to fill out the form regardless of the
setting of the signon.autofillforms preference.
...this works without a need for the master password, if one is
set.
...And 2 more matches
nsIMarkupDocumentViewer
obsolete since gecko 1.8 authorstyledisabled boolean disable entire author style level (including html presentation hints) bidicharacter
set octet whether to force the user's character
set 1 - use the document character
set 2 - use the character
set chosen by the user.
...1 - the default order for the char
set 2 - logical order 3 - visual order.
... defaultcharacter
set acstring forcecharacter
set acstring fullzoom float the amount by which to scale all lengths.
...And 2 more matches
nsIMsgCompFields
properties attribute type description attachments char * obsolete attachments obsolete, do not use anymore attachmentsarray nsisupportsarray readonly attachvcard prbool bcc astring body astring bodyisasciionly prbool cc astring character
set char * defaultcharacter
set char * readonly drafid char * dsn prbool fcc astring fcc2 astring followupto char * forcemsgencoding prbool forceplaintext prbool from astring hasrecipients prbool readonly new in thunderbird 23 i...
...(bug 68784) messageid char * needtocheckchar
set prbool indicates whether we need to check if the current documentchar
set can represent all the characters in the message body.
... it should be initialized to true and
set to false when 'send anyway' is selected by a user.
...And 2 more matches
Using CSS transforms - CSS: Cascading Style Sheets
css transforms are implemented using a
set of css properties that let you apply affine linear transformations to html elements.
... perspective the first element to
set is the perspective.
...
setting perspective this example shows a cube with the perspective
set at different positions.
...And 2 more matches
CSS values and units - CSS: Cascading Style Sheets
there are a common
set of data types -- values and units -- that css properties accept.
...be a <custom-ident>, so if we had a grid area named content we would use it without quotes: .item { grid-area: content; } in comparison, a data type that is a <string>, such as a string value of the content property, must be quoted: .item::after { content: "this is my content."; } while you can generally create any name you want, including using emojis, the identifier can't be none, un
set, initial, or inherit, start with a digit or two dashes, and generally you don't want it to be any other pre-defined css keyword.
... left | right | none | inline-start | inline-end such values are used without quotes: .box { float: left; } css-wide values in addition to the pre-defined keywords that are part of the specification for a property, all css properties accept the css-wide property values initial, inherit, and un
set, which explicitly specify defaulting behaviors.
...And 2 more matches
Value definition syntax - CSS: Cascading Style Sheets
css value definition syntax, a formal grammar, is used for defining the
set of valid values for a css property or function.
... in addition to this syntax, the
set of valid values can be further restricted by semantic constraints (for example, for a number to be strictly positive).
... the specific case of inherit, initial and un
set all css properties accept the keywords inherit, initial and un
set, that are defined throughout css.
...And 2 more matches
animation-delay - CSS: Cascading Style Sheets
it is often convenient to use the shorthand property animation to
set all animation properties at once.
... syntax /* single animation */ animation-delay: 3s; animation-delay: 0s; animation-delay: -1500ms; /* multiple animations */ animation-delay: 2.1s, 480ms; values <time> the time off
set, from the moment at which the animation is applied to the element, at which the animation should begin.
...for more information, see
setting multiple animation property values.
...And 2 more matches
border-bottom - CSS: Cascading Style Sheets
the border-bottom shorthand css property
sets an element's bottom border.
... it
sets the values of border-bottom-width, border-bottom-style and border-bottom-color.
... as with all shorthand properties, border-bottom always
sets the values of all of the properties that it can
set, even if they are not specified.
...And 2 more matches
border-image-source - CSS: Cascading Style Sheets
the border-image-source css property
sets the source image used to create an element's border image.
... syntax /* keyword value */ border-image-source: none; /* <image> values */ border-image-source: url(image.jpg); border-image-source: linear-gradient(to top, red, yellow); /* global values */ border-image-source: inherit; border-image-source: initial; border-image-source: un
set; values none no border image is used.
...it also applies to ::first-letter.inheritednocomputed valuenone or the image with its uri made absoluteanimation typediscrete formal syntax none | <image>where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...And 2 more matches
border-radius - CSS: Cascading Style Sheets
you can
set a single radius to make circular corners, or two radii to make elliptical corners.
... constituent properties this property is a shorthand for the following css properties: border-bottom-left-radius border-bottom-right-radius border-top-left-radius border-top-right-radius syntax /* the syntax of the first radius allows one to four values */ /* radius is
set for all 4 sides */ border-radius: 10px; /* top-left-and-bottom-right | top-right-and-bottom-left */ border-radius: 10px 5%; /* top-left | top-right-and-bottom-left | bottom-right */ border-radius: 2px 4px 2px; /* top-left | top-right | bottom-right | bottom-left */ border-radius: 1px 0 3px 4px; /* the syntax of the second radius allows one to four values */ /* (first radius values) / radius *...
...ght-and-bottom-left */ border-radius: 10px 5% / 20px 30px; /* (first radius values) / top-left | top-right-and-bottom-left | bottom-right */ border-radius: 10px 5px 2em / 20px 25px 30%; /* (first radius values) / top-left | top-right | bottom-right | bottom-left */ border-radius: 10px 5% / 20px 25em 30px 35em; /* global values */ border-radius: inherit; border-radius: initial; border-radius: un
set; the border-radius property is specified as: one, two, three, or four <length> or <percentage> values.
...And 2 more matches
box-direction - CSS: Cascading Style Sheets
/* keyword values */ box-direction: normal; box-direction: reverse; /* global values */ box-direction: inherit; box-direction: initial; box-direction: un
set; syntax the box-direction property is specified as one of the keyword values listed below.
... if the direction is
set using the element's dir attribute, then the style is ignored.
... formal definition initial valuenormalapplies toelements with a css display value of box or inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | reverse | inherit examples
setting box direction .example { /* bottom-to-top layout */ -moz-box-direction: reverse; /* mozilla */ -webkit-box-direction: reverse; /* webkit */ box-direction: reverse; /* as specified */ } specifications not part of any standard.
...And 2 more matches
box-sizing - CSS: Cascading Style Sheets
the box-sizing css property
sets how the total width and height of an element is calculated.
...this means that when you
set width and height, you have to adjust the value you give to allow for any border or padding that may be added.
...if you
set an element's width to 100 pixels, then the element's content box will be 100 pixels wide, and the width of any border or padding will be added to the final rendered width, making the element wider than 100px.
...And 2 more matches
cursor - CSS: Cascading Style Sheets
the cursor css property
sets the type of mouse cursor, if any, to show when the mouse pointer is over an element.
... syntax /* keyword value */ cursor: pointer; cursor: auto; /* url, with a keyword fallback */ cursor: url(hand.cur), pointer; /* url and coordinates, with a keyword fallback */ cursor: url(cursor1.png) 4 12, auto; cursor: url(cursor2.png) 2 2, pointer; /* global values */ cursor: inherit; cursor: initial; cursor: un
set; the cursor property is specified as zero or more <url> values, separated by commas, followed by a single mandatory keyword value.
...these will
set the cursor's hotspot, relative to the top-left corner of the image.
...And 2 more matches
<custom-ident> - CSS: Cascading Style Sheets
to prevent ambiguity, each property that uses <custom-ident> forbids the use of specific values: animation-name forbids the global css values (un
set, initial, and inherit), as well as none.
... counter-re
set counter-increment forbids the global css values (un
set, initial, and inherit), as well as none.
... @counter-style list-style-type forbids the global css values (un
set, initial, and inherit), as well as the values none, inline, and outside.
...And 2 more matches
direction - CSS: Cascading Style Sheets
the direction css property
sets the direction of text, table columns, and horizontal overflow.
... the property
sets the base text direction of block-level elements and the direction of embeddings created by the unicode-bidi property.
... it also
sets the default alignment of text, block-level elements, and the direction that cells flow within a table row.
...And 2 more matches
flex-basis - CSS: Cascading Style Sheets
the flex-basis css property
sets the initial main size of a flex item.
... it
sets the size of the content box unless otherwise
set with box-sizing.
... note: in case both flex-basis (other than auto) and width (or height in case of flex-direction: column) are
set for an element, flex-basis has priority.
...And 2 more matches
font-variant-alternates - CSS: Cascading Style Sheets
/* keyword values */ font-variant-alternates: normal; font-variant-alternates: historical-forms; /* functional notation values */ font-variant-alternates: stylistic(user-defined-ident); font-variant-alternates: style
set(user-defined-ident); font-variant-alternates: character-variant(user-defined-ident); font-variant-alternates: swash(user-defined-ident); font-variant-alternates: ornaments(user-defined-ident); font-variant-alternates: annotation(user-defined-ident); font-variant-alternates: swash(ident1) annotation(ident2); /* global values */ font-variant-alternates: initial; font-variant-alternates: inherit; font-v...
...ariant-alternates: un
set; the @font-feature-values at-rule can define names for alternative glyph functions (stylistic, style
set, character-variant, swash, ornament or annotation), associating the name with opentype parameters.
... style
set() this function enables stylistic alternatives for
sets of characters.
...And 2 more matches
font-variant-caps - CSS: Cascading Style Sheets
syntax /* keyword values */ font-variant-caps: normal; font-variant-caps: small-caps; font-variant-caps: all-small-caps; font-variant-caps: petite-caps; font-variant-caps: all-petite-caps; font-variant-caps: unicase; font-variant-caps: titling-caps; /* global values */ font-variant-caps: inherit; font-variant-caps: initial; font-variant-caps: un
set; the font-variant-caps property is specified using a single keyword value from the list below.
... accessibility concerns large sections of text
set with a font-variant value of all-small-caps or all-petite-caps may be difficult for people with cognitive concerns such as dyslexia to read.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps examples
setting the small-caps font variant html <p class="small-caps">firefox rocks, small caps!</p> <p class="normal">firefox rocks, normal caps!</p> css .small-caps { font-variant-caps: small-caps; font-style: italic; } .normal { font-variant-caps: normal; font-style: italic; } result specifications specification status comment css fonts module level 3the definition of 'font-var...
...And 2 more matches
font-variant-east-asian - CSS: Cascading Style Sheets
*/ font-variant-east-asian: traditional; /* <east-asian-variant-values> */ font-variant-east-asian: full-width; /* <east-asian-width-values> */ font-variant-east-asian: proportional-width; /* <east-asian-width-values> */ font-variant-east-asian: ruby full-width jis83; /* global values */ font-variant-east-asian: inherit; font-variant-east-asian: initial; font-variant-east-asian: un
set; syntax values normal this keyword leads to the deactivation of the use of such alternate glyphs.
... <east-asian-variant-values> these values specify a
set of logographic glyph variants which should be used for display.
...two values are possible: proportional-width activating the
set of east asian characters which vary in width.
...And 2 more matches
initial - CSS: Cascading Style Sheets
you should consider using the inherit, un
set, or revert keywords instead.
... examples using initial to re
set color for an element html <p> <span>this text is red.</span> <em>this text is in the initial color (typically black).</em> <span>this is red again.</span> </p> css p { color: red; } em { color: initial; } result specifications specification status comment css cascading and inheritance level 4the definition of 'initial' in that specification.
... see also use un
set to
set a property to its inherited value if it inherits, or to its initial value if not.
...And 2 more matches
left - CSS: Cascading Style Sheets
syntax /* <length> values */ left: 3px; left: 2.4em; /* <percentage>s of the width of the containing block */ left: 10%; /* keyword value */ left: auto; /* global values */ left: inherit; left: initial; left: un
set; values <length> a negative, null, or positive <length> that represents: for absolutely positioned elements, the distance to the left edge of the containing block.
... description the effect of left depends on how the element is positioned (i.e., the value of the position property): when position is
set to absolute or fixed, the left property specifies the distance between the element's left edge and the left edge of its containing block.
... (the containing block is the ancestor to which the element is relatively positioned.) when position is
set to relative, the left property specifies the distance the element's left edge is moved to the right from its normal position.
...And 2 more matches
list-style-image - CSS: Cascading Style Sheets
the list-style-image css property
sets an image to be used as the list item marker.
...because this property is inherited, it can be
set on the parent element (normally <ol> or <ul>) to let it apply to all list items.
... syntax /* keyword values */ list-style-image: none; /* <url> values */ list-style-image: url('starsolid.gif'); /* global values */ list-style-image: inherit; list-style-image: initial; list-style-image: un
set; values <url> location of image to use as the marker.
...And 2 more matches
list-style-type - CSS: Cascading Style Sheets
the list-style-type css property
sets the marker (such as a disc, character, or custom counter style) of a list item element.
...however, the list-style-type property may be applied to any element whose display value is
set to list-item.
... moreover, because this property is inherited, it can be
set on a parent element (commonly <ol> or <ul>) to make it apply to all list items.
...And 2 more matches
list-style - CSS: Cascading Style Sheets
the list-style css shorthand property allows you
set all the list style properties at once.
...because this property is inherited, it can be
set on a parent element (normally <ol> or <ul>) to make the same list styling apply to all the items inside.
... list-style-type syntax /* type */ list-style: square; /* image */ list-style: url('../img/shape.png'); /* position */ list-style: inside; /* type | position */ list-style: georgian inside; /* type | image | position */ list-style: lower-roman url('../img/shape.png') outside; /* keyword value */ list-style: none; /* global values */ list-style: inherit; list-style: initial; list-style: un
set; the list-style property is specified as one, two, or three keywords in any order.
...And 2 more matches
mask-border-source - CSS: Cascading Style Sheets
the mask-border-source css property
sets the source image used to create an element's mask border.
... syntax /* keyword value */ mask-border-source: none; /* <image> values */ mask-border-source: url(image.jpg); mask-border-source: linear-gradient(to top, red, yellow); /* global values */ mask-border-source: inherit; mask-border-source: initial; mask-border-source: un
set; values none no mask border is used.
... formal definition initial valuenoneapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specified, but with <url> values made absoluteanimation typediscrete formal syntax none | <image>where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...And 2 more matches
mask-size - CSS: Cascading Style Sheets
/* keywords syntax */ mask-size: cover; mask-size: contain; /* one-value syntax */ /* the width of the image (height
set to 'auto') */ mask-size: 50%; mask-size: 3em; mask-size: 12px; mask-size: auto; /* two-value syntax */ /* first value: width of the image, second value: height */ mask-size: 50% auto; mask-size: 3em 25%; mask-size: auto 6px; mask-size: auto auto; /* multiple values */ /* do not confuse this with mask-size: auto auto */ mask-size: auto, auto; mask-size: 50%, 25%, 25%; mask-size: 6px, auto, contain; /* global values */ mask-size: inherit; mask-size: initial; mask-size: un
set; note: if the value of this...
... property is not
set in a mask shorthand property that is applied to the element after the mask-size css property, the value of this property is then re
set to its initial value by the shorthand property.
... a <bg-size> can be specified in one of three ways: using the keyword contain using the keyword cover using width and height values to specify a size using width and height, you can supply one or two values: if only one value is given it
sets the width, with the height
set to auto.
...And 2 more matches
right - CSS: Cascading Style Sheets
syntax /* <length> values */ right: 3px; right: 2.4em; /* <percentage>s of the width of the containing block */ right: 10%; /* keyword value */ right: auto; /* global values */ right: inherit; right: initial; right: un
set; values <length> a negative, null, or positive <length> that represents: for absolutely positioned elements, the distance to the right edge of the containing block.
... description the effect of right depends on how the element is positioned (i.e., the value of the position property): when position is
set to absolute or fixed, the right property specifies the distance between the element's right edge and the right edge of its containing block.
... when position is
set to relative, the right property specifies the distance the element's right edge is moved to the left from its normal position.
...And 2 more matches
scroll-snap-type - CSS: Cascading Style Sheets
the scroll-snap-type css property
sets how strictly snap points are enforced on the scroll container in case there is one.
...* keyword values */ scroll-snap-type: none; scroll-snap-type: x; scroll-snap-type: y; scroll-snap-type: block; scroll-snap-type: inline; scroll-snap-type: both; /* optional mandatory | proximity*/ scroll-snap-type: x mandatory; scroll-snap-type: y proximity; scroll-snap-type: both mandatory; /* etc */ /* global values */ scroll-snap-type: inherit; scroll-snap-type: initial; scroll-snap-type: un
set; syntax values none when the visual viewport of this scroll container is scrolled, it must ignore snap points.
...if content is added, moved, deleted or resized the scroll off
set will be adjusted to maintain the resting on that snap point.
...And 2 more matches
text-decoration-style - CSS: Cascading Style Sheets
the text-decoration-style css property
sets the style of the lines specified by text-decoration-line.
... the style applies to all lines that are
set with text-decoration-line.
... when
setting multiple line-decoration properties at once, it may be more convenient to use the text-decoration shorthand property instead.
...And 2 more matches
text-decoration - CSS: Cascading Style Sheets
the text-decoration shorthand css property
sets the appearance of decorative lines on text.
... values text-decoration-line
sets the kind of decoration used, such as underline or line-through.
... text-decoration-color
sets the color of the decoration.
...And 2 more matches
transition-delay - CSS: Cascading Style Sheets
syntax /* <time> values */ transition-delay: 3s; transition-delay: 2s, 4ms; /* global values */ transition-delay: inherit; transition-delay: initial; transition-delay: un
set; values <time> denotes the amount of time to wait between a property's value changing and the start of the transition effect.
...: width height background-color font-size left top color; transition-duration:2s; transition-delay:0.5s; transition-timing-function: linear; } function updatetransition() { var el = document.queryselector("div.box"); if (el) { el.classname = "box1"; } else { el = document.queryselector("div.box1"); el.classname = "box"; } return el; } var intervalid = window.
setinterval(updatetransition, 7000); transition-delay: 1s <div class="parent"> <div class="box">lorem</div> </div> .parent { width: 250px; height:125px;} .box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; -webkit-transition-property: width height background-color font-size left top color;...
...ty: width height background-color font-size left top color; transition-duration:2s; transition-delay:1s; transition-timing-function: linear; } function updatetransition() { var el = document.queryselector("div.box"); if (el) { el.classname = "box1"; } else { el = document.queryselector("div.box1"); el.classname = "box"; } return el; } var intervalid = window.
setinterval(updatetransition, 7000); transition-delay: 2s <div class="parent"> <div class="box">lorem</div> </div> .parent { width: 250px; height:125px;} .box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; -webkit-transition-property: width height background-color font-size left top color; ...
...And 2 more matches
will-change - CSS: Cascading Style Sheets
browsers may
set up optimizations before an element is actually changed.
... /* keyword values */ will-change: auto; will-change: scroll-position; will-change: contents; will-change: transform; /* example of <custom-ident> */ will-change: opacity; /* example of <custom-ident> */ will-change: left, top; /* example of two <animateable-feature> */ /* global values */ will-change: inherit; will-change: initial; will-change: un
set; proper usage of this property can be a bit tricky: don't apply will-change to too many elements.
...find some way to predict at least slightly ahead of time that something will change, and
set will-change then.
...And 2 more matches
writing-mode - CSS: Cascading Style Sheets
the writing-mode css property
sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress.
... when
set for an entire document, it should be
set on the root element (html element for html documents).
... syntax /* keyword values */ writing-mode: horizontal-tb; writing-mode: vertical-rl; writing-mode: vertical-lr; /* global values */ writing-mode: inherit; writing-mode: initial; writing-mode: un
set; the writing-mode property is specified as one of the values listed below.
...And 2 more matches
X-Frame-Options - HTTP
examples note:
setting x-frame-options inside the <meta> element is useless!
... x-frame-options works only by
setting through the http header, as in the examples below.
... configuring apache to configure apache to send the x-frame-options header for all pages, add this to your site's configuration: header always
set x-frame-options "sameorigin" to configure apache to
set the x-frame-options deny, add this to your site's configuration: header
set x-frame-options "deny" configuring nginx to configure nginx to send the x-frame-options header, add this either to your http, server or location configuration: add_header x-frame-options sameorigin always; configuring iis to configure iis to send the x-frame-options header, add this to your site's web.config file: <system.webserver> ...
...And 2 more matches
Network Error Logging - HTTP
include_subdomains if true, the policy applies to all subdomains under the origin that the policy header is
set.
... the reporting group should also be
set to include subdomains, if this option is to be enabled.
....com/previous-page", "body": { "elapsed_time": 338, "method": "post", "phase": "application", "protocol": "http/1.1", "referrer": "https://example.com/previous-page", "sampling_fraction": 1, "server_ip": "137.205.28.66", "status_code": 400, "type": "http.error", "url": "https://example.com/bad-request" } } dns name not resolved note that the phase is
set to dns in this report and no server_ip is available to include.
...And 2 more matches
Grammar and types - JavaScript
javascript is case-sensitive and uses the unicode character
set.
... in web pages, the global object is window, so you can
set and access global variables using the window.variable syntax.
...when you create an array using an array literal, it is initialized with the specified values as its elements, and its length is
set to the number of arguments specified.
...And 2 more matches
Arrow function expressions - JavaScript
this.age = 0;
setinterval(function growup() { // in non-strict mode, the growup() function defines `this` // as the global object (because it's where growup() is executed.), // which is different from the `this` // defined by the person() constructor.
... function person() { var that = this; that.age = 0;
setinterval(function growup() { // the callback refers to the `that` variable of which // the value is the expected object.
... thus, in the following code, the this within the function that is passed to
setinterval has the same value as the this in the lexically enclosing function: function person(){ this.age = 0;
setinterval(() => { this.age++; // |this| properly refers to the person object }, 1000); } var p = new person(); relation with strict mode given that this comes from the surrounding lexical context, strict mode rules with regard to this are ignored.
...And 2 more matches
DataView() constructor - JavaScript
syntax new dataview(buffer [, byteoff
set [, bytelength]]) parameters buffer an existing arraybuffer or sharedarraybuffer to use as the storage backing the new dataview object.
... byteoff
set optional the off
set, in bytes, to the first byte in the above buffer for the new view to reference.
... exceptions rangeerror thrown if the byteoff
set or bytelength parameter values result in the view extending past the end of the buffer.
...And 2 more matches
Date.parse() - JavaScript
this function is useful for
setting date values based on string values, for example in conjunction with the
settime() method and the date object.
...when the time zone off
set is absent, date-only forms are interpreted as a utc time and date-time forms are interpreted as local time.
...therefore date objects produced using those strings may represent different moments in time depending on the version of ecmascript supported unless the system is
set with a local time zone of utc.
...And 2 more matches
Object.freeze() - JavaScript
description nothing can be added to or removed from the properties
set of a frozen object.
... for data properties of a frozen object, values cannot be changed, the writable and configurable attributes are
set to false.
... accessor properties (getters and
setters) work the same (and still give the illusion that you are changing the value).
...And 2 more matches
Comparing Reflect and Object methods - JavaScript
n/a
set() n/a reflect.
set() returns true if the property was
set successfully on the object and false if it was not.
...
setprototypeof() object.
setprototypeof() returns the object itself if its prototype was
set successfully.
... throws a typeerror if the prototype being
set was anything other than an object or null, or if the prototype for the object being modified is non-extensible.
...And 2 more matches
RegExp.prototype.exec() - JavaScript
javascript regexp objects are stateful when they have the global or sticky flags
set (e.g.
... if the match fails, the exec() method returns null, and
sets lastindex to 0.
... note that the lastindex property will not be re
set when searching a different string, it will start its search at its existing lastindex .
...And 2 more matches
String.prototype.replace() - JavaScript
off
set the off
set of the matched substring within the whole string being examined.
... (the exact number of arguments depends on whether the first argument is a regexp object—and, if so, how many parenthesized submatches it specifies.) the following example will
set newstring to 'abc - 12345 - #$*%': function replacer(match, p1, p2, p3, off
set, string) { // p1 is nondigits, p2 digits, and p3 non-alphanumerics return [p1, p2, p3].join(' - '); } let newstring = 'abc12345#$*%'.replace(/([^\d]*)(\d*)([^\w]*)/, replacer); console.log(newstring); // abc - 12345 - #$*% examples defining the regular expression in replace() in the following example, the reg...
... function stylehyphenformat(propertyname) { function uppertohyphenlower(match, off
set, string) { return (off
set > 0 ?
...And 2 more matches
TypedArray.from() - JavaScript
description typedarray.from() lets you create typed arrays from: array-like objects (objects with a length property and indexed elements); or iterable objects (objects where you can get its elements, such as map and
set).
...hence, when working with proxy objects, it calls handler.
set to create new elements rather than handler.defineproperty().
... 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.
...And 2 more matches
WeakMap - JavaScript
setting elements on this map would involve pushing a key and value onto the end of each of those arrays simultaneously.
... such an implementation would have two main inconveniences: the first one is an o(n)
set and search (n being the number of keys in the map) since both operations must iterate through the list of keys to find a matching value.
... weakmap.prototype.
set(key, value)
sets the value for the key in the weakmap object.
...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.
... function havees2015duplicatepropertysemantics() { 'use strict'; try { ({prop: 1, prop: 2}); // no error thrown, duplicate property names allowed in strict mode return true; } catch(e) { // error thrown, duplicates prohibited in strict mode return false; } } method definitions a property of an object can also refer to a function or a getter or
setter method.
... 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
<mtable> - MathML
note: the <mtable> element re
sets the displaystyle attribute to false.
... if you want to use this element as an inline-block, you might want to
set <mtable displaystyle="true">...</mtable>.
... displaystyle a boolean value specifying whether more vertical space is used for displayed equations or, if
set to false, a more compact layout is used to display formulas.
...And 2 more matches
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
this article explains a change that has occured in the way sizes are worked out on web documents when width and height attributes are
set on them.
...ers when the container becomes narrower than the image, developers started using css like the following: img { max-width: 100%; height: auto; } this is really useful for responsive layouts, but unfortunately it causes the jank problem to return — the above css overrides the width and height attribute information, meaning that if the image has not loaded for some reason, its height will be
set to 0.
...when such an element has width and height attributes
set on it, its aspect ratio will be calculated before load time, and be available to the browser.
...And 2 more matches
CSS and JavaScript animation performance - Web Performance
css animations, on the other hand, allow developers to make animations between a
set of starting property values and a final
set rather than between two states.
... css animations consist of two components: a style describing the css animation, and a
set of key frames that indicate the start and end states of the animation's style, as well as possible intermediate points.
...compared to
settimeout()/
setinterval(), which need a specific delay parameter, requestanimationframe() is much more efficient.
...And 2 more matches
Performance fundamentals - Web Performance
for example, the user taps a "
settings" button to transition into an application configuration screen, or a
settings menu "pops up".
... use css animations and transitions instead of using some library’s animate() function, which probably currently uses many badly performing technologies (window.
settimeout() or top/left positioning, for example) use css animations.
... css animations give you very granular control over your effects using keyframes, and you can even watch events fired during the animation process in order to handle other tasks that need to be performed at
set points in the animation process.
...And 2 more matches
Recommended Web Performance Timings: How long is too long? - Web Performance
there are no clear
set rules as to what constitutes a slow pace when loading pages, but there are specific guidelines for indicating content will load (1 second), idling (50ms), animating (16.7s) and responding to user input (50 to 200ms).
... the first as
set retrieved from a request is usually an html document, which then makes calls for additional as
sets.
... as noted in the description of the critical rendering path, when received, browsers immediately start processing the html, rendering the content as it is received rather than waiting for additional as
sets to load.
...And 2 more matches
Mobile first - Progressive web apps (PWAs)
we consider the overall experience during the planning stage, look at what sub
set of features will be available on mobile, desktop, etc.
...this way, mobile devices don't have to load as
sets and other information twice.
... one word of warning about this technique though - positioning doesn't work as expected on elements with display: table
set on them.
...And 2 more matches
requiredFeatures - SVG: Scalable Vector Graphics
twentynine elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <circle>, <clippath>, <cursor>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <
set>, <svg>, <switch>, <text>, <textpath>, <tref>, <tspan>, <use> html, body, svg { height: 100%; } text { fill: white; } <svg viewbox="0 0 250 45" xmlns="http://www.w3.org/2000/svg"> <g> <rect fill="forestgreen" x="10" y="10" height="25" width="230" /> <text x="20" y="27">requiredfeatures supported</text> </g> <g requiredfeatures=""> <rect fill="crimson" x="10" y="10" he...
...in some cases the feature strings map directly to a
set of attributes, properties or elements, in others they represent some functionality of the browser.
... http://www.w3.org/tr/svg11/feature#basictext the browser supports the <text> element http://www.w3.org/tr/svg11/feature#paintattribute the browser supports the color, fill, fill-rule, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width, color-interpolation and color-rendering attributes http://www.w3.org/tr/svg11/feature#basicpaintattribute the browser supports the color, fill, fill-rule, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width and color-rendering attributes http://www.w3.org/tr/svg11/...
...And 2 more matches
spreadMethod - SVG: Scalable Vector Graphics
to see the effects of this attribute, you will need to
set the size of the gradient smaller than the shape.
... examples of spreadmethod with linear gradients svg <svg width="220" height="150" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="padgradient" x1="33%" x2="67%"> <stop off
set="0%" stop-color="fuchsia"/> <stop off
set="100%" stop-color="orange"/> </lineargradient> <lineargradient id="reflectgradient" spreadmethod="reflect" x1="33%" x2="67%"> <stop off
set="0%" stop-color="fuchsia"/> <stop off
set="100%" stop-color="orange"/> </lineargradient> <lineargradient id="repeatgradient" spreadmethod="repeat" ...
... x1="33%" x2="67%"> <stop off
set="0%" stop-color="fuchsia"/> <stop off
set="100%" stop-color="orange"/> </lineargradient> </defs> <rect fill="url(#padgradient)" x="10" y="0" width="200" height="40"/> <rect fill="url(#reflectgradient)" x="10" y="50" width="200" height="40"/> <rect fill="url(#repeatgradient)" x="10" y="100" width="200" height="40"/> </svg> result notice that the middle third of each gradient is the same.
...And 2 more matches
to - SVG: Scalable Vector Graphics
five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <
set> html, body, svg { height: 100%; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="100" height="100"> <animate attributetype="xml" attributename="width" fill="freeze" from="100" to="150" dur="3s"/> </rect> </svg> animate, animatecolor, animatemotion, animatetransform for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>, to specifies the ending value of the animation.
...
set for the <
set> element, to specifies the value for the attribute during the duration of the element.
... specifications specification status comment svg animations level 2the definition of 'to for <
set>' in that specification.
...And 2 more matches
transform-origin - SVG: Scalable Vector Graphics
the transform-origin svg attribute
sets the origin for an item’s transformations.
...rcentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?where <length-percentage> = <length> | <percentage> default value 50%, 50% animatable yes the transform-origin property may be specified using one, two, or three values, where each value represents an off
set.
... off
sets that are not explicitly defined are re
set to their corresponding initial values.
...And 2 more matches
Clipping and masking - SVG: Scalable Vector Graphics
<svg width="200" height="200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <lineargradient id="gradient"> <stop off
set="0" stop-color="black" /> <stop off
set="1" stop-color="white" /> </lineargradient> <mask id="mask"> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" /> </mask> </defs> <rect x="0" y="0" width="200" height="200" fill="green" /> <rect x="0" y="0" width="200" height="200" fill="red" mask="url(#mask)" /> </svg> you see a green-filled rect at the lowes...
...as a result the pixels of the red rectangle use the luminance value of the mask content as the alpha value (the transparency), and we see a green-to-red gradient as a result: screenshotlive sample transparency with opacity there is a simple possibility to
set the transparency for a whole element.
...hence, if you
set a stroke opacity on an element, that also has a fill, the fill will shine through on half of the stroke, while on the other half the background will appear: <svg width="200" height="200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <rect x="0" y="0" width="200" height="200" fill="blue" /> <circle cx="100" cy="100" r="50" stroke="yellow" stroke-width="40" stroke-opacity=".5"...
...And 2 more matches
Types of attacks - Web security
cookies that are used for sensitive actions (such as session cookies) should have a short lifetime with the samesite attribute
set to strict or lax.
...this may happen by stealing a cookie for an existing session, or by fooling the user (or their browser) into
setting a cookie with a predetermined session id.
... session fixation a third party is able to determine a user’s session identifier (i.e., by reading it or
setting it), and therefore interact with the server as that user.
...And 2 more matches
Using shadow DOM - Web Components
as an example, consider the following html fragment: <!doctype html> <html> <head> <meta char
set="utf-8"> <title>simple dom example</title> </head> <body> <section> <img src="dinosaur.png" alt="a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth."> <p>here we will add a link to the <a href="https://www.mozilla.org/">mozilla homepage</a></p> </section> </body> </html> th...
... you can affect the nodes in the shadow dom in exactly the same way as non-shadow nodes — for example appending children or
setting attributes, styling individual nodes using element.style.foo, or adding style to the entire shadow dom tree inside a <style> element.
...h a value of open or closed: let shadow = elementref.attachshadow({mode: 'open'}); let shadow = elementref.attachshadow({mode: 'closed'}); open means that you can access the shadow dom using javascript written in the main page context, for example using the element.shadowroot property: let myshadowdom = mycustomelem.shadowroot; if you attach a shadow root to a custom element with mode: closed
set, you won't be able to access the shadow dom from the outside — mycustomelem.shadowroot returns null.
...And 2 more matches
Compiling from Rust to WebAssembly - WebAssembly
rust environment
setup let's go through all the required steps to get our environment
set up.
... building our webassembly npm package enough
setup; let's create a new package in rust.
... whenever you want to call javascript functions, you can add them to this file, and wasm-bindgen takes care of
setting everything up for you.
...And 2 more matches
Classes and Inheritance - Archive of obsolete content
the problem is that when we overrode the prototype of circle with an object whose prototype is the prototype of shape, we didn't correctly
set its constructor property.
... this property is
set automatically for the prototype property of a constructor, but not for objects created with object.create.
...class uses this information to automatically
set up the prototype chain of the constructor.
...x, y, radius) { shape.prototype.initialize.call(this, x, y); this.radius = radius; }, draw: function (context) { context.beginpath(); context.arc(this.x, this.y, this.radius, 0, 2 * math.pi, false); context.fill(); } }); unlike the definition of circle in the previous section, we no longer have to override its prototype, or
set its constructor property.
page-worker - Archive of obsolete content
so you can rewrite the above code like this: pageworker = require("sdk/page-worker").page({ contentscript: "console.log(document.body.innerhtml);", contenturl: "./myfile.html" }); you can load a new page by
setting the page worker's contenturl property.
...see working with content scripts for help on
setting this property.
...
setting it loads the content immediately.
... include a
set of match patterns to define the urls which the page-worker's content script will be applied.
passwords - Archive of obsolete content
usage a credential is the
set of information a user supplies to authenticate herself with a service.
... you pass it any sub
set of the possible properties a credential can contain.
... so if you pass in an empty
set of properties, all stored credentials are returned: function show_all_passwords() { require("sdk/passwords").search({ oncomplete: function oncomplete(credentials) { credentials.foreach(function(credential) { console.log(credential.username); console.log(credential.password); }); } }); } if you pass it a single property, only credentials matching that property are returned: function show_passwords_for_joe() { require("sdk/passwords").search({ username: "joe", oncomplete: function oncomplete(credentials) { credentials.foreach(function(credential) { console.log(credential.usernam...
...w.example.com", formsubmiturl: "http://login.example.com", username: "joe", usernamefield: "uname", password: "secret123", passwordfield: "pword" }); to store an http authentication credential: require("sdk/passwords").store({ url: "http://www.example.com", realm: "exampleco login", username: "joe", password: "secret123", }); see "credentials" above for more details on how to
set these properties.
core/heritage - Archive of obsolete content
class module exports class utility function for making constructor functions with a proper prototype chain
setup in declarative manner: var { class } = require('sdk/core/heritage'); var dog = class({ initialize: function initialize(name) { this.name = name; }, type: 'dog', bark: function bark() { return 'ruff!
... ruff!' } }); note: we use term class to refer an exemplar constructs in a form of constructor functions with a proper prototype chain
setup.
...as a matter of fact since result is just a plain constructor function with proper prototype chain
setup you could sub-class it as any other constructor: function labrador() { // ...
...as mentioned before you could pass constructors that were not created using class function as long as they have proper prototype
setup.
tabs/utils - Archive of obsolete content
globals functions activatetab(tab, window)
set the specified tab as the active, or selected, tab.
... clo
setab(tab) close the specified tab.
... returns string :
settabtitle(tab, title)
set the title of the document hosted by the specified tab, or the tab's label if the tab doesn't host a document.
...
settaburl(tab, url)
set the specified tab's url.
Low-Level APIs - Archive of obsolete content
chrome the chrome module gives an add-on sdk add-on access to the components object, which in turn gives it access to a large
set of privileged low-level firefox apis.
... system/environment access,
set and clear environment variables.
... test/harness test harness
setup and execution.
... test/runner
sets up unit tests.
Bookmarks - Archive of obsolete content
ervice(components.interfaces.nsibookmarksservice); // create the bookmark bmsvc.createbookmarkincontainer(win.document.title, // bookmark name win.location.href.tostring(), // uri of the bookmark null, // shortcut win.document.title, // description win.document.character
set, // char
set null, // postdata bookmarksservice.getbookmarkstoolbarfolder(), // bookmark folder 0); // index in the folder firefox 3 firefox 3 provides a reworked
set of api for working with history and bookmarks.
... the item title to change the title of a bookmark or bookmark folder, you use the nsinavbookmarksservice.
setitemtitle() method.
... bmsvc.
setitemtitle(newbkmkid, "new title"); this
sets the title of the item referenced by the id newbkmkid to "new title".
... var parentfolderid = bmsvc.getfolderidforitem(newbkmkid); observing changes to bookmarks and tags to
set up an observer to listen for changes related to bookmarks, you will need to create an nsinavbookmarkobserver object and use the nsinavbookmarksservice.addobserver() and nsinavbookmarksservice.removeobserver() methods.
Forms related code snippets - Archive of obsolete content
date picker (before implementing it in a working environment, please read the note about the const statement compatibility) <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; char
set=utf-8" /> <title>datepicker example - mdn</title> <script type="text/javascript"> /*\ |*| |*| datepicker example mdndeveloper network |*| |*| https://developer.mozilla.org/docs/code_snippets/forms |*| https://developer.mozilla.org/user:fusionchess |*| |*| this snippet is released under the gnu public license, version 3 or later.
...{ oth = document.createelement("th"); oth.innerhtml = sdays[nthid]; ohrow.appendchild(oth); } othead.appendchild(ohrow); ocapt.appendchild(odecryear); ocapt.appendchild(odecrmonth); ocapt.appendchild(oincryear); ocapt.appendchild(oincrmonth); ocapt.appendchild(this.display); this.container.appendchild(ocapt); this.container.appendchild(othead); this.current.
setdate(1); this.writedays(); otarget.onclick = function () { if (otable.parentnode) { otable.parentnode.removechild(otable); return; } otable.style.zindex = nzindex++; otable.style.position = "absolute"; otable.style.left = otarget.off
setleft + "px"; otable.style.top = (otarget.off
settop + otarget.off
setheight) + "px"; otarget.parent...
..."
setmonth" : "
setyear"](othiscal.current[bismonth ?
...if you want to emulate an editable select through a <field
set> of radioboxes and textboxes (written in pure css, without javascript), please see this example.
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
it was specified in 1998 by w3c, the organization that
sets standards for web-related technologies.
... nevertheless, the rise of web services like google maps, which used javascript and asynchronous communications, created an awareness of a
set of technologies nicknamed ajax (asynchronous javascript and xml); that plus the advent of a number of libraries that paper over implementation differences between different web browsers has more recently led to a re-evaluation of javascript as a programming language.
...listing 4 shows an example that deletes the second child element of the element with the "toolbar" id, adds a new button element as a substitute, and
sets a label attribute.
... listing 4: an example manipulation using the dom var bar = document.getelementbyid('toolbar'); bar.removechild(bar.childnodes[1]); bar.appendchild(document.createelement('button')); bar.lastchild.
setattribute('label', 'hello!'); « previousnext » ...
Appendix F: Monitoring DOM changes - Archive of obsolete content
often times, this must be used in combination with a slight delay, or even polling, via
settimeout, for cases where the url change happens before the page is fully loaded.
... */ if ('mozcsskeyframerule' in window || 'csskeyframerule' in window) { var watchnodes = function watchnodes(selector, callback, doc) { const event = watchnodes.prefix + (watchnodes._i++); const xhtml = 'http://www.w3.org/1999/xhtml'; doc = doc || document; let style = doc.createelementns(xhtml, 'style'); style.
setattribute('type', 'text/css'); let preamble = ' @-moz-keyframes ' + event + ' { \n\ from { clip: rect(1px, auto, auto, auto); } to { clip: rect(0px, auto, auto, auto); } \n\ }\n'; let properties = [ 'animation-duration: 0.0001s;', 'animation-name: ' + event + ' !important;' ]; properties = properties.map(function (pr...
...for instance, when using the selector div:not([foo-binding-done]), you can detach your binding by running this.
setattribute("foo-binding-done", true) in your constructor.
...for instance, if you need to know about attribute changes to a particular node, then you should replace its
setattribute method with a function that calls the original
setattribute function as original
setattribute.apply(this, arguments) before running your necessary event code.
Session store API - Archive of obsolete content
in order to properly restore your extension's state when a tab is restored, it needs to use the session store api's
settabvalue() method to save any data it will need in order to restore its state, and then call gettabvalue() to retrieve the previous
setting when the tab is restored.
... if you want to
set permissions or otherwise manipulate a restored tab before the page is loaded into it, you should watch sstabrestoring.
... var ss = components.classes["@mozilla.org/browser/sessionstore;1"] .getservice(components.interfaces.nsisessionstore); var currenttab = gbrowser.selectedtab; var datatoattach = "i want to attach this"; ss.
settabvalue(currenttab, "key-name-here", datatoattach); this code
sets the value of the key "key-name-here" to datatoattach.
...however seamonkey reuses the browser element (up to the undo close tab limit) which means that you can
set state on the browser element and it will be restored with the tab.
Using Dependent Libraries In Extension Components - Archive of obsolete content
// assume that we're in <extensiondir>/components, and we want to find // <extensiondir>/libraries nscomptr<nsifile> libraries; rv = alocation->getparent(getter_addrefs(libraries)); if (ns_failed(rv)) return rv; nscomptr<nsilocalfile> library(do_queryinterface(libraries)); if (!library) return ns_error_unexpected; library->
setnativeleafname(ns_literal_cstring("libraries")); library->appendnative(ns_literal_cstring("dummy")); // loop through and load dependent libraries for (char const *const *dependent = kdependentlibraries; *dependent; ++dependent) { library->
setnativeleafname(nsdependentcstring(*dependent)); prlibrary *lib; library->load(&lib); // 1) we don't care if this failed!
... } library->
setnativeleafname(ns_literal_cstring(krealcomponent)); prlibrary *lib; rv = library->load(&lib); if (ns_failed(rv)) return rv; nsgetmoduleproc getmoduleproc = (nsgetmoduleproc) pr_findfunctionsymbol(lib, ns_get_module_symbol); if (!getmoduleproc) return ns_error_failure; return getmoduleproc(acompmgr, alocation, aresult); } extensions/stub/bdsstubloader.cpp (for mac os x) the code as written above won't work for mac os x.
... // assume that we're in <extensiondir>/components, and we want to find // <extensiondir>/libraries nscomptr<nsifile> libraries; rv = alocation->getparent(getter_addrefs(libraries)); if (ns_failed(rv)) return rv; nscomptr<nsilocalfile> library(do_queryinterface(libraries)); if (!library) return ns_error_unexpected; library->
setnativeleafname(ns_literal_cstring("libraries")); library->appendnative(ns_literal_cstring("dummy")); nscstring path; // loop through and load dependent libraries for (char const *const *dependent = kdependentlibraries; *dependent; ++dependent) { library->
setnativeleafname(nsdependentcstring(*dependent)); rv = library->getnativepath(path); if (ns_failed(rv)) return rv; //...
... } library->
setnativeleafname(ns_literal_cstring(krealcomponent)); rv = library->getnativepath(path); if (ns_failed(rv)) return rv; const mach_header * componentlib = nsaddimage(path.get(), nsaddimage_option_return_on_error | nsaddimage_option_with_searching | nsaddimage_option_match_filename_by_installname); if (componentlib == null) return ns_error_unexpected; //find the nsgetmodu...
Same-origin policy for file: URIs - Archive of obsolete content
this load can occur through a subframe, link, location
set, call to window.open(), or the like.
... for example, if the file /home/user/foo.html is a frame
set and one of the frames is /home/user/subdir/bar.html, the frame and frame
set are considered to share the same origin.
... on the other hand, if the file /home/user/subdir/foo.html is a frame
set and the frame is /home/user/bar.html, the frame and frame
set are considered to have different origins.
... the new security.fileuri.strict_origin_policy preference, which defaults to true, can be
set to false if the user doesn't want to strictly enforce the same origin policy on file: uris.
Creating a Firefox sidebar extension - Archive of obsolete content
chrome/content/firefoxoverlay.xul <?xml version="1.0"?> <!doctype overlay system "chrome://emptysidebar/locale/emptysidebar.dtd"> <overlay id="emptysidebaroverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <menupopup id="viewsidebarmenu"> <menuitem key="key_openemptysidebar" observes="viewemptysidebar" /> </menupopup> <key
set id="mainkey
set"> <key id="key_openemptysidebar" command="viewemptysidebar" key="&openemptysidebar.commandkey;" modifiers="&openemptysidebar.modifierskey;" /> </key
set> <broadcaster
set id="mainbroadcaster
set"> <broadcaster id="viewemptysidebar" label="&emptysidebar.title;" autocheck="false" type="checkbox" ...
... group="sidebar" sidebarurl="chrome://emptysidebar/content/emptysidebar.xul" sidebartitle="&emptysidebar.title;" oncommand="togglesidebar('viewemptysidebar');" /> </broadcaster
set> </overlay> the overlay file consists of three entries, the menu definition, shortcut keys and the broadcaster.
... if the sidebar is not going to have a command-key, one can remove the openemptysidebar.commandkey and openemptysidebar.modifierskey keys from the dtd, remove the <key
set> from the firefoxoverlay.xul file.
... one must then
set the key attribute of the menuitem to "".
Exception logging in JavaScript - Archive of obsolete content
exception reporting in firefox 3 firefox 3 improves reporting of unhandled exceptions by establishing a
set of rules that determines whether or not an exception is worth reporting: any methods on interfaces annotated with the [function] attribute in idl (see, for example, nsidomeventlistener) that throw exceptions always report those exceptions into the error console.
...first, you can
set the boolean preference dom.report_all_js_exceptions.
...alternatively, you can
set the environment variable moz_report_all_js_exceptions.
... it doesn't matter what value you
set this to (it can even be 0).
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
we then
set the channel's nsiloadgroup to the one from the window context.
... openchannel returns to openuri which just opens the channel,
setting the nsdocumentopeninfo as the stream listener.
...first it checks whether the channel has "content-disposition: attachment"
set.
...this creates a new nsdocumentopeninfo object and
sets it as the output streamlistener of the converter.
Layout System Overview - Archive of obsolete content
the presentation shell also owns the root of the style system, the style
set.
... in many cases the presentation shell provides pass-through methods to the style
set, and generally uses the style
set to do style resolution and style sheet management.
...for this overview, the frames, style
set, and reflow queue are the most important high-level parts of the presentation shell.
...block frame reflow state reflow metrics space manager style
set stylecontext see also layout faq document history 05/20/2002 - marc attinasi: created, wrote highest level introduction to general layout concepts, links to relevant specs and existing documents.
Java in Firefox Extensions - Archive of obsolete content
.net.url's, pass to java.net.urlclassloader to get a class loader, and finally pass the classloader and array to a function which gives the necessary privileges: // this function will be called to give the necessary privileges to your jar files // however, the policy never comes into play, because // (1) adding permissions doesn't add to the policy itself, and // (2) addurl alone does not
set the grant codebase function policyadd (loader, urls) { try { //if have trouble with the policy try changing it to //edu.mit.simile.javafirefoxextensionutils.url
setpolicy var str = 'edu.mit.simile.javafirefoxextensionutils.url
setpolicy'; var policyclass = java.lang.class.forname( str, true, loader ); ...
... var policy = policyclass.newinstance(); policy.
setouterpolicy(java.security.policy.getpolicy()); java.security.policy.
setpolicy(policy); policy.addpermission(new java.security.allpermission()); for (var j=0; j < urls.length; j++) { policy.addurl(urls[j]); } }catch(e) { alert(e+'::'+e.linenumber); } } //get extension folder installation path...
...ng var myjarpath = extensionurl + "/java/testjava.jar"; // seems you don't actually have to replace the backslashes as they work as well var urlarray = []; // build a regular javascript array (liveconnect will auto-convert to a java array) urlarray[0] = new java.net.url(myjarpath); urlarray[1] = new java.net.url(classloaderjarpath); var cl = java.net.urlclassloader.newinstance(urlarray); //
set security policies using the above policyadd() function policyadd(cl, urlarray); now you can begin using liveconnect, including referencing the classes in your jars.
...one example seems to be the fact that the "java" global is not immediately available if the extension operates in a sidebar (using
settimeout solved it at least).
Simple Storage - Archive of obsolete content
for the most part this object is like any other javascript object, and a jetpack can
set whatever properties it wants on it.
...function updatejetpackmenu() { jetpack.menu.
set({ label: "notes", menu: new jetpack.menu(notes.length > 0 ?
...:( jetpack.menu.context.page.beforeshow = function (menu) { menu.re
set(); if (jetpack.selection.text) menu.add({ label: "note", command: function () { notes.unshift(jetpack.selection.text); if (notes.length > 20) notes.pop(); updatejetpackmenu(); } }); }; // initialize the jetpack menu with the current notes.
... updatejetpackmenu(); see also
settings jep 11 ...
Message Summary Database - Archive of obsolete content
nsimsgdatabase is an abstraction on top of mdb, which is a
set of db interfaces.
...this includes a
set of per-message flags, the more commonly used headers (e.g., subject, sender, from, to, cc, date, etc), and a few other attributes, e.g., keywords.
... there are a
set of generic property methods so that core code and extensions can
set attributes on msg headers without changing nsimsghdr.idl.msg threads we store thread information persistently in the database and expose these object through the [nsimsgthread interface.
...and we only pay the storage cost for a property if the row has the property
set.
Nanojit - Archive of obsolete content
internally to nanojit, another
set of filters operates on the lir as it passes from the lirbuffer toward the assembler.
... figuring out how to compile it is left as an exercise for the reader; the following works when run in the object directory of an --enable-debug spidermonkey shell: g++ -ddebug -g3 -wno-invalid-off
setof -fno-rtti -include js-confdefs.h -i dist/include/ -i..
... #include <stdio.h> #include <stdint.h> #include "jsapi.h" #include "jstracer.h" #include "nanojit.h" using namespace nanojit; const uint32_t cache_size_log2 = 20; static avmplus::gc gc = avmplus::gc(); static avmplus::avmcore core = avmplus::avmcore(); int main() { logcontrol lc; #ifdef debug lc.lcbits = lc_readlir | lc_assembly; #else lc.lcbits = 0; #endif //
set up the basic nanojit objects.
... lins *rec_ins = out.insskip(sizeof(guardrecord) + sizeof(sideexit)); guardrecord *guard = (guardrecord *) rec_ins->payload(); mem
set(guard, 0, sizeof(*guard)); sideexit *exit = (sideexit *)(guard + 1); guard->exit = exit; guard->exit->target = f; f->lastins = out.insguard(lir_loop, out.insimm(1), rec_ins); // compile the fragment.
Proxy UI - Archive of obsolete content
camino configured in os (networking preferences) (recently added - some support for reading os and account
settings.)ui elements preferences panel overview the ui is based on selecting a proxy mode, then filling out any additional needed information in "related" ui.
...for example, firefox 3: [ ] no proxy [ ] auto-detect proxy
settings for this network [ ] manual proxy configuration: [ ] automatic proxy configuration url: behavior default value: "no proxy" is selected all other "type" radio buttons are enabled, but not selected.
... the radio buttons do not map to the proxy type in order (due the evolution of the ui): proxy mode "network.proxy.type" no proxy (direct) network.proxy.type=0 auto-detect proxy
settings...
...selecting an enabled item
sets the menu selection and the proxy mode (network.proxy.type) selecting a disabled item is not allowed.
RDF Datasource How-To - Archive of obsolete content
the "rdf universe" consists of a
set of statements about internet resources; for example, "my home page was last modified april 2nd", or "that news article was sent by bob".
...deciding on a vocabulary the vocabulary is the
set of properties that you will use to express relationships between elements (resources and literals) in your data model.
...typically, you provide a parser for reading in some sort of static storage (e.g., a data file); the parser translates the datafile into a series of calls to assert() to
set up the in-memory datasource.
...you may also need to choose this implementation if the data
set which your datasource is modeling is too large to fit in to memory (e.g., the entire file system structure).
Tamarin Build System Documentation - Archive of obsolete content
the smoke phase runs a
set of tests on each platform until 2 minute is exceeded.
... the
set of smoke tests can contain any shell build and any test suite (including performance).
...; cd scripts edit environment.sh, change the basedir and buildsdir
settings (around line 51) basedir=~/hg/tamarin-redux (path to my test repository) (next line) buildsdir=~/hg/builds (a directory to store downloaded builds) always
set current working directory to the scripts directory when running a script run a script (e.g.) ../all/run-acceptance-release.sh <optional hg revision number like 1902> how do i navigate the build status page?
...uildstep and result the left side contains the time column and the user/revision link to represent the revision triggering a build, mouse over the user to see the revision and submission notes each buildstep run on a slave is a box with color indicating status, red is failed, green passed, yellow has warnings click the stdio link to see the output click on the build yellow box at the bottom of a
set of buildsteps to see the result of all of the buildsteps for a build and the time each buildstep took scroll down to see previous builds triggered at the bottom of the page click on the [next page] link to display more previous builds what are the goals of the build system (qos)?
The new nsString class implementation (1999) - Archive of obsolete content
static void ensurecapacity(nsstrimpl& astring,pruint32 anewlength); static void growcapacity(nsstrimpl& astring,pruint32 anewlength); static void append(nsstrimpl& adest,const nsstrimpl& asource,pruint32 anoff
set,print32 acount); static void appendcstring(nsstrimpl& adest,const char* asource,pruint32 anoff
set,print32 acount); static void assign(nsstrimpl& adest,const nsstrimpl& asource,pruint32 anoff
set,print32 acount); static void assigncstring(nsstrimpl& adest,const char* asource,pruint32 anoff
set,print32 acount); // assign a char or a substring into the existing string...
... static void insert(nsstrimpl& adest,pruint32 adestoff
set, const nsstrimpl& asource,pruint32 asrcoff
set,print32 acount); static void insertcstring(nsstrimpl& adest,pruint32 adestoff
set, const char* asource,pruint32 asrcoff
set,print32 acount); static void insertchar(nsstrimpl& adest,pruint32 adestoff
set,char thechar); static void insertchar(nsstrimpl& adest,pruint32 adestoff
set,prunichar theunichar); static void insertchar(nsstrimpl& adest,pruint32 adestoff
set,print32 thequadchar); static void delete(nsstrimpl& adest,pruint32 adestoff
set,pruint32 acount); static void truncate(nsstrimpl& adest,pruint32 adestoff
set); static print32 compare(const nsstrimpl& adest,const nsstrimpl& asource, print32 acount,...
...first, nsstrimpl offers char
set conversion hooks for use during construction, comparison and assignment.
...to wit: they want to ensure that the underlying buffers cannot be corrupted or altered erroneously they want to ensure that the appropriate
set of conversion functions get applied they want some control over the usage pattern of strings, such that the 2-byte (ucs2) form is used whenever possible, and some restrictions are applied to the use of 1-byte (ascii) nscstrings.
XML in Mozilla - Archive of obsolete content
mozilla will read internal (dtd) sub
sets, and in special circumstances external dtds as explained above and will use this information to recognize id type attributes, default attribute values, and general entities.
...the public identifiers that are recognized are: -//w3c//dtd xhtml 1.0 transitional//en -//w3c//dtd xhtml 1.1//en -//w3c//dtd xhtml 1.0 strict//en -//w3c//dtd xhtml 1.0 frame
set//en -//w3c//dtd xhtml basic 1.0//en -//w3c//dtd xhtml 1.1 plus mathml 2.0//en -//w3c//dtd xhtml 1.1 plus mathml 2.0 plus svg 1.1//en -//w3c//dtd svg 20001102//en -//wapforum//dtd xhtml mobile 1.0//en xml linking and pointing xml linking support includes xml base and simple xlinks.
...there is no ui for
setting this pref yet, so you will need to manually edit the preferences file.
...we don't use that always, so if you want to avoid doing duplicate work you could start working on bugs that have future milestone, or otherwise have a milestone that is
set way into the future.
Mac stub installer - Archive of obsolete content
the mac stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...ll/wizard/mac/> the mac stub installer source code resides at: <http://lxr.mozilla.org/seamonkey/sou...izard/mac/src/> how do we get
setup to debug the mac installer?
... how we get
setup to debug the xpinstall engine from the mac installer?
...to do this, in addition to the above steps to
set up the mac installer to debug you will need to do the following: create a file named xpcom.xpi with the shared libraries in the structure described under the [xpcom] section in: <http://lxr.mozilla.org/seamonkey/sou...ackages-mac#33> note that if you are using the debug target of the installer binary all shared libraries are expected to have the name format <libname>debug.shlb now
set a break point at xpi_init() in the mac installer code and step into xpistub and eventually the xpinstall engine will load including symbols so you can
set a break point in the xpinstal...
...then add the componentx into the appropriate
setup types so the installer module installs when users select the
setup types you choose it to be in.
Unix stub installer - Archive of obsolete content
the unix stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...ard/unix/src2/> how do we get
setup to debug the unix stub installer?
... how we get
setup to debug the xpinstall engine from the unix stub installer?
... debug using "gdb mozilla-installer-bin" and
set a breakpoint at xpi_init().
...then add the componentx into the appropriate
setup types so the installer module installs it when users select the
setup types you choose it to be in.
Methods - Archive of obsolete content
setrootkey changes the root key being accessed.
...
setvalue
sets the value of an arbitrary key.
...
setvaluenumber
sets the value of a key, when that value is an integer.
...
setvaluestring
sets the value of a key, when that value is a string.
WinReg Object - Archive of obsolete content
when you construct a winreg object, it is
set to operate with hkey_classes_root as its root key.
... to use a different root key, use the
setrootkey method.
...to manipulate such values, use the getvaluestring and
setvaluestring methods.
... to manipulate other values, use the getvalue and
setvalue methods.
A XUL Bestiary - Archive of obsolete content
the parts of the document, such as the head, the links, the body, any tags, are available as nodes whose attributes can be got and
set.
... in briefest terms, xul is the xml-based language used for creating interfaces, xptoolkit is the
set of xul widgets (menus, toolbar, etc.) actually assembed for this purpose -- the building blocks of the interface, as it were -- and xpfe, the cross platform front end, is the front end that has been created from xptoolkit.
... the differences here are significant: xul is the universe of elements, attributes, syntax, rules, and relationships, while xptoolkit is really the finite
set of interface-specific elements created in xul.
...if, however, you write event handlers inside event listeners, as we will describe shortly, you can use these events to
set off other actions.
panel.consumeoutsideclicks - Archive of obsolete content
if it is not
set, it defaults to the platform behavior.
... if it
set to true the rollup event is consumed.
... if
set to false, the rollup event is not consumed.
... this attribute should be used instead of
setconsumerollupevent.
findbar - Archive of obsolete content
for example, the standard findbar in firefox 3.5 looks like this on the mac: you may attach a findbar to a particular browser element by either
setting the findbar's browserid attribute to the id of the browser element before the findbar element is bound, or by
setting the findbar's browser property to the browser element itself.
... you should use the browser property to get and
set this value from a script.
...wevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width browser type: browser element lets you
set and get the browser in which the findbar is located.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata close() return type: no return value closes the notification or findbar and removes it from its enclosing notificationbox or findbar.
Methods - Archive of obsolete content
« xul reference home acceptdialog additemtoselection addpane addprogresslistener addsession addtab addtabsprogresslistener advance advanceselectedtab appendcustomtoolbar appendgroup appenditem appendnotification blur cancel canceldialog centerwindowonscreen checkadjacentelement clearresults clearselection click close collap
setoolbar contains decrease decreasepage docommand ensureelementisvisible ensureindexisvisible ensureselectedelementisvisible expandtoolbar extra1 extra2 focus getbrowseratindex getbrowserfordocument getbrowserfortab getbrowserindexfordocument getbutton getdefaultsession geteditor getelementsbyattribute getelementsbyattributens getformattedstring gethtmleditor getindexoffir...
...chat getselecteditem getsession getsessionbyname getsessionresultat getsessionstatusat getsessionvalueat getstring goback gobackgroup godown goforward goforwardgroup gohome goto gotoindex goup hidepopup increase increasepage insertitem insertitemat invertselection loadgroup loadonetab loadtabs loaduri loaduriwithflags makeeditable movebyoff
set moveto movetoalertposition onsearchcomplete ontextentered ontextreverted openpopup openpopupatscreen opensubdialog openwindow preferenceforelement reload reloadalltabs reloadtab reloadwithflags removeallitems removeallnotifications removealltabsbut removecurrentnotification removecurrenttab removeitemat removeitemfromselection removenotification remov...
...eprogresslistener removesession removetab removetabsprogresslistener removetransientnotifications replacegroup re
set rewind scrollbyindex scrollbypixels scrolltoindex select selectall selectitem selectitemrange selecttabatindex
setselectionrange showpane showpopup sizeto startediting stop stopediting swapdocshells syncsessions timedselect toggleitemselection related dom element methods dom:element.addeventlistener dom:element.appendchild dom:element.comparedocumentposition dom:element.dispatchevent dom:element.getattribute dom:element.getattributenode dom:element.getattributenodens dom:element.getattributens dom:element.getelementsbytagname dom:element.getelementsbytagnamens dom:element.getfeature fixme: brokenlink ...
....haschildnodes dom:element.insertbefore dom:element.isequalnode dom:element.issamenode dom:element.issupported dom:element.lookupnamespaceuri dom:element.lookupprefix dom:element.normalize dom:element.removeattribute dom:element.removeattributenode dom:element.removeattributens dom:element.removechild dom:element.removeeventlistener dom:element.replacechild dom:element.
setattribute dom:element.
setattributenode dom:element.
setattributenodens dom:element.
setattributens dom:element.
setuserdata ...
Extensions - Archive of obsolete content
the insertbefore attribute is
set to 'tools-menu' to ensure that the new menu is added at the right place.
...while the popup is open, the gcontextmenu global variable is
set to an object which handles all of the functionality specific to the firefox context menu.
... specifically, this object is initialized with a
set of properties that indiciate the type of object that was the target of the context menu.
... for instance, the 'onlink' property is
set to true when a link was context-clicked.
Actions - Archive of obsolete content
the id attribute of the new element will be
set to the same value of the member variable, ?relateditem.
...since the first result has a value of 'http://www.xulplanet.com/rdf/b' for the ?relateditem variable, the id will be
set to this value.
...additional content the previous example generated only a
set of buttons, but the action body may contain additional content.
...the effect will be a toolbar with a
set of three buttons inside it.
Recursive Generation - Archive of obsolete content
« previousnext » in the previous example, the template builder generated an extra
set of two buttons for the second row.
... however, the labels on the second
set of buttons are different than the first
set.
...this extra arrow which neither b or d have causes an extra
set of buttons to be created.
...<hbox id="http://www.xulplanet.com/rdf/c"> <button label="http://www.xulplanet.com/rdf/a"/> <button label="http://www.xulplanet.com/rdf/c"/> <hbox id="http://www.xulplanet.com/rdf/d"> <button label="http://www.xulplanet.com/rdf/c"/> <button label="http://www.xulplanet.com/rdf/d"/> </hbox> </hbox> the recursive nature of templates has useful applications in menus and trees so that
sets of iterative content can be generated automatically.
Things I've tried to do with XUL - Archive of obsolete content
:) silver: if you
set height="0" and include "overflow: hidden" on each box that is sharing the space, current gecko will quite happily split the space out according to flex, ignoring the contents of each box, as desired.
...a workaround for that is to create the element, insert it in the document and
set its style attribute with a -moz-binding property, all of that from c++ instead of js.
... multi-column listboxes when adding items to multi-column listboxes, you can't use the appenditem api: // auto-create and attach 1st cell var row = mylistbox.appenditem( label, value ); // create and attach 2nd cell var cell = document.createelement('listcell'); cell.
setattribute('label', label2 ); cell.
setattribute('value', value2 ); row.appendchild( cell ); // etc // ...
...instead, you must build up your own listitem full of listcells, and then add that listitem to the listbox, using generic dom calls: var row = document.createelement('listitem'); // create and attach 1st cell var cell = document.createelement('listcell'); cell.
setattribute('label', label ); cell.
setattribute('value', value ); row.appendchild( cell ); // create and attach 2nd cell cell = document.createelement('listcell'); cell.
setattribute('label', label2 ); cell.
setattribute('value', value2 ); row.appendchild( cell ); // etc // ...
Adding Event Handlers - Archive of obsolete content
by
setting this value to true, non-standard, poorly written, or syntax prone to cause logic errors are logged to the javascript console.
...various properties are
set on the event object such as the mouse position, the key that was pressed, and so forth.
...the target is useful when using a bubbling event so that you could have a
set of buttons which are all handled by a single script.
...you can also listen during the bubbling phase by
setting the last argument to false.
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
a common reason to
set handlers is to modify the custom properties when an event occurs.
...the button attribute should be
set to either 0 for the left mouse button, 1 for the middle mouse button or 2 for the right mouse button.
...this should be
set to one of the values
set below: alt the user must press the alt key.
... if
set, the handler is only called when the modifier is pressed.
Adding Methods to XBL-defined Elements - Archive of obsolete content
instead, you must call the document's getanonymousnodes() method: var value=document.getanonymousnodes(element); here, 'element' should be
set to a reference to the element that you want to get the anonymous content of.
...tle(true)"/> <button label="hide" oncommand="document.getelementbyid('num').showtitle(false)"/> xbl: <binding id="labeledbutton"> <content> <xul:label xbl:inherits="value=title"/> <xul:label xbl:inherits="value"/> </content> <implementation> <method name="showtitle"> <parameter name="state"/> <body> if (state) { document.getanonymousnodes(this)[0].
setattribute("style", "visibility: visible"); } else { document.getanonymousnodes(this)[0].
setattribute("style", "visibility: collapse"); } </body> </method> </implementation> </binding> two buttons added to the xul have oncommand handlers which are used to change the visibility of the label.
.../> <xul:label xbl:inherits="value"/> <xul:button label="show" oncommand="document.getbindingparent(this).showtitle(true);"/> <xul:button label="hide" oncommand="document.getbindingparent(this).showtitle(false);"/> </content> <implementation> <method name="showtitle"> <parameter name="state"/> <body> if (state) { document.getanonymousnodes(this)[0].
setattribute("style","visibility: visible"); } else { document.getanonymousnodes(this)[0].
setattribute("style","visibility: collapse"); } </body> </method> </implementation> </binding> the oncommand handlers here first get a reference to their parent bound element.
...it is used to initialize the content such as loading preferences or
setting the default values of fields.
Box Objects - Archive of obsolete content
about mozilla layout mozilla divides things into two
sets of trees, the content tree and the layout tree.
...these properties will return an empty string if the width or height attributes or properties were not
set already.
...this may be a bit confusing, but, the key is to remember that the width and height properties on an element return the size that was
set in the xul while the width and height properties of the box object return the current size.
...if this is
set to reverse, all of the children in the box are displayed in reverse order.
Commands - Archive of obsolete content
additionally, if you
set the disabled attribute on the command, the command will be disabled and it will not be invoked.
... example: toggling command disabled example 2 : source view <command id="cmd_openhelp" oncommand="alert('help');"/> <button label="help" command="cmd_openhelp"/> <button label="more help" command="cmd_openhelp"/> <button label="disable" oncommand="document.getelementbyid('cmd_openhelp').
setattribute('disabled','true');"/> <button label="enable" oncommand="document.getelementbyid('cmd_openhelp').removeattribute('disabled');"/> in this example, both buttons use the same command.
... when the disable button is pressed, the command is disabled by
setting its disabled attribute, and both buttons will be disabled as well.
... it is normal to put a group of commands inside a command
set element, together near the top of the xul file, as in the following: <command
set> <command id="cmd_open" oncommand="alert('open!');"/> <command id="cmd_help" oncommand="alert('help!');"/> </command
set> a command is invoked when the user activates the button or other element attached to the command.
More Menu Features - Archive of obsolete content
by
setting its value to checkbox, the menu item can be checked on and off by selecting the menu item.
... menu with radios in addition to standard checks, you can create the radio style of checks by
setting the type to a value of radio.
...in order to group a
set of menu items together, you need to put a name attribute on each one to group.
...
set the value to the same string.
Stack Positioning - Archive of obsolete content
so if you
set a left attribute to 400, the stack will have a width around 400 pixels plus the width of the element.
... width and height the bottom and right attributes can also be used in conjunction with top and left to
set the width and/or height of the children of the stack.
... when using these attributes to
set width or height, both attributes for the given axis must be explicitly
set, eg, if
setting width, both "left" and "right" must be
set.
...--> </hbox> </stack> in some case,
setting the width or height this way may even be necessary because using the width/height attributes (eg, "width", "minwidth" and "maxwidth") inside a stack can sometimes produce unpredictable and undesireable results.
Stacks and Decks - Archive of obsolete content
« previousnext » there may be need to display elements as a
set of overlapping cards.
...the first, however is off
set one pixel to the right and down by adding a padding to its left and top sides.
... this has the result of drawing the same text 'shadowed' again but slightly off
set from the other.
...the displayed page of the deck can be changed by
setting an selectedindex attribute on the deck element.
Tabboxes - Archive of obsolete content
the user can click each tab to see a different
set of options.
... the currently selected tab element is given an additional selected attribute which is
set to true.
...you simply
set the orient and dir attributes as necessary.
...alternatively, you could
set the dir attribute to reverse on the tabbox.
Updating Commands - Archive of obsolete content
command updaters a command updater is a feature of the command
set element which allows it to update commands when certain events happen.
...a simple command updater looks like this: <command
set id="updatepasteitem" commandupdater="true" events="focus" oncommandupdate="goupdatecommand('cmd_paste');"/> a command updater is indicated by using the commandupdater attribute, which should be
set to true.
...<command
set id="globaleditmenuitems" commandupdater="true" events="focus" oncommandupdate="goupdateglobaleditmenuitems()"/> <command
set id="selecteditmenuitems" commandupdater="true" events="select" oncommandupdate="goupdateselecteditmenuitems()"/> <command
set id="undoeditmenuitems" commandupdater="true" events="u...
...ndo" oncommandupdate="goupdateundoeditmenuitems()"/> <command
set id="clipboardeditmenuitems" commandupdater="true" events="clipboard" oncommandupdate="goupdatepastemenuitems()"/> next, we'll find out how to use observers.
Using Remote XUL - Archive of obsolete content
this also means you can't load xul using file:// urls unless you
set the preference dom.allow_xul_xbl_for_file to true.
...we
set this value to the mozilla.org home page by default so that page loads into the iframe when we first load the xul document.
...the bar consists of a
set of links organized into four main categories: the mozilla organization, developer docs, testing, and tools.
... <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript"> function loadurl(event) { var contentframe = document.getelementbyid("contentframe"); var url = event.target.getattribute("value"); if (url) contentframe.
setattribute("src", url); } </script> ...
XUL Reference - Archive of obsolete content
« xul reference « alphabetical list of all xul elements action arrowscrollbox assign bbox binding bindings box broadcaster broadcaster
set button browser checkbox caption clicktoscroll colorpicker column columns command
set command conditions content datepicker deck description dialog dialogheader dropmarker editor grid grippy groupbox hbox iframe image key key
set label listbox listcell listcol listcols listhead listheader listitem member menu menubar menuitem menulist menupopup menuseparator notification notificationbox observes overlay page panel param popup
set preference preferences prefpane prefwindow progressmeter query query
set radio radiogroup resizer richlistbox richlistitem row rows rule scale scr...
...ipt scrollbar scrollbox scrollcorner separator spacer spinbuttons splitter stack statusbar statusbarpanel stringbundle stringbundle
set tab tabbrowser (firefox-only starting with firefox 3/gecko 1.9) tabbox tabpanel tabpanels tabs template textnode textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbar
set toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple vbox where window wizard wizardpage categorical list of all xul elements « xul reference « windows window wizard wizardpage titlebar window structure --- menus and popups ...
... layout --- templates --- scripting --- helper elements other xul lists dialog overlay page window wizard wizardpage preference preferences prefpane prefwindow browser tabbrowser editor iframe titlebar resizer statusbar statusbarpanel dialogheader notification notificationbox menubar menu menuitem menuseparator menupopup panel tooltip popup
set toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbar
set toolbarspacer toolbarspring toolbox tabbox tabs tab tabpanels tabpanel groupbox caption separator spacer button checkbox colorpicker datepicker menulist progressmeter radio radiogroup scale splitter textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepi...
...cker 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 query
set rule template textnode triple where script command
set command broadcaster broadcaster
set observes key key
set stringbundle stringbundle
set 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 ...
XUL controls - Archive of obsolete content
<colorpicker type="button" color="#cc0080"/> colorpicker reference <datepicker> a
set of textboxes which may be used to allow the entry of a date.
... <datepicker type="grid" value="2007/02/20"/> datepicker reference <datepicker type="popup" > a datepicker which displays a
set of textboxes for date entry, but also has a button for displaying a popup calendar grid.
... progressmeter reference <radio> a radio button is used when only one of a
set of options may be selected at a time.
... <textbox type="timed"/> textbox reference <timepicker> a timepicker displays a
set of textboxes for entering a time.
box - Archive of obsolete content
if the box has an orient attribute that is
set to horizontal, the child elements are laid out from left to right in the order that they appear in the box.
... if orient is
set to vertical, the child elements are laid out from top to bottom.
... <label value="three"/> <label value="four"/> </box> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements vbox, hbox ...
listheader - Archive of obsolete content
if this attribute is
set, the element is disabled.
...do not
set the attribute to true, as this will suggest you can
set it to false to enable the element again, which is not the case.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements listbox, listcell, listcol, listcols, listhead, listitem ...
rule - Archive of obsolete content
attributes iscontainer, isempty, parent, par
setype examples (example needed) attributes iscontainer type: boolean indicates whether rules match based on containment.
... parent type: element tag name if
set, the rule will only match the corresponding tag.
... par
setype type: string if this attribute is
set to integer, the rule will only match rdf nodes with a parse type of integer.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
script - Archive of obsolete content
usually, you would
set this to application/javascript.
... note: if the javascript file is in chrome://,
setting this attribute to application/javascript will always use the latest available javascript version.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
<statusbarpanel> - Archive of obsolete content
depending on the platform and theme being used, some elements will have
set a maximum width so they will always appear cropped.
... properties image type: image url gets and
sets the value of the image attribute.
... label type: string gets and
sets the value of the label attribute.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata style classes the following classes may be used to style the element.
stringbundle - Archive of obsolete content
stringbundles should be placed inside a stringbundle
set element.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties applocale obsolete since gecko 1.9.1 type: nsilocale returns the xpcom object which holds information about the use...
... src type: url gets and
sets the value of the src attribute.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related xul property files ...
tabpanels - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container to hold the
set of pages in a tabbox.
... attributes selectedindex properties selectedindex, selectedpanel examples (example needed) attributes selectedindex type: integer gets and
sets the index of the currently selected panel.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessible type: nsiaccessible returns the accessibility object for the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements tabbox, tabs, tab, tabpanel.
template - Archive of obsolete content
attributes container, member examples (example needed) attributes container type: string may optionally be
set to the variable to use as the container or reference variable.
... member type: string may optionally be
set to the variable to use as the member variable.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
now you need to
set up a special .mozconfig file to tell mozilla to build both xulrunner and your application.
...for example, you might want to
set it to "xulrunner" now and run make to ensure that everything is
set up correctly so far.
...so for most xulrunner apps that use the mozilla build system, the top-level makefile will contain: dirs = components chrome app the installer/ subdirectory the installer/ makefile lets you create a
setup program for distributing your application.
...you shouldn't have to change anything since moz_app_name is automatically
set to the name of your application.
Getting started with XULRunner - Archive of obsolete content
step 4:
set up application.ini the application.ini file acts as the xulrunner entry point for your application.
...here is mine: [app] vendor=xultest name=myapp version=1.0 buildid=20100901 id=xulapp@xultest.org [gecko] minversion=1.8 maxversion=200.* note: the minversion and maxversion fields indicate the range of gecko versions your application is compatible with; make sure that you
set them so that the version of xulrunner you're using is in that range, or your application won't work.
... note: make sure your application name is lowercase and longer than 3 characters step 5:
set up the chrome manifest the chrome manifest file is used by xulrunner to define specific uris which in turn are used to locate application resources.
...here is the application root chrome.manifest: manifest chrome/chrome.manifest step 6:
set up preferences the prefs.js file tells xulrunner the name of the xul file to use as the main window.
nsIContentPolicy - Archive of obsolete content
type_image
set 21 indicates a request to load an <img> (with the src
set attribute or <picture>.
...this means that implementers of this method must not do any of the following: modify the dom in any way (e.g.,
setting attributes is a no-no).
... query any dom properties that depend on layout (e.g., off
set* properties).
...this is optional only for non-gecko code: all gecko code should
set this argument.
NPN_GetValue - Archive of obsolete content
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.
... description npn_getvalue returns the browser information
set with npn_
setvalue.
...see also npn_
setvalue, npp_getvalue ...
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 off
set, int32 len, void* buf); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... off
set off
set in bytes of buf from the beginning of the data in the stream.
... buf buffer of data, delivered by the stream, that contains len bytes of data off
set bytes from the start of the stream.
... the plug-in can use the off
set parameter to track the bytes that are written.
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
there are only two key differences: in the npp_
setwindow call, the window parameter will be the xid of the hosting xembed window.
...please use the following diagram as a reference: as you can see from the diagram above, it's pretty easy to
set up a plugin using gtk2.
... the general idea is that you use the xid that was passed into your npp_
setwindow() call and create a gtkplug to host inside of that socket.
...at the browser has the compatibility you require, you can modify your npp_getvalue call like so: nperror npp_getvalue(void *future, nppvariable variable, void *value) { nperror err = nperr_no_error; switch (variable) { case nppvpluginneedsxembed: *((prbool *)value) = pr_true; break; default: err = nperr_generic_error; } return err; } once you have
set those variables, it should be relatively easy to
set up a plugin.
Tamarin Tracing Build Documentation - Archive of obsolete content
tamarin buildbot tryserver the tryserver/sandbox is
setup to allow users to push any code changes that they would like to have tested in the automated build/test process prior to actually pushing the changes.
... the sandbox is
setup so that it is able to build and test branches that are based on either tamarin-central or tamarin-tracing.
... any comments, questions or problems can be directed to brent baker how to
setup a user repository with the source and patches that will be compiled.
... documentation on how to
setup a user repository http://developer.mozilla.org/en/publishing_mercurial_clones.
New in JavaScript 1.3 - Archive of obsolete content
note that communicator and navigator 4.0-4.05 and earlier ignored scripts with the language attribute
set to "javascript1.3" and higher.
...--> new features in javascript 1.3 new globals nan infinity undefined new methods isfinite() function.prototype.call() function.prototype.apply() date.utc() date.prototype.getfullyear() date.prototype.
setfullyear() date.prototype.getmilliseconds() date.prototype.
setmilliseconds() date.prototype.getutcfullyear() date.prototype.getutcmonth() date.prototype.getutcdate() date.prototype.getutchours() date.prototype.getutcminutes() date.prototype.getutcseconds() date.prototype.getutcmilliseconds() date.prototype.toutcstring() date.prototype.
setutcfullyear() date.prototype.
setutcmonth() date.prototype.
setutcdate() date.prototyp...
...e.
setutchours() date.prototype.
setutcminutes() date.prototype.
setutcseconds() date.prototype.
setutcmilliseconds() other new features strict equality operators unicode support a javascript console was introduced.
... 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.
ECMAScript 2015 support in Mozilla - Archive of obsolete content
array object array iteration with for...of (firefox 13) array.from() (firefox 32) array.of() (firefox 25) array.prototype.fill() (firefox 31) array.prototype.find(), array.prototype.findindex() (firefox 25) array.prototype.entries(), array.prototype.keys() (firefox 28), array.prototype.values() array.prototype.copywithin() (firefox 32) get array[@@species] (firefox 48) new map and
set objects, and their weak counterparts map (firefox 13) map iteration with for...of (firefox 17) map.prototype.foreach() (firefox 25) map.prototype.entries() (firefox 20) map.prototype.keys() (firefox 20) map.prototype.values() constructor argument: new map(null) (firefox 37) monkey-patched
set() in constructor (firefox 37) get map[@@species] (firefox 41)
set (f...
...irefox 13)
set iteration with for...of (firefox 17)
set.prototype.foreach() (firefox 25)
set.prototype.entries(),
set.prototype.keys(),
set.prototype.values() (firefox 24) constructor argument: new
set(null) (firefox 37) monkey-patched add() in constructor (firefox 37) get
set[@@species] (firefox 41) weakmap (firefox 6) weakmap.clear() (firefox 20) optional iterable argument in weakmap constructor (firefox 36) constructor argument: new weakmap(null) (firefox 37) monkey-patched
set() in constructor (firefox 37) weak
set (firefox 34) constructor argument: new weak
set(null) (firefox 37) monkey-patched add() in constructor (firefox 37) new math functions math.imul() (firefox 20) math.clz32() (firefox 31) math.fround() (fi...
...isnan() (firefox 16) number.isfinite() (firefox 16) number.isinteger() (firefox 16) number.parseint() (firefox 25) number.parsefloat() (firefox 25) number.epsilon (firefox 25) number.max_safe_integer, number.min_safe_integer (firefox 31) number.issafeinteger() (firefox 32) additions to the object object object.prototype.__proto__ has been standardized object.is() (firefox 22) object.
setprototypeof() (firefox 31) object.assign() (firefox 34) object.getownpropertysymbols() (firefox 33) additions to the date object date.prototype is an ordinary object (firefox 41) generic date.prototype.tostring (firefox 41) date.prototype[@@toprimitive] (firefox 44) new promise object promise (firefox 24, enabled by default in firefox 29) new proxy object proxy (firefox 18) pre...
...ventextensions() trap (firefox 22) isextensible() trap (firefox 31) getprototypeof() and
setprototypeof() traps (firefox 49) new reflect object reflect (firefox 42) additions to the regexp object regexp sticky (y) flag (firefox 38) regexp unicode (u) flag (firefox 46) generic regexp.prototype.tostring (firefox 39) regexp.prototype[@@match]() (firefox 49) regexp.prototype[@@replace]() (firefox 49) regexp.prototype[@@search]() (firefox 49) regexp.prototype[@@split]() (firefox 49) get regexp[@@species] (firefox 49) additions to the string object string.fromcodepoint() (firefox 29) string.prototype.codepointat() (firefox 29) string.prototype.startswith(), string.prototype.endswith() (firefox 17) string.prototype.includes() (firefox 40) (formerly string.prototype.contain...
Object.observe() - Archive of obsolete content
if omitted, the array ["add", "update", "delete", "reconfigure", "
setprototype", "preventextensions"] will be used.
...erve(obj, function(changes) { console.log(changes); }); obj.baz = 2; // [{name: 'baz', object: <obj>, type: 'add'}] obj.foo = 'hello'; // [{name: 'foo', object: <obj>, type: 'update', oldvalue: 0}] delete obj.baz; // [{name: 'baz', object: <obj>, type: 'delete', oldvalue: 2}] object.defineproperty(obj, 'foo', {writable: false}); // [{name: 'foo', object: <obj>, type: 'reconfigure'}] object.
setprototypeof(obj, {}); // [{name: '__proto__', object: <obj>, type: '
setprototype', oldvalue: <prototype>}] object.seal(obj); // [ // {name: 'foo', object: <obj>, type: 'reconfigure'}, // {name: 'bar', object: <obj>, type: 'reconfigure'}, // {object: <obj>, type: 'preventextensions'} // ] data binding // a user model var user = { id: 0, name: 'brendan eich', title: 'mr.' }; // crea...
...ello, ' + user.title + ' ' + user.name + '!'; } updategreeting(); object.observe(user, function(changes) { changes.foreach(function(change) { // any time name or title change, update the greeting if (change.name === 'name' || change.name === 'title') { updategreeting(); } }); }); custom change type // a point on a 2d plane var point = {x: 0, y: 0, distance: 0}; function
setposition(pt, x, y) { // performing a custom change object.getnotifier(pt).performchange('reposition', function() { var olddistance = pt.distance; pt.x = x; pt.y = y; pt.distance = math.sqrt(x * x + y * y); return {olddistance: olddistance}; }); } object.observe(point, function(changes) { console.log('distance change: ' + (point.distance - changes[0].olddistance)); }, [...
...'reposition']);
setposition(point, 3, 4); // distance change: 5 specifications not part of any standard.
XForms Select Element - Archive of obsolete content
the list of pre-defined items can be specified by either item (see the spec) or item
set (see the spec) elements.
...this attribute, when
set to 'open', allows the user to provide free entry to the list.
...the data binding restriction to simple content may be relaxed when an item
set element is used, which allows the available choices to be obtained from an xforms model.
... the relaxation happens when the item
set element specifies the item value using a copy (see spec) element.
XForms Select1 Element - Archive of obsolete content
the list of pre-defined items can be specified by either item (see the spec) or item
set (see the spec) elements.
... single-node binding special selection - this attribute, when
set to 'open', allows the user to provide free entry to the list.
...the data binding restriction to simple content may be relaxed when an item
set element is used, which allows the available choices to be obtained from an xforms model.
... the relaxation happens when the item
set element specifies the item value using a copy (see spec) element.
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
if the author had
set a font size on the body element, for example, the font size of text within a table would match the user's default, not the body style.
...in these browsers, a table's text would be the same size as the user's default
settings, regardless of the css assigned to ancestor elements such as body.
...*/ table, caption { font-size: -moz-initial; font-weight: -moz-initial; font-style: -moz-initial; font-variant: -moz-initial; } this rule
sets all aspects of a table's font, except for the font family, to match the user's preferences
setting, thus emulating the behavior of old browsers.
... the value -moz-initial is a proprietary value used to apply the user's (or browser's) default
setting for a given property to an element.
The Business Benefits of Web Standards - Archive of obsolete content
storing css in a separate document (aka style sheet) and applying it to a
set of html documents permits a complete change of presentation for all these documents in a snap.
...all their documents are properly marked up at the out
set.
... by ensuring that all of the digital content owned by the operator is marked up in a consistent and standards compliant way, the content base becomes a perennially reusable as
set without any additional costs in the future.
... using xhtml is a way to enter a
set of standards composed of xml-based technologies, such as xml, xslt (transforming data), svg (animated graphics), mathml (describing mathematic expressions)...
Move the ball - Game development
defining a drawing loop to keep constantly updating the canvas drawing on each frame, we need to define a drawing function that will run over and over again, with a different
set of variable values each time to change sprite positions, etc.
... you can run a function over and over again using a javascript timing function such as
setinterval() or requestanimationframe().
...the draw() function will be executed within
setinterval every 10 miliseconds: function draw() { // drawing code }
setinterval(draw, 10); thanks to the infinite nature of
setinterval the draw() function will be called every 10 milliseconds forever, or until we stop it.
...let's define these small values as dx and dy and
set their values to 2 and -2 respectively.
Gecko FAQ - Gecko Redirect 1
gecko provides the foundation needed to display content on the screen, including a layout engine and a complementary
set of browser components.
... xml 1.0: full support, except for processing to manipulate default attributes rdf: full support, except for abouteach, abouteachprefix, and par
setype javascript 1.5, including ecma-262 edition 3 (ecmascript) compliance, except for date.todatestring and date.totimestring, which are not implemented transfer protocols: http 1.1 (including gzip compression), ftp ssl unicode oji (open java interface) image formats png gif jpeg, pjpeg does "full support" mean that gecko has zero bugs today or will have zero bugs at some p...
... gecko is reusable on all platforms thanks to xpcom, a sub
set of com that works across platforms.
... gecko includes the following components: document parser (handles html and xml) layout engine with content model style system (handles css, etc.) javascript runtime (spidermonkey) image library networking library (necko) platform-specific graphics rendering and widget
sets for win32, x, and mac user preferences library mozilla plug-in api (npapi) to support the navigator plug-in interface open java interface (oji), with sun java 1.2 jvm rdf back end font library security library (nss) original document information author(s): angus other contributors: ekrock, vidur, hidday, drunclear copyright information: portions of this content are © 1998–2006 b...
CDN - MDN Web Docs Glossary: Definitions of Web-related terms
cdns are used widely for delivering stylesheets and javascript files (static as
sets) of libraries like bootstrap, jquery etc.
... using cdn for those library files is preferable for a number of reasons: serving libraries' static as
sets over cdn lowers the request burden on an organization's own servers.
... cdns are already configured with proper cache
settings.
... using a cdn saves further configuration for static as
sets on your own servers.
What is accessibility? - Learn web development
it is a good idea to familiarise yourself with screen readers; you should also
set up a screen reader and have a play around with it, to get an idea of how it works.
...importantly, though there is a lot of diversity within clinical definitions of cognitive impairments, people with them experience a common
set of functional problems.
... accessibility guidelines and the law there are numerous checklists and
sets of guidelines available for basing accessibility tests on, which might seem overwhelming at first glance.
... so while the wcag is a
set of guidelines, your country will probably have laws governing web accessibility, or at least the accessibility of services available to the public (which could include websites, television, physical spaces, etc.) it is a good idea to find out what your laws are.
Normal Flow - Learn web development
you can't
set width or height on inline elements — they just sit inside the content of block level elements.
... if you want to control the size of an inline element in this manner, you need to
set it to behave like a block level element with display: block; (or even,display: inline-block; which mixes characteristics from both.) that explains individual elements, but what about how elements interact with one another?
...by default, block-level elements are laid out in the block flow direction, based on the parent's writing mode (initial: horizontal-tb) — each one will appear on a new line below the last one, and they will be separated by any margin that is
set on them.
... if two adjacent elements both have the margin
set on them and the two margins touch, the larger of the two remains, and the smaller one disappears — this is called margin collapsing, and we have met this before too.
CSS FAQ - Learn web development
it is generally recommended to use classes as much as possible, and to use ids only when absolutely necessary for specific uses (like to connect label and form elements or for styling elements that must be semantically unique): using classes makes your styling extensible — even if you only have one element to style with a particular rule
set now, you might want to add more later.
...it re
sets it to its default value, which is defined in the css specification of the given property.
...using shorthand with only some attributes is possible and correct, but it must be remembered that undeclared attributes are automatically re
set to their default values.
... #stockticker { font-weight: bold; font: 12px verdana; /* font-weight is now
set to normal */ } use of the * selector the * wildcard selector refers to any element, and it has to be used with particular care.
Web fonts - Learn web development
in the web-font-start.css file, you'll find some minimal css to deal with the basic layout and type
setting of the example.
...you can find an assessment to verify that you've retained this information at the end of the module — see type
setting a community school homepage.
... summary now that you have worked through our articles on text styling fundamentals, it is time to test your comprehension with our assessment for the module, type
setting a community school homepage.
... previous overview: styling text next in this module fundamental text and font styling styling lists styling links web fonts type
setting a community school homepage ...
What is a web server? - Learn web development
this
setup makes it easier to maintain and deliver the content.
... hosting files first, a web server has to store the website's files, namely all html documents and their related as
sets, including images, css stylesheets, javascript files, fonts, and video.
... a protocol is a
set of rules for communication between two computers.
...static websites are the easiest to
set up, so we suggest you make your first site a static site.
Other form controls - Learn web development
<select id="simple" name="simple"> <option>banana</option> <option selected>cherry</option> <option>lemon</option> </select> if required, the default value for the select box can be
set using the selected attribute on the desired <option> element — this option is then preselected when the page loads.
...the browser usually
sets them visually apart from the options (i.e.
... if an <option> element has an explicit value attribute
set on it, that value is sent when the form is submitted with that option selected.
...this value is visually rendered as a bar, and to know how this bar looks, we compare the value to some other
set values: the low and high values divide the range in three parts: the lower part of the range is between the min and low values, inclusive.
Test your skills: Advanced styling - Learn web development
we've already provided you with a basic re
set to build upon.
... advanced form styling 2 in our next task we provide you with a
set of three radio buttons.
... we've already provided you with a basic re
set to build upon.
...this can be anything you like, but you probably want to
set a width and height (of somewhere between about 18 and 24 pixels), and a subtle border and/or background color.
Test your skills: Basic controls - Learn web development
basic controls 2 the next task requires you to create working
sets of checkboxes and radio buttons, from the provided text labels.
... turn the first <field
set>'s contents into a
set of radio buttons — you should only be able to select one pony character at once.
... turn the second <field
set>'s content into a
set of checkboxes.
... basic controls 3 the final task in this
set requires you to create a file picker.
Front-end web developer - Learn web development
subjects covered the subjects covered are: basic
setup and learning how to learn web standards and best practices (such as accessibility and cross-browser compatibility) html, the language that gives web content structure and meaning css, the language used to style web pages javascript, the scripting language used to create dynamic functionality on the web tooling that is used to facilitate modern client-side web development.
...it is important to get you
set up and ready to do work for exercises later on in the course.
... guides installing basic software — basic tool
setup (15 min read) background on the web and web standards (45 min read) learning and getting help (45 min read) semantics and structure with html time to complete: 35–50 hours prerequisites nothing except basic computer literacy, and a basic web development environment.
... there are no specific assessment articles in this
set of modules.
The web and web standards - Learn web development
in the next few years that followed, the web exploded, with multiple browsers being released, thousands of web servers being
set up, and millions of web pages being created.
...recent published figures say that there are currently around 19 million web developers in the world, and that figure is
set more than double in the next decade.
... cascading style sheets (css) is a rule-based language used to apply styles to your html, for example
setting text and background colors, adding borders, animating things, or laying out a page in a certain way.
... so-called "linters", which take a
set of rules, look at your code, and highlight places where you haven't followed the rules properly.
Tips for authoring fast-loading HTML pages - Learn web development
depending on a browser's cache
settings, it may send a request with the if-modified-since header for each referenced file, asking whether the file has been modified since the last time it was downloaded.
... minify and compress svg as
sets svg produced by most drawing applications often contains unnecessary metadata which can be removed.
... configure your servers, apply gzip compression for svg as
sets.
...with this
set, the image will only be loaded when it's needed.
Document and website structure - Learn web development
<!doctype html> <html> <head> <meta char
set="utf-8"> <title>my page title</title> <link href="https://fonts.googleapis.com/css?family=open+sans+condensed:300|sonsie+one" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="style.css"> <!-- the below three lines are a fix to get html5 semantic elements working in old versions of internet explorer--> <!--[if lt ie 9]> <script src="https://cdnjs.cloudflar...
...
set sit amet ipsum mauris.
... <section> is similar to <article>, but it is more for grouping together a single part of the page that constitutes one single piece of functionality (e.g., a mini map, or a
set of article headlines and summaries).
...sometimes you might want to just group a
set of elements together to affect them all as a single entity with some css or javascript.
Video and audio content - Learn web development
we won't be teaching you how to produce audio and video files — that requires a completely different skill
set.
... things become slightly more complicated because not only does each browser support a different
set of container file formats, they also each support a different selection of codecs.
...if the aspect ratio is not maintained by the sizes you
set, the video will grow to fill the space horizontally, and the unfilled space will just be given a solid background color by default.
... restarting media playback at any time, you can re
set the media to the beginning—including the process of selecting the best media source, if more than one is specified using <source> elements—by calling the element's load() method: const mediaelem = document.getelementbyid("my-media-element"); mediaelem.load(); detecting track addition and removal you can monitor the track lists within a media element to detect when tracks are added to or re...
Introducing asynchronous JavaScript - Learn web development
related to blocking), many web api features now use asynchronous code to run, especially those that access or fetch some kind of resource from an external device, such as fetching a file from the network, accessing a database and returning data from it, accessing a video stream from a web cam, or broadcasting the display to a vr head
set.
...let's look at another example that loads a resource via the xmlhttprequest api (run it live, and see the source): function loadas
set(url, type, callback) { let xhr = new xmlhttprequest(); xhr.open('get', url); xhr.respon
setype = type; xhr.onload = function() { callback(xhr.response); }; xhr.send(); } function displayimage(blob) { let objecturl = url.createobjecturl(blob); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); } loadas
set('coffee.jpg', 'b...
...however, we then create a loadas
set() function that takes a callback as a parameter, along with a url to fetch and a content type.
... in a less trivial code example, this kind of
setup could cause a problem — you can't include an async code block that returns a result, which you then rely on later in a sync code block.
Asynchronous JavaScript - Learn web development
cooperative asynchronous javascript: timeouts and intervals here we look at the traditional methods javascript has available for running code asychronously after a
set time period has elapsed, or at a regular interval (e.g.
... a
set number of times per second), talk about what they are useful for, and look at their inherent issues.
...this is really useful for
setting up a sequence of operations to work correctly.
... making asynchronous programming easier with async and await promises can be somewhat complex to
set up and understand, and so modern browsers have implemented async functions and the await operator.
Introduction to web APIs - Learn web development
it provides a special
set of constructs you can use to query the twitter service and return specific information.
...— the <audio> element will be played from: const audioelement = document.queryselector('audio'); const playbtn = document.queryselector('button'); const volumeslider = document.queryselector('.volume'); const audiosource = audioctx.createmediaelementsource(audioelement); next up we include a couple of event handlers that serve to toggle between play and pause when the button is pressed and re
set the display back to the beginning when the song has finished playing: // play/pause audio playbtn.addeventlistener('click', function() { // check if context is in suspended state (autoplay policy) if (audioctx.state === 'suspended') { audioctx.resume(); } // if track is stopped, play it if (this.getattribute('class') === 'paused') { audioelement.play(); ...
... this.
setattribute('class', 'playing'); this.textcontent = 'pause' // if track is playing, stop it } else if (this.getattribute('class') === 'playing') { audioelement.pause(); this.
setattribute('class', 'paused'); this.textcontent = 'play'; } }); // if track ends audioelement.addeventlistener('ended', function() { playbtn.
setattribute('class', 'paused'); playbtn.textcontent = 'play'; }); note: some of you may notice that the play() and pause() methods being used to play and pause the track are not part of the web audio api; they are part of the htmlmediaelement api, which is different but closely-related.
... the following code provides a simple example of how this would be used: let requesturl = 'https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json'; let request = new xmlhttprequest(); request.open('get', requesturl); request.respon
setype = 'json'; request.send(); request.onload = function() { const superheroes = request.response; populateheader(superheroes); showheroes(superheroes); } note: you can see this code in action in our ajax.html example (see it live also).
Arrays - Learn web development
you can access an item inside an array that is itself inside another array by chaining two
sets of square brackets together.
... 'trousers:31.99' 'shoes:23.99'; for (let i = 0; i <= 0; i++) { // number 2 // number 3 // number 4 // number 5 let itemtext = 0; const listitem = document.createelement('li'); listitem.textcontent = itemtext; list.appendchild(listitem); } totalbox.textcontent = 'total: $' + total.tofixed(2); </textarea> <div class="playable-buttons"> <input id="re
set" type="button" value="re
set"> <input id="solution" type="button" value="show solution"> </div> const textarea = document.getelementbyid('code'); const re
set = document.getelementbyid('re
set'); const solution = document.getelementbyid('solution'); let code = textarea.value; let userentry = textarea.value; function updatecode() { eval(textarea.value); } re
set.addeventlistener('click', funct...
...item.textcontent = itemtext; list.appendchild(listitem); } // if the array length is 5 or more, remove the oldest search term if (myhistory.length >= 5) { // number 2 } // empty the search input and focus it, ready for the next term to be entered searchinput.value = ''; searchinput.focus(); } } </textarea> <div class="playable-buttons"> <input id="re
set" type="button" value="re
set"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = document.getelementbyid('code'); const re
set = document.getelementbyid('re
set'); cons...
...t solution = document.getelementbyid('solution'); let code = textarea.value; let userentry = textarea.value; function updatecode() { eval(textarea.value); } re
set.addeventlistener('click', function() { textarea.value = code; userentry = textarea.value; solutionentry = jssolution; solution.value = 'show solution'; updatecode(); }); solution.addeventlistener('click', function() { if(solution.value === 'show solution') { textarea.value = solutionentry; solution.value = 'hide solution'; } else { textarea.value = userentry; solution.value = 'show solution'; } updatecode(); }); const jssolution = 'const list = document.queryselector(\'.output ul\');\nconst searchinput = document.queryselector(\'.output input\');\nconst searchbtn = document.queryselector(\'.ou...
Basic math in JavaScript — numbers and operators - Learn web development
this is especially true when we are learning to program javascript (or any other language for that matter) — so much of what we do relies on processing numerical data, calculating new values, and so on, that you won't be surprised to learn that javascript has a full-featured
set of math functions available.
...you may have encountered these numbers before when
setting colors in css.
...for example: let num1 = 10; let num2 = 50; 9 * num1; num1 ** 3; num2 / num1; last for this section, try entering some more complex expressions, such as: 5 + 10 * 3; num2 % 9 * num1; num2 + num1 / 8 + 2; some of this last
set of calculations might not give you quite the result you were expecting; the section below might well give the answer as to why.
...you can always press the re
set button to get things working again.
Aprender y obtener ayuda - Learn web development
it is great that you are putting some time into learning a new
set of skills, but there are good practices to employ that will make your learning more effective.
... getting help web development requires you to learn a complex
set of skills — you are bound to get stuck sometimes and need help.
... if you want to find out more about a specific technology feature, such as the html <video> element, or the css background-color or opacity properties, or the javascript date.
settime() method, you should just search for the feature's name.
... if you are looking for some more specific information, you can add other keywords as modifiers, for example "<video> element autoplay attribute", or "date.
settime parameters".
Multimedia: Images - Learn web development
beyond loading a sub
set of images, next you should look into the format of the images themselves: are you loading the most optimal file formats?
...a quality
setting of 75% should yield decent results.
...for this reason, it's critical that you
set width and height attributes so that the browser can reserve space for them in the layout.
... for any background images, it's important you
set a background-color value so any content overlaid is still readable before the image has downloaded.
Properly configuring server MIME types - Learn web development
the http specification defines a super
set of mime which is used to describe the media types used on the web.
... gecko 1.9.1.11 (firefox 3.5.11) and gecko 1.9.2.5 (firefox 3.6.5) also implement this security fix, but to improve compatibility, there was a temporary heuristic that allows the load if the first line in the style sheet appears to be a well-formed css construct; the heuristic has been removed in firefox 4, and you have to properly
set the text/css mime types to have your css pages recognized.
... how to
set up your server to send the correct mime types the fundamental idea is to configure your server to send the correct content-type http header for each document.
... for a java servlet, you should have the line response.
setcontenttype("text/html"); at the top of your doget or dopost method, where response is a reference to the httpservletresponse.
Framework main features - Learn web development
given this handlebars template: <header> <h1>hello, {{subject}}!</h1> </header> and this data: { subject: "world" } handlebars will build html like this: <header> <h1>hello, world!</h1> </header> typescript typescript is a super
set of javascript, meaning it extends javascript — all javascript code is valid typescript, but not the other way around.
...to render this component, we would write code like this in the place where we want it rendered (which will probably be inside another component): <authorcredit src="./as
sets/zelda.png" alt="portrait of zelda schiff" byline="zelda schiff is editor-in-chief of the library times." /> this will ultimately render the following <figure> element in the browser, with its structure as defined in the authorcredit component, and its content as defined in the props included on the authorcredit component call: <figure> <img src="as
sets/zelda.png" alt="portrait of...
...let’s update our counterbutton code from above to allow it to count clicks: function counterbutton() { const [count,
setcount] = usestate(0); return ( <button onclick={() =>
setcount(count + 1)}>clicked {count} times</button> ); } in this version we are using additional usestate() functionality to create a special
setcount() function, which we can invoke to update the value of count.
... we call this function on line 4, and
set count to whatever its current value is, plus one.
Accessibility in React - Learn web development
including keyboard users at this point, we've accomplished all of the features we
set out to implement.
...to do that, we'll add an attribute of ref to each element, and
set their values to the appropriately named ref objects.
... the textbox <input> in your editing template should be updated like this: <input id={props.id} classname="todo-text" type="text" value={newname} onchange={handlechange} ref={editfieldref} /> the "edit" button in your view template should read like this: <button type="button" classname="btn" onclick={() =>
setediting(true)} ref={editbuttonref} > edit <span classname="visually-hidden">{props.name}</span> </button> focusing on our refs with useeffect to use our refs for their intended purpose, we need to import another react hook: useeffect().
... using useeffect() to control our heading focus now that we've stored how many tasks we previously had, we can
set up a useeffect() hook to run when our number of tasks changes, which will focus the heading if the number of tasks we have now is less than with it previously was — i.e.
Componentizing our Svelte app - Learn web development
add the following
set of functions below your previous function to handle these actions: function oncancel() { name = todo.name // restores name to its initial value and editing = false // and exit editing mode } function onsave() { update({ name: name }) // updates todo name editing = false // and exit editing mode } function...
... <button type="button" class="btn" on:click={onedit}> edit<span class="visually-hidden"> {todo.name}</span> </button> <button type="button" class="btn btn__danger" on:click={onremove}> delete<span class="visually-hidden"> {todo.name}</span> </button> </div> {/if} </div> it is worth noting that: when the user presses the edit button we execute onedit(), which just
sets the editing variable to true.
...on:click={oncancel} type="button"> cancel<span class="visually-hidden">renaming {todo.name}</span> </button> <button class="btn btn__primary todo-edit" type="submit" disabled={!name}> save<span class="visually-hidden">new name for {todo.name}</span> </button> </div> </form> {:else} [...] when the user presses the edit button, the editing variable will be
set to true, and svelte will remove the markup in the {:else} part of the dom and replace it with the markup in the {#if...} section.
... the <input>'s value property will be bound to the name variable, and the buttons to cancel and save the changes call oncancel() and onsave() respectively (we added those functions earlier): when oncancel() is invoked, name is restored to its original value (when passed in as a prop) and we exit editing mode (by
setting editing to false).
Implementing feature detection - Learn web development
give it the following contents: const conditional = document.queryselector('.conditional'); const testelem = document.createelement('div'); if (testelem.style.flex !== undefined && testelem.style.flexflow !== undefined) { conditional.
setattribute('href', 'flex-layout.css'); } else { conditional.
setattribute('href', 'float-layout.css'); } here we are grabbing a reference to the second <link> element, and creating a <div> element as part of our test.
... property on element retains value create an element in memory using document.createelement(),
set a property to a certain value, then check to see if the value is retained.
...so here we're applying the top
set of rules only to browsers that do support flexbox, and the bottom
set of rules only to browsers that don't (no-flexbox).
... previous overview: cross browser testing next in this module introduction to cross browser testing strategies for carrying out testing handling common html and css problems handling common javascript problems handling common accessibility problems implementing feature detection introduction to automated testing
setting up your own test automation environment ...
Command line crash course - Learn web development
better programs exist for providing a terminal experience on windows, such as powershell (see here to find installers), and gitbash (which comes as part of the git for windows tool
set) however, the best option for windows in the modern day is the windows subsystem for linux (wsl) — a compatibility layer for running linux operating systems directly from inside windows 10, allowing you to run a “true terminal” directly on windows, without needing a virtual machine.
...all the operating systems (assuming a default
setup) will launch their terminal program in your "home" directory, and from there you’re likely to want to move to a different place.
...anted to go to a directory called src, located inside a directory called project, located on the desktop, you could type these three commands to get there from your home folder: cd desktop cd project cd src but this a waste of time — instead, you can type one command, with the different items in the path separated by forward slashes, just like you do when specifying paths to images or other as
sets in css, html, or javascript code: cd desktop/project/src note that including a leading slash on your path makes the path absolute, for example /users/your-user-name/desktop.
... uses less disk space related to the previous point, it makes project code harder to replicate (if you install your tools locally, they can be
set up as dependencies and installed with npm install).
Deploying our app - Learn web development
however, we do have to
set these steps up, and we'll look at that now.
... this is where our code, github, and netlify need to be
set up to talk to one another, so that each time we update our github code repository, netlify will automatically pick up the changes, run the build tasks, and finally release a new update.
...this step isn't necessary, but it is a good best practice to get into the habit of
setting up — across all our projects, we can then rely on npm run build to always do the complete build step, without needing to remember the specific build command arguments for each project.
... could you
set up a notification to let you know when a new deploy succeeded or failed?
Accessibility API cross-reference
gridcell a type of mouse pointer used for resizing windows grip n/a n/a n/a probably a group box (titledbox in mozilla) grouping panel panel group <field
set>, <div> a heading for a section of the page.
... menuitemcheckbox a checkable menuitem in a
set of elements with the same role, only one of which can be checked at a time.
... sectionhead (abstract role) a form widget that allows the user to make selections from a
set of choices.
... n/a n/a aria-controls indicates the element that represents the current item within a container or
set of related elements.
Benchmarking
this
setting reduces build times significantly but comes with a serious hit to runtime performance for any rust code (for example stylo and webrender).
...the poisoning can be disabled by
setting the environment variable jsgc_disable_poisoning=1 before starting the browser.
...
set it to false to match a release build.
...in about:addons > plugins,
set shockwave flash to "never activate".
Browser chrome tests
gbrowser is
set in browser.js and is a tabbrowser element (the tabbrowser with id="content" in browser.xul).
... function test() { waitforexplicitfinish();
settimeout(completetest, 1000); } function completetest() { ok(true, "timeout ran"); finish(); } if your test is randomly timing out and you think that's just due to it taking too long, you can extend the timeout.
... requestlongertimeout(2); waitforexplicitfinish();
settimeout(completetest, 40000); } function completetest() { ok(true, "timeout did not run"); finish(); } exceptions in tests any exceptions thrown under test() will be caught and reported in the test output as a failure.
...for instance, if you change a preference you want to make sure that the preference is always re
set so that it doesn't impact other tests after yours.
Continuous Integration
hf - static rooting hazard analysis s - static analysis v - valgrind build and test jobs; these jobs create valgrind-compatible builds and run a small
set of valgrind tests on them.
... each talos suite contains a
set of tests or pages, some of these in turn have sub-tests.
... other performance systems autophone (android) autophone is a test harness which runs a
set of performance tests on a variety of real android phones.
...you can view the current
set of alerts on the perfherder alerts dashboard.
Debugging Frame Reflow
log file analysis the log file for a simple table like <!doctype html public "-//w3c//dtd html 4.01 transitional//en"> <html> <head> <meta http-equiv="content-type" content="text/html; char
set=iso-8859-1"> </head> <body> <table width="100"> <tbody> <tr> <td>foo</td> </tr> </tbody> </table> </body> </html> will create the following log: vp 00b97c30 r=0 a=9180,4470 c=9180,4470 cnt=856 scroll 00b97ee0 r=0 a=9180,4470 c=9180,4470 cnt=857 scroll 00b97ee0 r=0 a=9180,4470 c=9180,4470 cnt=858 canvas 00b97c6c r=0 a=9180,uc c=9180,4470 cnt=859 area 02d7afe4 r=0 a=9180...
...frames with children that overflow the parent have the ns_frame_outside_children flag
set.
...other reflow debug options gecko_display_reflow_flag_pixel_errors
setting this option via
set gecko_display_reflow_flag_pixel_errors = 1 enables a verification for each coordinate value that the coordinates are aligned at pixel boundaries.
...gecko_display_reflow_indent_undisplayed_frames
setting this option via
set gecko_display_reflow_indent_undisplayed_frames = 1 will cause an advance of the indent even for frames which are blocked via the reflow rules file.
Simple Sunbird build
(if you get a message saying this application did not install properly then you should see a windows dialog giving you the option to re-install with the 'correct
settings'.
... on windows, if you open the command prompt you are usually in your user profile folder which often contains spaces ( c:\documents and
settings\...).
... # get the source hg clone http://hg.mozilla.org/comm-central/ cd comm-central python client.py checkout #
setup a basic .mozconfig file echo 'ac_add_options --enable-application=calendar' > .mozconfig # let's build sunbird...
... building sunbird and lightning if you've
set up you build environment as above, then all you need to do is: echo 'ac_add_options --enable-calendar' >> .mozconfig or just add the ac_add_options --enable-calendar line to your .mozconfig with your favourite editor.
Windows SDK versions
visual c++ 10 (vs2010) professional this comes with the windows 7 sdk, so you should be all
set out of the box.
...windows 8 sdk (official) features that depend on this sdk include: metro firefox front end gamepad api support you can download the sdk from the microsoft download center [web
setup].
... windows 7 sdk features that depend on this sdk include: windows 7 taskbar previews windows 7 download taskbar progress windows 7 jump lists you can download the sdk (v7.0 [web
setup or iso image] or unsupported v7.1 [web
setup or iso image]) from the microsoft download center.
...(this was certainly the case for 64 bit windows 7 on a late 2008 macbook pro.) warning: due to a bug in windows 7 sdk, if you get "sdk
setup encountered an error: expecting path %systemroot% to represent a valid system volume" error you may require to
set environmental variable %windir% to something like "c:\windows" instead of "%systemroot%".
Experimental features in Firefox
nightly 74 no developer edition 74 no beta 74 no release 74 no preference name dom.input_events.beforeinput.enabled htmlmediaelement method:
setsinkid() htmlmediaelement.
setsinkid() allows you to
set the sink id of an audio output device on an htmlmediaelement, thereby changing where the audio is being output.
... nightly 64 no developer edition 64 no beta 64 no release 64 no preference name media.
setsinkid.enabled htmlmediaelement properties: audiotracks and videotracks enabling this feature adds the htmlmediaelement.audiotracks and htmlmediaelement.videotracks properties to all html media elements.
...the network.ftp.enabled preference must be enabled (
set to true) to allow ftp to be used.
...this feature lets you test your code without having to change
settings in your browser (or operating system, if the browser follows a system-wide color scheme
setting).
Storage access policy: Block cookies from trackers
the cookie policy can be enabled in other versions of firefox through the content blocking
settings (these steps will vary by version; the linked documentation includes a dropdown to select the appropriate firefox version).
...specifically, firefox does this by imposing the following restrictions: cookies: block cookie request headers and ignore
set-cookie response headers.
... return an empty string for calls to document.cookie and ignore requests to
set cookies via document.cookie.
... http referrers the default referrer policy for third-party resources classified as trackers is
set to strict-origin-when-cross-origin.
Firefox and the "about" protocol
the most useful is the url about:config, which displays preferences and
settings that can be inspected and changed.
...-ons manager about:buildconfig displays the configuration and platform used to build firefox about:cache displays information about the memory, disk, and appcache about:checkerboard switches to the checkerboarding measurement page, which allows to detect checkerboarding issues about:config provides a way to inspect and change firefox preferences and
settings about:compat lists overriding site compatability fixes, linked to specific bug issues.
...etworking displays networking information about:newtab start page when opening a new tab about:performance displays memory and performance information about firefox subprocesses/add-ons/tabs about:plugins displays information about installed plugins about:policies lists out the firefox for enterprise policies about:preferences firefox
settings (also available through firefox menu > options) about:privatebrowsing start page when opening a private window about:profiles display and manage firefox profiles about:protections privacy protections report consisting of enhanced tracking protection, firefox monitor and firefox lockwise data about:restartrequired a page users are sent to when f...
...hile firefox is running (in case the user enabled telemetry) about:url-classifier displays the status of the url classifier services that firefox uses (for example for safe browsing) about:webrtc information about webrtc usage about:welcome page first displayed when firefox is installed about:welcomeback information page displayed after firefox is re
set these urls are defined in docshell/base/nsaboutredirector.cpp within the kredirmap array.
Introduction to Layout in Mozilla
may not be directly manipulated detailed walk-through
setting up content model construction frame construction style resolution reflow painting
setting up assume basic knowledge of embedding and network apis (doc shell, streams) content dll auto-registers a document loader factory (dlf) @mozilla.org/content-viewer-factory/view;1?type=text/html all mime types mapped to the same class, nscontentdlf nsdocshell ...
...notifications passes these to the style
set object, who in turn passes to the frame constructor frame constructor creates frames constructframeinternal recursively walks content tree, resolves style and creates frames either created by tag (<select>) or by display type (<p>) frame manager maintains mapping from content to frame style resolution compute stylistic information based on the style rules that ...
...re
set style context object is a placeholder for partially computed stylistic data style data is computed lazily, as it is asked for reflow recursively compute geometry (x, y, w, h) for frames, views, and widgets given w & h constraints of “root frame” compute (x, y, w, h) for all children constraints propagated “down” via nshtmlreflowstate desired size returned “up” via nshtmlreflowmetrics basic pattern parent frame initializes child reflow state (available w, h); places child frame (x, y); invokes child’s reflow method child frame computes desire...
...shell method incremental reflows targeted at a specific frame dirty, content-changed, style-changed, user-defined nshtmlreflowcommand object encapsulates info queued and processed asynchronously, nsipressshell::appendreflowcommand, processreflowcommands incremental reflow recursively descend to target recovering reflow state child rs.reason
set to incremental incremental reflow process reflow “normally” at target frame child rs.reason
set based on rc’s type incremental reflow propagate damage to frames later “in the flow” incremental reflow multiple reflow commands are batched nsreflowpath maintains a tree of target frames amortize state recovery and damage propagation cost ...
Dict.jsm
method overview dict copy(); boolean del(string akey); object get(string akey, [optional] object adefault); boolean has(string akey); array listitems(); array listkeys(); array listvalues(); void
set(string akey, object avalue); string tojson(); string tostring(); properties attribute type description count number the number of items in the dictionary.
...
set()
sets the value for a given key, adding a new key to the dictionary if necessary.
... void
set( string akey, object avalue ); parameters akey the key whose value is to be
set.
... var mydict = new dict(); mydict.
set("name", "john smith"); mydict.
set("email", "jsmith@example.com"); mydict.
set("phone", "650-555-1234"); working with existing keys you can then check to see if a given key exists: if (mydict.has("email")) { /* an "email" key exists on the object */ } ...
Downloads.jsm
example (using task.jsm): try { yield downloads.fetch(sourceuri, targetfile); } catch (ex if ex instanceof downloads.error && ex.becau
setargetfailed) { console.log("unable to write to the target file, ignoring the error."); } methods createdownload() creates a new download object.
...you may pass an object with a sub
set of the following fields: isprivate: optional indicates whether the download originated from a private window.
...you can use download objects as keys in a
set or map to associate your own state to them for the session.
...to enable the new download manager : first you have to
set the pref browser.download.usejstransfer to true.
PerfMeasurement.jsm
method overview static bool canmeasuresomething(); void re
set(); void start(); void stop(); member fields recorded data variables these variables provide access to the recorded data.
...note: these values are all zeroed (or
set to -1, for events not being measured) when you initialize the perfmeasurement object, then they are not zeroed again unless you explicitly call the re
set() method.
...re
set() re
sets all the enabled counters to zero.
... void re
set(); parameters none.
PopupNotifications.jsm
for most use cases, the value of this parameter should be date.now() plus an off
set indicating the amount of time the notification should be kept open (for example, date.now() + 30000 for 30 seconds).
... nevershow notifications with this parameter
set to true will be removed when they would have otherwise been dismissed (i.e.
... removeondismissal notifications with this parameter
set to true will be removed when they would have otherwise been dismissed (that is, any time the popup is closed due to user interaction).
...
setting this property will make the prompt display a "learn more" link that, when clicked, opens the url in a new tab.
PromiseWorker.jsm
here's the simplified diagram of how promiseworker works (svg version of the promiseworker diagram)
setup and usage this section explains how to
set up and use a promiseworker.
...but you can instantiate abstractworker itself and
set its properties later, instead of creating derived class.
...this is seen in a simple demo github :: promiseworker custom errors demo - main thread
setup.
...myworker.exceptionhandlers['customerror'] = customerror.frommsg; this is seen in a simple demo at github :: promiseworker custom errors demo - worker side
setup.
openLocationLastURL.jsm
(bug 953124) the openlocationlasturl.jsm javascript code module lets you
set and retrieve the url most recently opened using the "open location" option in the file menu.
...using the openlocationlasturl object to get or
set the value of the open location edit box, simply read the value of, or
set the value of, the openlocationlasturl.value field: var url = openlocationlasturl.value; openlocationlasturl.value = "http://www.mozilla.org/"; to re
set the value of the edit box to the default (which is an empty string), you can call the re
set() method: method overview re
set() methods re
set the re
set() met...
...hod re
sets the saved url to the default, which is an empty string.
... re
set(); parameters none.
Application Translation with Mercurial
launch the installed mozillabuild tool
set by launching it with its path, e.g.
... configuring your mercurial user
settings still in the command prompt, go to your home directory in the file system, e.g.
... for a windows user, it looks like c:\users\myname , depending on your windows version: cd /c/users/myname now list all the files here: ls -a if there is no file called .hgrc , create it with > .hgrc this file stores your general mercurial
settings (mercurial is the tool which manages the source code and its history of changes).
...aboutprivatebrowsing.dtd, patch, v1 go to the review 'flags' category and
set the one for review to ?, meaning that you request review for the patch.
Uplifting a localization from Central to Aurora
let's pretend it's at releases/l10n-mozilla-aurora/ab-cd here's how we do it: #
set up a new local clone of your central repo hg clone l10n-central/ab-cd workrepo cd workrepo # pull in the change
sets you have on aurora hg pull -r default ../releases/l10n/mozilla-aurora/ab-cd now, there are two routes forward: 1) things are pretty silent.
...this looks something like searching for changes adding change
sets adding manifests adding file changes added 22 change
sets with 23 changes to 46 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) ok, let's make sure we're not talking relbranches: hg heads --template '{node} {branches}\n' this is printing something like 5131e147fa50c28ec858c7d9fd1ba201ea2a433b 4da525ed77699794c56081791bd46cc85983f6f8 9bc7e6c58fc091c8cd0e8d9e1dbc7e6f592772a7 gecko20b12_2011022218_relbranch 230e99fada602842d9630e673077ef9f1ab34247 gecko20b12pre_20110216_relbranch 41a4357884d7bcc50e69c71014124d3af2482a...
...fe comm20b11_20110203_relbranch 2ec6ad14e7168ebeb999b1e8ae10632ae4c9df23 gecko20b11_2011020209_relbranch d68e647ac3c0fee709c13abb0f03fac24a1a5d29 gecko20b11pre_20110126_relbranch 7ff37dc6837669363a51ad3fd2874ac845d312d5 gecko20b10_2011012115_relbranch 6c31fe9bc065a86aea2223ba48698f18ae7563ad gecko20b9_2011011018_relbranch here you can see that there are two change
sets without a branch.
...in the workrepo directory, do #verify that we didn't forget change
sets hg inc ../l10n-central/ab-cd comparing with ../l10n-central/ab-cd searching for changes no changes found hg inc -r default ../releases/l10n/mozilla-aurora/ab-cd comparing with ../releases/l10n/mozilla-aurora/ab-cd searching for changes no changes found # push to central hg push ../l10n-central/ab-cd # push to aurora hg push ../releases/l10n/mozilla-aurora/ab-cd # push l...
Basics
with mathml, one can build
sets such as (go on, right-click any of these equations to experiment the zoom) { 0 , 1 , 2 , 3 , 4 } or { ⌊ a b ⌋ | a 2 + b 2 ≤ 3 } , write calculus d y d x = 1 y 2 , form rather complicated expressions lim n → n ( 1 + 1 n ) n − e n , k = ∂ 2 z ∂ x 2 ∂ 2 z ∂ y 2 - ( ∂ 2 z ∂ x ∂ y ) 2 ...
... f ( 4 ) ( η ) , a ≤ η ≤ b | x | = { - x if x < 0 x otherwise you can also type
set 2d mathematical constructs such as matrices.
...mi>x</mi> <mo>&invisibletimes;</mo> <msup> <mi>y</mi> <mn>4</mn> </msup> </mrow> <mo>+</mo> <msup> <mi>y</mi> <mn>5</mn> </msup> </mrow> </maction> </mtd> </mtr> </mtable> </mtd> </mtr> </mtable> </math> </div> css content .control { text-decoration: none; font-weight: bold; font-size: 200%; } input { color: red; } [class="inputmath"] { border: 1px dotted; } javascript content function
setselection(id,value) { document.getelementbyid(id).
setattribute("selection",value); } function expand() {
setselection("a11","2");
setselection("a12","2");
setselection("a13","2");
setselection("a21","2");
setselection("a22","2");
setselection("a23","2");
setselection("a31","2");
setselection("a32","2");
setselection("a33","2");
setselection("a41","2");
setselection("a42","2");
sets...
...election("a43","2"); } function unexpand() {
setselection("a11","1");
setselection("a12","1");
setselection("a13","1");
setselection("a21","1");
setselection("a22","1");
setselection("a23","1");
setselection("a31","1");
setselection("a32","1");
setselection("a33","1");
setselection("a41","1");
setselection("a42","1");
setselection("a43","1"); } function incrementinput(inputid, increment) { var inputelement = document.getelementbyid(inputid); var size = parseint(inputelement.size) + increment; if (size <= 0) size = 1 inputelement.size = size; } and there could be more...
MathML Accessibility in Mozilla
abcd e __________ the
set a ; b ; c ; d ; e end
set __________ not supported.
... abcde __________ the
set a ; b ; c comma d comma e end
set __________ not supported.
..., b ⏞ ℓ b 's ⏟ k + ℓ elements } __________ the
set modified modified a comma ...
... comma b with modified over brace with script l b apostraphes above above with modified under brace with k plus script l elements below below end
set __________ { a , ...
MathML Demo: <mspace> - space
mathml demo: <mspace> - space the background color of <mspace> elements has been
set to yellow for easier viewing.
... you can
set the width ∑ x y height ∫ x y and depth [ x y ] of mspace elements (click the math text to view the numeric values that are
set).
... title="decrease depth">-</a> <math display="block"> <mstyle displaystyle="true"> <msqrt> <mrow> <mn>3</mn> <mspace style="background-color: yellow" id="thespace" height="0.1ex" depth="0.1ex" width="0.1em" /> <mi>x</mi> </mrow> </msqrt> </mstyle> </math> </p> javascript content var height=0; var width=0; var depth=0; function upheight() { height++; document.getelementbyid("thespace").
setattribute("height",height+".1ex"); } function downheight() { height--; document.getelementbyid("thespace").
setattribute("height",height+".1ex"); } function upwidth() { width++; document.getelementbyid("thespace").
setattribute("width",width+".1em"); } function downwidth() { width--; document.getelementbyid("thespace").
setattribute("width",width+".1em"); } function updepth() { depth++;...
... document.getelementbyid("thespace").
setattribute("depth",depth+".1ex"); } function downdepth() { depth--; document.getelementbyid("thespace").
setattribute("depth",depth+".1ex"); } ...
Using the viewport meta tag to control layout on mobile browsers
it can be
set to a specific number of pixels like width=600 or to the special value device-width, which is the width of the screen in css pixels at a scale of 100%.
... viewport width and screen width sites can
set their viewport to a specific size.
...(allen pike's choosing a viewport for ipad sites has a good explanation for web developers.) for pages that
set an initial or maximum scale, this means the width property actually translates into a minimum viewport width.
...if web developers want their scale
settings to remain consistent when switching orientations on the iphone, they must add a maximum-scale value to prevent this zooming, which has the sometimes-unwanted side effect of preventing users from zooming in: <meta name="viewport" content="initial-scale=1, maximum-scale=1"> suppress the small zoom applied by many smartphones by
setting the initial scale and minimum-scale values to 0.86.
Mozilla Quirks Mode Behavior
(bug 915053) an empty string for the background attribute
sets the background url to empty only in quirks mode.
... in quirks mode, when tables have a border style of in
set or out
set, the border color is based on the background color of the table or of the nearest ancestor with non-transparent background.
...i don't follow the code in nscssrenderingborders well enough to tell, though.] in quirks mode a fixed width specified on a table cell re
sets the nowrap attribute.
... in a frame
set cols/rows specification 0* is treated as 1* (see bug 40383).
Gecko Profiler FAQ
the current
setup requires each thread that you want to profile to notify the profiler about its existence.
... [ehsan] try clicking the toolbar icon for the extension, expanding the
settings section, and enter the secret cheat code “,” in the threads field and click on “apply (restart profiler)”.
... i there an equivalent to itimer_prof vs itimer_real
settings?
...start the browser with the environment variable moz_profiler_startup=1
set.
Leak-hunting strategies and tips
if you really need to debug leaks that involve js objects closely, you can get detailed printouts of the paths js uses to mark objects when it is determining the
set of live objects by using the functions added in bug 378261 and bug 378255.
...it may just involve
setting the xpc_shutdown_heap_dump environment variable to a file name, but i haven't tested that.) post-processing of stack traces on mac and linux, the stack traces generated by our internal debugging tools don't have very good symbol information (since they just show the results of dladdr).
... getting symbol information for system libraries windows
setting the environment variable _nt_symbol_path to something like symsrv*symsrv.dll*f:\localsymbols*http://msdl.microsoft.com/download/symbols as described in microsoft's article.
...some places you can do this are: layout engine define debug_tracemalloc_framearena where it is commented out in layout/base/nspresshell.cpp glib
set the environment variable g_slice=always-malloc other references performance tools leak debugging screencasts (dbaron) leakingpages - a list of pages known to leak mdc:performance - contains documentation for all of our memory profiling and leak detection tools ...
Preference reference
accessibility.tabfocusthe preference accessibility.tabfocus controls what elements receive focus when the user presses the tab key.browser.altclicksavethe preference browser.altclicksave controls whether clicking a link while holding the alt key starts the download of that link.browser.dom.window.dump.enabledthis
setting enables the dump function, which sends messages to the system console.
...
set it to true to enable it, or false to disable it.browser.dom.window.dump.filebrowser.dom.window.dump.file redirects the ouput of window.dump() calls to a file whose address is specified in this preference if browser.dom.window.dump.enabled is
set to true.
...if
set to true, the data is stored as content preference.browser.pagethumbnails.capturing_disabledthe preference browser.pagethumbnails.capturing_disabled controls whether the application creates screenshots of visited pages which will be shown if the web page is shown in the grid of the "new tab page" (about:newtab) which offers the most often visited pages for fast navigation.browser.search.context.loadinbackgroundbrowser.search.context.loadinbackground controls whether a search from the context menu with "search <search engine> for <selected ...
...the old behavior can be restored by
setting the preference mail.tabs.drawintitlebar to false.nglayout.debug.disable xul fastloadthe preference nglayout.debug.disable_xul_fastload controls whether or not xul fastload is used.nglayout.debug.disable_xul_cacheto improve performance, mozilla caches chrome xul documents the first time they load for faster loading later.
Research and prep
local search a good test is if you were to run a
set of comparative queries; the secondary engine should produce the best local language results and the primary/default position should produce the best global results.
... e-commerce search amazon broad
set of products, simple search interface with no/limited advertising, popular shopping engine.
... e-commerce search amazon broad
set of products, simple search interface with no/limited advertising, popular shopping engine.
... e-commerce search amazon broad
set of products, simple search interface with no/limited advertising, popular shopping engine.
Nonblocking IO In NSPR
typically, this central thread invokes <tt>pr_poll()</tt> on a
set of nonblocking file descriptors.
...one can make the new socket nonblocking by using <tt>pr_
setsockopt()</tt> as in the example below (error checking is omitted for clarity): <tt>prfiledesc *sock;</tt> <tt>printn optval = 1;</tt> <tt>sock = pr_newtcpsocket();</tt> /* * make the socket nonblocking */ pr_
setsockopt(sock, pr_sockopt_nonblocking, &optval, sizeof(optval)); programming constraints there are some constraints due to the use of nt asynchronous i/o in the nspr.
...also, native file descriptors (socket handles) cannot be added to <tt>pr_fd_
set</tt>, i.e., the functions <tt>pr_fd_n
set</tt>, <tt>pr_fd_nclr</tt>, <tt>pr_fd_nis
set</tt> do not work.
...if <tt>pr_poll()</tt> reports that the socket is readable (i.e., <tt>pr_poll_read</tt> is
set in <tt>out_flags</tt>), and <tt>pr_available()</tt> returns 0, this means that the socket connection is closed.
Logging
nspr provides a
set of logging functions that conditionally write printf() style strings to the console or to a log file.
...
set one of the compile-time defines when you build your application.
... log types and variables two types supporting nspr logging are exposed in the api: prlogmoduleinfo prlogmodulelevel two environment variables control the behavior of logging at execution time: nspr_log_modules nspr_log_file logging functions and macros the functions and macros for logging are: pr_newlogmodule pr_
setlogfile pr_
setlogbuffering pr_logprint pr_logflush pr_log_test pr_log pr_assert pr_assert pr_static_assert (new in nspr 4.6.6xxx this hasn't been released yet; the number is a logical guess) pr_not_reached use example the following sample code fragment demonstrates use of the logging and debugging aids.
... before running the compiled program,
set the environment variable nspr_log_modules to userstuff:5 static void userlogstuff( void ) { prlogmoduleinfo *mylm; printn i; pr_static_assert(5 > 4); /* nspr 4.6.6 or newer */ mylm = pr_newlogmodule( "userstuff" ); pr_assert( mylm ); pr_log( mylm, pr_log_notice, ("log a notice %d\n", 999 )); for (i = 0; i < 10 ; i++ ) { pr_log( mylm, pr_log_debug, ("log debug number: %d\n", i)); pr_sleep( 500 ); } pr_log( mylm, pr_log_notice, "that's all folks\n"); } /* end userlogstuff() */ see also nspr logging reference ...
NSPR LOG MODULES
these controls should be
set in the nspr_log_modules environment variable at execution time to affect nspr's log service for your application.
...to enable all log module calls to pr_log,
set the variable as follows:
set nspr_log_modules=all:5 timestamp including timestamp results in a timestamp of the form "2015-01-15 21:24:26.049906 utc - " prefixing every logged line.
... bufsize:size the name bufsize:size
sets the log buffer to size.
...
set nspr_log_modules=timestamp,mozstorage:5
set nspr_log_file=/tmp/foo.log logging with try server for mochitest, edit variable nspr_log_modules in testing/mochitest/runtests.py before pushing to try.
PRLinger
syntax #include <prio.h> typedef struct prlinger { prbool polarity; printervaltime linger; } prlinger; fields the structure has the following fields: polarity polarity of the option's
setting: pr_false means the option is off, in which case the value of linger is ignored.
...the pr_sockopt_linger socket option, with a value represented by a structure of type prlinger, makes it possible to change this default as follows: if polarity is
set to pr_false, pr_close returns immediately, but if there are any data remaining in the socket send buffer, the runtime attempts to deliver the data to the peer.
... if polarity is
set to pr_true and linger is
set to 0 (pr_interval_no_wait), the runtime aborts the connection when it is closed and discards any data remaining in the socket send buffer.
... if polarity is
set to pr_true and linger is nonzero, the runtime lingers when the socket is closed.
PRSeekWhence
specifies how to interpret the off
set 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 off
set parameter.
... pr_seek_cur
sets the file pointer to its current location plus the value of the off
set parameter.
... pr_seek_end
sets the file pointer to the size of the file plus the value of the off
set parameter.
PR_GMTParameters
returns the time zone off
set information that maps the specified prexplodedtime to gmt.
... syntax #include <prtime.h> prtimeparameters pr_gmtparameters ( const prexplodedtime *gmt); parameter gmt a pointer to the clock/calendar time whose off
sets are to be determined.
... returns a time parameters structure that expresses the time zone off
sets at the specified time.
... this is a trivial function; for any input, it returns a prtimeparameters structure with both fields
set to zero.
PR_MemMap
syntax #include <prio.h> void* pr_memmap( prfilemap *fmap, print64 off
set, pruint32 len); parameters the function has the following parameters: fmap a pointer to the file-mapping object representing the file to be memory-mapped.
... off
set the starting off
set of the section of file to be mapped.
... the off
set must be aligned to whole pages.
...the section of the file starts at off
set and has the length len.
PR_NewThreadPrivateIndex
you use this index with pr_
setthreadprivate and pr_getthreadprivate.
...until the data for an index is actually
set, the value of the private data at that index is null.
... you pass this index to pr_
setthreadprivate and pr_getthreadprivate to
set and retrieve data associated with the index.
...if a destructor function is registered with a new index, it will be called at one of two times, as long as the private data is not null: when replacement private data is
set with pr_
setthreadprivate when a thread exits the index maintains independent data values for each binding thread.
PR_dtoa
decpt a pointer to a memory location where the runtime will store the off
set, relative to the beginning of the output string, of the conversion's decimal point.
... *rve if not null this location is
set to the address of the end of the result.
...if rve is not null, *rve is
set to point to the end of the returned value.
... if the input parameter d is+infinity,-infinity ornan, *decpt is
set to 9999.
NSS FAQ
general questions what is network security services (nss) nss is
set of libraries, apis, utilities, and documentation designed to support cross-platform development of security-enabled client and server applications.
... the integration effort depends on an number of factors, such as developer skill
set, application complexity, and the level of security required for your application.
... nss includes detailed documentation of the ssl api and sample code that demonstrates basic ssl functionality (
setting up an encrypted session, server authentication, and client authentication) to help jump start the integration process.
...exports (including those (a) on the bureau of industry and security denied parties list or entity list, (b) on the office of foreign as
sets control list of specially designated nationals and blocked persons, and (c) involved with missile technology or nuclear, chemical or biological weapons).
NSS 3.12.4 release notes
d from ascii string bug 405297: problems building nss/lib/ckfw/capi/ with mingw gcc bug 420991: libpkix returns wrong nss error code bug 427135: add super-h (sh3,4) architecture support bug 431958: improve des and sha512 for x86_64 platform bug 433791: win16 support should be deleted from nss bug 449332: secu_parsecommandline does not validate its inputs bug 453735: when using cert9 (sqlite3) db,
set or change master password fails bug 463544: warning: passing enum* for an int* argument in pkix_validate.c bug 469588: coverity errors reported for softoken bug 470055: pkix_httpcertstore_findsocketconnection reuses closed socket bug 470070: multiple object leaks reported by tinderbox bug 470479: io timeout during cert fetching makes libpkix abort validation.
...bug 485745: modify fipstest.c to support cavs 7.1 drbg testing bug 486304: cert7.db/cert8.db corruption when importing a large certificate (>64k) bug 486405: allocator mismatches in pk12util.c bug 486537: disable execstack in freebl x86_64 builds on linux bug 486698: facilitate the building of major components independently and in a chain manner by downstream distributions bug 486999: calling ssl_
setsockpeerid a second time leaks the previous value bug 487007: make lib/jar conform to nss coding style bug 487162: ckfw/capi build failure on windows bug 487239: nssutil.rc doesn't compile on wince bug 487254: sftkmod.c uses posix file io functions on wince bug 487255: sdb.c uses posix file io functions on wince bug 487487: cert_nametoascii reports !invalid ava!
...mize for msvc++ bug 490154: cryptokey framework requires module to implement generatekey when they support keypairgeneration bug 491044: remove support for vms (a.k.a., openvms) from nss bug 491174: cert_pkixverifycert reports wrong error code when ee cert is expired bug 491919: cert.h doesn't have valid functions prototypes bug 492131: a failure to import a cert from a p12 file leaves error code
set to zero bug 492385: crash freeing named crl entry on shutdown bug 493135: bltest crashes if it can't open the input 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_re
set should be invoked in sdb_findobjectsinit when error occurs bug 494073: update rsa/dsa powerupself tests to b...
...e compliant for 2011 bug 494087: passing null as the value of cert_pi_trustanchors causes a crash in cert_pkix
setparam 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 libnssckbi.so is in <configdir>.
NSS 3.16 release notes
(this requires nspr 4.10.4.) to build for the linux x32 target,
set the environment variable use_x32=1 when building nss.
...it is no longer necessary to
set the environment variable nss_enable_ecc=1 when building nss.
... to disable ecc,
set the environment variable nss_disable_ecc=1 when building nss.
... bug 956082: if the nss_sdb_use_cache environment variable is
set, skip the runtime test sdb_measureaccess.
NSS 3.27.2 Release Notes
this is a patch release to address a memory leak in the ssl_
settrustanchors() function.
... notable changes in nss 3.27.2 the ssl_
settrustanchors() function is used to
set the distinguished names that an nss server includes in its tls certificaterequest message.
... previous versions of nss leaked the memory used to store distinguished names when ssl_
settrustanchors() was used.
... bugs fixed in nss 3.27.2 the following bug has been fixed in nss 3.27.2: bug 1318561 - ssl_
settrustanchors leaks compatibility nss 3.27.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.31 release notes
in pkcs11uri.h pk11uri_createuri - create a new pk11uri object from a
set of attributes.
... notable changes in nss 3.31 the apis that
set a tls version range have been changed to trim the requested range to the overlap with a systemwide crypto policy, if configured.
... previously, ssl_versionrange
set and ssl_versionrange
setdefault returned a failure if the requested version range wasn't fully allowed by the systemwide crypto policy.
...this is used only when seed_only_dev_urandom is
set at compile time.
NSS 3.46 release notes
bugs fixed in nss 3.46 bug 1572164 - don't unnecessarily free session in nsc_wrapkey bug 1574220 - improve controls after errors in tstcln, selfserv and vfyserv cmds bug 1550636 - upgrade sqlite in nss to a 2019 version bug 1572593 - re
set advertised extensions in ssl_constructextensions bug 1415118 - nss build with ./build.sh --enable-libpkix fails bug 1539788 - add length checks for cryptographic primitives (cve-2019-17006) bug 1542077 - mp_
set_ulong and mp_
set_int should return errors on bad values bug 1572791 - read out-of-bounds in der_decodetimechoice_util from sslexp_delegatecredential bug 1560593 - cleanup.sh script do...
...es not
set error exit code for tests that "failed with core" bug 1566601 - add wycheproof test vectors for aes-kw bug 1571316 - curve25519_32.c:280: undefined reference to `pr_assert' when building nss 3.45 on armhf-linux bug 1516593 - client to generate new random during renegotiation bug 1563258 - fips.sh fails due to non-existent "resp" directories bug 1561598 - remove -wmaybe-uninitialized warning in pqg.c bug 1560806 - increase softoken password max size to 500 characters bug 1568776 - output paths relative to repository in nss coverity bug 1453408 - modutil -changepw fails in fips mode if password is an empty string bug 1564727 - use a pss spki when possible for delegated credentials bug 1493916 - fix ppc64 inline assembler for clang bug 1561588 - remove -wmaybe-uninitialized...
...hangs on windows x64 when building nss since change
set 9162c654d06915f0f15948fbf67d4103a229226f bug 1564875 - improve rebuilding with build.sh bug 1565243 - support tc_owner without email address in nss taskgraph bug 1563778 - increase maxruntime on mac taskcluster tools, ssl tests bug 1561591 - remove -wmaybe-uninitialized warning in tstclnt.c bug 1561587 - remove -wmaybe-uninitialized warning in lgattr.c bug 1561558 - remove -wmaybe-uninitialized warning...
... in httpserv.c bug 1561556 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1561332 - ec.c:28 warning: comparison of integers of different signs: 'int' and 'unsigned long' bug 1564714 - print certutil commands during
setup bug 1565013 - hacl image builder times out while fetching gpg key bug 1563786 - update hacl-star docker image to pull specific commit bug 1559012 - improve gcm perfomance using pmull2 bug 1528666 - correct resumption validation checks bug 1568803 - more tests for client certificate authentication bug 1564284 - support profile mobility across windows and linux bug 1573942 - gtest for pkcs11.txt with different breaking line formats bug 1575968 - add strsclnt option to enforce the use of either ipv4 or ipv6 bug 1549847 - fix nss builds on ios bug 1485533 ...
NSS Sample Code Sample1
as an alternative, new keys may be sent to the // current
set of secondary hosts when they are generated by the // primary.
... // // server - an instance of a server that is part of a // cluster of servers that are sharing a common
set // of encryption and macing keys.
... if (rv == 0 && prvkey) goto done; rv = 0; // these could be parameters to the init function rsaparams.keysizeinbits = 1024; rsaparams.pe = 65537; slot = pk11_getinternalkeyslot(); if (!slot) { rv = 1; goto done; } prvkey = pk11_generatekeypair(slot, ckm_rsa_pkcs_key_pair_gen, &rsaparams, &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.
... s = pk11_
setprivatekeynickname(prvkey, mservername); if (s != secsuccess) { rv = 1; goto done; } done: if (slot) pk11_freeslot(slot); if (pubkey) seckey_destroypublickey(pubkey); if (prvkey) seckey_destroyprivatekey(prvkey); return rv; } int server::generatekeys() { int rv = 0; seckeypublickey *pubkey = 0; pk11slotinfo *slot = 0; // choose a slot to use slot = pk11_getinternalkeyslot(); if (!slot) { rv = 1; goto done; } // get our own public key to use for wrapping rv = getpublickey(&pubkey); if (rv) goto done; // do the encryption (aes) key if (!mwrappedenckey) { pk11symkey *key = 0; // the key size is 128 bits (16 bytes) key = pk11_keygen(slot, ckm_aes_key_gen, 0, 128/8, 0); if (!key) { rv = 1; goto aes_done; } rv = wrapkey(ke...
NSPR functions
call pr_
seterror to
set the error code, which can be retrieved with pr_geterror later.
... the nss functions port_geterror and port_
seterror are simply wrappers of pr_geterror and pr_
seterror.
... 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_read pr_write pr_recv pr_send pr_getsocketoption pr_
setsocketoption pr_shutdown pr_close ...
sslerr.html
ssl_error_bad_mac_read -12273 "ssl received a record with an incorrect message authentication code." this usually indicates that the client and server have failed to come to agreement on the
set of keys used to encrypt the application data and to check message integrity.
...this usually indicates that the client and server have failed to come to agreement on the
set of keys used to encrypt the application data and to check message integrity.
...are listed in other 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." ...
...authorized." sec_error_ocsp_unknown_response_status -8067 "the ocsp server returned an unrecognizable status." sec_error_ocsp_unknown_cert -8066 "the ocsp server has no status for the certificate." sec_error_ocsp_not_enabled -8065 "you must enable ocsp before performing this operation." sec_error_ocsp_no_default_responder -8064 "you must
set the ocsp default responder before performing this operation." sec_error_ocsp_malformed_response -8063 "the response from the ocsp server was corrupted or improperly formed." sec_error_ocsp_unauthorized_response -8062 "the signer of the ocsp response is not authorized to give status for this certificate." sec_error_ocsp_future_response -8061 "the ocsp r...
SSL functions
function name/documentation source code nss versions nss_getclientauthdata mxr 3.2 and later nss_
setdomesticpolicy mxr 3.2 and later nss_
setexportpolicy mxr 3.2 and later nss_
setfrancepolicy mxr 3.2 and later nssssl_versioncheck mxr 3.2.1 and later ssl_authcertificate mxr 3.2 and later ssl_authcertificatehook mxr 3.2 and later ssl_badcerthook mxr 3.2 and later ssl_certdbhandle
set mxr 3.
...2 and later ssl_canbypass mxr 3.11.7 and later ssl_cipherpolicyget mxr 3.2 and later ssl_cipherpolicy
set mxr 3.2 and later ssl_cipherprefget mxr 3.2 and later ssl_cipherprefgetdefault mxr 3.2 and later ssl_cipherpref
set mxr 3.2 and later ssl_cipherpref
setdefault mxr 3.2 and later ssl_clearsessioncache mxr 3.2 and later ssl_configmpserversidcache mxr 3.2 and later ssl_configsecureserver mxr 3.2 and later ssl_configserversessionidcache mxr 3.2 and later ssl_datapending mxr 3.2 and later ssl_forcehandshake mxr 3.2 and later ssl_forcehandshakewithtimeout mxr 3.11.4 and later ssl_ge...
...nd later ssl_handshakecallback mxr 3.2 and later ssl_importfd mxr 3.2 and later ssl_inheritmpserversidcache mxr 3.2 and later ssl_invalidatesession mxr 3.2 and later ssl_localcertificate mxr 3.4 and later ssl_optionget mxr 3.2 and later ssl_optiongetdefault mxr 3.2 and later ssl_option
set mxr 3.2 and later ssl_option
setdefault mxr 3.2 and later ssl_peercertificate mxr 3.2 and later ssl_preencryptedfiletostream mxr 3.2 and later ssl_preencryptedstreamtofile mxr 3.2 and later ssl_rehandshake mxr 3.2 and later ssl_rehandshakewithtimeout mxr 3.11.4 and later ssl_re
sethandshake m...
...xr 3.2 and later ssl_restarthandshakeaftercertreq mxr 3.2 and later ssl_restarthandshakeafterservercert mxr 3.2 and later ssl_revealcert mxr 3.2 and later ssl_revealpinarg mxr 3.2 and later ssl_revealurl mxr 3.2 and later ssl_securitystatus mxr 3.2 and later ssl_
setmaxservercachelocks mxr 3.4 and later ssl_
setpkcs11pinarg mxr 3.2 and later ssl_
setsockpeerid mxr 3.2 and later ssl_
seturl mxr 3.2 and later ssl_shutdownserversessionidcache mxr 3.7.4 and later ...
Utility functions
3.2 and later port_arenazalloc mxr 3.2 and later port_free mxr 3.2 and later port_freearena mxr 3.2 and later port_geterror mxr 3.2 and later port_newarena mxr 3.2 and later port_realloc mxr 3.2 and later port_
seterror mxr 3.2 and later port_
setucs2_asciiconversionfunction mxr 3.2 and later port_
setucs2_utf8conversionfunction mxr 3.2 and later port_
setucs4_utf8conversionfunction mxr 3.2 and later port_strdup mxr 3.5 and later port_ucs2_asciiconversion mxr 3...
... 3.2 and later sec_asn1decodeitem mxr 3.2 and later sec_asn1decoderabort mxr 3.9 and later sec_asn1decoderclearfilterproc mxr 3.2 and later sec_asn1decoderclearnotifyproc mxr 3.2 and later sec_asn1decoderfinish mxr 3.2 and later sec_asn1decoder
setfilterproc mxr 3.2 and later sec_asn1decoder
setnotifyproc mxr 3.2 and later sec_asn1decoderstart mxr 3.2 and later sec_asn1decoderupdate mxr 3.2 and later sec_asn1encode mxr 3.2 and later sec_asn1encodeinteger mxr 3.2 and later sec_...
...er sec_asn1encoderabort mxr 3.9 and later sec_asn1encoderclearnotifyproc mxr 3.2 and later sec_asn1encoderclearstreaming mxr 3.2 and later sec_asn1encodercleartakefrombuf mxr 3.2 and later sec_asn1encoderfinish mxr 3.2 and later sec_asn1encoder
setnotifyproc mxr 3.2 and later sec_asn1encoder
setstreaming mxr 3.2 and later sec_asn1encoder
settakefrombuf mxr 3.2 and later sec_asn1encoderstart mxr 3.2 and later sec_asn1encoderupdate mxr 3.2 and later sec_asn1encodeunsignedinteger mxr 3.11.1 and l...
...algorithmid mxr 3.2 and later secoid_findoid mxr 3.2 and later secoid_findoidbytag mxr 3.2 and later secoid_findoidtag mxr 3.2 and later secoid_findoidtagdescription mxr 3.2 and later secoid_getalgorithmtag mxr 3.2 and later secoid_
setalgorithmid mxr 3.2 and later sgn_begin mxr 3.2 and later sgn_comparedigestinfo mxr 3.2 and later sgn_copydigestinfo mxr 3.2 and later sgn_createdigestinfo mxr 3.2 and later sgn_destroycontext mxr 3.2 and later sgn_destroydigestinfo...
NSS tools : signver
-a
sets that the given signature file is in ascii format.
... in 2009, nss introduced a new
set of databases that are sqlite databases rather than berkleydb.
...for example: # signver -a -s signature -d sql:/home/my/sharednssdb to
set the shared database type as the default type for the tools,
set the nss_default_db_type environment variable to sql: export nss_default_db_type="sql" this line can be
set added to the ~/.bashrc file to make the change permanent.
... o
setting up the shared nss database https://wiki.mozilla.org/nss_shared_db_howto o engineering and technical information about the shared nss database https://wiki.mozilla.org/nss_shared_db additional resources for information about nss and other tools related to nss (like jss), check out the nss project wiki at [1]http://www.mozilla.org/projects/security/pki/nss/.
Tutorial: Embedding Rhino
(note that because the java -jar option preempts the rest of the classpath, we can't use that and access the counter class.) $ java -cp "js.jar;examples" org.mozilla.javascript.tools.shell.main js> defineclass("counter") js> c = new counter(7) [object counter] js> c.count 7 js> c.count 8 js> c.count 9 js> c.re
setcount() js> c.count 0 counter's constructors the zero-argument constructor is used by rhino runtime to create instances.
... public string getclassname() { return "counter"; } dynamic properties dynamic properties are defined by methods beginning with jsget_ or js
set_.
...here we define re
setcount for javascript.
... public void jsfunction_re
setcount() { count = 0; } the call c.re
setcount() above calls this method.
GCIntegration - SpiderMonkey Redirect 1
never store gc things in a jsobject's private pointer (i.e., via js_
setprivate()).
...the goal is to keep a list, called the remembered
set, of all pointers from the tenured generation into the nursery.
...if so, the pointer is added to the remembered
set.
... the remembered
set allows us to collect the nursery without needing to look at the tenured generation at all, aside from the remembered
set entries.
Functions
when the function object is created, its parent is
set to the first object on the scope chain.
...if a name definitely refers to an argument or local variable of the immediately enclosing function, it can be accessed using jsop_{get,
set,call}{arg,local} instructions.
...outside all functions, if a name definitely refers to a global for which we have seen a var, const, or function declaration, then we emit a js_defvar instruction in the script prelude and access the global using jsop_{get,
set,call}gvar.
...in the worst case we emit jsop_{,
set,call}name.
Garbage collection
the engine can also gc a
set of compartments without gcing the rest.
...the pauses can be
set to be 10ms or less.
...js::nativeobject::privatewritebarrierpre takes care of this by invoking the jsobject's class trace hook before the private field is
set.
...in spidermonkey, an object is black if its black mark bit is
set.
JS::CallArgs
mutablehandlevalue rval() const returns the currently-
set return value.
...(if you're compiling against a debug build of spidermonkey, these methods will assert to aid debugging.) if the method you're implementing succeeds by returning true, you *must*
set this.
... if (args.length() == 0 || !args[0].isnumber()) { args.rval().
setint32(0); return true; } // access to the callee must occur before accessing/
setting // the return value.
... handlevalue thisv = rec.thisv(); args.rval().
set(js::numbervalue(args.length() * args[0].tonumber())); // callee() and calleev() will now assert.
JSNewEnumerateOp
the properties each op adds to the properties vector are added to the
set of values the for-in loop will iterate over.
... to use a jsnewenumerateop in a jsclass,
set the jsclass_new_enumerate bit in the jsclass.flags field and
set the jsclass.enumerate field to your jsnewenumerateop, casting it to jsenumerateop.
...if idp is non-null and the number of enumerable properties can't be computed in advance, *idp should be
set to jsval_zero.
...the opaque iterator state pointed at by statep is destroyed and *statep is
set to jsval_null if there are no properties left to enumerate.
JS_GetContextPrivate
syntax void * js_getcontextprivate(jscontext *cx); void js_
setcontextprivate(jscontext *cx, void *data); void * js_getsecondcontextprivate(jscontext *cx); // added in spidermonkey 17 void js_
setsecondcontextprivate(jscontext *cx, void *data); // added in spidermonkey 17 name type description cx jscontext * any context.
... data void * (in js_
setcontextprivate or js_
setsecondcontextprivate) pointer to application-defined data to be associated with the context cx.
...js_getcontextprivate and js_getsecondcontextprivate get this field and js_
setcontextprivate and js_
setsecondcontextprivate
set it.
...see also mxr id search for js_getcontextprivate mxr id search for js_
setcontextprivate mxr id search for js_getsecondcontextprivate mxr id search for js_
setsecondcontextprivate js_getruntimeprivate js_
setruntimeprivate js_getcompartmentprivate js_
setcompartmentprivate js_getprivate js_
setprivate js_getinstanceprivate bug 714458 ...
JS_GetLocaleCallbacks
get and
set locale specific string conversion and error message callbacks.
... syntax jslocalecallbacks * js_getlocalecallbacks(jsruntime *rt); void js_
setlocalecallbacks(jsruntime *rt, jslocalecallbacks *callbacks); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... description js_
setlocalecallbacks establishes locale callbacks.
...see also mxr id search for js_getlocalecallbacks mxr id search for js_
setlocalecallbacks mxr id search for jslocalecallbacks mxr id search for jslocaletouppercase mxr id search for jslocaletolowercase mxr id search for jslocalecompare mxr id search for jslocaletounicode ...
JS_GetProperty
if the lookup proceeds without error, exactly one of the following cases applies: if the property is not found, then *vp is
set to undefined.
...otherwise *vp is
set to the property's stored value, or undefined if the property does not have a stored value, and then the property's getter is called with the arguments (cx, obj, id, vp).
... on success, these functions
set *vp to the current value of the property, or undefined if obj has no such property, and return true.
... see also mxr id search for js_getproperty mxr id search for js_getucproperty mxr id search for js_getpropertybyid example in the jsapi phrasebook js_defineproperty js_definepropertywithtinyid js_deleteproperty js_deleteproperty2 js_lookupproperty js_propertystub js_
setproperty bug 461163 ...
JS_GetReservedSlot
syntax // added in spidermonkey 42 js::value js_getreservedslot(jsobject *obj, uint32_t index); void js_
setreservedslot(jsobject *obj, uint32_t index, js::value v); // obsolete since spidermonkey 42 jsval js_getreservedslot(jsobject *obj, uint32_t index); void js_
setreservedslot(jsobject *obj, uint32_t index, jsval v); name type description obj jsobject * an object that has reserved slots.
... v js::value (in js_
setreservedslot) the value to store.
...they cannot be returned from functions,
set as properties on objects, embedded in javascript arrays, and so on.) new objects' reserved slots are initialized to undefined.
... see also mxr id search for js_getreservedslot mxr id search for js_
setreservedslot bug 1184564 -- changed jsval to js::value ...
JS_GetRuntimePrivate
syntax void * js_getruntimeprivate(jsruntime *rt); void js_
setruntimeprivate(jsruntime *rt, void *data); name type description rt jsruntime * any js runtime.
... data void * (in js_
setruntimeprivate) pointer to application-defined data to be associated with the runtime rt.
...js_getruntimeprivate gets the value of this field and js_
setruntimeprivate
sets it.
...see also mxr id search for js_getruntimeprivate js_getcontextprivate js_
setcontextprivate js_getsecondcontextprivate js_
setsecondcontextprivate js_getcompartmentprivate js_
setcompartmentprivate js_getprivate js_
setprivate js_getinstanceprivate ...
JS_ToggleOptions
options uint32 the
set of options to toggle.
... this is the logical or of zero or more flags described at js_
setoptions.
...it is equivalent to js_
setoptions(cx, js_getoptions(cx) ^ options).
... see also mxr id search for js_toggleoptions js_
setoptions js_getoptions bug 880330 ...
SpiderMonkey 45
js_
setcurrentembeddertimefunction (bug 1159507) js_getcurrentembeddertime (bug 1159507) js_mayresolvestandardclass (bug 1155946) js_getiteratorprototype (bug 1225392) js_globallexicalscope (bug 1202902) js_hasextensiblelexicalscope (bug 1202902) js_extensiblelexicalscope (bug 1202902) js_initreflectparse (bug 987514) js::toprimitive (bug 1206168) js::getfirstargumentastypehint (bug 1054756) js...
...::objecttocompletepropertydescriptor (bug 1144366) js_
setimmutableprototype (bug 1211607) js_getownucpropertydescriptor (bug 1211607) js_hasownpropertybyid (bug 1211607) js_hasownproperty (bug 1211607) js_deleteucproperty (bug 1211607) js::newfunctionfromspec (bug 1054756) js::compilefornonsyntacticscope (bug 1165486) js_checkforinterrupt (bug 1058695) js::mapdelete (bug 1159469) js::mapforeach (bug 1159469) js::new
setobject (bug 1159469) js::
setsize (bug 1159469) js::
sethas (bug 1159469) js::
setdelete (bug 1159469) js::
setadd (bug 1159469) js::
setclear (bug 1159469) js::
setkeys (bug 1159469) js::
setvalues (bug 1159469) js::
setentries (bug 1159469) js::
setforeach (bug 1159469) js::exceptionstackornull (bug 814497) js::copyasyncstack (bug 1160307) js::getsavedframesource...
... (bug 1216819) js::getsavedframeline (bug 1216819) js::getsavedframecolumn (bug 1216819) js::getsavedframefunctiondisplayname (bug 1216819) js::getsavedframeasynccause (bug 1216819) js::getsavedframeasyncparent (bug 1216819) js::getsavedframeparent (bug 1216819) js::buildstackstring (bug 1133191) js::flushperformancemonitoring (bug 1181175) js::re
setperformancemonitoring (bug 1181175) js::disposeperformancemonitoring (bug 1208747) js::
setstopwatchismonitoringcpow (bug 1156264) js::getstopwatchismonitoringcpow (bug 1156264) js::
setstopwatchismonitoringjank (bug 1156264) js::getstopwatchismonitoringjank (bug 1156264) js::isstopwatchactive (bug 674779) js::getperfmonitoringtestcpurescheduling (bug 1181175) js::addcpowperformancedelta (bug 1181175) js::
setstopwatchstartcallback ...
...(bug 1208747) js::
setstopwatchcommitcallback (bug 1208747) js::
setgetperformancegroupscallback (bug 1208747) js_stringhasbeeninterned renamed to js_stringhasbeenpinned (bug 1178581) js_internjsstring renamed to js_atomizeandpinjsstring (bug 1178581) js_internstringn renamed to js_atomizeandpinstringn (bug 1178581) js_internstring renamed to js_atomizeandpinstring (bug 1178581) js_internucstringn renamed to js_atomizeandpinucstringn (bug 1178581) js_internucstring renamed to js_atomizeandpinucstring (bug 1178581) deleted apis js_getcompartmentstats js_
seticumemoryfunctions js_isgcmarkingtracer js_ismarkinggray js_idarraylength js_idarrayget js_destroyidarray js_defaultvalue js_getparent js_
setparent js::parsepropertydescriptorobject js_deleteproperty2 js_deleteproperty...
Thread Sanitizer
is flag causes clang to automatically link the tsan runtime :) export ldflags="-fsanitize=thread -fpic -pie" # these three are required by tsan ac_add_options --disable-jemalloc ac_add_options --disable-crashreporter ac_add_options --disable-elf-hack # keep symbols to symbolize tsan traces export moz_debug_symbols=1 ac_add_options --enable-debug-symbols ac_add_options --disable-install-strip #
settings for an opt build ac_add_options --enable-optimize="-o2 -gline-tables-only" ac_add_options --disable-debug starting the build process now you start the build process using the regular make -f client.mk command.
...before using it, you must of course adjust the path name for llvm_root to match your
setup.
...to use it, either make sure the llvm-symbolizer binary is in your path or
set the environment variable tsan_options="external_symbolizer_path=/path/to/llvm-symbolizer" before running the process.
... if you've built tsan as described above, then you will want to
set the variable to $llvm_home/build/bin/llvm-symbolizer.
Handling Mozilla Security Bugs
this work is separate from the work of developers adding new security features (cryptographically-based or otherwise) to mozilla, although obviously many of the same people will be involved in both
sets of activities.
... we believe that both
sets of concerns are valid, and that both are worth addressing as best we can.
...however, this is off
set by the fact that the person reporting a bug has visibility into the activities (if any) being taken to address the bug, and has the power to open the bug report for public scrutiny.
... changing this policy this policy is not
set in stone.
Querying Places
the defaults for these objects will result in a query that returns all of your browser history in a flat list: chromeutils.definemodulegetter(this, "placesutils", "resource://gre/modules/placesutils.jsm"); // no query options
set will get all history, sorted in database order, // which is nsinavhistoryqueryoptions.sort_by_none.
... the contents of bookmark folders can be retrieved by
setting the "folders" member in the query object.
...you can
set multiple folders and the result will be the intersection of all the folders.
... // |query| and |options| are objects created in the previous section query.
setparents([placesutils.bookmarks.toolbarguid], 1); let result = placesutils.history.executequery(query, options); serializing queries query and options objects can be serialized into a string starting with "place:" using queriestoquerystring.
Using the Places keywords API
using the keywords api the keywords api is a promise-based api available through the placesutils module: components.utils.import("resource://gre/modules/xpcomutils.jsm"); xpcomutils.definelazymodulegetter(this, "placesutils", "resource://gre/modules/placesutils.jsm");
setting a keyword for an url the insert() method accepts a keyword entry object describing the keyword to insert.
... it has the following properties: keyword: string representing the keyword url: either a url or spec repre
seting the url to associate to postdata: optional post data string.
... placesutils.keywords.insert({ keyword: "my_keyword", url: "http://www.example.com/" postdata: "post+data=1&test=2" }).then(() => { /* success */ }, e => { /* failure */ }); note that
setting an already existing keyword to a different url, will silently update the existing keyword to the new url.
... fetching an entry by keyword the fetch() method acceps a keyword string (or an object having a keywords property) and might resolve to a keyword entry with the following properties: keyword: string representing the keyword url: the url repre
seted by the keyword postdata: optional post data string.
Using the Places livemark service
nsilivemarkservice.
setsiteuri()
sets the uri of the website associated with a livemark container.
... livemarkservice.
setsiteuri(newlvmkid, uri("http://newuri.com/"); //newlvmkid = see "create a new livemark" for more detail.
... nsilivemarkservice.
setfeeduri()
sets the uri of feed associated with a livemark container.
... livemarkservice.
setfeeduri(newlvmkid, uri("http://foo.example.com/rss.xml")); //newlvmkid = see "create a new livemark" for more detail.
Using the Places tagging service
initiating the tagging service before using the tagging service, you need to obtain a reference to an instance of it: var taggingsvc = components.classes["@mozilla.org/browser/tagging-service;1"] .getservice(components.interfaces.nsitaggingservice); tagging a uri the nsitaggingservice.taguri() method tags a url with the given
set of tags.
... current tags
set for the url persist, and tags which are already
set for the given url are ignored.
...from the given
set of tags, a tag is ignored if it isn't
set for the given url.
... var tag1uris = taggingsvc.geturisfortag("tag 1"); //"tag 1" = given tag getting all tags associated with a url the nsitaggingservice.gettagsforuri() method returns an array of all tags
set for the given url.
Accessing the Windows Registry Using XPCOM
you can read the interface documentation for a full explanation, but we will show only the three most commonly used modes here: access_read — for reading values, enumerating keys, and receiving notifications access_write — for
setting values and creating sub keys access_all — access for all operations in addition to open() and create(), there are the openchild() and createchild() methods.
...calling haschanged() automatically re
sets the watch, so you can be sure that if it returns true there are changes.
...it consists of only one method, getregistryentry(), and a
set of named constants to specify the root key.
... you can use it as shown in the following example: var wss = components.classes["@mozilla.org/browser/shell-service;1"] .getservice(components.interfaces.nsiwindowsshellservice); var id = wss.getregistryentry(wss.hklm, "software\\microsoft\\windows\\currentversion", "productid"); note: there's no way to
set a registry value using this interface.
Using XPCOM Components
cookie manager cookie management is one of the many
sets of functionality that is made available to the browser in the form of an xpcom component and that can be reused by developers who want similar functionality in their applications.
... in addition to the cookiemanager component, for example, the webbrowserfind component is another part of a large
set of web browsing interfaces you can use.
... xpcom component viewer the left column shows the components - in this case a sub
set returned from a search on "gfx" as part of the contract id and the right column a list of the interfaces.
...this material may be distributed only subject to the terms and conditions
set forth in the open publication license, v1.02 or later.
How to build a binary XPCOM component using Visual Studio
development
setup the simplest way to get an xpcom component built is to use the gecko sdk.
.....\gecko-sdk\include" to additional include directories add "..\gecko-sdk\lib" to additional library directories add "nspr4.lib xpcom.lib xpcomglue_s.lib" to additional dependencies add "xp_win;xp_win32″ to preprocessor definitions turn off precompiled headers (just to keep it simple) use a custom build step for the xpcom idl file (spawns xpidl-build.bat to process the idl with mozilla tool
set, not midl) vc++ express project: xpcom-test.zip note: the project uses xpcom_glue.
...de "comp-impl.h" ns_impl_isupports1(cspecialthing, ispecialthing) cspecialthing::cspecialthing() { /* member initializers and constructor code */ mname.assign(l"default name"); } cspecialthing::~cspecialthing() { /* destructor code */ } /* attribute astring name; */ ns_imethodimp cspecialthing::getname(nsastring & aname) { aname.assign(mname); return ns_ok; } ns_imethodimp cspecialthing::
setname(const nsastring & aname) { mname.assign(aname); return ns_ok; } /* long add (in long a, in long b); */ ns_imethodimp cspecialthing::add(print32 a, print32 b, print32 *_retval) { *_retval = a + b; return ns_ok; } lastly, we need to create the module implementation.
...ound on the mdc site: #include "nsigenericfactory.h" #include "comp-impl.h" ns_generic_factory_constructor(cspecialthing) static nsmodulecomponentinfo components[] = { { specialthing_classname, specialthing_cid, specialthing_contractid, cspecialthingconstructor, } }; ns_impl_nsgetmodule("specialthingsmodule", components) assuming you have the right sdk and
setup the include and lib folders correctly, the project should build your xpcom component.
Components.Constructor
for example: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1"); var bis = new binaryinputstream(); print(bis.tostring()); // "[xpconnect wrapped nsisupports]" try { // someinputstream is an existing nsiinputstream // throws because bis hasn't been qi'd to nsibinaryinputstream bis.
setinputstream(someinputstream); } catch (e) { bis.queryinterface(components.interfaces.nsibinaryinputstream); bis.
setinputstream(someinputstream); // succeeds now } if two arguments are given, the created instance will be nsisupports.queryinterface()'d to the xpcom interface whose name is the second argument: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1", ...
... "nsibinaryinputstream"); var bis = new binaryinputstream(); print(bis.tostring()); // "[xpconnect wrapped nsibinaryinputstream]" // someinputstream is an existing nsiinputstream bis.
setinputstream(someinputstream); // succeeds if three arguments are given, then in addition to being nsisupports.queryinterface()'d, the instance will also have had an initialization method called on it.
... the arguments used with the initialization method are the arguments passed to the components.constructor()-created function when called: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1", "nsibinaryinputstream", "
setinputstream"); try { // throws, because number of arguments isn't equal to the number of // arguments nsibinaryinputstream.
setinputstream takes var bis = new binaryinputstream(); } catch (e) { // someinputstream is an existing nsiinputstream bis = new binaryinputstream(someinputstream); // succeeds var bytes = bis.readbytearray(somenumberofbytes); // succeeds } compare instance creation from base principles with instance creation using compo...
...nents.constructor(); the latter is much easier to read than the former (particularly if you're creating instances of a component in many different places): var bis = components.classes["@mozilla.org/binaryinputstream;1"] .createinstance(components.interfaces.nsibinaryinputstream); bis.
setinputstream(someinputstream); // assumes binaryinputstream was initialized previously var bis = new binaryinputstream(someinputstream); components.constructor() is purely syntactic sugar (albeit speedy and pretty syntactic sugar) for actions that can be accomplished using other common methods.
XPCShell Reference
(
setting this option disables the "interactive" mode) -f this option specifies a script file to execute.
... -v version this allows you to specify a specific version of js to use, and should be
set to an integral value specified by the jsversion enumerated type.
... for instance, specifying -v 180 will
set the interpreter to use javascript version 1.8.
...if you pass a number to it, it will
set the version number (and return the old version number).
IAccessibleValue
method overview [propget] hresult currentvalue([out] variant currentvalue ); [propget] hresult maximumvalue([out] variant maximumvalue ); [propget] hresult minimumvalue([out] variant minimumvalue ); hresult
setcurrentvalue([in] variant value ); methods currentvalue() returns the value of this object as a number.
...
setcurrentvalue()
sets the value of this object to the given number.
...hresult
setcurrentvalue( [in] variant value ); parameters value the new value represented by this object.
... the
set of admissible types for this argument is implementation dependent.
mozIStorageStatementWrapper
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void initialize(in mozistoragestatement astatement); void re
set(); boolean step(); void execute(); attributes attribute type description statement mozistoragestatement the statement that is wrapped.
... params mozistoragestatementparams the parameters; these can be
set in lieu of using the call notation on this.
... re
set() this method re
sets the wrapped statement.
... void re
set(); parameters none.
nsIAbCard
inherits from: nsisupports method overview astring getcardvalue(in string name) void
setcardvalue(in string attrname, in astring value) void copy(in nsiabcard srccard) boolean equals(in nsiabcard card) string converttobase64encodedxml() astring converttoxmlprintdata() string converttoescapedvcard() astring generatename(in long agenerateformat,[optional] in nsistringbundle abundle) astring generatephoneticname(in boolean a...
...
setcardvalue() void
setcardvalue(in string attrname, in astring value) parameters attrname the attribute you want to
set.
... value the value to
set the attribute to.
... astring generatephoneticname(in boolean alastnamefirst) parameters alastnamefirst
set to true to put the last name before the first.
nsIAccessibleHyperLink
endindex long the end off
set of the hyperlink accessible within the parent accessible.
... note: aria links can only be focused if they have the tabindex attribute
set.
... also, state_focused should then be
set on the accessible for this link.
... startindex long the off
set of the hyperlink accessible within the parent accessible.
nsIClipboard
widget/nsiclipboard.idlscriptable this interface supports basic clipboard operations such as:
setting, retrieving, emptying, matching and supporting clipboard data.
...7) method overview void emptyclipboard(in long awhichclipboard); void forcedatatoclipboard(in long awhichclipboard); obsolete since gecko 1.8 void getdata(in nsitransferable atransferable, in long awhichclipboard); boolean hasdatamatchingflavors([array, size_is(alength)] in string aflavorlist, in unsigned long alength, in long awhichclipboard); void
setdata(in nsitransferable atransferable, in nsiclipboardowner anowner, in long awhichclipboard); boolean supportsselectionclipboard(); boolean supportsfindclipboard(); constants most clipboard operations in firefox use kglobalclipboard, which is the one also used by the typical control-c/control-v keyboard shortcuts.
...
setdata() this method
sets the data from a transferable on the native clipboard.
... void
setdata( in nsitransferable atransferable, in nsiclipboardowner anowner, in long awhichclipboard ); parameters atransferable the transferable containing the data to put on the clipboard.
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).
...if more than one implementation is
set for a window, the hooks will be called in the order they are added.
...if there are multiple hooks
set for a window, any of them has an opportunity to cancel the action so no further processing will occur.
... if any errors occur (without
setting the boolean result) the default action will occur.
nsIConverterInputStream
to create an instance, use: var converterinputstream = components.classes["@mozilla.org/intl/converter-input-stream;1"] .createinstance(components.interfaces.nsiconverterinputstream); method overview void init(in nsiinputstream astream, in string achar
set, in long abuffersize, in prunichar areplacementchar); constants constant value description default_replacement_character 0xfffd default replacement character value.
...void init( in nsiinputstream astream, in string achar
set, in long abuffersize, in prunichar areplacementchar ); parameters astream the source stream which is read and converted.
... achar
set the character encoding to use for converting the bytes of the stream.
...this is currently
set to 8192 bytes.
nsIConverterOutputStream
to create an instance, use: var converteroutputstream = components.classes["@mozilla.org/intl/converter-output-stream;1"] .createinstance(components.interfaces.nsiconverteroutputstream); method overview void init(in nsioutputstream aoutstream, in string achar
set, in unsigned long abuffersize, in prunichar areplacementcharacter); methods init() initialize this stream.
...void init( in nsioutputstream aoutstream, in string achar
set, in unsigned long abuffersize, in prunichar areplacementcharacter ); parameters aoutstream the underlying output stream to which the converted strings will be written.
... achar
set the character
set to use for encoding the characters.
... a null char
set will be interpreted as utf-8.
nsICrashReporter
minidumppath nsilocalfile get or
set the path on the local system to which minidumps will be written when a crash happens.
... serverurl nsiurl get or
set the url to which crash reports will be submitted.
... exceptions thrown ns_error_failure on get if no url is
set.
... ns_error_invalid_arg on
set if a non-http(s) url is assigned.
nsICryptoHMAC
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview acstring finish(in prbool aascii); void init(in unsigned long aalgorithm, in nsikeyobject akeyobject); void re
set(); void update([const, array, size_is(alen)] in octet adata, in unsigned long alen); void updatefromstream(in nsiinputstream astream, in unsigned long alen); constants hashing algorithms.
...this call re
sets the object to its pre-init state.
... re
set() reinitialize hmac context to be reused with the same
settings (the key and hash algorithm) but on different
set of data.
... void re
set(); parameters none.
nsIDOMSerializer
to create an instance, use: var domserializer = components.classes["@mozilla.org/xmlextras/xmlserializer;1"] .createinstance(components.interfaces.nsidomserializer); method overview void serializetostream(in nsidomnode root, in nsioutputstream stream, in autf8string char
set); astring serializetostring(in nsidomnode root); methods serializetostream() the subtree rooted by the specified element is serialized to a byte stream using the character
set specified.
... void serializetostream( in nsidomnode root, in nsioutputstream stream, in autf8string char
set ); parameters root the root of the subtree to be serialized.
...char
set the name of the character
set to use for the encoding to a byte stream.
... if this string is empty and root is a document, the document's character
set will be used.
nsIDOMStorage
a storage object stores an arbitrary
set of key-value pairs, which may be retrieved, modified and removed as needed.
...method overview void clear(); domstring getitem(in domstring key); domstring key(in unsigned long index); void removeitem(in domstring key); void
setitem(in domstring key, in domstring data); attributes attribute type description length unsigned long the number of keys stored in the session store.
...
setitem()
sets the value corresponding to a given key.
...void
setitem( in domstring key, in domstring data ); parameters key the key for which data should be
set.
nsIDOMWindowInternal
status domstring
sets the text in the status bar at the bottom of the browser or returns the previously
set text.
... defaultstatus domstring gets/
sets the status bar text for the given window.
... pagexoff
set long returns the number of pixels that the document has already been scrolled horizontally.
... pageyoff
set long returns the number of pixels that the document has already been scrolled vertically.
nsIDOMXPathResult
the nodes in the result
set are in the same order that they appear in the document.
... unordered_node_snapshot_type 6 type is a node-
set containing snapshots of all the nodes matching the expression used in the evaluator.
... ordered_node_snapshot_type 7 type is a node-
set containing snapshots of all the nodes matching the expression used in the evaluator.
... the nodes in the result
set are in the same order that they appear in the document.
nsIDownloadManager
the path is dependent on two user configurable prefs
set in preferences: browser.download.folderlist defines the default download location for files: 0: files are downloaded to the desktop by default.
... download_blocked_policy 9 windows specific: request was blocked by zone policy
settings.
...if you want to both add and start a download, you need to create an nsiwebbrowserpersist object, call this method,
set the progresslistener to the returned nsidownload object, and then call the nsiwebbrowserpersist.saveuri() method.
...should always be
set to nsidownloadmanager.download_type_download (that is, zero).
nsIDragSession
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void getdata( in nsitransferable atransferable, in unsigned long aitemindex ); boolean isdataflavorsupported( in string adataflavor ); attributes attribute type description candrop boolean
set the current state of the drag, whether it can be dropped or not.
... usually the target "frame"
sets this so the native system can render the correct feedback.
... dragaction unsigned long
sets the action (copy, move, link and so on) for the current drag.
... targetsize nssize
sets the current width and height of the drag target area.
nsIEditorIMESupport
obsolete since gecko 2.0 void
setcompositionstring(in domstring acompositionstring, in nsiprivatetextrangelistptr atextrange, in nstexteventreplyptr areply); native code only!
...void querycomposition( in nstexteventreplyptr areply ); parameters areply native code only!
setcompositionstring obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete.
...
sets the inline input composition string.
...void
setcompositionstring( in domstring acompositionstring, in nsiprivatetextrangelistptr atextrange, in nstexteventreplyptr areply ); parameters acompositionstring atextrange areply ...
nsIEnvironment
getservice(components.interfaces.nsienvironment); method overview void
set(in astring aname, in astring avalue); astring get(in astring aname); boolean exists(in astring aname); methods
set()
set the value of an environment variable.
... void
set( in astring aname, in astring avalue ); parameters aname the variable name to
set.
... avalue the value to
set.
... return value if the variable has been
set, the value returned is pr_true.
nsIFilePicker
this should be
set before calling open() or show().
...this should be
set this before calling open() or show() to specify a starting point.
...
set this to choose a particular filter to be selected by default.
... 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.
nsILoginManagerStorage
avingenabled(in astring ahost); void init(); void initwithfile(in nsifile ainputfile, in nsifile aoutputfile); void modifylogin(in nsilogininfo oldlogin, in nsisupports newlogindata); void removealllogins(); void removelogin(in nsilogininfo alogin); void searchlogins(out unsigned long count, in nsipropertybag matchdata, [retval, array, size_is(count)] out nsilogininfo logins); void
setloginsavingenabled(in astring ahost, in boolean isenabled); attributes attribute type description uibusy boolean true when a master password prompt is being shown.
...
setloginsavingenabled() implement this method to enable or disable login saving for the specified host.
...existing logins for the host should not be affected when
setting this.
... void
setloginsavingenabled( in astring ahost, in boolean isenabled ); parameters ahost the host for which to enable or disable login saving.
nsIMIMEInputStream
to create an instance, use: var mimeinputstream = components.classes["@mozilla.org/network/mime-input-stream;1"] .createinstance(components.interfaces.nsimimeinputstream); method overview void addheader(in string name, in string value); void
setdata(in nsiinputstream stream); attributes attribute type description addcontentlength boolean when true a "content-length" header is automatically added to the stream.
...
setdata()
sets data-stream.
...void
setdata( in nsiinputstream stream ); parameters stream stream containing the data for the stream.
... example var postdata = components.classes["@mozilla.org/network/mime-input-stream;1"] .createinstance(components.interfaces.nsimimeinputstream); postdata.addheader("content-type", "application/x-www-form-urlencoded"); postdata.addcontentlength = true; postdata.
setdata(stringstream); ...
nsIMacDockSupport
this can be done like this: var docksupport = cc['@mozilla.org/widget/macdocksupport;1'].getservice(ci.nsimacdocksupport); console.log('docksupport:', docksupport); var win = services.wm.getmostrecentwindow('navigator:browser'); var macmenu = win.document.createelementns('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'menupopup'); macmenu.
setattribute('id', 'mymacmenu'); var macmenuitem = win.document.createelementns('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'menuitem'); macmenuitem.
setattribute('label', 'show most recent window'); macmenuitem.
setattribute('id', 'mymacmenuitem'); macmenuitem.addeventlistener('command', function(){ var docksupport = cc['@mozilla.org/widget/macdocksupport;1'].getservice(ci.nsima...
...cdocksupport); docksupport.activateapplication(true); services.wm.getmostrecentwindow(null).focus() }) macmenu.appendchild(macmenuitem); var mainpopup
set = win.document.getelementbyid('mainpopup
set'); mainpopup
set.appendchild(macmenu); let dockmenuelement = macmenu; //document.getelementbyid("menu_mac_dockmenu");66 let nativemenu = cc["@mozilla.org/widget/standalonenativemenu;1"].createinstance(ci.nsistandalonenativemenu); console.log('dockmenuelement:', dockmenuelement); nativemenu.init(dockmenuelement); docksupport.dockmenu = nativemenu; this replaces the default menu with this one menuitem that says "show most recent window".
...var macmenuitem = services.appshell.hiddendomwindow.document.createelementns('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'menuitem'); macmenuitem.
setattribute('label', 'show most recent window'); macmenuitem.
setattribute('id', 'mymacmenuitem'); macmenuitem.addeventlistener('command', function(){ var docksupport = cc['@mozilla.org/widget/macdocksupport;1'].getservice(ci.nsimacdocksupport); docksupport.activateapplication(true); services.wm.getmostrecentwindow(null).focus() }) services.appshell.hiddendomwindow.document.getelementbyid('menu...
...two types of elements: menu (if you would like to have sub menu items, make sure to
set a label on the "menu" element) menuitem (like in example above) elements can be hidden by adding the hidden attribute to the menu or menuitem and
setting it to true .
nsIMsgSearchSession
to create an instance, use: var searchsession = components.classes["@mozilla.org/messenger/searchsession;1"] .createinstance(components.interfaces.nsimsgsearchsession); to use the instance append search terms,
set the scope, and then call search().
...escustomheaders(in nsmsgsearchscopevalue scope, in voidptr selection, in boolean forfilters); boolean isstringattribute(in nsmsgsearchattribvalue attrib); void addallscopes(in nsmsgsearchscopevalue attrib); void search(in nsimsgwindow awindow); void interruptsearch(); void pausesearch(); void resumesearch(); [noscript] nsmsgsearchtype
setsearchparam(in nsmsgsearchtype type, in voidptr param); [noscript] void addresultelement(in nsmsgresultelement element); boolean matchhdr(in nsimsgdbhdr amsghdr, in nsimsgdatabase adatabase); void addsearchhit(in nsimsgdbhdr header, in nsimsgfolder folder); attributes attribute type description searchterms nsisupportsarray readonly: ...
..."dogbert" booleanand
set to true if associated boolean operator is and.
... void pausesearch(); resumesearch() void resumesearch();
setsearchparam() [noscript] nsmsgsearchtype
setsearchparam(in nsmsgsearchtype type, in voidptr param); parameters type param addresultelement() [noscript] void addresultelement(in nsmsgresultelement element); parameters element matchhdr() boolean matchhdr(in nsimsgdbhdr amsghdr, in nsimsgdatabase adatabase); ...
nsINavHistoryObserver
an empty string means the title was specifically
set to be nothing.
... null means the title was not
set at all.
... from c++ code, use the isvoid() and
setisvoid() methods to see whether an empty string is "null" or not; in either case it will always be an empty string.
...normally, transition types of transition_embed (corresponding to images in a page, for example) are not displayed in history results (unless includehidden is
set).
nsISocketProvider
constants constant value description proxy_resolves_host 1 << 0 this flag is
set if the proxy is to perform hostname resolution instead of the client.
... when
set, the hostname parameter passed in this interface will be used instead of the address structure passed for a later request.
... anonymous_connect 1 << 1 when
setting this flag, the socket will not apply any credentials when establishing a connection.
... for example, an ssl connection would not send any client-certificates if this flag is
set.
nsIThreadPool
method overview void shutdown(); attributes attribute type description idlethreadlimit unsigned long get/
set the maximum number of idle threads that are kept alive.
... idlethreadtimeout unsigned long get/
set the amount of time in milliseconds that a thread must be idle before it becomes eligible to be destroyed.
... a listener will only receive notifications about threads created after the listener is
set so it is recommended that the consumer
set the listener before dispatching the first event.
...threads created after the listener is
set will also take ownership of the listener so that the listener will be kept alive long enough to receive the guaranteed nsithreadpoollistener.onthreadshuttingdown() notification.
nsITreeColumn
if the cycler attribute is not
set, the column cells are regular text cells.
...if the editable attribute is not
set, the column cells are not editable.
...if the primary attribute is not
set, the column is not the primary column.
...if the selectable attribute is not
set, the column cells are not selectable.
nsIUploadChannel
the upload stream may only be
set prior to the invocation of asyncopen on the channel.
... inherits from: nsisupports last changed in gecko 1.7 method overview void
setuploadstream(in nsiinputstream astream, in acstring acontenttype, in long acontentlength); attributes attribute type description uploadstream nsiinputstream get the stream (to be) uploaded by this channel.
... methods
setuploadstream()
sets a stream to be uploaded by this channel.
...void
setuploadstream( in nsiinputstream astream, in acstring acontenttype, in long acontentlength ); parameters astream the stream to be uploaded by this channel.
nsIWebBrowserChrome2
1.0 66 introduced gecko 1.9 inherits from: nsiwebbrowserchrome last changed in gecko 1.9 (firefox 3) method overview void
setstatuswithcontext(in unsigned long statustype, in astring statustext, in nsisupports statuscontext); methods
setstatuswithcontext() called when the status text in the chrome needs to be updated.
... this method may be called instead of nsiwebbrowserchrome.
setstatus().
... an implementor of this method, should still implement nsiwebbrowserchrome.
setstatus().
... void
setstatuswithcontext( in unsigned long statustype, in astring statustext, in nsisupports statuscontext ); parameters statustype indicates what is
setting the text.
nsIWebBrowserFindInFrames
once the search is done, this will be
set to be the last frame searched, whether or not a result was found.
...
set this to only search a subtree of the frame hierarchy.
...
setting nsiwebbrowserfind.searchframes to true
sets this to true.
...
setting nsiwebbrowserfind.searchframes to true
sets this to true.
nsIWebNavigation
load_flags_char
set_change 1024 this flag specifies that a reload was triggered as a result of detecting an incorrect character encoding while parsing a previously loaded document.
... load_flags_stop_content 2048 if this flag is
set, stop() will be called before the load starts and will stop both content and network activity (the default is to only stop network activity).
...
set with care, since
setting incorrectly can cause us to assume that nothing was actually loaded in this object if the load ends up being handled by an external application.
... headers if the uri corresponds to a http request, then any http headers contained in this stream are
set on the http request.
nsIWinTaskbar
taskbar;1"] .getservice(components.interfaces.nsiwintaskbar); method overview nsijumplistbuilder createjumplistbuilder(); nsitaskbartabpreview createtaskbartabpreview(in nsidocshell shell, in nsitaskbarpreviewcontroller controller); nsitaskbarprogress gettaskbarprogress(in nsidocshell shell); nsitaskbarwindowpreview gettaskbarwindowpreview(in nsidocshell shell); void
setgroupidforwindow(in nsidomwindow aparent, in astring aidentifier); attributes attribute type description available boolean returns true if the operating system supports windows 7 or later taskbar features; you can use this instead of in-place operating system version checking.
... for xulrunner applications, the defaultgroupid attribute is configured using application.ini
settings, and is of the format "vendor.application.version".
...
setgroupidforwindow()
set the grouping id for a window.
...void
setgroupidforwindow( in nsidomwindow aparent, in astring aidentifier ); parameters aparent the parent nsidomwindow.
nsIWritablePropertyBag
1.0 66 introduced gecko 1.8 inherits from: nsipropertybag last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void deleteproperty(in astring name); void
setproperty(in astring name, in nsivariant value); methods deleteproperty() delete a property with the given name.
...
setproperty()
set a property with the given name to the given value.
...void
setproperty( in astring name, in nsivariant value ); parameters name property to
set the value of.
... value value to
set the property to.
nsIXULTemplateQueryProcessor
for instance, a datasource that holds a table that can only produce one
set of results.
... the reference variable may be specified in a template by
setting the "container" attribute on the <template> element to the variable to use.
...a binding allows an additional variable to be
set for a result, outside of those defined within the query.
...if the query processor needs to load the datasource asynchronously, it may
set the ashoulddelaybuilding returned parameter to true to delay building the template content, and call the builder's rebuild method when the data is available.
nsIXULTemplateResult
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) each result is identified by an id, which must be unique within the
set of results produced from a query.
...each result also contains a
set of variable bindings.
...the dom element created for this result, if any, will have its id attribute
set to this value.
...if
set, the resource uri must be the same as the id property.
XPCOM string functions
this is a low-level api.ns_cstring
setdatathe ns_cstring
setdata function copies data into the string's internal buffer.
... this is a low-level api.ns_cstring
setdatarangethe ns_cstring
setdatarange function copies data into a section of the string's internal buffer.
...this is a low-level api.ns_string
setdatathe ns_string
setdata function copies data into the string's internal buffer.
... this is a low-level api.ns_string
setdatarangethe ns_string
setdatarange function copies data into a section of the string's internal buffer.
nsMsgNavigationType
will wrap around if the wrap flag is
set to true.
...will wrap around if the wrap flag is
set to true.
...will wrap around if the wrap flag is
set to true.
...will wrap around if the wrap flag is
set to true.
Account Provisioner
if the user already has an email account, the user can switch to the original account
setup wizard.
... to have logs dumped to the terminal, create a string preference called mail.provider.logging.dump and
set its value to all.
... to have logs dumped to the error console, create a string preference called mail.provider.logging.console and
set its value to all.
... a mozillazine article on how to
set preferences in thunderbird.
LDAP Support
it assumes you are already familiar with configuring preferences for deployed builds in addition to
setting up thunderbird to use an ldap directory.
...this can be accomplished by
setting the following preferences: user_pref("mail.autocomplete.commentcolumn", 2); user_pref("ldap_2.servers.directoryname.autocomplete.commentformat", "[ou]"); the first preference tells us to use a comment column in the type down (the default value is 0 for no comment), and that the value for the comment is a custom string unique to each directory.
... the commentformat preference is
set on each directory.
...in this example, we are
setting the organization unit as the ldap attribute.
Mailnews and Mail code review requirements
to obtained a ui-review on an attachment,
set ui-review to '?' and enter :bwinton (for blake winton) as the requestee.
...once unit tests are committed, the in-testsuite+ flag should be
set on the bug.
...flag should be
set on the bug until the framework has been completed and the test code is running automatically.
...these bugs should have the in-testsuite- flag
set.
Using the Multiple Accounts API
it holds all the information necessary to retrieve mail from the remote server, such as hostname, user login name, and biff
settings.
... here's an example of a common
setup.
...a user's smtp servers are not actually dependant on any of the account
settings.
...currently, you can
set the default smtp server to something else by
setting the defaultserver property on the smtpservice, but that will not be saved to disk.
Accessibility Inspector - Firefox Developer Tools
this is a bit like the dom tree, except that it contains a more limited
set of elements and slightly different information about them.
... if you don't wish to allow the accessibility features to be automatically enabled, you can use the configuration editor (also known as about:config) to define the preference devtools.accessibility.auto-init.enabled, and
set it to false.
... if you don't wish to use the accessibility features at all, you can use the configuration editor to
set the preference devtools.accessibility.enabled to false.
... it is also very handy for verifying semantics — you can use the inspect accessibility properties context menu option to quickly see whether an item has the correct role
set on it (e.g., whether a button is really a button, or a link is really a link).
Browser Console - Firefox Developer Tools
to enable it
set the devtools.chrome.enabled preference to true in about:config, or
set the "enable browser chrome and add-on debugging toolboxes" (firefox 40 and later) option in the developer tool
settings.
...the messages from scripts in all the opened pages) by
setting or clearing the checkbox labeled show content messages.
...to enable it
set the devtools.chrome.enabled preference to true in about:config, or
set the "enable chrome debugging" option in the developer tool
settings.
...on windows, the following code will add a new item to the browser's main menu: var parent = window.document.getelementbyid("appmenuprimarypane"); var makethetea = gbrowser.ownerdocument.defaultview.document.createelementns("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "menuitem"); makethetea.
setattribute("label", "a nice cup of tea?"); parent.appendchild(makethetea); on macos, this similar code will add a new item to the "tools" menu: var parent = window.document.getelementbyid("menu_toolspopup"); var makethetea = gbrowser.ownerdocument.defaultview.document.createelementns("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "menuitem"); makethetea.
setattribute("label", "a ...
Browser Toolbox - Firefox Developer Tools
to enable it you need to check the
settings "enable chrome and addon debugging" and "enable remote debugging".
... to do this, open the developer tools
settings, go to the section "advanced
settings", and check the
settings "enable browser chrome and add-on debugging toolboxes" and "enable remote debugging".
... you will be presented with a dialog like this (it can be removed by
setting the devtools.debugger.prompt-connection property to false): click ok, and the browser toolbox will open in its own window: you'll be able to inspect the browser's chrome windows and see, and be able to debug, all the javascript files loaded by the browser itself and by any add-ons that are running.
...when you close the browser toolbox, the
setting will be cleared.
CSS Grid Inspector: Examine grid layouts - Firefox Developer Tools
grid display
settings: display line numbers: turn the line numbers shown for each grid overlay on and off (on by default).
... extend lines infinitely: by default, grid lines/tracks are only shown inside the element with display: grid
set on it; when toggling this option on, the grid lines extend to the edge of the viewport along each axis.
... note: your grid preferences such as overlay color and display
settings choices are persisted across page loads for each separate page.
... extend lines infinitely by default, the grid lines/tracks are only shown inside the element with display: grid
set on it.
Debugging Firefox Desktop - Firefox Developer Tools
enable remote debugging first, you'll need to ensure that both debugger and debuggee have the "enable browser chrome and add-on debugging toolboxes" and "enable remote debugging"
settings checked in the developer tools
settings.
... you only need to do this once: the
setting values persist across restarts.
...to use a different port, pass the desired port number: /path/to/firefox --start-debugger-server 1234 note: in windows, the start-debugger-server call will only have one dash: firefox.exe -start-debugger-server 1234 note: by default, and for security reasons, the devtools.debugger.force-local option is
set.
... if you want to debug a firefox instance from an external machine, you can change this option, but only do this on a trusted network or
set a strong firewall rule to lock down which machines can access it.
AnalyserNode.smoothingTimeConstant - Web APIs
it's basically an average between the current buffer and the last buffer the analysernode processed, and results in a much smoother
set of value changes over time.
... if 0 is
set, there is no averaging done, whereas a value of 1 means "overlap the previous and current buffer quite a lot while computing the value", which essentially smoothes the changes across analysernode.getfloatfrequencydata/analysernode.getbytefrequencydata calls.
... note: if a value outside the range 0–1 is
set, an index_size_err exception is thrown.
... if you are curious about the effect the smoothingtimeconstant() has, try cloning the above example and
setting analyser.smoothingtimeconstant = 0; instead.
Animation.startTime - Web APIs
syntax var animationstartedwhen = animation.starttime; animation.starttime = newstarttime; value a floating-point number representing the current time in milliseconds, or null if no time is
set.
... you can read this value to determine what the start time is currently
set at, and you can change this value to make the animation start at a different time.
...*/ function addcat(){ var newcat = document.createelement("div"); newcat.classlist.add("cat"); return newcat; } /* this is the function that adds a cat to the waapi column */ function animatenewcatwithwaapi() { // make a new cat var newcat = addcat(); // animate said cat with the waapi's "animate" function var newanimationplayer = newcat.animate(keyframes, timing); //
set the animation's start time to be the same as the original .cat#withwaapi newanimationplayer.starttime = catrunning.starttime; // add the cat to the pile.
... waapicats.appendchild(newcat); } reduced time precision to offer protection against timing attacks and fingerprinting, the precision of animation.starttime might get rounded depending on browser
settings.
Attr - Web APIs
createattribute() use element.
setattribute() instead.
... createattributens() use element.
setattributens() instead.
...
setattributenode() use element.
setattribute() instead.
...
setattributenodens() use element.
setattributens() instead.
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
it's sensible to
set this to a value between 0 and the duration of the buffer.
...this attribute is converted to an exact sample frame off
set within the buffer, by multiplying by the buffer's sample rate and rounding to the nearest integer value.
...it's sensible to
set this to a value between 0 and the duration of the buffer.
...this attribute is converted to an exact sample frame off
set within the buffer, by multiplying by the buffer's sample rate and rounding to the nearest integer value.
AudioBufferSourceNode.playbackRate - Web APIs
the playbackrate property of the audiobuffersourcenode interface is a k-rate audioparam that defines the speed at which the audio as
set will be played.
...when
set to another value, the audiobuffersourcenode resamples the audio before sending it to the output.
... <input class="playback-rate-control" type="range" min="0.25" max="3" step="0.05" value="1"> <span class="playback-rate-value">1.0</span> function getdata() { source = audioctx.createbuffersource(); request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.respon
setype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destination); source.loop = true; }, function(e){"error with decoding audio...
... data" + e.err}); } request.send(); } // wire up buttons to stop and play audio, and range slider control play.onclick = function() { getdata(); source.start(0); play.
setattribute('disabled', 'disabled'); playbackcontrol.removeattribute('disabled'); } stop.onclick = function() { source.stop(0); play.removeattribute('disabled'); playbackcontrol.
setattribute('disabled', 'disabled'); } playbackcontrol.oninput = function() { source.playbackrate.value = playbackcontrol.value; playbackvalue.innerhtml = playbackcontrol.value; } specification specification status comment web audio apithe definition of 'playbackrate' in that specification.
AuthenticatorAssertionResponse.authenticatorData - Web APIs
the bits are as follows, where "bit 0" is the least significant bit and all bits not specifically mentioned below are "reserved for future use": bit 0, user presence (up) - if
set, authenticator validated that the user was present through some test of user presence (tup), such as touching a button on the authenticator.
... bit 2, user verification (uv) - if
set, authenticator verified the actual user, through a biometric, pin, or other authentication method.
... bit 6, attested credential data (at) - if
set, attestedcredentialdata will immediately follow the first 37 bytes of this authenticatordata.
... bit 7, extension data (ed) - if
set, extension data is present.
BaseAudioContext.createPeriodicWave() - Web APIs
constraints optional an dictionary object that specifies whether normalization should be disabled (if not specified, normalization is enabled by default.) it takes one property: disablenormalization: if
set to true, normalization is disabled for the periodic wave.
... var real = new float32array(2); var imag = new float32array(2); var ac = new audiocontext(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag, {disablenormalization: true}); osc.
setperiodicwave(wave); osc.connect(ac.destination); osc.start(); osc.stop(2); this works because a sound that contains only a fundamental tone is by definition a sine wave here, we create a periodicwave with two values.
... the first value is the dc off
set, which is the value at which the oscillator starts.
...here, we only
set one component at full volume (1.0) on the fundamental tone, so we get a sine wave.
BaseAudioContext.decodeAudioData() - Web APIs
older callback syntax in this example, the getdata() function uses xhr to load an audio track,
setting the respon
setype of the request to arraybuffer so that it returns an array buffer as its response that we then store in the audiodata variable .
... we then pass this buffer into a decodeaudiodata() function; the success callback takes the successfully decoded pcm data, puts it into an audiobuffersourcenode created using audiocontext.createbuffersource(), connects the source to the audiocontext.destination and
sets it to loop.
...// then we put the buffer into the source function getdata() { source = audioctx.createbuffersource(); var request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.respon
setype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { source.buffer = buffer; source.connect(audioctx.destination); source.loop = true; }, function(e){ console.log("error with decoding audio data" + e.err); }); } request.send(); } // wire up buttons to sto...
...p and play audio play.onclick = function() { getdata(); source.start(0); play.
setattribute('disabled', 'disabled'); } stop.onclick = function() { source.stop(0); play.removeattribute('disabled'); } // dump script to pre element pre.innerhtml = myscript.innerhtml; new promise-based syntax ctx.decodeaudiodata(audiodata).then(function(decodeddata) { // use the decoded data here }); specifications specification status comment web audio apithe definition of 'decodeaudiodata()' in that specification.
Blob.slice() - Web APIs
the blob interface's slice() method creates and returns a new blob object which contains data from a sub
set of the blob on which it's called.
...if you specify a negative value, it's treated as an off
set from the end of the blob toward the beginning.
...if you specify a negative value, it's treated as an off
set from the end of the blob toward the beginning.
... return value a new blob object containing the specified sub
set of the data contained within the blob on which this method was called.
Determining the dimensions of elements - Web APIs
if you want to
set the width and height of an element, use width and height or the overriding min-width and max-width, and min-height and max-height properties.
... if you need to know the total amount of space an element occupies, including the width of the visible content, scrollbars (if any), padding, and border, you want to use the htmlelement.off
setwidth and htmlelement.off
setheight properties.
...in case of transforms, the off
setwidth and off
setheight returns the element's layout width and height, while getboundingclientrect() returns the rendering width and height.
... as an example, if the element has width: 100px; and transform: scale(0.5); the getboundingclientrect() will return 50 as the width, while off
setwidth will return 100.
CSS Typed Object Model API - Web APIs
it
sets a specific css property to the specified values and returns the first value as a cssstylevalue object.
... cssstylevalue.parseall() the parseall() method of the cssstylevalue interface
sets all occurences of a specific css property to the specified valueand returns an array of cssstylevalue objects, each containing one of the supplied values.
... stylepropertymap.
set() method of stylepropertymap interface that changes the css declaration with the given property to the value given.
... csskeywordvalue.value() property of the csskeywordvalue interface returning or
setting the value of the csskeywordvalue.
Cache.keys() - Web APIs
note: requests with duplicate urls but different headers can be returned if their responses have the vary header
set on them.
... if
set to true, the ?value=bar part of http://foo.com/?value=bar would be ignored when performing a match.
... ignoremethod: a boolean that, when
set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
... ignorevary: a boolean that, when
set to true, tells the matching operation not to perform vary header matching.
Cache.match() - Web APIs
options optional an object that
sets options for the match operation.
... for example, if
set to true the ?value=bar part of http://foo.com/?value=bar would be ignored when performing a match.
... ignoremethod: a boolean that, when
set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
... ignorevary: a boolean that when
set to true tells the matching operation not to perform vary header matching — i.e.
Cache.matchAll() - Web APIs
options optional an options object allowing you to
set specific control options for the matching performed.
... if
set to true, the ?value=bar part of http://foo.com/?value=bar would be ignored when performing a match.
... ignoremethod: a boolean that, when
set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
... ignorevary: a boolean that when
set to true tells the matching operation not to perform vary header matching — i.e.
Compositing example - Web APIs
the output looks like this: compositing example this code
sets up the global values used by the rest of the program.
...urce-atop', 'destination-over','destination-in','destination-out','destination-atop', 'lighter', 'copy','xor', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity' ].reverse(); var gcotext = [ 'this is the default
setting and draws new shapes on top of the existing canvas content.', 'the new shape is drawn only where both the new shape and the destination canvas overlap.
...', 'preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.', 'preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.', 'preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.' ].reverse(); var width = 320; var height = 340; main program when the page loads, this code runs to
set up and run the example: window.onload = function() { // lum in srgb var lum = { r: 0.33, g: 0.33, b: 0.33 }; // resize canvas canvas1.width = width; canvas1.height = height; canvas2.width = width; canvas2.height = height; lightmix() colorsphere(); runcomposite(); return; }; and this code, runcomposite(), handles the bulk o...
...= "rgba(0,255,0,1)"; ctx.arc(160, 100, 100, math.pi*2, 0, false); ctx.fill(); ctx.restore(); ctx.beginpath(); ctx.fillstyle = "#f00"; ctx.fillrect(0,0,30,30) ctx.fill(); }; var colorsphere = function(element) { var ctx = canvas1.getcontext("2d"); var width = 360; var halfwidth = width / 2; var rotate = (1 / 360) * math.pi * 2; // per degree var off
set = 0; // scrollbar off
set var oleft = -20; var otop = -20; for (var n = 0; n <= 359; n ++) { var gradient = ctx.createlineargradient(oleft + halfwidth, otop, oleft + halfwidth, otop + halfwidth); var color = color.hsv_rgb({ h: (n + 300) % 360, s: 100, v: 100 }); gradient.addcolorstop(0, "rgba(0,0,0,0)"); gradient.addcolorstop(0.7, "rgba("+color.r+","+col...
Compositing and clipping - Web APIs
we can, however, change this behaviour by
setting the globalcompositeoperation property.
... globalcompositeoperation = type this
sets the type of compositing operation to apply when drawing new shapes, where type is a string identifying which of the twelve compositing operations to use.
... a clip example in this example, we'll use a circular clipping path to restrict the drawing of a
set of random stars to a particular region.
...after this a
set of 50 randomly positioned and scaled stars is drawn, using the custom drawstar() function.
Drawing text - Web APIs
textalign = value text alignment
setting.
... textbaseline = value baseline alignment
setting.
... a textbaseline example edit the code below and see your changes update live in the canvas: ctx.font = '48px serif'; ctx.textbaseline = 'hanging'; ctx.stroketext('hello world', 0, 100); playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"></canvas> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="re
set" type="button" value="re
set" /> </div> <textarea id="code" class="playable-code"> ctx.font = "48px serif"; ctx.textbaseline = "hanging"; ctx.stroketext("hello world", 0, 100);</textarea> var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); var textarea = document.getelementbyid('code'); var re
set = document.getelementbyid('re
set'); var edit = document.getelementbyi...
...d('edit'); var code = textarea.value; function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } re
set.addeventlistener('click', function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener('click', function() { textarea.focus(); }) textarea.addeventlistener('input', drawcanvas); window.addeventlistener('load', drawcanvas); advanced text measurements in the case you need to obtain more details about the text, the following method allows you to measure it.
Using images - Web APIs
to do this, you can use the convenient image() constructor: var img = new image(); // create new img element img.src = 'myimage.png'; //
set source path when this script gets executed, the image starts loading.
...so you need to be sure to use the load event so you don't try this before the image has loaded: var img = new image(); // create new img element img.addeventlistener('load', function() { // execute drawimage statements here }, false); img.src = 'myimage.png'; //
set source path if you're only using one external image this can be a good approach, but once you need to track more than one we need to resort to something more clever.
...the images are hidden from output by
setting the css property display to none for those images.
... } td { padding: 15px; } tying it all together is the javascript to draw our framed images: function draw() { // loop through all images for (var i = 0; i < document.images.length; i++) { // don't add a canvas for the frame image if (document.images[i].getattribute('id') != 'frame') { // create canvas element canvas = document.createelement('canvas'); canvas.
setattribute('width', 132); canvas.
setattribute('height', 150); // insert before the image document.images[i].parentnode.insertbefore(canvas,document.images[i]); ctx = canvas.getcontext('2d'); // draw image to canvas ctx.drawimage(document.images[i], 15, 20); // add frame ctx.drawimage(document.getelementbyid('frame'), 0, 0); } } } controll...
Using channel messaging - Web APIs
secondly, have a look at our multimessaging demo (run this live), which shows a slightly more complex
setup that can send multiple messages between the main page and an iframe.
...for this initial port transfering this message could be an empty string but in this example it is
set to 'init'.
... receiving the port and message in the iframe over in the iframe, we have the following javascript: var list = document.queryselector('ul'); var port2; // listen for the initial port transfer message window.addeventlistener('message', initport); //
setup the transferred port function initport(e) { port2 = e.ports[0]; port2.onmessage = onmessage; } // handle messages received on port2 function onmessage(e) { var listitem = document.createelement('li'); listitem.textcontent = e.data; list.appendchild(listitem); port2.postmessage('message received by iframe: "' + e.data + '"'); } when the initial message is received from the main pa...
... when a message is received from the main page we create a list item and insert it in the unordered list,
setting the textcontent of the list item equal to the event's data attribute (this contains the actual message).
CharacterData - Web APIs
characterdata.deletedata() removes the specified amount of characters, starting at the specified off
set, from the characterdata.data string; when this method returns, data contains the shortened domstring.
... characterdata.insertdata() inserts the specified characters, at the specified off
set, in the characterdata.data string; when this method returns, data contains the modified domstring.
... characterdata.replacedata() replaces the specified amount of characters, starting at the specified off
set, with the specified domstring; when this method returns, data contains the modified domstring.
... characterdata.substringdata() returns a domstring containing the part of characterdata.data of the specified length and starting at the specified off
set.
CloseEvent.initCloseEvent() - Web APIs
this method must be called to
set the event before it is dispatched, using eventtarget.dispatchevent().
... syntax event.initmouseevent(type, canbubble, cancelable, wasclean, reasoncode, reason); parameters type the string to
set the event's type to.
...
sets the value of event.bubbles.
...
sets the value of event.cancelable.
Document.popupNode - Web APIs
when a popup attached via the popup or context attributes is opened, the xul document's popupnode property is
set to the node that was clicked on.
...if the popup was opened via the keyboard, the popup node may be
set to null.
... this property is only
set for popups attached via the popup or context attributes.
...in these other cases, for example when calling the popup's showpopup method, you may wish to
set the popupnode property directly beforehand.
Document.requestStorageAccess() - Web APIs
examples: allow lists, block lists, on-device classification, user
settings, anti-clickjacking heuristics, or prompting the user for explicit permission.
... re
set after 24 hours in the case of a long-running browser session.
... re
set after 30 days.
...to make testing easier, we have added two preferences in about:config that control prompting upon requeststorageaccess() calls: dom.storage_access.auto_grants can be
set to false to disable the automatic granting of ephemeral storage access grants.
Examples of web and XML development using the DOM - Web APIs
width="500"> </p> <p>image 3: no height, width, but style="height: 50px; width: 500px;" <img id="image3" src="https://udn.realityripple.com/samples/d2/8ba7141ed1.gif" style="height: 50px; width: 500px;"> </p> <div id="output"> </div> </body> </html> example 2: image attributes <!doctype html> <html lang="en"> <head> <title>modifying an image border</title> <script> function
setborderwidth(width) { document.getelementbyid("img1").style.borderwidth = width + "px"; } </script> </head> <body> <p> <img id="img1" src="image1.gif" style="border: 5px solid green;" width="100" height="100" alt="border test"> </p> <form name="formname"> <input type="button" value="make border 20px-wide" onclick="
setborderwidth(20);" /> <input type="button" value="ma...
...ke border 5px-wide" onclick="
setborderwidth(5);" /> </form> </body> </html> example 3: manipulating styles in this simple example, some basic style properties of an html paragraph element are accessed using the style object on the element and that object's css style properties, which can be retrieved and
set from the dom.
...ventlistener("click", stopevent, false); } </script> </head> <body onload="load();"> <table id="t-daddy" onclick="alert('hi');"> <tr id="tbl1"> <td id="c1">one</td> </tr> <tr> <td id="c2">two</td> </tr> </table> </body> </html> example 6: getcomputedstyle this example demonstrates how the window.getcomputedstyle method can be used to get the styles of an element that are not
set using the style attribute or with javascript (e.g., elt.style.backgroundcolor="rgb(173, 216, 230)").
... <!doctype html> <html lang="en"> <head> <meta char
set="utf-8"/> <title>show event properties</title> <style> table { border-collapse: collapse; } thead { font-weight: bold; } td { padding: 2px 10px 2px 10px; } .odd { background-color: #efdfef; } .even { background-color: #ffffff; } </style> <script> function showeventproperties(e) { function addcell(row, text) { var cell = row.insertcell(-1); cell.appendchild(document.createtextnode(te...
Element.classList - Web APIs
if the class attribute is not
set or empty, it returns an empty domtokenlist, i.e.
... examples const div = document.createelement('div'); div.classname = 'foo'; // our starting state: <div class="foo"></div> console.log(div.outerhtml); // use the classlist api to remove and add classes div.classlist.remove("foo"); div.classlist.add("anotherclass"); // <div class="anotherclass"></div> console.log(div.outerhtml); // if visible is
set remove it, otherwise add it div.classlist.toggle("visible"); // add/remove visible, depending on test conditional, i less than 10 div.classlist.toggle("visible", i < 10 ); console.log(div.classlist.contains("foo")); // add or remove multiple classes div.classlist.add("foo", "bar", "baz"); div.classlist.remove("foo", "bar", "baz"); // add or remove multiple classes using spread syntax const cl...
...i] === toks[ci]) { sub++; continue a; } this[ci-sub] = toks[ci]; } protoobjproto.length = clen-sub, protoobjproto.value = ele.classname, protoobjproto[" ucl"] = ele; if (defineproperty) { defineproperty(ele, "classlist", { // ie8 & ie9 allow defineproperty on the dom enumerable: 1, get: function(){return restokenlist}, configurable: 0,
set: function(newval){ skippropchange = 1, ele.classname = protoobjproto.value = (newval += ""), skippropchange = 0; var toks = newval.trim().split(wsre), oldlen = protoobjproto.length; a: for(var ci = 0, clen = protoobjproto.length = toks.length, sub = 0; ci !== clen; ++ci){ for(var inneri=0; inneri!==ci; ++inneri) if(toks[inneri]==...
...prototype instanceof node is true according to the specs window.object.defineproperty(window.element.prototype, "classlist", { enumerable: 1, get: function(val){ if (!hasownprop.call(this, "classlist")) polyfillclasslist(this); return this.classlist; }, configurable: 0,
set: function(val){this.classname = val} }); } catch(e) { // less performant fallback for older browsers (ie 6-8): window[" ucl"] = polyfillclasslist; // the below code ensures polyfillclasslist is applied to all current and future elements in the doc.
Element: mousewheel event - Web APIs
on linux, 2 or -2 is
set per native wheel event.
...the value isn't changed even if the scroll amount of system
settings is page scroll.
...and also, the value isn't changed even if the scroll amount of system
settings is page scroll, i.e., the value is the same as ie on windows.
... on windows, since the detail attribute value is computed from actual scroll amount, the value is different from other browsers except the scroll amount per notch is 3 lines in system
settings or a page.
Element.releasePointerCapture() - Web APIs
the releasepointercapture() method of the element interface releases (stops) pointer capture that was previously
set for a specific (pointerevent) pointer.
... see the element.
setpointercapture() method for a description of pointer capture and how to
set it for a particular element.
... example this example
sets pointer capture on a <div> when you press down on it.
... html <div id="slider">slide me</div> css div { width: 140px; height: 50px; display: flex; align-items: center; justify-content: center; background: #fbe; } javascript function beginsliding(e) { slider.onpointermove = slide; slider.
setpointercapture(e.pointerid); } function stopsliding(e) { slider.onpointermove = null; slider.releasepointercapture(e.pointerid); } function slide(e) { slider.style.transform = `translate(${e.clientx - 70}px)`; } const slider = document.getelementbyid('slider'); slider.onpointerdown = beginsliding; slider.onpointerup = stopsliding; result specifications specification status comment pointer events – le...
Fetch API - Web APIs
it will seem familiar to anyone who has used xmlhttprequest, but the new api provides a more powerful and flexible feature
set.
...instead, it will resolve normally (with ok status
set to false), and it will only reject on network failure or if anything prevented the request from completing.
...
set-cookie headers from other sites are silently ignored.
... fetch() won’t send cookies, unless you
set credentials: 'same-origin'.
GlobalEventHandlers.onanimationend - Web APIs
we
set its size, position, color, and layout.
...first, the "slideanimation" class, which establishes the animation that will cause the box to move over the course of five seconds, one time, using the "slidebox" keyframe
set.
... function log(msg, event) { let logbox = document.getelementbyid("log"); logbox.innerhtml += msg; if (event) { logbox.innerhtml += " <code>"+ event.animationname + "</code> at time " + event.elapsedtime.tofixed(2) + " seconds."; } logbox.innerhtml += "\n"; }; then we
set up the event handlers for the animationstart and animationend events: let box = document.getelementbyid("box"); box.onanimationstart = function(event) { log("animation started", event); } box.onanimationend = function(event) { log("animation stopped", event); }; finally, we
set up a handler for a click on the button that runs the animation: document.getelementbyid("play").addeventlisten...
...er("click", function(event) { document.getelementbyid("box").classname = "slideanimation"; event.target.style.display = "none"; }, false); this
sets the class of the box we want to animate to the class that contains the animation description, then hides the play button because this example will only run the animation once.
GlobalEventHandlers.onanimationstart - Web APIs
we
set its size, position, color, and layout.
...first, the "slideanimation" class, which establishes the animation that will cause the box to move over the course of five seconds, one time, using the "slidebox" keyframe
set.
... function log(msg, event) { let logbox = document.getelementbyid("log"); logbox.innerhtml += msg; if (event) { logbox.innerhtml += " <code>"+ event.animationname + "</code> at time " + event.elapsedtime.tofixed(2) + " seconds."; } logbox.innerhtml += "\n"; }; then we
set up the event handlers for the animationstart and animationend events: let box = document.getelementbyid("box"); box.onanimationstart = function(event) { log("animation started", event); } box.onanimationend = function(event) { log("animation stopped", event); }; finally, we
set up a handler for a click on the button that runs the animation: document.getelementbyid("play").addeventlisten...
...er("click", function(event) { document.getelementbyid("box").classname = "slideanimation"; event.target.style.display = "none"; }, false); this
sets the class of the box we want to animate to the class that contains the animation description, then hides the play button because this example will only run the animation once.
msAudioCategory - Web APIs
note that you must
set the msaudiocategory before
setting the src property in code.
...*note that if msaudiocategory is
set to communications, msrealtime is automatically
set to true.
... no if msaudiodevicetype is not explicitly
set, msaudiodevicetype will be
set to communications.
... for hardware audio offload to be automatically applied, the audio category must be
set to foregroundonlymedia or backgroundcapablemedia.
HTMLDialogElement.open - Web APIs
true means it is
set, and therefore the dialog is shown.
... false means it not
set, and therefore the dialog is not shown.
... the property is now read only — it is possible to
set the value to programmatically show or hide the dialog.
...d="favdialog"> <form method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> <button id="cancel" type="re
set">cancel</button> <button type="submit">confirm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); var dialog = document.getelementbyid('favdialog'); di...
HTMLElement.dir - Web APIs
the htmlelement.dir property gets or
sets the text writing directionality of the content of the current element.
... an image can have its dir property
set to "rtl" in which case the html attributes title and alt will be formatted and defined as "rtl".
... when a table has its dir
set to "rtl", the column order is arranged from right to left.
... when an element has its dir
set to "auto", the direction of the element is determined based on its first strong directionality character, or default to the directionality of its parent element.
HTMLImageElement.alt - Web APIs
decorative images images with no semantic meaning—such as those which are solely decorative—or of limited informational value, should have their alt attributes
set to the empty string ("").
...ut nunc neque, porta eu auctor at, tempor et arcu.</p> </div> </div> css the css for this example simply
sets up the styles for the layout as shown in the result below.
...the alt attribute is
set to new page!
...a photo of a yellow teapot might literally have its alt attribute
set to "a yellow teapot".
HTMLMediaElement.srcObject - Web APIs
the srcobject property of the htmlmediaelement interface
sets or returns the object which serves as the source of the media associated with the htmlmediaelement.
... note: as of march 2020, only safari supports
setting objects other than mediastream.
... usage notes older versions of the media source specification required using createobjecturl() to create an object url then
setting src to that url.
... now you can just
set srcobject to the mediastream directly.
HTMLMetaElement - Web APIs
name type description content domstring gets or
sets the value of meta-data property.
... httpequiv domstring gets or
sets the name of an http response header to define for a document.
... name domstring gets or
sets the name of a meta-data property to define for a document.
... scheme domstring gets or
sets the name of a scheme used to interpret the value of a meta-data property.
HTMLOutputElement - Web APIs
htmloutputelement.
setcustomvalidity()
sets a custom validity message for the element.
... if the element is in default mode when the descendants of the element are changed in any way, the defaultvalue property is
set to the value of the textcontent property.
... re
setting the form puts the element into default mode, and
sets the textcontent property to the value of the defaultvalue property.
... value mode the element goes into value mode when the contents of the value property are
set.
HTMLScriptElement - Web APIs
htmlscriptelement.char
set is a domstring representing the character encoding of an external script.
... it reflects the char
set attribute.
... htmlscriptelement.crossorigin is a domstring reflecting the cors
setting for the script element.
...on
setting, it acts the same way as the textcontent idl attribute.
HTMLSelectElement.autofocus - Web APIs
if there are several, the first element with the attribute
set inserted, usually the first such element on the page, get the initial focus.
...
setting this property doesn't
set the focus to the associated <select> element: it merely tells the browser to focus to it when the element is inserted in the document.
...
setting it after the insertion, that is most of the time after the document load, has no visible effect.
... syntaxedit abool = aselectelement.autofocus; // get the value of autofocus aselectelement.autofocus = abool; //
set the value of autofocus example html <select id="myselect" autofocus> <option>option 1</option> <option>option 2</option> </select> javascript // check if the autofocus attribute on the <select> var hasautofocus = document.getelementbyid('myselect').autofocus; specifications specification status comment html living standardthe definition of 'autofocus' in that specification.
The HTML DOM API - Web APIs
html element interfaces these interfaces represent specific html elements (or
sets of related elements which have the same properties and methods associated with them).
... htmlanchorelement htmlareaelement htmlaudioelement htmlbrelement htmlbaseelement htmlbodyelement htmlbuttonelement htmlcanvaselement htmldlistelement htmldataelement htmldatalistelement htmldetailselement htmldialogelement htmldirectoryelement htmldivelement htmlelement htmlembedelement htmlfield
setelement htmlformelement htmlhrelement htmlheadelement htmlheadingelement htmlhtmlelement htmliframeelement htmlimageelement htmlinputelement htmllielement htmllabelelement htmllegendelement htmllinkelement htmlmapelement htmlmediaelement htmlmenuelement htmlmetaelement htmlmeterelement htmlmodelement htmlolistelement htmlobjectelement htmloptgroupelement htmloptionelement htmloutputelement htmlparagraphelement htmlparamelement htmlpictureelement html...
...colelement htmltableelement htmltablerowelement htmltablesectionelement htmltemplateelement htmltextareaelement htmltimeelement htmltitleelement htmltrackelement htmlulistelement htmlunknownelement htmlvideoelement deprecated html element interfaces htmlmarqueeelement obsolete html element interfaces htmlbasefontelement htmlfontelement htmlframeelement htmlframe
setelement htmlisindexelement htmlmenuitemelement web app and browser integration interfaces these interfaces offer access to the browser window and document that contain the html, as well as to the browser's state, available plugins (if any), and various configuration options.
... the htmlinputelement object for the "send" button's disabled property is
set to true, which disables the "send" button so it can't be clicked.
Headers - Web APIs
these actions include retrieving,
setting, adding to, and removing headers from the list of the request's headers.
...this affects whether the
set(), delete(), and append() methods will mutate the header.
... headers.
set()
sets a new value for an existing header inside a headers object, or adds the header if it does not already exist.
... note: to be clear, the difference between headers.
set() and headers.append() is that if the specified header does already exist and does accept multiple values, headers.
set() will overwrite the existing value with the new one, whereas headers.append() will append the new value onto the end of the
set of values.
IDBCursor - Web APIs
if the cursor is outside its range, this is
set to undefined.
...if the cursor is currently being iterated or has iterated outside its range, this is
set to undefined.
... methods idbcursor.advance()
sets the number of times a cursor should move its position forward.
... idbcursor.continueprimarykey()
sets the cursor to the given index key and primary key given as arguments.
IDBVersionChangeRequest - Web APIs
warning: the latest specification does not include this interface anymore as the idbdatabase.
setversion() method has been removed.
...it is used only by the
setversion() method of idbdatabase.
... methods inherits from: idbrequest idbversionchangerequest.
setversion updates the version of the database.
... nochrome android no support nofirefox android no support noopera android no support nosafari ios no support nosamsung internet android no support no
setversion deprecatednon-standardchrome no support noedge no support nofirefox no support noie no support noopera no support nosafari no support ...
IndexedDB API - Web APIs
combine indexeddb for storing data offline with service workers for storing as
sets offline, as outlined in making pwas work offline with service workers.
... idbobjectstore represents an object store that allows access to a
set of data in an indexeddb database, looked up via primary key.
... idbindex also allows access to a sub
set of data in an indexeddb database, but uses an index to retrieve the record(s) rather than the primary key.
...the way to change the version of the database has since changed (by calling idbfactory.open without also calling idbdatabase.
setversion), and the interface idbopendbrequest now has the functionality of the removed idbversionchangerequest.
KeyboardEvent.code - Web APIs
if the input device isn't a physical keyboard, but is instead a virtual keyboard or accessibility device, the returned value will be
set by the browser to match as closely as possible to what would happen with a physical keyboard, to maximize compatibility between physical and virtual input devices.
...finally, spaceship is
set to refer to the element with the id "spaceship", which is the svg polygon representing the ship the player controls.
... function updateposition(off
set) { let rad = angle * (math.pi/180); position.x += (math.sin(rad) * off
set); position.y -= (math.cos(rad) * off
set); if (position.x < 0) { position.x = 399; } else if (position.x > 399) { position.x = 0; } if (position.y < 0) { position.y = 399; } else if (position.y > 399) { position.y = 0; } } the refresh() function handles applying the rotation and position...
... function refresh() { let x = position.x - (shipsize.width/2); let y = position.y - (shipsize.height/2); let transform = "translate(" + x + " " + y + ") rotate(" + angle + " 15 15) "; spaceship.
setattribute("transform", transform); } finally, the addeventlistener() method is used to start listening for keydown events, acting on each key by updating the ship position and rotation angle, then calling refresh() to draw the ship at its new position and angle.
KeyframeEffect.KeyframeEffect() - Web APIs
syntax var keyframes = new keyframeeffect(element, keyframe
set, keyframeoptions); var keyframes = new keyframeeffect(sourcekeyframes); parameters the first type of constructor (see above) creates a completely new keyframeeffect object instance.
... keyframe
set an keyframe object or null.
...0.5 would indicate starting halfway through the first iteration for example, and with this value
set, an animation with 2 iterations would end halfway through a third iteration.
... examples in the follow the white rabbit example, the keyframeeffect constructor is used to create a
set of keyframes that dictate how the white rabbit should animate down the hole: var rabbitdownkeyframes = new keyframeeffect( whiterabbit, // element to animate [ { transform: 'translatey(0%)' }, // keyframe { transform: 'translatey(100%)' } // keyframe ], { duration: 3000, fill: 'forwards' } // keyframe options ); specifications specification status ...
KeyframeEffect.getKeyframes() - Web APIs
the getkeyframes() method of a keyframeeffect returns an array of the computed keyframes that make up this animation along with their computed off
sets.
... off
set the off
set of the keyframe specified as a number between 0.0 and 1.0 inclusive or null.
... computedoff
set the computed off
set for this keyframe, calculated when the list of computed keyframes was produced according to keyframeeffect.spacing.
... unlike off
set, above, the computedoff
set is never null.
MediaConfiguration - Web APIs
if you plan on querying encoding information,
set the media type to record or transmission.
... for decoding,
set the type to file or media-source.
... 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.
MediaDevices.getUserMedia() - Web APIs
here's a full example: { audio: true, video: { width: { min: 1024, ideal: 1280, max: 1920 }, height: { min: 576, ideal: 720, max: 1080 } } } an ideal value, when used, has gravity, which means that the browser will try to find the
setting (and camera, if you have more than one), with the smallest fitness distance from the ideal values given.
... typeerror the list of constraints specified is empty, or has all constraints
set to false.
...the following are examples of situations in which getusermedia() is not permitted to be called: a document loaded into a sandboxed <iframe> element cannot call getusermedia() unless the <iframe> has its sandbox attribute
set to allow-same-origin.
... // older browsers might not implement mediadevices at all, so we
set an empty object first if (navigator.mediadevices === undefined) { navigator.mediadevices = {}; } // some browsers partially implement mediadevices.
MediaList.mediaText - Web APIs
the mediatext property of the medialist interface is a stringifier that returns a domstring representing the medialist as text, and also allows you to
set a new medialist.
... if you wish to
set new media queries on the document, the string value must have the different queries separated by commas, e.g.
... also note that is you try to
set mediatext to null, it will be treated as an empty string, i.e.
... the value will be
set to "".
MediaMetadata - Web APIs
properties mediametadata.title returns or
sets the title of the media to be played.
... mediametadata.artist returns or
sets the name of the artist, group, creator, etc.
... mediametadata.album returns or
sets the name of the album or collection containing the media to be played.
... mediametadata.artwork returns or
sets an array of images associated with playing media.
MediaPositionState.position - Web APIs
the mediapositionstate dictionary's position property is used when calling the mediasession method
setpositionstate() to provide the user agent with the current playback position, in seconds, of the currently-playing media.
... example in this example, a player for a non-standard media file format, written in javascript, uses
setinterval() to establish a callback which fires once per second to refresh the position information by calling
setpositionstate().
... if the media is still playing when the interval is fired,
setpositionstate() is called with an object that specifies the duration, playback rate, and position as reported by a mymedia object that describes the track being played.
... let positioninterval = window.
setinterval(() => { if (mymedia.isplaying) { navigator.mediasession.
setpositionstate({ duration: mymedia.trackdurationinseconds, playbackrate: mymedia.playbackrate, position: mymedia.trackplaypositioninseconds }); } else { window.clearinterval(positioninterval); } }, 1000); specifications specification status comment media session standardthe definition of 'mediapositionstate.position' in that specification.
MediaSession - Web APIs
methods
setactionhandler()
sets an event handler for a media session action, such as play or pause.
...
setpositionstate()
sets the current playback position and speed of the media currently being presented.
... examples the following example creates a new media session and assigns action handlers to it: if ('mediasession' in navigator){ navigator.mediasession.metadata = new mediametadata({ title: "podcast episode title", artist: "podcast host", album: "podcast name", artwork: [{src: "podcast.jpg"}] }); navigator.mediasession.
setactionhandler('play', function() {}); navigator.mediasession.
setactionhandler('pause', function() {}); navigator.mediasession.
setactionhandler('seekbackward', function() {}); navigator.mediasession.
setactionhandler('seekforward', function() {}); navigator.mediasession.
setactionhandler('previoustrack', function() {}); navigator.mediasession.
setactionhandler('nexttrack', function() {}); } the following example
sets up event handlers for pau...
...sing and playing: var audio = document.queryselector("#player"); audio.src = "song.mp3"; navigator.mediasession.
setactionhandler('play', play); navigator.mediasession.
setactionhandler('pause', pause); function play() { audio.play(); navigator.mediasession.playbackstate = "playing"; } function pause() { audio.pause(); navigator.mediasession.playbackstate = "paused"; } specifications specification status comment media session standardthe definition of 'mediasession' in that specification.
MediaSource.duration - Web APIs
the duration property of the mediasource interface gets and
sets the duration of the current media being presented.
... exceptions the following exceptions may be thrown when
setting a new value for this property.
... exception explanation invalidaccesserror an attempt was made to
set a duration value that was negative, or nan.
...their sourcebuffer.updating property is true.) example the following snippet is based on a simple example written by nick desaulniers (view the full demo live, or download the source for further investigation.) function sourceopen (_) { //console.log(this.readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(as
seturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); mediasource.duration = 120; video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; ...
MediaStreamTrack.enabled - Web APIs
when enabled is
set to false, the track only generates empty frames.
... empty audio frames have every sample's value
set to 0.
... empty video frames have every pixel
set to black.
... usage notes if the mediastreamtrack represents the video input from a camera, disabling the track by
setting enabled to false also updates device activity indicators to show that the camera is not currently recording or streaming.
MediaTrackConstraints.displaySurface - Web APIs
see how constraints are defined in capabilities, constraints, and
settings for an explanation of how to define constraints.
... usage notes you can check the
setting selected by the user agent after the display media has been created by getdisplaymedia() by calling get
settings() on the display media's video mediastreamtrack, then checking the value of the returned mediatrack
settings object's displaysurface object.
... for example, if your app needs to know that the surface being shared is a monitor or application—meaning that there's possibly a non-content backdrop—it can use code similar to this: let mayhavebackdropflag = false; let displaysurface = displaystream.getvideotracks()[0].get
settings().displaysurface; if (displaysurface === "monitor" || displaysurface ==="application") { mayhavebackdropflag = true; } following this code, mayhavebackdrop is true if the display surface contained in the stream is of type monitor or application; either of these may have non-content backdrop areas.
...in addition, see example: constraint exerciser in capabilities, constraints, and
settings for a complete example showing how constraints are used.
Microdata DOM API - Web APIs
these elements have their element.itemscope idl attribute
set to true.
... the document.getitems(typenames) method takes a string that contains an unordered
set of unique space-separated tokens that are case-sensitive, representing types.
... can be
set, to change the element's value.
...
setting the value when the element has no itemprop attribute or when the element's value is an item throws an invalidaccesserror exception.
MouseEvent() - Web APIs
mouseeventinit optional is a mouseeventinit dictionary, having the following fields: "screenx", optional and defaulting to 0, of type long, that is the horizontal position of the mouse event on the user's screen;
setting this value doesn't move the mouse pointer.
... "screeny", optional and defaulting to 0, of type long, that is the vertical position of the mouse event on the user's screen;
setting this value doesn't move the mouse pointer.
... "clientx", optional and defaulting to 0, of type long, that is the horizontal position of the mouse event on the client window of user's screen;
setting this value doesn't move the mouse pointer.
... "clienty", optional and defaulting to 0, of type long, that is the vertical position of the mouse event on the client window of the user's screen;
setting this value doesn't move the mouse pointer.
Node.getUserData() - Web APIs
the node.getuserdata() method returns any user domuserdata
set previously on the given node by node.
setuserdata().
... the node.
setuserdata and node.getuserdata methods are no longer available from web content.
... element.data
set or weakmap can be used instead.
... example var d = document.
setuserdata('key', 15, null); console.log(document.getuserdata('key')); // 15 specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.getuserdata()' in that specification.
OscillatorNode - Web APIs
event handlers oscillatornode.onended
sets the event handler for the ended event, which fires when the tone has stopped playing.
... methods inherits methods from its parent, audioscheduledsourcenode, and adds the following: oscillatornode.
setperiodicwave()
sets a periodicwave which describes a periodic waveform to be used instead of one of the standard waveforms; calling this
sets the type to custom.
... this replaces the now-obsolete oscillatornode.
setwavetable() method.
... // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.
setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); specifications specification status comment web audio apithe definition of 'oscillatornode' in that specification.
Page Visibility API - Web APIs
timers such as
settimeout() are throttled in background/inactive tabs to help improve performance.
... the example, which pauses the video when you switch to another tab and plays again when you return to its tab, was created with the following code: //
set the name of the hidden property and the change event for visibility var hidden, visibilitychange; if (typeof document.hidden !== "undefined") { // opera 12.10 and firefox 18 and later support hidden = "hidden"; visibilitychange = "visibilitychange"; } else if (typeof document.mshidden !== "undefined") { hidden = "mshidden"; visibilitychange = "msvisibilitychange"; } else if (typeof docume...
...ort addeventlistener or the page visibility api if (typeof document.addeventlistener === "undefined" || hidden === undefined) { console.log("this demo requires a browser, such as google chrome or firefox, that supports the page visibility api."); } else { // handle page visibility change document.addeventlistener(visibilitychange, handlevisibilitychange, false); // when the video pauses,
set the title.
... // this shows the paused videoelement.addeventlistener("pause", function(){ document.title = 'paused'; }, false); // when the video plays,
set the title.
PaymentAddress.toJSON() - Web APIs
esktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettojson()chrome full support 61disabled full support 61disabled disabled from version 61: this feature is behind the #web-payments preference (needs to be
set to enabled).
...requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
... nosafari full support yeswebview android no support nochrome android full support 61disabled full support 61disabled disabled from version 61: this feature is behind the #web-payments preference (needs to be
set to enabled).
...requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
PaymentRequest.abort() - Web APIs
parameters none examples the following example
sets up a timeout to clear the payment request that might have been abandoned or neglected.
... var request = new paymentrequest(supportedinstruments, details, options); var paymenttimeout = window.
settimeout(() => { window.cleartimeout(paymenttimeout); request.abort().then(() => { print('payment timed out after 20 minutes.'); }).catch(() => { print('unable to abort, because the user is currently in the process ' + 'of paying.'); }); }, 20 * 60 * 1000); /* 20 minutes */ specifications specification status comment payment request apithe definition of 'abort()' in that specification.
... 61edge full support 15firefox full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
... nochrome android full support 53firefox android full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
PaymentRequest.shippingOption - Web APIs
the shippingoption read-only attribute of the paymentrequest interface returns either the id of a selected shipping option, null (if no shipping option was
set to be selected) or a shipping option selected by the user.
... this attribute is only populated if the constructor is called with the requestshipping flag
set to true.
... 61edge full support 15firefox full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
... nochrome android full support 53firefox android full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
PaymentRequest - Web APIs
properties paymentrequest.id read only secure context an unique identifier for a particular paymentrequest, which can be
set via details.id.
... when none is
set, it defaults to a uuid.
...this property is only populated if the constructor is called with the requestshipping flag
set to true.
...this property is only populated if the constructor is called with the requestshipping flag
set to true.
PaymentResponse.payerEmail - Web APIs
this option is only present when the requestpayeremail option is
set to true in the paymentoptions object passed to the paymentrequest constructor.
... 61edge full support 15firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
... yeswebview android no support nochrome android full support 56 full support 56 no support 53 — 56disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be
set to enabled).
... to change preferences in chrome, visit chrome://flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
PaymentResponse.shippingOption - Web APIs
this option is only present when the requestshipping option is
set to true in the paymentoptions object passed to the paymentrequest constructor.
... 61edge full support 15firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
... yeswebview android no support nochrome android full support 56 full support 56 no support 53 — 56disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be
set to enabled).
... to change preferences in chrome, visit chrome://flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
Permissions - Web APIs
permissions.requestall() requests permission to use a given
set of apis.
... permissions.revoke() revokes the permission currently
set on a given api.
...alnon-standardchrome full support 46edge full support 79firefox full support 51disabled full support 51disabled disabled from version 51: this feature is behind the dom.permissions.revoke.enable preference (needs to be
set to true).
...id full support 46chrome android full support 46firefox android full support 51disabled full support 51disabled disabled from version 51: this feature is behind the dom.permissions.revoke.enable preference (needs to be
set to true).
Using Pointer Events - Web APIs
create a canvas the touch-action property is
set to none to prevent the browser from applying its default touch behavior to the application.
...</canvas> <br> <button onclick="startup()">initialize</button> <br> log: <pre id="log" style="border: 1px solid #ccc;"></pre>
setting up the event handlers when the page loads, the startup() function shown below should be called by our <body> element's onload attribute (but in the example we use a button to trigger it, due to limitations of the mdn live example system).
... function startup() { var el = document.getelementsbytagname("canvas")[0]; el.addeventlistener("pointerdown", handlestart, false); el.addeventlistener("pointerup", handleend, false); el.addeventlistener("pointercancel", handlecancel, false); el.addeventlistener("pointermove", handlemove, false); log("initialized."); } this simply
sets up all the event listeners for our <canvas> element so we can handle the touch events as they occur.
... b = math.floor(touch.pointerid / 7) % 16; r = r.tostring(16); // make it a hex digit g = g.tostring(16); // make it a hex digit b = b.tostring(16); // make it a hex digit var color = "#" + r + g + b; log("color for touch with identifier " + touch.pointerid + " = " + color); return color; } the result from this function is a string that can be used when calling <canvas> functions to
set drawing colors.
RTCPeerConnection() - Web APIs
if this property isn't specified, a
set of certificates is generated automatically for each rtcpeerconnection instance.
... this configuration option cannot be changed after it is first specified; once the certificates have been
set, this property is ignored in future calls to rtcpeerconnection.
setconfiguration().
...you may find in some cases that connections can be established more quickly by allowing the ice agent to start fetching ice candidates before you start trying to connect, so that they're already available for inspection when rtcpeerconnection.
setlocaldescription() is called.
...if this value is
set (it defaults to null), the rtcpeerconnection will not connect to a remote peer unless it can successfully authenticate with the given name.
RTCPeerConnection: negotiationneeded event - Web APIs
this occurs both during the initial
setup of the connection as well as any time a change to the communication environment requires reconfiguring the connection.
... pc.addeventlistener("negotiationneeded", ev => { pc.createoffer() .then(offer => return pc.
setlocaldescription(offer)) .then(() => sendsignalingmessage({ type: "video-offer", sdp: pc.localdescription })) .catch(err => { /* handle error */ ); }, false); after creating the offer, the local end is configured by calling rtcpeerconnection.
setlocaldescription(); then a signaling message is created and sent to the remote peer through the signaling server, to share that offer...
...the other peer should recognize this message and follow up by creating its own rtcpeerconnection,
setting the remote description with
setremotedescription(), and then creating an answer to send back to the offering peer.
... you can also
set an event handler for the negotiationneeded event by assigning the event handler function to the rtcpeerconnection.onnegotiationneeded property: pc.onnegotiationneeded = ev => { pc.createoffer() .then(offer => return pc.
setlocaldescription(offer)) .then(() => sendsignalingmessage({ type: "video-offer", sdp: pc.localdescription })) .catch(err => { /* handle error */ ); }; for a more detailed example, see starting negotiation in signaling and video calling.
RTCPeerConnection.onsignalingstatechange - Web APIs
the function receives as input the event object of type event; this event is sent when the peer connection's signalingstate changes, which may happen either because of a call to
setlocaldescription() or to
setremotedescription().
... syntax rtcpeerconnection.onsignalingstatechange = errorhandler; value
set this to a function which you provide that receives an event object as input; this contains the signalingstatechange event.
... you may also, as always,
set up a handler for the signalingstatechange event using addeventlistener(): myrtcpeerconnection.addeventlistener("signalingstatechange", mysignalingstatechangehandler); or, using an anonymous (inline) handler: myrtcpeerconnection.addeventlistener("signalingstatechange", event => { /* handle the event here */ }); example this snippet shows a handler for signalingstatechange that looks for the "have-local-pranswer" signaling state—indicating that a remote offer has been received and a local description of type "pranswer" has been applied in response.
... pc.onsignalingstatechange = function(event) { if (pc.signalingstate === "have-local-pranswer") { //
setlocaldescription() has been called with an answer } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onsignalingstatechange' in that specification.
RTCPeerConnection.peerIdentity - Web APIs
if there isn't already a target peer identity, peeridentity is
set to a newly created promise and the process begins again, until the process succeeds or no further attempts to authenticate occur.
... note: the promise returned by
setremotedescription() cannot resolve until any target peer identity that's been
set is validated.
... if the identity hasn't been validated yet, the promise returned by
setremotedescription() will be rejected.
... if there's no target peer identity,
setremotedescription() doesn't need to wait for validation to occur before it resolves.
RTCRtpEncodingParameters - Web APIs
this value can only be
set when creating the transceiver; after that, this value is read only.
... rid a domstring which, if
set, specifies an rtp stream id (rid) to be sent using the rid header extension.
... this parameter cannot be modified using
setparameters().
... its value can only be
set when the transceiver is first created.
RTCRtpParameters - Web APIs
to obtain the parameters of a sender or receiver, call its getparameters() method: getparameters() getparameters() properties codecs an array of rtcrtpcodecparameters objects describing the
set of codecs from which the sender or receiver will choose.
... this parameter cannot be changed once initially
set.
...this parameter cannot be changed once initially
set.
...this parameter cannot be changed once initially
set.
Range.comparePoint() - Web APIs
if the reference node is a node of type text, comment, or cdatasection, then off
set is the number of characters from the start of reference node.
... for other node types, off
set is the number of child nodes between the start of the reference node.
... syntax returnvalue = range.comparepoint(referencenode, off
set) parameters referencenode the node to compare with the range.
... off
set an integer greater than or equal to zero representing the off
set inside the referencenode.
ReadableStream.pipeThrough() - Web APIs
available options are: preventclose: if this is
set to true, the source readablestream closing will no longer cause the destination writablestream to be closed.
... preventabort: if this is
set to true, errors in the source readablestream will no longer abort the destination writablestream.
... preventcancel: if this is
set to true, errors in the destination writablestream will no longer cancel the source readablestream.
... signal: if
set to an abortsignal object, ongoing pipe operations can then be aborted via the corresponding abortcontroller.
ReadableStream.pipeTo() - Web APIs
available options are: preventclose: if this is
set to true, the source readablestream closing will no longer cause the destination writablestream to be closed.
... preventabort: if this is
set to true, errors in the source readablestream will no longer abort the destination writablestream.
... preventcancel: if this is
set to true, errors in the destination writablestream will no longer cancel the source readablestream.
... signal: if
set to an abortsignal object, ongoing pipe operations can then be aborted via the corresponding abortcontroller.
SVGMarkerElement - Web APIs
interface overview also implement none methods void
setorienttoangle(in svgangle angle) void
setorienttoauto() properties svganimatedlength refx svganimatedlength refy svganimatedenumeration markerunits svganimatedlength markerwidth svganimatedlength markerheight svganimatedenumeration orienttype svganimatedangle orientangle constants ...
...if markerunits is svg_marker_orient_angle, the angle value for attribute orient; otherwise, it will be
set to zero.
...
setorienttoangle(in svgangle angle) void
sets the value of attribute orient to the given angle.
...
setorienttoauto() void
sets the value of attribute orient to 'auto'.
Using server-sent events - Web APIs
sten for events with addeventlistener(): evtsource.addeventlistener("ping", function(event) { const newelement = document.createelement("li"); const time = json.parse(event.data).time; newelement.innerhtml = "ping at " + time; eventlist.appendchild(newelement); }); this code is similar, except that it will be called automatically whenever the server sends a message with the event field
set to "ping"; it then parses the json in the data field and outputs that information.
... when not used over http/2, sse suffers from a limitation to the maximum number of open connections, which can be especially painful when opening multiple tabs, as the limit is per browser and is
set to a very low number (6).
... the php code for the example we're using here follows: date_default_timezone_
set("america/new_york"); header("cache-control: no-cache"); header("content-type: text/event-stream"); $counter = rand(1, 10); while (true) { // every second, send a "ping" event.
... id the event id to
set the eventsource object's last event id value.
ServiceWorkerMessageEvent - Web APIs
this extends the default message event to allow
setting a serviceworker object as the source of a message.
... serviceworkermessageevent.origin read only returns the origin of the service worker's environment
settings object.
... examples when the following code is used inside the main thread to
set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... //
set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerRegistration - Web APIs
this is initially
set to null.
...this is initially
set to null.
...this is initially
set to null.
... an active worker will control a serviceworkerclient if the client's url falls within the scope of the registration (the scope option
set when serviceworkercontainer.register is first called.) serviceworkerregistration.navigationpreload read only returns the instance of navigationpreloadmanager associated with the current service worker registration.
Service Worker API - Web APIs
they are intended, among other things, to enable the creation of effective offline experiences, intercept network requests and take appropriate action based on whether the network is available, and update as
sets residing on the server.
...if successful, your service worker will be downloaded to the client and attempt installation/activation (see below) for urls accessed by the user inside the whole origin, or inside a sub
set specified by you.
... you can listen for the installevent; a standard action is to prepare your service worker for usage when this fires, for example by creating a cache using the built in storage api, and placing as
sets inside it that you'll want for running your app offline.
... receiving centralized updates to expensive-to-calculate data such as geolocation or gyroscope, so multiple pages can make use of one
set of data.
ShadowRoot - Web APIs
you can retrieve a reference to an element's shadow root using its element.shadowroot property, provided it was created using element.attachshadow() with the mode option
set to open.
... properties shadowroot.delegatesfocus read only returns a boolean that indicates whether delegatesfocus was
set when the shadow was attached (see element.attachshadow()).
... shadowroot.innerhtml
sets or returns a reference to the dom tree inside the shadowroot.
... documentorshadowroot.caretpositionfrompoint() returns a caretposition object containing the dom node containing the caret, and caret's character off
set within that node.
SourceBuffer - Web APIs
sourcebuffer.timestampoff
set controls the off
set applied to timestamps inside media segments that are subsequently appended to the sourcebuffer.
... sourcebuffer.abort() aborts the current segment and re
sets the segment parser.
...this example was written by nick desaulniers and can be viewed live here (you can also download the source for further investigation.) var video = document.queryselector('video'); var as
seturl = 'frag_bunny.mp4'; // need to be specific for blink regarding codecs // ./mp4info frag_bunny.mp4 | grep codec var mimecodec = 'video/mp4; codecs="avc1.42e01e, mp4a.40.2"'; if ('mediasource' in window && mediasource.istypesupported(mimecodec)) { var mediasource = new mediasource(); //console.log(mediasource.readystate); // closed video.src = url.createobjecturl(mediasource); mediasour...
...ce.addeventlistener('sourceopen', sourceopen); } else { console.error('unsupported mime type or codec: ', mimecodec); } function sourceopen (_) { //console.log(this.readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(as
seturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); } function fetchab (url, cb) { console.log(url); var xhr = new xmlhttprequest; xhr.open('get', url); xhr.respon
setype = 'arraybuffer'; xhr.onload = function () { cb(xhr.response); }; xhr.send(); } specifications specification status ...
SpeechGrammar - Web APIs
the speechgrammar interface of the web speech api represents a
set of words or patterns of words that we want the recognition service to recognize.
... properties speechgrammar.src
sets and returns a string containing the grammar from within in the speechgrammar object instance.
... speechgrammar.weight optional
sets and returns the weight of the speechgrammar object.
...llow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; console.log(speechrecognitionlist[0].src); // should return the same as the contents of the grammar variable console.log(speechrecognitionlist[0].weight); // should return 1 - the same as the weight
set in line 4.
Storage - Web APIs
storage.
setitem() when passed a key name and value, will add that key to the storage, or update that key's value if it already exists.
...if it does, we run a function called
setstyles() that grabs the data items using storage.getitem() and uses those values to update page styles.
... if it doesn't, we run another function, populatestorage(), which uses storage.
setitem() to
set the item values, then runs
setstyles().
... if(!localstorage.getitem('bgcolor')) { populatestorage(); }
setstyles(); function populatestorage() { localstorage.
setitem('bgcolor', document.getelementbyid('bgcolor').value); localstorage.
setitem('font', document.getelementbyid('font').value); localstorage.
setitem('image', document.getelementbyid('image').value); } function
setstyles() { var currentcolor = localstorage.getitem('bgcolor'); var currentfont = localstorage.getitem('font'); var currentimage = localstorage.getitem('image'); document.getelementbyid('bgcolor').value = currentcolor; document.getelementbyid('font').value = currentfont; document.getelementbyid('image').value = currentimage; htmlelem.style.backgroundcolor = '#' + currentcolor; pelem.style.fontfamily = currentfont; imgelem.
setattribute('s...
TextRange - Web APIs
textrange.htmltext gets or
sets the html content within the textrange.
... textrange.text gets or
sets the plaintext content within the textrange.
... textrange.
setendpoint()
sets the end point of the current range based on the bounds of other textrange.
...the example gets the textrange through document.selection, and
sets the specified element to be selected.
Touch() - Web APIs
"clientx", optional and defaulting to 0, of type double, that is the horizontal position of the touch on the client window of user's screen, excluding any scroll off
set.
... "clienty", optional and defaulting to 0, of type double, that is the vertical position of the touch on the client window of the user's screen, excluding any scroll off
set.
... "pagex", optional and defaulting to 0, of type double, that is the horizontal position of the touch on the client window of user's screen, including any scroll off
set.
... "pagey", optional and defaulting to 0, of type double, that is the vertical position of the touch on the client window of the user's screen, including any scroll off
set.
Touch.clientX - Web APIs
the touch.clientx read-only property returns the x coordinate of the touch point relative to the viewport, not including any scroll off
set.
... syntax touchitem.clientx; return value a long representing the x coordinate of the touch point relative to the viewport, not including any scroll off
set.
...the touch.clientx property is the horizontal coordinate of a touch point relative to the browser's viewport excluding any scroll off
set.
... the touch.clienty property is the vertical coordinate of the touch point relative to the browser's viewport excluding any scroll off
set .
Touch.clientY - Web APIs
the touch.clienty read-only property returns the y coordinate of the touch point relative to the browser's viewport, not including any scroll off
set.
... syntax touchitem.clienty; return value a long value representing the y coordinate of the touch point relative to the viewport, not including any scroll off
set.
...the touch.clientx property is the horizontal coordinate of a touch point relative to the browser's viewport excluding any scroll off
set.
... the touch.clienty property is the vertical coordinate of the touch point relative to the browser's viewport excluding any scroll off
set .
Touch.pageX - Web APIs
the touch.pagex read-only property returns the x coordinate of the touch point relative to the viewport, including any scroll off
set.
... syntax touchitem.pagex; return value a long representing the x coordinate of the touch point relative to the viewport, including any scroll off
set.
...the touch.pagex property is the horizontal coordinate of a touch point relative to the viewport (in css pixels), including any scroll off
set.
... the touch.pagey property is the vertical coordinate of a touch point relative to the viewport (in css pixels), including any scroll off
set.
Touch.pageY - Web APIs
the touch.pagey read-only property returns the y coordinate of the touch point relative to the viewport, including any scroll off
set.
... syntax touchitem.pagey; return value a long value that representes the y coordinate of the touch point relative to the viewport, including any scroll off
set.
...the touch.pagex property is the horizontal coordinate of a touch point relative to the viewport (in css pixels), including any scroll off
set.
... the touch.pagey property is the vertical coordinate of a touch point relative to the viewport (in css pixels), including any scroll off
set.
TransformStream - Web APIs
the transformstream interface of the streams api represents a
set of transformable data.
... async transform(chunk, controller) { chunk = await chunk switch (typeof chunk) { case 'object': // just say the stream is done i guess if (chunk === null) controller.terminate() else if (arraybuffer.isview(chunk)) controller.enqueue(new uint8array(chunk.buffer, chunk.byteoff
set, chunk.bytelength)) else if (array.isarray(chunk) && chunk.every(value => typeof value === 'number')) controller.enqueue(new uint8array(chunk)) else if ('function' === typeof chunk.valueof && chunk.valueof() !== chunk) this.transform(chunk.valueof(), controller) // hack else if ('tojson' in chunk) this.transform(json.stringify(chunk), controller) ...
... const tes = { start(){this.encoder = new textencoder()}, transform(chunk, controller) { controller.enqueue(this.encoder.encode(chunk)) } } let _jstes_wm = new weakmap(); /* info holder */ class jstextencoderstream extends transformstream { constructor() { let t = {...tes} super(t) _jstes_wm.
set(this, t) } get encoding() {return _jstes_wm.get(this).encoder.encoding} } similarly, textdecoderstream can be written as such: const tes = { start(){ this.decoder = new textdecoder(this.encoding, this.options) }, transform(chunk, controller) { controller.enqueue(this.decoder.decode(chunk)) } } let _jstds_wm = new weakmap(); /* info holder */ class jstextdecoderstream extend...
...s transformstream { constructor(encoding = 'utf-8', {...options} = {}) { let t = {...tds, encoding, options} super(t) _jstes_wm.
set(this, t) } get encoding() {return _jstds_wm.get(this).decoder.encoding} get fatal() {return _jstds_wm.get(this).decoder.fatal} get ignorebom() {return _jstds_wm.get(this).decoder.ignorebom} } chaining multiple readablestreams together this is a useful one, where multiple streams can be conjoined.
USBAlternateInterface - Web APIs
an interface includes one or more alternate
settings which can configure a
set of endpoints based on the operating mode of the device.
... constructor usbalternateinterface.usbalternateinterface creates a new usbalternateinterface object which will be populated with information about the alternate interface of the provided usbinterface with the given alternate
setting number.
... properties usbalternateinterface.alternate
settingread only returns the alternate
setting number of this interface.
... this is equal to the balternate
setting field of the interface descriptor defining this interface.
VTTRegion - Web APIs
vttregion.regionanchorx a double representing the region anchor x off
set, as a percentage of the region.
... vttregion.regionanchory a double representing the region anchor y off
set, as a percentage of the region.
... vttregion.viewportanchorx a double representing the viewport anchor x off
set, as a percentage of the video.
... vttregion.viewportanchory a double representing the viewport anchor y off
set, as a percentage of the video.
WebGL2RenderingContext.copyTexSubImage3D() - Web APIs
syntax void gl.copytexsubimage3d(target, level, xoff
set, yoff
set, zoff
set, x, y, width, height); parameters target a glenum specifying the binding point (target) of the active texture.
... xoff
set a glint specifying the x off
set within the texture image.
... yoff
set a glint specifying the y off
set within the texture image.
... zoff
set a glint specifying the z off
set within the texture image.
WebGL2RenderingContext.getBufferSubData() - Web APIs
syntax void gl.getbuffersubdata(target, srcbyteoff
set, arraybufferview dstdata, optional dstoff
set, optional length); parameters target a glenum specifying the binding point (target).
... srcbyteoff
set a glintptr specifying the byte off
set from which to start reading from the buffer.
... srcoff
set optional a gluint specifying the element index off
set where to start reading the buffer.
... exceptions an invalid_value error is generated if: off
set + returneddata.bytelength would extend beyond the end of the buffer returneddata is null off
set is less than zero.
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.buffersubdata() updates a sub
set of a buffer object's data store.
...in addition, it can execute multiple instances of a
set of elements.
... webgl2renderingcontext.samplerparameter[if]()
sets sampler parameters.
... webgl2renderingcontext.pau
setransformfeedback() pauses a transform feedback operation.
WebGLRenderingContext.bufferSubData() - Web APIs
the webglrenderingcontext.buffersubdata() method of the webgl api updates a sub
set of a buffer object's data store.
... syntax // webgl1: void gl.buffersubdata(target, off
set, arraybuffer srcdata); void gl.buffersubdata(target, off
set, arraybufferview srcdata); // webgl2: void gl.buffersubdata(target, dstbyteoff
set, arraybufferview srcdata, srcoff
set, length); parameters target a glenum specifying the binding point (target).
... dstbyteoff
set a glintptr specifying an off
set in bytes where the data replacement will start.
... srcoff
set a gluint specifying the element index off
set where to start reading the buffer.
WebGLRenderingContext.getParameter() - Web APIs
exture_image_units glint gl.max_texture_size glint gl.max_varying_vectors glint gl.max_vertex_attribs glint gl.max_vertex_texture_image_units glint gl.max_vertex_uniform_vectors glint gl.max_viewport_dims int32array (with 2 elements) gl.pack_alignment glint gl.polygon_off
set_factor glfloat gl.polygon_off
set_fill glboolean gl.polygon_off
set_units glfloat gl.red_bits glint gl.renderbuffer_binding webglrenderbuffer or null see bindrenderbuffer.
...onents glint64 gl.max_draw_buffers glint gl.max_element_index glint64 gl.max_elements_indices glint gl.max_elements_vertices glint gl.max_fragment_input_components glint gl.max_fragment_uniform_blocks glint gl.max_fragment_uniform_components glint gl.max_program_texel_off
set glint gl.max_samples glint gl.max_server_wait_timeout glint64 gl.max_texture_lod_bias glfloat gl.max_transform_feedback_interleaved_components glint gl.max_transform_feedback_separate_attribs glint gl.max_transform_feedback_separate_components glint gl.max_uniform_block_size glint64 ...
... gl.max_uniform_buffer_bindings glint gl.max_varying_components glint gl.max_vertex_output_components glint gl.max_vertex_uniform_blocks glint gl.max_vertex_uniform_components glint gl.min_program_texel_off
set glint gl.pack_row_length glint see pixelstorei.
... gl.uniform_buffer_off
set_alignment glint see pixelstorei.
WebGLRenderingContext.texImage2D() - Web APIs
pixels); // webgl2: void gl.teximage2d(target, level, internalformat, width, height, border, format, type, glintptr off
set); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, htmlcanvaselement source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, htmlimageelement source); void gl.teximage2d(target, level, internalformat, width, 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, srcoff
set); parameters target a glenum specifying the binding point (target) of the active texture.
... 4 2 rgba unsigned_short_5_5_5_1 4 2 rgb unsigned_short_5_6_5 3 2 luminance_alpha unsigned_byte 2 2 luminance unsigned_byte 1 1 alpha unsigned_byte 1 1 other possible values in webgl2 for the versions of teximage2d that take an arraybufferview or a glintptr off
set sized format base format r bits g bits b bits a bits shared bits color renderable texture filterable r8 red 8 ● ● r8_snorm red s8 ● rg8 rg 8 8 ● ● rg8_snorm rg s8 s8 ...
... off
set (webgl 2 only) a glintptr byte off
set into the webglbuffer's data store.
Clearing by clicking - Web APIs
ml5 canvas.</canvas> <button id="color-switcher">press here to switch color</button> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : inline-block; font-size : inherit; margin : auto; padding : 0.6em; } window.addeventlistener("load", function
setupwebgl (evt) { "use strict" // cleaning after ourselves.
... window.removeeventlistener(evt.type,
setupwebgl, false); // adding the same click event handler to both canvas and // button.
... var color = getrandomcolor(); //
set the clear color to the random color.
... gl.clearcolor(color[0], color[1], color[2], 1.0); // clear the context with the newly
set color.
Raining rectangles - Web APIs
vas>your browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } ;(function(){ "use strict" window.addeventlistener("load",
setupanimation, false); var gl, timer, rainingrect, scoredisplay, missesdisplay; function
setupanimation (evt) { window.removeeventlistener(evt.type,
setupanimation, false); if (!(gl = getrenderingcontext())) return; gl.enable(gl.scissor_test); rainingrect = new rectangle(); timer =
settimeout(drawanimation, 17); document.queryselector("canvas") .addeventlistener("click...
...ar score = 0, misses = 0; function drawanimation () { gl.scissor(rainingrect.position[0], rainingrect.position[1], rainingrect.size[0] , rainingrect.size[1]); gl.clear(gl.color_buffer_bit); rainingrect.position[1] -= rainingrect.velocity; if (rainingrect.position[1] < 0) { misses += 1; missesdisplay.innerhtml = misses; rainingrect = new rectangle(); } // we are using
settimeout for animation.
... timer =
settimeout(drawanimation, 17); } function playerclick (evt) { // we need to transform the position of the click event from // window coordinates to relative position inside the canvas.
... var position = [ evt.pagex - evt.target.off
setleft, gl.drawingbufferheight - (evt.pagey - evt.target.off
settop), ]; // if the click falls inside the rectangle, we caught it.
Lifetime of a WebRTC session - Web APIs
information exchanged during signaling there are three basic types of information that need to be exchanged during signaling: control messages used to
set up, open, and close the communication channel, and to handle errors.
... information needed in order to
set up the connection: the ip addressing and port information needed for the peers to be able to talk to one another.
... note: different browsers support ice restart under different
sets of conditions.
... if you need to change the configuration of the connection in some way (such as changing to a different
set of ice servers), you can do so before restarting ice by calling rtcpeerconnection.
setconfiguration() with an updated rtcconfiguration dictionary before restarting ice.
Basic concepts behind Web Audio API - Web APIs
a frame, or sample frame, is the
set of all values for all channels that will play at a specific point in time: all the samples of all the channels that play at the same time (two for a stereo sound, six for 5.1, etc.) the sample rate is the number of those samples (or frames, since all samples of a frame play at the same time) that will play in one second, measured in hz.
... audio channels different audio buffers contain different numbers of channels: from the more basic mono (only one channel) and stereo (left and right channels), to more complex
sets like quad and 5.1, which have different sound samples contained in each channel, leading to a richer sound experience.
...this can be somewhat controlled by
setting the audionode.channelinterpretation property to speakers or discrete: interpretation input channels output channels mixing rules speakers 1 (mono) 2 (stereo) up-mix from mono to stereo.
... output.l = input.l + 0.7071 * input.c output.r = input.r + 0.7071 * input.c output.sl = input.sl output.sr = input.sr other, non-standard layouts non-standard channel layouts are handled as if channelinterpretation is
set to discrete.
Web Audio API - Web APIs
it 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.
... audiobuffer the audiobuffer interface represents a short audio as
set residing in memory, created from an audio file using the audiocontext.decodeaudiodata() method, or created with raw data using audiocontext.createbuffer().
... channelsplitternode the channelsplitternode interface separates the different channels of an audio source out into a
set of mono outputs.
...pithis 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.off
set parameter.example and tutorial: simple synth keyboardthis article presents the code and working demo of a video keyboard you can play using the mouse.
Window.customElements - Web APIs
54edge full support 79firefox full support 63 full support 63 no support 59 — 63disabled disabled from version 59 until version 63 (exclusive): this feature is behind the dom.webcomponents.customelements.enabled preference (needs to be
set to true).
...— 59disabled disabled until version 59 (exclusive): this feature is behind the dom.webcomponents.enabled preference (needs to be
set to true) and the dom.webcomponents.customelements.enabled preference (needs to be
set to true).
... full support 54firefox android full support 63 full support 63 no support 59 — 63disabled disabled from version 59 until version 63 (exclusive): this feature is behind the dom.webcomponents.customelements.enabled preference (needs to be
set to true).
...— 59disabled disabled until version 59 (exclusive): this feature is behind the dom.webcomponents.enabled preference (needs to be
set to true) and the dom.webcomponents.customelements.enabled preference (needs to be
set to true).
Window.openDialog() - Web APIs
opendialog() treats the absence of the features parameter the same way window.open() does; that is, an empty string
sets all features to off) except chrome and dialog, which default to on.
...you can then access this object from within the dialog code and
set properties on it, containing the values you want to return or preserve past the window.close() operation.
... var retvals = { address: null, delivery: null }; opendialog("http://example.tld/zzz.xul", "dlg", "modal", "pizza", 6.98, retvals); if you
set the properties of the retvals object in the dialog code as described below, you can now access them via the retvals array after the opendialog() call returns.
... inside the dialog code, you can
set the properties as follows: var retvals = window.arguments[2]; retvals.address = enteredaddress; retvals.delivery = "immediate"; specification this is not part of any specification.
Window.scrollX - Web APIs
if (window.scrollx > 400) { window.scroll(0,0); } notes the pagexoff
set property is an alias for the scrollx property: window.pagexoff
set == window.scrollx; // always true for cross-browser compatibility, use window.pagexoff
set instead of window.scrollx.
...a fully compatible example: var x = (window.pagexoff
set !== undefined) ?
... window.pagexoff
set : (document.documentelement || document.body.parentnode || document.body).scrollleft; var y = (window.pageyoff
set !== undefined) ?
... window.pageyoff
set : (document.documentelement || document.body.parentnode || document.body).scrolltop; specification specification status comment css object model (cssom) view modulethe definition of 'window.scrollx' in that specification.
WindowOrWorkerGlobalScope.clearInterval() - Web APIs
the clearinterval() method of the windoworworkerglobalscope mixin cancels a timed, repeating action which was previously established by a call to
setinterval().
...this id was returned by the corresponding call to
setinterval().
... it's worth noting that the pool of ids used by
setinterval() and
settimeout() are shared, which means you can technically use clearinterval() and cleartimeout() interchangeably.
... return value undefined example see the
setinterval() examples.
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
the cleartimeout() method of the windoworworkerglobalscope mixin cancels a timeout previously established by calling
settimeout().
...this id was returned by the corresponding call to
settimeout().
... it's worth noting that the pool of ids used by
settimeout() and
setinterval() are shared, which means you can technically use cleartimeout() and clearinterval() interchangeably.
... var alarm = { remind: function(amessage) { alert(amessage); this.timeoutid = undefined; },
setup: function() { if (typeof this.timeoutid === 'number') { this.cancel(); } this.timeoutid = window.
settimeout(function(msg) { this.remind(msg); }.bind(this), 1000, 'wake up!'); }, cancel: function() { window.cleartimeout(this.timeoutid); } }; window.onclick = function() { alarm.
setup(); }; notes passing an invalid id to cleartimeout() silently does nothing; no exception is thrown.
XDomainRequest - Web APIs
properties xdomainrequest.timeout gets or
sets the amount of time until a request times out.
... xdomainrequest.respon
setext gets the response body as a string.
... example if(window.xdomainrequest){ var xdr = new xdomainrequest(); xdr.open("get", "http://example.com/api/method"); xdr.onprogress = function () { //progress }; xdr.ontimeout = function () { //timeout }; xdr.onerror = function () { //error occurred }; xdr.onload = function() { //success(xdr.respon
setext); }
settimeout(function () { xdr.send(); }, 0); } note: the xdr.send() call is wrapped in a timeout (see window.
settimeout() to prevent an issue with the interface where some requests are lost if multiple xdomainrequests are being sent at the same time.
... the requested url's server must have the access-control-allow-origin header
set to either all ("*") or to include the origin of the request.
XMLHttpRequest.withCredentials - Web APIs
setting withcredentials has no effect on same-site requests.
...xmlhttprequest from a different domain cannot
set cookie values for their own domain unless withcredentials is
set to true before making the request.
... the third-party cookies obtained by
setting withcredentials to true will still honor same-origin policy and hence can not be accessed by the requesting script through document.cookie or from response headers.
... note: xmlhttprequest responses from a different domain cannot
set cookie values for their own domain unless withcredentials is
set to true before making the request, regardless of access-control- header values.
XRInputSourcesChangeEvent - Web APIs
the webxr device api interface xrinputsourceschangeevent is used to represent the inputsourceschange event sent to an xrsession when the
set of available webxr input controllers changes.
... event types inputsourceschange delivered to the xrsession when the
set of input devices available to it changes.
... examples the following example shows how to
set up an event handler which uses inputsourceschange events to detect newly-available pointing devices and to load their models in preparation to display them in the next animation frame.
... xrsession.addeventlistener("inputsourceschange", oninputsourceschange); function oninputsourceschange(event) { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { loadcontrollermesh(input); } } } you can also add a handler for inputsourceschange events by
setting the oninputsourceschange event handler: xrsession.oninputsourceschange = oninputsourceschange; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent' in that specification.
XRReferenceSpaceEvent.transform - Web APIs
usage notes upon receiving a re
set event, you can apply the transform to cached position or orientation information to shift them into the updated coordinate system.
... for details on what causes a re
set event and how to respond, see the re
set event's documentation.
... examples this example handles the re
set event by walking through all the objects in a scene, updating each object's position by multiplying it with the event's given transform.
... xrreferencespace.addeventlistener("re
set", event => { for (let obj of scene.objects) { mat4.multiply(obj.transform, obj.transform, event.transform); } }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent.transform' in that specification.
XRReferenceSpaceEventInit - Web APIs
since the properties are read-only, this is the only opportunity available to
set their values.
... usage notes all of this dictionary's properties must have valid values
set on them before calling the xrreferencespaceevent() constructor.
... examples this simple snippet calls the constructor to create a new reference space event of type re
set.
... let refspaceevent = new xrreferencespaceevent("re
set", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit' in that specification.
XRRigidTransform - Web APIs
xrrigidtransform is used to specify transforms throughout the webxr apis, including: the off
set and orientation relative to the parent reference space to use when creating a new reference space with getoff
setreferencespace().
... the xrreferencespaceevent event's transform property, as found in the re
set event received by an xrreferencespace.
... example this code snippet creates an xrrigidtransform to specify the off
set and orientation in relation to the current reference space to use when creating a new reference space.
... xrsession.requestreferencespace(refspacetype) .then((refspace) => { xrreferencespace = refspace; xrreferencespace = xrreferencespace.getoff
setreferencespace( new xrrigidtransform(viewerstartposition, cubeorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); specifications specification status comment webxr device apithe definition of 'xrrigidtransform' in that specification.
XRView - Web APIs
usage notes positions and number of xrviews per frame while rendering a scene, the
set of views that are used to render the scene for the viewer as of the current frame are obtained by calling the xrframe object's getviewerpose() method to get the xrviewerpose representing (in essence) the position of the viewer's head.
...the createteleporttransform() function returns the transform needed to move and rotate an object whose current situation is described by the reference space refspace to a new position and orientation which is computed using previously recorded mouse and keyboard input data which has generated off
sets for yaw, pitch, and position along all three axes.
... return refspace.getoff
setreferencespace(newtransform); } this code is broken into four sections.
... the third section creates the new xrrigidtransform, specifying a point providing the off
sets along the three axes as the first parameter, and the orientation quaternion as the second parameter.
XRViewport - Web APIs
x read only the off
set from the origin of the destination graphics surface (typically a xrwebgllayer) to the left edge of the viewport, in pixels.
... y read only the off
set from the origin of the viewport to the bottom edge of the viewport; webgl's coordinate system places (0, 0) at the bottom left corner of the surface.
... these values may be passed directly into the webglrenderingcontext.viewport() method: let xrviewport = xrwebgllayer.getviewport(xrview); gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, xrviewport.height); example this example
sets up an animation frame callback using requestanimationframe().
... after initial
setup, it iterates over each of the views within the viewer's pose, configuring the viewport as dictated by the xrwebgllayer.
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.
...since the xr compositor uses the depth buffer by default, this value is false unless explicitly
set otherwise when creating the xrwebgllayer using its constructor, xrwebgllayer().
... examples if the web application which is using wexr is rendering its content without using a depth buffer—or if the depth buffer's contents are invalid—you should disable the use of the depth buffer for webxr rendering by
setting ignoredepthvalues to true when creating the xrwebgllayer.
ARIA: document role - Accessibility
because ats with reading mode default to that mode for all elements except for those with a widget or application role
set, document role is only useful for focusable elements within a widget or application that should be read as static rich text.
... keyboard interactions the element should be made focusable by
setting the tabindex="0" attribute / value pair on it.
...however, when the keyboard focus is
set on the starting heading on a single conversation that contains the subject of the conversation, the screen reader user can use the reading mode commands to read through the messages, expand or collapse them, and manipulate them.
... best practices always make sure an item with the document role is focusable, by
setting the tabindex attribute with a value of 0.
ARIA: row role - Accessibility
for example, in a table with 15 columns, and columns 4, 5, and 6 are in the dom, aria-colindex="4" could be
set on every row.
... if the
set of columns which is present in the dom is not contiguous, or if there are cells spanning more than one row or column, put the aria-colindex on all of the children of each row instead of on the row itself.
...for example, if a table has 1,500 rows, but only the header and rows 47 and 52 are in the dom, aria-rowindex="1" would be
set on the header row, and aria-rowindex="47" and aria-rowindex="52" would be
set on the 47th and 52nd row, respectively.
...the aria roles are only necessary if the native semantics of the table, and therefore the table rows, are obliterated, such as via
setting the display property to flex or grid.
Basic form hints - Accessibility
note that on line 3, the <ul> element
sets the aria-labelledby attribute to rg1_label, the id of the <h3> element on line 1, which is the label for the radio group.
...on lines 4 and 12, the aria-required attributes are
set to true (in addition to the asterisks next to the labels), indicating that the name and email fields are required.
... the second part of the example, a snippet of javascript validates the email format, and
sets the aria-invalid attribute of the email field (line 12 of the html) according to the result (in addition to changing the presentation of the element).
... <div> <label for="email">* e-mail:</label> <input type="text" value="email" id="email" aria-required="true"/> </div> </form> the script that validates the form entry would look something like this: var validate = function () { var emailelement = document.getelementbyid(emailfieldid); var valid = emailvalid(formdata.email); // returns true if valid, false otherwise emailelement.
setattribute("aria-invalid", !valid);
setelementbordercolour(emailelement, valid); //
sets the border to red if second arg is false }; providing helpful error messages read how to use aria alerts to enhance forms.
ARIA - Accessibility
accessible rich internet applications (aria) is a
set of attributes that define ways to make web content and web applications (especially those developed with javascript) more accessible to people with disabilities.
...var progressbar = document.getelementbyid("percent-loaded"); //
set its aria roles and states, // so that assistive technologies know what kind of widget it is.
... progressbar.
setattribute("role", "progressbar"); progressbar.
setattribute("aria-valuemin", 0); progressbar.
setattribute("aria-valuemax", 100); // create a function that can be called at any time to update // the value of the progress bar.
... function updateprogress(percentcomplete) { progressbar.
setattribute("aria-valuenow", percentcomplete); } note that aria was invented after html4, so does not validate in html4 or its xhtml variants.
Cognitive accessibility - Accessibility
though there is a lot of diversity within clinical definitions of cognitive impairments, people with them experience a common
set of functional problems.
...guideline 2.2 states "provide users enough time to read and use content." a time limit is any process that happens without user initiation after a
set time or on a periodic basis, such as being logged out after 30 minutes or having 15 minutes to make a purchase.
... change
setting based on an active request form control operation and data entry should result in predictable behavior.
...include labels or instructions when users need to input information, using the <label>, <field
set>, and <legend> elements to do so.
Web accessibility for seizures and physical reactions - Accessibility
a <div> element
set to change color and luminosity at high frequency, easily done via javascript, can cause real harm.
...the epilepsy foundation's article "take advantage of media queries with <style> in
setting up media queries, you are enabling controls by the user; these controls are made available in the browser or in the os.
... developmental & experimental features mdn navigator.donottrack from the documentation: "returns the user's do-not-track
setting.
...s draft document, media queries level 5 section on light-level: "the light-level media feature is used to query about the ambient light-level in which the device is used, to allow the author to adjust style of the document in response." this will be a godsend to those who have motor-skills problems, or for some with cognitive difficulties, who cannot find the right "button" to change their screen
settings.
-webkit-box-reflect - CSS: Cascading Style Sheets
/* direction values */ -webkit-box-reflect: above; -webkit-box-reflect: below; -webkit-box-reflect: left; -webkit-box-reflect: right; /* off
set value */ -webkit-box-reflect: below 10px; /* mask value */ -webkit-box-reflect: below 0 linear-gradient(transparent, white); /* global values */ -webkit-box-reflect: inherit; -webkit-box-reflect: initial; -webkit-box-reflect: un
set; note: this feature is not intended to be used by web sites.
...<image>?where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...)<image-
set()> = image-
set( <image-
set-option># )<element()> = element( <id-selector> )<paint()> = paint( <ident>, <declaration-value>?
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-
set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
-webkit-line-clamp - CSS: Cascading Style Sheets
it only works in combination with the display property
set to -webkit-box or -webkit-inline-box and the -webkit-box-orient property
set to vertical.
... in most cases you will also want to
set overflow to hidden, otherwise the contents won't be clipped but an ellipsis will still be shown after the specified number of lines.
... syntax /* keyword value */ -webkit-line-clamp: none; /* <integer> values */ -webkit-line-clamp: 3; -webkit-line-clamp: 10; /* global values */ -webkit-line-clamp: inherit; -webkit-line-clamp: initial; -webkit-line-clamp: un
set; none this value specifies that the content wonʼt be clamped.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax none | <integer> examples truncating a paragraph html <p> in this example the <code>-webkit-line-clamp</code> property is
set to <code>3</code>, which means the text is clamped after three lines.
-webkit-mask-box-image - CSS: Cascading Style Sheets
-webkit-mask-box-image
sets the mask image for an element's border box.
... <length> the size of the mask image's off
set.
... <percentage> the mask image's off
set has a percentage value relative to the border box's corresponding dimension (width or height).
... examples
setting an image .exampleone { -webkit-mask-box-image: url('mask.png'); } off
setting and filling an image .exampletwo { -webkit-mask-box-image: url('logo.png') 100 100 0 0 round round; } specifications not part of any standard.
:scope - CSS: Cascading Style Sheets
<style scoped> made it possible to explicitly
set up element scopes, but ongoing discussions about the design of this feature as well as lack of other implementations resulted in the decision to remove it.
... no support 20 — 32disabled disabled from version 20 until version 32 (exclusive): this feature is behind the layout.css.scope-pseudo.enabled preference (needs to be
set to true).
...<style scoped> made it possible to explicitly
set up element scopes, but ongoing discussions about the design of this feature as well as lack of other implementations resulted in the decision to remove it.
... full support 20disabled disabled from version 20: this feature is behind the layout.css.scope-pseudo.enabled preference (needs to be
set to true).
suffix - CSS: Cascading Style Sheets
" (full stop followed by a space)computed valueas specified formal syntax <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...)<image-
set()> = image-
set( <image-
set-option># )<element()> = element( <id-selector> )<paint()> = paint( <ident>, <declaration-value>?
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-
set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
... <number> | <angle><linear-color-stop> = <color> <color-stop-length>?<linear-color-hint> = <length-percentage><length-percentage> = <length> | <percentage><angular-color-stop> = <color> && <color-stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples
setting a suffix for a counter html <ul class="choices"> <li>one</li> <li>two</li> <li>three</li> <li>none of the above</li> </ul> css @counter-style options { system: fixed; symbols: a b c d; suffix: ") "; } .choices { list-style: options; } result specifications specification status comment css counter styles level 3the definition of 'suffix' in...
symbols - CSS: Cascading Style Sheets
formal definition related at-rule@counter-styleinitial valuen/acomputed valueas specified formal syntax <symbol>+where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...)<image-
set()> = image-
set( <image-
set-option># )<element()> = element( <id-selector> )<paint()> = paint( <ident>, <declaration-value>?
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-
set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
... <number> | <angle><linear-color-stop> = <color> <color-stop-length>?<linear-color-hint> = <length-percentage><length-percentage> = <length> | <percentage><angular-color-stop> = <color> && <color-stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples
setting counter symbols html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style symbols-example { system: fixed; symbols: a "1" "\24b7" d e; } .list { list-style: symbols-example; } result specifications specification status comment css counter styles level 3the definition of 'symbols' i...
font-weight - CSS: Cascading Style Sheets
the font-weight property can separately be used to
set how thick or thin characters in text should be displayed.
... in earlier versions of the font-weight specification, the property accepts only keyword values and the numeric values 100, 200, 300, 400, 500, 600, 700, 800, and 900; non-variable fonts can only really make use of these
set values, although fine-grained values (e.g.
... accessibility concerns people experiencing low vision conditions may have difficulty reading text
set with a font-weight value of 100 (thin/hairline) or 200 (extra light), especially if the font has a low contrast color ratio.
...understanding wcag 2.0 formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax <font-weight-absolute>{1,2}where <font-weight-absolute> = normal | bold | <number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[1,1000]> examples
setting normal font weight in a @font-face rule the following finds a local open sans font or import it, and allows using the font for normal font weights.
@supports - CSS: Cascading Style Sheets
28edge full support 12firefox full support 22 full support 22 no support 17 — 22disabled disabled from version 17 until version 22 (exclusive): this feature is behind the layout.css.supports-rule.enabled preference (needs to be
set to true).
...android full support 28firefox android full support 22 full support 22 no support 17 — 22disabled disabled from version 17 until version 22 (exclusive): this feature is behind the layout.css.supports-rule.enabled preference (needs to be
set to true).
... 83edge full support 83firefox full support 69 full support 69 full support 64disabled disabled from version 64: this feature is behind the layout.css.supports-selector.enabled preference (needs to be
set to true).
... full support 83chrome android full support 83firefox android full support 64disabled full support 64disabled disabled from version 64: this feature is behind the layout.css.supports-selector.enabled preference (needs to be
set to true).
height - CSS: Cascading Style Sheets
the height css descriptor is a shorthand descriptor for
setting both min-height and max-height of the viewport.
... by providing one viewport length value will
set both, the minimum height and the maximum height, to the value provided.
... if two viewport values are provided, the first value will
set the minimum height and the second value will
set the maximum height.
...tely positioned, the percentage value is treated as none.computed valueas each of the properties of the shorthand:min-height: the percentage as specified or the absolute lengthmax-height: the percentage as specified or the absolute length or none formal syntax <viewport-length>{1,2}where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples
setting minimum and maximum height @viewport { height: 500px; } specifications specification status comment css device adaptationthe definition of '"height" descriptor' in that specification.
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
absolutely positioned elements the alignment container is the positioned block, accounting for the off
set values of top, left, bottom, and right.
... absolutely positioned elements the alignment container is the positioned block, accounting for the off
set values of top, left, bottom, and right.
... alignment of blocks horizontally prior to flexbox was typically achieved by way of
setting auto margins on the block.
... a margin of auto will absorb all available space in that dimension, therefore
setting a left and right margin of auto, you can push a block into the center: .container { width: 20em; margin-left: auto; margin-right: auto; } in table layout, you have access to the vertical-align property to align the contents of a cell inside that cell.
Spanning and Balancing Columns - CSS: Cascading Style Sheets
in the example below, the h2 element is
set to column-span: all and spans all of the columns.
... when a spanner is introduced, it breaks the flow of columns and columns restart after the spanner, effectively creating a new
set of column boxes.
... column filling and balancing a balanced
set of columns is where all columns have approximately the same amount of content.
...this means that on the last page the final
set of column boxes will be balanced.
Basic concepts of CSS Scroll Snap - CSS: Cascading Style Sheets
the scroll-snap-align property must be used on child elements in order to
set the position that scrolling will snap to.
... padding the scroll container if you do not want the content to snap right to the edge of the scroll container you can use the scroll-padding property or its equivalent longhand values to
set some padding.
... in the below example i have
set scroll-padding to 40 pixels.
... margins on scroll children the scroll-margin property can be
set set on child elements, essentially defining an out
set from the defined box.
Shapes From Images - CSS: Cascading Style Sheets
the shape-image-threshold property is used to
set a threshold for this opacity.
...
setting a threshold the shape-image-threshold property enables the creation of shapes from areas which are not fully transparent.
...values in between mean that you can
set a semi-transparent area as the defining area.
...if i
set shape-image-threshold to 0.3 then i see the shape, if i
set it to something smaller than 0.2 i do not get the shape.
Animatable CSS properties - CSS: Cascading Style Sheets
border border-block-end border-block-end-color border-block-end-width border-block-start border-block-start-color border-block-start-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-width border-color border-end-end-radius border-end-start-radius border-image-out
set border-image-slice border-image-width border-inline-end border-inline-end-color border-inline-end-width border-inline-start border-inline-start-color border-inline-start-width border-left border-left-color border-left-width border-radius border-right border-right-color border-right-width border-start-end-radius b...
... border-top-width border-width bottom box-shadow caret-color clip clip-path color column-count column-gap column-rule column-rule-color column-rule-width column-width columns filter flex flex-basis flex-grow flex-shrink font font-size font-size-adjust font-stretch font-variation-
settings font-weight gap grid-column-gap grid-gap grid-row-gap grid-template-columns grid-template-rows height inline-size in
set in
set-block in
set-block-end in
set-block-start in
set-inline in
set-inline-end in
set-inline-start left letter-spacing line-clamp line-height margin margin-block-end ...
... margin-block-start margin-bottom margin-inline-end margin-inline-start margin-left margin-right margin-top mask mask-border mask-position mask-size max-block-size max-height max-inline-size max-lines max-width min-block-size min-height min-inline-size min-width object-position off
set off
set-anchor off
set-distance off
set-path off
set-position off
set-rotate opacity order outline outline-color outline-off
set outline-width padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top perspective perspective...
...-padding-left scroll-padding-right scroll-padding-top scroll-snap-coordinate scroll-snap-destination scrollbar-color shape-image-threshold shape-margin shape-outside tab-size text-decoration text-decoration-color text-decoration-thickness text-emphasis text-emphasis-color text-indent text-shadow text-underline-off
set top transform transform-origin translate vertical-align visibility width word-spacing z-index zoom ...
Sticky footers - CSS: Cascading Style Sheets
the recipe download this example note: in this example and the following one we are using a wrapper
set to min-height: 100% in order that our live example works.
... you could also achieve this for a full page by
setting a min-height of 100vh on the <body> and then using it as your grid container.
... the flexbox example starts out in the same way, but we use display:flex rather than display:grid on the .wrapper; we also
set flex-direction to column.
... then we
set our main content to flex-grow: 1 and the other two elements to flex-shrink: 0 — this prevents them from shrinking smaller when content fills the main area.
Viewport concepts - CSS: Cascading Style Sheets
you can
set any height and width on an iframe, but the whole document may not be visible.
... iframe { width: 50vw; } if the iframe is
set to 50vw, it will be 50% of the width of the 1200px parent document in our example above, or 600px, with 1vw being 6px.
...you can
set any height and width on an svg, but the whole image might not be visible.
...it should preferably be
set to device-width, which is the width of the screen in css pixels at a scale of 100%.
align-content - CSS: Cascading Style Sheets
the css align-content property
sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis.
... items have equal space around them */ align-content: stretch; /* distribute items evenly stretch 'auto'-sized items to fit the container */ /* overflow alignment */ align-content: safe center; align-content: unsafe center; /* global values */ align-content: inherit; align-content: initial; align-content: un
set; values start the items are packed flush to each other against the start edge of the alignment container in the cross axis.
... normal the items are packed in their default position as if no align-content value was
set.
... baseline first baseline last baseline specifies participation in first- or last-baseline alignment: aligns the alignment baseline of the box’s first or last baseline
set with the corresponding baseline in the shared first or last baseline
set of all the boxes in its baseline-sharing group.
animation-fill-mode - CSS: Cascading Style Sheets
the animation-fill-mode css property
sets how a css animation applies styles to its target before and after its execution.
... it is often convenient to use the shorthand property animation to
set all animation properties at once.
... forwards the target will retain the computed values
set by the last keyframe encountered during execution.
...for more information, see
setting multiple animation property values.
animation-name - CSS: Cascading Style Sheets
it is often convenient to use the shorthand property animation to
set all animation properties at once.
... syntax /* single animation */ animation-name: none; animation-name: test_05; animation-name: -specific; animation-name: sliding-vertically; /* multiple animations */ animation-name: test1, animation4; animation-name: none, -moz-specific, sliding; /* global values */ animation-name: initial animation-name: inherit animation-name: un
set values none a special keyword denoting no keyframes.
...furthermore, the identifier can't be none, un
set, initial, or inherit.
...for more information, see
setting multiple animation property values.
animation-timing-function - CSS: Cascading Style Sheets
the animation-timing-function css property
sets how an animation progresses through the duration of each cycle.
... it is often convenient to use the shorthand property animation to
set all animation properties at once.
...iming-function: steps(20, jump-none); animation-timing-function: steps(5, jump-both); animation-timing-function: steps(6, start); animation-timing-function: steps(8, end); /* multiple animations */ animation-timing-function: ease, step-start, cubic-bezier(0.1, 0.7, 1.0, 0.1); /* global values */ animation-timing-function: inherit; animation-timing-function: initial; animation-timing-function: un
set; timing functions may be specified on individual keyframes in a @keyframes rule.
...for more information, see
setting multiple animation property values.
animation - CSS: Cascading Style Sheets
iv> </div> </div> </div> </div> html,body { height: 100%; box-sizing: border-box; } pre { margin-bottom: 0; } svg { width: 1.5em; height: 1.5em; } button { width: 27px; height: 27px; background-size: 16px; background-position: center; background-repeat: no-repeat; border-radius: 3px; cursor: pointer; } button.play { background-image: url('data:image/svg+xml;char
set=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20viewbox%3d%220%200%2016%2016%22%3e%3cstyle%3epath%20%7bdisplay%3anone%7d%20path%3atarget%7bdisplay%3ablock%7d%3c%2fstyle%3e%3cpath%20id%3d%22play%22%20d%3d%22m3%2c3%20l3%2c13%20l13%2c8%20z%22%20%2f%3e%3cpath%20id%3d%22pause%22%20d%3d%22m5%2c4%20l7%2c4%20l7%2c13%20l5%2c13%20z%20m9%2c4%20l11%2c4%20l11%2c13%20l9%2c13%20z%22%20%2f%3e...
...%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#play'); } button.pause { background-image: url('data:image/svg+xml;char
set=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20viewbox%3d%220%200%2016%2016%22%3e%3cstyle%3epath%20%7bdisplay%3anone%7d%20path%3atarget%7bdisplay%3ablock%7d%3c%2fstyle%3e%3cpath%20id%3d%22play%22%20d%3d%22m3%2c3%20l3%2c13%20l13%2c8%20z%22%20%2f%3e%3cpath%20id%3d%22pause%22%20d%3d%22m5%2c4%20l7%2c4%20l7%2c13%20l5%2c13%20z%20m9%2c4%20l11%2c4%20l11%2c13%20l9%2c13%20z%22%20%2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3%2c1%2...
...c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#pause'); } button.restart { background-image: url('data:image/svg+xml;char
set=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20viewbox%3d%220%200%2016%2016%22%3e%3cstyle%3epath%20%7bdisplay%3anone%7d%20path%3atarget%7bdisplay%3ablock%7d%3c%2fstyle%3e%3cpath%20id%3d%22play%22%20d%3d%22m3%2c3%20l3%2c13%20l13%2c8%20z%22%20%2f%3e%3cpath%20id%3d%22pause%22%20d%3d%22m5%2c4%20l7%2c4%20l7%2c13%20l5%2c13%20z%20m9%2c4%20l11%2c4%20l11%2c13%20l9%2c13%20z%22%20%2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#restart'); } .grid { width: 100%; height: 10...
...function playpause (i) { var btn = button[i]; var anim = animation[i]; if (btn.classlist.contains('play')) { anim.style.animationplaystate = 'running'; togglebutton(btn, 'pause'); } else if (btn.classlist.contains('pause')) { anim.style.animationplaystate = 'paused'; togglebutton(btn, 'play'); } else { anim.classlist.remove('a' + (i + 1));
settimeout(function () { togglebutton(btn, i === 0 ?
aspect-ratio - CSS: Cascading Style Sheets
the aspect-ratio css property
sets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions.
... syntax aspect-ratio: 1 / 1; /* global values */ aspect-ratio: inherit; aspect-ratio: initial; aspect-ratio: un
set; values <auto> replaced elements with an intrinsic aspect ratio use that aspect ratio, otherwise the box has no preferred aspect ratio.
...es partial support 71notes notes firefox 71 adds internal support only for mapped values no support 69 — 71notes disabled notes firefox 69 adds internal support only for mapped valuesdisabled from version 69 until version 71 (exclusive): this feature is behind the layout.css.width-and-height-map-to-aspect-ratio.enabled preference (needs to be
set to true).
... full support 79firefox full support 71 full support 71 no support 69 — 71disabled disabled from version 69 until version 71 (exclusive): this feature is behind the layout.css.width-and-height-map-to-aspect-ratio.enabled preference (needs to be
set to true).
background-image - CSS: Cascading Style Sheets
the background-image css property
sets one or more background images on an element.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specified, but with <url> values made absoluteanimation typediscrete formal syntax <bg-image>#where <bg-image> = none | <image>where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...)<image-
set()> = image-
set( <image-
set-option># )<element()> = element( <id-selector> )<paint()> = paint( <ident>, <declaration-value>?
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-
set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
border-bottom-style - CSS: Cascading Style Sheets
the border-bottom-style css property
sets the line style of an element's bottom border.
... syntax /* keyword values */ border-bottom-style: none; border-bottom-style: hidden; border-bottom-style: dotted; border-bottom-style: dashed; border-bottom-style: solid; border-bottom-style: double; border-bottom-style: groove; border-bottom-style: ridge; border-bottom-style: in
set; border-bottom-style: out
set; /* global values */ border-bottom-style: inherit; border-bottom-style: initial; border-bottom-style: un
set; the border-bottom-style property is specified as a single keyword chosen from those available for the border-style property.
...it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | in
set | out
set examples demonstrating all border styles html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5">solid</td> <td class="b6">double</td> <td class="b7">groove</td> <td class="b8">ridge</td> </tr> <tr> <td class="b9">in
set</td> <td class="b10">out
set</td> </tr> </table> css /* define look of the table */ table { border-width: 3px; background-color: #52e385; } ...
...tr, td { padding: 3px; } /* border-bottom-style example classes */ .b1 {border-bottom-style: none;} .b2 {border-bottom-style: hidden;} .b3 {border-bottom-style: dotted;} .b4 {border-bottom-style: dashed;} .b5 {border-bottom-style: solid;} .b6 {border-bottom-style: double;} .b7 {border-bottom-style: groove;} .b8 {border-bottom-style: ridge;} .b9 {border-bottom-style: in
set;} .b10 {border-bottom-style: out
set;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-style' in that specification.
border-color - CSS: Cascading Style Sheets
the border-color shorthand css property
sets the color of an element's border.
... each side can be
set individually using border-top-color, border-right-color, border-bottom-color, and border-left-color; or using the writing mode-aware border-block-start-color, border-block-end-color, border-inline-start-color, and border-inline-end-color.
...m-color border-left-color border-right-color border-top-color syntax /* <color> values */ border-color: red; /* horizontal | vertical */ border-color: red #f015ca; /* top | vertical | bottom */ border-color: red rgb(240,30,50,.7) green; /* top | right | bottom | left */ border-color: red yellow green blue; /* global values */ border-color: inherit; border-color: initial; border-color: un
set; the border-color property may be specified using one, two, three, or four values.
...<li><code>border-top-color: red;</code></li> <li><code>border-right-color: cyan;</code></li> <li><code>border-bottom-color: black;</code></li> <li><code>border-left-color: gold;</code></li> </ul> </div> css #justone { border-color: red; } #horzvert { border-color: gold red; } #topvertbott { border-color: red cyan gold; } #trbl { border-color: red cyan black gold; } /*
set width and style for all divs */ div { border: solid 0.3em; width: auto; margin: 0.5em; padding: 0.5em; } ul { margin: 0; list-style: none; } result specifications specification status comment css logical properties and values level 1 editor's draft added the logical keyword.
border-image-width - CSS: Cascading Style Sheets
the border-image-width css property
sets the width of an element's border image.
...: 1rem; /* <percentage> value */ border-image-width: 25%; /* <number> value */ border-image-width: 3; /* vertical | horizontal */ border-image-width: 2em 3em; /* top | horizontal | bottom */ border-image-width: 5% 15% 10%; /* top | right | bottom | left */ border-image-width: 5% 2em 10% auto; /* global values */ border-image-width: inherit; border-image-width: initial; border-image-width: un
set; the border-image-width property may be specified using one, two, three, or four values chosen from the list of values below.
...percentages are relative to the width of the border image area for horizontal off
sets and the height of the border image area for vertical off
sets.
... html <p>lorem ipsum dolor sit amet, con
setetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
border-left-style - CSS: Cascading Style Sheets
the border-left-style css property
sets the line style of an element's left border.
... syntax /* keyword values */ border-left-style: none; border-left-style: hidden; border-left-style: dotted; border-left-style: dashed; border-left-style: solid; border-left-style: double; border-left-style: groove; border-left-style: ridge; border-left-style: in
set; border-left-style: out
set; /* global values */ border-left-style: inherit; border-left-style: initial; border-left-style: un
set; the border-left-style property is specified as a single keyword chosen from those available for the border-style property.
...it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | in
set | out
set examples html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5">solid</td> <td class="b6">double</td> <td class="b7">groove</td> <td class="b8">ridge</td> </tr> <tr> <td class="b9">in
set</td> <td class="b10">out
set</td> </tr> </table> css /* define look of the table */ table { border-width: 2px; background-color: #52e385; } tr, td { padding: 3px; } /* bo...
...rder-left-style example classes */ .b1 {border-left-style: none;} .b2 {border-left-style: hidden;} .b3 {border-left-style: dotted;} .b4 {border-left-style: dashed;} .b5 {border-left-style: solid;} .b6 {border-left-style: double;} .b7 {border-left-style: groove;} .b8 {border-left-style: ridge;} .b9 {border-left-style: in
set;} .b10 {border-left-style: out
set;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left-style' in that specification.
border-left - CSS: Cascading Style Sheets
the border-left shorthand css property
set an element's left border.
... as with all shorthand properties, border-left always
sets the values of all of the properties that it can
set, even if they are not specified.
... it
sets those that are not specified to their default values.
... hiddenborder-left-style: as specifiedborder-left-color: computed coloranimation typeas each of the properties of the shorthand:border-left-color: a colorborder-left-style: discreteborder-left-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | in
set | out
set<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-right-style - CSS: Cascading Style Sheets
the border-right-style css property
sets the line style of an element's right border.
... syntax /* keyword values */ border-right-style: none; border-right-style: hidden; border-right-style: dotted; border-right-style: dashed; border-right-style: solid; border-right-style: double; border-right-style: groove; border-right-style: ridge; border-right-style: in
set; border-right-style: out
set; /* global values */ border-right-style: inherit; border-right-style: initial; border-right-style: un
set; the border-right-style property is specified as a single keyword chosen from those available for the border-style property.
...it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | in
set | out
set examples border styles html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5">solid</td> <td class="b6">double</td> <td class="b7">groove</td> <td class="b8">ridge</td> </tr> <tr> <td class="b9">in
set</td> <td class="b10">out
set</td> </tr> </table> css /* define look of the table */ table { border-width: 2px; background-color: #52e385; } tr, td { padding...
...: 3px; } /* border-right-style example classes */ .b1 {border-right-style: none;} .b2 {border-right-style: hidden;} .b3 {border-right-style: dotted;} .b4 {border-right-style: dashed;} .b5 {border-right-style: solid;} .b6 {border-right-style: double;} .b7 {border-right-style: groove;} .b8 {border-right-style: ridge;} .b9 {border-right-style: in
set;} .b10 {border-right-style: out
set;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right-style' in that specification.
border-right - CSS: Cascading Style Sheets
the border-right shorthand css property
sets the properties of an element's right border.
... as with all shorthand properties, border-right always
sets the values of all of the properties that it can
set, even if they are not specified.
... it
sets those that are not specified to their default values.
...enborder-right-style: as specifiedborder-right-color: computed coloranimation typeas each of the properties of the shorthand:border-right-color: a colorborder-right-style: discreteborder-right-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | in
set | out
set<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-top-style - CSS: Cascading Style Sheets
the border-top-style css property
sets the line style of an element's top border.
... syntax /* keyword values */ border-top-style: none; border-top-style: hidden; border-top-style: dotted; border-top-style: dashed; border-top-style: solid; border-top-style: double; border-top-style: groove; border-top-style: ridge; border-top-style: in
set; border-top-style: out
set; /* global values */ border-top-style: inherit; border-top-style: initial; border-top-style: un
set; the border-top-style property is specified as a single keyword chosen from those available for the border-style property.
...it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | in
set | out
set examples html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5">solid</td> <td class="b6">double</td> <td class="b7">groove</td> <td class="b8">ridge</td> </tr> <tr> <td class="b9">in
set</td> <td class="b10">out
set</td> </tr> </table> css /* define look of the table */ table { border-width: 2px; background-color: #52e385; } tr, td { padding: 3px; } /* bo...
...rder-top-style example classes */ .b1 {border-top-style: none;} .b2 {border-top-style: hidden;} .b3 {border-top-style: dotted;} .b4 {border-top-style: dashed;} .b5 {border-top-style: solid;} .b6 {border-top-style: double;} .b7 {border-top-style: groove;} .b8 {border-top-style: ridge;} .b9 {border-top-style: in
set;} .b10 {border-top-style: out
set;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-style' in that specification.
border-top - CSS: Cascading Style Sheets
the border-top shorthand css property
sets all the properties of an element's top border.
... as with all shorthand properties, border-top always
sets the values of all of the properties that it can
set, even if they are not specified.
... it
sets those that are not specified to their default values.
...ne or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typeas each of the properties of the shorthand:border-top-color: a colorborder-top-style: discreteborder-top-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | in
set | out
set<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
box-flex - CSS: Cascading Style Sheets
/* <number> values */ -moz-box-flex: 0; -moz-box-flex: 2; -moz-box-flex: 3.5; -webkit-box-flex: 0; -webkit-box-flex: 2; -webkit-box-flex: 3.5; /* global values */ -moz-box-flex: inherit; -moz-box-flex: initial; -moz-box-flex: un
set; -webkit-box-flex: inherit; -webkit-box-flex: initial; -webkit-box-flex: un
set; syntax the box-flex property is specified as a <number>.
... if the flex value is
set using the element's flex attribute, then the style is ignored.
... to make xul elements in a containing box the same size,
set the containing box's equalsize attribute to the value always.
... formal definition initial value0applies toelements that are direct children of an element with a css display value of -moz-box or -moz-inline-box or -webkit-box or -webkit-inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax <number> examples
setting box-flex <!doctype html> <html> <head> <title>-moz-box-flex example</title> <style> div.example { display: -moz-box; display: -webkit-box; border: 1px solid black; width: 100%; } div.example > p:nth-child(1) { -moz-box-flex: 1; /* mozilla */ -webkit-box-flex: 1; /* webkit */ border: 1px solid black; ...
break-inside - CSS: Cascading Style Sheets
the break-inside css property
sets how page, column, or region breaks should behave inside a generated box.
... /* keyword values */ break-inside: auto; break-inside: avoid; break-inside: avoid-page; break-inside: avoid-column; break-inside: avoid-region; /* global values */ break-inside: inherit; break-inside: initial; break-inside: un
set; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element.
...a sub
set of values should be aliased as follows: page-break-inside break-inside auto auto avoid avoid formal definition initial valueautoapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid | avoid-page | avoid-column | avoid-region examples avoiding breaking inside a figure in the followi...
...to avoid this, we have
set break-inside: avoid on the <figure>, which causes them to always stay together.
content - CSS: Cascading Style Sheets
r() value linked to the html attribute value */ content: attr(value string); /* language- and position-dependent keywords */ content: open-quote; content: close-quote; content: no-open-quote; content: no-close-quote; /* except for normal and none, several values can be used simultaneously */ content: open-quote chapter_counter; /* global values */ content: inherit; content: initial; content: un
set; syntax values none the pseudo-element is not generated.
...otherwise, for uri values, the absolute uri; for attr() values, the resulting string; for other keywords, as specified.animation typediscrete formal syntax normal | none | [ <content-replacement> | <content-list> ] [/ <string> ]?where <content-replacement> = <image><content-list> = [ <string> | contents | <image> | <quote> | <target> | <leader()> ]+where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient><quote> = open-quote | close-quote | no-open-quote | no-close-quote<target> = <target-counter()> | <target-counters()> | <target-text()><leader()> = leader( <leader-type> )where <image()> = image( <image-tags>?
...)<image-
set()> = image-
set( <image-
set-option># )<element()> = element( <id-selector> )<paint()> = paint( <ident>, <declaration-value>?
...)<leader-type> = dotted | solid | space | <string>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-
set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
counters() - CSS: Cascading Style Sheets
syntax values <custom-ident> a name identifying the counters, which is the same case-sensitive name used for the counter-re
set and counter-increment.
... the name cannot start with two dashes and can't be none, un
set, initial, or inherit.
...-ident> examples default value compared to upper roman html <ol> <li> <ol> <li></li> <li></li> <li></li> </ol> </li> <li></li> <li></li> <li> <ol> <li></li> <li> <ol> <li></li> <li></li> <li></li> </ol> </li> </ol> </li> </ol> css ol { counter-re
set: listcounter; } li { counter-increment: listcounter; } li::marker { content: counters(listcounter, '.', upper-roman) ') '; } li::before { content: counters(listcounter, ".") " == " counters(listcounter, ".", lower-roman) ; } result decimal-leading-zero compared to lower-alpha html <ol> <li> <ol> <li></li> <li></li> <li></li> </ol> </li> <li>...
...</li> <li></li> <li> <ol> <li></li> <li> <ol> <li></li> <li></li> <li></li> </ol> </li> </ol> </li> </ol> css ol { counter-re
set: count; } li { counter-increment: count; } li::marker { content: counters(count, '.', upper-alpha) ') '; } li::before { content: counters(count, ".", decimal-leading-zero) " == " counters(count, ".", lower-alpha); } result specifications specification status comment css lists module level 3the definition of 'css counters' in that specification.
flex-grow - CSS: Cascading Style Sheets
the flex-grow css property
sets the flex grow factor of a flex item main size.
... syntax /* <number> values */ flex-grow: 3; flex-grow: 0.6; /* global values */ flex-grow: inherit; flex-grow: initial; flex-grow: un
set; the flex-grow property is specified as a single <number>.
... flex-grow is used alongside the other flex properties flex-shrink and flex-basis, and normally defined using the flex shorthand to ensure all values are
set.
... formal definition initial value0applies toflex items, including in-flow pseudo-elementsinheritednocomputed valueas specifiedanimation typea number formal syntax <number> examples
setting flex item grow factor html <h4>this is a flex-grow</h4> <h5>a,b,c and f are flex-grow:1 .
flex-shrink - CSS: Cascading Style Sheets
the flex-shrink css property
sets the flex shrink factor of a flex item.
... syntax /* <number> values */ flex-shrink: 2; flex-shrink: 0.6; /* global values */ flex-shrink: inherit; flex-shrink: initial; flex-shrink: un
set; the flex-shrink property is specified as a single <number>.
... formal definition initial value1applies toflex items, including in-flow pseudo-elementsinheritednocomputed valueas specifiedanimation typea number formal syntax <number> examples
setting flex item shrink factor html <p>the width of content is 500px; the flex-basis of the flex items is 120px.</p> <p>a, b, c have flex-shrink:1
set.
... d and e have flex-shrink:2
set</p> <p>the width of d and e is less than the others.</p> <div id="content"> <div class="box" style="background-color:red;">a</div> <div class="box" style="background-color:lightblue;">b</div> <div class="box" style="background-color:yellow;">c</div> <div class="box1" style="background-color:brown;">d</div> <div class="box1" style="background-color:lightgreen;">e</div> </div> css #content { display: flex; width: 500px; } #content div { flex-basis: 120px; border: 3px solid rgba(0,0,0,.2); } .box { flex-shrink: 1; } .box1 { flex-shrink: 2; } result specifications specification status comment css flexible box layout modulethe definition of 'flex-shrink' in that specification.
flex-wrap - CSS: Cascading Style Sheets
the flex-wrap css property
sets whether flex items are forced onto one line or can wrap onto multiple lines.
... if wrapping is allowed, it
sets the direction that lines are stacked.
... syntax flex-wrap: nowrap; /* default value */ flex-wrap: wrap; flex-wrap: wrap-reverse; /* global values */ flex-wrap: inherit; flex-wrap: initial; flex-wrap: un
set; the flex-wrap property is specified as a single keyword chosen from the list of values below.
... formal definition initial valuenowrapapplies toflex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax nowrap | wrap | wrap-reverse examples
setting flex container wrap values html <h4>this is an example for flex-wrap:wrap </h4> <div class="content"> <div class="red">1</div> <div class="green">2</div> <div class="blue">3</div> </div> <h4>this is an example for flex-wrap:nowrap </h4> <div class="content1"> <div class="red">1</div> <div class="green">2</div> <div class="blue">3</div> </div> <h4>this is an example for flex-wra...
font-style - CSS: Cascading Style Sheets
the font-style css property
sets whether a font should be styled with a normal, italic, or oblique face from its font-family.
... syntax font-style: normal; font-style: italic; font-style: oblique; font-style: oblique 10deg; /* global values */ font-style: inherit; font-style: initial; font-style: un
set; the font-style property is specified as a single keyword chosen from the list of values below, which can optionally include an angle if the keyword is oblique.
...see font-variation-
settings.
...ctor('label[for="slant"]'); let slantinput = document.queryselector('#slant'); let sampletext = document.queryselector('.sample'); function update() { let slant = `oblique ${slantinput.value}deg`; slantlabel.textcontent = `font-style: ${slant};`; sampletext.style.fontstyle = slant; } slantinput.addeventlistener('input', update); update(); accessibility concerns large sections of text
set with a font-style value of italic may be difficult for people with cognitive concerns such as dyslexia to read.
font-variant-position - CSS: Cascading Style Sheets
/* keyword values */ font-variant-position: normal; font-variant-position: sub; font-variant-position: super; /* global values */ font-variant-position: inherit; font-variant-position: initial; font-variant-position: un
set; when the usage of these alternate glyphs is activated, if one character in the run doesn't have such a typographically-enhanced glyph, the whole
set of characters of the run is rendered using a fallback method, synthesizing these glyphs.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | sub | super examples
setting superscript and subscript forms html <p class="normal">normal!</p> <p class="super">super!</p> <p class="sub">sub!</p> css p { display: inline; } .normal { font-variant-position: normal; } .super { font-variant-position: super; } .sub { font-variant-position: sub; } result specifications specification status comment css fonts module level 3the...
... noedge no support nofirefox full support 34 full support 34 no support 24 — 34disabled disabled from version 24 until version 34 (exclusive): this feature is behind the layout.css.font-features.enabled preference (needs to be
set to true).
...e android no support nofirefox android full support 34 full support 34 no support 24 — 34disabled disabled from version 24 until version 34 (exclusive): this feature is behind the layout.css.font-features.enabled preference (needs to be
set to true).
grid-template - CSS: Cascading Style Sheets
eas grid-template-rows / grid-template-column values */ grid-template: "a a a" "b b b"; grid-template: "a a a" 20% "b b b" auto; grid-template: [header-top] "a a a" [header-bottom] [main-top] "b b b" 1fr [main-bottom] / auto 1fr auto; /* global values */ grid-template: inherit; grid-template: initial; grid-template: un
set; values none is a keyword that
sets all three longhand properties to none, meaning there is no explicit grid.
... <'grid-template-rows'> / <'grid-template-columns'>
sets grid-template-rows and grid-template-columns to the specified values, and
sets grid-template-areas to none.
...
sets grid-template-areas to the strings listed, grid-template-rows to the track sizes following each string (filling in auto for any missing sizes), and splicing in the named lines defined before/after each size, and grid-template-columns to the track listing specified after the slash (or none, if not specified).
... note: the grid shorthand accepts the same syntax, but also re
sets the implicit grid properties to their initial values.
height - CSS: Cascading Style Sheets
if box-sizing is
set to border-box, however, it instead determines the height of the border area.
... syntax /* keyword value */ height: auto; /* <length> values */ height: 120px; height: 10em; /* <percentage> value */ height: 75%; /* global values */ height: inherit; height: initial; height: un
set; values <length> defines the height as an absolute value.
... accessibility concerns ensure that elements
set with a height are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
...a percentage height on the root element is relative to the initial containing block.computed valuea percentage or auto or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples
setting height using pixels and percentages html <div id="taller">i'm 50 pixels tall.</div> <div id="shorter">i'm 25 pixels tall.</div> <div id="parent"> <div id="child"> i'm half the height of my parent.
image-rendering - CSS: Cascading Style Sheets
the image-rendering css property
sets an image scaling algorithm.
... the property applies to an element itself, to any images
set in its other properties, and to its descendants.
... syntax /* keyword values */ image-rendering: auto; image-rendering: crisp-edges; image-rendering: pixelated; /* global values */ image-rendering: inherit; image-rendering: initial; image-rendering: un
set; values auto the scaling algorithm is ua dependent.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | crisp-edges | pixelated examples
setting image scaling algorithms in practical use, the pixelated and crisp-edges rules can be combined to provide some fallback for each other.
<image> - CSS: Cascading Style Sheets
a selection of images chosed based on resolution defined by the image-
set() function.
...*/ image-
set('test.jpg' 1x, 'test-2x.jpg' 2x) /* a selection of images with varying resolutions */ invalid images nourl.jpg /* an image file must be defined using the url() function.
...*/ image(z.jpg#xy=0,0) /* the spatial fragment must be written in the format of xywh=#,#,#,# */ image-
set('cat.jpg' 1x, 'dog.jpg' 1x) /* every image in an image
set must have a different resolutions */ specifications specification status comment css images module level 4the definition of '<image>' in that specification.
... working draft adds element(), image(), image-
set(), conic-gradient(), repeating-conic-gradient(), and image-resolution.
image() - CSS: Cascading Style Sheets
the size of the color swatch can be
set with the background-size property.
... this is different from the background-color, which
sets a color to cover the entire element.
... examples directionally-sensitive images <ul> <li dir="ltr">bullet is a right facing arrow on the left</li> <li dir="rtl">bullet is the same arrow, flipped to point left.</li> </ul> ul { list-style-image: image(ltr 'https://mdn.mozillademos.org/files/16412/rightarrow.png'); } in the left-to-right list items — those with dir="ltr"
set on the element itself or inheriting the directionality from an ancestor or default value for the page — the image will be used as-is.
... list items with dir="rtl"
set on the <li> or inheriting the right-to-left directionality from an ancestor, such as documents
set to arabic or hebrew, will have the bullet display on the right, horizontally flippled, as if transform: scalex(-1) had been
set.
ime-mode - CSS: Cascading Style Sheets
/* keyword values */ ime-mode: auto; ime-mode: normal; ime-mode: active; ime-mode: inactive; ime-mode: disabled; /* global values */ ime-mode: inherit; ime-mode: initial; ime-mode: un
set; the ime-mode property is only partially and inconsistently implemented in browsers.
...this property should only be used for private web applications or to undo the property if it was previously
set by legacy code.
... normal the ime state should be normal; this value can be used in a user style sheet to override the page's
setting.
...in the past, this was commonly used on fields that entered data into databases which didn't support extended character
sets.
justify-content - CSS: Cascading Style Sheets
items have equal space around them */ justify-content: stretch; /* distribute items evenly stretch 'auto'-sized items to fit the container */ /* overflow alignment */ justify-content: safe center; justify-content: unsafe center; /* global values */ justify-content: inherit; justify-content: initial; justify-content: un
set; values start the items are packed flush to each other toward the start edge of the alignment container in the main axis.
... normal the items are packed in their default position as if no justify-content value was
set.
... baseline first baseline last baseline specifies participation in first- or last-baseline alignment: aligns the alignment baseline of the box’s first or last baseline
set with the corresponding baseline in the shared first or last baseline
set of all the boxes in its baseline-sharing group.
...[ <content-position> | left | right ]where <content-distribution> = space-between | space-around | space-evenly | stretch<overflow-position> = unsafe | safe<content-position> = center | start | end | flex-start | flex-end examples
setting flex item distribution css #container { display: flex; justify-content: space-between; /* can be changed in the live sample */ } #container > div { width: 100px; height: 100px; background: linear-gradient(-45deg, #788cff, #b4c8ff); } html <div id="container"> <div></div> <div></div> <div></div> </div> <select id="justifycontent"> <option value="start">start</option> ...
justify-self - CSS: Cascading Style Sheets
the css justify-self property
sets the way a box is justified inside its alignment container along the appropriate axis.
... for absolutely-positioned elements, it aligns an item inside its containing block on the inline axis, accounting for the off
set values of top, left, bottom, and right.
... /* pack item from the left */ justify-self: right; /* pack item from the right */ /* baseline alignment */ justify-self: baseline; justify-self: first baseline; justify-self: last baseline; /* overflow alignment (for positional alignment only) */ justify-self: safe center; justify-self: unsafe center; /* global values */ justify-self: inherit; justify-self: initial; justify-self: un
set; this property can take one of three different forms: basic keywords: one of the keyword values normal, auto, or stretch.
... baseline first baseline last baseline specifies participation in first- or last-baseline alignment: aligns the alignment baseline of the box’s first or last baseline
set with the corresponding baseline in the shared first or last baseline
set of all the boxes in its baseline-sharing group.
<length> - CSS: Cascading Style Sheets
absolute lengths can cause accessibility problems, since they are fixed and do not scale according to user
settings.
... for this reason, prefer relative lengths (such as em or rem) when
setting font-size.
...300px, 50%, 30vw) to
set the width of a result bar that will appear below it once you've pressed return.
...iner"> <label>enter width:</label> <input type="text" id="length"> </div> <div class="inner"> </div> </div> <div class="results"> </div> css html { font-family: sans-serif; font-weight: bold; box-sizing: border-box; } .outer { width: 100%; height: 50px; background-color: #eee; position: relative; } .inner { height: 50px; background-color: #999; box-shadow: in
set 3px 3px 5px rgba(255,255,255,0.5), in
set -3px -3px 5px rgba(0,0,0,0.5); } .result { height: 20px; background-color: #999; box-shadow: in
set 3px 3px 5px rgba(255,255,255,0.5), in
set -3px -3px 5px rgba(0,0,0,0.5); background-color: orange; display: flex; align-items: center; margin-top: 10px; } .result code { position: absolute; margin-left: 20px; } ...
list-style-position - CSS: Cascading Style Sheets
the list-style-position css property
sets the position of the ::marker relative to a list item.
...because this property is inherited, it can be
set on the parent element (normally <ol> or <ul>) to let it apply to all list items.
... syntax /* keyword values */ list-style-position: inside; list-style-position: outside; /* global values */ list-style-position: inherit; list-style-position: initial; list-style-position: un
set; the list-style-position property is specified as one of the keyword values listed below.
... formal definition initial valueoutsideapplies tolist itemsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax inside | outside examples
setting list item position html <ul class="inside">list 1 <li>list item 1-1</li> <li>list item 1-2</li> <li>list item 1-3</li> <li>list item 1-4</li> </ul> <ul class="outside">list 2 <li>list item 2-1</li> <li>list item 2-2</li> <li>list item 2-3</li> <li>list item 2-4</li> </ul> <ul class="inside-img">list 3 <li>list item 3-1</li> <li>list item 3-2</li> <li>list item 3-3</li> <li>list item 3-4</li> </ul> css .inside { list-style-position: inside; list-sty...
mask-border-width - CSS: Cascading Style Sheets
the mask-border-width css property
sets the width of an element's mask border.
...er-width: 1rem; /* <percentage> value */ mask-border-width: 25%; /* <number> value */ mask-border-width: 3; /* vertical | horizontal */ mask-border-width: 2em 3em; /* top | horizontal | bottom */ mask-border-width: 5% 15% 10%; /* top | right | bottom | left */ mask-border-width: 5% 2em 10% auto; /* global values */ mask-border-width: inherit; mask-border-width: initial; mask-border-width: un
set; the mask-border-width property may be specified using one, two, three, or four values chosen from the list of values below.
...percentages are relative to the width of the border area for horizontal off
sets and the height of the border area for vertical off
sets.
...when it eventually starts to be supported, it will serve to define the width of the border mask —
setting this to a different value to mask-border-slice will cause the slices to be scaled to fit the border mask.
mask-origin - CSS: Cascading Style Sheets
the mask-origin css property
sets the origin of a mask.
...igin: margin-box; mask-origin: fill-box; mask-origin: stroke-box; mask-origin: view-box; /* multiple values */ mask-origin: padding-box, content-box; mask-origin: view-box, fill-box, border-box; /* non-standard keyword values */ -webkit-mask-origin: content; -webkit-mask-origin: padding; -webkit-mask-origin: border; /* global values */ mask-origin: inherit; mask-origin: initial; mask-origin: un
set; for elements rendered as a single box, this property specifies the mask positioning area.
...if a viewbox attribute is specified for the element creating the svg viewport, the reference box is positioned at the origin of the coordinate system established by the viewbox attribute and the dimension of the reference box is
set to the width and height values of the viewbox attribute.
...itial valueborder-boxapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <geometry-box>#where <geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples
setting mask origin to border-box css #masked { width: 100px; height: 100px; margin: 10px; border: 10px solid blue; background-color: #8cffa0; padding: 10px; mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-origin: border-box; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="origin"> <option value="content-box">content...
mask-type - CSS: Cascading Style Sheets
the mask-type css property
sets whether an svg <mask> element is used as a luminance or an alpha mask.
... /* keyword values */ mask-type: luminance; mask-type: alpha; /* global values */ mask-type: inherit; mask-type: initial; mask-type: un
set; this property may be overridden by the mask-mode property, which has the same effect but applies to the element where the mask is used.
... formal definition initial valueluminanceapplies to<mask> elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax luminance | alpha examples
setting an alpha mask html <div class="redsquare"></div> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="0" height="0"> <defs> <mask id="m" maskcontentunits="objectboundingbox" style="mask-type:alpha"> <rect x=".1" y=".1" width=".8" height=".8" fill="red" fill-opacity="0.7"/> </mask> </defs> </svg> css .
...redsquare { height: 100px; width: 100px; background-color: rgb(128, 128, 128); border: solid 1px black; mask: url("#m"); } result
setting a luminance mask html <div class="redsquare"></div> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="0" height="0"> <defs> <mask id="m" maskcontentunits="objectboundingbox" style="mask-type:luminance"> <rect x=".1" y=".1" width=".8" height=".8" fill="red" fill-opacity="0.7"/> </mask> </defs> </svg> css .redsquare { height: 100px; width: 100px; background-color: rgb(128, 128, 128); border: solid 1px black; mask: url("#m"); mask-type:luminance; } result specifications specification status comment css maski...
max-height - CSS: Cascading Style Sheets
the max-height css property
sets the maximum height of an element.
... syntax /* <length> value */ max-height: 3.5em; /* <percentage> value */ max-height: 75%; /* keyword values */ max-height: none; max-height: max-content; max-height: min-content; max-height: fit-content(20em); /* global values */ max-height: inherit; max-height: initial; max-height: un
set; values <length> defines the max-height as an absolute value.
... accessibility concerns ensure that elements
set with a max-height are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
...ds on content height), and this element is not absolutely positioned, the percentage value is treated as none.computed valuethe percentage as specified or the absolute length or noneanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples
setting max-height using percentage and keyword values table { max-height: 75%; } form { max-height: none; } specifications specification status comment css box sizing module level 4the definition of 'max-height' in that specification.
max-width - CSS: Cascading Style Sheets
the max-width css property
sets the maximum width of an element.
... syntax /* <length> value */ max-width: 3.5em; /* <percentage> value */ max-width: 75%; /* keyword values */ max-width: none; max-width: max-content; max-width: min-content; max-width: fit-content(20em); /* global values */ max-width: inherit; max-width: initial; max-width: un
set; values <length> defines the max-width as an absolute value.
... accessibility concerns ensure that elements
set with a max-width are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
...ed inline elements, table rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute length or noneanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples
setting max width in pixels in this example, the "child" will be either 150 pixels wide or the width of the "parent," whichever is smaller.
min-height - CSS: Cascading Style Sheets
the min-height css property
sets the minimum height of an element.
... the element's height is
set to the value of min-height whenever min-height is larger than max-height or height.
... syntax /* <length> value */ min-height: 3.5em; /* <percentage> value */ min-height: 10%; /* keyword values */ min-height: max-content; min-height: min-content; min-height: fit-content(20em); /* global values */ min-height: inherit; min-height: initial; min-height: un
set; values <length> defines the min-height as an absolute value.
...., it depends on content height), and this element is not absolutely positioned, the percentage value is treated as 0.computed valuethe percentage as specified or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples
setting min-height table { min-height: 75%; } form { min-height: 0; } specifications specification status comment css box sizing module level 4the definition of 'min-height' in that specification.
min-width - CSS: Cascading Style Sheets
the min-width css property
sets the minimum width of an element.
... the element's width is
set to the value of min-width whenever min-width is larger than max-width or width.
... syntax /* <length> value */ min-width: 3.5em; /* <percentage> value */ min-width: 10%; /* keyword values */ min-width: max-content; min-width: min-content; min-width: fit-content(20em); /* global values */ min-width: inherit; min-width: initial; min-width: un
set; values <length> defines the min-width as an absolute value.
...n-replaced inline elements, table rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples
setting minimum element width table { min-width: 75%; } form { min-width: 0; } specifications specification status comment css box sizing module level 4the definition of 'min-width' in that specification.
mix-blend-mode - CSS: Cascading Style Sheets
the mix-blend-mode css property
sets how an element's content should blend with the content of the element's parent and the element's background.
...end-mode: darken; mix-blend-mode: lighten; mix-blend-mode: color-dodge; mix-blend-mode: color-burn; mix-blend-mode: hard-light; mix-blend-mode: soft-light; mix-blend-mode: difference; mix-blend-mode: exclusion; mix-blend-mode: hue; mix-blend-mode: saturation; mix-blend-mode: color; mix-blend-mode: luminosity; /* global values */ mix-blend-mode: initial; mix-blend-mode: inherit; mix-blend-mode: un
set; values <blend-mode> the blending mode that should be applied.
...ss="col"> <div class="note">blending in isolation (no blending with the background)</div> <div class="row isolate"> <div class="cell"> normal <div class="container normal"> <div class="group"> <div class="item firefox"></div> <svg viewbox="0 0 150 150"> <defs> <lineargradient id="red"> <stop off
set="0" stop-color="hsl(0,100%,50%)" /> <stop off
set="100%" stop-color="hsl(0,0%,100%)" /> </lineargradient> <lineargradient id="green"> <stop off
set="0" stop-color="hsl(120,100%,50%)" /> <stop off
set="100%" stop-color="hsl(120,0%,100%)" /> </lineargradient> <lineargradient id="...
...blue"> <stop off
set="0" stop-color="hsl(240,100%,50%)" /> <stop off
set="100%" stop-color="hsl(240,0%,100%)" /> </lineargradient> </defs> <ellipse class="item r" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item g" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item b" cx="75" cy="75" rx="25" ry="70"></ellipse> </svg> </div> </div> </div> <div class="cell"> multiply <div class="container multiply"> <div class="group"> <div class="item firefox"></div> <svg viewbox="0 0 150 150"> <ellipse class="item r" cx="75" cy="75" rx="25" ry="70"></ellipse> <elli...
object-position - CSS: Cascading Style Sheets
syntax /* <position> values */ object-position: center top; object-position: 100px 50px; /* global values */ object-position: inherit; object-position: initial; object-position: un
set; values <position> from one to four values that define the 2d position of the element.
... relative or absolute off
sets can be used.
... note: the position can be
set so that the replaced element is drawn outside its box.
... img { width: 300px; height: 250px; border: 1px solid black; background-color: silver; margin-right: 1em; object-fit: none; } #object-position-1 { object-position: 10px; } #object-position-2 { object-position: 100% 10%; } the first image is positioned with its left edge in
set 10 pixels from the left edge of the element's box.
outline-color - CSS: Cascading Style Sheets
the outline-color css property
sets the color of an element's outline.
... syntax /* <color> values */ outline-color: #f92525; outline-color: rgb(30,222,121); outline-color: blue; /* keyword value */ outline-color: invert; /* global values */ outline-color: inherit; outline-color: initial; outline-color: un
set; the outline-color property is specified as any one of the values listed below.
...the border, on the other hand, will actually alter the page's layout to ensure that it fits without overlapping anything else (unless you explicitly
set it to overlap).
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples
setting a solid blue outline html <p>my outline is blue, as you can see.</p> css p { outline: 2px solid; /*
set the outline width and style */ outline-color: #0000ff; /* make the outline blue */ margin: 5px; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-color' in that specificat...
overscroll-behavior - CSS: Cascading Style Sheets
the overscroll-behavior css property
sets what a browser does when reaching the boundary of a scrolling area.
... /* keyword values */ overscroll-behavior: auto; /* default */ overscroll-behavior: contain; overscroll-behavior: none; /* two values */ overscroll-behavior: auto contain; /* global values */ overscroll-behavior: inherit; overscroll-behavior: initial; overscroll-behavior: un
set; by default, mobile browsers tend to provide a "bounce" effect or even a page refresh when the top or bottom of a page (or other scroll area) is reached.
... contain default scroll overflow behavior is observed inside the element this value is
set on (e.g.
...this can be prevented by
setting overscroll-behavior: none on the <body> element: body { margin: 0; overscroll-behavior: none; } specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior' in that specification.
padding-bottom - CSS: Cascading Style Sheets
the padding-bottom css property
sets the height of the padding area on the bottom of an element.
... note: the padding property can be used to
set paddings on all four sides of an element with a single declaration.
... syntax /* <length> values */ padding-bottom: 0.5em; padding-bottom: 0; padding-bottom: 2cm; /* <percentage> value */ padding-bottom: 10%; /* global values */ padding-bottom: inherit; padding-bottom: initial; padding-bottom: un
set; the padding-bottom property is specified as a single value chosen from the list below.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples
setting padding bottom with pixels and percentages .content { padding-bottom: 5%; } .sidebox { padding-bottom: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-bottom' in that specification.
padding-left - CSS: Cascading Style Sheets
the padding-left css property
sets the width of the padding area to the left of an element.
... note: the padding property can be used to
set paddings on all four sides of an element with a single declaration.
... syntax /* <length> values */ padding-left: 0.5em; padding-left: 0; padding-left: 2cm; /* <percentage> value */ padding-left: 10%; /* global values */ padding-left: inherit; padding-left: initial; padding-left: un
set; the padding-left property is specified as a single value chosen from the list below.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples
setting left padding using pixels and percentages .content { padding-left: 5%; } .sidebox { padding-left: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-left' in that specification.
padding-right - CSS: Cascading Style Sheets
the padding-right css property
sets the width of the padding area on the right of an element.
... note: the padding property can be used to
set paddings on all four sides of an element with a single declaration.
... syntax /* <length> values */ padding-right: 0.5em; padding-right: 0; padding-right: 2cm; /* <percentage> value */ padding-right: 10%; /* global values */ padding-right: inherit; padding-right: initial; padding-right: un
set; the padding-right property is specified as a single value chosen from the list below.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples
setting right padding using pixels and percentages .content { padding-right: 5%; } .sidebox { padding-right: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-right' in that specification.
padding-top - CSS: Cascading Style Sheets
the padding-top css property
sets the height of the padding area on the top of an element.
... note: the padding property can be used to
set paddings on all four sides of an element with a single declaration.
... syntax /* <length> values */ padding-top: 0.5em; padding-top: 0; padding-top: 2cm; /* <percentage> value */ padding-top: 10%; /* global values */ padding-top: inherit; padding-top: initial; padding-top: un
set; the padding-top property is specified as a single value chosen from the list below.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples
setting top padding using pixels and percentages .content { padding-top: 5%; } .sidebox { padding-top: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-top' in that specification.
perspective - CSS: Cascading Style Sheets
syntax /* keyword value */ perspective: none; /* <length> values */ perspective: 20px; perspective: 3.5em; /* global values */ perspective: inherit; perspective: initial; perspective: un
set; values none indicates that no perspective transform is to be applied.
... formal definition initial valuenoneapplies totransformable elementsinheritednocomputed valuethe absolute length or noneanimation typea lengthcreates stacking contextyes formal syntax none | <length> examples
setting perspective this example shows a cube with the perspective
set at different positions.
... html the html below creates four copies of the same box, with the perspective
set at different values.
...pers650"> <div class="face front">1</div> <div class="face back">2</div> <div class="face right">3</div> <div class="face left">4</div> <div class="face top">5</div> <div class="face bottom">6</div> </div> </div> </td> </tr> </tbody> </table> css the css establishes classes that can be used to
set the perspective to different distances.
resize - CSS: Cascading Style Sheets
the resize css property
sets whether an element is resizable, and if so, in which directions.
... syntax /* keyword values */ resize: none; resize: both; resize: horizontal; resize: vertical; resize: block; resize: inline; /* global values */ resize: inherit; resize: initial; resize: un
set; the resize property is specified as a single keyword value from the list below.
... resize does not apply to the following: inline elements block elements for which the overflow property is
set to visible formal definition initial valuenoneapplies toelements with overflow other than visible, and optionally replaced elements representing images or videos, and iframesinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | both | horizontal | vertical | block | inline examples disabling resizability of textareas in many browsers, <textarea> elements are res...
... html <div class="resizable"> <p class="resizable"> this paragraph is resizable in all directions, because the css `resize` property is
set to `both` on this element.
scroll-margin-block - CSS: Cascading Style Sheets
the scroll-margin-block shorthand property
sets the scroll margins of an element in the block dimension.
... constituent properties this property is a shorthand for the following css properties: scroll-margin-block-end scroll-margin-block-start syntax /* <length> values */ scroll-margin-block: 10px; scroll-margin-block: 1em .5em ; /* global values */ scroll-margin-block: inherit; scroll-margin-block: initial; scroll-margin-block: un
set; values <length> an out
set from the corresponding edge of the scroll container.
... description the scroll-margin values represent out
sets defining the scroll snap area that is used for snapping this box to the snapport.
... the scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified out
sets.
scroll-padding-block - CSS: Cascading Style Sheets
the scroll-padding-block shorthand property
sets the scroll padding of an element in the block dimension.
... the scroll-padding properties define off
sets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
...ies this property is a shorthand for the following css properties: scroll-padding-block-end scroll-padding-block-start syntax /* keyword values */ scroll-padding-block: auto; /* <length> values */ scroll-padding-block: 10px; scroll-padding-block: 1em .5em; scroll-padding-block: 10%; /* global values */ scroll-padding-block: inherit; scroll-padding-block: initial; scroll-padding-block: un
set; values <length-percentage> an inwards off
set from the corresponding edge of the scrollport, as a valid length or a percentage.
... auto the off
set is determind by the user agent.
scroll-padding-inline - CSS: Cascading Style Sheets
the scroll-padding-inline shorthand property
sets the scroll padding of an element in the inline dimension.
... the scroll-padding properties define off
sets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
... property is a shorthand for the following css properties: scroll-padding-inline-end scroll-padding-inline-start syntax /* keyword values */ scroll-padding-inline: auto; /* <length> values */ scroll-padding-inline: 10px; scroll-padding-inline: 1em .5em; scroll-padding-inline: 10%; /* global values */ scroll-padding-inline: inherit; scroll-padding-inline: initial; scroll-padding-inline: un
set; values <length-percentage> an inwards off
set from the corresponding edge of the scrollport, as a valid length or a percentage.
... auto the off
set is determind by the user agent.
scroll-padding - CSS: Cascading Style Sheets
the scroll-padding shorthand property
sets scroll padding on all sides of an element at once, much like the padding property does for padding on an element.
... the scroll-padding-* properties define off
sets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
...rties this property is a shorthand for the following css properties: scroll-padding-bottom scroll-padding-left scroll-padding-right scroll-padding-top syntax /* keyword values */ scroll-padding: auto; /* <length> values */ scroll-padding: 10px; scroll-padding: 1em .5em 1em 1em; scroll-padding: 10%; /* global values */ scroll-padding: inherit; scroll-padding: initial; scroll-padding: un
set; values <length-percentage> an inwards off
set from the corresponding edge of the scrollport, as a valid <length> or a <percentage>.
... auto the off
set is determind by the user agent.
scrollbar-width - CSS: Cascading Style Sheets
the scrollbar-width property allows the author to
set the maximum thickness of an element’s scrollbars when they are shown.
... initial valueautoapplies toscrolling boxesinheritednocomputed valueas specifiedanimation typediscrete syntax /* keyword values */ scrollbar-width: auto; scrollbar-width: thin; scrollbar-width: none; /* global values */ scrollbar-width: inherit; scrollbar-width: initial; scrollbar-width: un
set; values <scrollbar-width> defines the width of the scrollbar as a keyword.
... note: user agents must apply any scrollbar-width value
set on the root element to the viewport.
... accessibility concerns use this property with caution —
setting scrollbar-width to thin or none can make content hard or impossible to scroll if the author does not provide an alternative scrolling mechanism.
<shape> - CSS: Cascading Style Sheets
rect() rect(top, right, bottom, left) values top is a <length> representing the off
set for the top of the rectangle relative to the top border of the element's box.
... right is a <length> representing the off
set for the right of the rectangle relative to the left border of the element's box.
... bottom is a <length> representing the off
set for the bottom of the rectangle relative to the top border of the element's box.
... left is a <length> representing the off
set for the left of the rectangle relative to the left border of the element's box.
text-emphasis-position - CSS: Cascading Style Sheets
the text-emphasis-position css property
sets where emphasis marks are drawn.
...al value */ text-emphasis-position: over right; /* keywords value */ text-emphasis-position: over left; text-emphasis-position: under right; text-emphasis-position: under left; text-emphasis-position: left over; text-emphasis-position: right under; text-emphasis-position: left under; /* global values */ text-emphasis-position: inherit; text-emphasis-position: initial; text-emphasis-position: un
set; syntax values over draw marks over the text in horizontal writing mode.
...ble below summarizes the preferred emphasis mark positions for chinese, mongolian and japanese: preferred emphasis mark and ruby position language preferred position illustration horizontal vertical japanese over right korean mongolian chinese under right note: the text-emphasis-position cannot be
set, and therefore are not re
set either, using the text-emphasis shorthand property.
...in html, this can be done with the following pattern: em { text-emphasis: dot; /*
set text-emphasis for <em> elements */ } em rt { display: none; /* hide ruby inside <em> elements */ } specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
transform-style - CSS: Cascading Style Sheets
the transform-style css property
sets whether children of an element are positioned in the 3d space or are flattened in the plane of the element.
... as this property is not inherited, it must be
set for all non-leaf descendants of the element.
... syntax /* keyword values */ transform-style: flat; transform-style: preserve-3d; /* global values */ transform-style: inherit; transform-style: initial; transform-style: un
set; values flat indicates that the children of the element are lying in the plane of the element itself.
...the parent container of the cube faces has transform-style: preserve-3d
set on it by default, so it is transformed in the 3d space and you can see it as intended.
transition-timing-function - CSS: Cascading Style Sheets
the transition-timing-function css property
sets how intermediate values are calculated for css properties being affected by a transition effect.
...n: steps(20, jump-none); transition-timing-function: steps(5, jump-both); transition-timing-function: steps(6, start); transition-timing-function: steps(8, end); /* multiple timing functions */ transition-timing-function: ease, step-start, cubic-bezier(0.1, 0.7, 1.0, 0.1); /* global values */ transition-timing-function: inherit; transition-timing-function: initial; transition-timing-function: un
set; values <timing-function> each <timing-function> represents the timing function to link to the corresponding property to transition, as defined in transition-property.
...div.box1{ width: 90vw; min-width: 24em; background-color: magenta; color: yellow; border: 1px solid orange; transition-property: all; transition-duration: 2s; } function updatetransition() { var els = document.queryselectorall(".parent > div[class]"); for(var c = els.length, i = 0; i < c; i++) { els[i].classlist.toggle("box1"); } } var intervalid = window.
setinterval(updatetransition, 10000); .ease { transition-timing-function: ease; } .easein { transition-timing-function: ease-in; } .easeout { transition-timing-function: ease-out; } .easeinout { transition-timing-function: ease-in-out; } .linear { transition-timing-function: linear; } .cb { transition-timing-function: cubic-bezier(0.2,-2,0.8,2); } step examples <div class="p...
... div.box1{ width: 90vw; min-width: 24em; background-color: magenta; color: yellow; border: 1px solid orange; transition-property: all; transition-duration:2s; } function updatetransition() { var els = document.queryselectorall(".parent > div[class]"); for(var c = els.length, i = 0; i < c; i++) { els[i].classlist.toggle("box1"); } } var intervalid = window.
setinterval(updatetransition, 10000); .jump-start { transition-timing-function: steps(5, jump-start); } .jump-end { transition-timing-function: steps(5, jump-end); } .jump-none { transition-timing-function: steps(5, jump-none); } .jump-both { transition-timing-function: steps(5, jump-both); } .step-start { transition-timing-function: step-start; } .step-end { transition-timing-fu...
width - CSS: Cascading Style Sheets
the width css property
sets an element's width.
... by default, it
sets the width of the content area, but if box-sizing is
set to border-box, it
sets the width of the border area.
... syntax /* <length> values */ width: 300px; width: 25em; /* <percentage> value */ width: 75%; /* keyword values */ width: max-content; width: min-content; width: fit-content(20em); width: auto; /* global values */ width: inherit; width: initial; width: un
set; the width property is specified as either: one of the following keyword values: min-content, max-content, fit-content, auto.
... accessibility concerns ensure that elements
set with a width aren't truncated and don't obscure other content when the page is zoomed to increase text size.
str:concat() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes str:concat() returns a string containing all the string values in a node-
set concatenated together.
... syntax str:concat(node
set) parameters node
set the node-
set whose nodes' string values should be concatenated into one string.
... returns a string whose value is all the string values of the nodes in node
set concatenated together.
... if node
set is empty, an empty string is returned.
Ajax - Developer guides
it will seem familiar to anyone who has used xmlhttprequest, but this api provides a more powerful and flexible feature
set.
... sending and receiving binary data the respon
setype property of the xmlhttprequest object can be
set to change the expected response type from the server.
...the response property will contain the entity body according to respon
setype, as an arraybuffer, blob, document, json, or string.
...it is a simplified sub
set of sgml, capable of describing many different kinds of data.
Web Audio playbackRate explained - Developer guides
playbackrate basics let's starting by looking at a brief example of playbackrate usage: var myaudio = document.createelement('audio'); myaudio.
setattribute('src','audiofile.mp3'); myaudio.playbackrate = 0.5; here we create an <audio> element, and
set its src to a file of our choice.
... next we
set playbackrate to 0.5, which represents half normal speed (the playbackrate is a multiplier applied to the original rate.) a complete example let's create a <video> element first, and
set up video and playback rate controls in html: <video id="myvideo" controls> <source src="https://udn.realityripple.com/samples/6f/08625b424a.m4v" type='video/mp4' /> <source src="https://udn.realityripple.com/samples/5b/8cd6da9c65.webm" type='video/webm' /> </video> <form> <input id="pbr" type="range" value="1" min="0.5" max="4" step="0.1" > <p>playback rate <span id="currentpbr">1</span></p> </form> and apply some javascript to it: window.onload = function () { var v = document.getelementbyid("myvideo"); var p = document.getelementbyid("pbr"); var c = document.getelementbyid("...
... defaultplaybackrate and ratechange in addition to playbackrate, we also have a defaultplaybackrate property available, which lets us
set the default playback rate: the playback rate to which the media re
sets; for example, if we change the source of the video, or (in some browsers) when an ended event is generated.
... so defaultplaybackrate allows us to
set the playback rate before playing the media, while playbackrate allows us to change it during media playback.
Challenge solutions - Developer guides
use domi's right-hand pane to find out where the node's color is
set to red, and where its appearance is made bolder than normal text.
... solution add the following style declaration to the strong rule: font: 200% serif; if you use separate declarations for font-size and font-family, then the font-style
setting on the first paragraph is not overridden.
... solution add a rule to the body element (parent of the headings) to re
set a new counter, and one to display and increment the counter on the headings: /* numbered headings */ body {counter-re
set: headnum;} h3:before { content: "(" counter(headnum, upper-latin) ") "; counter-increment: headnum; } boxes ocean border challenge add one rule to your stylesheet, making a wide border all around the oceans in a color that reminds you of the sea.
...the following script achieves the desired result: // javascript demonstration function dodemo (button) { var square = document.getelementbyid("square"); square.style.backgroundcolor = "#fa4"; square.style.marginleft = "20em"; button.
setattribute("disabled", "true");
settimeout(cleardemo, 2000, button); } function cleardemo (button) { var square = document.getelementbyid("square"); square.style.backgroundcolor = "transparent"; square.style.marginleft = "0em"; button.removeattribute("disabled"); } svg and css change color of inner petals challenge change the stylesheet so that the inner petals all turn pink w...
<input type="image"> - HTML: Hypertext Markup Language
for example, if you have a graphical button that shows an image with an icon and/or image text "login now", you should also
set the alt attribute to something like login now.
...this allows you to specify a frame for the image using the width and height attributes to
set aside space in the layout, then adjust where within that space the image is located and how (or if) it is scaled to occupy that space.
...cddbec0e0b540098c28451e57203e5cab46dfed7ab0115d5a659fcfb7b.png" alt="login" width="100"> </div> </form> css and now some simple css to make the basic elements sit more neatly: div { margin-bottom: 10px; } label { display: inline-block; width: 70px; text-align: right; padding-right: 10px; } adjusting the image position and scaling in this example, we adapt the previous example to
set aside more space for the image and then adjust the actual image's size and positioning using object-fit and object-position.
... alt="login" width="200" height="100"> </div> </form> css div { margin-bottom: 10px; } label { display: inline-block; width: 70px; text-align: right; padding-right: 10px; } #image { object-position: right top; object-fit: contain; background-color: #ddd; } here, object-position is configured to draw the image at the top-right corner of the element, while object-fit is
set to contain, which indicates that the image should be drawn at the largest size that will fit within the element's box without altering its aspect ratio.
<noframes>: The Frame Fallback element - HTML: Hypertext Markup Language
a <noframes> element can contain any html elements that are allowed within the body of an html document, with the exception of the <frame
set> and <frame> elements, since using frames when they aren't supported doesn't make sense.
... in html 5 and later, <noframes> is obsolete and shouldn't be used, since the <frame> and <frame
set> elements are also obsolete.
... example in this example, we see a frame
set with two frames.
... <frame
set cols="50%,50%"> <frame src="https://developer.mozilla.org/en/html/element/frame
set" /> <frame src="https://developer.mozilla.org/en/html/element/frame" /> <noframes><p>it seems your browser does not support frames or is configured to not allow them.</p></noframes> </frame
set> specifications specification status comment html5the definition of 'noframes' in that specification.
<table>: The Table element - HTML: Hypertext Markup Language
set margin-left and margin-right to auto or margin to 0 auto to achieve an effect that is similar to the align attribute.
...if
set to 0, the frame attribute is
set to void.
... to achieve a similar effect, apply the border-collapse property to the <table> element, with its value
set to collapse, and the padding property to the <td> elements.
...border-spacing does not have any effect if border-collapse is
set to collapse.
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
values higher than 1000 will be considered as incorrect and will be
set to the default value (1).
...its default value is 1; if its value is
set to 0, it extends until the end of the table section (<thead>, <tbody>, <tfoot>, even if implicitly defined), that the cell belongs to.
... char (with text only): the content is aligned to a character inside the <th> element with minimal off
set.
...if align is not
set to char, this attribute is ignored.
<th> - HTML: Hypertext Markup Language
values higher than 1000 will be considered as incorrect and will be
set to the default value (1).
...its default value is 1; if its value is
set to 0, it extends until the end of the table section (<thead>, <tbody>, <tfoot>, even if implicitly defined), that the cell belongs to.
... char (with text only): the content is aligned to a character inside the <th> element with minimal off
set.
...if align is not
set to char, this attribute is ignored.
data-* - HTML: Hypertext Markup Language
all such custom data are available via the htmlelement interface of the element the attribute is
set on.
... the htmlelement.data
set property gives access to them.
... note that the htmlelement.data
set property is a domstringmap, and the name of the custom data attribute data-test-value will be accessible via htmlelement.data
set.testvalue (or by htmlelement.data
set["testvalue"]) as any dash (u+002d) is replaced by the capitalization of the next letter, converting the name to camelcase.
...for example, a space-ship "sprite" in a game could be a simple <img> element with a class attribute and several data-* attributes: <img class="spaceship cruiserx3" src="shipx3.png" data-ship-id="324" data-weapons="laseri laserii" data-shields="72%" data-x="414354" data-y="85160" data-z="31940" onclick="spaceships[this.data
set.shipid].blasted()"> for a more in-depth tutorial about using html data attributes, see using data attributes.
HTTP caching - HTTP
you might have seen "caching" in your browser's
settings already.
...for example, an isp or your company might have
set up a web proxy as part of its local network infrastructure to serve many users so that popular resources are reused a number of times, reducing network traffic and latency.
... the expiration time is computed as follows: expirationtime = respon
setime + freshnesslifetime - currentage where respon
setime is the time at which the response was received according to the browser.
...to optimize this, good practices recommend to
set expiration times as far in the future as possible.
Cross-Origin Resource Policy (CORP) - HTTP
cross-origin resource policy is a policy
set by the cross-origin-resource-policy http header that lets web sites and applications opt in to protection against certain requests from other origins (such as those issued with elements like <script> and <img>), to mitigate speculative side-channel attacks, like spectre, as well as cross-site script inclusion attacks.
... usage note: due to a bug in chrome,
setting cross-origin-resource-policy can break pdf rendering, preventing visitors from being able to read past the first page of some pdfs.
... web applications
set a cross-origin resource policy via the cross-origin-resource-policy http response header, which accepts one of three values: same-site only requests from the same site can read the resource.
... cross-origin-resource-policy: same-site | same-origin | cross-origin during a cross-origin resource policy check, if the header is
set, the browser will deny no-cors requests issued from a different origin/site.
CSP: object-src - HTTP
to
set allowed types for <object>, <embed>, and <applet> elements, use the plugin-types directive.
...explicitly
set object-src 'none' if possible).
... 'none' refers to the empty
set; that is, no urls match.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be
set for older browsers without nonce support.
CSP: plugin-types - HTTP
the http content-security-policy (csp) plugin-types directive restricts the
set of plugins that can be embedded into a document by limiting the types of resources which can be loaded.
...not
setting this allows anything.
... syntax one or more mime types can be
set for the plugin-types policy: content-security-policy: plugin-types <type>/<subtype>; content-security-policy: plugin-types <type>/<subtype> <type>/<subtype>; <type>/<subtype> a valid mime type.
... examples disallowing plugins to disallow all plugins, the object-src directive should be
set to 'none' which will disallow plugins.
CSP: script-src - HTTP
'none' refers to the empty
set; that is, no urls match.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be
set for older browsers without nonce support.
... content-security-policy: script-src 'unsafe-inline'; the above content security policy will allow inline <script> elements <script> var inline = 1; </script> you can use a nonce-source to only allow specific inline script blocks: content-security-policy: script-src 'nonce-2726c7f26c' you will have to
set the same nonce on the <script> element: <script nonce="2726c7f26c"> var inline = 1; </script> alternatively, you can create hashes from your inline scripts.
...if 'unsafe-eval' isn't specified with the script-src directive, the following methods are blocked and won't have any effect: eval() function() when passing a string literal like to methods like: window.
settimeout("alert(\"hello world!\");", 500); window.
settimeout window.
setinterval window.
setimmediate window.execscript (ie < 11 only) strict-dynamic the 'strict-dynamic' source expression specifies that the trust explicitly given to a script present in the markup, by accompanying it with a nonce or a hash, shall be propagated to all the scripts loaded by that root script.
CSP: style-src - HTTP
'none' refers to the empty
set; that is, no urls match.
...specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be
set for older browsers without nonce support.
...xt/css" /> <style> #inline-style { background: red; } </style> <style> @import url("https://not-example.com/styles/print.css") print; </style> as well as styles loaded using the link header: link: <https://not-example.com/styles/stylesheet.css>;rel=stylesheet inline style attributes are also blocked: <div style="display:none">foo</div> as well as styles that are applied in javascript by
setting the style attribute directly, or by
setting csstext: document.queryselector('div').
setattribute('style', 'display:none;'); document.queryselector('div').style.csstext = 'display:none;'; however, styles properties that are
set directly on the element's style property will not be blocked, allowing users to safely manipulate styles via javascript: document.queryselector('div').style.display =...
...y-policy: style-src 'unsafe-inline'; the above content security policy will allow inline styles like the <style> element, and the style attribute on any element: <style> #inline-style { background: red; } </style> <div style="display:none">foo</div> you can use a nonce-source to only allow specific inline style blocks: content-security-policy: style-src 'nonce-2726c7f26c' you will have to
set the same nonce on the <style> element: <style nonce="2726c7f26c"> #inline-style { background: red; } </style> alternatively, you can create hashes from your inline styles.
Content-Security-Policy - HTTP
therefore it is recommended to restrict this fetch-directive (e.g., explicitly
set object-src 'none' if possible).
... plugin-types restricts the
set of plugins that can be embedded into a document by limiting the types of resources which can be loaded.
... other directives block-all-mixed-content prevents loading any as
sets using http when the page is loaded using https.
...to specify a content security policy for the worker,
set a content-security-policy response header for the request which requested the worker script itself.
Content-Type - HTTP
browsers will do mime sniffing in some cases and will not necessarily follow the value of this header; to prevent this behavior, the header x-content-type-options can be
set to nosniff.
... syntax content-type: text/html; char
set=utf-8 content-type: multipart/form-data; boundary=something directives media-type the mime type of the resource or the data.
... char
set the character encoding standard.
... boundary for multipart entities the boundary directive is required, which consists of 1 to 70 characters from a
set of characters known to be very robust through email gateways, and not ending with white space.
Cross-Origin-Opener-Policy - HTTP
coop will process-isolate your document and potential attackers can't access to your global object if they were opening it in a popup, preventing a
set of cross-origin attacks dubbed xs-leaks.
... same-origin-allow-popups retains references to newly opened windows or tabs which either don't
set coop or which opt out of isolation by
setting a coop of unsafe-none.
... examples certain features depend on cross-origin isolation certain features like sharedarraybuffer objects or performance.now() with unthrottled timers are only available if your document has a coop header with the value same-origin value
set.
... cross-origin-opener-policy: same-origin cross-origin-embedder-policy: require-corp see also the cross-origin-embedder-policy header which you'll need to
set as well.
Keep-Alive - HTTP
the keep-alive general header allows the sender to hint about how the connection may be used to
set a timeout and a maximum amount of requests.
... the connection header needs to be
set to "keep-alive" for this header to have any meaning.
...note that timeouts longer than the tcp timeout may be ignored if no keep-alive tcp message is
set at the transport level.
... examples a response containing a keep-alive header: http/1.1 200 ok connection: keep-alive content-encoding: gzip content-type: text/html; char
set=utf-8 date: thu, 11 aug 2016 15:23:13 gmt keep-alive: timeout=5, max=1000 last-modified: mon, 25 jul 2016 04:32:39 gmt server: apache (body) specifications specification title http keep-alive header keep-alive header (ietf internet draft) rfc 7230, appendix a.1.2: keep-alive hypertext transfer protocol (http/1.1): message syntax and routing ...
A typical HTTP session - HTTP
for example, sending the result of a form: post /contact_form.php http/1.1 host: developer.mozilla.org content-length: 64 content-type: application/x-www-form-urlencoded name=joe%20user&request=send%20me%20one%20of%20your%20catalogue request methods http defines a
set of request methods indicating the desired action to be performed upon a resource.
... example responses successful web page response: http/1.1 200 ok content-type: text/html; char
set=utf-8 content-length: 55743 connection: keep-alive cache-control: s-maxage=300, public, max-age=0 content-language: en-us date: thu, 06 dec 2018 17:37:18 gmt etag: "2e77ad1dc6ab0b53a2996dfd4653c1c3" server: meinheld/0.6.1 strict-transport-security: max-age=63072000 x-content-type-options: nosniff x-frame-options: deny x-xss-protection: 1; mode=block vary: accept-encoding,cookie age: 7 <!doctype...
... html> <html lang="en"> <head> <meta char
set="utf-8"> <title>a simple webpage</title> </head> <body> <h1>simple html5 webpage</h1> <p>hello, world!</p> </body> </html> notification that the requested resource has permanently moved: http/1.1 301 moved permanently server: apache/2.4.37 (red hat) content-type: text/html; char
set=utf-8 date: thu, 06 dec 2018 17:33:08 gmt location: https://developer.mozilla.org/ (this is the new link to the resource; it is expected that the user-agent will fetch it) keep-alive: timeout=15, max=98 accept-ranges: bytes via: moz-cache-zlb05 connection: keep-alive content-length: 325 (the content contains a default page to display if the user-agent is not able to follow the link) <!doctype html...
... (contains a site-customized page helping the user to find the missing resource) notification that the requested resource doesn't exist: http/1.1 404 not found content-type: text/html; char
set=utf-8 content-length: 38217 connection: keep-alive cache-control: no-cache, no-store, must-revalidate, max-age=0 content-language: en-us date: thu, 06 dec 2018 17:35:13 gmt expires: thu, 06 dec 2018 17:35:13 gmt server: meinheld/0.6.1 strict-transport-security: max-age=63072000 x-content-type-options: nosniff x-frame-options: deny x-xss-protection: 1; mode=block vary: accept-encoding,cookie x-cache: error from cloudfront <!doctype html...
Control flow and error handling - JavaScript
« previousnext » javascript supports a compact
set of statements, specifically control flow statements, that you can use to incorporate a great deal of interactivity in your application.
... in older javascript, variables introduced within a block are scoped to the containing function or script, and the effects of
setting them persist beyond the block itself.
... conditional statements a conditional statement is a
set of commands that executes if a specified condition is true.
...if the value does not correspond to a month number (1–12), an exception is thrown with the value "invalidmonthno" and the statements in the catch block
set the monthname variable to 'unknown'.
Expressions and operators - JavaScript
if x is 3, then ++x
sets x to 4 and returns 4, whereas x++ returns 3 and, only then,
sets x to 4.
... if x is 3, then --x
sets x to 2 and returns 2, whereas x-- returns 3 and, only then,
sets x to 2.
... bitwise operators a bitwise operator treats their operands as a
set of 32 bits (zeros and ones), rather than as decimal, hexadecimal, or octal numbers.
... 15 | 9 15 1111 | 1001 = 1111 15 ^ 9 6 1111 ^ 1001 = 0110 ~15 -16 ~ 0000 0000 ... 0000 1111 = 1111 1111 ... 1111 0000 ~9 -10 ~ 0000 0000 ... 0000 1001 = 1111 1111 ... 1111 0110 note that all 32 bits are inverted using the bitwise not operator, and that values with the most significant (left-most) bit
set to 1 represent negative numbers (two's-complement representation).
Meta programming - JavaScript
handler.
setprototypeof() object.
setprototypeof() reflect.
setprototypeof() if target is not extensible, the prototype parameter must be the same value as object.getprototypeof(target).
... handler.
set() property assignment proxy[foo] = bar proxy.foo = bar inherited property assignment object.create(proxy)[foo] = bar {jsxref("reflect.
set()")}} cannot change the value of a property to be different from the value of the corresponding target property if the corresponding target property is a non-writable, non-configurable data property.
... cannot
set the value of a property if the corresponding target property is a non-configurable accessor property that has undefined as its [[
set]] attribute.
... in strict mode, a false return value from the
set handler will throw a typeerror exception.
Assertions - JavaScript
if the multiline flag is
set to true, also matches immediately after a line break character.
...if the multiline flag is
set to true, also matches immediately before a line break character.
... let fruitsstartswitha = fruits.filter(fruit => /^a/.test(fruit)); console.log(fruitsstartswitha); // [ 'apple', 'avocado' ] in the second example ^ is used both for matching at the beginning of input and for creating negated or complemented character
sets when used within groups.
...// in this example, two meanings of '^' control symbol are represented: // 1) matching begining of the input // 2) a negated or complemented character
set: [^a] // that is, it matches anything that is not enclosed in the brackets.
RangeError: invalid array length - JavaScript
the javascript exception "invalid array length" occurs when creating an array or an arraybuffer which has a length which is either negative or larger or equal to 232, or when
setting the array.length property to a value which is either negative or larger or equal to 232.
... an invalid array length might appear in these situations: when creating an array or an arraybuffer which has a length which is either negative or larger or equal to 232, or when
setting the array.length property to a value which is either negative or larger or equal to 232.
... otherwise, you might want to clamp the length before
setting the length property, or using it as argument of the constructor.
... examples invalid cases new array(math.pow(2, 40)) new array(-1) new arraybuffer(math.pow(2, 32)) new arraybuffer(-1) let a = []; a.length = a.length - 1; //
set -1 to the length property let b = new array(math.pow(2, 32) - 1); b.length = b.length + 1; //
set 2^32 to the length property valid cases [ math.pow(2, 40) ] // [ 1099511627776 ] [ -1 ] // [ -1 ] new arraybuffer(math.pow(2, 32) - 1) new arraybuffer(0) let a = []; a.length = math.max(0, a.length - 1); let b = new array(math.pow(2, 32) - 1); b.length = math.min(0xffffffff, b.length + 1); // 0xffffffff is the hexadecimal notation for 2^32 - 1 // which can also be written as (-1 >>> 0) ...
Functions - JavaScript
defining method functions getter and
setter functions you can define getters (accessor methods) and
setters (mutator methods) on any standard built-in object or user-defined object that supports the addition of new properties.
... the syntax for defining getters and
setters uses the object literal syntax.
...
set binds an object property to a function to be called when there is an attempt to
set that property.
... method definition syntax starting with ecmascript 2015, you are able to define own methods in a shorter syntax, similar to the getters and
setters.
Array - JavaScript
setting or accessing via non-integers using bracket notation (or dot notation) will not
set or retrieve an element from the array list itself, but will
set or access a variable associated with that array's object property collection.
... let years = [1950, 1960, 1970, 1980, 1990, 2000, 2010] console.log(years.0) // a syntax error console.log(years[0]) // works properly renderer.3d.
settexture(model, 'character.png') // a syntax error renderer['3d'].
settexture(model, 'character.png') // works properly in the 3d example, '3d' had to be quoted (because it begins with a digit).
... const fruits = [] fruits.push('banana', 'apple', 'peach') console.log(fruits.length) // 3 when
setting a property on a javascript array when the property is a valid array index and that index is outside the current bounds of the array, the engine will update the array's length property accordingly: fruits[5] = 'mango' console.log(fruits[5]) // 'mango' console.log(object.keys(fruits)) // ['0', '1', '2', '5'] console.log(fruits.length) // 6 increasing the length.
... king's pawn forward 2 board[4][4] = board[6][4] board[6][4] = ' ' console.log(board.join('\n')) here is the output: r,n,b,q,k,b,n,r p,p,p,p,p,p,p,p , , , , , , , , , , , , , , , , , , , , , , , , , , , , p,p,p,p,p,p,p,p r,n,b,q,k,b,n,r r,n,b,q,k,b,n,r p,p,p,p,p,p,p,p , , , , , , , , , , , , , , , , , ,p, , , , , , , , , , p,p,p,p, ,p,p,p r,n,b,q,k,b,n,r using an array to tabulate a
set of values values = [] for (let x = 0; x < 10; x++){ values.push([ 2 ** x, 2 * x ** 2 ]) } console.table(values) results in // the first column is the index 0 1 0 1 2 2 2 4 8 3 8 18 4 16 32 5 32 50 6 64 72 7 128 98 8 256 128 9 512 162 specifications specification initial publication ecmascript (ecma-262)the definition of 'array' in that specification.
DataView.prototype.getBigInt64() - JavaScript
the getbigint64() method gets a signed 64-bit integer (long long) at the specified byte off
set from the start of the dataview.
... syntax dataview.getbigint64(byteoff
set [, littleendian]) parameters byteoff
set the off
set, in bytes, from the start of the view to read the data from.
... errors thrown rangeerror thrown if the byteoff
set is
set such that it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any off
set.
DataView.prototype.getBigUint64() - JavaScript
the getbiguint64() method gets an unsigned 64-bit integer (unsigned long long) at the specified byte off
set from the start of the dataview.
... syntax dataview.getbiguint64(byteoff
set [, littleendian]) parameters byteoff
set the off
set, in bytes, from the start of the view to read the data from.
... errors thrown rangeerror thrown if the byteoff
set is
set such that it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any off
set.
DataView.prototype.getFloat32() - JavaScript
the getfloat32() method gets a signed 32-bit float (float) at the specified byte off
set from the start of the dataview.
... syntax dataview.getfloat32(byteoff
set [, littleendian]) parameters byteoff
set the off
set, in byte, from the start of the view where to read the data.
... errors thrown rangeerror thrown if the byteoff
set is
set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any off
set.
DataView.prototype.getFloat64() - JavaScript
the getfloat64() method gets a signed 64-bit float (double) at the specified byte off
set from the start of the dataview.
... syntax dataview.getfloat64(byteoff
set [, littleendian]) parameters byteoff
set the off
set, in byte, from the start of the view where to read the data.
... errors thrown rangeerror thrown if the byteoff
set is
set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any off
set.
DataView.prototype.getInt16() - JavaScript
the getint16() method gets a signed 16-bit integer (short) at the specified byte off
set from the start of the dataview.
... syntax dataview.getint16(byteoff
set [, littleendian]) parameters byteoff
set the off
set, in byte, from the start of the view where to read the data.
... errors thrown rangeerror thrown if the byteoff
set is
set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any off
set.
DataView.prototype.getInt32() - JavaScript
the getint32() method gets a signed 32-bit integer (long) at the specified byte off
set from the start of the dataview.
... syntax dataview.getint32(byteoff
set [, littleendian]) parameters byteoff
set the off
set, in bytes, from the start of the view where to read the data.
... errors thrown rangeerror thrown if the byteoff
set is
set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any off
set.
DataView.prototype.getInt8() - JavaScript
the getint8() method gets a signed 8-bit integer (byte) at the specified byte off
set from the start of the dataview.
... syntax dataview.getint8(byteoff
set) parameters byteoff
set the off
set, in byte, from the start of the view where to read the data.
... errors thrown rangeerror thrown if the byteoff
set is
set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any off
set.
DataView.prototype.getUint16() - JavaScript
the getuint16() method gets an unsigned 16-bit integer (unsigned short) at the specified byte off
set from the start of the dataview.
... syntax dataview.getuint16(byteoff
set [, littleendian]) parameters byteoff
set the off
set, in byte, from the start of the view where to read the data.
... errors thrown rangeerror thrown if the byteoff
set is
set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any off
set.
DataView.prototype.getUint32() - JavaScript
the getuint32() method gets an unsigned 32-bit integer (unsigned long) at the specified byte off
set from the start of the dataview.
... syntax dataview.getuint32(byteoff
set [, littleendian]) parameters byteoff
set the off
set, in byte, from the start of the view where to read the data.
... errors thrown rangeerror thrown if the byteoff
set is
set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any off
set.
DataView.prototype.getUint8() - JavaScript
the getuint8() method gets an unsigned 8-bit integer (unsigned byte) at the specified byte off
set from the start of the dataview.
... syntax dataview.getuint8(byteoff
set) parameters byteoff
set the off
set, in byte, from the start of the view where to read the data.
... errors thrown rangeerror thrown if the byteoff
set is
set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any off
set.
Intl.Collator() constructor - JavaScript
this option can be
set through an options property or through a unicode extension key; if both are provided, the options property takes precedence.
...this option can be
set through an options property or through a unicode extension key; if both are provided, the options property takes precedence.
...this option can be
set through an options property or through a unicode extension key; if both are provided, the options property takes precedence.
...this option can be
set through an options property or through a unicode extension key; if both are provided, the options property takes precedence.
Intl.Locale.prototype.numberingSystem - JavaScript
ts taml tamil numerals — algorithmic tamldec modern tamil decimal digits telu telugu digits thai thai digits tirh tirhuta digits tibt tibetan digits traditio traditional numerals — may be algorithmic vaii vai digits wara warang citi digits wcho wancho digits examples
setting the numberingsystem value via the locale string in the unicode locale string spec, the values that numberingsystem represents correspond to the key nu.
...to
set the numberingsystem value via the string argument to the locale constructor, first add the -u extension key.
... let numberingsystemviastr = new intl.locale("fr-latn-fr-u-nu-mong"); console.log(numberingsystemstr.numberingsystem); // prints "mong"
setting the numberingsystem value via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can be used to pass extension types.
...
set the numberingsystem property of the configuration object to your desired numberingsystem value and pass it into the constructor.
JSON.stringify() - JavaScript
all the other object instances (including map,
set, weakmap, and weak
set) will have only their enumerable properties serialized.
...), new boolean(false)]); // '[3,"false",false]' // string-keyed array elements are not enumerable and make no sense in json let a = ['foo', 'bar']; a['baz'] = 'quux'; // a: [ 0: 'foo', 1: 'bar', baz: 'quux' ] json.stringify(a); // '["foo","bar"]' json.stringify({ x: [10, undefined, function(){}, symbol('')] }); // '{"x":[10,null,null,null]}' // standard data structures json.stringify([new
set([1]), new map([[1, 2]]), new weak
set([{a: 1}]), new weakmap([[{a: 1}, 2]])]); // '[{},{},{},{}]' // typedarray json.stringify([new int8array([1]), new int16array([1]), new int32array([1])]); // '[{"0":1},{"0":1},{"0":1}]' json.stringify([new uint8array([1]), new uint8clampedarray([1]), new uint16array([1]), new uint32array([1])]); // '[{"0":1},{"0":1},{"0":1},{"0":1}]' json.stringify([new float3...
... issue with plain json.stringify for use as javascript historically, json was not a completely strict sub
set of javascript.
...sh({ 'name': 'screenc', 'width': 750, 'height': 120 }); session.screens.push({ 'name': 'screend', 'width': 250, 'height': 60 }); session.screens.push({ 'name': 'screene', 'width': 390, 'height': 120 }); session.screens.push({ 'name': 'screenf', 'width': 1240, 'height': 650 }); // converting the json string with json.stringify() // then saving with localstorage in the name of session localstorage.
setitem('session', json.stringify(session)); // example of how to transform the string generated through // json.stringify() and saved in localstorage in json object again var restoredsession = json.parse(localstorage.getitem('session')); // now restoredsession variable contains the object that was saved // in localstorage console.log(restoredsession); well-formed json.stringify() engines implem...
Object.defineProperties() - JavaScript
set a function which serves as a
setter for the property, or undefined if there is no
setter.
... if a descriptor has neither of value, writable, get and
set keys, it is treated as a data descriptor.
... if a descriptor has both value or writable and get or
set keys, an exception is thrown.
...igurable')) d.configurable = !!desc.configurable; if (hasproperty(desc, 'value')) d.value = desc.value; if (hasproperty(desc, 'writable')) d.writable = !!desc.writable; if (hasproperty(desc, 'get')) { var g = desc.get; if (!iscallable(g) && typeof g !== 'undefined') throw new typeerror('bad get'); d.get = g; } if (hasproperty(desc, '
set')) { var s = desc.
set; if (!iscallable(s) && typeof s !== 'undefined') throw new typeerror('bad
set'); d.
set = s; } if (('get' in d || '
set' in d) && ('value' in d || 'writable' in d)) throw new typeerror('identity-confused descriptor'); return d; } if (typeof obj !== 'object' || obj === null) throw new typeerror('bad obj'); properties = o...
Object.getOwnPropertyDescriptors() - JavaScript
set a function which serves as a
setter for the property, or undefined if there is no
setter (accessor descriptors only).
...e whereas the object.assign() method will only copy enumerable and own properties from a source object to a target object, you are able to use this method and object.create() for a shallow copy between two unknown objects: object.create( object.getprototypeof(obj), object.getownpropertydescriptors(obj) ); creating a subclass a typical way of creating a subclass is to define the subclass,
set its prototype to an instance of the superclass, and then define properties on that instance.
... this can get awkward especially for getters and
setters.
... instead, you can use this code to
set the prototype: function superclass() {} superclass.prototype = { // define your methods and properties here }; function subclass() {} subclass.prototype = object.create( superclass.prototype, { // define your methods and properties here } ); specifications specification ecmascript (ecma-262)the definition of 'object.getownpropertydescriptors' in that specification.
Promise.prototype.finally() - JavaScript
when the promise is
settled, i.e either fulfilled or rejected, the specified callback function is executed.
... syntax p.finally(onfinally); p.finally(function() { //
settled (fulfilled or rejected) }); parameters onfinally a function called when the promise is
settled.
... return value returns a promise whose finally handler is
set to the specified function, onfinally.
... description the finally() method can be useful if you want to do some processing or cleanup once the promise is
settled, regardless of its outcome.
RegExpInstance.lastIndex - JavaScript
property attributes of regexpinstance.lastindex writable yes enumerable no configurable no description this property is
set only if the regular expression instance used the g flag to indicate a global search, or the y flag to indicate a sticky search.
... the following rules apply: if lastindex is greater than the length of the string, test() and exec() fail, then lastindex is
set to 0.
... if lastindex is equal to the length of the string and if the regular expression does not match the empty string, then the regular expression mismatches input, and lastindex is re
set to 0.
... otherwise, lastindex is
set to the next position following the most recent match.
RegExp.prototype.test() - JavaScript
r); console.log(result); // true the following example logs a message which depends on the success of the test: function testinput(re, str) { let midstring; if (re.test(str)) { midstring = 'contains'; } else { midstring = 'does not contain'; } console.log(`${str} ${midstring} ${re.source}`); } using test() on a regex with the "global" flag when a regex has the global flag
set, test() will advance the lastindex of the regex.
... note: as long as test() returns true, lastindex will not re
set—even when testing a different string!
... when test() returns false, the calling regex's lastindex property will re
set to 0.
... the following example demonstrates this behaviour: const regex = /foo/g; // the "global" flag is
set // regex.lastindex is at 0 regex.test('foo') // true // regex.lastindex is now at 3 regex.test('foo') // false // regex.lastindex is at 0 regex.test('barfoo') // true // regex.lastindex is at 6 regex.test('foobar') //false // regex.lastindex is at 0 // (...and so on) specifications specification ecmascript (ecma-262)the definition of 'regexp.test' in that specification.
Symbol.asyncIterator - JavaScript
if this property is
set on an object, it is an async iterable and can be used in a for await...of loop.
... property attributes of symbol.asynciterator writable no enumerable no configurable no examples user-defined async iterables you can define your own async iterable by
setting the [symbol.asynciterator] property on an object.
... built-in async iterables there are currently no built-in javascript objects that have the [symbol.asynciterator] key
set by default.
... however, whatwg streams are
set to be the first built-in object to be async iterable, with [symbol.asynciterator] recently landing in the spec.
Symbol.unscopables - JavaScript
setting a property to true in an unscopables object will make it unscopable and therefore it won't appear in lexical scope variables.
...
setting a property to false will make it scopable and thus it will appear in lexical scope variables.
...a built-in unscopables
setting is implemented as array.prototype[@@unscopables] to prevent that some of the array methods are being scoped into the with statement.
... var keys = []; with (array.prototype) { keys.push('something'); } object.keys(array.prototype[symbol.unscopables]); // ["copywithin", "entries", "fill", "find", "findindex", // "includes", "keys", "values"] unscopables in objects you can also
set unscopables for your own objects.
TypedArray.prototype.subarray() - JavaScript
the begin off
set is inclusive and the end off
set is exclusive.
...the off
set is inclusive.
...the off
set is exclusive.
... examples using the subarray method var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.
set([1,2,3]); console.log(uint8); // uint8array [ 1, 2, 3, 0, 0, 0, 0, 0 ] var sub = uint8.subarray(0,4); console.log(sub); // uint8array [ 1, 2, 3, 0 ] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.subarray' in that specification.
Uint8ClampedArray() constructor - JavaScript
the uint8clampedarray() constructor creates a typed array of 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the range of [0,255], 0 or 255 will be
set instead; if you specify a non-integer, the nearest integer will be
set.
... syntax new uint8clampedarray(); // new in es2017 new uint8clampedarray(length); new uint8clampedarray(typedarray); new uint8clampedarray(object); new uint8clampedarray(buffer [, byteoff
set [, 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.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
... the byteoff
set and length parameters specify the memory range that will be exposed by the typed array view.
JavaScript typed arrays - JavaScript
a view provides a context — that is, a data type, starting off
set, and the number of elements — that turns the data into a typed array.
... number (16 significant digits e.g., 1.123...15) unrestricted double double bigint64array -263 to 263-1 8 64-bit two's complement signed integer bigint int64_t (signed long long) biguint64array 0 to 264-1 8 64-bit unsigned integer bigint uint64_t (unsigned long long) dataview the dataview is a low-level interface that provides a getter/
setter api to read and write arbitrary data to the buffer.
...it is big-endian by default and can be
set to little-endian in the getter/
setter methods.
... working with complex data structures by combining a single buffer with multiple views of different types, starting at different off
sets into the buffer, you can interact with data objects containing multiple data types.
The "codecs" parameter in common media types - Web media technologies
avc1.oo[.ppccll] (avc video) oo is the oti describing the contents, while ppccll is six hexadecimal digits specifying the profile number (pp), constraint
set flags (cc), and level (ll).
... the constraint
set flags byte is comprised of one-bit boolean flags, with the most significant bit being referred to as flag 0 (or constraint_
set0_flag, in some resources), and each successive bit being numbered one higher.
... 56 00 scalable constrained high profile a sub
set of the scalable high profile designed mainly for real-time communticions.
...this value indicates which
set of coefficients to use when mapping from the native red, blue, and green primaries to the luma and chroma signals.
Graphic design for responsive sites - Progressive web apps (PWAs)
serving images selectively via css in general, you will use mostly the same graphical as
sets for different layouts in a responsive design, but you may well include slightly different ones dependant on context.
...css3 drop shadows and gradients), you may want to simplify or remove certain as
sets for the site's mobile layout, or even provide smaller as
sets to suit the smaller screen better.
...so when the page is loaded on a mobile device, the mobile will only download the mobile as
sets, and not the desktop resource as
sets.
... high res and low res image copies one option here is to create a hi res and a low res
set of images, then use resolution media queries to serve the hi res images only to hi res devices.
Progressive web apps (PWAs)
pwa can be thought of as similar to ajax or other similar patterns that encompass a
set of application attributes, including use of specific web technologies and techniques.
... this
set of docs tells you all you need to know about them.
... service workers a service worker is a script that allows intercepting and control of how a web browser handles its network requests and as
set caching.
... progressive web apps: everything you need to know collection of resources, codelabs and tools you need to build pwas by the team at pwafire.org
setting up your progressive web app development environment ...
d - SVG: Scalable Vector Graphics
moveto path commands moveto instructions can be thought of as picking up the drawing instrument, and
setting it down somewhere else—in other words, moving the current point (po; {xo, yo}).
...all subsequent
sets of parameters are considered implicit absolute arc curve (a) commands.
...all subsequent
sets of parameters are considered implicit relative arc curve (a) commands.
... note: the appearance of a shape closed with closepath may be different to that of one closed by drawing a line to the origin, using one of the other commands, because the line ends are joined together (according to the stroke-linejoin
setting), rather than just being placed at the same coordinates.
g1 - SVG: Scalable Vector Graphics
the g1 attribute specifies a list of glyph names which identify a
set of possible first glyphs in the kerning pair.
... all glyphs with the given glyph name are included in the
set.
... the total
set of possible first glyphs in the kerning pair is the union of glyphs specified by the u1 and g1 attributes.
... two elements are using this attribute: <hkern> and <vkern> context notes value <name># default value none animatable no <name># this value indicates a comma-separated sequence of glyph names (i.e., values that match glyph-name attributes on <glyph> elements) which identify a
set of possible first glyphs in the kerning pair.
g2 - SVG: Scalable Vector Graphics
the g2 attribute specifies a list of glyph names which identify a
set of possible second glyphs in the kerning pair.
... all glyphs with the given glyph name are included in the
set.
... the total
set of possible second glyphs in the kerning pair is the union of glyphs specified by the u2 and g2 attributes.
... two elements are using this attribute: <hkern> and <vkern> context notes value <name># default value none animatable no <name># this value indicates a comma-separated sequence of glyph names (i.e., values that match glyph-name attributes on <glyph> elements) which identify a
set of possible second glyphs in the kerning pair.
glyph-orientation-vertical - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following five elements: <altglyph>, <textpath>, <text>, <tref>, and <tspan> context notes value auto | <angle> default value auto animatable no auto fullwidth ideographic and fullwidth latin text will be
set with a glyph orientation of 0 degrees.
...text which is not fullwidth will be
set with a glyph orientation of 90 degrees.
... note: text
set in this "rotated" manner may contain ligatures or other glyph combining and reordering common to the language and script.
... a value of 0deg indicates that all glyphs are
set with the top of the glyphs oriented towards the reference orientation.
keySplines - SVG: Scalable Vector Graphics
the keysplines attribute defines a
set of bézier curve control points associated with the keytimes list, defining a cubic bézier function that controls interval pacing.
... this attribute is ignored unless the calcmode attribute is
set to spline.
... <control-point> each control point description is a
set of four values: x1 y1 x2 y2, describing the bézier control points for one time segment.
...thus, there must be one fewer
sets of control points than there are keytimes.
keyTimes - SVG: Scalable Vector Graphics
each time value in the keytimes list is specified as a floating point value between 0 and 1 (inclusive), representing a proportional off
set into the duration of the animation element.
...the key time associated with each value defines when the value is
set; values are interpolated between the key times.
...the time associated with each value defines when the value is
set; the animation function uses that value until the next time defined in the list.
... if the calcmode attribute is
set to paced, the keytimes attribute is ignored.
u1 - SVG: Scalable Vector Graphics
the u1 attribute specifies list of unicode characters (refer to the description of the unicode attribute of the <glyph> element for a description of how to express individual unicode characters) and/or ranges of unicode characters, which identify a
set of possible first glyphs in a kerning pair.
... if a given unicode character within the
set has multiple corresponding <glyph> elements (i.e., there are multiple <glyph> elements with the same unicode attribute value but different glyph-name values), then all such glyphs are included in the
set.
...the total
set of possible first glyphs in the kerning pair is the union of glyphs specified by the u1 and g1 attributes.
... two elements are using this attribute: <hkern> and <vkern> context notes value [ <character> | <urange> ]# default value none animatable no [ <character> | <urange> ]# this value indicates a comma-separated sequence of unicode characters and/or ranges of unicode characters, which identify a
set of possible first glyphs in a kerning pair.
u2 - SVG: Scalable Vector Graphics
the u2 attribute specifies list of unicode characters (refer to the description of the unicode attribute of the <glyph> element for a description of how to express individual unicode characters) and/or ranges of unicode characters, which identify a
set of possible second glyphs in a kerning pair.
... if a given unicode character within the
set has multiple corresponding <glyph> elements (i.e., there are multiple <glyph> elements with the same unicode attribute value but different glyph-name values), then all such glyphs are included in the
set.
...the total
set of possible second glyphs in the kerning pair is the union of glyphs specified by the u2 and g2 attributes.
... two elements are using this attribute: <hkern> and <vkern> context notes value [ <character> | <urange> ]# default value none animatable no [ <character> | <urange> ]# this value indicates a comma-separated sequence of unicode characters and/or ranges of unicode characters, which identify a
set of possible second glyphs in a kerning pair.
xlink:href - SVG: Scalable Vector Graphics
22 elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <color-profile>, <cursor>, <feimage>, <filter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <
set>, <textpath>, <tref>, and <use>} html, body, svg { height: 100%; } <svg viewbox="0 0 160 40" xmlns="http://www.w3.org/2000/svg"> <a xlink:href="https://developer.mozilla.org/"><text x="10" y="25">mdn web docs</text></a> </svg> a for <a>, xlink:href defines the location of the referenced object.
... if the reference is to an <altglyphdef> element, then if an appropriate
set of alternate glyphs is located from processing the <altglyphdef> element, then those alternate glyphs are rendered instead of the characters that are inside of the <altglyph> element.
... value <iri> default value none animatable no animate, animatecolor, animatemotion, animatetransform,
set for <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <
set>, xlink:href defines the reference to the element which is the target of this animation and which therefore will be modified over time.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'href for <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <
set>' in that specification.
SVG Attribute reference - SVG: Scalable Vector Graphics
in in2 intercept k k k1 k2 k3 k4 kernelmatrix kernelunitlength kerning keypoints keysplines keytimes l lang lengthadjust letter-spacing lighting-color limitingconeangle local m marker-end marker-mid marker-start markerheight markerunits markerwidth mask maskcontentunits maskunits mathematical max media method min mode n name numoctaves o off
set opacity operator order orient orientation origin overflow overline-position overline-thickness p panose-1 paint-order path pathlength patterncontentunits patterntransform patternunits ping pointer-events points pointsatx pointsaty pointsatz preservealpha preserveaspectratio primitiveunits r r radius referrerpolicy refx refy rel rendering-intent repeatcount...
... repeatdur requiredextensions requiredfeatures restart result rotate rx ry s scale seed shape-rendering slope spacing specularconstant specularexponent speed spreadmethod startoff
set stddeviation stemh stemv stitchtiles stop-color stop-opacity strikethrough-position strikethrough-thickness string stroke stroke-dasharray stroke-dashoff
set stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width style surfacescale systemlanguage t tabindex tablevalues target targetx targety text-anchor text-decoration text-rendering textlength to transform transform-origin type u u1 u2 underline-position underline-thickness unicode unicode-bidi unicode-range units-per-em v v-alphabetic v-hanging v-ideographic v-ma...
...lood-color, flood-opacity, font-family, font-size, font-size-adjust, font-stretch, font-style, font-variant, font-weight, glyph-orientation-horizontal, glyph-orientation-vertical, image-rendering, kerning, letter-spacing, lighting-color, marker-end, marker-mid, marker-start, mask, opacity, overflow, pointer-events, shape-rendering, stop-color, stop-opacity, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, text-decoration, text-rendering, transform, transform-origin, unicode-bidi, vector-effect, visibility, word-spacing, writing-mode filters attributes filter primitive attributes height, result, width, x, y transfer function attributes type, tablevalues, slope, intercept, amplitude, exponent, off
set...
...gend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onre
set, onresize, onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting graphical event attributes onactivate, onfocusin, onfocusout ...
<feComposite> - SVG: Scalable Vector Graphics
ng the following formula: result = k1*i1*i2 + k2*i1 + k3*i2 + k4 where: i1 and i2 indicate the corresponding pixel channel values of the input image, which map to in and in2 respectively k1, k2, k3 and k4 indicate the values of the attributes with the same name usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <
set> attributes global attributes core attributes » presentation attributes » filter primitive attributes » class style specific attributes in in2 operator k1 k2 k3 k4 dom interface this element implements the svgfecompositeelement interface.
...sion="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>example fecomposite - examples of fecomposite operations</title> <desc>four rows of six pairs of overlapping triangles depicting the six different fecomposite operators under different opacity values and different clearing of the background.</desc> <defs> <desc>define two
sets of six filters for each of the six compositing operators.
... the first
set wipes out the background image by flooding with opaque white.
... the second
set does not wipe out the background, with the result that the background sometimes shines through and is other cases is blended into itself (i.e., "double-counting").</desc> <filter id="overflood" filterunits="objectboundingbox" x="-5%" y="-5%" width="110%" height="110%"> <feflood flood-color="#ffffff" flood-opacity="1" result="flood"/> <fecomposite in="sourcegraphic" in2="backgroundimage" operator="over" result="comp"/> <femerge> <femergenode in="flood"/> <femergenode in="comp"/> </femerge> </filter> <filter id="inflood" filterunits="objectboundingbox" x="-5%" y="-5%" width="110%" height="110%"> <feflood flood-color="#ffffff" flood-opacity="1" result="flood"/> <fecomposite in="sourcegraphic" in2="backgroundi...
<metadata> - SVG: Scalable Vector Graphics
used by hub symbol --> <symbol id="hubplug"> <desc>a 10ba
set/100ba
setx socket</desc> <path d="m0,10 h5 v-9 h12 v9 h5 v16 h-22 z"/> </symbol> <!-- hub symbol --> <symbol id="hub"> <desc>a typical 10ba
set/100ba
setx network hub</desc> <text x="0" y="15">hub</text> <g transform="translate(0 20)"> <rect width="253" height="84"/> <rect width="229" height="44" x="12" y="10"/> <circle fill="red" cx="227"...
...--> <g id="cablea" transform="translate(107 88)"> <title>cable a</title> <desc>10ba
set twisted pair cable</desc> <path d="m0,0c100,140 50,140 -8,160"/> </g> <!-- draw cable b.
... --> <g id="cableb" transform="translate(142 88)"> <title>cable b</title> <desc>10ba
set twisted pair cable</desc> <path d="m0,0c100,180 110,160 159,160"/> </g> <!-- draw cable n.
... --> <g id="cablen" transform="translate(242 88)"> <title>cable n</title> <desc>10ba
set twisted pair cable</desc> <path d="m0,0c0,-70 20,-50 60,-50"/> </g> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of '<metadata>' in that specification.
<text> - SVG: Scalable Vector Graphics
this is different than being hidden by default, as
setting the display property won't show the text.
... html,body,svg { height:100% } <svg viewbox="0 0 240 80" xmlns="http://www.w3.org/2000/svg"> <style> .small { font: italic 13px sans-serif; } .heavy { font: bold 30px sans-serif; } /* note that the color of the text is
set with the * * fill property, the color property is for html only */ .rrrrr { font: italic 40px serif; fill: red; } </style> <text x="20" y="35" class="small">my</text> <text x="40" y="35" class="heavy">cat</text> <text x="55" y="55" class="small">is</text> <text x="65" y="55" class="rrrrr">grumpy!</text> </svg> attributes x the x coordinate of the starting point of the text baseline.
...tributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expande...
...d, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, text content elementpermitted contentcharacter data and any number of the following elements, in any order:animation elementsdescriptive elementstext content elements<a> specifications specification status comment scalable vector graphics (svg)...
<textPath> - SVG: Scalable Vector Graphics
if the path attribute is
set, href has no effect.
... value type: auto|exact ; default value: exact; animatable: yes startoff
set how far the beginning of the text should be off
set from the beginning of the path.
...ional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:title usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <
set>, <tref>, <tspan> specifications specification status ...
Namespaces crash course - SVG: Scalable Vector Graphics
however, instead of
setting the default namespace, this namespace declaration
sets the namespace for something called a "namespace prefix".
...ributens createelement createelementns getattributenode getattributenodens getattribute getattributens getelementsbytagname getelementsbytagnamens (also added to element) getnameditem getnameditemns hasattribute hasattributens removeattribute removeattributens removenameditem removenameditemns
setattribute
setattributens
setattributenode
setattributenodens
setnameditem
setnameditemns the first parameter for all the dom2 namespace aware methods must be the namespace name (also known as the namespace uri) of the element or parameter in question.
...hence to get the value of the xlink:href parameter of an <a> element in svg you would write: elt.getattributens('http://www.w3.org/1999/xlink', 'href'); for
setting parameters that have a namespace, it is recommended (but not required) that you also include their prefix in the second parameter so that the dom can later be more easily converted back to xml (if for instance you want to send it back to the server).
... for example: elt.
setattributens('http://www.w3.org/1999/xlink', 'xlink:href', 'otherdoc.svg'); as a final example, here's a demonstration of how you should dynamically create an <image> element using script: var svg_ns = 'http://www.w3.org/2000/svg'; var xlink_ns = 'http://www.w3.org/1999/xlink'; var image = document.createelementns(svg_ns, 'image'); image.
setattributens(null, 'width', '100'); image.
setattributens(null, 'height', '100'); image.
setattributens(xlink_ns, 'xlink:href', 'flower.png'); conclusion make sure you always declare the namespaces you use in your xml files.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
nknown svgviewspec removed implementation status unknown svgelement.style removed implementation status unknown svggraphicselement.gettransformtoelement() removed not removed yet svggraphicselement.getctm() on the outermost element implementation status unknown animval attribute alias of baseval implementation status unknown data
set attribute for svgelement implementation status unknown moved pathlength attribute and gettotallength() and getpointatlength() methods from svgpathelement to svggeometryelement implemented (bug 1239100) document structure change notes svgsvgelement.suspendredraw(), svgsvgelement.unsuspendredraw(), and svgsvgelement.unsuspendredrawall() deprecated ...
...mplementation status unknown kerning property removed implementation status unknown path attribute for <textpath> implemented (bug 1446617) reference basic shapes to <textpath> implementation status unknown side attribute for <textpath> implemented (bug 1446650) render characters for one loop of a single closed path, effected by the startoff
set attribute and text-anchor property implementation status unknown <tref> removed implementation status unknown <altglyph>, <altglyphdef>, <altglyphitem> and <glyphref> removed <altglyph>, <altglyphdef> and <altglyphitem> removed (bug 1260032), <glyphref> never really implemented (bug 1302693) svgtextcontentelement.selectsubstring() deprecated implementation s...
...tatus unknown getcomputedtextlength() not including dx and dy values implementation status unknown text in non-rendered elements not included in addressable characters implementation status unknown unknown elements in text render as unpositioned spans implementation status unknown off
set distances of text positioned along a transformed path measured in text elements coordinate system implementation status unknown embedded content change notes <video> implementation status unknown <audio> implementation status unknown <iframe> implementation status unknown <canvas> implementation status unknown <source> implementation status unknown <track> implementat...
... 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 re
set 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) scripting change notes contentscrip...
How to turn off form autocompletion - Web security
disabling autocompletion to disable autocompletion in forms, you can
set the autocomplete attribute to "off": autocomplete="off" you can do this either for an entire form, or for specific input elements in a form: <form method="post" action="/form" autocomplete="off"> […] </form> <form method="post" action="/form"> […] <div> <label for="cc">credit card:</label> <input type="text" id="cc" name="cc" autocomplete="off"> </div> </form>
setting autoc...
... if a browser keeps on making suggestions even after
setting autocomplete to off, then you have to change the name attribute of the input element.
... for this reason, many modern browsers do not support autocomplete="off" for login fields: if a site
sets autocomplete="off" for a <form>, and the form includes username and password input fields, then the browser still offers to remember this login, and if the user agrees, the browser will autofill those fields the next time the user visits the page.
... if a site
sets autocomplete="off" for username and password <input> fields, then the browser still offers to remember this login, and if the user agrees, the browser will autofill those fields the next time the user visits the page.
Tutorials
you'll
set up the tools you need to construct a simple webpage and publish your own simple code.
... html tutorials introductory level introduction to html this module
sets the stage, getting you used to important concepts and syntax, looking at applying html to text, how to create hyperlinks, and how to use html to structure a webpage.
... styling text here we look at text styling fundamentals, including
setting font, boldness, and italics, line and letter spacing, and drop shadows and other text features.
...we have covered the necessary prerequisites so can now dive deep into css layout, looking at different display
settings, traditional layout methods involving float and positioning, and new fangled layout tools like flexbox.
An Overview - XSLT: Extensible Stylesheet Language Transformations
instead they are simply a way of specifying a unique identifier for a known
set of elements.
... the string "http://www.w3.org/1999/xsl/transform" is a constant that designates the elements so marked as belonging to the
set of tags designated by the w3c in the 1999 xslt recommendation.
... in essence, an xslt stylesheet is a
set of rules, called templates, which declare that any node that matches this specific pattern should be manipulated in this specific way and end up in this specific position in the result tree.
... potential conflicts in template matching are resolved by using a
set of cascading precedence rules.
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
if you want to override this, you can
set the output method normally in the standard way.
...
setting parameters you can control parameters for the stylesheet using the xsltprocessor.
setparameter(), xsltprocessor.getparameter(), and xsltprocessor.removeparameter() methods.
... these all take a namespace uri and a local name as the first two parameters, with xsltprocessor.
setparameter() taking a third - the value of the parameter to be
set.
... re
setting the xsltprocessor object also implements a xsltprocessor.re
set() method, which can be used to remove all stylesheets and parameters then put the processor back into its initial state.
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
the javascript loads the .xsl file only on the first sort and
sets the xslloaded variable to true once it has finished loading the file.
...the sorting value is
set using xsltprocessor.
setparameter().
... the xslt file has a parameter called myorder that javascript
sets to change the sorting method.
... // importnode is used to clone the nodes we want to process via xslt - true makes it do a deep clone var mynode = document.getelementbyid("example"); var clonednode = xmlref.importnode(mynode, true); // after cloning, we append xmlref.appendchild(clonednode); //
set the sorting parameter in the xsl file var sortval = xsltprocessor.getparameter(null, "myorder"); if (sortval == "" || sortval == "descending") xsltprocessor.
setparameter(null, "myorder", "ascending"); else xsltprocessor.
setparameter(null, "myorder", "descending"); // initiate the transformation var fragment = xsltprocessor.transformtofragment(xmlref, document); // clear the...
Compiling a New C/C++ Module to WebAssembly - WebAssembly
emscripten environment
setup first, let's
set up the required development environment.
... prerequisites get the emscripten sdk, using these instructions: https://emscripten.org/docs/getting_started/downloads.html compiling an example with the environment
set up, let's look at how to use it to compile a c example to emscripten.
...you need to run your html file through an http server (http://) — see how do you
set up a local testing server?
...due to c versus c++ name mangling rules, this would otherwise break, but here we are
setting it so that it treats it as an external c function if you are using c++.
Using the WebAssembly JavaScript API - WebAssembly
webassembly memory exposes its bytes by simply providing a buffer getter/
setter that returns an arraybuffer.
... tables can be mutated via table.prototype.
set(), which updates one of the values in a table, and table.prototype.grow(), which increases the number of values that can be stored in a table.
... this allows the indirectly-callable
set of functions to change over time, which is necessary for dynamic linking techniques.
...es to your code in the indicated place: var tbl = results.instance.exports.tbl; console.log(tbl.get(0)()); // 13 console.log(tbl.get(1)()); // 42 this code accesses each function reference stored in the table in turn, and instantiates them to print the values they hold to the console — note how each function reference is retrieved with a table.prototype.get() call, then we add an extra
set of parentheses on the end to actually invoke the function.
Interacting with page scripts - Archive of obsolete content
any of them, even
setters and getters, could have been redefined by a page script.
...to do this, add an option called “unsafe-content-script” under the “permissions” key in package.json, and
set it to true.
...r tabs = require("sdk/tabs"); var mod = require("sdk/page-mod"); var self = require("sdk/self"); var pageurl = self.data.url("page.html") var pagemod = mod.pagemod({ include: pageurl, contentscriptfile: self.data.url("content-script.js"), contentscriptwhen: "ready" }) tabs.open(pageurl); the target web page "page.html" includes a button and a page script: <html> <head> <meta char
set="utf-8"> </head> <body> <input id="message" type="button" value="send a message"/> <script type="text/javascript" src="page-script.js"></script> </body> </html> the content script "content-script.js" adds an event listener to the button, that sends a custom event containing a message: var messenger = document.getelementbyid("message"); messenger.addeventlistener("click", sendcusto...
Modules - Archive of obsolete content
each compartment has a
set of privileges that determines what scripts running in that compartment can and cannot do.
...compartments are very useful from a security point of view: each compartment has a
set of privileges that determines what a script running in that compartment can and cannot do.
... 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.
system - Archive of obsolete content
var system = require("sdk/system"); system.exit(); parameters code : integer to exit with failure,
set this to 1.
... for example: // get firefox profile path var profilepath = require('sdk/system').pathfor('profd'); // get os temp files directory (/tmp) var temps = require('sdk/system').pathfor('tmpd'); // get os desktop path for an active user (~/desktop on linux // or c:\documents and
settings\username\desktop on windows).
... you can get the value of an environment variable by accessing the property with that name: var system = require("sdk/system"); console.log(system.env.path); you can test whether a variable exists by checking whether a property with that name exists: var system = require("sdk/system"); if ('path' in system.env) { console.log("path is
set"); } you can
set a variable by
setting the property: var system = require("sdk/system"); system.env.foo = "bar"; console.log(system.env.foo); you can un
set a variable by deleting the property: var system = require("sdk/system"); delete system.env.foo; you can't enumerate environment variables.
High-Level APIs - Archive of obsolete content
clipboard interact with the system clipboard,
setting and getting its contents.
... selection get and
set text and html selections in the current web page.
... timers
set one-off and periodic timers.
system/environment - Archive of obsolete content
access,
set and clear environment variables.
...usage var { env } = require('sdk/system/environment'); you can get the value of an environment variable, by accessing the property with the name of the desired variable: var path = env.path; you can check for the existence of an environment variable by checking whether a property with that variable name exists: console.log('path' in env); // true console.log('foo' in env); // false you can
set the value of an environment variable by
setting the property: env.foo = 'foo'; env.path += ':/my/path/' you can un
set an environment variable by deleting the property: delete env.foo; limitations there is no way to enumerate existing environment variables, also env won't have any enumerable properties: console.log(object.keys(env)); // [] environment variable will be un
set, show up as non-...
...existing if it's
set to null, undefined or ''.
ui/sidebar - Archive of obsolete content
<!doctype html> <html> <head> <link href="stuff.css" type="text/css" rel="stylesheet"> </head> <body> <script type="text/javascript" src="stuff.js"></script> </body> </html> you can update the sidebar's content by
setting the sidebar's url property.
... here's a simple but complete add-on that shows how to
set up communication between main.js and a script in a sidebar, in the case where the sidebar script initiates communication: the html file includes just a script, "sidebar.js": <!doctype html> <html> <body> content for my sidebar <script type="text/javascript" src="sidebar.js"></script> </body> </html> the "sidebar.js" file sends a ping message to main.js using port.emit() as soon as...
... here's a simple but complete add-on that shows how to
set up communication between main.js and a script in a sidebar, in the case where the main.js script initiates communication: the html file includes just a script, "sidebar.js": <!doctype html> <html> <body> content for my sidebar <script type="text/javascript" src="sidebar.js"></script> </body> </html> the "sidebar.js" file listens to the ping message from main.js, and responds with ...
util/collection - Archive of obsolete content
usage a collection is ordered, like an array, but its items are unique, like a
set.
...
setting the property to a scalar value empties the collection and adds the value.
...
setting it to an array empties the collection and adds all the items in the array.
window/utils - Archive of obsolete content
features object map of features to
set for the window, defined like this: { width: 10, height: 15, chrome: true }.
... features string map of features to
set for the window, defined like: { width: 10, height: 15, chrome: true }.
... for the
set of features you can
set, see the window.opendialog documentation.
Creating annotations - Archive of obsolete content
it is initially off: var matchedelement = null; var originalbgcolor = null; var active = false; function re
setmatchedelement() { if (matchedelement) { (matchedelement).css('background-color', originalbgcolor); (matchedelement).unbind('click.annotator'); } } self.on('message', function onmessage(activation) { active = activation; if (!active) { re
setmatchedelement(); } }); this selector listens for occurrences of the jquery mouseenter event.
... $('*').mouseenter(function() { if (!active || $(this).hasclass('annotated')) { return; } re
setmatchedelement(); ancestor = $(this).closest("[id]"); matchedelement = $(this).first(); originalbgcolor = $(matchedelement).css('background-color'); $(matchedelement).css('background-color', 'yellow'); $(matchedelement).bind('click.annotator', function(event) { event.stoppropagation(); event.preventdefault(); self.port.emit('show', [ document.location.tostring()...
..., $(ancestor).attr("id"), $(matchedelement).text() ] ); }); }); conversely, the add-on re
sets the matched element on mouseout: $('*').mouseout(function() { re
setmatchedelement(); }); save this code in a new file called selector.js in your add-on's data directory.
Drag & Drop - Archive of obsolete content
dropping files onto an xul application it's possible to
setup drag and drop events to handle dropping files from external applications or os file managers onto your xul-based application.
...next,
setup the handlers so that files can be dropped on the application: function _dragover(aevent) { var dragservice = components.classes["@mozilla.org/widget/dragservice;1"].getservice(components.interfaces.nsidragservice); var dragsession = dragservice.getcurrentsession(); var supported = dragsession.isdataflavorsupported("text/x-moz-url"); if (!supported) supported = dragsession.isdataflavorsupported("application/x-moz-file"); if (supported) dragsession.candrop = true; } function _dragdrop(aevent) { var dragservice = components.clas...
...service;1"].getservice(components.interfaces.nsidragservice); var dragsession = dragservice.getcurrentsession(); var _ios = components.classes['@mozilla.org/network/io-service;1'].getservice(components.interfaces.nsiioservice); var uris = new array(); // if sourcenode is not null, then the drop was from inside the application if (dragsession.sourcenode) return; //
setup a transfer item to retrieve the file data var trans = components.classes["@mozilla.org/widget/transferable;1"].createinstance(components.interfaces.nsitransferable); trans.adddataflavor("text/x-moz-url"); trans.adddataflavor("application/x-moz-file"); for (var i=0; i<dragsession.numdropitems; i++) { var uri = null; dragsession.getdata(trans, i); var flavor = ...
HTML to DOM - Archive of obsolete content
r, we're going to load our html document first: var request = xmlhttprequest(); request.open("get", "http://example.org/file.html", false); request.send(null); our next step is to create the document object that will represent the dom into which we'll insert our newly-retrieved html: var doc = document.implementation.createhtmldocument("example"); doc.documentelement.innerhtml = request.respon
setext; after this any manipulation that we might want to do will be something as simple as the following: doc.body.textcontent = "this is inside the body!"; using a hidden iframe element to parse html to a window's dom sample code may need more work.
... var frame = document.getelementbyid("sample-frame"); if (!frame) { // create frame frame = document.createelement("iframe"); // iframe (or browser on older firefox) frame.
setattribute("id", "sample-frame"); frame.
setattribute("name", "sample-frame"); frame.
setattribute("type", "content"); frame.
setattribute("collapsed", "true"); document.getelementbyid("main-window").appendchild(frame); // or // document.documentelement.appendchild(frame); //
set restrictions as needed frame.webnavigation.allowauth = false; frame.webnavigation.allowimages = false; frame.webnavigation.allowjavascript = false; frame.webnavigation.allowmetaredirects = true; frame.webnavigation.allowplugins = false; frame.webnavigation...
....allowsubframes = false; // listen for load frame.addeventlistener("load", function (event) { // the document of the html in the dom var doc = event.originaltarget; // skip blank page or frame if (doc.location.href == "about:blank" || doc.defaultview.frameelement) return; // do something with the dom of doc alert(doc.location.href); // when done remove frame or
set location "about:blank"
settimeout(function (){ var frame = document.getelementbyid("sample-frame"); // remove frame // frame.destroy(); // if using browser element instead of iframe frame.parentnode.removechild(frame); // or
set location "about:blank" // frame.contentdocument.location.href = "about:blank"; },10); }, true); } // load a page frame.co...
Sidebar - Archive of obsolete content
resizing the sidebar programmatically in case you need to change the width of the sidebar, use the following code: function
setsidebarwidth(newwidth) { var mainwindow = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .roottreeitem .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); mainwindow.document.getelementbyid("sidebar-b...
...ox").width=newwidth; } or function
setsidebarwidth(newwidth) { window.top.document.getelementbyid("sidebar-box").width=newwidth; } you can also disable the ability to resize it manually, using the mouse, by hiding the sidebar's splitter element.
... for this snippet to work, you have to declare mainwindow as in the previous code block then write: mainwindow.document.getelementbyid("sidebar-splitter").hidden = true; be aware that if you change the splitter's hidden attribute, you need to re
set it to a safe value when your sidebar is closed, or replaced by another sidebar.
Code snippets - Archive of obsolete content
xml file i/o code used to read, write and process files drag & drop code used to
setup and handle drag and drop events dialogs code used to display and process dialog boxes alerts and notifications modal and non-modal ways to notify users preferences code used to read, write, and modify preferences js xpcom code used to define and call xpcom components in javascript running applications code used to run other applications <canvas> related what wg canvas-related code ...
... ro
setta by default, the only possible standardized scripting language for html is ecmascript.
...ion animate svg using javascript and smil svg interacting with script using javascript and dom events to create interactive svg embedding svg in html and xul using svg to enhance html or xul based markup xul widgets html in xul for rich tooltips dynamically embed html into a xul element to attain markup in a tooltip label and description special uses and line breaking examples tree
setup and manipulation of trees using xul and js scrollbar changing style of scrollbars.
Communication between HTML and your extension - Archive of obsolete content
i
set the onblur action to a little javascript function that performed a standard ajax request to get a result.
... the onreadystatechange was
set to another little javascript function that would update a specific element on the html page with the result.
...as a last ditch effort i tried
setting a timeout using
settimeout when i got the event in the extension to wait a few milliseconds before looking for the desired element.
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
this article describes how to
set up the development environment for a large, complex firefox extension with any or all of the above-mentioned requirements.
...module and xpi_name are both
set to the name of your extension; they should be repeated in all project makefiles so that all of the files land in the same place in the xpi staging area (see below).
...if so, try
setting the moz_no_remote environment variable to "1" before running the development version of firefox.
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
use .
setlength() instead: nsstring mystring = somestring; - mystring.truncate(4); + mystring.
setlength(4); the frozen string api doesn't support the iterator or const_iterator classes, but you can use pointers the same way: nsstring mystring = somestring; - nsstring::const_iterator begin, end;- mystring.beginreading(begin); mystring.endreading(end); + const prunichar *begin, *end;+ mystring.beginread...
...ewisupportsarray(getter_addrefs(array)); + array = do_createinstance(ns_supportsarray_contractid); - nscomptr<nsiinputstream> rawstream;- rv = ns_newbyteinputstream(getter_addrefs(rawstream),- (const char*)data, length); + nscomptr<nsistringinputstream> rawstream =+ do_createinstance(ns_stringinputstream_contractid, &rv);+ ns_ensure_success(rv, rv);++ rv = rawstream->
setdata((const char*)data, length); ns_ensure_success(rv, rv); nsistringinputstream is not frozen (and thus, not available in the gecko sdk as currently published).
...#define compare(str1, str2, comp) (str1).compare(str2, comp) #define last() endreading()[-1] #define
setcharat(c, i) replace(i, 1, ch) #define ns_newisupportsarray(result) callcreateinstance(ns_supportsarray_contractid, static_cast<nsisupportsarray**>(result)); ideally we would switch to nsimutablearray, but in the mean time there's no point changing the same code twice.
Chapter 1: Introduction to Extensions - Archive of obsolete content
but we didn't
set out to create an all-in-one browser that can satisfy everyone.
... the add-ons manager handles the following tasks: safely installs and uninstalls add-ons makes sure add-ons are compatible with the version of firefox you're using manages a whitelist of sites trusted for installing add-ons helps troubleshoot add-ons by disabling them and offering a safe mode confirms and runs updates provides access to add-ons'
settings dialogs provides access to add-ons' support sites development environment amenities initially, there wasn't adequate documentation available, and extension developers were largely left to fend for themselves1; however, now there's a considerable store of knowledge.
... tab mix plus offers detailed tab-related
settings.
Appendix D: Loading Scripts - Archive of obsolete content
flexibility: script tags provide a means to specify the character
set and javascript version of the scripts to be loaded, which many other methods do not.
...this behavior can be reversed by
setting the wantsxrays parameter to false when constructing the sandbox.
... flexibility: the sub-script loader can load scripts into a variety of different namespaces for a wide variety of uses, and as of gecko 2 allows the character
set of the script to be specified.
Observer Notifications - Archive of obsolete content
you should normally
set the third parameter to false.
...you may notice that we explicitly
set the interface of the asubject object to nsisupportsstring using the queryinterface method.
... this is because the first parameter of the observe method is typed as nsisupports (the generic interface, as seen before), therefore its properties and methods cannot be accessed unless the correct interface is
set to it.
Updating addons broken by private browsing changes - Archive of obsolete content
moziasyncfavicons/nsifaviconservice:
setandfetchfaviconforpage/
setandloadfaviconforpage now take a required privacy status argument, either nsifaviconservice.favicon_load_private or nsifaviconservice.favicon_load_non_private.
... nsicontentprefservice: getpref,
setpref, haspref, hascachedpref, removepref, removegroupedprefs, removeprefsbyname, getprefs, and getprefsbyname all take a required nsiloadcontext argument to indicate the privacy status of the pref in question.
... nsihttpauthmanager:
setauthidentity and getauthidentity now take an optional boolean parameter to indicate whether the identity is classified as private.
Creating a status bar extension - Archive of obsolete content
the chrome is the
set of user interface elements outside the content area of the application's window, such as toolbars, status bars, menu bars, and the like.
...rlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!-- firefox --> <statusbar id="status-bar"> <statusbarpanel id="status-bar-sample-1" label="hello world" tooltiptext="sample status bar item" /> </statusbar> </overlay> the first order of business in the status-bar-sample-1.xul file is to establish that this is in fact a xul file, and to
set up a unique id for the overlay.
...we include properties to configure our new status bar panel the way we want,
setting its text label to "hello world" and establishing a tool tip with the message "sample status bar item" in it.
Environment variables affecting crash reporting - Archive of obsolete content
the following environment variables affect crash reporting: moz_crashreporter_url
sets the url that the crash reporter will submit reports to.
... additionally, on mac os x, you can
set an application default
setting to allow apple's crash reporter tool to run alongside the breakpad crash reporter.
... run this on the command line: defaults write org.mozilla.firefox oscrashreporter 1 note that you will get two crash dialogs with this
setting, one from the os and one from mozilla.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
of course, documents authored in xhtml strict or html strict will trigger the "standards" rendering mode, so we're going to go through two basic ways to address the problem in strict documents, and a number of ways to call on these "fixes."
setting images to be blocks the first choice, and one that will work for most graphically-intense designs, is to convert the image from being an inline element to a block-level element.
...should this property be adopted, then any browser supporting it could emulate traditional "shrinkwrap" behavior without risking other layout up
set with the following rule: td {line-box-contain: font replaced;} /* proposed for css3 */ there are other possible fixes contained within the current css3 working drafts, such as line-height-policy.
... recommendations absent support for css3, it is difficult to provide a clear
set of steps for fixing every instance of these problems, because the best solution for a given document will greatly depend on its structure.
Source code directories overview - Archive of obsolete content
caps contains c interfaces and code for determining the capabilities of content based on the security
settings and certificates (e.g.
...essentially, it is a a
set of interfaces for a platform-independent device (drawing) context.
...it contains code for various character
sets, locale formats (e.g.
Visualizing an audio spectrum - Archive of obsolete content
dedmetadata', loadedmetadata, false); // fft from dsp.js, see below var fft = function(buffersize, samplerate) { this.buffersize = buffersize; this.samplerate = samplerate; this.spectrum = new float32array(buffersize/2); this.real = new float32array(buffersize); this.imag = new float32array(buffersize); this.rever
setable = new uint32array(buffersize); this.sintable = new float32array(buffersize); this.costable = new float32array(buffersize); var limit = 1, bit = buffersize >> 1; while ( limit < buffersize ) { for ( var i = 0; i < limit; i++ ) { this.rever
setable[i + limit] = this.rever
setable[i] + bit; } limit = l...
... bit = bit >> 1; } for ( var i = 0; i < buffersize; i++ ) { this.sintable[i] = math.sin(-math.pi/i); this.costable[i] = math.cos(-math.pi/i); } }; fft.prototype.forward = function(buffer) { var buffersize = this.buffersize, costable = this.costable, sintable = this.sintable, rever
setable = this.rever
setable, real = this.real, imag = this.imag, spectrum = this.spectrum; if ( buffersize !== buffer.length ) { throw "supplied buffer is not the same size as defined fft.
... fft size: " + buffersize + " buffer size: " + buffer.length; } for ( var i = 0; i < buffersize; i++ ) { real[i] = buffer[rever
setable[i]]; imag[i] = 0; } var halfsize = 1, phaseshiftstepreal, phaseshiftstepimag, currentphaseshiftreal, currentphaseshiftimag, off, tr, ti, tmpreal, i; while ( halfsize < buffersize ) { phaseshiftstepreal = costable[halfsize]; phaseshiftstepimag = sintable[halfsize]; currentphaseshiftreal = 1.0; currentphaseshiftimag = 0.0; for ( var fftstep = 0; fftstep < halfsize; fftstep++ ) { i = fftstep; while ( i < buffersize ) {...
Getting Started - Archive of obsolete content
setup download the latest version of mozilla, install it (install the dom inspector as well), and select the classic skin.
...now all of the css and images are extracted, but if you make some changes and run mozilla as it is, you will not see them because it's still
set to look at the files in the jar files.
...this version is
set to 1.0, so this skin will only work in versions of mozilla 1.0.
In-Depth - Archive of obsolete content
a bunch of 20px x 20px icons in a grid format above is the source image of some icons
setup to use the -moz-image-region style.
...inside of the xml file there is an image which has its class
set to toolbar-primary-icon.
...
set the background-image to a url of your choosing, such as url("chrome://navigator/skin/icons/dino.png");.
Helper Apps (and a bit of Save As) - Archive of obsolete content
four primary tasks:
sets up temporary file and instantiate the nsihelperapplauncherdialog in onstartrequest.
... nsexternalapphandler::onstoprequest
set a flag that we're done, then do whatever the user wants if the user has decided (save to disk and open in helper are the current options the user has).
... possibly reflecting the os
settings in our helper app preferences (readonly?
Twitter - Archive of obsolete content
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.
...user info jetpack.lib.twitter.users.show({ id: "mozlabs", success: function (data, status) console.log(data.tosource()), error: function (xhr, errmsg, errobj) console.error(xhr.respon
setext) }); friends of a user jetpack.lib.twitter.statuses.friends({ id: "mozlabs", page: 3, success: function (data, status) console.log(data.tosource()), error: function (xhr, errmsg, errobj) console.error(xhr.respon
setext) }); trends jetpack.lib.twitter.trends({ success: function (data, status) console.log(data.tosource()), error: function (xhr, errmsg, errobj) console.error(xhr.resp...
...on
setext) }); searching jetpack.lib.twitter.search({ q: "#jetpack", lang: "ja", rpp: 10, page: 5, since_id: 1337, success: function (data, status) console.log(data.tosource()), error: function (xhr, errmsg, errobj) console.error(xhr.respon
setext) }); ...
First run - Archive of obsolete content
a manifest is simply an object
set to a variable named manifest.
... it's the same manifest you use when defining
settings for your jetpack.
...this example
sets the first-run page to some html: var manifest = { firstrunpage: '<p>thanks for installing!
First Run - Archive of obsolete content
a manifest is simply an object
set to a variable named manifest.
...it's the same manifest you use when defining
settings for your jetpack.
...this example
sets the first-run page to some html: var manifest = { firstrunpage: '<p>thanks for installing!
Simple Storage - Archive of obsolete content
for the most part this object is like any other javascript object, and a jetpack can
set whatever properties it wants on it.
... if there are no notes, we'll show a// disabled "(empty)" menuitem.function updatejetpackmenu() { jetpack.menu.
set({ label: "notes", menu: new jetpack.menu(notes.length > 0 ?
...:(jetpack.menu.context.page.beforeshow = function (menu) { menu.re
set(); if (jetpack.selection.text) menu.add({ label: "note", command: function () { notes.unshift(jetpack.selection.text); if (notes.length > 20) notes.pop(); updatejetpackmenu(); } });};// initialize the jetpack menu with the current notes.updatejetpackmenu(); see also
settings jep 11 ...
Selection - Archive of obsolete content
features can get,
set, and listen for selection events in html or plain text.
...this api currently lives in the future and must be imported for use: jetpack.future.import("selection"); getting and
setting the selection the current version of jetpack.selection includes these formats: .text and .html getting the selection the following is an example of getting the selection from the user.
... jetpack.import.future("selection");var textofsel = jetpack.selection.text;var htmlofsel = jetpack.selection.html;
setting the selection the following is an example of getting the selection from the user.
Selection - Archive of obsolete content
features can get,
set, and listen for selection events in html or plain text.
...this api currently lives in the future and must be imported for use: jetpack.future.import("selection"); getting and
setting the selection the current version of jetpack.selection includes these formats: .text and .html getting the selection the following is an example of getting the selection from the user.
... jetpack.import.future("selection"); var textofsel = jetpack.selection.text; var htmlofsel = jetpack.selection.html;
setting the selection the following is an example of getting the selection from the user.
Selection - Archive of obsolete content
features can get,
set, and listen for selection events in html or plain text.
...this api currently lives in the future and must be imported for use: jetpack.future.import("selection"); getting and
setting the selection the current version of jetpack.selection includes these formats: .text and .html getting the selection the following is an example of getting the selection from the user.
... jetpack.import.future("selection"); var textofsel = jetpack.selection.text; var htmlofsel = jetpack.selection.html;
setting the selection the following is an example of getting the selection from the user.
Metro browser chrome tests - Archive of obsolete content
for information on
setting your local build as the default, visit the windows 8 integration wiki page.
...a simple test looks like this: gtests.push({ desc: "test loading about:blank",
setup: function () { }, teardown: function () { }, run: function () { yield addtab("about:blank"); is(tab.browser.currenturi.spec, "about:blank", "about:blank is loaded"); } }); function test() { runtests(); } gtests contains individual tests that make up the library of tests your test file will contain.
...
setup(), teardown(), and run() each have individual exception handlers to prevent one method from interfering with the execution of another.
Plugin Architecture - Archive of obsolete content
it is not
set in stone.
...(the event is necessary because by the time hasnewframe is called, the frame isn't fully
set up yet) in layout note: some of this should move to content an instance owner is created the window passed to the plugin is adjusted (the npwindow, http://devedge-temp.mozilla.org/libr...nt.html#999221) the plugin host is asked to instantiate the plugin this will call back to the instance owner / the object frame in order to create a widget to draw to (if the plugin is not windowless) n...
...splugininstanceowner::
setwindow
setwindow is called on the plugin ...
Space Manager High Level Design - Archive of obsolete content
if so, the vertical space that has been affected (including both the float's old region and the float's new region) is noted in the internal nsinterval
set as potential float damage (the method is includeindamage).
... getavailablespace is called on the blockreflowstate the blockreflowstate calls getavailablespace on its blockbanddata instance (which was
setup in the blockreflowstate's constructor based on the space manager passed in and computed content area).
...should be private (compiles fine) nsblockframe::paint is mucking with nsblockbanddata in and #if 0 block - remove that and the include (compiles fine) nsspacemanger has no way of clearing the float damage interval
set - this might be needed if the spacemanager persists beyond a reflow original document information author(s): marc attinasi other contributors: alex savulov, chris waterson, david baron, josh soref last updated date: november 20, 2005 ...
Supporting per-window private browsing - Archive of obsolete content
to do this, observe the last-pb-context-exiting notification and
set the data field of the nsisupportsprbool subject to true.
...var channel = services.io.newchannel("http://example.org", null, null); channel.queryinterface(components.interfaces.nsiprivatebrowsingchannel); channel.
setprivate(true); // force the channel to be loaded in private mode similarly, xmlhttprequest objects created via createinstance(ci.nsixmlhttprequest) will often require explicit adjustment, since they have no context from which to derive a privacy status.
... var xhr = components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createinstance(components.interfaces.nsixmlhttpreqeust); var channel = xhr.channel.queryinterface(components.interfaces.nsiprivatebrowsingchannel); channel.
setprivate(true); ...
Table Layout Regression Tests - Archive of obsolete content
avoid the nasty assertions to pop up by
set xpcom_debug_break=warn, the world would be a much better place if we could first fix those assertions.
... as you will probably run your normal mozilla in parallel with the testing issue then:
set moz_no_remote=1 at the command prompt.
...0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: null top: null right: null bottom: null left: null top: null right: null bottom: null 1[0x1]enum 0" /> <list data="100 100 " /> <position data="left: auto top: auto right: auto bottom: auto auto 0[0x0]tw null auto 0[0x0]tw null 0 auto " /> <text data="0 0 0 normal normal 0[0x0]tw normal " /> <textre
set data="0 10[0xa]enum " /> <display data="0 1 0 0 0 0 0 0 0 0 0 0 " /> <visibility data="0 1 1.000000" /> <table data="0 0 4 -1 1 " /> <tableborder data="1 null null 0 2 " /> <content data="0 0 0 null " /> <quotes data="0 " /> <ui data="3 0 0 1 " /> <uire
set data="7 0 4" /> <xul data="0 0 0 0 0 1 <svg data="0 1.000000 1.000000 0 1.000000" /> </stylecont...
Treehydra Manual - Archive of obsolete content
a value used in the analysis script that represents a
set of concrete values.
...conceptually, this is an object used in the analysis that represents a
set of concrete states.
...this is a special abstract state the represents the empty
set of concrete states.
getFolder - Archive of obsolete content
there are two
sets of possible values for this parameter.
... the first
set contains platform-independent locations; the second
set contains platform-specific locations.
...see the list in the description section for the two
sets of locations.
Methods - Archive of obsolete content
patch applies a
set of differences between two versions.
... re
seterror re
sets a saved error code to zero.
...
setpackagefolder
sets the default package folder that is saved with the root node.
allowevents - Archive of obsolete content
by
setting the allowevents attribute to true, this special behavior is disabled, and the events are targeted the same as other elements.
...instead, the allowevents may be
set to true on a descendant instead.
...for the latter, the allowevents attribute is
set to true to have a click on the child button receive events instead of targeting all events at the menu.
browser.type - Archive of obsolete content
the type of browser, which can be used to
set access of the document loaded inside the browser.
... if this is not
set, the loaded document has the same access as the window containing the browser.
... warning: the type attribute must be
set before the element is inserted into the document.
checkState - Archive of obsolete content
this means that the button acts like a checkbox except that there is a third state which must be
set manually by adjusting the check state.
... if you wish to have different behavior for how the states are adjusted,
set the autocheck attribute to false and adjust the state with a script.
... the type attribute must be
set to checkbox for buttons with a check state.
disabled - Archive of obsolete content
if this attribute is
set, the element is disabled.
...do not
set the attribute to true, as this will suggest you can
set it to false to enable the element again, which is not the case.
... // disabling an element document.getelementbyid('buttonremove').
setattribute("disabled", "disabled"); // enabling back an element by removing the "disabled" attribute document.getelementbyid('buttonremove').removeattribute("disabled"); firefox 3.5 note for key
set elements, support for this attribute was added in firefox 3.5.
panel.level - Archive of obsolete content
if this attribute is not
set, the popup window level depends on the platform.
...if a panel has one or more text fields, this attribute should not be
set, otherwise ime or on-screen keyboard popups will appear incorrectly.
... for these reasons, you should avoid
setting the level if not needed.
tooltiptext - Archive of obsolete content
« xul reference home tooltiptext type: string used to
set the text which appears in the tooltip when the user moves the mouse over the element.
... this can be used instead of
setting the tooltip to a popup for the common case where it contains only text.
... the tooltip is displayed in a default tooltip which displays only a label, however the default tooltip may be changed by
setting the default attribute on a tooltip element.
value - Archive of obsolete content
be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use
setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use
setuserdata() (future-proof and clean, but not easily serializable).
... for user editable menulist elements, the contents, as visible to the user, are read and
set using the menulist.value syntax.
... for those elements,
setattribute("value", myvalue) and getattribute("value") do not access or affect the contents displayed to the user.
Attribute (XUL) - Archive of obsolete content
nlabeldisclosure buttonlabelextra1 buttonlabelextra2 buttonlabelhelp buttonorient buttonpack buttons checked checkstate clicktoscroll class closebutton closemenu coalesceduplicatearcs collapse collapsed color cols command commandupdater completedefaultindex container containment contentcontextmenu contenttooltip context contextmenu control crop curpos current current
set customindex customizable cycler datasources decimalplaces default defaultbutton default
set description dir disableautocomplete disableautoselect disableclose disabled disablehistory disablekeynavigation disablesecurity dlgtype dragging editable editortype element empty emptytext deprecated since gecko 2 enablecolumndrag enablehistory equalsize eventnode events expr ...
...oreincolumnpicker ignorekeys image inactivetitlebarcolor increment index inputtooltiptext insertafter insertbefore instantapply inverted iscontainer isempty key keycode keytext label lastpage lastselected last-tab left linkedpanel max maxheight maxlength maxpos maxrows maxwidth member menu menuactive min minheight minresultsforpopup minwidth mode modifiers mou
sethrough movetoclick multiline multiple name negate newlines next noautofocus noautohide noinitialfocus nomatch norestorefocus object observes onbeforeaccept onbookmarkgroup onchange onclick onclo
setab oncommand oncommandupdate ondialogaccept ondialogcancel ondialogclosure ondialogextra1 ondialogextra2 ondialoghelp onerror onerrorcommand onextra1 onextra2 oninput on...
...load onnewtab onpageadvanced onpagehide onpagerewound onpageshow onpaneload onpopuphidden onpopuphiding onpopupshowing onpopupshown onsearchcomplete onselect ontextcommand ontextentered ontextrevert ontextreverted onunload onwizardback onwizardcancel onwizardfinish onwizardnext open ordinal orient pack pageid pageincrement pagestep parent par
setype persist persistence phase pickertooltiptext placeholder popup position predicate preference preference-editable primary priority properties querytype readonly ref rel removeelement resizeafter resizebefore rows screenx screeny searchbutton searchsessions searchlabel selected selectedindex seltype
setfocus showcaret showcommentcolumn showpopup size sizemode sizetopopup smoothscroll ...
How to implement a custom XUL query processor component - Archive of obsolete content
we are not really using the datasources in our sample component, so we
set it to a dummy value.
... rulematched: function(aquery, arulenode) { }, // the output for a result has been removed and the result is no longer being used by the builder hasbeenremoved: function() { } }; // basic wrapper for nsisimpleenumerator function templateresult
set(aarrayofdata) { this._index = 0; this._array = aarrayofdata; } templateresult
set.prototype = { queryinterface: xpcomutils.generateqi([components.interfaces.nsisimpleenumerator]), hasmoreelements: function() { return this._index < this._array.length; }, getnext: function() { return new templateresult(this._array[this._index++]); } }; // the query processor class - implem...
... // eventually we should read the <query> to create filters return this._data; }, generateresults: function(adatasource, aref, aquery) { // preform any query and pass the data to the result
set return new templateresult
set(this._data); }, addbinding: function(arulenode, avar, aref, aexpr) { // add a variable binding for a particular rule, which we aren't using yet }, translateref: function(adatasource, arefstring) { // if we return null, everything stops return new templateresult(null); }, compareresults: function(aleft, aright, avar) { // -1 less, 0 =...
appendNotification - Archive of obsolete content
the type property must also be
set to "menu", or "menu-button".
...if no button has this
set, the first button in the array is the default.
...valid values are "menu-button" and "menu" which must be
set if the button is to provide a popup via the popup property.
Simple Menu Bars - Archive of obsolete content
this means that you could create a vertical menubar by
setting the orient attribute to vertical.
...this attribute can be
set to either true or false.
...this attribute can be
set to either true or false where the latter is the default.
XBL Attribute Inheritance - Archive of obsolete content
its value should be
set to a comma-separated list of attribute names that are to be inherited.
...this technique is used to
set the default value if the attribute is not present.
...to
set the value attribute on the label, we need to use a different attribute name and map it to the value.
XML - Archive of obsolete content
when we say language, we mean that developers create a
set of terms, orlexicon, and a relationship between these terms, or what some people call agrammar.
... as a
set of interface-defining tags, xulis the widgets its tags describe.
... xul is little beyond the
set of tags used to define interface widgets, the relationship between them, or grammar, and some built-in flexibility for using extra resources like images, html elements, and other standards-based technologies.
XUL Coding Style Guidelines - Archive of obsolete content
to make xul files easy to read and maintain, localization friendly, and portable across user agents, we need to have a
set of coding style guidelines to ensure our objectives are achievable.
... the author has collected a
set of guidelines from various sources listed in the references section.
...--> <!-- entity homebtn.label "home" --> properties files are very similar, but use the pound sign instead of <!--<var>xxxxx</var>-->: # localization note entity name : content we recognize that translation is a sub
set of localization even though we've consistently referred to our notes as "localization note".
action - Archive of obsolete content
one descendant of the action body should have a uri attribute
set to the member variable.
... examples example needed attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
bbox - Archive of obsolete content
it is equivalent to using an hbox element with an align attribute
set to baseline.
... examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hid...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
bindings - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] used to specify a
set of variable bindings for a rule.
... examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width object type: string the object of the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related tbd ...
broadcaster - Archive of obsolete content
for menuitems or buttons that just want to have their disabled status
set when the feature should be disabled, you should use a command element instead.
... examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
content - Archive of obsolete content
propiedades tag, uri ejemplos (no son necesarios) atributos inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width propiedades tag type: tag name this may be
set to a tag name.
... if
set, the conditions will only match if the template builder is parsing content for an element directly inside this tag.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata relacionados tbd ...
deck - Archive of obsolete content
attributes selectedindex properties selectedindex, selectedpanel examples <deck selectedindex="2"> <description value="this is the first page"/> <button label="this is the second page"/> <box> <description value="this is the third page"/> <button label="this is also the third page"/> </box> </deck> attributes selectedindex type: integer gets and
sets the index of the currently selected panel.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties selectedindex type: integer returns the index of the currently selected item.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related stack ...
groupbox - Archive of obsolete content
properties accessibletype examples <groupbox> <caption label="
settings"/> <radiogroup> <radio label="black and white"/> <radio label="colour"/> </radiogroup> <checkbox label="enabled"/> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, inserta...
...fter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related interfaces nsiaccessibleprovider ...
observes - Archive of obsolete content
when an observed attribute is modified on the broadcaster, the attribute's value will be forwarded and
set on the parent element of the observer.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
resizer - Archive of obsolete content
typetype: string
set this to the value "window" for a resizing grip that appears in the bottom corner of the window, used for resizing the window.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
titlebar - Archive of obsolete content
if you don't want this behavior, you can override it by
setting allowevents="true" on the titlebar element.
...file:///users/markus/sites/hudwindow.xul", "", "chrome=1, titlebar=0") attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width note: the allowevents attribute did not work for title bars prior to firefox 3.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
treerow - Archive of obsolete content
attributes properties examples (example needed) attributes properties type: space-separated list of property names
sets the properties of the element, which can be used to style the element.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, ...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements tree, treecols, treecol, treechildren, treeitem, treecell and treeseparator.
treeseparator - Archive of obsolete content
attributes properties examples (example needed) attributes properties type: space-separated list of property names
sets the properties of the element, which can be used to style the element.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, ...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements tree, treecols, treecol, treechildren, treeitem, treerow and treecell.
Building XULRunner with Python - Archive of obsolete content
development machine
setup first a word of warning that zonealarm has exhibited memory leaks that cause build machines to crash with rather spurious errors.
...if you plan to checkout often into empty folders you could modify it to
set the cvsroot environment variable.
...
set cvsroot=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot having created amozilla project directory (e.g.c:\projects\mozilla or/c/projects/mozilla in msys) create the following .mozconfig file.
Make your xulrunner app match the system locale - Archive of obsolete content
then
set the locale preference.
... the following is python code to
set this preference.
... from xpcom import components ps_cls = components.classes["@mozilla.org/preferences-service;1"] ps = ps_cls.getservice(components.interfaces.nsiprefservice) branch = ps.getbranch("general.useragent.") branch.
setcharpref("locale", lang) i also
set the language environment variable to match the system locale so that python's gettext functionality will work (it pulls straight from language instead of using
setlocale): os.environ["language"] = lang ...
XULRunner tips - Archive of obsolete content
the following prefs must also be
set to make the xpinstall dialog, extension manager, and theme manager work: pref("xpinstall.dialog.confirm", "chrome://mozapps/content/xpinstall/xpinstallconfirm.xul"); pref("xpinstall.dialog.progress.skin", "chrome://mozapps/content/extensions/extensions.xul?type=themes"); pref("xpinstall.dialog.progress.chrome", "chrome://mozapps/content/extensions/extensions.xul?type=extensions"); pref("xpinstal...
...0 jar:inspector.jar!/skin/modern/inspector/ skin inspector classic/1.0 jar:inspector.jar!/skin/classic/inspector/ overlay chrome://inspector/content/popupoverlay.xul chrome://inspector/content/viewers/dom/popupoverlay.xul overlay chrome://inspector/content/commandoverlay.xul chrome://inspector/content/viewers/stylerules/commandoverlay.xul overlay chrome://inspector/content/key
setoverlay.xul chrome://inspector/content/viewers/dom/key
setoverlay.xul overlay chrome://inspector/content/popupoverlay.xul chrome://inspector/content/viewers/stylerules/popupoverlay.xul overlay chrome://inspector/content/commandoverlay.xul chrome://inspector/content/viewers/dom/commandoverlay.xul to launch dom inspector in your application, you need to open its main window, with a command lik...
...without these
settings password manager will not store login details.
Windows and menus in XULRunner - Archive of obsolete content
it has attributes to
set the title/caption as well as to control its width and height.
...you can add a <command
set> and <command> elements like this: <command
set> <command id="cmd_open" label="&file.open;" oncommand="dofileopen();"/> <command id="cmd_save" label="&file.save;" oncommand="dofilesave();"/> </command
set> ...
... see also xul:windows xul tutorial:creating a window command
set command xul tutorial:commands xul tutorial:simple menu bars xul tutorial:toolbars « previousnext » original document information author: mark finkle last updated date: october 2, 2006 ...
calICalendarViewController - Archive of obsolete content
the calievent should have its enddate
set to aendtime, if this parameter is specified.
... otherwise, it should be
set to a default value, as determined by the application.
... the other values of the calievent (title, summary, alarm, etc) should likewise be
set to defaults.
Gecko Compatibility Handbook - Archive of obsolete content
set up browsers for testing the various gecko-based browsers do not always contain netscape in the user-agent string.
...if this works,
set up your detection to serve ie 6 content to visitors with gecko in their user-agent strings.
...later versions did support netscape 6; however, in netscape 6.1 and higher, support for internet explorer's proprietary off
setxxx properties results in hiermenu placing popups in the wrong position.
Mozilla release FAQ - Archive of obsolete content
when i try to use cvs on windows, i get an error about no home directory you need to
set the home environment variable to a valid directory, as cvs was designed with unix in mind, and wants to put a file in your home directory (the password file) i'm on a unix system, and still am having problems building here's a brief guide to common build problems: cc1: invalid option 'foo' cc: no such file or directory 'foo' these are almost always caused by your platform-specific makefile being...
...use that to launch mozilla for you -- it
sets ld_library_path automatically.
...you can find the binaries at mozilla.org's binaries page on win32, it fails to build, with the message '.\win32' unexpected you didn't properly
set the environment variables -- you must not include a space at the end of the
set statements (be careful if you are cut'n'pasting).
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.accessibility - oct 6, 2006 announcements legal precedent
set for web accessibility us federal court rules that retailers may be sued if its website is inaccsessible.
... discussions w3c
sets road map for web app accessibility the w3c introduced its wai-aria (web accessibility initiative for accessible rich internet applications) roadmap--a
set of guidelines for developers to make accessible web content.
... this
set of documents tackles some of the difficulties that ajax has been causing with regards to accessibility.
Logging Multi-Process Plugins - Archive of obsolete content
your safest bet is your home directory (c:\users\username on windows vista and above, c:\documents and
settings\username on windows xp, and ~ (home directory) on mac os x and linux).
...from within a command prompt: c:\>
set nspr_log_modules=ipcplugins:5 c:\>
set nspr_log_file=c:\plugins.log c:\> cd c:\program files\mozilla firefox c:\> firefox.exe the log file will be saved to c:\plugins.log (or wherever nspr_log_file is
set).
...from within a bash shell: $ export nspr_log_modules=ipcplugins:5 $ export nspr_log_file=~/plugins.log $ /usr/bin/firefox the file will be saved to ~/plugins.log (or wherever nspr_log_file is
set).
NPEvent - Archive of obsolete content
: 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 wm_keyup wm_keydown wm_
setcursor wm_
setfocus wm_killfocus for information about these events, see the microsoft windows developer documentation.
... if your plug-in wants to
set the cursor when the mouse is within the instance,
set the cursor and return true.
...as the xevents sent to the plug-in are synthesized and there is not a native window corresponding to the plug-in rectangle, some of the members of the xevent structures are not
set to their normal xserver values.
NPFullPrint - Archive of obsolete content
the npfullprint structure is used when the mode field of npprint is
set to np_full.
...if you want the plug-in to take complete control of the printing process, it should print the full page and
set the field pluginprinted to true before returning.
... if you want an embedded plug-in to simply render its area of the page,
set pluginprinted to false and return immediately; the browser calls npp_print again with the npembedprint substructure of npprint.
NPP_HandleEvent - Archive of obsolete content
instead, the windowed plug-in draws into the graphics port associated with the the browser window, at the off
set that the browser specifies.
...when npp_handleevent is called, the current port is
set up so that its origin matches the top-left corner of the plug-in.
... a plug-in does not need to
set up the current port for mouse coordinate translation.
NPP_Print - Archive of obsolete content
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.
...for an embedded plug-in,
set the printinfo field to npembedprint.
...for a full-page plug-in,
set the printinfo field to npfullprint or null.
Table Reflow Internals - Archive of obsolete content
review of reflow the reflowee
sets various sizes in the reflow metrics after (possibly) reflowing some or all of its children which reflows it children, etc.
... special height reflow the reflow state holds an observer and initiator observer is the table cell used as the height basis
set by frame without computed height in didreflow gives its block a computed height during 3rd pass doesn't change height during 3rd pass initiator is the table containing the observer starts the 3rd pass reflow and
sets a bit in the reflow state gives its block a computed height during 3rd pass could also be inside a cell which is an observer special height reflow optimizations only frames n...
...if the page is incomplete then the page sequence creates a continuation for the page and
sets it as the page's next sibling (it is also the page's nextinflow).
Unicode - MDN Web Docs Glossary: Definitions of Web-related terms
unicode is a standard character
set that numbers and defines characters from the world's different languages, writing systems, and symbols.
...for example, one character
set would store japanese characters, and another would store the arabic alphabet.
... if it was not clearly marked which parts of the data were in which character
set, other programs and computers would display the text incorrectly, or damage it during processing.
caret - MDN Web Docs Glossary: Definitions of Web-related terms
on the web, a caret is used to represent the insertion point in <input> and <textarea> elements, as well as any elements whose contenteditable attribute is
set, thereby allowing the contents of the element to be edited by the user.
... learn more general knowledge caret navigation on wikipedia css related to the caret you can
set the color of the caret for a given element's editable content by
setting the element's css caret-color property to the appropriate <color> value.
... <input type="text"> <input type="password"> <input type="search"> <input type="date">, <input type="time">, <input type="datetime">, and <input type="datetime-local"> <input type="number">, <input type="range"> <input type="email">, <input type="tel">, and <input type="url"> <textarea> any element with its contenteditable attribute
set ...
Pseudo-classes and pseudo-elements - Learn web development
previous overview: building blocks next the next
set of selectors we will look at are referred to as pseudo-classes and pseudo-elements.
...we have
set this to display: block in order that we can style it with a width and height.
... :default matches the one or more ui elements that are the default among a
set of similar elements.
Grids - Learn web development
gaps between tracks to create gaps between tracks we use the properties grid-column-gap for gaps between columns, grid-row-gap for gaps between rows, and grid-gap to
set both at once.
... the minmax() function lets us
set a minimum and maximum size for a track, for example minmax(100px, auto).
...we do this by
setting the value of grid-template-columns using repeat() notation, but instead of passing in a number, pass in the keyword auto-fill.
Supporting older browsers - Learn web development
display: inline-block this method can be used to create column layouts, if an item has display: inline-block
set but then becomes a flex or grid item, the inline-block behaviour is ignored.
...items that have css table layouts
set on them will lose this behaviour if they become flex or grid items.
... if we add a feature query to the above example, we can use it to
set the widths of our items back to auto if we know that we have grid support.
CSS layout - Learn web development
we have covered the necessary prerequisites so we can now dive deep into css layout, looking at different display
settings, modern layout tools like flexbox, css grid, and positioning, and some of the legacy techniques you might still want to know about.
... responsive design as more diverse screen sizes have appeared on web-enabled devices, the concept of responsive web design (rwd) has appeared: a
set of practices that allows web pages to alter their layout and appearance to suit different screen widths, resolutions, etc.
...you imagine your layout as a
set number of columns (e.g.
Styling text - Learn web development
here we look at text styling fundamentals including
setting font, boldness, italics, line and letter spacing, drop shadows, and other text features.
... fundamental text and font styling in this article we go through all the basics of text/font styling in detail, including
setting font weight, family and style, font shorthand, text alignment and other effects, and line and letter spacing.
... type
setting a community school homepage in this assessment we'll test your understanding of styling text by getting you to style the text for a community school's homepage.
Learn to style HTML using CSS - Learn web development
you should have a basic work environment
set up as detailed in installing basic software and understand how to create and manage files, as detailed in dealing with files — both of which are parts of our getting started with the web complete beginner's module.
...here we look at text styling fundamentals, including
setting font, boldness, italics, line and letter spacing, drop shadows and other text features.
...we have covered the necessary prerequisites so we can now dive deep into css layout, looking at different display
settings, modern layout tools like flexbox, css grid, and positioning, and some of the legacy techniques you might still want to know about.
How much does it cost to do something on the Web? - Learn web development
this cost varies depending on: local obligations: some country top-level domain names are more costly, as different countries
set different prices.
...“packaged” hosting when you want to publish a website, you could do everything by yourself:
set up a database (if needed), content management system, or cms (like wordpress, dotclear, spip, etc.), upload pre-made or your own templates.
... next steps now that you understand what kind of money your website may cost you, it's time to start designing that website and
setting up your work environment.
Example - Learn web development
a payment form html content <form method="post"> <h1>payment form</h1> <p>required fields are followed by <strong><abbr title="required">*</abbr></strong>.</p> <section> <h2>contact information</h2> <field
set> <legend>title</legend> <ul> <li> <label for="title_1"> <input type="radio" id="title_1" name="title" value="a"> ace </label> </li> <li> <label for="title_2"> <input type="radio" id="title_2" name="title" value="k" > king </label> </li> <li> <label for="title_3"> <input type="radio" id="title_3" name="title" value="q...
..."> queen </label> </li> </ul> </field
set> <p> <label for="name"> <span>name: </span> <strong><abbr title="required">*</abbr></strong> </label> <input type="text" id="name" name="username"> </p> <p> <label for="mail"> <span>e-mail: </span> <strong><abbr title="required">*</abbr></strong> </label> <input type="email" id="mail" name="usermail"> </p> <p> <label for="pwd"> <span>password: </span> <strong><abbr title="required">*</abbr></strong> </label> <input type="password" id="pwd" name="password"> </p> </section> <section> <h2>payment information</h2> <p> <label for="card"> <span>card type:</span> <...
... inline-block; width: 120px; text-align: right; } input, textarea { font: 1em sans-serif; width: 250px; box-sizing: border-box; border: 1px solid #999; } input[type=checkbox], input[type=radio] { width: auto; border: none; } input:focus, textarea:focus { border-color: #000; } textarea { vertical-align: top; height: 5em; resize: vertical; } field
set { width: 250px; box-sizing: border-box; margin-left: 136px; border: 1px solid #999; } button { margin: 20px 0 0 124px; } label { position: relative; } label em { position: absolute; right: 5px; top: 20px; } result ...
Dealing with files - Learn web development
dealing with files discusses some issues you should be aware of so you can
set up a sensible file structure for your website.
... styles folder: this folder will contain the css code used to style your content (for example,
setting text and background colors).
... <!doctype html> <html> <head> <meta char
set="utf-8"> <title>my test page</title> </head> <body> <img src="" alt="my test image"> </body> </html> the line <img src="" alt="my test image"> is the html code that inserts an image into the page.
Installing basic software - Learn web development
a version control system, to manage files on servers, collaborate on a project with a team, share code and as
sets and avoid editing conflicts.
...in this article, we'll just
set you up with a bare minimum — a text editor and some modern web browsers.
...you can find out how to do this in how do you
set up a local testing server?
Publishing your website - Learn web development
the available feature
set will be limited, but it might be perfect for your first experiments.
... these options are usually free, but you may outgrow the limited feature-
set.
...however, the features are limited, and these apps usually don't provide hosting space for as
sets (like images).
Getting started with the Web - Learn web development
you'll
set up the tools you need to construct a simple webpage and publish your own simple code.
...dealing with files explains how to
set up a sensible file structure for your website and what issues you should be aware of.
...for example, is my content a
set of paragraphs or a list of bullet points?
Mozilla splash page - Learn web development
to complete this section you'll need to insert an <img> element inside each one containing appropriate src, alt, src
set and sizes attributes.
... note: to properly test the src
set/sizes examples, you'll need to upload your site to a server (using github pages is an easy and free solution), then from there you can test whether they are working properly using browser developer tools such as the firefox network monitor.
...glitch is probably better for this example, as it allows you upload as
sets like images, whereas some of the other tools don't.
Making asynchronous programming easier with async and await - Learn web development
there is a pattern that can mitigate this problem —
setting off all the promise processes by storing the promise objects in variables, and then awaiting them all afterwards.
...both of them start off with a custom promise function that fakes an async process with a
settimeout() call: function timeoutpromise(interval) { return new promise((resolve, reject) => {
settimeout(function(){ resolve("done"); }, interval); }); }; then each one includes a timetest() async function that awaits three timeoutpromise() calls: async function timetest() { ...
... in the fast-async-await.html example, timetest() looks like this: async function timetest() { const timeoutpromise1 = timeoutpromise(3000); const timeoutpromise2 = timeoutpromise(3000); const timeoutpromise3 = timeoutpromise(3000); await timeoutpromise1; await timeoutpromise2; await timeoutpromise3; } here we store the three promise objects in variables, which has the effect of
setting off their associated processes all running simultaneously.
Test your skills: Events - Learn web development
dom manipulation: considered useful some of the questions below require you to write some dom manipulation code to complete them — such as creating new html elements,
setting their text contents to equal specific string values, and nesting them inside existing elements on the page — all via javascript.
... events 3 in our final events-related task, you need to
set an event listener on the <button>s' parent element (<div class="button-bar"> ...
... </div>), which when invoked by clicking any of the buttons will
set the background of the button-bar to the color contained in the button's data-color attribute.
JavaScript object basics - Learn web development
setting object members so far we've only looked at retrieving (or getting) object members — you can also
set (update) the value of object members by simply declaring the member you want to
set (using dot or bracket notation), like this: person.age = 45; person['name']['last'] = 'cratchit'; try entering the above lines, and then getting the members again to see how they've changed, like so: pers...
...on.age person['name']['last']
setting members doesn't just stop at updating the values of existing properties and methods; you can also create completely new members.
... try these in the js console: person['eyes'] = 'hazel'; person.farewell = function() { alert("bye everybody!"); } you can now test out your new members: person['eyes'] person.farewell() one useful aspect of bracket notation is that it can be used to
set not only member values dynamically, but member names too.
Adding a new todo form: Vue events, methods, and models - Learn web development
we can
set the initial value of the label to an empty string.
...v-model binds to the data property you
set on it and keeps it in sync with the <input>.
...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.
Handling common accessibility problems - Learn web development
note: this technique will only work if you
set your original event handlers via event handler properties (e.g.
... you should make sure interactive elements like buttons and links have appropriate focus/hover/active states
set, to give the user visual clues as to their function.
... previous overview: cross browser testing next in this module introduction to cross browser testing strategies for carrying out testing handling common html and css problems handling common javascript problems handling common accessibility problems implementing feature detection introduction to automated testing
setting up your own test automation environment ...
Client-side tooling overview - Learn web development
parcel is a particularly clever tool that fits into this category — it can do the above tasks, but also helps to package as
sets like html, css, and image files into convenient bundles that you can then go on to deploy, and also adds dependencies for you automatically whenever you try to use them.
... typescript: typescript is a super
set of javascript that offers a bunch of additional features.
... it often takes some time for new developer tools to
settle down in their complexity.
Mozilla accessibility architecture
each of these accessible nodes supports at minimum the generic cross-platform accessibility interface nsiaccessible (which provides a text name, enumerated role identifier and a
set of state flags) and sometimes additional interfaces.
...accessible tree contains only a sub
set of nodes from the dom tree not all dom nodes are exposed through accessibility api toolkits -- only those objects deemed important by the developers of the toolkit.
... above: a diagram showing that the msaa tree is a sub
set of the dom tree.
Mozilla's Section 508 Compliance
the default theme, classic, uses the operating system's font and color contrast
settings.
...the default theme, classic, uses gnome's font and color contrast
settings.
... (j) when a product permits a user to adjust color and contrast
settings, a variety of color selections capable of producing a range of contrast levels shall be provided.
Mozilla’s UAAG evaluation report
the uaag document contains a very rich
set of accessibility guidelines, that broadly define how accessibility should be implemented by any user agent, i.e.
... zooming can be controlled via hotkeys ctrl+plus and ctrl+minus the prefs are at preferences, appearances, fonts there is also a hidden pref line that can be added to prefs.js, if you just want to change the minimum font size for a certain font: user_pref("font.minimum-size.x-western", newfontsizeinpoints); for other i18n char
sets, change x-western to x-central-euro, x-cyrillic, x-unicode, x-user-def, x-baltic, el, tr, he, ar, th, ja, zh-cn or zh-tw 4.2 configure font family.
...(p1) vg provides a focus outline box highlights follow graphical rendering conventions for windows does not highlight selected images we do not have the ability to show a border around the text selection we have the following focus appearance prefs that are not exposed in the ui, but can be manually inserted in the user's prefs.js file:
setboolpref("browser.display.use_focus_colors", usefocuscolors); /* true or false */
setcharpref("browser.display.focus_background_color", colorstring); /* for example #ffeedd or the name of a color */
setcharpref("browser.display.focus_text_color", colorstring);
setcharpref("browser.display.focus_ring_width", numpixels); /* integer 0-4 */ 10.3 distinct default highlight styles.
Accessible Toolkit Checklist
abel) automatically define mnemonics for all standard common dialogs (like yes/no confirmations and retry/exit error dialogs) support mnemonics in dialogs created via method calls layout engine - drawing underline under correct letter events - making keystrokes do the right thing msaa support, via iaccessible's get_acckeyboardshortcut support for ms windows
settings when high contrast checkbox is
set (in accessibility control panel, spi_gethighcontrast), or when user selects a "native" skin option in your software, then get all look and feel from current os skin.
...l/scripts so that apps can alter behavior use system highlight color where possible for item selection, but never use that exact color in more than 1 place at a time, otherwise screen reader will read everything with that color whenever highlight changes pay attention to spi_getcaretwidth for the correct width of the caret pay attention to 'route mouse pointer to default button'
setting it's possible that the user wants mnemonics hidden except when the alt key is pressed.
...for autocomplete lists, use the system color off
set by 1, so that it looks active but the list items don't get echoed while they user's trying to simply type and edit.
Theme concepts
e, you wanted to tile a centrally justified image, such as to create this effect here you specify the weta image like this: "images": { "theme_frame": "empty.png", "additional_backgrounds": [ "weta_for_tiling.png"] }, and the images tiling with: "properties": { "additional_backgrounds_alignment": [ "top" ], "additional_backgrounds_tiling": [ "repeat" ] }, full details of how to
setup this theme can be found in the themes example weta_tiled.
...mages, say combining the original weta image with this one anchored to the left of the header to create this effect where the images are specified with: "images": { "theme_frame": "empty.png", "additional_backgrounds": [ "weta.png", "weta-left.png"] }, and their alignment by: "properties": { "additional_backgrounds_alignment": [ "right top" , "left top" ] }, full details of how to
setup this theme can be found in the themes example weta_mirror.
...theme_frame: 'sun.jpg', }, colors: { frame: '#cf723f', tab_background_text: '#111', } }, 'night': { images: { theme_frame: 'moon.jpg', }, colors: { frame: '#000', tab_background_text: '#fff', } } }; the theme.theme object is then passed to theme.update() to change the header theme, as in this code snippet from the same example: function
settheme(theme) { if (currenttheme === theme) { // no point in changing the theme if it has already been
set.
Cookies Preferences in Mozilla
network.cookie.cookiebehavior default value: 0 0 = accept all cookies by default 1 = only accept from the originating site (block third party cookies) 2 = block all cookies by default 3 = use p3p
settings (note: this is only applicable to older mozilla suite and seamonkey versions.) 4 = storage access policy: block cookies from trackers network.cookie.lifetimepolicy default value: 0 0 = accept cookies normally 1 = prompt for each cookie (prompting was removed in firefox 44) 2 = accept for current session only 3 = accept for n days network.cookie.lifetime.days default value: 90 only ...
...used if network.cookie.lifetimepolicy is
set to 3
sets the number of days that the lifetime of cookies should be limited to.
... network.cookie.alwaysacceptsessioncookies default value: false only used if network.cookie.lifetimepolicy is
set to 1 true = accepts session cookies without prompting false = prompts for session cookies network.cookie.thirdparty.sessiononly default value: false true = restrict third party cookies to the session only false = no restrictions on third party cookies network.cookie.maxnumber default value: 1000 configures the maximum amount of cookies to be stored valid range is from 0-65535, rfc 2109 and 2965 require this to be at least 300 network.cookie.maxperhost default value: 50 configures the maximum amount of cookies to be stored per host valid range is from 0-65535, rfc 2109 and 2965 require this to be at least 20 network.cookie.disablecookieformailnews default value: ...
Creating reftest-based unit tests
to run all the reftests, go to the directory where you save firefox's source code and run: ./mach reftest if you want to run a particular
set of reftests, pass the path as an argument: ./mach reftest path/from/sourcedir/reftest.list and to run a single reftest just pass the path to the test file (not the reference file): ./mach reftest path/from/sourcedir/reftest-name.html there is no reftest equivalent to mach mochitest --keep-open, but temporarily adding the reftest-wait class to a test (or disabling the script that removes it) ...
...it would be possible to try and wait for the initial rendering to be done using a
settimeout, but that would be unreliable, and just as bad, it can increase the time it takes to run a test many times over (which when you're running thousands of tests can really slow things down).
...the event bubbles up to the document and window so you can
set listeners there too.
Debugging Table Reflow
it can be invoked by
set gecko_block_debug_flags=reflow the available options are: reflow really-noisy-reflow max-element-size space-manager verify-lines damage-repair lame-paint-metrics lame-reflow-metrics disable-resize-opt these options can be combined with a comma separated list messages generated by the reflow switch: block(div)(1)@00be5ac4: reflowing dirty lines computedwidth=9000 computedheight=1500 this message is generated inside of nsresult nsbl...
...the first line of the data dump shows that no width has yet been assigned to the columns mcolwidths=-1 -1 -1 -1, -1 stands for: #define width_not_
set -1 this is followed by a reference to the column frame pointers: col frame cache -> 0=00b93138 1=00b931f0 2=024dd728 3=024dd780 this is followed by the information which width has been
set for each column.
...e to col spans #define pct 6 // percent width of cell or col #define pct_adj 7 // percent width of cell or col from percent colspan #define min_pro 8 // desired width due to proportional <col>s or cols attribute #define final 9 // width after the table has been balanced, considering all of the others in the last log snippet none of these width's has been
set.
Old Thunderbird build
windows build prerequisites gnu/linux build prerequisites mac os x build prerequisites get the source note: on windows, you won't be able to build the thunderbird source code if it's under a directory with spaces in the path (e.g., don't use "documents and
settings").
...on linux, this can manifest as problems
setting up the virtualenv for running tests (failure to install pip or virtualenv because of os access denied errors, where access is denied not because of permission problems, but because the paths being accessed have been truncated, and so do not exist).
... building thunderbird and lightning if you've
set up your build environment as above, then all you need to do is: echo 'ac_add_options --enable-calendar' >> mozconfig in the comm-central directory, or just add the ac_add_options --enable-calendar line to your mozconfig with your favorite editor.
Localization formats
.lang files provide some features that differentiate it from gettext: .lang is not dependent on php/.po library, so if our webdev team
sets up a site without gettext support, we still have .lang.
... (it should be noted that this is near impossibility since most sites will be
set up with gettext support.) .lang files can be easily edited in a text editor with this
setup, a localizer is given a "[something].lang" file containing all the strings needing localization.
..." "allez-y et montrez-le en téléchargeant et en imprimant votre " "certificat personnalisé firefox 3 download day." advantages of gettext gettext has very powerful tools to update this site (if you use the actual english strings in msgids, not unique identifier strings like certificate_intro) very established with a large
set of powerful tools harder to screw things up because existing tools will not allow localizers to edit the l10n file where they shouldn't separates localizable strings available for localizers for the rest of the code, protecting it from unintended changes disadvantage of gettext .po file needs to be compiled into a .mo file for localizer to see changes using regular diff to see changes to ...
Extras
<mtable> <mtr> <mtd><mn>1</mn></mtd> <mtd> <mtext> <img width="16" height="16" src="https://udn.realityripple.com/samples/3f/9341cbddc0.png" alt="mozilla-16" /> </mtext> </mtd> </mtr> <mtr> <mtd> <mtext><input value="type" size="4"/></mtext> </mtd> <mtd><mn>4</mn></mtd> </mtr> </mtable> <mo>]</mo> </mrow> </math> <math display="block"> <msqrt> <mpadded width="30px" height="15px" depth="15px" voff
set="-15px"> <mtext> <svg width="30px" height="30px"> <defs> <radialgradient id="radgrad1" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop off
set="0%" style="stop-color:rgb(255,255,255); stop-opacity:1;"/> <stop off
set="100%" style="stop-color:rgb(255,0,0); stop-opacity:.8;"/> </radialgradient> </defs> <g transform="translate(15,1...
... l 30 15 l 20 20 l 15 30 l 10 20 l 0 15 l 10 10"/> </g> </g> </g> </svg> </mtext> </mpadded> </msqrt> <mo>=</mo> <msubsup> <mo>∫</mo> <mn>0</mn> <mfrac> <mi>π</mi> <mn>2</mn> </mfrac> </msubsup> <msup> <mi>θ</mi> <mtext> <svg width="15px" height="15px"> <defs> <radialgradient id="radgrad2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop off
set="0%" style="stop-color:rgb(255,255,255); stop-opacity:1;"/> <stop off
set="100%" style="stop-color:rgb(0,0,255); stop-opacity:.9;"/> </radialgradient> </defs> <g> <animatemotion path="m0,0 l3,0 l2,5 l5,5 l0,4 l5,2 z" begin="0s" dur="0.5s" repeatcount="indefinite"/> <circle fill="url(#radgrad2)" r="5px" cx="5px" cy="5px"/> </g> </svg> </m...
...text> </msup> <mrow> <mo>ⅆ</mo> <mi>θ</mi> </mrow> </math> <div style="width: 300px; margin-left: auto; margin-right: auto;"> <svg width="300px" height="250px"> <defs> <lineargradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%"> <stop off
set="0%" style="stop-color:rgb(0,0,255);stop-opacity:1"/> <stop off
set="100%" style="stop-color:rgb(0,255,0);stop-opacity:1"/> </lineargradient> <lineargradient id="grad2" x1="0%" y1="0%" x2="0%" y2="100%"> <stop off
set="0%" style="stop-color:rgb(255,0,0);stop-opacity:1"/> <stop off
set="100%" style="stop-color:rgb(255,255,0);stop-opacity:1"/> </lineargradient> <radialgradient id="grad3" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop off
set="0%" style="stop-color:rgb(0,255,255);stop-opacity:1"/> <stop off
set="100%" style="stop-color:rgb(255,255,255)...
Fonts for Mozilla's MathML engine
advanced
setup arabic mathematical alphabetic symbols currently, very few fonts have appropriate glyphs for the arabic mathematical alphabetic symbols.
...alternatively, you can try the mathml-font
settings add-on.
...rn math libertinus math lucida bright math minion math stix math tex gyre bonum math tex gyre pagella math tex gyre schola math tex gyre termes math xits math fira math (sans-serif typeface, under development) gfs neohellenic math (sans-serif typeface) using mathematical fonts on web pages starting with gecko 31.0 (firefox 31.0 / thunderbird 31.0 / seamonkey 2.28), it is now easy to
set up the css style (and optional woff fonts) to use on your web site.
Fonts for Mozilla 2.0's MathML engine
recommended fonts the stix fonts project has been developing a comprehensive
set of fonts that cover all the symbols in mathml and also contains glyphs to stretch mathematical operators.
... re
set old preferences if users have previously changed the "font.mathfont-family" preference for a previous version of mozilla, then it is best to re
set this to the default value.
... to do this, enter the url "about:config", "filter" for "mathfont", and "re
set" to the default value through the context menu on the preference.
MathML In Action
next to it is this tiny formula, det | a c b d | = a d - b c , which can also be type
set in displaystyle as det | a b c d | = a d - b c .
... mathematical type
setting is picky.
...mrow> </msqrt> </mrow> <mrow> <mn>2</mn> <mi>a</mi> </mrow> </mfrac> </mrow> </mstyle> </math> </p> javascript content function zoomtoggle() { if (this.hasattribute("mathsize")) { this.removeattribute("mathsize"); } else { this.
setattribute("mathsize", "200%"); } } function load() { document.getelementbyid("zoomablemath").
MathML Demo: <mtable> - tables and matrices
by default -- when the align attribute is not
set, or when align="axis", the middle of the table coincides with the math axis.
...do you see which vertical alignment is
set on that table?
...d+p ( α β γ δ ) ...--- , but note that
setting the baseline relative to a particular row is meaningless if the row doesn't have at least one cell with "rowalign=baseline" where to anchor the baseline (in which case mozilla will behave as if it was align="center#rownumber").
JS::PerfMeasurement
perfmeasurement::perfmeasurement(eventmask tomeasure) the constructor creates a new profiling object, which measures some sub
set of the requested events.
... it will not have any more bits
set than were
set in the mask passed to the constructor, but if the os cannot or will not measure all of the requested events, then only those events that will actually be measured have their bits
set.
...void re
set() re
sets all enabled counters to zero.
Measuring performance using the PerfMeasurement.jsm code module
now we want to benchmark a function that is pretty fast (but not fast enough), so we run it several thousand times: for (let i = 0; i < 10000; i++) {
set_up_some_state(); monitor.start(); code_to_be_benchmarked(); monitor.stop(); clean_up_afterward(); } we call the perfmeasurement object's start() method when we want to start recording, and stop() when we want to stop recording.
...since we enable monitoring immediately before calling code_to_be_benchmarked(), and disable it as soon as it returns, the code in
set_up_some_state() and clean_up_afterward() is not measured.
... when you're done benchmarking, you can read out each of the counters you asked for as properties: let report = "cpu cycles: " + monitor.cpu_cycles + "\n" + "cache refs: " + monitor.cache_references + "\n" + "cache misses: " + monitor.cache_misses + "\n"; monitor.re
set(); alert(report); the re
set() method clears all of the enabled counters, as you might expect.
Memory Profiler
you may need to
set the "xpinstall.signatures.required" pref to false in order to install it, since the xpi is not yet signed.
... start - start profiling stop - stop profiling re
set - clear profile data when profiler is stopped profile data is accumulated and resumed after start.
... use re
set to start a new recording.
Profiling with Xperf
for 64-bit windows 7 or vista, you'll need to do a registry tweak and then restart to enable stack walking: reg add "hklm\system\currentcontrol
set\control\session manager\memory management" -v disablepagingexecutive -d 0x1 -t reg_dword -f symbol server
setup with the latest versions of the windows performance toolkit, you can modify the symbol path directly from within the program via the trace menu.
... just make sure you
set the symbol paths before enabling "load symbols" and before opening a summary view.
...capturing heap data the "-heap" option is used to
set up heap tracing.
tools/power/rapl
sudo $objdir/dist/bin/rapl alternatively, it can be run without root privileges by
setting the contents of /proc/sys/kernel/perf_event_paranoid to 0.
... note that if you do change this file, its contents may re
set when the machine is next rebooted.
...a warning is given if you
set it below 50 because that is likely to lead to inaccurate estimates.
Profile Manager
firefox and other xulrunner applications store user
settings and data in special folders, called profiles.
... ability to copy certain as
sets (e.g., bookmarks) between profiles.
... ability to re
set a profile (return it to a default state excluding bookmarks and passwords).
Introduction to NSPR
these resources include the thread stack and the cpu register
set (including pc).
...
setting thread priorities preempting threads interrupting threads for reference information on the nspr api used for thread scheduling, see threads.
...
setting thread priorities the host operating systems supported by nspr differ widely in the mechanisms they use to support thread priorities.
NSPR Error Handling
this chapter describes the functions for retrieving and
setting errors and the error codes
set by nspr.
... error type prerrorcode error functions pr_
seterror pr_
seterrortext pr_geterror pr_getoserror pr_geterrortextlength pr_geterrortext error codes error codes defined in prerror.h: pr_out_of_memory_error insufficient memory to perform request.
... pr_connect_re
set_error the (tcp) connection has been re
set by the peer.
PRIOMethods
o64fn fileinfo64; prwritevfn writev; prconnectfn connect; pracceptfn 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; pr
setsockoptfn
setsockopt; }; typedef struct priomethods priomethods; parameters file_type type of file represented (tos).
... getsockopt get current
setting of specified socket option.
...
setsockopt
set value of specified socket option.
PR_LocalTimeParameters
returns the time zone off
set information that maps the specified prexplodedtime to local time.
... syntax #include <prtime.h> prtimeparameters pr_localtimeparameters ( const prexplodedtime *gmt); parameter gmt a pointer to the clock/calendar time whose off
sets are to be determined.
... returns a time parameters structure that expresses the time zone off
sets at the specified time.
Encrypt Decrypt MAC Keys As Session Objects
f(pr_stderr, "error while wrapping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_
seterror(pr_end_of_file_error); return secfailure; } rv = pk11_generaterandom(iv, blocksize); if (rv != secsuccess) { goto cleanup; } } else { /* generate a random value to use as iv for aes cbc */ generaterandom(iv, blocksize); } headerfile = pr_open(headerfilename, pr_create_file | pr_trun...
...*/ rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initreadwrite failed\n"); goto cleanup; } pk11_
setpasswordfunc(getmodulepassword); slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); goto cleanup; } } ...
... rv = encryptfile(slot, dbdir, infilename, headerfilename, encryptedfilename, noisefilename, &pwdata, ascii); if (rv != secsuccess) { pr_fprintf(pr_stderr, "encryptfile : failed\n"); return secfailure; } break; case decrypt: /* open db read only, authenticate to it */ pk11_
setpasswordfunc(getmodulepassword); rv = nss_init(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_init failed\n"); return secfailure; } slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, ...
Encrypt and decrypt MAC using token
f(pr_stderr, "error while wrapping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_
seterror(pr_end_of_file_error); return secfailure; } rv = pk11_generaterandom(iv, blocksize); if (rv != secsuccess) { goto cleanup; } } else { /* generate a random value to use as iv for aes cbc */ generaterandom(iv, blocksize); } headerfile = pr_open(headerfilename, pr_create_file | pr_trun...
...*/ rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initreadwrite failed\n"); goto cleanup; } pk11_
setpasswordfunc(getmodulepassword); slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); goto cleanup; } } ...
... rv = encryptfile(slot, dbdir, infilename, headerfilename, encryptedfilename, noisefilename, &pwdata, ascii); if (rv != secsuccess) { pr_fprintf(pr_stderr, "encryptfile : failed\n"); return secfailure; } break; case decrypt: /* open db read only, authenticate to it */ pk11_
setpasswordfunc(getmodulepassword); rv = nss_init(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_init failed\n"); return secfailure; } slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, ...
NSS 3.12.5 release_notes
if an application depends on renegotiation feature, it can be enabled by
setting the environment variable nss_ssl_enable_renegotiation to 1.
... by
setting this environmental variable, the fix provided by these patches will have no effect and the application may become vulnerable to the issue.
... this default
setting can also be changed within the application by using the following existing api functions: secstatus ssl_option
set(prfiledesc *fd, print32 option, prbool on) secstatus ssl_option
setdefault(print32 option, prbool on) there is now a new value for "option", which is: ssl_enable_renegotiation the corresponding new values for ssl_enable_renegotiation are: ssl_renegotiate_never: never renegotiate at all (default).
NSS 3.15.4 release notes
new functions cert_forcepostmethodforocsp cert_getsubjectnamedigest cert_getsubjectpublickeydigest ssl_peercertificatechain ssl_recommendedcanfalsestart ssl_
setcanfalsestartcallback new types cert_rev_m_force_post_method_for_ocsp: when this flag is used, libpkix will never attempt to use the http get method for ocsp requests; it will always use post.
... updated the
set of root ca certificates (version 1.96).
...in addition to enabling the ssl_enable_false_start option, an application must now register a callback using the ssl_
setcanfalsestartcallback function.
NSS 3.15 release notes
tls client applications may enable this via a call to ssl_option
setdefault(ssl_enable_ocsp_stapling, pr_true); added function secitem_reallocitemv2.
... ssl_
setstapledocspresponses -
set's a stapled ocsp response for a tls server socket to return when clients send the status_request extension.
... new macros in ssl.h ssl_enable_ocsp_stapling - used with ssl_option
set to configure tls client sockets to request the certificate_status extension (eg: ocsp stapling) when
set to pr_true notable changes in nss 3.15 secitem_reallocitem is now deprecated.
NSS 3.22 release notes
pk11_createpbev2algorithmid() now supports sec_oid_pkcs5_pbkdf2 with cipheralgtag and prfalgtag
set to sec_oid_hmac_sha256, sec_oid_hmac_sha224, sec_oid_hmac_sha384, or sec_oid_hmac_sha512.
... in ssl.h ssl_peersignedcerttimestamps - get signed_certificate_timestamp tls extension data ssl_
setsignedcerttimestamps -
set signed_certificate_timestamp tls extension data new types in secoidt.h the following are added to secoidtag: sec_oid_aes_128_gcm sec_oid_aes_192_gcm sec_oid_aes_256_gcm sec_oid_idea_cbc sec_oid_rc2_40_cbc sec_oid_des_40_cbc sec_oid_rc4_40 sec_oid_rc4_56 sec_oid_null_cipher sec_oid_hmac_md5 sec_o...
...
set the nss_disable_gtests variable to 1 to disable building these tests.
NSS 3.28 release notes
ssl_signatureschemepref
set allows an application to
set which signature schemes should be supported in tls and to specify the preference order of those schemes.
... new functions to configure signature schemes are provided: ssl_signatureschemepref
set, ssl_signatureschemeprefget.
... the old ssl_signaturepref
set and ssl_signaturepref
set functions are now deprecated.
NSS 3.48 release notes
because using an iteration count higher than 1 with the legacy dbm (key3.db) storage creates files that are incompatible with previous versions of nss, applications that wish to enable it for key3.db are required to
set environment variable nss_allow_legacy_dbm_iteration_count=1.
... applications may
set environment variable nss_min_mp_pbe_iteration_count to request a higher iteration count than the library's default, or nss_max_mp_pbe_iteration_count to request a lower iteration count for test environments.
...a::pkix gtests in nss ci bug 1591315 - update nsc_decrypt length in constant time bug 1562671 - increase nss mp kdf default iteration count, by default for modern key4 storage, optionally for legacy key3.db storage bug 1590972 - use -std=c99 rather than -std=gnu99 bug 1590676 - fix build if arm doesn't support neon bug 1575411 - enable tls extended master secret by default bug 1590970 - ssl_
settimefunc has incomplete coverage bug 1590678 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1588244 - nss changes for delegated credential key strength checks bug 1459141 - add more cbc padding tests that missed nss 3.47 bug 1590339 - fix a memory leak in btoa.c bug 1589810 - fix uninitialized variable warnings from certdata.perl bug 1573118 - enable tls 1.3 by default in nss th...
NSS 3.53 release notes
at that time, users will need to
set the compile-time flag (bug 1622033) to disable that deprecation in order to use the algorithm.
... several root certificates in the mozilla program now
set the cka_nss_server_distrust_after attribute, which nss consumers can query to further refine trust decisions.
... 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.
Enc Dec MAC Output Public Key as CSR
name, ascii); if (rv) { rv = secfailure; goto cleanup; } certreq = (certcertificaterequest*) port_arenazalloc (arena, sizeof(certcertificaterequest)); if (!certreq) { rv = secfailure; goto cleanup; } certreq->arena = arena; /* since cert request is a signed data, must decode to get the inner data */ port_mem
set(&signeddata, 0, sizeof(signeddata)); rv = sec_asn1decodeitem(arena, &signeddata, sec_asn1_get(cert_signeddatatemplate), &reqder); if (rv) { rv = secfailure; goto cleanup; } rv = sec_asn1decodeitem(arena, certreq, sec_asn1_get(cert_certificaterequesttemplate), &signeddata.data); if (rv) { rv = secfa...
...intf(pr_stderr, "error while wrapping encrypt key\n"); goto cleanup; } /* wrap mac key */ rv = wrapkey(mackey, pubkey, &wrappedmackey); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrapping mac key\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_
seterror(pr_end_of_file_error); return secfailure; } rv = pk11_generaterandom(iv, blocksize); if (rv != secsuccess) { goto cleanup; } } else { /* generate a random value to use as iv for aes cbc */ generaterandom(iv, blocksize); } headerfile = pr_open(headerfilename, pr_create_file | pr_trun...
...*/ rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initreadwrite failed\n"); goto cleanup; } pk11_
setpasswordfunc(getmodulepassword); slot = pk11_getinternalkeyslot(); rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); goto cleanup; } switch (cmd) { case gen_csr: /* validate command for generate csr */ if (!ce...
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
ame, ascii); if (rv) { rv = secfailure; goto cleanup; } certreq = (certcertificaterequest*) port_arenazalloc (arena, sizeof(certcertificaterequest)); if (!certreq) { rv = secfailure; goto cleanup; } certreq->arena = arena; /* since cert request is a signed data, must decode to get the inner data */ port_mem
set(&signeddata, 0, sizeof(signeddata)); rv = sec_asn1decodeitem(arena, &signeddata, sec_asn1_get(cert_signeddatatemplate), &reqder); if (rv) { rv = secfailure; goto cleanup; } rv = sec_asn1decodeitem(arena, certreq, sec_asn1_get(cert_certificaterequesttemplate), &signeddata.data); if (rv) { ...
...pr_fprintf(pr_stderr, "unable to retrieve key %s\n", issuernickname); goto cleanup; } } arena = cert->arena; algid = sec_getsignaturealgorithmoidtag(privkey->keytype, hashalgtag); if (algid == sec_oid_unknown) { pr_fprintf(pr_stderr, "unknown key or hash type for issuer.\n"); goto cleanup; } rv = secoid_
setalgorithmid(arena, &cert->signature, algid, 0); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not
set signature algorithm id.\n%s\n", port_errortostring(rv)); goto cleanup; } /* we only deal with cert v3 here */ *(cert->version.data) = 2; cert->version.len = 1; der.len = 0; der.data = null; dummy = sec_asn1encodei...
... pl_destroyoptstate(optstate); if (cmd == unknown || !dbdir) usage(progname); /* open db for read/write and authenticate to it */ pr_init(pr_user_thread, pr_priority_normal, 0); initialized = pr_true; rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initreadwrite failed\n"); goto cleanup; } pk11_
setpasswordfunc(getmodulepassword); slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); goto cleanup; } } switch (cmd) { case gene...
Encrypt Decrypt_MAC_Using Token
f(pr_stderr, "error while wrapping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_
seterror(pr_end_of_file_error); return secfailure; } rv = pk11_generaterandom(iv, blocksize); if (rv != secsuccess) { goto cleanup; } } else { /* generate a random value to use as iv for aes cbc.
...*/ rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initreadwrite failed\n"); goto cleanup; } pk11_
setpasswordfunc(getmodulepassword); slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); goto cleanup; } } ...
...*/ pk11_
setpasswordfunc(getmodulepassword); rv = nss_init(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_init failed\n"); return secfailure; } slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr,...
NSS Sample Code Sample_2_Initialization of NSS
try again.\n"); } /* clear out the duplicate password string */ if (p1) { port_mem
set(p1, 0, port_strlen(p1)); port_free(p1); } fclose(input); fclose(output); return p0; } /* change the password */ secstatus changepw(pk11slotinfo *slot, char *oldpass, char *newpass, char *oldpwfile, char *newpwfile) { secstatus rv; secupwdata pwdata; secupwdata newpwdata; char *oldpw = null; char *newpw = null; if (oldpass)...
... try again.\n"); } else { pr_fprintf(pr_stderr, "invalid password.\n"); port_mem
set(oldpw, 0, pl_strlen(oldpw)); port_free(oldpw); return secfailure; } } else { break; } port_free(oldpw); } newpw = initslotpassword(slot, pr_false, &newpwdata); if (pk11_changepw(slot, oldpw, newpw) != secsuccess) { pr_fprintf(pr_stderr, "failed to change...
... password.\n"); return secfailure; } port_mem
set(oldpw, 0, pl_strlen(oldpw)); port_free(oldpw); pr_fprintf(pr_stdout, "password changed successfully.\n"); } port_mem
set(newpw, 0, pl_strlen(newpw)); port_free(newpw); return secsuccess; } /* * this example illustrates initialization of the nss database.
NSS Sample Code Sample_3_Basic Encryption and MACing
f(pr_stderr, "error while wrapping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_
seterror(pr_end_of_file_error); return secfailure; } rv = pk11_generaterandom(iv, blocksize); if (rv != secsuccess) { goto cleanup; } } else { /* generate a random value to use as iv for aes cbc */ generaterandom(iv, blocksize); } headerfile = pr_open(headerfilename, pr_create_file | pr_trun...
...*/ rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initreadwrite failed\n"); goto cleanup; } pk11_
setpasswordfunc(getmodulepassword); slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); goto cleanup; } } ...
... rv = encryptfile(slot, dbdir, infilename, headerfilename, encryptedfilename, noisefilename, &pwdata, ascii); if (rv != secsuccess) { pr_fprintf(pr_stderr, "encryptfile : failed\n"); return secfailure; } break; case decrypt: /* open db read only, authenticate to it */ pk11_
setpasswordfunc(getmodulepassword); rv = nss_init(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_init failed\n"); return secfailure; } slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, ...
NSS Sample Code Utilities_1
info.size)) { numbytes = pr_read(src, dst->data, info.size); if (numbytes == info.size) { return secsuccess; } } secitem_freeitem(dst, pr_false); dst->data = null; return secfailure; } /* * echooff */ static void echooff(int fd) { if (isatty(fd)) { struct termios tio; tcgetattr(fd, &tio); tio.c_lflag &= ~echo; tc
setattr(fd, tcsaflush, &tio); } } /* * echoon */ static void echoon(int fd) { if (isatty(fd)) { struct termios tio; tcgetattr(fd, &tio); tio.c_lflag |= echo; tc
setattr(fd, tcsaflush, &tio); } } /* * checkpassword */ prbool checkpassword(char *cp) { int len; char *end; len = port_strlen(cp); if (len < 8) { return pr_false; } en...
...ull:\n\n"); fprintf(stderr, "%s", meter); fprintf(stderr, "\r|"); /* turn off echo on stdin & return on 1 char instead of nl */ fd = fileno(stdin); tcgetattr(fd, &tio); orig_lflag = tio.c_lflag; orig_cc_min = tio.c_cc[vmin]; orig_cc_time = tio.c_cc[vtime]; tio.c_lflag &= ~echo; tio.c_lflag &= ~icanon; tio.c_cc[vmin] = 1; tio.c_cc[vtime] = 0; tc
setattr(fd, tcsaflush, &tio); /* get random noise from keyboard strokes */ count = 0; while (count < rsize) { c = getc(stdin); if (c == eof) { rv = secfailure; break; } *(rbuf + count) = c; if (count == 0 || c != *(rbuf + count -1)) { count++; fprintf(stderr, "*"); } } rbuf[count] = '\0...
... press enter to continue: "); while ((c = getc(stdin)) != '\n' && c != eof) ; if (c == eof) rv = secfailure; fprintf(stderr, "\n"); /*
set back termio the way it was */ tio.c_lflag = orig_lflag; tio.c_cc[vmin] = orig_cc_min; tio.c_cc[vtime] = orig_cc_time; tc
setattr(fd, tcsaflush, &tio); return rv; } /* * seedfromnoisefile */ secstatus seedfromnoisefile(const char *noisefilename) { char buf[2048]; prfiledesc *fd; print32 count; fd = pr_open(noisefilename, pr_rdonly, 0); if (!fd) { fprintf(stderr, "failed to open noise file."); return secfailure; } do { count = pr_read(fd,buf,sizeof(buf)); if (count > 0) { pk11_randomupdate(buf...
NSS Sample Code sample3
functions, which does not * require a nss database to exist */ nss_nodb_init("."); /* get a slot to use for the crypto operations */ slot = pk11_getinternalkeyslot(); if (!slot) { cout << "getinternalkeyslot failed" << endl; status = 1; goto done; } /* * part 1 - simple hashing */ cout << "part 1 -- simple hashing" << endl; /* initialize data */ mem
set(data, 0xbc, sizeof data); /* create a context for hashing (digesting) */ context = pk11_createdigestcontext(sec_oid_md5); if (!context) { cout << "createdigestcontext 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 << "d...
... s = pk11_digestfinal(context, digest, &len, sizeof digest); if (s != secsuccess) { cout << "digestfinal failed" << endl; goto done; } /* print digest */ printdigest(digest, len); pk11_destroycontext(context, pr_true); context = 0; /* * part 2 - hashing with included secret key */ cout << "part 2 -- hashing with included secret key" << endl; /* initialize data */ mem
set(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 noparams; noparams.type = sibuffer; noparams.data = 0; noparams.len = 0...
...<< endl; goto done; } s = pk11_digestfinal(context, digest, &len, sizeof digest); if (s != secsuccess) { 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 */ mem
set(data, 0xbc, sizeof data); context = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, key, &noparams); 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" <<...
NSS Sample Code sample4
nss sample code 4: pki encryption /* example code to illustrate pki crypto ops (encrypt with public key, * decrypt with private key) * * code assumes that you have
set up a nss database with a certificate * and a private key.
...-1 -2 -5 * * there are many ways to
setup a public/private key to use - this * example shows one of them.
...ommunication * channel */ char *passwdcb(pk11slotinfo *info, prbool retry, void *arg); int main(int argc, char **argv) { secstatus rv; certcertificate *cert = null; seckeypublickey *pubkey = null; seckeyprivatekey *pvtkey = null; int modulus_len, i, outlen; char *buf1 = null; char *buf2 = null; /* initialize nss */ pk11_
setpasswordfunc(passwdcb); rv = nss_init("."); if (rv != secsuccess) { fprintf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); goto cleanup; } cert = pk11_findcertfromnickname("testca", null); if (cert == null) { fprintf(stderr, "couldn't find cert testca in nss db (err %d)\n", pr_geterror()); goto cleanup; } pubkey = cert_ex...
Initialize NSS database - sample 2
try again.\n"); } /* clear out the duplicate password string */ if (p1) { port_mem
set(p1, 0, port_strlen(p1)); port_free(p1); } fclose(input); fclose(output); return p0; } /* * changepw */ secstatus changepw(pk11slotinfo *slot, char *oldpass, char *newpass, char *oldpwfile, char *newpwfile) { secstatus rv; secupwdata pwdata; secupwdata newpwdata; char *oldpw = null; char *newpw = null; if (oldpass) { pwdat...
... try again.\n"); } else { pr_fprintf(pr_stderr, "invalid password.\n"); port_mem
set(oldpw, 0, pl_strlen(oldpw)); port_free(oldpw); return secfailure; } } else { break; } port_free(oldpw); } newpw = initslotpassword(slot, pr_false, &newpwdata); if (pk11_changepw(slot, oldpw, newpw) != secsuccess) { pr_fprintf(pr_stderr, "failed to change...
... password.\n"); return secfailure; } port_mem
set(oldpw, 0, pl_strlen(oldpw)); port_free(oldpw); pr_fprintf(pr_stdout, "password changed successfully.\n"); } port_mem
set(newpw, 0, pl_strlen(newpw)); port_free(newpw); return secsuccess; } /* * this example illustrates initialization of the nss database.
EncDecMAC using token object - sample 3
_id */ rv = gathercka_id(enckey, &encckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "error while wrapping encrypt key\n"); goto cleanup; } /* get the mac key cka_id */ rv = gathercka_id(mackey, &macckaid); if (rv != secsuccess) { pr_fprintf(pr_stderr, "can't get the mac key cka_id.\n"); goto cleanup; } if (noisefilename) { rv = seedfromnoisefile(noisefilename); if (rv != secsuccess) { port_
seterror(pr_end_of_file_error); return secfailure; } rv = pk11_generaterandom(iv, blocksize); if (rv != secsuccess) { goto cleanup; } } else { /* generate a random value to use as iv for aes cbc */ generaterandom(iv, blocksize); } headerfile = pr_open(headerfilename, pr_create_file | pr_truncate | pr_rdwr, 00660); if (!headerfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", header...
...*/ rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initreadwrite failed\n"); goto cleanup; } pk11_
setpasswordfunc(getmodulepassword); slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); goto cleanup; } } rv = encryptfile(slot, dbdir, infilename, headerfilename, encryptedfilename, noisefilename, &pwdata, ascii); if (rv != secsucc...
...ess) { pr_fprintf(pr_stderr, "encryptfile : failed\n"); return secfailure; } break; case decrypt: /* open db read only, authenticate to it */ pk11_
setpasswordfunc(getmodulepassword); rv = nss_init(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_init failed\n"); return secfailure; } slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); goto cleanup; } } rv = decryptfile(slot, dbdir, outfilename, headerfilename, encryptedfilename, &pwdata, ascii); if (rv != secsuccess) { pr_fprintf(pr_stderr, "decryptfile : failed\n"); return secfailure; } break; } cleanup: rvshutdown = nss_shutdown(); if (rvshutdown != secsuccess) { ...
Utilities for nss samples
info.size)) { numbytes = pr_read(src, dst->data, info.size); if (numbytes == info.size) { return secsuccess; } } secitem_freeitem(dst, pr_false); dst->data = null; return secfailure; } /* * echooff */ static void echooff(int fd) { if (isatty(fd)) { struct termios tio; tcgetattr(fd, &tio); tio.c_lflag &= ~echo; tc
setattr(fd, tcsaflush, &tio); } } /* * echoon */ static void echoon(int fd) { if (isatty(fd)) { struct termios tio; tcgetattr(fd, &tio); tio.c_lflag |= echo; tc
setattr(fd, tcsaflush, &tio); } } /* * checkpassword */ prbool checkpassword(char *cp) { int len; char *end; len = port_strlen(cp); if (len < 8) { return pr_false; } en...
...ull:\n\n"); fprintf(stderr, "%s", meter); fprintf(stderr, "\r|"); /* turn off echo on stdin & return on 1 char instead of nl */ fd = fileno(stdin); tcgetattr(fd, &tio); orig_lflag = tio.c_lflag; orig_cc_min = tio.c_cc[vmin]; orig_cc_time = tio.c_cc[vtime]; tio.c_lflag &= ~echo; tio.c_lflag &= ~icanon; tio.c_cc[vmin] = 1; tio.c_cc[vtime] = 0; tc
setattr(fd, tcsaflush, &tio); /* get random noise from keyboard strokes */ count = 0; while (count < rsize) { c = getc(stdin); if (c == eof) { rv = secfailure; break; } *(rbuf + count) = c; if (count == 0 || c != *(rbuf + count -1)) { count++; fprintf(stderr, "*"); } } rbuf[count] = '\0...
... press enter to continue: "); while ((c = getc(stdin)) != '\n' && c != eof) ; if (c == eof) rv = secfailure; fprintf(stderr, "\n"); /*
set back termio the way it was */ tio.c_lflag = orig_lflag; tio.c_cc[vmin] = orig_cc_min; tio.c_cc[vtime] = orig_cc_time; tc
setattr(fd, tcsaflush, &tio); return rv; } /* * seedfromnoisefile */ secstatus seedfromnoisefile(const char *noisefilename) { char buf[2048]; prfiledesc *fd; print32 count; fd = pr_open(noisefilename, pr_rdonly, 0); if (!fd) { fprintf(stderr, "failed to open noise file."); return secfailure; } do { count = pr_read(fd,buf,sizeof(buf)); if (count > 0) { pk11_randomupdate(buf...
sample2
if (arena == null) { rv = secfailure; goto cleanup; } rv = readderfromfile(&reqder, infilename, ascii); if (rv) { rv = secfailure; goto cleanup; } certreq = (certcertificaterequest*) port_arenazalloc (arena, sizeof(certcertificaterequest)); if (!certreq) { rv = secfailure; goto cleanup; } certreq->arena = arena; /* since cert request is a signed data, must decode to get the inner data */ port_mem
set(&signeddata, 0, sizeof(signeddata)); rv = sec_asn1decodeitem(arena, &signeddata, sec_asn1_get(cert_signeddatatemplate), &reqder); if (rv) { rv = secfailure; goto cleanup; } rv = sec_asn1decodeitem(arena, certreq, sec_asn1_get(cert_certificaterequesttemplate), &signeddata.data); if (rv) { rv = secfailure; goto cleanup; } rv = cert_verifysigneddatawithpublickeyinfo(&signeddata, &certreq->subjectpub...
..._findkeybyanycert(issuer, pwarg); cert_destroycertificate(issuer); if (caprivatekey == null) { pr_fprintf(pr_stderr, "unable to retrieve key %s\n", issuernickname); goto cleanup; } } arena = cert->arena; algid = sec_getsignaturealgorithmoidtag(privkey->keytype, hashalgtag); if (algid == sec_oid_unknown) { pr_fprintf(pr_stderr, "unknown key or hash type for issuer.\n"); goto cleanup; } rv = secoid_
setalgorithmid(arena, &cert->signature, algid, 0); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not
set signature algorithm id.\n%s\n", port_errortostring(rv)); goto cleanup; } /* we only deal with cert v3 here */ *(cert->version.data) = 2; cert->version.len = 1; der.len = 0; der.data = null; dummy = sec_asn1encodeitem (arena, &der, cert, sec_asn1_get(cert_certificatetemplate)); if (!dummy) {...
... 'v': sigverify = pr_true; break; default: usage(progname); break; } } pl_destroyoptstate(optstate); if (cmd == unknown || !dbdir) usage(progname); /* open db for read/write and authenticate to it */ pr_init(pr_user_thread, pr_priority_normal, 0); initialized = pr_true; rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initreadwrite failed\n"); goto cleanup; } pk11_
setpasswordfunc(getmodulepassword); slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); goto cleanup; } } switch (cmd) { case generate_csr: validategeneratecsrcommand(progname, dbdir, subject, subjectstr, certreqfilename); /* genera...
NSS Tools sslstrength
firstly, you can
set policy to be either domestic or export.
... this restricts the available ciphers to the same
set used by communicator.
... policy=export or policy=domestic will
set your policies appropriately.
Migration to HG
most parts of the nss build instructions remain valid, especially the instructions about
setting environment variables.
... updated instructions for building nss with nspr can be found at: /docs/nss_reference/building_and_installing_nss/build_instructions it's best to refer to the above document to learn about the various environment variables that you might have to
set to build on your platform (this part hasn't changed).
... however, below is a brief summary that shows how to checkout the source code and build both nspr and nss: mkdir workarea cd workarea hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss cd nss #
set use_64=1 on 64 bit architectures #
set build_opt=1 to get an optimized build make nss_build_all note that the jss project has been given a private copy of the former mozilla/security/coreconf directory, allowing it to remain stable, and only update its build system as necessary.
FC_InitPIN
ppin[input] pointer to the pin being
set.
...the module only allows the pkcs #11 so to log in if the normal user's pin has not yet been
set or has been re
set.
... see also nsc_initpin, fc_
setpin ...
NSS tools : cmsutil
-d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a
set of recipients to which you would like to send an encrypted message.
... if this is the first encrypted message for that
set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only).
...-u certusage
set type of cert usage (default is certusageemailsigner).
sslcrt.html
some of the pk11 functions require a pin argument (see ssl_
setpkcs11pinarg for details), which must be specified in the wincx parameter.
...when you call cert_destroycertificate or seckey_destroyprivatekey, the function decrements the reference count and, if the reference count reaches zero as a result, both frees the memory and
sets all the bits to zero.
...some of the pk11 functions require a pin argument (see ssl_
setpkcs11pinarg for details), which must be specified in the wincx parameter.
S/MIME functions
getbulkkey mxr 3.2 and later nss_cmscontentinfo_getbulkkeysize mxr 3.2 and later nss_cmscontentinfo_getcontent mxr 3.2 and later nss_cmscontentinfo_getcontentencalgtag mxr 3.2 and later nss_cmscontentinfo_getcontenttypetag mxr 3.2 and later nss_cmscontentinfo_
setbulkkey mxr 3.2 and later nss_cmscontentinfo_
setcontent mxr 3.2 and later nss_cmscontentinfo_
setcontent_data mxr 3.2 and later nss_cmscontentinfo_
setcontentencalg mxr 3.2 and later nss_cmscontentinfo_
setcontent_digesteddata mxr 3.2 and later nss_cmscontentinfo...
..._
setcontent_encrypteddata mxr 3.2 and later nss_cmscontentinfo_
setcontent_envelopeddata mxr 3.2 and later nss_cmscontentinfo_
setcontent_signeddata mxr 3.2 and later nss_cmsdecoder_cancel mxr 3.2 and later nss_cmsdecoder_finish mxr 3.2 and later nss_cmsdecoder_start mxr 3.2 and later nss_cmsdecoder_update mxr 3.2 and later nss_cmsdigestcontext_cancel mxr 3.2 and later nss_cmsdigestcontext_finishmultiple mxr 3.2 and later nss_cmsdigestcontext_finishsingle mxr 3.2 and later nss_cmsdigestcontext_startmultiple mxr ...
...cmssigneddata_getcontentinfo mxr 3.2 and later nss_cmssigneddata_getdigestalgs mxr 3.2 and later nss_cmssigneddata_getsignerinfo mxr 3.2 and later nss_cmssigneddata_hasdigests mxr 3.2 and later nss_cmssigneddata_importcerts mxr 3.2 and later nss_cmssigneddata_
setdigests mxr 3.2 and later nss_cmssigneddata_
setdigestvalue mxr 3.4 and later nss_cmssigneddata_signerinfocount mxr 3.2 and later nss_cmssigneddata_verifycertsonly mxr 3.2 and later nss_cmssigneddata_verifysignerinfo mxr 3.2 and later nss_cmssignerinfo_addmssmi...
NSS Tools cmsutil
-d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a
set of recipients to which you would like to send an encrypted message.
... if this is the first encrypted message for that
set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only).
... -u certusage
set type of cert usage (default is <tt>certusageemailsigner)</tt>.
NSS Tools sslstrength
firstly, you can
set policy to be either domestic or export.
... this restricts the available ciphers to the same
set used by communicator.
... policy=export or policy=domestic will
set your policies appropriately.
NSS tools : cmsutil
-d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a
set of recipients to which you would like to send an encrypted message.
... if this is the first encrypted message for that
set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only).
... -u certusage
set type of cert usage (default is certusageemailsigner).
Installing Pork
install the pork stack pork is a
set of tools written at mozilla for refactoring c++.
... index: src/
set_mcpp.sh =================================================================== --- src/
set_mcpp.sh (revision 78) +++ src/
set_mcpp.sh (working copy) @@ -35,14 +35,14 @@ echo " cd ${inc_dir}/mcpp-gcc" cd ${inc_dir}/mcpp-gcc if test !
...' *#define *_' \ > gxx${gcc_maj_ver}${gcc_min_ver}_predef_std.h - ${cxx} -e -xc++ -dm /dev/null | sort | grep -e ' *#define *[a-za-z]+' \ + ${cxx} ${cppflags} -e -xc++ -dm /dev/null | sort | grep -e ' *#define *[a-za-z]+' \ > gxx${gcc_maj_ver}${gcc_min_ver}_predef_old.h fi if test ${host_system} = sys_cygwin; then if you don't do this, mcpp will get the wrong
set of automatic definitions and you'll end up with an unpleasant hybrid x86-64/i686 build system.
The JavaScript Runtime
instead, every property accessor method in scriptable (has, get,
set, remove, getattributes, and
setattributes) has overloaded forms that take either a string or an int argument.
...this method defines a
set of javascript objects using a java class.
...multiple threads (with multiple associated contexts) may act upon the same
set of objects.
Rhino shell
-continuations enable experimental support for continuations and
set the optimization level to -1 to force interpretation mode.
... note if the shell is invoked with the system property rhino.use_java_policy_security
set to true and with a security manager installed, the shell restricts scripts permissions based on their urls according to java policy
settings.
... version([number]) get or
set javascript version number.
Shumway
it is currently available as an extension and as a component in firefox's nightly builds that can be enabled through about:config (you need to find the shumway.disabled preference and
set it to false).
... the user has adobe flash player disabled (or
set to "click-to-enable") for performance or security reasons.
...the simple method is to install the shumway extension (or run a browser version with shumway included and enabled) and browse to your flash content with adobe flash player
set "ask to activate" or "never activate" in firefox's add-ons menu (this will be listed as "shockwave flash" under the plugins tab).
64-bit Compatibility
for example, this code will not load a native integer correctly on a 64-bit machine: struct object { void *data; }; lir->insload(lir_ld, objins, ins->insimm(off
setof(object, data))); lir_ld is 32-bit.
...luckily there is an alias that will choose the right opcode for you - lir_ldp: struct object { void *data; }; lir->insload(lir_ldp, objins, ins->insimm(off
setof(object, data))); when you use lirwriter::insstore, the correct size is chosen for you automatically, based on the size of the input operands.
... stobj_get_fslot - returns jsval-width lins stobj_get_dslot - returns jsval-width lins stobj_
set_dslot - stores jsval-width lins stobj_
set_fslot - stores jsval-width lins box_jsval - returns jsval-width lins unbox_jsval - expects jsval-width lins ...
JS::Add*Root
this article covers features introduced in spidermonkey 31 register a variable as a member of the garbage collector's root
set, to protect anything the root points at from garbage collection.
... description the js::add*root and functions add a c/c++ variable to the garbage collector's root
set, the
set of variables used as starting points each time the collector checks to see what memory is reachable.
... an entry for rp is added to the garbage collector's root
set for the jsruntime associated with cx (or, in js::addnamedvaluerootrt, the runtime rt).
JS::Value
the data in a js::value can be accessed using these member functions: js type js::value type tests constructor accessors mutators null val.isnull() js::nullvalue() n/a val.
setnull() undefined val.isundefined() js::undefinedvalue() n/a val.
setundefined() boolean val.isboolean(), val.istrue(), val.isfalse() js::booleanvalue(bool), js::truevalue(), js::falsevalue() val.toboolean() val.
setboolean(bool) number val.isint32(), val.isdouble(), val.isnumber() js::numbervalue(any number type), js::int32value(int32_t), js::...
...doublevalue(double), js::float32value(float) val.toint32(), val.todouble(), val.tonumber() val.
setint32(int32_t), val.
setnumber(uint32_t), val.
setnumber(double) string val.isstring() js::stringvalue(jsstring*) val.tostring() val.
setstring(jsstring *) object val.isobject() js::objectvalue(jsobject&), js::objectornullvalue(jsobject*) val.toobject() val.
setobject(jsobject &) symbol val.issymbol() js::symbolvalue(js::symbol*) val.tosymbol() val.
setsymbol(js::symbol &) numbers are stored in a js::value either as a double or as an int32_t.
... val.
setobjectornull(jsobject *)
sets the given value to the specified object, or to null if the pointer was null.
JSCheckAccessOp
(it is also the type of the callback
set by js_
setcheckobjectaccesscallback.) syntax typedef jsbool (* jscheckaccessop)(jscontext *cx, jsobject *obj, jsval id, jsaccessmode mode, jsval *vp); name type description cx jscontext * the js context in which the property access attempt is occurring.
...on success, the callback must
set *vp to the stored value of the property.
... if a class leaves the checkaccess field null, a runtime-wide object access callback is called instead; see js_
setcheckobjectaccesscallback.
JSNative
on success, the callback must
set js::callargs::rval() or call js_
set_rval (at least once) and return true.
...js_reporterror or js_reportoutofmemory) or raise an exception (using js_
setpendingexception), and the callback must return false.
... see also mxr id search for jsnative js::callargs js_reporterror js_reportoutofmemory js_
setpendingexception ...
JSObjectOps.defineProperty
syntax jsbool (*jsdefinepropop)(jscontext *cx, jsobject *obj, jsid id, jsval value, jspropertyop getter, jspropertyop
setter, unsigned int attrs); name type description cx jscontext * pointer to the js context in which the property is being defined.
...
setter jspropertyop the
setter for the new property.
... description define obj[id], an own property of obj named id, having the given initial value, with the specified getter,
setter, and attributes.
JSProtoKey
jsproto_float64array float64array mxr search for jsproto_float64array jsproto_uint8clampedarray uint8clampedarray mxr search for jsproto_uint8clampedarray jsproto_proxy proxy mxr search for jsproto_proxy jsproto_weakmap weakmap mxr search for jsproto_weakmap jsproto_map map mxr search for jsproto_map jsproto_
set set mxr search for jsproto_
set jsproto_dataview dataview mxr search for jsproto_dataview jsproto_symbol symbol added in spidermonkey 38 mxr search for jsproto_symbol jsproto_sharedarraybuffer sharedarraybuffer (nightly only) mxr search for jsproto_sharedarraybuffer jsproto_intl intl mxr search for jsproto_intl js...
...proto_typedobject typedobject (nightly only) mxr search for jsproto_typedobject jsproto_generatorfunction generatorfunction added in spidermonkey 31 mxr search for jsproto_generatorfunction jsproto_simd simd (nightly only) mxr search for jsproto_simd jsproto_weak
set weak
set added in spidermonkey 38 mxr search for jsproto_weak
set jsproto_sharedint8array sharedint8array (nightly only) mxr search for jsproto_sharedint8array jsproto_shareduint8array shareduint8array (nightly only) mxr search for jsproto_shareduint8array jsproto_sharedint16array sharedint16array (nightly only) mxr search for jsproto_sharedint16array jsproto_shareduint16array shareduint16array (nightly only) ...
... see also bug 789635 bug 645416 - added jsproto_symbol bug 769872 - added jsproto_intl bug 792439 - added jsproto_weak
set bug 896116 - added jsproto_typedarray bug 904701 - added jsproto_generatorfunction bug 914220 - added jsproto_typedobject bug 933001 - added jsproto_sharedarraybuffer bug 946042 - added jsproto_simd bug 1054882 - added jsproto_shared*arrays ...
JS_AddFinalizeCallback
syntax bool js_addfinalizecallback(jsruntime *rt, jsfinalizecallback cb, void *data); // added in spidermonkey 38 (jsapi 32) void js_removefinalizecallback(jsruntime *rt, jsfinalizecallback cb); // added in spidermonkey 38 (jsapi 32) void js_
setfinalizecallback(jsruntime *rt, jsfinalizecallback cb); // obsolete since jsapi 32 name type description rt jsruntime * the jsruntime for which to
set the finalization callback.
... obsolete since jsapi 32 js_
setfinalizecallback
sets a new callback function.
... see also mxr id search for js_addfinalizecallback mxr id search for js_removefinalizecallback mxr id search for jsfinalizestatus mxr id search for jsfinalize_group_start mxr id search for jsfinalize_group_end mxr id search for jsfinalize_collection_end mxr id search for jsfinalizecallback jsfreeop js_
setgccallback bug 723286 - separated from js_
setgccallback as js_
setfinalizecallback bug 996785 - replaced with js_addfinalizecallback ...
JS_Add*Root
register a variable as a member of the garbage collector's root
set, to protect anything the root points at from garbage collection.
... description the js_add*root and functions add a c/c++ variable to the garbage collector's root
set, the
set of variables used as starting points each time the collector checks to see what memory is reachable.
... an entry for rp is added to the garbage collector's root
set for the jsruntime associated with cx (or, in js_addnamedrootrt, the runtime rt).
JS_AlreadyHasOwnProperty
*foundp is
set to true only if lookupproperty reports that the property was found on obj itself and not on some other object (even the corresponding outer object, if any).
... if the property is found on obj, this
sets *foundp to true and returns true.
... if the property is not found on obj, this
sets *foundp to false and returns true (to indicate that no error occurred).
nsILocaleService
return value the user's os
setting for preferred locale.
...return value the user's os
setting for preferred locale in the format described in nsilocale.
...return value the user's os
setting for preferred locale.
nsINavHistoryContainerResultNode
this is false for bookmark folder nodes unless the
setfolderreadonly() method has been called to specifically make the folder read-only.
... containeropen boolean
set this to true to allow descent into this container.
...when you're done reading the container's children,
set this to false.
nsINavHistoryQueryResultNode
method overview void getqueries([optional] out unsigned long querycount, [retval,array,size_is(querycount)] out nsinavhistoryquery queries); attributes attribute type description folderitemid long long for both simple folder nodes and simple-folder-query nodes, this is
set to the concrete itemid of the folder.
... otherwise, this is
set to -1.
...queries an array of nsinavhistoryquery objects describing the
set of queries that build the node's children.
nsIPrefLocalizedString
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void
setdatawithlength(in unsigned long length, [size_is(length)] in wstring data); wstring tostring(); attributes attribute type description data wstring provides access to string data stored in this property.
... methods
setdatawithlength() used to
set the contents of this object.
... void
setdatawithlength( in unsigned long length, [size_is(length)] in wstring data ); parameters length the length of the string.
nsIProperties
to get an instance, use: var properties = components.classes["@mozilla.org/file/directory_service;1"] .getservice(components.interfaces.nsiproperties); method overview void get(in string prop, in nsiidref iid, [iid_is(iid),retval] out nsqiresult result); void getkeys(out pruint32 count, [array, size_is(count), retval] out string keys); boolean has(in string prop); void
set(in string prop, in nsisupports value); void undefine(in string prop); methods get() gets the xpcom object associated with a particular name.
...
set()
sets the xpcom object associated with a particular name.
... void
set( in string prop, in nsisupports value ); parameters prop the property name.
nsIRadioInterfaceLayer
unsigned short getnumberofmessagesfortext(in domstring text); void hangup(in unsigned long callindex); void registercallback(in nsiriltelephonycallback callback); void registerdatacallcallback(in nsirildatacallback callback); void rejectcall(in unsigned long callindex); void sendsms(in domstring number, in domstring message, in long requestid, in unsigned long long processid); void
setupdatacall(in long radiotech, in domstring apn, in domstring user, in domstring passwd, in long chappap, in domstring pdptype); void starttone(in domstring dtmfchar); void stoptone(); void unregistercallback(in nsiriltelephonycallback callback); void unregisterdatacallcallback(in nsirildatacallback callback); attributes attribute type description currentstate jsval read only.
...requestid missing description processid missing description
setupdatacall() pdp apis.
... void
setupdatacall( in long radiotech, in domstring apn, in domstring user, in domstring passwd, in long chappap, in domstring pdptype ); parameters radiotech missing description apn missing description user missing description passwd missing description chappap missing description pdptype missing description exceptions thrown missing exception missing description starttone() void starttone( in domstring dtmfchar ); parameters dtmfchar missing description exceptions thrown missing exception missing description stoptone() void stoptone(); parameters none.
nsIRequest
for https, this flag is
set automatically.
... the following flags control the frequency of cached content validation when neither load_bypass_cache or load_from_cache are
set.
... constant value description load_anonymous 1 << 14 when
set, this flag indicates that no user-specific data should be added to the request when opened.
nsIResumableChannel
methods asyncopenat() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) open this channel, and read starting at the specified off
set.
...startpos the starting off
set, in bytes, to use to download.
...void resumeat( in unsigned long long startpos, in acstring entityid ); parameters startpos the starting off
set, in bytes, to use to download.
nsISelection2
method overview void getrangesforinterval(in nsidomnode beginnode, in print32 beginoff
set, in nsidomnode endnode, in print32 endoff
set, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results); void getrangesforintervalcomarray(in nsidomnode beginnode, in print32 beginoff
set, in nsidomnode endnode, in print32 endoff
set, in prbool allowadjacent, in rangearray results); native code only!
... void getrangesforinterval( in nsidomnode beginnode, in print32 beginoff
set, in nsidomnode endnode, in print32 endoff
set, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results ); parameters beginnode beginoff
set endnode endoff
set these four parameters represent the range to compare against the selection.
... native code only!getrangesforintervalcomarray void getrangesforintervalcomarray( in nsidomnode beginnode, in print32 beginoff
set, in nsidomnode endnode, in print32 endoff
set, in prbool allowadjacent, in rangearray results ); parameters beginnode beginoff
set endnode endoff
set these four parameters represent the range to compare against the selection.
nsISelectionImageService
inherits from: nsisupports last changed in gecko 1.7 method overview void getimage(in short selectionvalue, out imgicontainer container); void re
set(); methods getimage() retrieve the image for alpha blending.
... void getimage( in short selectionvalue, out imgicontainer container ); parameters selectionvalue container re
set() the current image is marked as invalid.
... void re
set(); parameters none.
nsIStreamListener
method overview void ondataavailable(in nsirequest arequest, in nsisupports acontext, in nsiinputstream ainputstream, in unsigned long aoff
set, in unsigned long acount); methods ondataavailable() this method is called when the next chunk of data for the ongoing request may be read without blocking the calling thread.
...void ondataavailable( in nsirequest arequest, in nsisupports acontext, in nsiinputstream ainputstream, in unsigned long aoff
set, in unsigned long acount ); parameters arequest an nsirequest indicating the source of the data.
...aoff
set number of bytes that were sent in previous ondataavailable() calls for this request.
nsITXTToHTMLConv
method overview void preformathtml(in boolean value); void
settitle(in wstring text); prior versions of the interface named the methods using the initialcaps style instead of the intercaps style.
...
settitle()
sets the title to use on the resulting html document.
... void
settitle( in wstring text ); parameters text title to
set for the html document.
nsITaskbarProgress
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void
setprogressstate(in nstaskbarprogressstate state, in unsigned long long currentvalue optional, in unsigned long long maxvalue optional); constants constant value description state_no_progress 0 stop displaying progress on the taskbar button.
... methods
setprogressstate()
sets the taskbar progress state and value for this window.
...void
setprogressstate( in nstaskbarprogressstate state, in unsigned long long currentvalue, optional in unsigned long long maxvalue optional ); parameters state one of the state constants.
nsITimer
note: re-
setting the delay on a one-shot timer that has already fired doesn't restart the timer.
...this target must be
set before calling any of the initialization methods.
...the subject is
set to the nsitimer object which fired, the topic is equal to "timer-callback" and data is always
set to null.
nsIUploadChannel2
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void explicit
setuploadstream(in nsiinputstream astream, in acstring acontenttype, in long long acontentlength, in acstring amethod, in boolean astreamhasheaders); methods explicit
setuploadstream()
sets a stream to be uploaded by this channel with the specified content-type and content-length header values.
... void explicit
setuploadstream( in nsiinputstream astream, in acstring acontenttype, in long long acontentlength, in acstring amethod, in boolean astreamhasheaders ); parameters astream the stream to be uploaded by this channel.
...amethod the http request method to
set on the stream.
nsIVariant
return value the value is converted to an 8-bit string in the iso-8859-1 character
set.
...return value the value is converted to an 8-bit string in the iso-8859-1 character
set.
... str the value is converted to an 8-bit string in the iso-8859-1 character
set.
nsIWebBrowserFind
to change this behavior, and to explicitly
set the frame to search, queryinterface to nsiwebbrowserfindinframes.
... note: that you can control whether the search propagates into child or parent frames explicitly using nsiwebbrowserfindinframes, but if one, but not both, of searchsubframes and searchparentframes are
set, this returns false.
... methods findnext() finds, highlights, and scrolls into view the next occurrence of the search string, using the current search
settings.
nsIWebContentHandlerRegistrar
can bypass this by opening about:config and
setting preference of gecko.handlerservice.allowregisterfromdifferenthost to true.
...to add http://mail.live.com/secure/start?action=compose&to=%s as a content or protocol handler'permission denied to add http://mail.live.com/secure/start?action=compose&to=%s as a content or protocol handler' when calling method: [nsiwebcontenthandlerregistrar::registerprotocolhandler] if the host names do match then a confirmation like this will be seen: this domain check can be bypassed by
setting the preference of gecko.handlerservice.allowregisterfromdifferenthost to true as in this code here: var {classes: cc, interfaces: ci, utils: cu} = components; cu.import("resource://gre/modules/services.jsm"); var nsiwchr = cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"] .getservice(ci.nsiwebcontenthandlerregistrar); var allowregisterfromdifferenthost ...
...= services.prefs.getboolpref('gecko.handlerservice.allowregisterfromdifferenthost'); if (!allowregisterfromdifferenthost) { services.prefs.
setboolpref('gecko.handlerservice.allowregisterfromdifferenthost', true); } var htmlcontentwindow = services.wm.getmostrecentwindow('navigator:browser'); //because we
set the preference to true above, we need any window that has a browser, just pass the domwindow and the registerprotocolhandler will get the contentwindow from it nsiwchr.registerprotocolhandler("mailto", "http://mail.live.com/secure/start?action=compose&to=%s", "outlook.com live mail", htmlcontentwindow); if (!allowregisterfromdifferenthost) { //it this variable is false, than we had
set the pref to true obviously.
nsIWindowsShellService
inherits from: nsishellservice last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview string getregistryentry(in long ahkeyconstant, in string asubkeyname, in string avaluename); obsolete since gecko 1.8 void restorefile
settings(in boolean aforallusers); obsolete since gecko 1.9 void shortcutmaintenance(); attributes attribute type description desktopbackgroundcolor unsigned long the desktop background color, visible when no background image is used, or if the background image is centered and does not fill the entire screen.
... restorefile
settings() obsolete since gecko 1.9 (firefox 3) restores system
settings to what they were before firefox modified them.
... void restorefile
settings( in boolean aforallusers ); parameters aforallusers whether or not firefox should restore
settings for all users on a multi-user system.
nsIXMLHttpRequest
the most obvious benefit is that we can
set nsirequest - constants in the xhr.channel.loadflags.
... using event handlers from native code (not sure if it's up-to-date) from native code, the way to
set up onload and onerror handlers is a bit different.
... ':' + xhr.status + ']'); break; } }; let evf = f => ['load', 'error', 'abort'].foreach(f); evf(m => xhr.addeventlistener(m, handler, false)); xhr.mozbackgroundrequest = true; xhr.open('get', url, true); xhr.channel.loadflags |= ci.nsirequest.load_anonymous | ci.nsirequest.load_bypass_cache | ci.nsirequest.inhibit_persistent_caching; xhr.respon
setype = "arraybuffer"; //dont
set it, so it returns string, you dont want arraybuffer.
nsMsgFolderFlagType
exactly one will be
set.
... */ const nsmsgfolderflagtype elided = 0x00000010; /// whether this is a virtual search folder const nsmsgfolderflagtype virtual = 0x00000020; /** @name news folder flags * these flags only occur in folders which have * the nsmsgfolderflags::newsgroup bit
set, and do * not have the nsmsgfolderflags::directory or * nsmsgfolderflags::elided bits
set.
... const nsmsgfolderflagtype unused2 = 0x00000080; /** @} */ /** @name mail folder flags * these flags only occur in folders which have * the nsmsgfolderflags::mail bit
set, and do * not have the nsmsgfolderflags::directory or * nsmsgfolderflags::elided bits
set.
nsPIPromptService
this interface defines the meaning of each indexes of getint(),
setint(), getstring() and
setstring() of the nsidialogparamblock interface but they are defined on in c++.
... the indexes for getstring() and
setstring() are: emsg the value is 0.
... the indexes for getint() and
setint() are: ebuttonpressed the value is 0.
NS_CStringAppendData
remarks this function is defined inline as a wrapper around ns_cstring
setdatarange.
... example nscstringcontainer str; ns_cstringcontainerinit(str); ns_cstring
setdata(str, "hello"); ns_cstringappenddata(str, " world"); const char* data; ns_cstringgetdata(str, &data); printf("%s\n", data); // prints out "hello world" ns_cstringcontainerfinish(str); history this function was frozen for mozilla 1.7.
... see also ns_cstring
setdatarange, nsacstring ...
NS_CStringCutData
remarks this function is defined inline as a wrapper around ns_cstring
setdatarange .
... example code nscstringcontainer str; ns_cstringcontainerinit(str); ns_cstring
setdata(str, "hello world"); // remove " world" portion of string ns_cstringcutdata(str, 5, pr_uint32_max); const char* data; ns_cstringgetdata(str, &data); printf("%s\n", data); // prints out "hello" ns_cstringcontainerfinish(str); history this function was frozen for mozilla 1.7.
... see also ns_cstring
setdatarange , nsacstring ...
NS_StringAppendData
remarks this function is defined inline as a wrapper around ns_string
setdatarange note: gcc requires the -fshort-wchar option to compile this example since prunichar is an unsigned short.
... example code nsstringcontainer str; ns_stringcontainerinit(str); ns_string
setdata(str, l"hello"); ns_stringappenddata(str, l" world"); const prunichar* data; ns_stringgetdata(str, &data); // data now points to the string: l"hello world" ns_stringcontainerfinish(str); history this function was frozen for mozilla 1.7.
... see also ns_string
setdatarange, nsastring ...
NS_StringCutData
remarks this function is defined inline as a wrapper around ns_string
setdatarange.
... example code nsstringcontainer str; ns_stringcontainerinit(str); ns_string
setdata(str, l"hello world"); // remove " world" portion of string ns_stringcutdata(str, 5, pr_uint32_max); const prunichar* data; ns_stringgetdata(str, &data); // data now ponts to the string: l"hello" ns_stringcontainerfinish(str); history this function was frozen for mozilla 1.7.
... see also ns_string
setdatarange, nsastring ...
nsIMsgCloudFileProvider
settingsurl acstring readonly: a chrome url for an xhtml page displayed in the account
setup dialog window, used for displaying and
setting provider-specific
settings.
... managementurl acstring readonly: a chrome url for an xhtml page displayed within the filelink preferences dialog, used for displaying and
setting provider-specific
settings once the account has already been
set up.
...this might change in the future, but as it stands, this function can simply return ns_error_not_implemented unless there are plans to call createnewaccount from the management or
settings xhtml files.
Building a Thunderbird extension 6: Adding JavaScript
window.addeventlistener("load", function(e) { startup(); }, false); window.
setinterval( function() { startup(); }, 60000); //update date every minute function startup() { var mypanel = document.getelementbyid("my-panel"); var date = new date(); var day = date.getday(); var datestring = date.getfullyear() + "." + (date.getmonth()+1) + "." + date.getdate(); mypanel.label = "date: " + datestring; } the first part registers a new event listener that will be executed ...
...finally the label of our panel is
set to "date: " and concatenated with the date string that contains the formatted date.
... we use the function window.
setinterval to update the date in case thunderbird is left running for more than one day.
Activity Manager examples
rovided process.init("processing folder: " + folder.prettiestname, null); // note that we don't define a custom icon, default process icon // will be used process.contexttype = "account"; // group this activity by account process.contextobj = folder.server; // account in question gactivitymanager.addactivity(process); // step 2: showing some progress let percent = 50; process.
setprogress(percent, "junk processing 25 of 50 messages", 25, 50); // step 3: removing the process and adding an event using process' attributes process.state = components.interfaces.nsiactivityprocess.state_completed; gactivitymanager.removeactivity(process.id); let event = components.classes["@mozilla.org/activity-event;1"].createinstance(nsiae); // localization is omitted, initiator is omitted ...
... // wrap copyservice in a nsvariant component nscomptr<nsiwritablevariant> initiator = do_createinstance(ns_variant_contractid); initiator->
setasisupports(reinterpret_cast<nsisupports*>(copyservice)); // subject of the delete operation is the imap folder // wrap it in a nsvariant component nscomptr<nsiwritablevariant> srcfolder = do_createinstance(ns_variant_contractid); srcfolder->
setasisupports(reinterpret_cast<nsisupports*>(imapfolder)); copyevent->addsubject(srcfolder); copyevent->init(ns_literal_string("message copy event"), ...
... initiator, ns_literal_string("completed successfully"), pr_now() / pr_usec_per_msec, // start time pr_now() / pr_usec_per_msec); // completion time // do not forget to increase the ref counter if needed copyevent->
setundohandler(undohandler); //////////////////////////////////////////////////////////////// //// adding the event into activity manager nscomptr<nsiactivitymanager> activitymgr(do_getservice("@mozilla.org/activity-manager;1")); pruint32 id; activitymgr->addactivity(copyevent, &id); adding an activity with a custom context type this sample shows how to provide a custom context type for junk processing.
Using MAPI with Thunderbird's Windows 7 developer builds
the thunderbird installer
sets the installed build as the default mapi/mail client.
... if you want to
set a debug build as the default mail client, you need configure it manually: in the objdir/mozilla/dist/bin directory, copy mozmapi32.dll to mozmapi32_inuse.dll and mapiproxy to mapiproxy_inuse.dll.
... (be sure to copy - not move - these files.) in the uninstall sub-directory of the bin directory, run these two commands: helper.exe /
setasdefaultappglobal helper.exe /
setasdefaultappuser create an elevated shell and register the mapi proxy.dll as a com server.
Using the Mozilla symbol server
to use only the mozilla symbol server, add the following entry to your symbol path (note: you can replace c:\symcache\ with any writable directory on your computer, if you'd prefer a different location for downloaded symbols): srv*c:\symcache\*https://symbols.mozilla.org/
set this string as _nt_symbol_path in the environment, using the windbg menus, or by typing the .sympath command.
... troubleshooting: symbols will not download if symbols will not download no matter what you do, the problem may be that internet explorer has been
set to the work offline mode.
...this is because microsoft uses internet explorer's internet & proxy
settings to download the symbol files.
Flash Activation: Browser Comparison - Plugins
mozilla firefox google chrome microsoft edge
setting name ask to activate html5 by default click-to-run 'application/x-shockwave-flash' in navigator.mimetypes by default when flash is inactive yes no no 'application/x-shockwave-flash' in navigator.mimetypes when user enables flash yes yes yes <object> with fallback content triggers ui yes, with exceptions no yes small/hidde...
...that function can then issue the call into the plugin, knowing that everything is
set up and ready to go.
... 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(); } ...
Debug worker threads - Firefox Developer Tools
you can open the javascript file for the worker process and
set breakpoints and logpoints just as you can with javascript code running on the main thread.
...
setting breakpoints, etc.
... you can
set a breakpoint (or logpoint) on any active worker thread: when execution is paused in a worker thread, the context of the debugger is updated to show the correct breakpoints, call stack, etc., just as you'd expect.
Debugger.Environment - Firefox Developer Tools
when true, getvariable returns an ordinary javascript object whose optimizedout property is true on all bindings, and
setvariable throws a referenceerror.
...
setvariable(name,value) storevalue as the value of the variable bound toname in this environment.name must be a string that is a valid ecmascript identifier name;value must be a debuggee value.
... source metadata generated from file: js/src/doc/debugger/debugger.environment.md watermark: sha256:3d6f67939e351803d5d7fe201ed38c4aaf766caf032f255e168df1f1c6fe73cb change
set: 7ae377917236 ...
Dominators view - Firefox Developer Tools
call stack in the toolbar at the top of the tool is a dropdown called "label by": by default, this is
set to "type".
... however, you can
set it instead to "call stack" to see exactly where in your code the objects are being allocated.
... taking a snapshot to see what it looks like in the dominators view: load the page enable the memory tool in the
settings, if you haven't already open the memory tool check "record call stacks" press the button labeled "make monsters!" take a snapshot switch to the "dominators" view analyzing the dominators tree you'll see the three arrays as the top three gc roots, each retaining about 23% of the total memory usage: if you expand an array, you'll see the objects (monsters) it contains.
Reposition elements in the page - Firefox Developer Tools
if an element has its position property
set to absolute, relative or fixed and one or more of the top, bottom , left or right properties, the box model view displays a button: if you click that button, two handles appear next to the element: you can use these handles to drag the element around the page.
... if the element is absolutely positioned, dashed lines are shown representing the off
set parent.
...the off
sets are indicated by a line and a tooltip for each side.
Work with animations - Firefox Developer Tools
each dot represents an entry for that property in the
set of keyframes used for the animation.
...if you hover over a dot, you'll see the value assigned to that property at that point in the timeline: this is essentially a visual representation of the animation's keyframes: var iconkeyframe
set = [ { transform: 'scale(1)', filter: 'grayscale(100%)' }, { filter: 'grayscale(100%)', off
set: 0.333 }, { transform: 'scale(1.5)', off
set: 0.666 }, { transform: 'scale(1.5)', filter: 'grayscale(0%)' } ]; application to the example applying all this to our example, we can see that: the animation involved two elements, span#note and img#icon.
... the cubic bézier editor includes a number of pre
sets, grouped under "ease-in", "ease-out", and "ease-in-out": ...
UI Tour - Firefox Developer Tools
html pane the inspector is split into two or three sections, depending on your
settings.
...if the page includes any sections using either the flexbox display model or css grids, this view shows the flexbox or grid
settings used on the page.
... to configure the
set of browsers you want the compatibility view to check for, click
settings at the bottom of the panel.
Waterfall - Firefox Developer Tools
javascript functions executed in the page are labeled with the reason the function was called: script tag
setinterval
settimeout requestanimationframe promise callback promise init worker javascript uri event handler stack call stack, with links to functions.
...spidermonkey uses a complex
set of heuristics to determine when gc is needed, and when non-incremental gc in particular is needed.
... for example, consider code like this: var timerbutton = document.getelementbyid("timer"); timerbutton.addeventlistener("click", handleclick, false); function handleclick() { console.time("timer"); runtimer(1000).then(timerfinished); } function timerfinished() { console.timeend("timer"); console.log("ready!"); } function runtimer(t) { return new promise(function(resolve) {
settimeout(resolve, t); }); } the waterfall will display a marker for the period between time() and timeend(), and if you select it, you'll see the async stack in the sidebar: timestamp markers timestamps enable you to mark an instant in the recording.
Taking screenshots - Firefox Developer Tools
to enable it: visit the
settings page find the section labeled "available toolbox buttons" check the box labeled "take a screenshot of the entire page".
...just check the box in
settings labeled "screenshot to clipboard": now, whenever you take a screenshot, the screenshot is also copied to the clipboard.
... taking screenshots with the web console if you need to specify a different device-pixel-ratio,
set a delay before taking the screenshot, or specify your own file name, starting in firefox 62 you can use the :screenshot helper function in the web console.
The JavaScript input interpreter - Firefox Developer Tools
you get autocomplete suggestions for array elements, as well: you can enable or disable autocompletion via the
settings ("gear") menu in the web console toolbar.
... you can enable or disable instant evaluation via the
settings ("gear") menu in the web console toolbar.
...rame); you can pass a css selector that matches the iframe: cd("#frame1"); you can pass the iframe's global window object: var frame = document.getelementbyid("frame1"); cd(frame.contentwindow); to switch the context back to the top-level window, call cd() with no arguments: cd(); for example, suppose we have a document that embeds an iframe: <!doctype html> <html> <head> <meta char
set="utf-8"> </head> <body> <iframe id="frame1" src="static/frame/my-frame1.html"></iframe> </body> </html> the iframe defines a new function: <!doctype html> <html> <head> <meta char
set="utf-8"> <script> function whoareyou() { return "i'm frame1"; } </script> </head> <body> </body> </html> you can switch context to the iframe like this: cd("#frame...
Animation.currentTime - Web APIs
the animation.currenttime property of the web animations api returns and
sets the current time value of the animation in milliseconds, whether running or paused.
...at the start of the game, her height is
set between the two extremes by
setting her animation's currenttime to half her keyframeeffect's duration: alicechange.currenttime = alicechange.effect.timing.duration / 2; a more generic means of seeking to the 50% mark of an animation would be: animation.currenttime = animation.effect.getcomputedtiming().delay + animation.effect.getcomputedtiming().activeduration / 2; reduced time precision...
... to offer protection against timing attacks and fingerprinting, the precision of animation.currenttime might get rounded depending on browser
settings.
Animation.playState - Web APIs
the animation.playstate property of the web animations api returns and
sets an enumerated value describing the playback state of an animation.
...so they must be paused as soon as they are animated like so: //
setting up the tear animations tears.foreach(function(el) { el.animate( tearsfalling, { delay: getrandommsrange(-1000, 1000), // randomized for each tear duration: getrandommsrange(2000, 6000), // randomized for each tear iterations: infinity, easing: 'cubic-bezier(0.6, 0.04, 0.98, 0.335)' }); el.pause(); }); // play the tears falling when the ending need...
... tears.foreach(function(el) { el.play(); }); // re
set the crying tears animations and pause them.
Animation.playbackRate - Web APIs
the animation.playbackrate property of the web animations api returns or
sets the playback rate of the animation.
...
setting an animation’s playbackrate to 0 effectively pauses the animation (however, its playstate does not necessarily become paused).
...cake.addeventlistener("mousedown", growalice, false); cake.addeventlistener("touchstart", growalice, false); in another example, the red queen's race game, alice and the red queen are constantly slowing down:
setinterval( function() { // make sure the playback rate never falls below .4 if (redqueen_alice.playbackrate > .4) { redqueen_alice.playbackrate *= .9; } }, 3000); but clicking or tapping on them causes them to speed up by multiplying their playbackrate: var gofaster = function() { redqueen_alice.playbackrate *= 1.1; } document.addeventlistener("click", gofaster); document.add...
AudioBufferSourceNode.loop - Web APIs
the loop property of the audiobuffersourcenode interface is a boolean indicating if the audio as
set must be replayed when the end of the audiobuffer is reached.
... you can run the full example live (or view the source.) function getdata() { source = audioctx.createbuffersource(); request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.respon
setype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destination); source.loop = true; }, function(e){"error with decoding audio...
... data" + e.err}); } request.send(); } // wire up buttons to stop and play audio, and range slider control play.onclick = function() { getdata(); source.start(0); play.
setattribute('disabled', 'disabled'); playbackcontrol.removeattribute('disabled'); } specification specification status comment web audio apithe definition of 'loop' in that specification.
Cache.delete() - Web APIs
if
set to true, the ?value=bar part of http://foo.com/?value=bar would be ignored when performing a match.
... ignoremethod: a boolean that, when
set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
... ignorevary: a boolean that, when
set to true, tells the matching operation not to perform vary header matching.
Cache - Web APIs
var expectedcachenames
set = new
set(object.values(current_caches)); event.waituntil( caches.keys().then(function(cachenames) { return promise.all( cachenames.map(function(cachename) { if (!expectedcachenames
set.has(cachename)) { // if this cache name isn't present in the
set of "expected" cache names, then delete it.
... // it will return a normal response object that has the appropriate error code
set.
... console.error(' error in fetch handler:', error); throw error; }); }) ); }); storing cookies in caches the fetch api requires
set-cookie headers to be stripped before returning a response object from fetch().
CacheStorage.has() - Web APIs
if so, we add a list of as
sets to it.
... if not then we run some kind of cache
set-up function.
... caches.has('v1').then(function(hascache) { if (!hascache) { somecache
setupfunction(); } else { caches.open('v1').then(function(cache) { return cache.addall(myas
sets); }); } }).catch(function() { // handle exception here.
CacheStorage.match() - Web APIs
for example, if
set to true, the ?value=bar part of http://foo.com/?value=bar would be ignored when performing a match.
... ignoremethod: a boolean that, when
set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
... ignorevary: a boolean that, when
set to true, tells the matching operation not to perform vary header matching.
CanvasRenderingContext2D.clearRect() - Web APIs
the canvasrenderingcontext2d.clearrect() method of the canvas 2d api erases the pixels in a rectangular area by
setting them to transparent black.
... syntax void ctx.clearrect(x, y, width, height); the clearrect() method
sets the pixels in a rectangular area to transparent black (rgba(0,0,0,0)).
...the dimensions of the cleared area are
set to equal the <canvas> element's width and height attributes.
CanvasRenderingContext2D.filter - Web APIs
a drop shadow is effectively a blurred, off
set version of the drawing's alpha mask drawn in a particular color, composited below the drawing.
... this function takes up to five arguments: <off
set-x>: see <length> for possible units.
... <off
set-y>: see <length> for possible units.
CanvasRenderingContext2D.getTransform() - Web APIs
we apply a transform to the first one's context using canvasrenderingcontext2d.
settransform() and draw a square on it, then retrieve the matrix from it using gettransform().
... we then apply the retrieved matrix directly to the second canvas context by passing the dommatrix object directly to
settransform(), and draw a circle on it.
... html <canvas width="240"></canvas> <canvas width="240"></canvas> css canvas { border: 1px solid black; } javascript const canvases = document.queryselectorall('canvas'); const ctx1 = canvases[0].getcontext('2d'); const ctx2 = canvases[1].getcontext('2d'); ctx1.
settransform(1, .2, .8, 1, 0, 0); ctx1.fillrect(25, 25, 50, 50); let storedtransform = ctx1.gettransform(); console.log(storedtransform); ctx2.
settransform(storedtransform); ctx2.beginpath(); ctx2.arc(50, 50, 50, 0, 2 * math.pi); ctx2.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.gettransform' in that specification.
CanvasRenderingContext2D.globalAlpha - Web APIs
values outside that range, including infinity and nan, will not be
set, and globalalpha will retain its previous value.
...next, we
set the globalalpha property to 0.2 (20% opaque); this alpha level will apply to all of our transparent shapes.
...vas id="canvas" width="150" height="150"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // draw background ctx.fillstyle = '#fd0'; ctx.fillrect(0, 0, 75, 75); ctx.fillstyle = '#6c0'; ctx.fillrect(75, 0, 75, 75); ctx.fillstyle = '#09f'; ctx.fillrect(0, 75, 75, 75); ctx.fillstyle = '#f30'; ctx.fillrect(75, 75, 75, 75); ctx.fillstyle = '#fff'; //
set transparency value ctx.globalalpha = 0.2; // draw transparent circles for (let i = 0; i < 7; i++) { ctx.beginpath(); ctx.arc(75, 75, 10 + 10 * i, 0, math.pi * 2, true); ctx.fill(); } screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.globalalpha' in that specification.
CanvasRenderingContext2D.miterLimit - Web APIs
the canvasrenderingcontext2d.miterlimit property of the canvas 2d api
sets the miter limit ratio.
... playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"></canvas> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="re
set" type="button" value="re
set" /> </div> <textarea id="code" class="playable-code"> ctx.beginpath(); ctx.moveto(0,0); ctx.linewidth = 15; ctx.lineto(100, 100); ctx.stroke();</textarea> var canvas = document.getelementbyid("canvas"); var ctx = canvas.getcontext("2d"); var textarea = document.getelementbyid("code"); var re
set = document.getelementbyid("re
set"); var edit = document.getelementbyid("e...
...dit"); var code = textarea.value; function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } re
set.addeventlistener("click", function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() { textarea.focus(); }) textarea.addeventlistener("input", drawcanvas); window.addeventlistener("load", drawcanvas); screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.miterlimit' in that specification.
CanvasRenderingContext2D.shadowBlur - Web APIs
note: shadows are only drawn if the shadowcolor property is
set to a non-transparent value.
... one of the shadowblur, shadowoff
setx, or shadowoff
sety properties must be non-zero, as well.
...the shadowcolor property
sets its color, and shadowblur
sets its level of bluriness.
Manipulating video using canvas - Web APIs
this method's job is to prepare the variables needed by the chroma-key processing code, and to
set up an event listener so we can detect when the user starts playing the video.
... processor.timercallback = function timercallback() { if (this.video.paused || this.video.ended) { return; } this.computeframe(); let self = this;
settimeout(function() { self.timercallback(); }, 0); }, the first thing the callback does is check to see if the video is even playing; if it's not, the callback returns immediately without doing anything.
... the last thing the callback does is call
settimeout() to schedule itself to be called again as soon as possible.
ChildNode - Web APIs
childnode.before() inserts a
set of node or domstring objects in the children list of this childnode's parent, just before this childnode.
... childnode.after() inserts a
set of node or domstring objects in the children list of this childnode's parent, just after this childnode.
... childnode.replacewith() replaces this childnode in the children list of its parent with a
set of node or domstring objects.
Clients.matchAll() - Web APIs
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.
... available options are: includeuncontrolled: a boolean — if
set to true, the matching operation will return all service worker clients who share the same origin as the current service worker.
... type:
sets the type of clients you want matched.
console - Web APIs
the specifics of how it works varies from browser to browser, but there is a de facto
set of features that are typically provided.
... console.countre
set() re
sets the value of the counter with the given label.
...you should
set it to for example display: inline-block.
ConstantSourceNode() - Web APIs
options a constantsourceoptions dictionary object defining the properties you want the constantsourcenode to have: off
set: a read-only audioparam specifying the constant value generated by the source.
... example in this example, an audio context is created, then a constantsourcenode is established with its off
set initialized to 0.5.
... let audiocontext = new audiocontext(); let myconstantsource = new constantsourcenode(audiocontext, { off
set: 0.5 }); note: the new constantsourcenode created by the constructor has a channelcount of 2.
ConvolverNode.buffer - Web APIs
for example, if you want to model the reverb in your bathroom, you might
set up a microphone near the door to record the sound of a balloon pop or synthesized impulse from the sink.
...at the time when this attribute is
set, the buffer and the state of the attribute will be used to configure the convolvernode with this impulse response having the given normalization.
... // grab audio track via xhr for convolver node var soundsource, concerthallbuffer; ajaxrequest = new xmlhttprequest(); ajaxrequest.open('get', 'concert-crowd.ogg', true); ajaxrequest.respon
setype = 'arraybuffer'; ajaxrequest.onload = function() { var audiodata = ajaxrequest.response; audioctx.decodeaudiodata(audiodata, function(buffer) { concerthallbuffer = buffer; soundsource = audioctx.createbuffersource(); soundsource.buffer = concerthallbuffer; }, function(e){"error with decoding audio data" + e.err}); } ajaxrequest.send(); ...
DOMMatrix - Web APIs
the identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the off
sets in each direction are equal).
...if the matrix can't be inverted, its components are all
set to nan, and is2d returns false.
... dommatrix.
setmatrixvalue() replaces the contents of the matrix with the matrix described by the specified transform or transforms.
DOMMatrixReadOnly - Web APIs
the identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the off
sets in each direction are equal).
...if the matrix cannot be inverted, the new matrix's components are all
set to nan and its is2d property is
set to false.
...if no matrix is specified, the matrix is initialized with every element
set to 0 except the bottom-right corner and the element immediately above and to its left: m33 and m34.
Binary strings - Web APIs
a sub
set of these strings is represented by utf-16 strings containing only ascii characters (i.e., characters whose code point does not exceed 127).
... for instance, the string "hello world!" belongs to the ascii sub
set, while the string "ÀÈÌÒÙ" does not.
... a binary string is a concept similar to the ascii sub
set, but instead of limiting the range to 127, it allows code points until 255.
DOMTokenList.toggle() - Web APIs
if
set to false, then token will only be removed, but not added.
... if
set to true, then token will only be added, but not removed.
... examples in the following example we retrieve the list of classes
set on a <span> element as a domtokenlist using element.classlist.
DOMTokenList - Web APIs
the domtokenlist interface represents a
set of space-separated tokens.
... such a
set is returned by element.classlist, htmllinkelement.rellist, htmlanchorelement.rellist, htmlareaelement.rellist, htmliframeelement.sandbox, or htmloutputelement.htmlfor.
... examples in the following simple example, we retrieve the list of classes
set on a <p> element as a domtokenlist using element.classlist, add a class using domtokenlist.add(), and then update the node.textcontent of the <p> to equal the domtokenlist.
DataTransfer.mozCursor - Web APIs
the datatransfer.mozcursor property returns or
sets the drag cursor's state.
... default uses the default gecko behavior, which is to
set the cursor to an arrow during the drag operation.
... note: if any value other than default is
set, auto is assumed.
DataTransfer.types - Web APIs
the datatransfer.types read-only property returns an array of the drag data formats (as strings) that were
set in the dragstart event.
...,items} properties</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart: target.id = " + ev.target.id); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.datatransfer.
setdata("text/plain", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: target.id = " + ev.target.id); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); // print each format type if (ev.datatransfe...
...items[" + i + "].kind = " + ev.datatransfer.items[i].kind + " ; type = " + ev.datatransfer.items[i].type); } } } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); //
set the dropeffect to move ev.datatransfer.dropeffect = "move" } </script> <body> <h1>examples of <code>datatransfer</code>.{<code>types</code>, <code>items</code>} properties</h1> <ul> <li id="i1" ondragstart="dragstart_handler(event);" draggable="true">drag item 1 to the drop zone</li> <li id="i2" ondragstart="dragstart_handler(event);" draggable="true">drag item 2 to the drop zone</li> </...
Document.body - Web APIs
the document.body property represents the <body> or <frame
set> node of the current document, or null if no such element exists.
...in documents with <body> contents, returns the <body> element, and in frame
set documents, this returns the outermost <frame
set> element.
... though the body property is
settable,
setting a new body on a document will effectively remove all the current children of the existing <body> element.
Document.domain - Web APIs
the domain property of the document interface gets/
sets the domain portion of the origin of the current document, as used by the same origin policy.
... if this property is successfully
set, the port part of the origin is also
set to null.
... exceptions securityerror an attempt has been made to
set domain under one of the following conditions: the document is inside a sandboxed <iframe> the document has no browsing context the document's effective domain is null the given value is not equal to the document's effective domain (or it is not a registerable domain suffix of it) the document-domain feature-policy is enabled examples getting the domain for the uri http://developer.mozilla.org/docs/web, this example
sets currentdomain to the string "developer.mozilla.org".
Document: drag event - Web APIs
html <div class="dropzone"> <div id="draggable" draggable="true" ondragstart="event.datatransfer.
setdata('text/plain',null)"> this div is draggable </div> </div> <div class="dropzone"></div> <div class="dropzone"></div> <div class="dropzone"></div> css #draggable { width: 200px; height: 20px; text-align: center; background: white; } .dropzone { width: 200px; height: 20px; background: blueviolet; margin-bottom: 10px; padding: 10px; } javascript var dragged; /* even...
...on the dragged elem dragged = event.target; // make it half transparent event.target.style.opacity = .5; }, false); document.addeventlistener("dragend", function(event) { // re
set the transparency event.target.style.opacity = ""; }, false); /* events fired on the drop targets */ document.addeventlistener("dragover", function(event) { // prevent default to allow drop event.preventdefault(); }, false); document.addeventlistener("dragenter", function(event) { // highlight potential drop target when the draggable element enters it if (event.target.classname == "dropzone") { event.target.style.backgr...
...ound = "purple"; } }, false); document.addeventlistener("dragleave", function(event) { // re
set background of potential drop target when the draggable element leaves it if (event.target.classname == "dropzone") { event.target.style.background = ""; } }, false); document.addeventlistener("drop", function(event) { // prevent default action (open as link for some elements) event.preventdefault(); // move dragged elem to the selected drop target if (event.target.classname == "dropzone") { event.target.style.background = ""; dragged.parentnode.removechild( dragged ); event.target.appendchild( dragged ); } }, false); specifications specification status comment html living standardthe definition of 'drag event' in that specificati...
Document: gotpointercapture event - Web APIs
the gotpointercapture event is fired when an element captures a pointer using
setpointercapture().
...it then calls
setpointercapture() on the element on a pointerdown event, which will trigger gotpointercapture.
... const para = document.queryselector('p'); document.addeventlistener('gotpointercapture', () => { console.log('i\'ve been captured!') }); para.addeventlistener('pointerdown', (event) => { para.
setpointercapture(event.pointerid); }); the same example, using the ongotpointercapture event handler property: const para = document.queryselector('p'); document.ongotpointercapture = () => { console.log('i\'ve been captured!') }; para.addeventlistener('pointerdown', (event) => { para.
setpointercapture(event.pointerid); }); specifications specification status pointer events obsolete ...
Document.title - Web APIs
the document.title property gets or
sets the current title of the document.
...if the title was overridden by
setting document.title, it contains that value.
... in xul, accessing document.title before the document is fully loaded has undefined behavior: document.title may return an empty string and
setting document.title may have no effect.
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
the caretpositionfrompoint() property of the documentorshadowroot interface returns a caretposition object, containing the dom node, along with the caret and caret's character off
set within that node.
... demo html content <p>lorem ipsum dolor sit amet, con
setetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
...stet clita kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet.</p> javascript content function insertbreakatpoint(e) { var range; var textnode; var off
set; if (document.caretpositionfrompoint) { range = document.caretpositionfrompoint(e.clientx, e.clienty); textnode = range.off
setnode; off
set = range.off
set; } else if (document.caretrangefrompoint) { range = document.caretrangefrompoint(e.clientx, e.clienty); textnode = range.startcontainer; off
set = range.startoff
set; } // only split text_nodes if (textnode.nodetype == 3) { var replacement = textnode.splittext(off
set); var br = document.createelement('br'); textnode.parentnode.insertbefore(br, replacement); ...
DocumentOrShadowRoot.elementFromPoint() - Web APIs
elements with pointer-events
set to none will be ignored, and the element below it will be returned.
... example this example creates two buttons which let you
set the current color of the paragraph element located under the coordinates (2, 2).
... 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.
DocumentType - Web APIs
documenttype.internalsub
set read only a domstring of the internal sub
set, or null if there is none.
... removed the internalsub
set, entities, and notation properties.
... obsolete added the publicid, systemid, and internalsub
set properties.
How to create a DOM tree - Web APIs
y="usa"/> <address street="321 south avenue" city="denver" state="co" country="usa"/> </person> </people> the w3c dom api, supported by mozilla, can be used to create an in-memory representation of this document like so: var doc = document.implementation.createdocument("", "", null); var peopleelem = doc.createelement("people"); var personelem1 = doc.createelement("person"); personelem1.
setattribute("first-name", "eric"); personelem1.
setattribute("middle-initial", "h"); personelem1.
setattribute("last-name", "jung"); var addresselem1 = doc.createelement("address"); addresselem1.
setattribute("street", "321 south st"); addresselem1.
setattribute("city", "denver"); addresselem1.
setattribute("state", "co"); addresselem1.
setattribute("country", "usa"); personelem1.appendchild(addresselem1...
...); var addresselem2 = doc.createelement("address"); addresselem2.
setattribute("street", "123 main st"); addresselem2.
setattribute("city", "arlington"); addresselem2.
setattribute("state", "ma"); addresselem2.
setattribute("country", "usa"); personelem1.appendchild(addresselem2); var personelem2 = doc.createelement("person"); personelem2.
setattribute("first-name", "jed"); personelem2.
setattribute("last-name", "brown"); var addresselem3 = doc.createelement("address"); addresselem3.
setattribute("street", "321 north st"); addresselem3.
setattribute("city", "atlanta"); addresselem3.
setattribute("state", "ga"); addresselem3.
setattribute("country", "usa"); personelem2.appendchild(addresselem3); var addresselem4 = doc.createelement("address"); addresselem4.
setattribute("street", "123 west st"); addr...
...esselem4.
setattribute("city", "seattle"); addresselem4.
setattribute("state", "wa"); addresselem4.
setattribute("country", "usa"); personelem2.appendchild(addresselem4); var addresselem5 = doc.createelement("address"); addresselem5.
setattribute("street", "321 south avenue"); addresselem5.
setattribute("city", "denver"); addresselem5.
setattribute("state", "co"); addresselem5.
setattribute("country", "usa"); personelem2.appendchild(addresselem5); peopleelem.appendchild(personelem1); peopleelem.appendchild(personelem2); doc.appendchild(peopleelem); see also the dom chapter of the xul tutorial.
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
this handles everything for you, and is definitely the preferred solution: ul { list-style-type: none; margin: 0; padding: 0; display: flex; } if you need to rely on inline-block, you could
set the font-size of the list to 0.
...} or you could
set negative margin on the list items: li { display: inline-block; width: 2rem; height: 2rem; margin-right: -0.25rem; } you can also solve this problem by putting your list items all on the same line in the source, which causes the whitespace nodes to not be created in the first place: <li></li><li></li><li></li><li></li><li></li> dom traversal and whitespace when trying to do dom manipulation in javascript, you can also encounter problems because of whitespace nodes.
... as another example, if you have a certain sub
set of elements that you want to do something to based on whether they are empty (have no child nodes) or not, you could check whether each element is empty using something like node.haschildnodes(), but again, if any target elements contain text nodes, you could end up with false results.
Document Object Model (DOM) - Web APIs
it is uncertain whether some may be reintroduced in the future or not, but for the time being they should be considered obsolete and should be avoided: documenttouch domconfiguration domerrorhandler domimplementationlist domimplementationregistry domimplementationsource domlocator domobject dom
settabletokenlist domuserdata elementtraversal entity entityreference namelist notation typeinfo userdatahandler html dom a document containing html is described using the document interface, which is extended by the html specification to include various html-specific features.
...ecomponenttransferelement svgfecompositeelement svgfeconvolvematrixelement svgfediffuselightingelement svgfedisplacementmapelement svgfedistantlightelement svgfedropshadowelement svgfefloodelement svgfefuncaelement svgfefuncbelement svgfefuncgelement svgfefuncrelement svgfegaussianblurelement svgfeimageelement svgfemergeelement svgfemergenodeelement svgfemorphologyelement svgfeoff
setelement svgfepointlightelement svgfespecularlightingelement svgfespotlightelement svgfetileelement svgfeturbulenceelement svgfilterelement svgfilterprimitivestandardattributes svgfontelement svgfontfaceelement svgfontfaceformatelement svgfontfacenameelement svgfontfacesrcelement svgfontfaceurielement svgforeignobjectelement svggelement svggeometryelement svgglyphelemen...
...ghkernelement svgimageelement svglineargradientelement svglineelement svgmarkerelement svgmaskelement svgmeshelement svgmeshgradientelement svgmeshpatchelement svgmeshrowelement svgmetadataelement svgmissingglyphelement svgmpathelement svgpathelement svgpatternelement svgpolylineelement svgpolygonelement svgradialgradientelement svgrectelement svgscriptelement svg
setelement svgsolidcolorelement svgstopelement svgstyleelement svgsvgelement svgswitchelement svgsymbolelement svgtextcontentelement svgtextelement svgtextpathelement svgtextpositioningelement svgtitleelement svgtrefelement svgtspanelement svguseelement svgunknownelement svgviewelement svgvkernelement svg data type interfaces here are the dom apis for data types used in t...
DynamicsCompressorNode.attack - Web APIs
the attack property's default value is 0.003 and it can be
set between 0 and 1.
... // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.
setvalueattime(-50, audioctx.currenttime); compressor.knee.
setvalueattime(40, audioctx.currenttime); compressor.ratio.
setvalueattime(12, audioctx.currenttime); compressor.attack.
setvalueattime(0, audioctx.currenttime); compressor.release.
setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function...
...() { var active = button.getattribute('data-active'); if(active == 'false') { button.
setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.
setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'attack' in that specification.
DynamicsCompressorNode.knee - Web APIs
the knee property's default value is 30 and it can be
set between 0 and 40.
... // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.
setvalueattime(-50, audioctx.currenttime); compressor.knee.
setvalueattime(40, audioctx.currenttime); compressor.ratio.
setvalueattime(12, audioctx.currenttime); compressor.attack.
setvalueattime(0, audioctx.currenttime); compressor.release.
setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function...
...() { var active = button.getattribute('data-active'); if(active == 'false') { button.
setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.
setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'knee' in that specification.
DynamicsCompressorNode.ratio - Web APIs
the ratio property's default value is 12 and it can be
set between 1 and 20.
... // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.
setvalueattime(-50, audioctx.currenttime); compressor.knee.
setvalueattime(40, audioctx.currenttime); compressor.ratio.
setvalueattime(12, audioctx.currenttime); compressor.attack.
setvalueattime(0, audioctx.currenttime); compressor.release.
setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function...
...() { var active = button.getattribute('data-active'); if(active == 'false') { button.
setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.
setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'ratio' in that specification.
DynamicsCompressorNode.release - Web APIs
the release property's default value is 0.25 and it can be
set between 0 and 1.
... // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.
setvalueattime(-50, audioctx.currenttime); compressor.knee.
setvalueattime(40, audioctx.currenttime); compressor.ratio.
setvalueattime(12, audioctx.currenttime); compressor.attack.
setvalueattime(0, audioctx.currenttime); compressor.release.
setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function...
...() { var active = button.getattribute('data-active'); if(active == 'false') { button.
setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.
setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'release' in that specification.
DynamicsCompressorNode.threshold - Web APIs
the threshold property's default value is -24 and it can be
set between -100 and 0.
... // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.
setvalueattime(-50, audioctx.currenttime); compressor.knee.
setvalueattime(40, audioctx.currenttime); compressor.ratio.
setvalueattime(12, audioctx.currenttime); compressor.attack.
setvalueattime(0, audioctx.currenttime); compressor.release.
setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function...
...() { var active = button.getattribute('data-active'); if(active == 'false') { button.
setattribute('data-active', 'true'); button.innerhtml = 'remove compression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.
setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'threshold' in that specification.
Element.animate() - Web APIs
0.5 would indicate starting halfway through the first iteration for example, and with this value
set, an animation with 2 iterations would end halfway through a third iteration.
...can be
set to accumulate or replace (see above).
... document.getelementbyid("tunnel").animate([ // keyframes { transform: 'translatey(0px)' }, { transform: 'translatey(-300px)' } ], { // timing options duration: 1000, iterations: infinity }); implicit to/from keyframes in newer browser versions, you are able to
set a beginning or end state for an animation only (i.e.
Element.className - Web APIs
the classname property of the element interface gets and
sets the value of the class attribute of the specified element.
...it is better to get/
set the classname of an element using element.getattribute and element.
setattribute if you are dealing with svg elements.
... elm.
setattribute('class', elm.getattribute('class')) the class is an html attribute, while the classname is a dom property.
Element.removeAttribute() - Web APIs
usage notes you should use removeattribute() instead of
setting the attribute value to null either directly or using
setattribute().
... many attributes will not behave as expected if you
set them to null.
... dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used)
setattribute (dom 1)
setattributens
setattributenode
setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - example // given: <div id="div1" align="left" width="200px"> document.getelementbyid("div1").removeattribute("align"); // now: <div id="div1" width="200px"> specifications specification status comment domthe defi...
Event.initEvent() - Web APIs
this method must be called to
set the event before it is dispatched, using eventtarget.dispatchevent().
...once
set, the read-only property event.bubbles will give its value.
...once
set, the read-only property event.cancelable will give its value.
Event - Web APIs
many dom elements can be
set up to accept (or "listen" for) these events, and execute code in response to process (or "handle") them.
...cs-module both monitoring video-watching.) when there are many nested elements, each with its own handler(s), event processing can become very complicated—especially where a parent element receives the very same event as its child elements because "spatially" they overlap so the event technically occurs in both, and the processing order of such events depends on the event bubbling and capture
settings of each handler triggered.
...
setting its value to true before returning from an event handler prevents propagation of the event.
EventSource - Web APIs
when not used over http/2, sse suffers from a limitation to the maximum number of open connections, which can be specially painful when opening various tabs as the limit is per browser and
set to a very low number (6).
... eventsource.withcredentials read only a boolean indicating whether the eventsource object was instantiated with cross-origin (cors) credentials
set (true), or not (false, the default).
... eventsource.close() closes the connection, if any, and
sets the readystate attribute to closed.
ExtendableEvent.waitUntil() - Web APIs
in service workers, waituntil() tells the browser that work is ongoing until the promise
settles, and it shouldn't terminate the service worker if it wants that work to complete.
... the activate events in service workers use waituntil() to buffer functional events such as fetch and push until the promise passed to waituntil()
settles.
... the waituntil() method must be initially called within the event callback, but after that it can be called multiple times, until all the promises passed to it
settle.
Fetch basic concepts - Web APIs
it will seem familiar to anyone who has used xmlhttprequest, but it provides a more powerful and flexible feature
set.
... when a new headers object is created using the headers() constructor, its guard is
set to none (the default).
... when a request or response object is created, it has an associated headers object whose guard is
set as summarized below: new object's type creating constructor guard
setting of associated headers object request request() request request() with mode of no-cors request-no-cors response response() response error() or redirect() methods immutable a header's guard affects the
set(), delete(), and append() methods which change the header's contents.
FormData - Web APIs
the formdata interface provides a way to easily construct a
set of key/value pairs representing form fields and their values, which can then be easily sent using the xmlhttprequest.send() method.
... it uses the same format a form would use if the encoding type were
set to "multipart/form-data".
... formdata.
set()
sets a new value for an existing key inside a formdata object, or adds the key/value if it does not already exist.
GamepadEvent - Web APIs
vendor prefix: webkitedge full support ≤18firefox full support 29 full support 29 no support 24 — 28disabled disabled from version 24 until version 28 (exclusive): this feature is behind the dom.gamepad.enabled preference (needs to be
set to true).
... 35edge full support 12firefox full support 29 full support 29 no support 24 — 28disabled disabled from version 24 until version 28 (exclusive): this feature is behind the dom.gamepad.enabled preference (needs to be
set to true).
...he vendor prefix: webkitedge full support 12firefox full support 29 full support 29 no support 24 — 28disabled disabled from version 24 until version 28 (exclusive): this feature is behind the dom.gamepad.enabled preference (needs to be
set to true).
GlobalEventHandlers.ondragend - Web APIs
example this example shows two ways to use the ondragend attribute handler to
set an element's dragend event handler.
...device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.
setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.ge...
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { //
set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <d...
GlobalEventHandlers.ondragenter - Web APIs
example this example demonstrates using the ondragenter attribute handler to
set an element's dragenter event handler.
...device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.
setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.ge...
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { //
set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <d...
GlobalEventHandlers.ondragexit - Web APIs
example this example demonstrates using the ondragexit attribute handler to
set an element's dragexit event handler.
...device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.
setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.ge...
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { //
set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <d...
GlobalEventHandlers.ondragleave - Web APIs
example this example demonstrates using the ondragleave attribute handler to
set an element's dragleave event handler.
...nt="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's border to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.
setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's background color to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(d...
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's background color back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { //
set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <d...
GlobalEventHandlers.onkeypress - Web APIs
*/ (function () { const ssecret = /* choose your hidden word...: */ "exit"; let noff
set = 0; document.onkeypress = function(opevt) { let oevent = opevt || window.event, nchr = oevent.charcode, snodetype = oevent.target.nodename.touppercase(); if (nchr === 0 || oevent.target.contenteditable.touppercase() === "true" || snodetype === "textarea" || snodetype === "input" && oevent.target.type.touppercase() === "text") { return tru...
...e; } if (nchr !== ssecret.charcodeat(noff
set)) { noff
set = nchr === ssecret.charcodeat(0) ?
... 1 : 0; } else if (noff
set < ssecret.length - 1) { noff
set++; } else { noff
set = 0; /* do something here...
HTMLAudioElement - Web APIs
mozcurrentsampleoff
set() returns the number of samples form the beginning of the stream that have been written so far into the audio stream created by calling mozwriteaudio().
... moz
setup()
sets up the audio stream to allow writing, given the number of audio channels (1 or 2) and the sample rate in khz.
... mozwriteaudio() writes a batch of audio frames to the stream at the current off
set, returning the number of bytes actually written to the stream.
HTMLCanvasElement.mozOpaque - Web APIs
this has been standardized as
setting the alpha option to false when creating a drawing context with htmlcanvaselement.getcontext().
... syntax var opaque = canvas.mozopaque; canvas.mozopaque = true; examples given this <canvas> element: <canvas id="canvas" width="300" height="300" moz-opaque></canvas> you can get or
set the mozopaque property.
... for example, you could conditionally
set it to true if mimetype == 'image/jpeg', or similar, to gain performance in your application when translucency is not needed.
HTMLCanvasElement - Web APIs
when the attribute is not specified, or if it is
set to an invalid value, like a negative, the default value of 150 is used.
...when the attribute is not specified, or if it is
set to an invalid value, like a negative, the default value of 300 is used.
...web content can
set this to a javascript function that will be called when the canvas is to be redrawn while the page is being printed.
HTMLElement: gotpointercapture event - Web APIs
the gotpointercapture event is fired when an element captures a pointer using
setpointercapture().
...it then calls
setpointercapture() on the element on a pointerdown event, which will trigger gotpointercapture.
... const para = document.queryselector('p'); para.addeventlistener('gotpointercapture', () => { console.log('i\'ve been captured!') }); para.addeventlistener('pointerdown', (event) => { para.
setpointercapture(event.pointerid); }); the same example, using the ongotpointercapture event handler property: const para = document.queryselector('p'); para.ongotpointercapture = () => { console.log('i\'ve been captured!') }; para.addeventlistener('pointerdown', (event) => { para.
setpointercapture(event.pointerid); }); specifications specification status pointer events obsolete ...
HTMLElement.lang - Web APIs
the htmlelement.lang property gets or
sets the base language of an element's attribute values and text content.
... syntax var languageused = elementnodereference.lang; // get the value of lang elementnodereference.lang = newlanguage; //
set new value for lang languageused is a string variable that gets the language in which the text of the current element is written.
... newlanguage is a string variable with its value
setting the language in which the text of the current element is written.
HTMLImageElement.crossOrigin - Web APIs
the htmlimageelement interface's crossorigin attribute is a string which specifies the cross-origin resource sharing (cors)
setting to use when retrieving the image.
... permitted values are: anonymous requests by the <img> element have their mode
set to cors and their credentials mode
set to same-origin.
... javascript the code below demonstrates
setting the crossorigin property on an <img> element to configure cors access for the fetch of a newly-created image.
OfflineAudioContext.startRendering() - Web APIs
after the offline audio graph is
set up, you need to render it to an audiobuffer using offlineaudiocontext.startrendering.
... at this point we create another audio context, create an audiobuffersourcenode inside it, and
set its buffer to be equal to the promise audiobuffer.
...ne online and offline audio context var audioctx = new audiocontext(); var offlinectx = new offlineaudiocontext(2,44100*40,44100); source = offlinectx.createbuffersource(); // use xhr to load an audio track, and // decodeaudiodata to decode it and offlineaudiocontext to render it function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.respon
setype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; source.connect(offlinectx.destination); source.start(); //source.loop = true; offlinectx.startrendering().then(function(renderedbuffer) { console.log('renderin...
OfflineAudioContext - Web APIs
after the offline audio graph is
set up, you need to render it to an audiobuffer using offlineaudiocontext.startrendering.
... at this point we create another audio context, create an audiobuffersourcenode inside it, and
set its buffer to be equal to the promise audiobuffer.
...ne online and offline audio context var audioctx = new audiocontext(); var offlinectx = new offlineaudiocontext(2,44100*40,44100); source = offlinectx.createbuffersource(); // use xhr to load an audio track, and // decodeaudiodata to decode it and offlineaudiocontext to render it function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.respon
setype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; source.connect(offlinectx.destination); source.start(); //source.loop = true; offlinectx.startrendering().then(function(renderedbuffer) { console.log('renderin...
ParentNode - Web APIs
methods parentnode.append() inserts a
set of node objects or domstring objects after the last child of the parentnode.
... parentnode.prepend() inserts a
set of node objects or domstring objects before the first child of the parentnode.
... parentnode.replacechildren() replaces the existing children of a node with a specified new
set of children.
PaymentRequest.prototype.id - Web APIs
if none is provided, the browser automatically
sets the id value to a uuid.
... 61edge full support 16firefox full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
... nochrome android full support 60firefox android full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
PaymentResponse.complete() - Web APIs
61edge full support 15firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
... yeswebview android no support nochrome android full support 56 full support 56 no support 53 — 56disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be
set to enabled).
... to change preferences in chrome, visit chrome://flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
PaymentResponse.details - Web APIs
61edge full support 15firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
... yeswebview android no support nochrome android full support 56 full support 56 no support 53 — 56disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be
set to enabled).
... to change preferences in chrome, visit chrome://flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
PaymentRequest.payerName - Web APIs
this option is only present when the requestpayername option is
set to true in the options parameter of the paymentrequest() constructor.
... 61edge full support 15firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
... nochrome android full support 58firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be
set to true).
PaymentResponse: payerdetailchange event - Web APIs
bubbles no cancelable no interface paymentrequestupdateevent event handler property onpayerdetailchange examples in the example below, onpayerdetailchange is used to
set up a listener for the payerdetailchange event in order to validate the information entered by the user, requesting that any mistakes be corrected // options for paymentrequest(), indicating that shipping address, // payer email address, name, and phone number all be collected.
... const options = { requestshipping: true, requestpayeremail: true, requestpayername: true, requestpayerphone: true, }; const request = new paymentrequest(methods, details, options); const response = request.show(); // get the data from the response let { payername: oldpayername, payeremail: oldpayeremail, payerphone: oldpayerphone, } = response; //
set up a handler for payerdetailchange events, to // request corrections as needed.
...ynames(errors).length) { await response.retry(errors); } else { // we have a good payment; send the data to the server await fetch("/pay-for-things/", { method: "post", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); addeventlistener equivalent you could also
set up the event handler using the addeventlistener() method: response.addeventlistener("payerdetailchange", async ev => { ...
Using the Payment Request API - Web APIs
in the following snippet we do just this — depending on whether the user can make a fast payment or needs to add payment credentials first, the title of the checkout button changes between "fast checkout with w3c" and "
setup w3c checkout".
...id('checkout-button'); checkoutbutton.innertext = "loading..."; if (window.paymentrequest) { let request = new paymentrequest(buildsupportedpaymentmethodnames(), buildshoppingcartdetails()); request.canmakepayment().then(function(canmakeafastpayment) { if (canmakeafastpayment) { checkoutbutton.innertext = "fast checkout with w3c"; } else { checkoutbutton.innertext = "
setup w3c checkout"; } }).catch(function(error) { // the user may have turned off the querying functionality in their // privacy
settings.
...et shouldcallpaymentrequest = true; let fallbacktolegacyonpaymentrequestfailure = false; (new paymentrequest(supportedpaymentmethods, {total: {label: 'stub', amount: {currency: 'usd', value: '0.01'}}}) .canmakepayment() .then(function(result) { shouldcallpaymentrequest = result; }).catch(function(error) { console.log(error); // the user may have turned off query ability in their privacy
settings.
PhotoCapabilities - Web APIs
photocapabilities.imageheight read only returns a media
settingsrange object indicating the image height range supported by the user agent.
... photocapabilities.imagewidth read only returns a media
settingsrange object indicating the image width range supported by the user agent.
... const input = document.queryselector('input[type="range"]'); var imagecapture; navigator.mediadevices.getusermedia({video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; const track = mediastream.getvideotracks()[0]; imagecapture = new imagecapture(track); return imagecapture.getphotocapabilities(); }) .then(photocapabilities => { const
settings = imagecapture.track.get
settings(); input.min = photocapabilities.imagewidth.min; input.max = photocapabilities.imagewidth.max; input.step = photocapabilities.imagewidth.step; return imagecapture.getphoto
settings(); }) .then(photo
settings => { input.value = photo
settings.imagewidth; }) .catch(error => console.log('argh!', error.name || error)); specifications specifica...
Pinch zoom gestures - Web APIs
when this event is processed, the target's border is
set to dashed to provide a clear visual indication the element has received a move event.
... // // this function
sets the target element's border to "dashed" to visually // indicate the pointer's target received a move event.
... function pointerup_handler(ev) { log(ev.type, ev); // remove this pointer from the cache and re
set the target's // background and border remove_event(ev); ev.target.style.background = "white"; ev.target.style.border = "1px solid black"; // if the number of pointers down is less than two then re
set diff tracker if (evcache.length < 2) { prevdiff = -1; } } application ui the application uses a <div> element for the touch area and provides buttons to enable logging and to cle...
RTCDataChannel.maxRetransmits - Web APIs
the read-only rtcdatachannel property maxretransmits returns the maximum number of times the browser should try to retransmit a message before giving up, as
set when the data channel was created, or null, which indicates that there is no maximum.
... this can only be
set when the rtcdatachannel is created by calling rtcpeerconnection.createdatachannel(), using the maxretransmits field in the specified options.
... syntax var tries = adatachannel.maxretransmits; value the maximum number of times the browser will try to retransmit a message before giving up, or null if not
set when rtcpeerconnection.createdatachannel() was called.
RTCIceTransport - Web APIs
getlocalparameters() returns a rtciceparameters object describing the ice parameters established by a call to the rtcpeerconnection.
setlocaldescription() method.
... getremoteparameters() returns a rtciceparameters object containing the ice parameters for the remote device, as
set by a call to rtcpeerconnection.
setremotedescription().
... if
setremotedescription() hasn't been called yet, the return value is null.
RTCOfferOptions.iceRestart - Web APIs
note: rather than manually creating and submitting an offer with icerestart
set to true, you should consider calling the rtcpeerconnection method restartice() instead.
... pc.oniceconnectionstatechange = function(evt) { if (pc.iceconnectionstate === "failed") { if (pc.restartice) { pc.restartice(); } else { pc.createoffer({ icerestart: true }) .then(pc.
setlocaldescription) .then(sendoffertoserver); } } } if the state changes to failed, this handler starts by looking to see if the rtcpeerconnection includes the restartice() method; if it does, we call that to request an ice restart.
... otherwise, we call back to the older technique: we manually create a new offer with icerestart
set to true, then that offer is
set as the new local description for the connection.
RTCPeerConnection.addStream() - Web APIs
if the signalingstate is
set to closed, an invalidstateerror is raised.
... if the signalingstate is
set to stable, the event negotiationneeded is sent on the rtcpeerconnection to indicate that ice negotiation must be repeated to consider the new stream.
...you can write web compatible code using feature detection instead: // add a track to a stream and the peer connection said stream was added to: stream.addtrack(track); if (pc.addtrack) { pc.addtrack(track, stream); } else { // if you have code listening for negotiationneeded events:
settimeout(() => pc.dispatchevent(new event('negotiationneeded'))); } // remove a track from a stream and the peer connection said stream was added to: stream.removetrack(track); if (pc.removetrack) { pc.removetrack(pc.getsenders().find(sender => sender.track == track)); } else { // if you have code listening for negotiationneeded events:
settimeout(() => pc.dispatchevent(new event('negotiati...
RTCPeerConnection.canTrickleIceCandidates - Web APIs
this property is only
set after having called rtcpeerconnection.
setremotedescription().
... note: this property's value is determined once the local peer has called rtcpeerconnection.
setremotedescription(); the provided description is used by the ice agent to determine whether or not the remote peer supports trickled ice candidates.
...pc.
setremotedescription(remoteoffer) .then(_ => pc.createanswer()) .then(answer => pc.
setlocaldescription(answer)) .then(_ => if (pc.cantrickleicecandidates) { return pc.localdescription; } return new promise(r => { pc.addeventlistener('icegatheringstatechange', e => { if (e.target.icegatheringstate === 'complete') { r(pc.localdescription); } }); }); }) .then(answer => sendanswertopeer(answer)) // signaling message .catch(e => handleerror(e)); pc.addeventlistener('icecandidate', e => { if (pc.cantrickleicecandidates) { sendcandidatetopeer(e.candidat...
RTCPeerConnection: connectionstatechange event - Web APIs
bubbles no cancelable no interface event event handler onconnectionstatechange examples for an rtcpeerconnection, pc, this example
sets up a handler for connectionstatechange messages to handle changes to the connectivity of the webrtc session.
... it simply calls an app-defined function called
setonlinestatus() to update a status display.
... pc.onconnectionstatechange = ev => { switch(pc.connectionstate) { case "new": case "checking":
setonlinestatus("connecting..."); break; case "connected":
setonlinestatus("online"); break; case "disconnected":
setonlinestatus("disconnecting..."); break; case "closed":
setonlinestatus("offline"); break; case "failed":
setonlinestatus("error"); break; default:
setonlinestatus("unknown"); break; } } you can also create a handler for connectionstatechange by using addeventlistener(): pc.addeventlistener("connectionstatechange", ev => { switch(pc.connectionstate) { /* ...
RTCPeerConnection.currentLocalDescription - Web APIs
to change the currentlocaldescription, call rtcpeerconnection.
setlocaldescription(), which triggers a series of events which leads to this value being
set.
... syntax sessiondescription = rtcpeerconnection.currentlocaldescription; return value the current description of the local end of the connection, if one has been
set.
... if none has been successfully
set, this value is null.
RTCPeerConnection.currentRemoteDescription - Web APIs
to change the currentremotedescription, call rtcpeerconnection.
setremotedescription(), which triggers a series of events which leads to this value being
set.
... syntax sessiondescription = rtcpeerconnection.currentremotedescription; return value the current description of the remote end of the connection, if one has been
set.
... if none has been successfully
set, this value is null.
RTCPeerConnection.getConfiguration() - Web APIs
the returned configuration is the last configuration applied via
setconfiguration(), or if
setconfiguration() hasn't been called, the configuration the rtcpeerconnection was constructed with.
...uration = mypeerconnection.getconfiguration(); if ((configuration.certificates != undefined) && (!configuration.certificates.length)) { rtcpeerconnection.generatecertificate({ name: 'rsassa-pkcs1-v1_5', hash: 'sha-256', moduluslength: 2048, publicexponent: new uint8array([1, 0, 1]) }).then(function(cert) { configuration.certificates = [cert]; mypeerconnection.
setconfiguration(configuration); }); } this example fetches the current configuration of the rtcpeerconnection, then looks to see if it has any certificates
set by examining whether or not (a) the configuration has a value for certificates, and (b) whether its length is zero.
... if it's determined that there are no certificates in place, rtcpeerconnection.generatecertificate() is called to create a new certificate; we provide a fulfillment handler which adds a new array containing the one newly-created certificate to the current configuration and passes it to
setconfiguration() to add the certificate to the connection.
RTCPeerConnection.getSenders() - Web APIs
example in this example, a
setmuting() function is shown.
...the function gets the list of the peer connection's senders and iterates over every sender,
setting the corresponding media track's enabled to the inverse of the specified muting.
... function
setmuting(pc, muting) { let senderlist = pc.getsenders(); senderlist.foreach(sender) { sender.track.enabled = !muting; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getsenders()' in that specification.
RTCPeerConnection.getStats() - Web APIs
example this example creates a periodic function using
setinterval() that collects statistics for an rtcpeerconnection every second, generating an html-formatted report and inserting it into a specific element in the dom.
... window.
setinterval(function() { mypeerconnection.getstats(null).then(stats => { let statsoutput = ""; stats.foreach(report => { statsoutput += `<h2>report: ${report.type}</h3>\n<strong>id:</strong> ${report.id}<br>\n` + `<strong>timestamp:</strong> ${report.timestamp}<br>\n`; // now the statistics for this report; we intentially drop the ones we // sorted to the top above object.keys(report).foreach(statname => { if (statname !== "id" && statname !== "timestamp" && statname !== "type") { statsoutput += `<strong>${statname}:</strong> ${report[statname]}<br>\n`; } }); }); document.queryselector(".stats-box").innerhtml = statsoutput; }); }, 1000); this works by calling getstats(), then, when t...
... once the html for the report is generated, it is injected into the element whose class is "stats-box" by
setting its innerhtml property.
RTCPeerConnection.onaddstream - Web APIs
the event is sent immediately after the call
setremotedescription() and doesn't wait for the result of the sdp negotiation.
...the first time an event occurs may be nearly immediately after the remote end of the connection is
set using rtcpeerconnection.
setremotedescription(); it doesn't wait for a particular stream to be accepted or rejected using sdp negotiation.
... example this code, based on an older version of our signaling and video calling sample, responds to addstream events by
setting the video source for a <video> element to the stream specified in the event, and then enabling a "hang up" button in the app's user interface.
RTCPeerConnection.onnegotiationneeded - Web APIs
syntax rtcpeerconnection.onnegotiationneeded = eventhandler; value this should be
set to a function you provide which is passed a single parameter: an event object containing the negotiationneeded event.
... pc.onnegotiationneeded = function() { pc.createoffer().then(function(offer) { return pc.
setlocaldescription(offer); }) .then(function() { // send the offer to the remote peer through the signaling server }); }) .catch(reporterror); } first, it creates the offer by calling createoffer().
... when that succeeds, the offer is passed into
setlocaldescription() to
set the local description for the connection.
RTCPeerConnection.ontrack - Web APIs
the function receives as input the event object, of type rtctrackevent; this event is sent when a new incoming mediastreamtrack has been created and associated with an rtcrtpreceiver object which has been added to the
set of receivers on connection.
... syntax rtcpeerconnection.ontrack = eventhandler; value
set ontrack to be a function you provide that accepts as input a rtctrackevent object describing the new track and how it's being used.
... pc.ontrack = function(event) { document.getelementbyid("received_video").srcobject = event.streams[0]; document.getelementbyid("hangup-button").disabled = false; }; the first line of our ontrack event handler takes the first stream in the incoming track and
sets the srcobject attribute to that.
RTCRtpTransceiver.direction - Web APIs
[1] to determine if a sender has at least one active encoding, the user agent gets its parameters using rtcrtpsender.getparameters(), then looks at the parameters' encodings property; if any of the listed encodings has its active property
set to true, the sender has an active encoding.
... exceptions when
setting the value of direction, the following exceptions can occur: invalidstateerror either the receiver's rtcpeerconnection is closed or the rtcrtpreceiver is stopped.
... usage notes
setting the direction when you change the value of direction, an invalidstateerror exception will occur if the connection is closed or the receiver is stopped.
RTCSessionDescription() - Web APIs
this constructor has been deprecated because rtcpeerconnection.
setlocaldescription() and other methods which take sdp as input now directly accept an object conforming to the rtcsessiondescriptioninit dictionary, so you don't have to instantiate an rtcsessiondescription yourself.
... this is no longer necessary, however; rtcpeerconnection.
setlocaldescription() and other methods which take sdp as input now directly accept an object conforming to the rtcsessiondescriptioninit dictionary, so you don't have to instantiate an rtcsessiondescription yourself.
... navigator.getusermedia({video: true}, function(stream) { pc.onaddstream({stream: stream}); // adding a local stream won't trigger the onaddstream callback pc.addstream(stream); pc.createoffer(function(offer) { pc.
setlocaldescription(new rtcsessiondescription(offer), function() { // send the offer to a server to be forwarded to the friend you're calling.
Range.commonAncestorContainer - Web APIs
to change the ancestor container of a node, consider using the various methods available to
set the start and end positions of the range, such as range.
setstart() and range.
setend().
... html <ul> <li>strings <ul> <li>cello</li> <li>violin <ul> <li>first chair</li> <li>second chair</li> </ul> </li> </ul> </li> <li>woodwinds <ul> <li>clarinet</li> <li>oboe</li> </ul> </li> </ul> css the .highlight class created below uses a
set of css @keyframes to animate a fading outline.
...pointerup', e => { const selection = window.getselection(); if (selection.type === 'range') { for (let i = 0; i < selection.rangecount; i++) { const range = selection.getrangeat(i); playanimation(range.commonancestorcontainer); } } }); function playanimation(el) { if (el.nodetype === node.text_node) { el = el.parentnode; } el.classlist.remove('highlight');
settimeout(() => { el.classlist.add('highlight'); }, 0); } result specifications specification status comment domthe definition of 'range.commonancestorcontainer' in that specification.
Range.isPointInRange() - Web APIs
it returns true if the point (cursor position) at off
set within referencenode is within this range.
... syntax bool = range.ispointinrange( referencenode, off
set ) parameters referencenode the node to compare with the range.
... off
set the off
set into node of the point to compare with the range.
Reporting API - Web APIs
this method is not as failsafe as the report-to method described above — any page crash could stop you retrieving the reports — but it is easier to
set up, and more flexible.
... reporting api dictionaries reportingobserveroptions allows options to be
set in the constructor when creating a reporting observer.
...tructor: observer.observe(); later on in the example we deliberately use the deprecated version of mediadevices.getusermedia(): if(navigator.mozgetusermedia) { navigator.mozgetusermedia( constraints, success, failure); } else { navigator.getusermedia( constraints, success, failure); } this causes a deprecation report to be generated; because of the event handler we
set up inside the reportingobserver() constructor, we can now click the button to display the report details.
Multi-touch interaction - Web APIs
function
set_handlers(name) { // install event handlers for the given element var el=document.getelementbyid(name); el.ontouchstart = start_handler; el.ontouchmove = move_handler; // use same handler for touchcancel and touchend el.ontouchcancel = end_handler; el.ontouchend = end_handler; } function init() {
set_handlers("target1");
set_handlers("target2");
set_handlers("target3");
set_handlers("t...
... // // this function
sets the target element's border to "dashed" to visually // indicate the target received a move event.
... // ev.preventdefault(); if (logevents) log("touchmove", ev, false); // to avoid too much color flashing many touchmove events are started, // don't update the background if two touch points are active if (!(ev.touches.length == 2 && ev.targettouches.length == 2)) update_background(ev); //
set the target element's border to dashed to give a clear visual // indication the element received a move event.
Using Touch Events - Web APIs
for the touchend event, it is a list of the touch points that have been removed from the surface (that is, the
set of touch points corresponding to fingers no longer touching the surface).
... together, these interfaces define a relatively low-level
set of features, yet they support many kinds of touch-based interaction, including the familiar multi-touch gestures such as multi-finger swipe, rotation, pinch and zoom.
... // touchmove handler function process_touchmove(ev) { //
set call preventdefault() ev.preventdefault(); } best practices here are some best practices to consider when using touch events: minimize the amount of work that is done in the touch handlers.
Touch events - Web APIs
</canvas> <br> log: <pre id="log" style="border: 1px solid #ccc;"></pre>
setting up the event handlers when the page loads, the startup() function shown below will be called.
... function startup() { var el = document.getelementbyid("canvas"); el.addeventlistener("touchstart", handlestart, false); el.addeventlistener("touchend", handleend, false); el.addeventlistener("touchcancel", handlecancel, false); el.addeventlistener("touchmove", handlemove, false); } document.addeventlistener("domcontentloaded", startup); this simply
sets up all the event listeners for our <canvas> element so we can handle the touch events as they occur.
...floor(touch.identifier / 7) % 16; r = r.tostring(16); // make it a hex digit g = g.tostring(16); // make it a hex digit b = b.tostring(16); // make it a hex digit var color = "#" + r + g + b; console.log("color for touch with identifier " + touch.identifier + " = " + color); return color; } the result from this function is a string that can be used when calling <canvas> functions to
set drawing colors.
UIEvent.initUIEvent() - Web APIs
this method must be called to
set the event before it is dispatched, using eventtarget.dispatchevent().
...once
set, the read-only property event.bubbles will give its value.
...once
set, the read-only property event.cancelable will give its value.
URL API - Web APIs
the url standard also defines concepts such as domains, hosts, and ip addresses, and also attempts to describe in a standard way the legacy application/x-www-form-urlencoded mime type used to submit web forms' contents as a
set of key/value pairs.
... changing the url most of the properties of url are
settable; you can write new values to them to alter the url represented by the object.
... for example, to create a url and
set its username: let myusername = "someguy"; let addr = new url("https://mysite.com/login"); addr.username = myusername;
setting the value of username not only
sets that property's value, but it updates the overall url.
ValidityState.patternMismatch - Web APIs
the read-only patternmismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints
set by the element's pattern attribute.
... if the field supports the pattern attribute -- which means the <input> is of type text, tel, email, url, password, or search -- and the pattern value is
set to a valid regular expression, if the value don't doesn't conform to the constraints
set by the pattern value, the patternmismatch property will be true.
...###" aria-label="3-digit prefix" size="2"/> - <input name="tel3" type="tel" pattern="[0-9]{4}" placeholder="####" aria-label="4-digit number" size="3"/> </label> </p> here we have 3 sections for a north american phone number with an implicit label encompassing all three components of the phone number, expecting 3-digits, 3-digits and 4-digits respectively, as defined by the pattern attribute
set on each.
WEBGL_debug_renderer_info - Web APIs
depending on the privacy
settings of the browser, this extension might only be available to privileged contexts.
... availability: depending on the privacy
settings of the browser, this extension might only be available to privileged contexts or not work at all.
... in firefox, if privacy.resistfingerprinting is
set to true, this extensions is disabled.
WebGL2RenderingContext.texImage3D() - Web APIs
syntax void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, glintptr off
set); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlcanvaselement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlimageelement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlvideoelement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, imagebitmap source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format...
...srcdata); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, arraybufferview srcdata, srcoff
set); parameters target a glenum specifying the binding point (target) of the active texture.
... off
set a glintptr byte off
set into the webglbuffer's data store.
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
syntax void gl.vertexattribipointer(index, size, type, stride, off
set); parameters index a gluint specifying the index of the vertex attribute that is to be modified.
... stride a glsizei specifying the off
set in bytes between the beginning of consecutive vertex attributes.
... off
set a glintptr specifying an off
set in bytes of the first component in the vertex attribute array.
WebGLRenderingContext.bufferData() - Web APIs
srcdata, usage); void gl.bufferdata(target, arraybufferview srcdata, usage); // webgl2: void gl.bufferdata(target, arraybufferview srcdata, usage, srcoff
set, length); parameters target a glenum specifying the binding point (target).
... size a glsizeiptr
setting the size in bytes of the buffer object's data store.
... srcoff
set a gluint specifying the element index off
set where to start reading the buffer.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
pixels); // additionally available in webgl 2: // read from buffer bound to gl.pixel_unpack_buffer void gl.compressedteximage2d(target, level, internalformat, width, height, border, glsizei imagesize, glintptr off
set); void gl.compressedteximage2d(target, level, internalformat, width, height, border, arraybufferview srcdata, optional srcoff
set, optional srclengthoverride); // read from buffer bound to gl.pixel_unpack_buffer void gl.compressedteximage3d(target, level, internalformat, width, height, depth, border, glsizei imagesize, glintptr off
set); void gl.compressedteximage3d(t...
...arget, level, internalformat, width, height, depth, border, arraybufferview srcdata, optional srcoff
set, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active texture.
... off
set a glintptr specifying the off
set in bytes from which to read from the buffer bound to gl.pixel_unpack_buffer.
WebGLRenderingContext.copyTexSubImage2D() - Web APIs
syntax void gl.copytexsubimage2d(target, level, xoff
set, yoff
set, x, y, width, height); parameters target a glenum specifying the binding point (target) of the active texture.
... xoff
set a glint specifying the horizontal off
set within the texture image.
... yoff
set a glint specifying the vertical off
set within the texture image.
WebGLRenderingContext.drawElements() - Web APIs
syntax void gl.drawelements(mode, count, type, off
set); parameters mode a glenum specifying the type primitive to render.
...possible values are: gl.unsigned_byte gl.unsigned_short when using the oes_element_index_uint extension: gl.unsigned_int off
set a glintptr specifying a byte off
set in the element array buffer.
... if off
set is not a valid multiple of the size of the given type, a gl.invalid_operation error is thrown.
WebGLRenderingContext.makeXRCompatible() - Web APIs
*/ outputcanvas.addeventlistener("webglcontextrestored", (event) => { loadsceneresources(currentscene); }); async function onstartedxrsession(xrsession) { try { await gl.makexrcompatible(); } catch(err) { switch(err) { case aborterror: showsimplemessagebox("unable to transfer the game to your xr head
set.", "cancel"); break; case invalidstateerror: showsimplemessagebox("you don't appear to have a compatible xr head
set available.", "cancel"); break; default: handlefatalerror(err); break; } xrsession.end(); } } async function handlestartbuttonclick(event) { if (event.target.classlist.contains("use-webxr") && navigator.xr) { try { ...
...if the button clicked by the user has that class (and we've confirmed that webxr is available by ensuring that the navigator.xr property exists), we use requestsession() to request a new webxr session and
set the usingxr flag to true.
... handlers are provided for both webglcontextlost and webglcontextrestored; in the first case, we make sure we're aware that the state can be recovered, while in the latter we actually reload the scene to ensure we have the correct resources for the current screen or head
set configuration.
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.
...d from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_rows number of rows of pixel locations skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_images number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 examples
setting the pixel storage mode affects the webglrenderingcontext.readpixels() operations, as well as unpacking of textures with the webglrenderingcontext.teximage2d() and webglrenderingcontext.texsubimage2d() methods.
WebGLRenderingContext.shaderSource() - Web APIs
the webglrenderingcontext.shadersource() method of the webgl api
sets the source code of a webglshader.
... syntax void gl.shadersource(shader, source); parameters shader a webglshader object in which to
set the source code.
... source a domstring containing the glsl source code to
set.
WebGLRenderingContext.stencilOp() - Web APIs
the webglrenderingcontext.stencilop() method of the webgl api
sets both the front and back-facing stencil test actions.
... gl.zero
sets the stencil buffer value to 0.
... gl.replace
sets the stencil buffer value to the reference value as specified by webglrenderingcontext.stencilfunc().
WebGLRenderingContext.stencilOpSeparate() - Web APIs
the webglrenderingcontext.stencilopseparate() method of the webgl api
sets the front and/or back-facing stencil test actions.
... gl.zero
sets the stencil buffer value to 0.
... gl.replace
sets the stencil buffer value to the reference value as specified by webglrenderingcontext.stencilfunc().
Creating 3D objects using WebGL - Web APIs
we can pass a lot fewer data around by building an array of all 24 vertices, then referring to each vertex by its index into that array instead of moving entire
sets of coordinates around.
... gl.vertexattribpointer( programinfo.attriblocations.vertexposition, numcomponents, type, normalize, stride, off
set); gl.enablevertexattribarray( programinfo.attriblocations.vertexposition); } define the vertices' colors we also need to build an array of colors for each of the 24 vertices.
... { const vertexcount = 36; const type = gl.unsigned_short; const off
set = 0; gl.drawelements(gl.triangles, vertexcount, type, off
set); } since each face of our cube is comprised of two triangles, there are 6 vertices per side, or 36 total vertices in the cube, even though many of them are duplicates.
Getting started with WebGL - Web APIs
its purpose is to
set up the webgl context and start rendering content.
...your browser or machine may not support it."); return; } //
set clear color to black, fully opaque gl.clearcolor(0.0, 0.0, 0.0, 1.0); // clear the color buffer with specified clear color gl.clear(gl.color_buffer_bit); } window.onload = main; the first thing we do here is obtain a reference to the canvas, assigning it to a variable named canvas.
...in this case, we
set the clear color to black, and clear the context to that color (redrawing the canvas with the background color).
Using shaders to apply color in WebGL - Web APIs
applying color to the vertices in webgl objects are built using
sets of vertices, each of which has a position and a color.
... drawing using the colors next, it's necessary to add code to look up the attribute location for the colors and
setup that attribute for the shader program: const programinfo = { program: shaderprogram, attriblocations: { vertexposition: gl.getattriblocation(shaderprogram, 'avertexposition'), vertexcolor: gl.getattriblocation(shaderprogram, 'avertexcolor'), }, ...
... { const numcomponents = 4; const type = gl.float; const normalize = false; const stride = 0; const off
set = 0; gl.bindbuffer(gl.array_buffer, buffers.color); gl.vertexattribpointer( programinfo.attriblocations.vertexcolor, numcomponents, type, normalize, stride, off
set); gl.enablevertexattribarray( programinfo.attriblocations.vertexcolor); } view the complete code | open this demo on a new page « previousnext » ...
Using WebRTC data channels - Web APIs
let datachannel = pc.createdatachannel("myapp channel"); datachannel.addeventlistener("open", (event) => { begintransmission(datachannel); }); manual negotiation to manually negotiate the data channel connection, you need to first create a new rtcdatachannel object using the createdatachannel() method on the rtcpeerconnection, specifying in the options a negotiated property
set to true.
...this process should signal to the remote peer that it should create its own rtcdatachannel with the negotiated property also
set to true, using the same id.
... let datachannel = pc.createdatachannel("myapp channel", { negotiated: true }); datachannel.addeventlistener("open", (event) => { begintransmission(datachannel); }); requestremotechannel(datachannel.id); in this code snippet, the channel is created with negotiated
set to true, then a function called requestremotechannel() is used to trigger negotiation, to create a remote channel with the same id as the local channel.
WebXR performance guide - Web APIs
it makes sense, then, to have a limited
set of these objects, simply replacing their contents with the new information each time you need to use them.
... they can be thought of as being similar to the registers in a microprocessor: a limited
set of memory storage slots for specific kinds of data or use cases.
...that means that for every frame, the javascript runtime has to allocate memory for those and
set them up—possibly triggering garbage collection—and then when each interaction of the loop is completed, the memory is released.
Web Authentication API - Web APIs
navigator.credentials.get() - when used with the publickey option, uses an existing
set of credentials to authenticate to a service, either logging a user in or as a form of second-factor authentication.
...the full
set of required fields, optional fields, and their meanings for creating a registration request can be found in the publickeycredentialcreationoptions dictionary.
... likewise, the full
set of response fields can be found in the publickeycredential interface (where publickeycredential.response is the authenticatorattestationresponse interface).
Window.clearImmediate() - Web APIs
this method clears the action specified by window.
setimmediate.
... syntax window.clearimmediate( immediateid ) where immediateid is a id returned by window.
setimmediate.
... examples let immediateid =
setimmediate(() => { // run some code } document.getelementbyid("button") .addeventlistener(() => { clearimmediate(immediateid); }); specifications specification status comment efficient script yielding the definition of '
setimmediate' in that specification.
window.location - Web APIs
note that security
settings, like cors, may prevent this to effectively happen.
... example #6: using bookmarks without changing the hash property: <!doctype html> <html> <head> <meta char
set="utf-8"/> <title>mdn example</title> <script> function shownode (onode) { document.documentelement.scrolltop = onode.off
settop; document.documentelement.scrollleft = onode.off
setleft; } function showbookmark (sbookmark, busehash) { if (arguments.length === 1 || busehash) { location.hash = sbookmark; return; } var obookmark = document.queryselector(sbookmark); if (obookmark) { shownode(...
...dow.addeventlistener("scroll", _chkowner, false); } else if (window.attachevent) { window.attachevent("onscroll", _chkowner); } return function (sbookmark, busehash) { var onode = document.queryselector(sbookmark); _scrolly = document.documentelement.scrolltop; _scrollx = document.documentelement.scrollleft; _bookmark = sbookmark; _usehash = busehash === true; _nodex = onode.off
setleft; _nodey = onode.off
settop; _itframe = 1; if (_scrollid === -1) { _scrollid =
setinterval(_next, math.round(nduration / nframes)); } }; })(); specifications specification status comment html living standardthe definition of 'window.location' in that specification.
Window.sessionStorage - Web APIs
example the following snippet accesses the current origin's session storage object and adds data to it with storage.
setitem().
... sessionstorage.
setitem('mycat', 'tom'); the following example autosaves the contents of a text field, and if the browser is refreshed, restores the text field content so that no writing is lost.
...see if we have an autosave value // (this will only happen if the page is accidentally refreshed) if (sessionstorage.getitem("autosave")) { // restore the contents of the text field field.value = sessionstorage.getitem("autosave"); } // listen for changes in the text field field.addeventlistener("change", function() { // and save the results into the session storage object sessionstorage.
setitem("autosave", field.value); }); note: please refer to the using the web storage api article for a full example.
XMLHttpRequest.multipart - Web APIs
please use server-sent events, web sockets, or respon
setext from progress events instead.
...if
set to true, the content type of the initial response must be multipart/x-mixed-replace or an error will occur.
... note: when this is
set, the onload handler and other event handlers are not re
set after the first xmldocument is loaded, and the onload handler is called after each part of the response is received.
XMLHttpRequest.readyState - Web APIs
3 loading downloading; respon
setext holds partial data.
...during this state, the request headers can be
set using the
setrequestheader() method and the send() method can be called which will initiate the fetch.
...if respon
setype is "text" or empty string, respon
setext will have the partial text response as it loads.
XMLHttpRequest.responseXML - Web APIs
if the respon
setype is
set to "document" and the request was made asynchronously, instead the response is parsed as "text/html".
... exceptions invalidstateerror the respon
setype isn't either "document" or an empty string.
... example var xhr = new xmlhttprequest; xhr.open('get', '/server'); // if specified, respon
setype must be empty string or "document" xhr.respon
setype = 'document'; // force the response to be parsed as xml xhr.overridemimetype('text/xml'); xhr.onload = function () { if (xhr.readystate === xhr.done && xhr.status === 200) { console.log(xhr.response, xhr.responsexml); } }; xhr.send(); specifications specification status comment xmlhttprequestthe definition of 'responsexml' in that specification.
XMLHttpRequest.send() - Web APIs
if the request method is get or head, the body parameter is ignored and the request body is
set to null.
... if no accept header has been
set using the
setrequestheader(), an accept header with the type "*/*" (any type) is sent.
...}; xhr.send(null); // xhr.send('string'); // xhr.send(new blob()); // xhr.send(new int8array()); // xhr.send(document); example: post var xhr = new xmlhttprequest(); xhr.open("post", '/server', true); //send the proper header information along with the request xhr.
setrequestheader("content-type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { // call a function when the state changes.
XRBoundedReferenceSpace.boundsGeometry - Web APIs
each point must be at floor level, with its y coordinate's value
set to 0.
... each entry in boundsgeometry is equal to an entry in the list of native bounds geometry points for the room, premultiplied by the inverse of the origin off
set.
...as a general rule, with the origin for x and z located in or near the center of the space, and with the orientation
set facing in a logical forward direction, as appropriate for the underlying platform or xr hardware.
XREnvironmentBlendMode - Web APIs
this is primarily used by fully-immersive vr head
sets, which totally obscure the surrounding environment, with none of the real world shown to the user at all.
...as with the opaque
setting, alpha values specified are ignored and treated as if they were 1.0.
... alpha-blend used by head
sets or goggles which use cameras to capture the real world and display it digitally on the screen or screens used to render the content for the user to see, this offers a way to create an ar presentation using a vr device.
XRPermissionDescriptor.optionalFeatures - Web APIs
syntax xrpermissiondescriptor = { mode: xrsessionmode, requiredfeatures: reqfeaturelist, optionalfeatures: optfeaturelist }; xrpermissiondescriptor.optionalfeatures = optfeaturelist; optfeaturelist = xrpermissiondescriptor.optionalfeatures; value an array of strings taken from the xrreferencespacetype enumerated type, indicating
set of features that your app would like to use, but can operate without if permission to use them isn't available.
...it's particularly useful when determining the distance between the viewer and an input, or when working with off
set spaces.
... xrreferencespace usage notes examples let xrpermissiondesc = { name: "xr", mode: "immersive-vr", optionalfeatures: [ "bounded-floor" ] }; if (navigator.permissions) { navigator.permissions.query(xrpermissiondesc).then(({state}) => { switch(state) { case "granted":
setupxr(); break; case "prompt": promptand
setupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else {
setupxr(); } specifications specification status comment webxr device apithe definition of 'xrpermissiondescriptor.optionalfeatures' in that specification.
XRPermissionDescriptor.requiredFeatures - Web APIs
the xrpermissiondescriptor dictionary's requiredfeatures property should be
set prior to calling navigator.permissions.query() to a list of webxr features which must be supported for the app to work.
...it's particularly useful when determining the distance between the viewer and an input, or when working with off
set spaces.
... let xrpermissiondesc = { name: "xr", mode: "immersive-ar", requiredfeatures: [ "local-floor" ] }; if (navigator.permissions) { navigator.permissions.query(xrpermissiondesc).then(({state}) => { switch(state) { case "granted":
setupxr(); break; case "prompt": promptand
setupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else {
setupxr(); } specifications specification status comment webxr device apithe definition of 'xrpermissiondescriptor.requiredfeatures' in that specification.
XRPose.emulatedPosition - Web APIs
a basic xr head
set provides three degrees of freedom (3dof), tracking the pitch, yaw, and roll of the user's head.
...if its position is computed as an off
set from another object (such as by basing it off the model representing the user's body), then this value is true.
... this information is important because devices whose position is emulated are prone to their off
set drifting relative to the real world space over time.
XRSession.environmentBlendMode - Web APIs
this is primarily used by fully-immersive vr head
sets, which totally obscure the surrounding environment, with none of the real world shown to the user at all.
...as with the opaque
setting, alpha values specified are ignored and treated as if they were 1.0.
... alpha-blend used by head
sets or goggles which use cameras to capture the real world and display it digitally on the screen or screens used to render the content for the user to see, this offers a way to create an ar presentation using a vr device.
XRSession.requestAnimationFrame() - Web APIs
the callback receives as input two parameters: time a domhighrestimestamp indicating the time off
set at which the updated viewer state was received from the webxr device.
... let xrsession = null function onwindowanimationframe(time) { window.requestanimationframe(onwindowanimationframe) // this may be called while an immersive session is running on some devices, // such as a desktop with a tethered head
set.
...function startxrsession() { navigator.xr.requestsession('immersive-vr').then((session) => { xrsession = session xrsession.addeventlistener('end', onxrsessionended) // do necessary session
setup here.
XRSystem: devicechange event - Web APIs
a devicechange event is fired on an xrsystem object whenever the whenever the availability of immersive xr devices has changed; for example, a vr head
set or ar goggles have been connected or disconnected.
... if (navigator.xr) { navigator.xr.addeventlistener("devicechange", event => { navigator.xr.issessionsupported("immersive-vr") .then(immersiveok) => { if (immersiveok) { enablexrbutton.disabled = false; } else { enablexrbutton.disabled = true; } }); }); } when devicechange is received, the handler
set up in this code calls the xr method issessionsupported() to find out if there's a device available that can handle immersive vr presentations.
... you can also use the ondevicechange event handler property to
set a single handler for devicechange events: if (navigator.xr) { navigator.xr.ondevicechange = event => { /* ...
XRSystem: requestSession() - Web APIs
exceptions this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: invalidstateerror the requested session mode is immersive-vr but there is already an immersive vr session either currently active or in the process of being
set up.
...if the promise resolves, it
sets up a session and initiates the animation loop.
... navigator.xr.requestsession("immersive-vr") .then((xrsession) => { xrsession.addeventlistener('end', onxrsessionended); // do necessary session
setup here.
XRSystem - Web APIs
events devicechange sent when the
set of available xr devices has changed.
...if there isn't, we use requestsession() to start one and, once the returned promise resolves, we call a function onsessionstarted() to
set up our session for rendering and so forth.
...when the returned promise resolves, we
set xrsession to null to record the fact that we no longer have an ongoing session.
XRWebGLLayer.framebuffer - Web APIs
opaque framebuffers initialized with the depth property
set to false will not have a depth buffer and will rely on the coordinates alone to determine distance.
... the xr compositor assumes that opaque framebuffers use colors with premultiplied allpha, regardless of whether or not the webgl context's premultipliedalpha context attribute is
set.
... the default configuration of a new framebuffer upon creating a new xrwebgllayer, its new framebuffer is initialized just like the default framebuffer for any webgl interface: the color buffer is configured with its clear value
set to the color (0, 0, 0, 0) (meaning transparent black).
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
now we can see the coordinates of each of the viewports representing these two views: since each eye gets half of the frame buffer, the result is that the left eye gets a 640x720 portion of the buffer with the viewport's x and y at 0, the width at 640, and the height
set to 720.
... the right eye gets the other half of the frame buffer, with its viewport's x
set at 639.
... that gets us a new xrwebgllayer object representing a rendering surface we can use for the xrsession; we
set it as the rendering surface for xrsession by calling its updaterenderstate() method, passing the new gllayer in using the xrrenderstate dictionary's xrrenderstate.baselayer property.
XRWebGLLayer.getViewport() - Web APIs
example this example demonstrates in part what the callback for the requestanimationframe() function might look like, using getviewport() to get the viewport so that drawing can be constrained to the area
set aside for the eye whose viewpoint is currently being rendered.
... this works because the
set of views returned by an xrviewerpose each represent one eye's perspective on the scene.
... since the framebuffer is split in half, one half for each eye,
setting the webgl viewport to match the webxr layer's viewport will ensure that when rendering the scene for the current eye's pose, it is rendered into the correct half of the framebuffer.
ARIA Screen Reader Implementors Guide - Accessibility
interpreting wai-aria live region markup live changes are hints: in general live region markup is provided by the author as hints, and the assistive technology may allow for global, site or even region-specific
settings, as well as heuristics to help with live changes on pages that have no wai-aria hints.
... ideas for
settings and heuristics allow for a different voice (in text-to-speech) or other varying presentational characteristics to
set live changes apart.
... allow global
settings to turn off the presentation of live changes, present all live changes, use markup, or be "smart" (use heuristics) details for processing via platform accessibility apis we hope browser manufacturers will work to provide consistent implementations.
Using the aria-invalid attribute - Accessibility
aria-invalid can also be used to indicate that a required field has not been filled in.the attribute should be programmatically
set as a result of a validation process.
... the snippet below shows a very simple validation function, which only checks for the presence of a particular character (in the real world, validation will likely be more sophisticated): function checkvalidity(aid, asearchterm, amsg){ var elem = document.getelementbyid(aid); var invalid = (elem.value.indexof(asearchterm) < 0); if (invalid) { elem.
setattribute("aria-invalid", "true"); updatealert(amsg); } else { elem.
setattribute("aria-invalid", "false"); updatealert(); } } the snippet below shows the alert functions, which add (or remove) the error message: function updatealert(msg) { var oldalert = document.getelementbyid("alert"); if (oldalert) { document.body.removechild(oldalert); } ...
... if (msg) { var newalert = document.createelement("div"); newalert.
setattribute("role", "alert"); newalert.
setattribute("id", "alert"); var content = document.createtextnode(msg); newalert.appendchild(content); document.body.appendchild(newalert); } } note that the alert has the aria role attribute
set to "alert." working examples: alert role example (uses the aria-invalid attribute) notes when aria-invalid is used in conjunction with the aria-required attribute, aria-invalid should not be
set to true before the form is submitted - only in response to validation.
Using the log role - Accessibility
where the user needs to hear the entire live region upon a change aria-atomic="true" should be
set.
... to have announcements made as soon as possible and where the user may be interrupted, aria-live="assertive" can be
set for more aggressive updates.
... assistive technology products should listen for such an event and notify the user accordingly: screen readers should announce changes inside a log when the user is idle, unless aria-live=”assertive” has been
set and in which case the user may be interrupted.
ARIA: img role - Accessibility
<div role="img" aria-label="description of the overall image"> <img src="graphic1.png" alt=""> <img src="graphic2.png"> </div> description any
set of content that should be consumed as a single image (which could include images, video, audio, code snippets, emojis, or other content) can be identified using role="img".
... you shouldn't count on the alt text of individual elements images for conveying context to assistive technologies; most screenreaders will consider the element with role="img"
set on it to be to be like a black box, and not access the individual elements inside it.
... <p id="image-1">text that describes the group of images.</p> </div> svg and role="img" if you are using embedded svg images in your page, it is a good idea to
set role="img" on the outer <svg> element and give it a label.
ARIA: switch role - Accessibility
the switch role does not support the value mixed for the aria-checked attribute; assigning a value of mixed to a switch instead
sets the value to false.
...the switch is implemented as a <button> element which is initially checked courtesy of its aria-checked attribute being
set to "true".
... document.queryselectorall(".switch").foreach(function(theswitch) { theswitch.addeventlistener("click", handleclickevent, false); }); function handleclickevent(evt) { let el = evt.target; if (el.getattribute("aria-checked") == "true") { el.
setattribute("aria-checked", "false"); } else { el.
setattribute("aria-checked", "true"); } } css the purpose of the css is to establish a look and feel for the switch that's reminiscent of the power switch paradigm.
Accessibility and Spacial Patterns - Accessibility
the mechanism for this is poorly understood, but is believed to be linked to "gamma oscillations"
set up in the brain.
... adobe illustrator, for example, allows one to type
set ada braille for printing out.
... see also mdn accessibiltity: what users can do to browse more safely web accessibiltity for seizures and physical reactions web accessibility: understanding colors and luminance braille part 3: a step-by-step guide to type
setting ada braille correctly in adobe illustrator spatial math in brailleblaster (4 of 5) government literature nasa: designing with blue math spatial reasoning: why math talk is about more than numbers scientific literature colour constancy in context: roles for local adaptation and levels of reference gamma oscillations and photosensitive epilepsy characterizing the patterne...
An overview of accessible web applications and widgets - Accessibility
line 9
sets the aria-hidden state to true.
...javascript to update the aria-checked attribute var showtip = function(el) { el.
setattribute('aria-hidden', 'false'); } role changes aria allows developers to declare a semantic role for an element that otherwise offers incorrect or no semantics.
...a developer might be tempted to implement the "view" mode using a read-only text <input> element and
setting its aria role to button, then switching to "edit" mode by making the element writable and removing the role attribute in "edit" mode (since <input> elements have their own role semantics).
-webkit-print-color-adjust - CSS: Cascading Style Sheets
/* keyword values */ -webkit-print-color-adjust: economy; -webkit-print-color-adjust: exact; /* global values */ -webkit-print-color-adjust: inherit; -webkit-print-color-adjust: initial; -webkit-print-color-adjust: un
set; syntax the -webkit-print-color-adjust property is specified as one of the keyword values listed below.
... background colors and images are only printed if the user explicitly allows it in their browser's print
settings dialog.
... exact background colors and images of the element to which this rule is applied are always printed, user's print
settings are overridden.
::first-letter (:first-letter) - CSS: Cascading Style Sheets
allowable properties only a small sub
set of css properties can be used with the ::first-letter pseudo-element: all font properties : font, font-style, font-feature-
settings, font-kerning, font-language-override, font-stretch, font-synthesis, font-variant, font-variant-alternates, font-variant-caps, font-variant-east-asian, font-variant-ligatures, font-variant-numeric, font-variant-position, font-weight, font-size, font-size-adjust, l...
... html <h2>my heading</h2> <p>lorem ipsum dolor sit amet, con
setetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
... working draft generalizes allowed properties to type
setting, text decoration, inline layout properties, opacity, and box-shadow.
:host() - CSS: Cascading Style Sheets
nks in headers!" }' + ':host-context(article, aside) { color: gray; }' + ':host(.footer) { color : red; }' + ':host { background: rgba(0,0,0,0.1); padding: 2px 5px; }'; the :host(.footer) { color : red; } rule styles all instances of the <context-span> element (the shadow host in this instance) in the document that have the footer class
set on them — we've used it to give instances of the element inside the <footer> a special color.
... 54edge full support 79firefox full support 63 full support 63 no support 61 — 63disabled disabled from version 61 until version 63 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be
set to true).
...roid full support 54firefox android full support 63 full support 63 no support 61 — 63disabled disabled from version 61 until version 63 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be
set to true).
:where() - CSS: Cascading Style Sheets
internet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:where()chrome full support 72disabled full support 72disabled disabled from version 72: this feature is behind the #enable-experimental-web-platform-features preference (needs to be
set to enabled).
...port nofirefox full support 78 full support 78 full support 77notes disabled notes enabled by default in firefox nightly.disabled from version 77: this feature is behind the layout.css.is-where-selectors.enabled preference (needs to be
set to enabled).
... no support nowebview android no support nochrome android full support 72disabled full support 72disabled disabled from version 72: this feature is behind the #enable-experimental-web-platform-features preference (needs to be
set to enabled).
additive-symbols - CSS: Cascading Style Sheets
formal definition related at-rule@counter-styleinitial valuen/acomputed valueas specified formal syntax [ <integer> && <symbol> ]#where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...)<image-
set()> = image-
set( <image-
set-option># )<element()> = element( <id-selector> )<paint()> = paint( <ident>, <declaration-value>?
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-
set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
negative - CSS: Cascading Style Sheets
formal definition related at-rule@counter-styleinitial value"-" hyphen-minuscomputed valueas specified formal syntax <symbol> <symbol>?where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...)<image-
set()> = image-
set( <image-
set-option># )<element()> = element( <id-selector> )<paint()> = paint( <ident>, <declaration-value>?
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-
set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
pad - CSS: Cascading Style Sheets
formal definition related at-rule@counter-styleinitial value0 ""computed valueas specified formal syntax <integer> && <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...)<image-
set()> = image-
set( <image-
set-option># )<element()> = element( <id-selector> )<paint()> = paint( <ident>, <declaration-value>?
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-
set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
prefix - CSS: Cascading Style Sheets
formal definition related at-rule@counter-styleinitial value"" (the empty string)computed valueas specified formal syntax <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...)<image-
set()> = image-
set( <image-
set-option># )<element()> = element( <id-selector> )<paint()> = paint( <ident>, <declaration-value>?
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-
set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
@font-face - CSS: Cascading Style Sheets
font-feature-
settings allows control over advanced typographic features in opentype fonts.
... font-variation-
settings allows low-level control over opentype or truetype font variations, by specifying the four letter axis names of the features to vary, along with their variation values.
...ill not work: .classname { @font-face { font-family: myhelvetica; src: local("helvetica neue bold"), local("helveticaneue-bold"), url(mgopenmodernabold.ttf); font-weight: bold; } } formal syntax @font-face { [ font-family: <family-name>; ] | [ src: <src>; ] | [ unicode-range: <unicode-range>; ] | [ font-variant: <font-variant>; ] | [ font-feature-
settings: <font-feature-
settings>; ] | [ font-variation-
settings: <font-variation-
settings>; ] | [ font-stretch: <font-stretch>; ] | [ font-weight: <font-weight>; ] | [ font-style: <font-style>; ] }where <family-name> = <string> | <custom-ident>+ examples specifying a downloadable font this example simply specifies a downloadable font to use, applying it to the entire body of the document:...
max-zoom - CSS: Cascading Style Sheets
the max-zoom css descriptor
sets the maximum zoom factor of a document defined by the @viewport at-rule.
... syntax /* keyword value */ max-zoom: auto; /* <number> values */ max-zoom: 0.8; max-zoom: 2.0; /* <percentage> value */ max-zoom: 150%; values auto the user agent will
set the document's upper zoom factor limit.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples
setting max-zoom @viewport { max-zoom: 1.5; } specifications specification status comment css device adaptationthe definition of '"max-zoom" descriptor' in that specification.
min-zoom - CSS: Cascading Style Sheets
the min-zoom css descriptor
sets the minimum zoom factor of a document defined by the @viewport at-rule.
... syntax /* keyword value */ min-zoom: auto; /* <number> values */ min-zoom: 0.8; min-zoom: 2.0; /* <percentage> value */ min-zoom: 150%; values auto the user agent will
set the document's lower zoom factor limit.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples
setting min zoom factor @viewport { min-zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"min-zoom" descriptor' in that specification.
width - CSS: Cascading Style Sheets
the width css descriptor is shorthand for
setting both the min-width and the max-width descriptors of the viewport.
... if two viewport values are provided the first value will be
set to the min-width and the second value will be
set max-width.
... blockmax-width: refer to the width of the containing blockcomputed valueas each of the properties of the shorthand:min-width: the percentage as specified or the absolute lengthmax-width: the percentage as specified or the absolute length or none formal syntax <viewport-length>{1,2}where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples
setting minimum and maximum width @viewport { width: 500px; } specifications specification status comment css device adaptationthe definition of '"min-width" descriptor' in that specification.
zoom - CSS: Cascading Style Sheets
the zoom css descriptor
sets the initial zoom factor of a document defined by the @viewport at-rule.
... syntax /* keyword value */ zoom: auto; /* <number> values */ zoom: 0.8; zoom: 2.0; /* <percentage> values */ zoom: 150%; values auto the user agent will
set the document's initial zoom factor.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples
setting viewport zoom factor @viewport { zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"zoom" descriptor' in that specification.
Alternative style sheets - CSS: Cascading Style Sheets
for example: <link href="re
set.css" rel="stylesheet" type="text/css"> <link href="default.css" rel="stylesheet" type="text/css" title="default style"> <link href="fancy.css" rel="alternate stylesheet" type="text/css" title="fancy"> <link href="basic.css" rel="alternate stylesheet" type="text/css" title="basic"> in this example, the styles "default style", "fancy", and "basic" will be listed in the page style submenu, with "...
... no matter what style is selected, the rules from the re
set.css stylesheet will always be applied.
... working draft the css om specification defines the concepts of the style sheet
set name, its disabled flag, and the preferred css style sheet
set name.
Using URL values for the cursor property - CSS: Cascading Style Sheets
if none are specified, the coordinates of the hotspot are read from the file itself (for cur and xbm files) or are
set to the top left corner of the image.
... an example of the css3 syntax is: .foo { cursor: auto; cursor: url(cursor1.png) 4 12, auto; } .bar { cursor: pointer; cursor: url(cursor2.png) 2 2, pointer; } /* falls back onto 'auto' and 'pointer' in ie, but must be
set separately */ the first number is the x-coordinate, and the second number is the y-coordinate.
... the example will
set the hotspot to be the pixel at (4,12) from the top left (0,0).
Box alignment in grid layout - CSS: Cascading Style Sheets
the first item overrides the align-items value
set on the group by
setting align-self to center.
...the properties align-items and justify-items are applied to the grid container and
set the align-self and justify-self properties as a group.
... this means that you can
set alignment for all of your grid items at once, then override any items that need a different alignment by applying the align-self or justify-self property to the rules for the individual grid items.
Introduction to the CSS basic box model - CSS: Cascading Style Sheets
if the box-sizing property is
set to content-box (default) and if the element is a block element, the content area's size can be explicitly defined with the width, min-width, max-width, height, min-height, and max-height properties.
...if the box-sizing property is
set to border-box, the border area's size can be explicitly defined with the width, min-width, max-width, height, min-height, and max-height properties.
... when there is a background (background-color or background-image)
set on a box, it extends to the outer edge of the border (i.e.
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
an element
set to display: flex behaves in most ways like any other block level container that establishes a containing block.
...in grid layout you do the majority of sizing specification on the container,
setting up tracks and then placing items into them.
... in flexbox, while you create a flex container and
set the direction at that level, any control over item sizing needs to happen on the items themselves.
In Flow and Out of Flow - CSS: Cascading Style Sheets
in the next example i have three paragraph elements, the second element has position absolute, with off
set values of top: 30px and right: 30px.
... using position: fixed also removes the item from flow, however the off
sets are based on the viewport rather than the containing block.
... relative positioning and flow if you give an item relative positioning with position: relative it remains in flow, however you are then able to use the off
set values to push it around.
Introduction to formatting contexts - CSS: Cascading Style Sheets
le-cell, including anonymous table cells created when using the display: table-* properties table captions or elements with display: table-caption block elements where overflow has a value other than visible elements with display: flow-root or display: flow-root list-item elements with contain: layout, content, or strict flex items grid items multicol containers elements with column-span
set to all this is useful because a new bfc will behave much like the outermost document in that it becomes a mini-layout inside the main layout.
...a typical way to do this in the past has been to
set overflow: auto or
set other values than the initial value of overflow: visible.
...
setting overflow: auto created a new bfc containing the float.
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
in the first we
set the start row line, then the end line we explain that we want to span 3 lines.
... .box1 { grid-column-start: 1; grid-row-start: 1; grid-row-end: span 3; } in the second example, we specify the end row line we want the item to finish at and then
set the start line as span 3.
...this may result in the layout you want, but if something is appearing somewhere unexpected, check that you have
set a position for it.
Using CSS gradients - CSS: Cascading Style Sheets
<div class="multicolor-linear"></div> div { width: 120px; height: 120px; } .multicolor-linear { background: linear-gradient(to left, lime 28px, red 77%, cyan); } creating hard lines to create a hard line between two colors, creating a stripe instead of a gradual transition, adjacent color stops can be
set to the same location.
... example: closest-side for ellipses this example uses the closest-side size value, which means the size is
set by the distance from the starting point (the center) to the closest side of the enclosing box.
... <div class="radial-ellipse-side"></div> div { width: 240px; height: 100px; } .radial-ellipse-side { background: radial-gradient(ellipse closest-side, red, yellow 10%, #1e90ff 50%, beige); } example: farthest-corner for ellipses this example is similar to the previous one, except that its size is specified as farthest-corner, which
sets the size of the gradient by the distance from the starting point to the farthest corner of the enclosing box from the starting point.
Using CSS counters - CSS: Cascading Style Sheets
using counters manipulating a counter's value to use a css counter, it must first be initialized to a value with the counter-re
set property (0 by default).
... css body { counter-re
set: section; /*
set a counter named 'section', and its initial value is 0.
... example of a nested counter css ol { counter-re
set: section; /* creates a new instance of the section counter with each ol element */ list-style-type: none; } li::before { counter-increment: section; /* increments only this instance of the section counter */ content: counters(section,...
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
an example would be margin-block, which is a shorthand
setting for margin-block-start and margin-block-end.
... note: the css working group are currently trying to decide what to do about the four-value shorthands for logical properties, for example the equivalents to
setting four physical properties at once, like margins with the margin property.
...for example you could
set a width, test for inline-size and, if it is supported,
set the width to auto and the inline-size to the original width value.
CSS Motion Path - CSS: Cascading Style Sheets
with off
set-path you can define a specific path of any shape you want.
... you then animate it along that path by animating off
set-distance, and can choose to rotate it at any point using off
set-rotate.
... basic example <div id="motion-demo"></div> #motion-demo { off
set-path: path('m20,20 c20,100 200,0 200,100'); animation: move 3000ms infinite alternate ease-in-out; width: 40px; height: 40px; background: cyan; } @keyframes move { 0% { off
set-distance: 0%; } 100% { off
set-distance: 100%; } } reference properties off
set off
set-anchor off
set-distance off
set-path off
set-position off
set-rotate specifications specification status comment motion path module level 1 working draft initial definition.
Column layouts - CSS: Cascading Style Sheets
you have a
set of small items you want to break into columns.
... a single row of items with equal heights — flexbox flexbox can be used to break content into columns by
setting flex-direction to row, however flexbox targets the elements inside the flex container and will place each direct child into a new column.
... download this example flexbox can also be used to create layouts where the flex items wrap onto new rows, by
setting the flex-wrap property on the container to wrap.
Mozilla CSS extensions - CSS: Cascading Style Sheets
till accepted] -moz-column-width [prefixed version still accepted] -moz-column-rule [prefixed version still accepted] -moz-column-rule-width [prefixed version still accepted] -moz-column-rule-style [prefixed version still accepted] -moz-column-rule-color [prefixed version still accepted] -moz-context-properties f–m filter [applying to more than svg] -moz-font-feature-
settings [prefixed version still accepted] -moz-font-language-override [prefixed version still accepted] -moz-hyphens [prefixed version still accepted] -moz-margin-end [superseded by the standard version margin-inline-end] -moz-margin-start [superseded by the standard version margin-inline-start] mask [applying to more than svg] o -moz-opacityobsolete since gecko 1.9.1 -moz-o...
...utlineobsolete since gecko 1.9.2 -moz-outline-colorobsolete since gecko 1.9.2 -moz-outline-off
setobsolete since gecko 1.9.2 -moz-outline-styleobsolete since gecko 1.9.2 -moz-outline-widthobsolete since gecko 1.9.2 p -moz-padding-end [superseded by the standard version padding-inline-start] -moz-padding-start [superseded by the standard version padding-inline-end] -moz-perspective [prefixed version still accepted] -moz-perspective-origin [prefixed version still accepted] pointer-events [applying to more than svg] t–u -moz-tab-size -moz-text-align-lastobsolete since gecko 53 -moz-text-decoration-colorobsolete since gecko 39 -moz-text-decoration-lineobsolete since gecko 39 -moz-text-decoration-styleobsolete since gecko 39 -moz-text-size-adjust -moz-tra...
... border-style and outline-style -moz-bg-in
setobsolete since gecko 1.9 -moz-bg-out
setobsolete since gecko 1.9 -moz-bg-solidobsolete since gecko 1.9 <color> keywords -moz-activehyperlinktext -moz-hyperlinktext -moz-visitedhyperlinktext -moz-buttondefault -moz-buttonhoverface -moz-buttonhovertext -moz-default-background-color -moz-default-color -moz-cellhighlight -moz-cellhighlighttext -moz-field -moz-fieldtext -moz-dialog ...
WebKit CSS extensions - CSS: Cascading Style Sheets
gin-after-collapse -webkit-margin-after -webkit-margin-before-collapse -webkit-margin-before -webkit-margin-bottom-collapse -webkit-margin-collapse -webkit-margin-end** -webkit-margin-start** -webkit-margin-top-collapse -webkit-marquee-direction -webkit-marquee-increment -webkit-marquee-repetition -webkit-marquee-speed -webkit-marquee-style -webkit-marquee -webkit-mask-box-image-out
set -webkit-mask-box-image-repeat -webkit-mask-box-image-slice -webkit-mask-box-image-source -webkit-mask-box-image-width -webkit-mask-box-image -webkit-mask-repeat-x -webkit-mask-repeat-y -webkit-mask-source-type -webkit-max-logical-height -webkit-max-logical-width -webkit-min-logical-height -webkit-min-logical-width n -webkit-nbsp-mode p -webkit-padding-after** -webkit-paddin...
...kit-column-count -webkit-column-fill -webkit-column-gap -webkit-column-rule -webkit-column-rule-color -webkit-column-rule-style -webkit-column-rule-width -webkit-column-span -webkit-column-width -webkit-columns f -webkit-filter -webkit-flex -webkit-flex-basis -webkit-flex-direction -webkit-flex-flow -webkit-flex-grow -webkit-flex-shrink -webkit-flex-wrap -webkit-font-feature-
settings -webkit-font-kerning -webkit-font-variant-ligatures g-j -webkit-grid -webkit-grid-area -webkit-grid-auto-columns -webkit-grid-auto-flow -webkit-grid-auto-rows -webkit-grid-column -webkit-grid-column-end -webkit-grid-column-gap -webkit-grid-column-start -webkit-grid-gap -webkit-grid-row -webkit-grid-row-end -webkit-grid-row-gap -webkit-grid-row-start -webkit-grid-template...
... -webkit-alt* -webkit-color-correction -webkit-flow-from -webkit-flow-into -webkit-grid-columns (see grid-column) -webkit-grid-rows (see grid-row) -webkit-hyphenate-char
set -webkit-image-
set (see image-
set()) -webkit-mask-attachment -webkit-match-nearest-mail-blockquote-color -webkit-overflow-scrolling -webkit-region-break-after -webkit-region-break-before -webkit-region-break-inside -webkit-region-fragment -webkit-shape-inside -webkit-touch-callout (see touch-action) background-origin-x (unprefixed!) background-origin-y (unprefixed!) * still supporte...
animation-duration - CSS: Cascading Style Sheets
the animation-duration css property
sets the length of time that an animation takes to complete one cycle.
... it is often convenient to use the shorthand property animation to
set all animation properties at once.
...for more information, see
setting multiple animation property values.
animation-iteration-count - CSS: Cascading Style Sheets
the animation-iteration-count css property
sets the number of times an animation sequence should be played before stopping.
... it is often convenient to use the shorthand property animation to
set all animation properties at once.
...for more information, see
setting multiple animation property values.
animation-play-state - CSS: Cascading Style Sheets
the animation-play-state css property
sets whether an animation is running or paused.
... syntax /* single animation */ animation-play-state: running; animation-play-state: paused; /* multiple animations */ animation-play-state: paused, running, running; /* global values */ animation-play-state: inherit; animation-play-state: initial; animation-play-state: un
set; values running the animation is currently playing.
...for more information, see
setting multiple animation property values.
background-origin - CSS: Cascading Style Sheets
the background-origin css property
sets the background's origin: from the border start, inside the border, or inside the padding.
... syntax /* keyword values */ background-origin: border-box; background-origin: padding-box; background-origin: content-box; /* global values */ background-origin: inherit; background-origin: initial; background-origin: un
set; the background-origin property is specified as one of the keyword values listed below.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <box>#where <box> = border-box | padding-box | content-box examples
setting background origins .example { border: 10px double; padding: 10px; background: url('image.jpg'); background-position: center left; background-origin: content-box; } #example2 { border: 4px solid black; padding: 10px; background: url('image.gif'); background-repeat: no-repeat; background-origin: border-box; } div { background-image: url('logo.jpg'), url('mainback.png'...
background-repeat - CSS: Cascading Style Sheets
the background-repeat css property
sets how background images are repeated.
... repeat-y; background-repeat: repeat; background-repeat: space; background-repeat: round; background-repeat: no-repeat; /* two-value syntax: horizontal | vertical */ background-repeat: repeat space; background-repeat: repeat repeat; background-repeat: round space; background-repeat: no-repeat round; /* global values */ background-repeat: inherit; background-repeat: initial; background-repeat: un
set; values <repeat-style> the one-value syntax is a shorthand for the full two-value syntax: single value two-value equivalent repeat-x repeat no-repeat repeat-y no-repeat repeat repeat repeat repeat space space space round round round no-repeat no-repeat no-repeat in th...
...it also applies to ::first-letter and ::first-line.inheritednocomputed valuea list, each item consisting of two keywords, one per dimensionanimation typediscrete formal syntax <repeat-style>#where <repeat-style> = repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2} examples
setting background-repeat html <ol> <li>no-repeat <div class="one"></div> </li> <li>repeat <div class="two"></div> </li> <li>repeat-x <div class="three"></div> </li> <li>repeat-y <div class="four"></div> </li> <li>space <div class="five"></div> </li> <li>round <div class="six"></div> </li> <li>repeat-x, repeat-y (multiple images) <div class="sev...
background-size - CSS: Cascading Style Sheets
the background-size css property
sets the size of the element's background image.
... image, second value: height */ background-size: 50% auto; background-size: 3em 25%; background-size: auto 6px; background-size: auto auto; /* multiple backgrounds */ background-size: auto, auto; /* not to be confused with `auto auto` */ background-size: 50%, 25%, 25%; background-size: 6px, auto, contain; /* global values */ background-size: inherit; background-size: initial; background-size: un
set; the background-size property is specified in one of the following ways: using the keyword values contain or cover.
... using both a width and a height value, in which case the first
sets the width and the second
sets the height.
border-block - CSS: Cascading Style Sheets
the border-block css property is a shorthand property for
setting the individual logical block border property values in a single place in the style sheet.
... border-block: 1px; border-block: 2px dotted; border-block: medium dashed blue; border-block can be used to
set the values for one or more of border-block-width, border-block-style, and border-block-color
setting both the start and end in the block dimension at once.
... the borders in the other dimension can be
set with border-inline, which
sets border-inline-start, and border-inline-end.
border-bottom-color - CSS: Cascading Style Sheets
the border-bottom-color css property
sets the color of an element's bottom border.
... it can also be
set with the shorthand css properties border-color or border-bottom.
... syntax /* <color> values */ border-bottom-color: red; border-bottom-color: #ffbb00; border-bottom-color: rgb(255, 0, 0); border-bottom-color: hsla(100%, 50%, 25%, 0.75); border-bottom-color: currentcolor; border-bottom-color: transparent; /* global values */ border-bottom-color: inherit; border-bottom-color: initial; border-bottom-color: un
set; the border-bottom-color property is specified as a single value.
border-collapse - CSS: Cascading Style Sheets
the border-collapse css property
sets whether cells inside a <table> have shared or separate borders.
... when cells are collapsed, the border-style value of in
set behaves like groove, and out
set behaves like ridge.
... syntax /* keyword values */ border-collapse: collapse; border-collapse: separate; /* global values */ border-collapse: inherit; border-collapse: initial; border-collapse: un
set; the border-collapse property is specified as a single keyword, which may be chosen from the list below.
border-left-color - CSS: Cascading Style Sheets
the border-left-color css property
sets the color of an element's left border.
... it can also be
set with the shorthand css properties border-color or border-left.
... syntax /* <color> values */ border-left-color: red; border-left-color: #ffbb00; border-left-color: rgb(255, 0, 0); border-left-color: hsla(100%, 50%, 25%, 0.75); border-left-color: currentcolor; border-left-color: transparent; /* global values */ border-left-color: inherit; border-left-color: initial; border-left-color: un
set; the border-left-color property is specified as a single value.
border-right-color - CSS: Cascading Style Sheets
the border-right-color css property
sets the color of an element's right border.
... it can also be
set with the shorthand css properties border-color or border-right.
... syntax /* <color> values */ border-right-color: red; border-right-color: #ffbb00; border-right-color: rgb(255, 0, 0); border-right-color: hsla(100%, 50%, 25%, 0.75); border-right-color: currentcolor; border-right-color: transparent; /* global values */ border-right-color: inherit; border-right-color: initial; border-right-color: un
set; the border-right-color property is specified as a single value.
border-spacing - CSS: Cascading Style Sheets
the border-spacing css property
sets the distance between the borders of adjacent <table> cells.
... note: the border-spacing property is equivalent to the deprecated cellspacing <table> attribute, except that it has an optional second value that can be used to
set different horizontal and vertical spacing.
... syntax /* <length> */ border-spacing: 2px; /* horizontal <length> | vertical <length> */ border-spacing: 1cm 2em; /* global values */ border-spacing: inherit; border-spacing: initial; border-spacing: un
set; the border-spacing property may be specified as either one or two values.
border-top-color - CSS: Cascading Style Sheets
the border-top-color css property
sets the color of an element's top border.
... it can also be
set with the shorthand css properties border-color or border-top.
... syntax /* <color> values */ border-top-color: red; border-top-color: #ffbb00; border-top-color: rgb(255, 0, 0); border-top-color: hsla(100%, 50%, 25%, 0.75); border-top-color: currentcolor; border-top-color: transparent; /* global values */ border-top-color: inherit; border-top-color: initial; border-top-color: un
set; the border-top-color property is specified as a single value.
box-align - CSS: Cascading Style Sheets
/* keyword values */ box-align: start; box-align: center; box-align: end; box-align: baseline; box-align: stretch; /* global values */ box-lines: inherit; box-lines: initial; box-lines: un
set; the direction of layout depends on the element's orientation: horizontal or vertical.
... if the alignment is
set using the element's align attribute, then the style is ignored.
... formal definition initial valuestretchapplies toelements with a css display value of box or inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax start | center | end | baseline | stretch examples
setting box alignment <!doctype html> <html> <head> <title>css box-align example</title> <style> div.example { display: box; /* as specified */ display: -moz-box; /* mozilla */ display: -webkit-box; /* webkit */ /* make this box taller than the children, so there is room for the box-pack */ height: 400px; /* make this box wider than the children so there is room for the box-align */ width: 300px; /* children should be oriented vertically */ box-orient: vertical; /* as specified *...
box-orient - CSS: Cascading Style Sheets
the box-orient css property
sets whether an element lays out its contents horizontally or vertically.
... /* keyword values */ box-orient: horizontal; box-orient: vertical; box-orient: inline-axis; box-orient: block-axis; /* global values */ box-orient: inherit; box-orient: initial; box-orient: un
set; syntax the box-orient property is specified as one of the keyword values listed below.
... formal definition initial valueinline-axis (horizontal in xul)applies toelements with a css display value of box or inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax horizontal | vertical | inline-axis | block-axis | inherit examples
setting horizontal box orientation here, he box-orient property will cause the two <p> sections in the example to display in the same line.
break-after - CSS: Cascading Style Sheets
the break-after css property
sets how page, column, or region breaks should behave after a generated box.
...ys; break-after: all; /* page break values */ break-after: avoid-page; break-after: page; break-after: left; break-after: right; break-after: recto; break-after: verso; /* column break values */ break-after: avoid-column; break-after: column; /* region break values */ break-after: avoid-region; break-after: region; /* global values */ break-after: inherit; break-after: initial; break-after: un
set; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element.
...a sub
set of values should be aliased as follows: page-break-after break-after auto auto left left right right avoid avoid always page the always value of page-break-* was implemented by browsers as a page break, and not as a column break.
break-before - CSS: Cascading Style Sheets
the break-before css property
sets how page, column, or region breaks should behave before a generated box.
...re: all; /* page break values */ break-before: avoid-page; break-before: page; break-before: left; break-before: right; break-before: recto; break-before: verso; /* column break values */ break-before: avoid-column; break-before: column; /* region break values */ break-before: avoid-region; break-before: region; /* global values */ break-before: inherit; break-before: initial; break-before: un
set; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element.
...a sub
set of values should be aliased as follows: page-break-before break-before auto auto left left right right avoid avoid always page the always value of page-break-* was implemented by browsers as a page break, and not as a column break.
color - CSS: Cascading Style Sheets
the color css property
sets the foreground color value of an element's text and text decorations, and
sets the currentcolor value.
...); color: rgb(34 12 64 / 0.6); color: rgba(34 12 64 / 0.3); color: rgb(34.0 12 64 / 60%); color: rgba(34.6 12 64 / 30%); /* <hsl()> values */ color: hsl(30, 100%, 50%, 0.6); color: hsla(30, 100%, 50%, 0.6); color: hsl(30 100% 50% / 0.6); color: hsla(30 100% 50% / 0.6); color: hsl(30.0 100% 50% / 60%); color: hsla(30.2 100% 50% / 60%); /* global values */ color: inherit; color: initial; color: un
set; the color property is specified as a single <color> value.
... values <color>
sets the color of the textual and decorative parts of the element.
<color> - CSS: Cascading Style Sheets
note: the list of accepted keywords has undergone many changes during the evolution of css: css level 1 only included 16 basic colors, called the vga colors as they were taken from the
set of displayable colors on vga graphics cards.
...hsl can also make it easier to create a
set of matching colors (such as when you want multiple shades of a single hue).
... -moz-win-accentcolor used to access the windows 10 custom accent color that you can
set on the start menu, taskbar, title bars, etc.
column-rule-color - CSS: Cascading Style Sheets
the column-rule-color css property
sets the color of the line drawn between columns in a multi-column layout.
... syntax /* <color> values */ column-rule-color: red; column-rule-color: rgb(192, 56, 78); column-rule-color: transparent; column-rule-color: hsla(0, 100%, 50%, 0.6); /* global values */ column-rule-color: inherit; column-rule-color: initial; column-rule-color: un
set; the column-rule-color property is specified as a single <color> value.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples
setting a blue column rule html <p>this is a bunch of text split into three columns.
column-rule-style - CSS: Cascading Style Sheets
the column-rule-style css property
sets the style of the line drawn between columns in a multi-column layout.
... syntax /* <'border-style'> values */ column-rule-style: none; column-rule-style: hidden; column-rule-style: dotted; column-rule-style: dashed; column-rule-style: solid; column-rule-style: double; column-rule-style: groove; column-rule-style: ridge; column-rule-style: in
set; column-rule-style: out
set; /* global values */ column-rule-style: inherit; column-rule-style: initial; column-rule-style: un
set; the column-rule-style property is specified as a single <'border-style'> value.
... formal definition initial valuenoneapplies tomulticol elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-style'> examples
setting a dashed column rule html <p>this is a bunch of text split into three columns.
column-rule-width - CSS: Cascading Style Sheets
the column-rule-width css property
sets the width of the line drawn between columns in a multi-column layout.
... syntax /* keyword values */ column-rule-width: thin; column-rule-width: medium; column-rule-width: thick; /* <length> values */ column-rule-width: 1px; column-rule-width: 2.5em; /* global values */ column-rule-width: inherit; column-rule-width: initial; column-rule-width: un
set; the column-rule-width property is specified as a single <'border-width'> value.
... formal definition initial valuemediumapplies tomulticol elementsinheritednocomputed valuethe absolute length; 0 if the column-rule-style is none or hiddenanimation typea length formal syntax <'border-width'> examples
setting a thick column rule html <p>this is a bunch of text split into three columns.
column-width - CSS: Cascading Style Sheets
the column-width css property
sets the ideal column width in a multi-column layout.
... syntax /* keyword value */ column-width: auto; /* <length> values */ column-width: 60px; column-width: 15.5em; column-width: 3.3vw; /* global values */ column-width: inherit; column-width: initial; column-width: un
set; the column-width property is specified as one of the values listed below.
... formal definition initial valueautoapplies toblock containers except table wrapper boxesinheritednocomputed valuethe absolute length, zero or largeranimation typea length formal syntax <length> | auto examples
setting column width in pixels html <p class="content-box"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
columns - CSS: Cascading Style Sheets
the columns css shorthand property
sets the number of columns to use when drawing an element's contents, as well as those columns' widths.
... constituent properties this property is a shorthand for the following css properties: column-count column-width syntax /* column width */ columns: 18em; /* column count */ columns: auto; columns: 2; /* both column width and count */ columns: 2 auto; columns: auto 12em; columns: auto auto; /* global values */ columns: inherit; columns: initial; columns: un
set; the columns property may be specified as one or two of the values listed below, in any order.
...:column-width: autocolumn-count: autoapplies toblock containers except table wrapper boxesinheritednocomputed valueas each of the properties of the shorthand:column-width: the absolute length, zero or largercolumn-count: as specifiedanimation typeas each of the properties of the shorthand:column-width: a lengthcolumn-count: an integer formal syntax <'column-width'> | <'column-count'> examples
setting three equal columns html <p class="content-box"> this is a bunch of text split into three columns using the css `columns` property.
counter() - CSS: Cascading Style Sheets
syntax values <custom-ident> a name identifying the counter, which is the same case-sensitive name used for the counter-re
set and counter-increment.
... the name cannot start with two dashes and can't be none, un
set, initial, or inherit.
...)where <counter-style> = <counter-style-name> | symbols()where <counter-style-name> = <custom-ident> examples default value compared to upper roman html <ol> <li></li> <li></li> <li></li> </ol> css ol { counter-re
set: listcounter; } li { counter-increment: listcounter; } li::after { content: "[" counter(listcounter) "] == [" counter(listcounter, upper-roman) "]"; } result decimal-leading-zero compared to lower-alpha html <ol> <li></li> <li></li> <li></li> </ol> css ol { counter-re
set: count; } li { counter-increment: count; } li::after { content: "[" counter(count, decim...
cross-fade() - CSS: Cascading Style Sheets
&& <image><cf-final-image> = <image> | <color>where <image> = <url> | <image()> | <image-
set()> | <element()> | <paint()> | <cross-fade()> | <gradient><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <image()> = image( <image-tags>?
...)<image-
set()> = image-
set( <image-
set-option># )<element()> = element( <id-selector> )<paint()> = paint( <ident>, <declaration-value>?
...)where <image-tags> = ltr | rtl<image-src> = <url> | <string><image-
set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><linear-gradient()> = linear-gradient( [ <angle> | to <side-or-corner> ]?
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
in order to better describe this behavior, the display property has been refactored to allow for two values — an outer and inner value — to be
set on it, as well as the single values we are used to.
... this means that instead of
setting display: flex to create a block-level box with flex children, we will use display: block flex.
... if only an inner value of flex, grid, or flow-root is specified then the specification explains that the outer value should be
set to block: "if a <display-inside> value is specified but <display-outside> is omitted, the element’s outer display type defaults to block—except for ruby, which defaults to inline." finally, we have some legacy pre-composed inline-level values of: inline-block inline-table inline-flex inline-grid if a supporting browser comes across these as single values then it treats them the sa...
<easing-function> - CSS: Cascading Style Sheets
the easing functions in the cubic-bezier sub
set of easing functions are often called "smooth" easing functions, because they can be used to smooth down the start and end of the animation.
... easing functions css supports three kinds of easing functions: linear, the sub
set of the cubic bézier curves that are functions, and staircase functions.
...nst startbtn = document.queryselector('button'); const divelem = document.queryselector('div > div'); startbtn.addeventlistener('click', () => { if(startbtn.textcontent === 'start animation') { divelem.style.animationname = 'move-right'; startbtn.textcontent = 'stop animation'; divelem.style.animationtimingfunction = selectelem.value; } else { divelem.style.animationname = 'un
set'; startbtn.textcontent = 'start animation'; } }); selectelem.addeventlistener('change', () => { divelem.style.animationtimingfunction = selectelem.value; }); result cubic-bezier() function examples these cubic bézier curves are valid for use in css: /* the canonical bézier curve with four <number> in the [0,1] range.
<filter-function> - CSS: Cascading Style Sheets
tput { width: 5%; text-align: center; } select { width: 40%; margin-left: 2px; } javascript const selectelem = document.queryselector('select'); const divelem = document.queryselector('div'); const slider = document.queryselector('input'); const output = document.queryselector('output'); const curvalue = document.queryselector('p code'); selectelem.addeventlistener('change', () => {
setslider(selectelem.value);
setdiv(selectelem.value); }); slider.addeventlistener('input', () => {
setdiv(selectelem.value); }); function
setslider(filter) { if(filter === 'blur') { slider.value = 0; slider.min = 0; slider.max = 30; slider.step = 1; slider.
setattribute('data-unit', 'px'); } else if(filter === 'brightness' || filter === 'contrast' || filter === 'saturate...
...') { slider.value = 1; slider.min = 0; slider.max = 4; slider.step = 0.05; slider.
setattribute('data-unit', ''); } else if(filter === 'drop-shadow') { slider.value = 0; slider.min = -20; slider.max = 40; slider.step = 1; slider.
setattribute('data-unit', 'px'); } else if(filter === 'opacity') { slider.value = 1; slider.min = 0; slider.max = 1; slider.step = 0.01; slider.
setattribute('data-unit', ''); } else if(filter === 'grayscale' || filter === 'invert' || filter === 'sepia') { slider.value = 0; slider.min = 0; slider.max = 1; slider.step = 0.01; slider.
setattribute('data-unit', ''); } else if(filter === 'hue-rotate') { slider.value = 0; slider.min = 0; slider.max = 360; slider.step = 1; ...
... slider.
setattribute('data-unit', 'deg'); } } function
setdiv(filter) { if(filter === 'drop-shadow') { divelem.style.filter = `${selectelem.value}(${math.round(slider.value)}${slider.getattribute('data-unit')} ${math.round(slider.value)}${slider.getattribute('data-unit')} ${math.round(math.abs(slider.value/2))}${slider.getattribute('data-unit')})`; } else { divelem.style.filter = `${selectelem.value}(${slider.value}${slider.getattribute('data-unit')}`; } updateoutput(); updatecurvalue(); } function updateoutput() { output.textcontent = slider.value; } function updatecurvalue() { curvalue.textcontent = `filter: ${divelem.style.filter}`; }
setslider(selectelem.value);
setdiv(selectelem.value); result specifications specification status ...
font-language-override - CSS: Cascading Style Sheets
/* keyword value */ font-language-override: normal; /* <string> values */ font-language-override: "eng"; /* use english glyphs */ font-language-override: "trk"; /* use turkish glyphs */ /* global values */ font-language-override: initial; font-language-override: inherit; font-language-override: un
set; by default, html's lang attribute tells browsers to display glyphs designed specifically for that language.
... for example, a lot of fonts have a special character for the digraph fi that merge the dot on the "i" with the "f." however, if the language is
set to turkish the typeface will likely know not to use the merged glyph; turkish has two versions of the "i," one with a dot (i) and one without (ı), and using the ligature would incorrectly transform a dotted "i" into a dotless "i." the font-language-override property lets you override the typeface behavior for a specific language.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | <string> examples using danish glyphs html <p class="para1">default language
setting.</p> <p class="para2">this is a string with the <code>font-language-override</code>
set to danish.</p> css p.para1 { font-language-override: normal; } p.para2 { font-language-override: "dan"; } result specifications specification status comment css fonts module level 4the definition of 'font-language-override' in that specification.
font-optical-sizing - CSS: Cascading Style Sheets
the font-optical-sizing css property
sets whether text rendering is optimized for viewing at different sizes.
... syntax /* keyword values */ font-optical-sizing: none; font-optical-sizing: auto; /* default */ /* global values */ font-optical-sizing: inherit; font-optical-sizing: initial; font-optical-sizing: un
set; values none the browser will not modify the shape of glyphs for optimal viewing.
...the optical size variation axis is represented by opsz in font-variation-
settings.
gap (grid-gap) - CSS: Cascading Style Sheets
the gap css property
sets the gaps (gutters) between rows and columns.
... */ gap: 20px; gap: 1em; gap: 3vmin; gap: 0.5cm; /* one <percentage> value */ gap: 16%; gap: 100%; /* two <length> values */ gap: 20px 10px; gap: 1em 0.5em; gap: 3vmin 2vmax; gap: 0.5cm 2mm; /* one or two <percentage> values */ gap: 16% 100%; gap: 21px 82%; /* calc() values */ gap: calc(10% + 20px); gap: calc(20px + 10%) calc(10% - 5px); /* global values */ gap: inherit; gap: initial; gap: un
set; this property is specified as a value for <'row-gap'> followed optionally by a value for <'column-gap'>.
... if <'column-gap'> is omitted, it’s
set to the same value as <'row-gap'>.
grid-auto-columns - CSS: Cascading Style Sheets
-columns: min-content max-content auto; grid-auto-columns: 100px 150px 390px; grid-auto-columns: 10% 33.3%; grid-auto-columns: 0.5fr 3fr 1fr; grid-auto-columns: minmax(100px, auto) minmax(max-content, 2fr) minmax(20%, 80vmax); grid-auto-columns: 100px minmax(100px, auto) 10% 0.5fr fit-content(400px); /* global values */ grid-auto-columns: inherit; grid-auto-columns: initial; grid-auto-columns: un
set; values <length> is a non-negative length.
...as a maximum, a <flex> value
sets the track’s flex factor.
...iscrete formal syntax <track-size>+where <track-size> = <track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )where <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-breadth> = <length> | <percentage> | min-content | max-content | autowhere <length-percentage> = <length> | <percentage> examples
setting grid column size html <div id="grid"> <div id="item1"></div> <div id="item2"></div> <div id="item3"></div> </div> css #grid { height: 100px; display: grid; grid-template-areas: "a a"; grid-gap: 10px; grid-auto-columns: 200px; } #grid > div { background-color: lime; } result specifications specification status comment css grid layoutthe ...
grid-auto-rows - CSS: Cascading Style Sheets
ck-size values */ grid-auto-rows: min-content max-content auto; grid-auto-rows: 100px 150px 390px; grid-auto-rows: 10% 33.3%; grid-auto-rows: 0.5fr 3fr 1fr; grid-auto-rows: minmax(100px, auto) minmax(max-content, 2fr) minmax(20%, 80vmax); grid-auto-rows: 100px minmax(100px, auto) 10% 0.5fr fit-content(400px); /* global values */ grid-auto-rows: inherit; grid-auto-rows: initial; grid-auto-rows: un
set; values <length> is a non-negative length.
...as a maximum, a <flex> value
sets the track’s flex factor.
...discrete formal syntax <track-size>+where <track-size> = <track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )where <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-breadth> = <length> | <percentage> | min-content | max-content | autowhere <length-percentage> = <length> | <percentage> examples
setting grid row size html <div id="grid"> <div id="item1"></div> <div id="item2"></div> <div id="item3"></div> </div> css #grid { width: 200px; display: grid; grid-template-areas: "a a"; grid-gap: 10px; grid-auto-rows: 100px; } #grid > div { background-color: lime; } result specifications specification status comment css grid layoutthe definit...
grid-row - CSS: Cascading Style Sheets
if two <grid-line> values are specified, the grid-row-start longhand is
set to the value before the slash, and the grid-row-end longhand is
set to the value after the slash.
...er> + <custom-ident> values */ grid-row: somegridarea 4; grid-row: 4 somegridarea / 6; /* span + <integer> + <custom-ident> values */ grid-row: span 3; grid-row: span somegridarea; grid-row: 5 somegridarea span; grid-row: span 3 / 6; grid-row: span somegridarea / span someothergridarea; grid-row: 5 somegridarea span / 2 span; /* global values */ grid-row: inherit; grid-row: initial; grid-row: un
set; values auto is a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of 1.
...] | [ span && [ <integer> | <custom-ident> ] ] examples
setting grid row size and location html <div id="grid"> <div id="item1"></div> <div id="item2"></div> <div id="item3"></div> </div> css #grid { display: grid; height: 200px; grid-template-columns: 200px; grid-template-rows: repeat(6, 1fr); } #item1 { background-color: lime; } #item2 { background-color: yellow; grid-row: 2 / 4; } #item3 { background-color: blue; grid-row...
initial-letter - CSS: Cascading Style Sheets
the initial-letter css property
sets styling for dropped, raised, and sunken initial letters.
... /* keyword values */ initial-letter: normal; /* numeric values */ initial-letter: 1.5; /* initial letter occupies 1.5 lines */ initial-letter: 3.0; /* initial letter occupies 3 lines */ initial-letter: 3.0 2; /* initial letter occupies 3 lines and sinks 2 lines */ /* global values */ initial-letter: inherit; initial-letter: initial; initial-letter: un
set; syntax the keyword value normal, or a <number> optionally followed by an <integer>.
...] examples
setting initial letter size html <p class="normal">initial letter is normal</p> <p class="onefive">initial letter occupies 1.5 lines</p> <p class="three">initial letter occupies 3 lines</p> css .normal { -webkit-initial-letter: normal; initial-letter: normal; } .onefive { -webkit-initial-letter: 1.5; initial-letter: 1.5; } .three { -webkit-initial-letter: 3.0; initial-letter: 3.0; }...
justify-items - CSS: Cascading Style Sheets
for absolutely-positioned elements, it aligns the items inside their containing block on the inline axis, accounting for the off
set values of top, left, bottom, and right.
... justify-items: baseline; justify-items: first baseline; justify-items: last baseline; /* overflow alignment (for positional alignment only) */ justify-items: safe center; justify-items: unsafe center; /* legacy alignment */ justify-items: legacy right; justify-items: legacy left; justify-items: legacy center; /* global values */ justify-items: inherit; justify-items: initial; justify-items: un
set; this property can take one of four different forms: basic keywords: one of the keyword values normal, auto, or stretch.
... baseline first baseline last baseline specifies participation in first- or last-baseline alignment: aligns the alignment baseline of the box’s first or last baseline
set with the corresponding baseline in the shared first or last baseline
set of all the boxes in its baseline-sharing group.
letter-spacing - CSS: Cascading Style Sheets
the letter-spacing css property
sets the horizontal spacing behavior between text characters.
... syntax /* keyword value */ letter-spacing: normal; /* <length> values */ letter-spacing: 0.3em; letter-spacing: 3px; letter-spacing: .3px; /* global values */ letter-spacing: inherit; letter-spacing: initial; letter-spacing: un
set; values normal the normal letter spacing for the current font.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valuean optimum value consisting of either an absolute length or the keyword normalanimation typea length formal syntax normal | <length> examples
setting letter spacing html <p class="normal">letter spacing</p> <p class="em-wide">letter spacing</p> <p class="em-wider">letter spacing</p> <p class="em-tight">letter spacing</p> <p class="px-wide">letter spacing</p> css .normal { letter-spacing: normal; } .em-wide { letter-spacing: 0.4em; } .em-wider { letter-spacing: 1em; } .em-tight { letter-spacing: -0.05em; } .px-wide { letter-spacing...
line-break - CSS: Cascading Style Sheets
the line-break css property
sets how to break lines of chinese, japanese, or korean (cjk) text when working with punctuation and symbols.
... /* keyword values */ line-break: auto; line-break: loose; line-break: normal; line-break: strict; line-break: anywhere; /* global values */ line-break: inherit; line-break: initial; line-break: un
set; syntax values auto break text using the default line break rule.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | loose | normal | strict | anywhere examples
setting text wrapping see whether the text is wrapped before "々", "ぁ" and "。".
line-height-step - CSS: Cascading Style Sheets
the line-height-step css property
sets the step unit for line box heights.
... when the property is
set, line box heights are rounded up to the closest multiple of the unit.
... formal definition initial value0applies toblock containersinheritedyescomputed valueabsolute <length>animation typediscrete formal syntax <length> examples
setting step unit for line box height in the following example, the height of line box in each paragraph is rounded up to the step unit.
margin-bottom - CSS: Cascading Style Sheets
the margin-bottom css property
sets the margin area on the bottom of an element.
... syntax /* <length> values */ margin-bottom: 10px; /* an absolute length */ margin-bottom: 1em; /* relative to the text size */ margin-bottom: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-bottom: auto; /* global values */ margin-bottom: inherit; margin-bottom: initial; margin-bottom: un
set; the margin-bottom property is specified as the keyword auto, or a <length>, or a <percentage>.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples
setting positive and negative bottom margins html <div class="container"> <div class="box0">box 0</div> <div class="box1">box 1</div> <div class="box2">box one's negative margin pulls me up</div> </div> css css for divs to
set margin-bottom and height .box0 { margin-bottom:1em; height:3em; } .box1 { margin-bottom:-1.5em; height:4em; } .box2 { border:1px dashed black; bord...
margin-top - CSS: Cascading Style Sheets
the margin-top css property
sets the margin area on the top of an element.
... syntax /* <length> values */ margin-top: 10px; /* an absolute length */ margin-top: 1em; /* relative to the text size */ margin-top: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-top: auto; /* global values */ margin-top: inherit; margin-top: initial; margin-top: un
set; the margin-top property is specified as the keyword auto, or a <length>, or a <percentage>.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples
setting positive and negative top margins .content { margin-top: 5%; } .sidebox { margin-top: 10px; } .logo { margin-top: -5px; } #footer { margin-top: 1em; } specifications specification status comment css basic box modelthe definition of 'margin-top' in that specification.
mask-repeat - CSS: Cascading Style Sheets
the mask-repeat css property
sets how mask images are repeated.
...epeat: space; mask-repeat: round; mask-repeat: no-repeat; /* two-value syntax: horizontal | vertical */ mask-repeat: repeat space; mask-repeat: repeat repeat; mask-repeat: round space; mask-repeat: no-repeat round; /* multiple values */ mask-repeat: space round, no-repeat; mask-repeat: round repeat, space, repeat-x; /* global values */ mask-repeat: inherit; mask-repeat: initial; mask-repeat: un
set; by default, the repeated images are clipped to the size of the element, but they can be scaled to fit (using round) or evenly distributed from end to end (using space).
... formal definition initial valueno-repeatapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueconsists of two keywords, one per dimensionanimation typediscrete formal syntax <repeat-style>#where <repeat-style> = repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2} examples
setting repeat for a single mask css #masked { width: 250px; height: 250px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-repeat: repeat; /* can be changed in the live sample */ margin-bottom: 10px; } html content <div id="masked"> </div> <select id="repetition"> <option value="repeat-x">repeat-x</option> <o...
min() - CSS: Cascading Style Sheets
the min() css function lets you
set the smallest (most negative) value from a list of comma-separated expressions as the value of a css property value.
... formal syntax min( <calc-sum># )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) accessibility concerns when using min() to
set a maximum font size, ensure that the font can still be scaled at least 200% for readability (without assistive technology like a zoom function).
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 examples
setting a maximum size for a label and input another use case for css functions is to
set a maximum size on responsive form controls: enabling the width of labels and inputs to shrink as the width of the form shrinks.
opacity - CSS: Cascading Style Sheets
the opacity css property
sets the opacity of an element.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial value1.0applies toall elementsinheritednocomputed valuethe specified value, clipped in the range [0,1]animation typea number formal syntax <alpha-value>where <alpha-value> = <number> | <percentage> examples
setting background opacity html <div class="light">you can barely see this.</div> <div class="medium">this is easier to see.</div> <div class="heavy">this is very easy to see.</div> css div { background-color: yellow; } .light { opacity: 0.2; /* barely see the text over the background */ } .medium { opacity: 0.5; /* see the text more clearly over the background */ } .heavy { opacity: 0.9; /...
...* see the text very clearly over the background */ } result
setting opacity on hover html <img src="//developer.mozilla.org/static/img/opengraph-logo.png" alt="mdn logo" width="128" height="146" class="opacity"> css img.opacity { opacity: 1; filter: alpha(opacity=100); /* ie8 and lower */ zoom: 1; /* triggers "haslayout" in ie 7 and lower */ } img.opacity:hover { opacity: 0.5; filter: alpha(opacity=50); zoom: 1; } result specifications specification status comment css color module level 4the definition of 'opacity' in that specification.
orphans - CSS: Cascading Style Sheets
the orphans css property
sets the minimum number of lines in a block container that must be shown at the bottom of a page, region, or column.
... /* <integer> values */ orphans: 2; orphans: 3; /* global values */ orphans: inherit; orphans: initial; orphans: un
set; in typography, an orphan is the first line of a paragraph that appears alone at the bottom of a page.
... formal definition initial value2applies toblock container elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax <integer> examples
setting a minimum orphan size of three lines html <div> <p>this is the first paragraph containing some text.</p> <p>this is the second paragraph containing some more text than the first one.
overflow-inline - CSS: Cascading Style Sheets
the overflow-inline css property
sets what shows when content overflows the inline start and end edges of a box.
... syntax /* keyword values */ overflow-inline: visible; overflow-inline: hidden; overflow-inline: scroll; overflow-inline: auto; /* global values */ overflow-inline: inherit; overflow-inline: initial; overflow-inline: un
set; the overflow-inline property is specified as a single keyword chosen from the list of values below.
... formal definition initial valueautoapplies toblock-containers, flex containers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll | auto examples
setting inline overflow behavior html <ul> <li><code>overflow-inline:hidden</code> — hides the text outside the box <div id="div1"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> <li><code>overflow-inline:scroll</code> — always adds a scrollbar <div id="div2"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> <li><code>overf...
overflow-y - CSS: Cascading Style Sheets
the overflow-y css property
sets what shows when content overflows a block-level element's top and bottom edges.
... syntax /* keyword values */ overflow-y: visible; overflow-y: hidden; overflow-y: clip; overflow-y: scroll; overflow-y: auto; /* global values */ overflow-y: inherit; overflow-y: initial; overflow-y: un
set; the overflow-y property is specified as a single keyword chosen from the list of values below.
... formal definition initial valuevisibleapplies toblock-containers, flex containers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll | auto examples
setting overflow-y behavior html <ul> <li><code>overflow-y:hidden</code> — hides the text outside the box <div id="div1"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
overscroll-behavior-y - CSS: Cascading Style Sheets
the overscroll-behavior-y css property
sets the browser's behavior when the vertical boundary of a scrolling area is reached.
... /* keyword values */ overscroll-behavior-y: auto; /* default */ overscroll-behavior-y: contain; overscroll-behavior-y: none; /* global values */ overscroll-behavior-y: inherit; overscroll-behavior-y: initial; overscroll-behavior-y: un
set; initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax the overscroll-behavior-y property is specified as a keyword chosen from the list of values below.
... contain default scroll overflow behavior is observed inside the element this value is
set on (e.g.
padding - CSS: Cascading Style Sheets
the padding css shorthand property
sets the padding area on all four sides of an element at once.
...property is a shorthand for the following css properties: padding-bottom padding-left padding-right padding-top syntax /* apply to all four sides */ padding: 1em; /* vertical | horizontal */ padding: 5% 10%; /* top | horizontal | bottom */ padding: 1em 2em 2em; /* top | right | bottom | left */ padding: 5px 1em 0 2em; /* global values */ padding: inherit; padding: initial; padding: un
set; the padding property may be specified using one, two, three, or four values.
...ckcomputed valueas each of the properties of the shorthand:padding-bottom: the percentage as specified or the absolute lengthpadding-left: the percentage as specified or the absolute lengthpadding-right: the percentage as specified or the absolute lengthpadding-top: the percentage as specified or the absolute lengthanimation typea length formal syntax [ <length> | <percentage> ]{1,4} examples
setting padding with pixels html <h4>this element has moderate padding.</h4> <h3>the padding is huge in this element!</h3> css h4 { background-color: lime; padding: 20px 50px; } h3 { background-color: cyan; padding: 110px 50px 50px 110px; } result
setting padding with pixels and percentages padding: 5%; /* all sides: 5% padding */ padding: 10px; /* all...
page-break-after - CSS: Cascading Style Sheets
/* keyword values */ page-break-after: auto; page-break-after: always; page-break-after: avoid; page-break-after: left; page-break-after: right; page-break-after: recto; page-break-after: verso; /* global values */ page-break-after: inherit; page-break-after: initial; page-break-after: un
set; this property applies to block elements that generate a box.
...a sub
set of values should be aliased as follows: page-break-after break-after auto auto left left right right avoid avoid always page formal definition initial valueautoapplies toblock-level elements in the normal flow of the root element.
... user agents may also apply it to other elements like table-row elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | always | avoid | left | right | recto | verso examples
setting a page break after footnotes /* move to a new page after footnotes */ div.footnotes { page-break-after: always; } specifications specification status comment css logical properties and values level 1the definition of 'recto and verso' in that specification.
place-items - CSS: Cascading Style Sheets
if the second value is not
set, the first value is also used for it.
...ce-items: self-start auto; place-items: self-end normal; place-items: flex-start auto; place-items: flex-end normal; place-items: left auto; place-items: right normal; /* baseline alignment */ place-items: baseline normal; place-items: first baseline auto; place-items: last baseline normal; place-items: stretch auto; /* global values */ place-items: inherit; place-items: initial; place-items: un
set; values auto the value used is the value of the justify-items property of the parents box, unless the box has no parent, or is absolutely positioned, in these cases, auto represents normal.
... baseline first baseline last baseline specifies participation in first- or last-baseline alignment: aligns the alignment baseline of the box’s first or last baseline
set with the corresponding baseline in the shared first or last baseline
set of all the boxes in its baseline-sharing group.
scroll-behavior - CSS: Cascading Style Sheets
the scroll-behavior css property
sets the behavior for a scrolling box when scrolling is triggered by the navigation or cssom scrolling apis.
... syntax /* keyword values */ scroll-behavior: auto; scroll-behavior: smooth; /* global values */ scroll-behavior: inherit; scroll-behavior: initial; scroll-behavior: un
set; the scroll-behavior property is specified as one of the keyword values listed below.
... formal definition initial valueautoapplies toscrolling boxesinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | smooth examples
setting smooth scroll behavior html <nav> <a href="#page-1">1</a> <a href="#page-2">2</a> <a href="#page-3">3</a> </nav> <scroll-container> <scroll-page id="page-1">1</scroll-page> <scroll-page id="page-2">2</scroll-page> <scroll-page id="page-3">3</scroll-page> </scroll-container> css a { display: inline-block; width: 50px; text-decoration: none; } nav, scroll-container { dis...
scroll-padding-block-end - CSS: Cascading Style Sheets
the scroll-padding-block-end property defines off
sets for the end edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
... syntax /* keyword values */ scroll-padding-block-end: auto; /* <length> values */ scroll-padding-block-end: 10px; scroll-padding-block-end: 1em; scroll-padding-block-end: 10%; /* global values */ scroll-padding-block-end: inherit; scroll-padding-block-end: initial; scroll-padding-block-end: un
set; values <length-percentage> an inwards off
set from the block end edge of the scrollport, as a valid length or a percentage.
... auto the off
set is determind by the user agent.
scroll-padding-block-start - CSS: Cascading Style Sheets
the scroll-padding-block-start property defines off
sets for the start edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
... syntax /* keyword values */ scroll-padding-block-start: auto; /* <length> values */ scroll-padding-block-start: 10px; scroll-padding-block-start: 1em; scroll-padding-block-start: 10%; /* global values */ scroll-padding-block-start: inherit; scroll-padding-block-start: initial; scroll-padding-block-start: un
set; values <length-percentage> an inwards off
set from the block start edge of the scrollport, as a valid length or a percentage.
... auto the off
set is determind by the user agent.
scroll-padding-bottom - CSS: Cascading Style Sheets
the scroll-padding-bottom property defines off
sets for the bottom of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
... syntax /* keyword values */ scroll-padding-bottom: auto; /* <length> values */ scroll-padding-bottom: 10px; scroll-padding-bottom: 1em; scroll-padding-bottom: 10%; /* global values */ scroll-padding-bottom: inherit; scroll-padding-bottom: initial; scroll-padding-bottom: un
set; values <length-percentage> an inwards off
set from the bottom edge of the scrollport, as a valid length or a percentage.
... auto the off
set is determind by the user agent.
scroll-padding-inline-end - CSS: Cascading Style Sheets
the scroll-padding-inline-end property defines off
sets for the end edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
... syntax /* keyword values */ scroll-padding-inline-end: auto; /* <length> values */ scroll-padding-inline-end: 10px; scroll-padding-inline-end: 1em; scroll-padding-inline-end: 10%; /* global values */ scroll-padding-inline-end: inherit; scroll-padding-inline-end: initial; scroll-padding-inline-end: un
set; values <length-percentage> an inwards off
set from the inline end edge of the scrollport, as a valid length or a percentage.
... auto the off
set is determind by the user agent.
scroll-padding-inline-start - CSS: Cascading Style Sheets
the scroll-padding-inline-start property defines off
sets for the start edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
... syntax /* keyword values */ scroll-padding-inline-start: auto; /* <length> values */ scroll-padding-inline-start: 10px; scroll-padding-inline-start: 1em; scroll-padding-inline-start: 10%; /* global values */ scroll-padding-inline-start: inherit; scroll-padding-inline-start: initial; scroll-padding-inline-start: un
set; values <length-percentage> an inwards off
set from the inline start edge of the scrollport, as a valid length or a percentage.
... auto the off
set is determind by the user agent.
scroll-padding-left - CSS: Cascading Style Sheets
the scroll-padding-left property defines off
sets for the left of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
... syntax /* keyword values */ scroll-padding-left: auto; /* <length> values */ scroll-padding-left: 10px; scroll-padding-left: 1em; scroll-padding-left: 10%; /* global values */ scroll-padding-left: inherit; scroll-padding-left: initial; scroll-padding-left: un
set; values <length-percentage> an inwards off
set from the left edge of the scrollport, as a valid length or a percentage.
... auto the off
set is determind by the user agent.
scroll-padding-right - CSS: Cascading Style Sheets
the scroll-padding-right property defines off
sets for the right of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
... syntax /* keyword values */ scroll-padding-right: auto; /* <length> values */ scroll-padding-right: 10px; scroll-padding-right: 1em; scroll-padding-right: 10%; /* global values */ scroll-padding-right: inherit; scroll-padding-right: initial; scroll-padding-right: un
set; values <length-percentage> an inwards off
set from the top edge of the scrollport, as a valid length or a percentage.
... auto the off
set is determind by the user agent.
scroll-padding-top - CSS: Cascading Style Sheets
the scroll-padding-top property defines off
sets for the top of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
... syntax /* keyword values */ scroll-padding-top: auto; /* <length> values */ scroll-padding-top: 10px; scroll-padding-top: 1em; scroll-padding-top: 10%; /* global values */ scroll-padding-top: inherit; scroll-padding-top: initial; scroll-padding-top: un
set; values <length-percentage> an inwards off
set from the top edge of the scrollport, as a valid length or a percentage.
... auto the off
set is determind by the user agent.
scroll-snap-coordinate - CSS: Cascading Style Sheets
/* keyword value */ scroll-snap-coordinate: none; /* <position> values */ scroll-snap-coordinate: 50px 50px; /* single coordinate */ scroll-snap-coordinate: 100px 100px, 100px bottom; /* multiple coordinates */ /* global values */ scroll-snap-coordinate: inherit; scroll-snap-coordinate: initial; scroll-snap-coordinate: un
set; if the element has been transformed, the snap coordinates are likewise transformed, thus aligning the snap points with the element as it is displayed.
... <position> specifies the off
set of the snap coordinates from the start edge of the element’s border box.
...| [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]where <length-percentage> = <length> | <percentage> examples
setting scroll snap coordinates html <div id="container"> <div> <p>at coordinate (0, 0)</p> <div class="scrollcontainer coordinate0"> <div>1</div> <div>2</div> <div>3</div> </div> </div> <div> <p>at coordinate (25, 0)</p> <div class="scrollcontainer coordinate25"> <div>1</div> <div>2</div> <div>3</div> </div> </div> <div> <...
scroll-snap-type-x - CSS: Cascading Style Sheets
/* keyword values */ scroll-snap-type-x: none; scroll-snap-type-x: mandatory; scroll-snap-type-x: proximity; /* global values */ scroll-snap-type-x: inherit; scroll-snap-type-x: initial; scroll-snap-type-x: un
set; syntax values none when the visual viewport of this scroll container is scrolled horizontally, it must ignore snap points.
...if content is added, moved, deleted or resized the scroll off
set will be adjusted to maintain the resting on that snap point.
...if content is added, moved, deleted or resized the scroll off
set may be adjusted to maintain the resting on that snap point.
scroll-snap-type-y - CSS: Cascading Style Sheets
/* keyword values */ scroll-snap-type-y: none; scroll-snap-type-y: mandatory; scroll-snap-type-y: proximity; /* global values */ scroll-snap-type-y: inherit; scroll-snap-type-y: initial; scroll-snap-type-y: un
set; syntax values none when the visual viewport of this scroll container is scrolled vertically, it must ignore snap points.
...if content is added, moved, deleted or resized the scroll off
set will be adjusted to maintain the resting on that snap point.
...if content is added, moved, deleted or resized the scroll off
set may be adjusted to maintain the resting on that snap point.
scrollbar-color - CSS: Cascading Style Sheets
the scrollbar-color css property
sets the color of the scrollbar track and thumb.
...*/ /* global values */ scrollbar-color: inherit; scrollbar-color: initial; scrollbar-color: un
set; values <scrollbar-color> defines the color of the scrollbar.
... note: user agents must apply any scrollbar-color value
set on the root element to the viewport.
shape-margin - CSS: Cascading Style Sheets
the shape-margin css property
sets a margin for a css shape created using shape-outside.
... syntax /* <length> values */ shape-margin: 10px; shape-margin: 20mm; /* <percentage> value */ shape-margin: 60%; /* global values */ shape-margin: inherit; shape-margin: initial; shape-margin: un
set; values <length-percentage>
sets the margin of the shape to a <length> value or to a <percentage> of the width of the element's containing block.
...ngth, percentage or calc(); formal syntax <length-percentage>where <length-percentage> = <length> | <percentage> examples adding a margin to a polygon html <section> <div class="shape"></div> we are not quite sure of any one thing in biology; our knowledge of geology is relatively very slight, and the economic laws of society are uncertain to every one except some individual who attempts to
set them forth; but before the world was fashioned the square on the hypotenuse was equal to the sum of the squares on the other two sides of a right triangle, and it will be so after this world is dead; and the inhabitant of mars, if he exists, probably knows its truth as we know it.</section> css section { max-width: 400px; } .shape { float: left; width: 150px; height: 150px; backgroun...
tab-size - CSS: Cascading Style Sheets
syntax /* <integer> values */ tab-size: 4; tab-size: 0; /* <length> values */ tab-size: 10px; tab-size: 2em; /* global values */ tab-size: inherit; tab-size: initial; tab-size: un
set; values <integer> a multiple of the advance width of the space character (u+0020) to be used as the width of tabs.
... formal definition initial value8applies toblock containersinheritedyescomputed valuethe specified integer or an absolute lengthanimation typea length formal syntax <integer> | <length> examples expanding by character count pre { tab-size: 4; /*
set tab size to 4 characters wide */ } collapse tabs pre { tab-size: 0; /* remove indentation */ } comparing to the default size this example compares a default tab size with a custom tab size.
... note that white-space is
set to pre to prevent the tabs from collapsing.
table-layout - CSS: Cascading Style Sheets
the table-layout css property
sets the algorithm used to lay out <table> cells, rows, and columns.
... syntax /* keyword values */ table-layout: auto; table-layout: fixed; /* global values */ table-layout: inherit; table-layout: initial; table-layout: un
set; values auto by default, most browsers use an automatic table layout algorithm.
... fixed table and column widths are
set by the widths of table and col elements or by the width of the first row of cells.
text-align - CSS: Cascading Style Sheets
the text-align css property
sets the horizontal alignment of a block element or table-cell box.
...xt-align: center; text-align: justify; text-align: justify-all; text-align: start; text-align: end; text-align: match-parent; /* character-based alignment in a table column */ text-align: "."; text-align: "." center; /* block alignment values (non-standard syntax) */ text-align: -moz-center; text-align: -webkit-center; /* global values */ text-align: inherit; text-align: initial; text-align: un
set; the text-align property is specified in one of the following ways: using the keyword values start, end, left, right, center, justify, justify-all, or match-parent.
...</p> css .example { text-align: justify; border: solid; } result notes the standard-compatible way to center a block itself without centering its inline content is
setting the left and right margin to auto, e.g.: .something { margin: auto; } .something { margin: 0 auto; } .something { margin-left: auto; margin-right: auto; } specifications specification status comment css logical properties and values level 1the definition of 'text-align' in that specification.
text-combine-upright - CSS: Cascading Style Sheets
the text-combine-upright css property
sets the combination of characters into the space of a single character.
... values */ text-combine-upright: none; text-combine-upright: all; /* digits values */ text-combine-upright: digits; /* fits 2 consecutive digits horizontally inside vertical text */ text-combine-upright: digits 4; /* fits up to 4 consecutive digits horizontally inside vertical text */ /* global values */ text-combine-upright: inherit; text-combine-upright: initial; text-combine-upright: un
set; syntax values none there is no special processing.
... all attempts to type
set all consecutive characters within the box horizontally, such that they take up the space of a single character within the vertical line of the box.
text-decoration-line - CSS: Cascading Style Sheets
the text-decoration-line css property
sets the kind of decoration that is used on text in an element, such as an underline or overline.
... when
setting multiple line-decoration properties at once, it may be more convenient to use the text-decoration shorthand property instead.
...text-decoration-line: overline; text-decoration-line: line-through; text-decoration-line: blink; /* multiple keywords */ text-decoration-line: underline overline; /* two decoration lines */ text-decoration-line: overline underline line-through; /* multiple decoration lines */ /* global values */ text-decoration-line: inherit; text-decoration-line: initial; text-decoration-line: un
set; the text-decoration-line property is specified as none, or one or more space-separated values from the list below.
text-decoration-skip - CSS: Cascading Style Sheets
the text-decoration-skip css property
sets what parts of an element’s content any text decoration affecting the element must skip over.
...-decoration-skip: objects; text-decoration-skip: spaces; text-decoration-skip: edges; text-decoration-skip: box-decoration; /* multiple keywords */ text-decoration-skip: objects spaces; text-decoration-skip: leading-spaces trailing-spaces; text-decoration-skip: objects edges box-decoration; /* global values */ text-decoration-skip: inherit; text-decoration-skip: initial; text-decoration-skip: un
set; syntax values none nothing is skipped.
... edges the start and end of the text decoration is in
set slightly (e.g., by half of the line thickness) from the content edge of the decorating box.
text-decoration-thickness - CSS: Cascading Style Sheets
the text-decoration-thickness css property
sets the stroke thickness of the decoration line that is used on text in an element, such as a line-through, underline, or overline.
... syntax /* single keyword */ text-decoration-thickness: auto; text-decoration-thickness: from-font; /* length */ text-decoration-thickness: 0.1em; text-decoration-thickness: 3px; /* percentage */ text-decoration-thickness: 10%; /* global values */ text-decoration-thickness: inherit; text-decoration-thickness: initial; text-decoration-thickness: un
set; values auto the browser chooses an appropriate width for the text decoration line.
...if the font file doesn't include this information, behave as if auto was
set, with the browser choosing an appropriate thickness.
text-emphasis-color - CSS: Cascading Style Sheets
the text-emphasis-color css property
sets the color of emphasis marks.
... this value can also be
set using the text-emphasis shorthand.
... /* initial value */ text-emphasis-color: currentcolor; /* <color> */ text-emphasis-color: #555; text-emphasis-color: blue; text-emphasis-color: rgba(90, 200, 160, 0.8); text-emphasis-color: transparent; /* global values */ text-emphasis-color: inherit; text-emphasis-color: initial; text-emphasis-color: un
set; syntax values <color> defines the color of the emphasis marks.
text-emphasis-style - CSS: Cascading Style Sheets
the text-emphasis-style css property
sets the appearance of emphasis marks.
... it can also be
set, and re
set, using the text-emphasis shorthand.
...r rendered as 'f' only */ /* keyword values */ text-emphasis-style: filled; text-emphasis-style: open; text-emphasis-style: dot; text-emphasis-style: circle; text-emphasis-style: double-circle; text-emphasis-style: triangle; text-emphasis-style: filled sesame; text-emphasis-style: open sesame; /* global values */ text-emphasis-style: inherit; text-emphasis-style: initial; text-emphasis-style: un
set; syntax values none no emphasis marks.
text-justify - CSS: Cascading Style Sheets
the text-justify css property
sets what type of justification should be applied to text when text-align: justify; is
set on an element.
...this has the same effect as not
setting text-align at all, although it is useful if you need to turn justification on and off for some reason.
...this is the default justification used if text-justify is not
set at all.
transition-property - CSS: Cascading Style Sheets
the transition-property css property
sets the css properties to which a transition effect should be applied.
... note: the
set of properties that can be animated is subject to change.
...rty: all; /* <custom-ident> values */ transition-property: test_05; transition-property: -specific; transition-property: sliding-vertically; /* multiple values */ transition-property: test1, animation4; transition-property: all, height, color; transition-property: all, -moz-specific, sliding; /* global values */ transition-property: inherit; transition-property: initial; transition-property: un
set; values none no properties will transition.
visibility - CSS: Cascading Style Sheets
to both hide an element and remove it from the document layout,
set the display property to none instead of using visibility.
... syntax /* keyword values */ visibility: visible; visibility: hidden; visibility: collapse; /* global values */ visibility: inherit; visibility: initial; visibility: un
set; the visibility property is specified as one of the keyword values listed below.
...descendants of the element will be visible if they have visibility
set to visible.
white-space - CSS: Cascading Style Sheets
the white-space css property
sets how white space inside an element is handled.
... syntax /* keyword values */ white-space: normal; white-space: nowrap; white-space: pre; white-space: pre-wrap; white-space: pre-line; white-space: break-spaces; /* global values */ white-space: inherit; white-space: initial; white-space: un
set; the white-space property is specified as a single keyword chosen from the list of values below.
...); font-size: 16px; font-family: monospace; } #css-code select { font-family: inherit; } #results { background-color: rgb(230, 230, 230); overflow-x: scroll; height: 400px; white-space: normal; font-size: 14px; } var select = document.queryselector("#css-code select"); var results = document.queryselector("#results p"); select.addeventlistener("change", function(e) { results.
setattribute("style", "white-space: "+e.target.value); }) <p> lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
zoom - CSS: Cascading Style Sheets
/* keyword values */ zoom: normal; zoom: re
set; /* <percentage> values */ zoom: 50%; zoom: 200%; /* <number> values */ zoom: 1.1; zoom: 0.7; /* global values */ zoom: inherit; zoom: initial; zoom: un
set; syntax values normal render this element at its normal size.
... re
set do not (de)magnify this element if the user applies non-pinch-based zooming (e.g.
... formal definition initial valuenormalapplies toall elementsinheritednocomputed valueas specifiedanimation typean integer formal syntax normal | re
set | <number> | <percentage> examples first example html <p class="small">small</p> <p class="normal">normal</p> <p class="big">big</p> css p.small { zoom: 75%; } p.normal { zoom: normal; } p.big { zoom: 2.5; } p { display: inline-block; } p:hover { zoom: re
set; } result second example html <div id="a" class="circle"></div> <div id="b" class="circle"></div> <div id="c" class="...
math:max() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes math:max() returns the maximum value of a node-
set.
... to compute the maximum value of the node-
set, the node
set is sorted into descending order as it would be using xsl:sort() with a data type of number.
... syntax math:max(node
set) parameters node
set the node-
set whose highest value is to be returned.
math:min() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes math:min() returns the minimum value of a node-
set.
... to compute the minimum value of the node-
set, the node
set is sorted into ascending order as it would be using xsl:sort() with a data type of number.
... note: syntax math:min(node
set) parameters node
set the node-
set whose lowest value is to be returned.
str:split() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes str:split() splits a string using a pattern string to determine where the splits should occur, returning a node-
set containing the resulting strings.
... returns a node-
set of token elements, each containing one token from the string.
... example str:split('book, phone, computer, chair', ', ') returns a node
set like: <token>book</token> <token>phone</token> <token>computer</token> <token>chair</token> specifications exslt - str:split ...
str:tokenize() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes str:tokenize() splits a string using a
set of characters as delimiters that determine where the splits should occur, returning a node-
set containing the resulting strings.
... returns a node-
set of token elements, each containing one token from the string.
... example: str:tokenize('2007-09-14-03t11:40:23', '-t:') returns a node
set like this: <token>2007</token> <token>09</token> <token>14</token> <token>11</token> <token>40</token> <token>23</token> specifications exslt - str:tokenize ...
WAI ARIA Live Regions/API Support - Developer guides
new accessible object) object replaced with different object (this happens especially if an object's interfaces or role changes) children_changed::remove followed immediately by children_change::add event_object_hide followed immediately by event_object_show text removed text_changed::delete ia2_event_text_removed (use iaccessibletext::get_oldtext to retrieve the off
sets and removed text) text inserted text_changed::insert ia2_event_text_inserted (use iaccessibletext::get_newtext to retrieve the off
sets and inserted text) text replaced text_changed::delete followed immediately by text_changed::insert ia2_event_text_removed followed immediately by ia2_event_text_inserted * we do not use msaa's create/destroy at the request of s...
...at this time, for properties where the container-[name] attribute has not been
set, the at must have code to fall back on the default value as defined in the w3c spec.
...in iaccessible2, this is retrieved from the object attribute "event-from-input", which will be
set to "true" or "false".
Media events - Developer guides
note: manually
setting the currenttime will eventually fire a canplaythrough event in firefox.
... volumechange sent when the audio volume changes (both when the volume is
set and when the muted attribute is changed).
... then, in line 3, the example
sets the element's currenttime attribute to 10.0, which initiates a seek operation to the 10-second mark in the media.
Introduction to HTML5 - Developer guides
declaring the character
set with the <meta char
set> the first thing done on a page is usually indicating the character
set that is used.
...now, it is very simple: <meta char
set="utf-8"> place this right after your <head>, as some browsers restart the parsing of an html document if the declared character
set is different from what they had anticipated.
... note that html5 restricts character
sets to those compatible with ascii and using at least 8 bits.
Printing - Developer guides
open and automatically close a popup window when finished if you want to be able to automatically close a popup window (for example, the printer-friendly version of a document) after the user prints its contents, you can use code like this: <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; char
set=utf-8" /> <title>javascript window close example </title> <script type="text/javascript"> function popuponclick() { my_window = window.open('', 'mywindow', 'status=1,width=350,height=150'); my_window.document.write('<html><head><title>print me</title></head>'); my_window.document.write('<body onafterprint="self.close()">'); my_window.document.write('<p>when you print...
...the following is a possible example which will print a file named externalpage.html: <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; char
set=utf-8" /> <title>mdn example</title> <script type="text/javascript"> function closeprint () { document.body.removechild(this.__container__); } function
setprint () { this.contentwindow.__container__ = this; this.contentwindow.onbeforeunload = closeprint; this.contentwindow.onafterprint = closeprint; this.contentwindow.focus(); // required for ie this.contentwindow.print(); } functio...
...n printpage (surl) { var ohiddframe = document.createelement("iframe"); ohiddframe.onload =
setprint; ohiddframe.style.position = "fixed"; ohiddframe.style.right = "0"; ohiddframe.style.bottom = "0"; ohiddframe.style.width = "0"; ohiddframe.style.height = "0"; ohiddframe.style.border = "0"; ohiddframe.src = surl; document.body.appendchild(ohiddframe); } </script> </head> <body> <p><span onclick="printpage('externalpage.html');" style="cursor:pointer;text-decoration:underline;color:#0000ff;">print external page!</span></p> </body> </html> note: older versions of internet explorer cannot print the contents of a hidden <iframe>.
The Unicode Bidirectional Text Algorithm - Developer guides
there are two
sets of control characters; one
set opens the override, and another restores the original directionality.
... initial unicode bidi algorithm control characters character code point html entity markup equivalent description left-to-right isolate (lri) u+2066 ⁦ dir="ltr"
sets the base direction to ltr, isolating the embedded content from the surrounding text right-to-left isolate (lri) u+2067 ⁧ dir="rtl"
sets the base direction to rtl, isolating the embedded content from the surrounding text first strong isolate (fsi) u+2068 ⁨ dir="auto" isolates the content and
sets the base direction according to the first strongly-typed directional character in the embedded content left-to-right embedding (lre) ...
... u+202a ‪ dir="ltr"
sets the base direction to ltr but allows the embedded text to interact with the surrounding content; this risks the effect spilling over to the outer content right-to-left embedding (rle) u+202b ‫ dir="rtl"
sets the base direction to rtl, but lets the embedded text interact with the surrounding content, risking spillover effects left-to-right override (lro) u+202d ‭ <bdo dir="ltr"> overrides the bidi algorithm, displaying the characters in memory order, from left to right right-to-left override (rlo) u+202e ‮ <bdo dir="rtl"> overrides the bidi algorithm and displays the embedded characters in reverse memory order, from right to left closing unicode bidi algorithm c...
Developer guides
this
set of guides tells you all you need to know about pwas.
... using formdata objects the formdata object lets you compile a
set of key/value pairs to send using xmlhttprequest.
...the transmission is in the same format that the form's submit() method would use to send the data if the form's encoding type were
set to "multipart/form-data".
The HTML autocomplete attribute - HTML: Hypertext Markup Language
note: in most modern browsers,
setting autocomplete to "off" will not prevent a password manager from asking the user if they would like to save username and password information, or from automatically filling in those values in a site's login form.
...
setting the value of the autocomplete attribute to off disables this feature.
... form layout flexibility given that different countries write their address in different ways, with each field in different places within the address, and even different
sets and numbers of fields entirely, it can be helpful if, when possible, your site is able to switch to the layout expected by your users when presenting an address entry form, given the country the address is located within.
HTML attribute: min - HTML: Hypertext Markup Language
syntax if any is not explicity
set, valid values for the number, date/time input types, and range input types are equal to the basis for stepping - the min value and increments of the step value, up to the max value, if specified.
...for 4.2 to be valid, step would have had to be
set to any, 0.1, 0.2, or any the min value would have had to be a number ending in .2, such as <input type="number" min="-5.2"> syntax for min values by input type input type example example date yyyy-mm-dd <input type="date" min="2019-12-25" step="1"> month yyyy-mm <input type="month" min="2019-12" step="12"> week yyyy-w## <input type="week" min="2019-w23" step=""> time hh:mm <input type="time" min="09:00" step="900"> datetime-local yy...
...yy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t19:30"> number <number> <input type="number" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the min value
set, the value is considered invalid in contraint validation and will match the :invalid pseudoclass see client-side validation and rangeunderflow for more information.
HTML attribute: pattern - HTML: Hypertext Markup Language
if a non-null value doesn't conform to the constraints
set by the pattern value, the validitystate object's read-only patternmismatch property will be true.
... the pattern's regular expression, when matched against the value, must have its start anchored to the start of the string and its end anchored to the end of the string, which is slightly different from javascript regular expressions: in the case of pattern attribute, we are matching against the entire value, not just any sub
set, as if a ^(?: were implied at the start of the pattern and )$ at the end.
...###" aria-label="3-digit prefix" size="2"/> - <input name="tel3" type="tel" pattern="[0-9]{4}" placeholder="####" aria-label="4-digit number" size="3"/> </label> </p> here we have 3 sections for a north american phone number with an implicit label encompassing all three components of the phone number, expecting 3-digits, 3-digits and 4-digits respectively, as defined by the pattern attribute
set on each.
HTML attribute: readonly - HTML: Hypertext Markup Language
conversely, inputs that support the readonly attribute but don't have the attribute
set match the :read-write pseudo-class.
.../> <label>date</label> </div> <div class="group"> <input type="email" value="some value" readonly="readonly"/> <label>email</label> </div> <div class="group"> <input type="password" value="some value" readonly="readonly"/> <label>password</label> </div> <div class="group"> <textarea readonly="readonly">some value</textarea> <label>message</label> </div> result examples <field
set> <legend>checkboxes buttons</legend> <p><label> <input type="checkbox" name="chbox" value="regular"> regular </label></p> <p><label> <input type="checkbox" name="chbox" value="readonly" readonly> readonly </label></p> <p><label> <input type="checkbox" name="chbox" value="disabled" disabled> disabled </label></p> </field
set> <field
set> <legend>radio buttons</legend> <...
...p><label> <input type="radio" name="radio" value="regular"> regular </label></p> <p><label> <input type="radio" name="radio" value="readonly" readonly> readonly </label></p> <p><label> <input type="radio" name="radio" value="disabled" disabled> disabled </label></p> </field
set> specifications specification status comment html living standardthe definition of 'readonly attribute' in that specification.
HTML attribute: step - HTML: Hypertext Markup Language
the step
sets the stepping interval when clicking up and down spinner buttons, moving a slider left and right on a range, and validating the different date types.
...put type="week" min="2019-w23" step="2"> time 60 (seconds) <input type="time" min="09:00" step="900"> datetime-local 1 (day) <input type="datetime-local" min="019-12-25t19:30" step="7"> number 1 <input type="number" min="0" step="0.1" max="10"> range 1 <input type="range" min="0" step="2" max="10"> if any is not explicity
set, valid values for the number, date/time input types, and range input types are equal to the basis for stepping - the min value and increments of the step value, up to the max value, if specified.
...for 4.2 to be valid, step would have had to be
set to any, 0.1, 0.2, or any the min value would have had to be a number ending in .2, such as <input type="number" min="-5.2"> min impact on step the value of min and step define what are valid values, even if the step attribute is not included, as step defaults to 0.
DASH Adaptive Streaming for HTML 5 Video - HTML: Hypertext Markup Language
create the manifest file: ffmpeg \ -f webm_dash_manifest -i video_160x90_250k.webm \ -f webm_dash_manifest -i video_320x180_500k.webm \ -f webm_dash_manifest -i video_640x360_750k.webm \ -f webm_dash_manifest -i video_1280x720_1500k.webm \ -f webm_dash_manifest -i my_audio.webm \ -c copy \ -map 0 -map 1 -map 2 -map 3 -map 4 \ -f webm_dash_manifest \ -adaptation_
sets "id=0,streams=0,1,2,3 id=1,streams=4" \ my_video_manifest.mpd the -map arguments correspond to the input files in the sequence they are given; you should have one for each file.
... the -adaptation_
sets argument assigns them into adaptation
sets; for example, this creates one
set (0) that contains the streams 0, 1, 2 and 3 (the videos), and another
set (1) that contains only stream 4, the audio stream.
...dash works via http, so as long as your http server supports byte range requests, and it's
set up to serve .mpd files with mimetype="application/dash+xml", then you're all
set.
<area> - HTML: Hypertext Markup Language
coords a
set of values specifying the coordinates of the hot-spot region.
... poly or polygon: the value is a
set of x,y pairs for each point in the polygon: x1,y1,x2,y2,x3,y3, and so on.
...firefox 79+)
setting target="_blank" on <area> elements implicitly provides the same rel behavior as
setting rel="noopener".
<basefont> - HTML: Hypertext Markup Language
the obsolete html base font element (<basefont>)
sets a default font face, size, and color for the other elements which are descended from its parent element.
... with this
set, the font's size can then be varied relative to the base size using the <font> element.
... color this attribute
sets the text color using either a named color or a color specified in the hexadecimal #rrggbb format.
<dialog>: The Dialog element - HTML: Hypertext Markup Language
when the open attribute is not
set, the dialog shouldn't be shown to the user.
...when such a form is submitted, the dialog closes with its returnvalue property
set to the value of the button that was used to submit the form.
...ectel = document.queryselector('select'); var confirmbtn = document.getelementbyid('confirmbtn'); // "update details" button opens the <dialog> modally updatebutton.addeventlistener('click', function onopen() { if (typeof favdialog.showmodal === "function") { favdialog.showmodal(); } else { alert("the <dialog> api is not supported by this browser"); } }); // "favorite animal" input
sets the value of the submit button selectel.addeventlistener('change', function onselect(e) { confirmbtn.value = selectel.value; }); // "confirm" button of form triggers "close" on dialog because of [method="dialog"] favdialog.addeventlistener('close', function onclose() { outputbox.value = favdialog.returnvalue + " button clicked - " + (new date()).tostring(); }); result specifications ...
<form> - HTML: Hypertext Markup Language
accept-char
set space-separated character encodings the server accepts.
...if this attribute is not
set (and therefore the form is validated), it can be overridden by a formnovalidate attribute on a <button>, <input type="submit">, or <input type="image"> element belonging to the form.
...!-- form which will send a get request to the current url --> <form> <label>name: <input name="submitted-name" autocomplete="name"> </label> <button>save</button> </form> <!-- form which will send a post request to the current url --> <form method="post"> <label>name: <input name="submitted-name" autocomplete="name"> </label> <button>save</button> </form> <!-- form with field
set, legend, and label --> <form method="post"> <field
set> <legend>title</legend> <label><input type="radio" name="radio"> select me</label> </field
set> </form> specifications specification status comment html living standardthe definition of '<form>' in that specification.
<input type="hidden"> - HTML: Hypertext Markup Language
additional attributes in addition to the attributes common to all <input> elements, hidden inputs offer the following attributes: attribute description name like all input types, the name of the input to report when submitting the form; the special value _char
set_ causes the hidden input's value to be reported as the character encoding used to submit the form name this is actually one of the common attributes, but it has a special meaning available for hidden inputs.
...however, when the form is submitted, a hidden input whose name is
set to _char
set_ will automatically be reported with the value
set to the character encoding used to submit the form.
...id" value="34657"> </form> let's also add some simple css: html { font-family: sans-serif; } form { width: 500px; } div { display: flex; margin-bottom: 10px; } label { flex: 2; line-height: 2; text-align: right; padding-right: 20px; } input, textarea { flex: 7; font-family: sans-serif; font-size: 1.1rem; padding: 5px; } textarea { height: 60px; } the server would
set the value of the hidden input with the id "postid" to the id of the post in its database before sending the form to the user's browser and would use that information when the form is returned to know which database record to update with modified information.
<option>: The HTML Option element - HTML: Hypertext Markup Language
disabled if this boolean attribute is
set, this option is not checkable.
...if this attribute is not
set, the element can still be disabled if one of its ancestors is a disabled <optgroup> element.
...if the <option> element is the descendant of a <select> element whose multiple attribute is not
set, only one single <option> of this <select> element may have the selected attribute.
<select>: The HTML Select element - HTML: Hypertext Markup Language
if this attribute is not specified, the control inherits its
setting from the containing element, for example <field
set>; if there is no containing element with the disabled attribute
set, then the control is enabled.
...(if this attribute is not
set, the <select> is associated with its ancestor <form> element, if any.) this attribute lets you associate <select> elements to <form>s anywhere in the document, not just inside a <form>.
... technical summary content categories flow content, phrasing content, interactive content, listed, labelable, re
settable, and submittable form-associated element permitted content zero or more <option> or <optgroup> elements.
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
<p>enter the following at the telnet command prompt: <code>
set localecho</code><br /> the telnet client should display: <tt>local echo is on</tt></p> result overriding the default font you can override the browser's default font—if the browser permits you to do so, which it isn't required to do—using css: css tt { font-family: "lucida console", "menlo", "monaco", "courier", monospace; } html <p>enter the following at the telne...
...t command prompt: <code>
set localecho</code><br /> the telnet client should display: <tt>local echo is on</tt></p> result usage notes the <tt> element is, by default, rendered using the browser's default non-proportional font.
... user-configured changes to the default monospace font
setting may take precedence over your css.
itemtype - HTML: Hypertext Markup Language
itemscope is used to
set the scope of where in the data structure the vocabulary
set by itemtype will be active.
...this vocabulary defines a standard
set of type names and property names.
... note: more about itemtype attributes can be found at http://schema.org/thing the itemtype attribute must have a value that is an unordered
set of unique tokens which are case-sensitive, each is a valid and absolute url, and all defined to use the same vocabulary.
lang - HTML: Hypertext Markup Language
if the attribute value is the empty string (lang=""), the language is
set to unknown; if the language tag is not valid according to bcp47, it is
set to invalid.
... even if the lang attribute is
set, it may not be taken into account, as the xml:lang attribute has priority.
... recommendation supported on all elements but <applet>, <base>, <basefont>, <br>, <frame>, <frame
set>, <iframe>, <param>, and <script>.
Reason: expected ‘true’ in CORS header ‘Access-Control-Allow-Credentials’ - HTTP
the cors request requires that the server permit the use of credentials, but the server's access-control-allow-credentials header's value isn't
set to true to enable their use.
... if the request is being issued using xmlhttprequest, make sure you're not
setting withcredentials to true.
... to eliminate this error by changing the server's configuration, adjust the server's configuration to
set the access-control-allow-credentials header's value to true.
CORS errors - HTTP
setting up such a cors configuration isn't necessarily easy and may present some challenges.
... if the cors configuration isn't
setup correctly, the browser console will present an error like "cross-origin request blocked: the same origin policy disallows reading the remote resource at $somesite" indicating that the request was blocked due to violating the cors security rules.
... this might not necessarily be a
set-up mistake, though.
Content Security Policy (CSP) - HTTP
example 1 a web site administrator wants all content to come from the site's own origin (this excludes subdomains.) content-security-policy: default-src 'self' example 2 a web site administrator wants to allow content from a trusted domain and all its subdomains (it doesn't have to be the same domain that the csp is
set on.) content-security-policy: default-src 'self' *.trusted.com example 3 a web site administrator wants to allow users of a web application to include images from any origin in their own content, but to restrict audio or video media to trusted providers, and all scripts only to a specific server that hosts trusted code.
... content-security-policy: default-src 'self' *.mailsite.com; img-src * note that this example doesn't specify a script-src; with the example csp, this site uses the
setting specified by the default-src directive, which means that scripts can be loaded only from the originating server.
...to enable violation reporting, you need to specify the report-uri policy directive, providing at least one uri to which to deliver the reports: content-security-policy: default-src 'self'; report-uri http://reportcollector.example.com/collector.cgi then you need to
set up your server to receive the reports; it can store or process them in whatever manner you determine is appropriate.
HTTP conditional requests - HTTP
the different behaviors are defined by the method of the request used, and by the
set of headers used for a precondition: for safe methods, like get, which usually tries to fetch a document, the conditional request can be used to send back the document, if relevant only.
... besides the
setting of the validators on the server side, this mechanism is transparent: all browsers manage a cache and send such conditional requests without any special work to be done by web developers.
...for caching or resuming downloads, the only work required for webmasters is to configure the server correctly;
setting correct etags in some environments can be tricky.
Feature Policy - HTTP
with feature policy, you opt-in to a
set of "policies" for the browser to enforce on specific features used throughout a website.
... writing a policy a policy is described using a
set of individual policy directives.
... the current
set of policy-controlled features fall into two broad categories: enforcing best practices for good user experiences.
Content-Disposition - HTTP
the content-disposition header is defined in the larger context of mime messages for e-mail, but only a sub
set of the possible parameters apply to http forms and post requests.
... a name with a value of '_char
set_' indicates that the part is not an html field, but the default char
set to use for parts without explicit char
set information.
... examples a response triggering the "save as" dialog: 200 ok content-type: text/html; char
set=utf-8 content-disposition: attachment; filename="cool.html" content-length: 21 <html>save me!</html> this simple html file will be saved as a regular download rather than displayed in the browser.
CSP: block-all-mixed-content - HTTP
the http content-security-policy (csp) block-all-mixed-content directive prevents loading any as
sets over http when the page uses https.
...if the former is
set, the latter does nothing, so
set one directive or the other – not both, unless you want to force https on older browsers that do not force it after a redirect to http.
... syntax content-security-policy: block-all-mixed-content; examples content-security-policy: block-all-mixed-content; <meta http-equiv="content-security-policy" content="block-all-mixed-content"> to disallow http as
sets on a more granular level, you can also
set individual directives to https:.
Referrer-Policy - HTTP
carefully consider the impact of this
setting.
... integration with html you can also
set referrer policies inside html.
... for example, you can
set the referrer policy for the entire document with a <meta> element with a name of referrer: <meta name="referrer" content="origin"> or
set it for individual requests with the referrerpolicy attribute on <a>, <area>, <img>, <iframe>, <script>, or <link> elements: <a href="http://example.com" referrerpolicy="origin"> alternatively, a noreferrer link relation on an a, area, or link element can be
set: <a href="http://example.com" rel="noreferrer"> integration with css css can fetch resources referenced from stylesheets.
WWW-Authenticate - HTTP
header type response header forbidden header name no syntax www-authenticate: <type> realm=<realm>[, char
set="utf-8"] directives <type> authentication type.
... char
set=<char
set> tells the client the server's prefered encoding scheme when submitting a username and password.
... examples typically, a server response contains a www-authenticate header that looks like these: www-authenticate: basic www-authenticate: basic realm="access to the staging site", char
set="utf-8" see also http authentication for examples on how to configure apache or nginx servers to password protect your site with http basic authentication.
X-DNS-Prefetch-Control - HTTP
on firefox, this can be done by
setting the network.dns.disableprefetch preference to true.
...on firefox, this can be changed by
setting the network.dns.disableprefetchfromhttps preference to false.
... examples turning on and off prefetching you can either send the x-dns-prefetch-control header server-side, or from individual documents, using the http-equiv attribute on the <meta> element, like this: <meta http-equiv="x-dns-prefetch-control" content="off"> you can reverse this
setting by
setting content to "on".
HTTP Messages - HTTP
an optional
set of http headers specifying the request, or describing the body included in the message.
...it is only used with connect when
setting up an http tunnel.
... single-resource bodies, consisting of a single file of unknown length, encoded by chunks with transfer-encoding
set to chunked.
Indexed collections - JavaScript
the array's length property is
set to the number of arguments.
... let arr = array(42) // creates an array with no elements // and arr.length
set to 42.
...a view provides a context — that is, a data type, starting off
set, and number of elements — that turns the data into an actual typed array.
Iterators and generators - JavaScript
mbol.iterator] = function* () { yield 2; yield 1; }; user-defined iterables you can make your own iterables like this: const myiterable = { *[symbol.iterator]() { yield 1; yield 2; yield 3; } } for (let value of myiterable) { console.log(value); } // 1 // 2 // 3 or [...myiterable]; // [1, 2, 3] built-in iterables string, array, typedarray, map and
set are all built-in iterables, because their prototype objects all have a symbol.iterator method.
... for (let value of ['a', 'b', 'c']) { console.log(value); } // "a" // "b" // "c" [...'abc']; // ["a", "b", "c"] function* gen() { yield* ['a', 'b', 'c']; } gen().next(); // { value: "a", done: false } [a, b, c] = new
set(['a', 'b', 'c']); a; // "a" advanced generators generators compute their yielded values on demand, which allows them to efficiently represent sequences that are expensive to compute (or even infinite sequences, as demonstrated above).
... here is the fibonacci generator using next(x) to restart the sequence: function* fibonacci() { let current = 0; let next = 1; while (true) { let re
set = yield current; [current, next] = [next, next + current]; if (re
set) { current = 0; next = 1; } } } const sequence = fibonacci(); console.log(sequence.next().value); // 0 console.log(sequence.next().value); // 1 console.log(sequence.next().value); // 1 console.log(sequence.next().value); // 2 console.log(sequence.next().value); // 3 console.log(sequ...
Character classes - JavaScript
inside a character
set, the dot loses its special meaning and matches a literal dot.
...so to match a pattern across multiple lines, the character
set [^] can be used — it will match any character including newlines.
... \u{hhhh} or \u{hhhhh} (only when the u flag is
set.) matches the character with the unicode value u+hhhh or u+hhhhh (hexadecimal digits).
Unicode property escapes - JavaScript
note: as there are many properties and values available, we will not describe them exhaustively here but rather provide various examples rationale before es2018 there was no performance-efficient way to match characters from different
sets based on scripts (like macedonian, greek, georgian etc.) or propertyname (like emoji etc) in javascript.
...the script and script_extensions unicode properties allow regular expression to match characters according to the script they are mainly used with (script) or according to the
set of scripts they belong to (script_extensions).
... if a character is used in a limited
set of scripts, the script property will only match for the "predominant" used script.
Public class fields - JavaScript
class baseclass { msg = 'hello world' basepublicmethod() { return this.msg } } class subclass extends baseclass { subpublicmethod() { return super.basepublicmethod() } } const instance = new subclass() console.log(instance.subpublicmethod()) // expected output: "hello world" getters and
setters are special methods that bind to a class property and are called when that property is accessed or
set.
... use the get and
set syntax to declare a public instance getter or
setter.
... class classwithget
set { #msg = 'hello world' get msg() { return this.#msg }
set msg(x) { this.#msg = `hello ${x}` } } const instance = new classwithget
set() console.log(instance.msg) // expected output: "hello world" instance.msg = 'cake' console.log(instance.msg) // expected output: "hello cake" specifications specification public and private instance fieldsthe definition of 'fielddefinition' in that specification.
TypeError: X.prototype.y called on incompatible type - JavaScript
message typeerror: 'this' is not a
set object (edge) typeerror: function.prototype.tostring called on incompatible object (firefox) typeerror: function.prototype.bind called on incompatible target (firefox) typeerror: method
set.prototype.add called on incompatible receiver undefined (chrome) typeerror: bind must be called on a function (chrome) error type typeerror what went wrong?
... examples invalid cases var my
set = new
set; ['bar', 'baz'].foreach(my
set.add); // my
set.add is a function, but "my
set" is not captured as this.
... valid cases var my
set = new
set; ['bar', 'baz'].foreach(my
set.add.bind(my
set)); // this works due to binding "my
set" as this.
TypeError: "x" is not a non-null object - JavaScript
message typeerror: invalid descriptor for property {x} (edge) typeerror: "x" is not a non-null object (firefox) typeerror: property description must be an object: "x" (chrome) typeerror: invalid value used in weak
set (chrome) error type typeerror what went wrong?
...providing no object (like just a number), will throw an error: object.defineproperty({}, 'key', 1); // typeerror: 1 is not a non-null object object.defineproperty({}, 'key', null); // typeerror: null is not a non-null object a valid property descriptor object might look like this: object.defineproperty({}, 'key', { value: 'foo', writable: false }); weakmap and weak
set objects require object keys weakmap and weak
set objects store object keys.
... var ws = new weak
set(); ws.add('foo'); // typeerror: "foo" is not a non-null object use objects instead: ws.add({foo: 'bar'}); ws.add(window); ...
getter - JavaScript
it is not possible to simultaneously have a getter bound to a property and have that property actually hold a value, although it is possible to use a getter and a
setter in conjunction to create a type of pseudo-property.
... 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).
... class example { get hello() { return 'world'; } } const obj = new example(); console.log(obj.hello); // "world" console.log(object.getownpropertydescriptor(obj, 'hello')); // undefined console.log( object.getownpropertydescriptor( object.getprototypeof(obj), 'hello' ) ); // { configurable: true, enumerable: false, get: function get hello() { return 'world'; },
set: undefined } specifications specification ecmascript (ecma-262)the definition of 'method definitions' in that specification.
Array.from() - JavaScript
description array.from() lets you create arrays from: array-like objects (objects with a length property and indexed elements); or iterable objects (objects such as map and
set).
...1 : -1) * math.floor(math.abs(number)); }; var maxsafeinteger = math.pow(2, 53) - 1; var tolength = function (value) { var len = tointeger(value); return math.min(math.max(len, 0), maxsafeinteger); }; var
setgetitemhandler = function
setgetitemhandler(isiterator, items) { var iterator = isiterator && items[symboliterator](); return function getitem(k) { return isiterator ?
...object(new c(len)) : new array(len); return getarray( t, a, len,
setgetitemhandler(isiterator, items), isiterator, mapfn ); }; })(); } examples array from a string array.from('foo'); // [ "f", "o", "o" ] array from a
set const
set = new
set(['foo', 'bar', 'baz', 'foo']); array.from(
set); // [ "foo", "bar", "baz" ] array from a map const map = new map([[1, 2], [2, 4], [4, 8]]); array.from(map); // [[1, ...
BigInt64Array() constructor - JavaScript
syntax new bigint64array(); new bigint64array(length); new bigint64array(typedarray); new bigint64array(object); new bigint64array(buffer [, byteoff
set [, 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.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
... the byteoff
set 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 [, byteoff
set [, 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.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
... the byteoff
set and length parameters specify the memory range that will be exposed by the typed array view.
DataView.prototype.byteLength - JavaScript
description the bytelength property is an accessor property whose
set accessor function is undefined, meaning that you can only read this property.
...if the dataview is not specifying an off
set or a bytelength, the bytelength of the referenced arraybuffer or sharedarraybuffer will be returned.
... examples using the bytelength property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.bytelength; // 8 (matches the bytelength of the buffer) var dataview2 = new dataview(buffer, 1, 5); dataview2.bytelength; // 5 (as specified when constructing the dataview) var dataview3 = new dataview(buffer, 2); dataview3.bytelength; // 6 (due to the off
set of the constructed dataview) specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.bytelength' in that specification.
Error.prototype.stack - JavaScript
different browsers
set this value at different times.
... for example, firefox
sets it when creating an error object, while phantomjs
sets it only when throwing the error, and archived msdn docs also seem to match the phantomjs implementation.
... <!doctype html> <meta char
set="utf-8"> <title>stack trace example</title> <body> <script> function trace() { try { throw new error('myerror'); } catch(e) { alert(e.stack); } } function b() { trace(); } function a() { b(3, 4, '\n\n', undefined, {}); } a('first call, firstarg'); </script> assuming the above markup is saved as c:\example.html on a windows file system it produces an alert message box with the following text: starting with firefox 30 and later containing the column number: trace@file:///c:/example.html:9:17 b@file:///c:/example.html:16:13 a@file:///c:/example.html:19:13 @file:///c:/example.html:21:9 firefox 14 to firefox 29: trace@file:///c:/example.ht...
Float32Array() constructor - JavaScript
syntax new float32array(); // new in es2017 new float32array(length); new float32array(typedarray); new float32array(object); new float32array(buffer [, byteoff
set [, 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.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
... the byteoff
set 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 [, byteoff
set [, 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.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
... the byteoff
set and length parameters specify the memory range that will be exposed by the typed array view.
Function.name - JavaScript
function foo() {}; foo.bind({}).name; // "bound foo" function names for getters and
setters when using get and
set accessor properties, "get" or "
set" will appear in the function name.
... let o = { get foo(){},
set foo(x){} }; var descriptor = object.getownpropertydescriptor(o, "foo"); descriptor.get.name; // "get foo" descriptor.
set.name; // "
set foo"; function names in classes you can use obj.constructor.name to check the "class" of an object (but be sure to read the warnings below): function foo() {} // es2015 syntax: class foo {} var fooinstance = new foo(); console.log(fooinstance.constructor.name); // logs "foo" warning: the script interpreter will
set the built-in function.name property only if a function does not have an own property called name (see section 9.2.11 of the ecmascript2015 language specification).
... however, es2015 specifies the static keyword such that static methods will be
set as ownproperty of the class constructor function (ecmascript2015, 14.5.14.21.b + 12.2.6.9).
Function - JavaScript
instance methods function.prototype.apply(thisarg [, argsarray]) calls a function and
sets its this to the provided thisarg.
... function.prototype.bind(thisarg[, arg1[, arg2[, ...argn]]]) creates a new function which, when called, has its this
set to the provided thisarg.
... function.prototype.call(thisarg[, arg1, arg2, ...argn]) calls a function and
sets its this to the provided value.
Int16Array() constructor - JavaScript
syntax new int16array(); // new in es2017 new int16array(length); new int16array(typedarray); new int16array(object); new int16array(buffer [, byteoff
set [, 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.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
... the byteoff
set 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 [, byteoff
set [, 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.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
... the byteoff
set 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 [, byteoff
set [, 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.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
... the byteoff
set and length parameters specify the memory range that will be exposed by the typed array view.
Intl.Locale.prototype.caseFirst - JavaScript
examples
setting the casefirst value via the locale string in the unicode locale string spec, the values that casefirst represents correspond to the key kf.
... let casefirststr = new intl.locale("fr-latn-fr-u-kf-upper"); console.log(casefirststr.casefirst); // prints "upper"
setting the casefirst value via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can be used to pass extension types.
...
set the casefirst property of the configuration object to your desired casefirst value, and then pass it into the constructor.
Intl.Locale.prototype.collation - JavaScript
valid collation types collation type description big5han pinyin ordering for latin, big5 char
set ordering for cjk characters (used in chinese) compat a previous version of the ordering, for compatibility dict dictionary style ordering (such as in sinhala) the direct collation type has been deprected.
... direct binary code point order (used in hindi) ducet the default unicode collation element table order emoji recommended ordering for emoji characters eor european ordering rules gb2312 pinyin ordering for latin, gb2312han char
set ordering for cjk characters (used in chinese) phonebk phonebook style ordering (such as in german) phonetic phonetic ordering (sorting based on pronunciation) pinyin pinyin ordering for latin and for cjk characters (used in chinese) reformed reformed ordering (such as in swedish) search special collation type for string search searchjl special collation type for korean initial consonant search standard defa...
...
set the collation property of the configuration object to your desired collation type, and then pass it into the constructor.
Intl.Locale.prototype.script - JavaScript
it indicates the
set of symbols, or glyphs, that are used to write a particular language.
... examples
setting the script in the locale identifer string argument the script is the second part of a valid unicode language identifier string, and can be
set by adding it to the locale identifier string that is passed into the locale constructor.
... let scriptstr = new intl.locale("en-latn-us"); console.log(scriptstr.script); // prints "latn"
setting the script via the configuration object the locale constructor takes a configuration object, which can be used to
set the script subtag and property.
Object.prototype.constructor - JavaScript
*/ } createdconstructor.prototype = object.create(parent.prototype) createdconstructor.prototype.constructor = createdconstructor //
sets the correct constructor for future use createdconstructor.prototype.create = function create() { return new this.constructor() } new createdconstructor().create().create() // it's pretty fine ok, now it's pretty clear why changing the constructor can be useful.
... parentwithstatic.startposition = { x: 0, y:0 } // static member property parentwithstatic.getstartposition = function getstartposition() { return this.startposition } function child(x, y) { this.position = { x: x, y: y } } child = object.assign(parentwithstatic) child.prototype = object.create(parentwithstatic.prototype) child.prototype.constructor = child child.prototype.getoff
setbyinitialposition = function getoff
setbyinitialposition() { let position = this.position let startposition = this.constructor.getstartposition() // error undefined is not a function, since the constructor is child return { off
setx: startposition.x - position.x, off
sety: startposition.y - position.y } }; for this example we need either to stay parent constructor to continue to wor...
... summary: manually updating or
setting the constructor can lead to differrent and sometimes confusing consequences.
Promise.any() - JavaScript
also, unlike promise.race(), which returns the first
settled value (either fulfillment or rejection), this method returns the first fulfilled value.
...this is in contrast to promise.race(), which resolves or rejects with the first promise to
settle.
... const perr = new promise((resolve, reject) => { reject("always fails"); }); const pslow = new promise((resolve, reject) => {
settimeout(resolve, 500, "done eventually"); }); const pfast = new promise((resolve, reject) => {
settimeout(resolve, 100, "done quick"); }); promise.any([perr, pslow, pfast]).then((value) => { console.log(value); // pfast fulfils first }) // expected output: "done quick" rejections with aggregateerror promise.any() rejects with an aggregateerror if no promise fulfils.
Proxy() constructor - JavaScript
by defining any of a
set group of functions on the handler object, you can customise specific aspects of the proxy's behavior.
... handler.
set() a trap for
setting property values.
... handler.
setprototypeof() a trap for object.
setprototypeof.
Reflect - JavaScript
reflect.
set(target, propertykey, value[, receiver]) a function that assigns values to properties.
... reflect.
setprototypeof(target, prototype) a function that
sets the prototype of an object.
...my name is ${this.name}`); } } reflect.has(duck, 'color'); // true reflect.has(duck, 'haircut'); // false returning the object's own keys reflect.ownkeys(duck); // [ "name", "color", "greeting" ] adding a new property to the object reflect.
set(duck, 'eyes', 'black'); // returns "true" if successful // "duck" now contains the property "eyes: 'black'" specifications specification ecmascript (ecma-262)the definition of 'reflect' in that specification.
String.prototype.charCodeAt() - JavaScript
backward compatibility: in historic versions (like javascript 1.2) the charcodeat() method returns a number indicating the iso-latin-1 code
set value of the character at the given index.
... the iso-latin-1 code
set ranges from 0 to 255.
... the first 0 to 127 are a direct match of the ascii character
set.
TypedArray.prototype.byteLength - JavaScript
description the bytelength property is an accessor property whose
set accessor function is undefined, meaning that you can only read this property.
...if the typedarray is not specifying an byteoff
set or a length, the length of the referenced arraybuffer will be returned.
... examples using the bytelength property var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.bytelength; // 8 (matches the bytelength of the buffer) var uint8 = new uint8array(buffer, 1, 5); uint8.bytelength; // 5 (as specified when constructing the uint8array) var uint8 = new uint8array(buffer, 2); uint8.bytelength; // 6 (due to the off
set of the constructed uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.bytelength' in that specification.
TypedArray.prototype.length - JavaScript
description the length property is an accessor property whose
set accessor function is undefined, meaning that you can only read this property.
...if the typedarray is not specifying an byteoff
set or a length, the length of the referenced arraybuffer will be returned.
... examples using the length property var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.length; // 8 (matches the length of the buffer) var uint8 = new uint8array(buffer, 1, 5); uint8.length; // 5 (as specified when constructing the uint8array) var uint8 = new uint8array(buffer, 2); uint8.length; // 6 (due to the off
set of the constructed uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.length' in that specification.
Uint16Array() constructor - JavaScript
syntax new uint16array(); // new in es2017 new uint16array(length); new uint16array(typedarray); new uint16array(object); new uint16array(buffer [, byteoff
set [, 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.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
... the byteoff
set 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 [, byteoff
set [, 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.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
... the byteoff
set 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 [, byteoff
set [, 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.
... buffer, byteoff
set, length when called with a buffer, and optionally a byteoff
set and a length argument, a new typed array view is created that views the specified arraybuffer.
... the byteoff
set and length parameters specify the memory range that will be exposed by the typed array view.
Uint8ClampedArray - JavaScript
the uint8clampedarray typed array represents an array of 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the range of [0,255], 0 or 255 will be
set instead; if you specify a non-integer, the nearest integer will be
set.
... uint8clampedarray.prototype.byteoff
set returns the off
set (in bytes) of the uint8clampedarray from the start of its arraybuffer.
... uint8clampedarray.prototype.
set() stores multiple values in the typed array, reading input values from a specified array.
Iteration protocols - JavaScript
{ value: 'bye', done: (this._first = false) } : { done: true } }, _first: true }; }; notice how redefining @@iterator affects the behavior of built-in constructs that use the iteration protocol: console.log([...somestring]); // ["bye"] console.log(somestring + ''); // "hi" iterable examples built-in iterables string, array, typedarray, map, and
set are all built-in iterables, because each of their prototype objects implements an @@iterator method.
...some examples include: new map([iterable]) new weakmap([iterable]) new
set([iterable]) new weak
set([iterable]) new map([[1, 'a'], [2, 'b'], [3, 'c']]).get(2); // "b" let myobj = {}; new weakmap([ [{}, 'a'], [myobj, 'b'], [{}, 'c'] ]).get(myobj); // "b" new
set([1, 2, 3]).has(3); // true new
set('123').has('2'); // true new weak
set(function* () { yield {} yield myobj yield {} }()).has(myobj); // true see also promise.all(iterable) pr...
...s some statements and expressions expect iterables, for example the for...of loops, the spread operator), yield*, and destructuring assignment: for (let value of ['a', 'b', 'c']) { console.log(value); } // "a" // "b" // "c" console.log([...'abc']); // ["a", "b", "c"] function* gen() { yield* ['a', 'b', 'c']; } console.log(gen().next()); // { value: "a", done: false } [a, b, c] = new
set(['a', 'b', 'c']); console.log(a); // "a" non-well-formed iterables if an iterable's @@iterator method doesn't return an iterator object, then it's considered a non-well-formed iterable.
super - JavaScript
class rectangle { constructor(height, width) { this.name = 'rectangle'; this.height = height; this.width = width; } sayname() { console.log('hi, i am a ', this.name + '.'); } get area() { return this.height * this.width; }
set area(value) { this._area = value; } } class square extends rectangle { constructor(length) { this.height; // referenceerror, super needs to be called first!
...this works with the help of object.
setprototypeof() with which we are able to
set the prototype of obj2 to obj1, so that super is able to find method1 on obj1.
... var obj1 = { method1() { console.log('method 1'); } } var obj2 = { method2() { super.method1(); } } object.
setprototypeof(obj2, obj1); obj2.method2(); // logs "method 1" specifications specification ecmascript (ecma-262)the definition of 'super' in that specification.
Transitioning to strict mode - JavaScript
setting a value to an undeclared variable function f(x) { 'use strict'; var a = 12; b = a + x * 35; // error!
...if you really want to
set a value to the global object, pass it as an argument and explicitly assign it as a property: var global = this; // in the top-level context, "this" always // refers to the global object function f(x) { 'use strict'; var a = 12; global.b = a + x * 35; } f(42); trying to delete a non-configurable property 'use strict'; delete object.prototype; // error!
...the only legitimate use case would be to reuse a function as in: // example taken from vanillajs: http://vanilla-js.com/ var s = document.getelementbyid('thing').style; s.opacity = 1; (function() { if ((s.opacity-=.1) < 0) s.display = 'none'; else
settimeout(arguments.callee, 40); })(); which can be rewritten as: 'use strict'; var s = document.getelementbyid('thing').style; s.opacity = 1; (function fadeout() { // name the function if((s.opacity-=.1) < 0) s.display = 'none'; else
settimeout(fadeout, 40); // use the name of the function })(); semantic differences these differences are very subtle differences.
Authoring MathML - MathML
prior to gecko 31.0 (firefox 31.0 / thunderbird 31.0 / seamonkey 2.28), it was a bit tedious to
setup math fonts, see the font instructions for mozilla 2.0.
... pros: this is very easy
setup: only a few javascript and css files to upload and/or a link to add to your document header.
... cons: this might be a bit more difficult to
set up, since you need some admin right on your server.
<mo> - MathML
(it is the default value if the operator is the last argument in a <mrow> element with more than one argument.) href used to
set a hyperlink to a specified uri.
... largeop specifies whether the operator should be drawn larger than normal when displaystyle="true" is
set.
... the default value is true if stretchy is
set to true and otherwise false.
MathML documentation index - MathML
use the following syntax: <mover> base overscript </mover> 23 <mpadded> mathml, mathml reference, mathml:element, mathml:general layout schemata the mathml <mpadded> element is used to add extra padding and to
set the general adjustment of position and size of enclosed contents.
...by default, string literals are displayed as enclosed by double quotes ("); by using the lquote and rquote attributes, you can
set custom characters to display.
... 28 <mspace> mathml, mathml reference, mathml:element, mathml:token elements the mathml <mspace> element is used to display a blank space, whose size is
set by its attributes.
Image file type and format guide - Web media technologies
svg (scalable vector graphics) svg is an xml-based vector graphics format that specifies the contents of an image as a
set of drawing commands that create shapes, lines, apply colors, filters, and so forth.
... greyscale with alpha n/a n/a true color with alpha n/a n/a compression lossless licensing open source choosing an image format picking the best image format for your needs is likely easier than video formats, as there are fewer options with broad support, and each tends to have a specific
set of use-cases.
... for example, if you're displaying a diagram best displayed with svg, but wish to offer a fallback to a png or gif of the diagram, you would do something like this: <picture> <source src
set="diagram.svg" type="image/svg+xml"> <source src
set="diagram.png" type="image/png"> <img src="diagram.gif" width="620" height="540" alt="diagram showing the data channels"> </picture> you can specify as many <source>s as you wish, though typically 2 or 3 is all you need.
Web media technologies
positional audio in a 3d environment in 3d environments, which may either be 3d scenes rendered to the screen or a mixed reality experience experienced using a head
set, it's important for audio to be performed so that it sounds like it's coming from the direction of its source.
...this can be used with media in many ways, including by
setting a <canvas> element as the destination for video playback or camera capture so that you can capture and manipulate video frames.
...the mixed reality content can then be displayed on the device's screen or using goggles or a head
set.
Introduction to progressive web apps - Progressive web apps (PWAs)
an app could be considered a pwa when it meets certain requirements, or implements a
set of given features: works offline, is installable, is easy to synchronize, can send push notifications, etc.
... modern web apps can have this native app feel via properties
set inside the web app manifest, and via a feature available in modern smartphone browsers called web app installation.
... this is achieved using a combination of technologies: service workers to control page requests (for example storing them offline), the cache api for storing responses to network requests offline (very useful for storing site as
sets), and client-side data storage technologies such as web storage and indexeddb to store application data offline.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
they finally fix issues that front-end developers have struggled with for years — most notably how to properly cache the as
sets of a website and make them available when the user’s device is offline.
...if you want to experiment first before pushing your code to production, you can always test on a localhost or
setup github pages — both support https.
... updates there is still one point to cover: how do you upgrade a service worker when a new version of the app containing new as
sets is available?
SVG Presentation Attributes - SVG: Scalable Vector Graphics
ont-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering solid-color solid-opacity stop-color stop-opacity stroke stroke-dasharray stroke-dashoff
set stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering transform unicode-bidi vector-effect visibility word-spacing writing-mode attributes alignment-baseline it specifies how an object is aligned along the font baseline with respect to its parent.
... value: none|<dasharray>; animatable: yes stroke-dashoff
set defines an off
set on the rendering of the associated dash array.
... value: start|middle|end|inherit; animatable: yes text-decoration
sets the appearance of decorative lines on text.
class - SVG: Scalable Vector Graphics
« svg attribute reference home assigns a class name or
set of class names to an element.
... an element's class name serves two key roles: as a style sheet selector, for when an author assigns style information to a
set of elements.
...ss" cx="40" cy="50" r="26"/> </svg> </body> </html> elements the following elements can use the class attribute: <a> <altglyph> <circle> <clippath> <defs> <desc> <ellipse> <feblend> <fecolormatrix> <fecomponenttransfer> <fecomposite> <feconvolvematrix> <fediffuselighting> <fedisplacementmap> <feflood> <fegaussianblur> <feimage> <femerge> <femorphology> <feoff
set> <fespecularlighting> <fetile> <feturbulence> <filter> <font> <foreignobject> <g> <glyph> <glyphref> <image> <line> <lineargradient> <marker> <mask> <missing-glyph> <path> <pattern> <polygon> <polyline> <radialgradient> <rect> <stop> <svg> <switch> <symbol> <text> <textpath> <title> <tref> <tspan> <use> ...
cx - SVG: Scalable Vector Graphics
three elements are using this attribute: <circle>, <ellipse>, and <radialgradient> html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <radialgradient cx="25%" id="mygradient"> <stop off
set="0" stop-color="white" /> <stop off
set="100%" stop-color="black" /> </radialgradient> <circle cx="50" cy="50" r="45"/> <ellipse cx="150" cy="50" rx="45" ry="25" /> <rect x="205" y="5" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cx defines the x-axis coordinate of the center of the shape.
... value <length> default value 50% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 34 10" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient cx="0" id="mygradient000"> <stop off
set="0%" stop-color="gold" /> <stop off
set="50%" stop-color="green" /> <stop off
set="100%" stop-color="white" /> </radialgradient> <radialgradient cx="50%" id="mygradient050"> <stop off
set="0%" stop-color="gold" /> <stop off
set="50%" stop-color="green" /> <stop off
set="100%" stop-color="white" /> </radialgradient> <radialgradient cx="100%" id="myg...
...radient100"> <stop off
set="0%" stop-color="gold" /> <stop off
set="50%" stop-color="green" /> <stop off
set="100%" stop-color="white" /> </radialgradient> </defs> <rect x="1" y="1" width="8" height="8" fill="url(#mygradient000)" stroke="black" /> <rect x="13" y="1" width="8" height="8" fill="url(#mygradient050)" stroke="black" /> <rect x="25" y="1" width="8" height="8" fill="url(#mygradient100)" stroke="black" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'cx' in that specification.
cy - SVG: Scalable Vector Graphics
three elements are using this attribute: <circle>, <ellipse>, and <radialgradient> html,body,svg { height:100% } <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <radialgradient cy="25%" id="mygradient"> <stop off
set="0" stop-color="white" /> <stop off
set="100%" stop-color="black" /> </radialgradient> <circle cy="50" cx="50" r="45"/> <ellipse cy="150" cx="50" rx="45" ry="25" /> <rect x="5" y="205" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cy defines the y-axis coordinate of the center of the shape.
... value <length> default value 50% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 34 10" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient cy="0" id="mygradient000"> <stop off
set="0%" stop-color="gold" /> <stop off
set="50%" stop-color="green" /> <stop off
set="100%" stop-color="white" /> </radialgradient> <radialgradient cy="50%" id="mygradient050"> <stop off
set="0%" stop-color="gold" /> <stop off
set="50%" stop-color="green" /> <stop off
set="100%" stop-color="white" /> </radialgradient> <radialgradient cy="100%" id="myg...
...radient100"> <stop off
set="0%" stop-color="gold" /> <stop off
set="50%" stop-color="green" /> <stop off
set="100%" stop-color="white" /> </radialgradient> </defs> <rect x="1" y="1" width="8" height="8" fill="url(#mygradient000)" stroke="black" /> <rect x="13" y="1" width="8" height="8" fill="url(#mygradient050)" stroke="black" /> <rect x="25" y="1" width="8" height="8" fill="url(#mygradient100)" stroke="black" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'cy' in that specification.
externalResourcesRequired - SVG: Scalable Vector Graphics
in particular, if an element
sets externalresourcesrequired="true", then all style sheets must be available since any style sheet might affect the rendering of that element.
... the externalresourcesrequired attribute is not inheritable (from a sense of attribute value inheritance), but if
set on a container element, its value will apply to all elements within the container.
... because
setting externalresourcesrequired="true" on a container element will have the effect of disabling progressive display of the contents of that container, if that container includes elements that reference external resources, authors should avoid simply
setting externalresourcesrequired="true" on the outermost <svg> element on a universal basis.
fill - SVG: Scalable Vector Graphics
for animation five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <
set>.
... html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <!-- simple color fill --> <circle cx="50" cy="50" r="40" fill="pink" /> <!-- fill circle with a gradient --> <defs> <radialgradient id="mygradient"> <stop off
set="0%" stop-color="pink" /> <stop off
set="100%" stop-color="black" /> </radialgradient> </defs> <circle cx="150" cy="50" r="40" fill="url(#mygradient)" /> <!-- keeping the final state of an animated circle which is a circle with a radius of 40.
...
set for <
set>, fill defines the final state of the animation.
href - SVG: Scalable Vector Graphics
fifteen elements are using this attribute: <a>, <animate>, <animatemotion>, <animatetransform>, <discard>, <feimage>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <
set>, <textpath>, and <use> html, body, svg { height: 100%; } <svg viewbox="0 0 160 40" xmlns="http://www.w3.org/2000/svg"> <a href="https://developer.mozilla.org/"><text x="10" y="25">mdn web docs</text></a> </svg> in svg a for <a>, href defines the location of the referenced object, expressed as a url reference.
... value <url> default value none animatable yes animate, animatemotion, animatetransform,
set for the <animate>, <animatemotion>, <animatetransform>, and <
set>, href defines a url referring to the element which is the target of this animation element and which therefore will be modified over time.
... svg animations level 2the definition of 'href for <animate>, <animatemotion>, <animatetransform>, and <
set>' in that specification.
kerning - SVG: Scalable Vector Graphics
the kerning attribute indicates whether the spacing between glyphs should be adjusted based on kerning tables that are included in the relevant font (i.e., enable auto-kerning) or instead disable auto-kerning and
set the spacing between them to a specific length (typically, zero).
...instead, inter-character spacing is
set to the given length.
... the most common scenario, other than auto, is to
set kerning to a value of 0 so that auto-kerning is disabled.
<feComponentTransfer> - SVG: Scalable Vector Graphics
example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 600 300"> <defs> <lineargradient id="rainbow" gradientunits="userspaceonuse" x1="0" y1="0" x2="100%" y2="0"> <stop off
set="0" stop-color="#ff0000"></stop> <stop off
set="0.2" stop-color="#ffff00"></stop> <stop off
set="0.4" stop-color="#00ff00"></stop> <stop off
set="0.6" stop-color="#00ffff"></stop> <stop off
set="0.8" stop-color="#0000ff"></stop> <stop off
set="1" stop-color="#800080"></stop> </lineargradient> <filter id="identity" x="0" y="0" width="100%" height="100%"> <fec...
... <fefuncr type="linear" slope="0.5" intercept="0"></fefuncr> <fefuncg type="linear" slope="0.5" intercept="0.25"></fefuncg> <fefuncb type="linear" slope="0.5" intercept="0.5"></fefuncb> </fecomponenttransfer> </filter> <filter id="gamma" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="gamma" amplitude="4" exponent="7" off
set="0"></fefuncr> <fefuncg type="gamma" amplitude="4" exponent="4" off
set="0"></fefuncg> <fefuncb type="gamma" amplitude="4" exponent="1" off
set="0"></fefuncb> </fecomponenttransfer> </filter> </defs> <g font-weight="bold"> <text x="0" y="20">default</text> <rect x="0" y="30" width="100%" height="20"></rect> <text x="0" y="70">identity</text> <rect x="0"...
... working draft specified that missing transfer function elements are treated like they were specified with their type attributes
set to identity.
<feDropShadow> - SVG: Scalable Vector Graphics
eviation="0" flood-color="pink" flood-opacity="0.5"/> </filter> </defs> <circle cx="5" cy="50%" r="4" style="fill:pink; filter:url(#shadow);"/> <circle cx="15" cy="50%" r="4" style="fill:pink; filter:url(#shadow2);"/> <circle cx="25" cy="50%" r="4" style="fill:pink; filter:url(#shadow3);"/> </svg> attributes dx this attribute defines the x off
set of the drop shadow.
... value type: <number>; default value: 2; animatable: yes dy this attribute defines the y off
set of the drop shadow.
...mber>; default value: 2; animatable: yes global attributes core attributes most notably: id styling attributes class, style filter primitive attributes height, in, result, x, y, width presentation attributes most notably: flood-color, flood-opacity usage notes categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <script>, <
set> specifications specification status comment filter effects module level 1the definition of '<fedropshadow>' in that specification.
<polygon> - SVG: Scalable Vector Graphics
the <polygon> element defines a closed shape consisting of a
set of connected straight line segments.
...ional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polygon>' in that sp...
SVG element reference - SVG: Scalable Vector Graphics
rm> c <circle> <clippath> <color-profile> d <defs> <desc> <discard> e <ellipse> f <feblend> <fecolormatrix> <fecomponenttransfer> <fecomposite> <feconvolvematrix> <fediffuselighting> <fedisplacementmap> <fedistantlight> <fedropshadow> <feflood> <fefunca> <fefuncb> <fefuncg> <fefuncr> <fegaussianblur> <feimage> <femerge> <femergenode> <femorphology> <feoff
set> <fepointlight> <fespecularlighting> <fespotlight> <fetile> <feturbulence> <filter> <foreignobject> g <g> h <hatch> <hatchpath> i <image> l <line> <lineargradient> m <marker> <mask> <mesh> <meshgradient> <meshpatch> <meshrow> <metadata> <mpath> p <path> <pattern> <polygon> <polyline> r <radialgradient> <rect> s <script> <
set> <solidcol...
...or> <stop> <style> <svg> <switch> <symbol> t <text> <textpath> <title> <tspan> u <unknown> <use> v <view> svg elements by category animation elements <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <discard>, <mpath>, <
set> basic shapes <circle>, <ellipse>, <line>, <polygon>, <polyline>, <rect> container elements <a>, <defs>, <g>, <marker>, <mask>, <missing-glyph>, <pattern>, <svg>, <switch>, <symbol>, <unknown> descriptive elements <desc>, <metadata>, <title> filter primitive elements <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>,<fefunca>, <fefuncb>, <fefuncg>, <fefuncr>,<fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorp...
...hology>, <feoff
set>, <fespecularlighting>, <fetile>, <feturbulence> font elements <font>, <font-face>, <font-face-format>, <font-face-name>, <font-face-src>, <font-face-uri>, <hkern>, <vkern> gradient elements <lineargradient>, <meshgradient>, <radialgradient>, <stop> graphics elements <circle>, <ellipse>, <image>, <line>, <mesh>, <path>, <polygon>, <polyline>, <rect>, <text>, <use> graphics referencing elements <mesh>, <use> light source elements <fedistantlight>, <fepointlight>, <fespotlight> never-rendered elements <clippath>, <defs>, <hatch>, <lineargradient>, <marker>, <mask>, <meshgradient>, <metadata>, <pattern>, <radialgradient>, <script>, <style>, <symbol>, <title> paint server elements <hatch>, <lineargradient>, <meshgradient>, <pattern>, <radialgradient>, <solidcolor>...
Example - SVG: Scalable Vector Graphics
= display(); var width = parseint( display.getattributens(null,'width') ); var height = parseint( display.getattributens(null,'height') ); return [width,height]; } // this is called by mouse move events var mouse_x = 200, mouse_y = 150; function onmousemove(evt) { mouse_x = evt.clientx; mouse_y = evt.clienty; var widget = document.getelementbyid('cursor'); widget.
setattributens(null,'cx',mouse_x); widget.
setattributens(null,'cy',mouse_y); } document.onmousemove = onmousemove; // determine (x,y) of the cursor function cursor() { return [mouse_x, mouse_y]; } // determine average (x,y) of the swarm function averagemoteposition() { if( !motes ) return [0,0]; if( motes.length == 0 ) return [0,0]; var i; var sum_x=0, ...
... if( this.elt === null ) { var svg = 'http://www.w3.org/2000/svg'; this.elt = document.createelementns(svg,'line'); this.elt.
setattributens(null,'stroke','green'); this.elt.
setattributens(null,'stroke-width','3'); this.elt.
setattributens(null,'stroke-opacity','0.5'); display().appendchild( this.elt ); } this.elt.
setattributens(null,'x1',old_x); this.elt.
setattributens(null,'y1',old_y); this.elt.
setattributens(null,'x2',this.x); this.elt.
setattributens(null,'y2',this.y); } function update(...
... if( num == 0 ) motes = []; else if( motes.length > num ) motes = motes.slice(0,num-1); // move a random mote if( motes.length > 0 ) motes[ rand( motes.length ) ].move(); // and do this again in 1/100 sec
settimeout('update()', 10); } ]]> </script> </body> </html> ...
Getting started - SVG: Scalable Vector Graphics
the background is
set to red by drawing a rectangle <rect> that covers the complete image area.
... a green circle <circle> with a radius of 80px is drawn atop the center of the red rectangle (center of circle off
set 150px to the right, and 100px downward from the top left corner).
...the text is positioned by
setting an anchor where we want the midpoint to be: in this case, the midpoint should correspond to the center of the green circle.
Paths - SVG: Scalable Vector Graphics
therefore, to create a cubic bézier, three
sets of coordinates need to be specified.
... c x1 y1, x2 y2, x y (or) c dx1 dy1, dx2 dy2, dx dy the last
set of coordinates here (x,y) specify where the line should end.
...for the second arc, though, the x-axis-rotation is
set to -45 degrees.
SVG Filters Tutorial - SVG: Scalable Vector Graphics
by adding feoff
set and result, the effect layer is defined <result> attribute is a reference that can be use later.
...<feoff
set> primitive has the blur result from the gaussian blur.
... <femerge> primitive contains the nodes <femergenode> taking as input the result off
setblur , this will allow it to appear below the sourcegraphic implementation of more primitives <defs> <filter id="drop-shadow"> <fegaussianblur in="sourcealpha" stddeviation="3" result="blur"/> <feoff
set in="blur" dx="4" dy="4" result="off
setblur"/> </filter> <femerge> <femergenode in="off
setblur"/> <femergenode in="sourcegraphic"/> </femerge> </defs> ...
Transport Layer Security - Web security
in tls 1.2 and earlier, the negotiated cipher suite includes a
set of cryptographic algorithms that together provide the negotiation of the shared secret, the means by which a server is authenticated, and the method that will be used to encrypt data.
...the configuration file may need some adjustments to include custom
settings, so be sure to review the generated configuration before using it; installing the configuration file without ensuring any references to domain names and the like are correct will result in a server that just doesn't work.
... tls 1.3 defines a new
set of cipher suites that are exclusive to tls 1.3.
Using custom elements - Web Components
// create a shadow root this.attachshadow({mode: 'open'}); //
sets and returns 'this.shadowroot' // create (nested) span elements const wrapper = document.createelement('span'); wrapper.
setattribute('class','wrapper'); const icon = wrapper.appendchild(document.createelement('span')); icon.
setattribute('class','icon'); icon.
setattribute('tabindex', 0); // insert icon from defined attribute or default icon const img = icon.appendchild(document.createelement('img...
...this.getattribute('img') : 'img/default.png'; const info = wrapper.appendchild(document.createelement('span')); info.
setattribute('class','info'); // take attribute content and put it inside the info span info.textcontent = this.getattribute('data-text'); // create some css to apply to the shadow dom const style = document.createelement('style'); style.textcontent = '.wrapper {' + // css truncated for brevity // attach the created elements to the shadow dom this.shadowroot.append(style,wrapper); finally, we register our custom element on the customelementregistry using the define() method we mentioned earlier — in the parameters we specify the element name, and then the class name that defines its functionality: customelements.define('popup-i...
... for example, take a look at this code from our popup-info-box-external-stylesheet example (see the source code): // apply external styles to the shadow dom const linkelem = document.createelement('link'); linkelem.
setattribute('rel', 'stylesheet'); linkelem.
setattribute('href', 'style.css'); // attach the created element to the shadow dom shadow.appendchild(linkelem); note that <link> elements do not block paint of the shadow root, so there may be a flash of unstyled content (fouc) while the stylesheet loads.
count - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the count function counts the number of nodes in a node-
set and returns an integer.
... syntax count(node-
set ) arguments node-
set the node
set to be counted.
... returns an integer representing the number of nodes in a node-
set.
key - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the key function returns a node-
set of nodes that have the given value for the given key.
... value the returned node-
set will contain every node that has this value for the given key.
... returns a node
set.
sum - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the sum function returns a number that is the sum of the numeric values of each node in a given node-
set.
... syntax sum(node-
set ) arguments node-
set the node-
set to be evaluated.
... each node in this node-
set is evaluated as if it were passed to the number() function, and a sum of the resulting numbers is returned.
<xsl:apply-templates> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:apply-templates> element selects a
set of nodes in the input tree and instructs the processor to apply the proper templates to them.
...an asterisk(*) selects the entire node-
set.
... if this attribute is not
set, all child nodes of the current node are selected.
<xsl:copy> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:copy use-attribute-
sets=list-of-names> template </xsl:copy> required attributes none.
... optional attributes use-attribute-
sets lists attribute
sets that should be applied to the output node, if it is an element.
... names of the
sets should be separated with whitespace characters.
Caching compiled WebAssembly modules - WebAssembly
it is ideal for persisting as
sets locally for the saved state of an application, including text, blobs, and any other type of cloneable object.
...
setting up a caching library because indexeddb is a somewhat old-fashioned api, we wanted to provide a library function to speed up writing caching code, and make it work better along with today's more modern apis.
... the function starts off by defining some necessary constants: function instantiatecachedurl(dbversion, url, importobject) { const dbname = 'wasm-cache'; const storename = 'wasm-cache';
setting up the database the first helper function contained inside instantiatecachedurl() — opendatabase() — creates an object store for storing wasm modules, and also handles clearing out the database if the dbversion is updated; it returns a promise resolving to the new database.
WebAssembly Concepts - WebAssembly
a
set of web apis that the web app can call to control web browser/device functionality and make things happen (dom, cssom, webgl, indexeddb, web audio api, etc.).
... instance: a module paired with all the state it uses at runtime including a memory, table, and
set of imported values.
... an instance is like an es2015 module that has been loaded into a particular global with a particular
set of imports.
Loading and running WebAssembly code - WebAssembly
again, assuming our module is called simple.wasm: create a new xmlhttprequest() instance, and use its open() method to open a request,
setting the request method to get, and declaring the path to the file we want to fetch.
... the key part of this is to
set the response type to 'arraybuffer' using the respon
setype property.
... the final code looks like this: request = new xmlhttprequest(); request.open('get', 'simple.wasm'); request.respon
setype = 'arraybuffer'; request.send(); request.onload = function() { var bytes = request.response; webassembly.instantiate(bytes, importobject).then(results => { results.instance.exports.exported_func(); }); }; note: you can see an example of this in action in xhr-wasm.html.
Porting the Library Detector - Archive of obsolete content
this means we'll need two additional content scripts: one in the widget's context, which listens for icon mouseover events and sends a message to main.js containing the name of the corresponding library: function
setlibraryinfo(element) { self.port.emit('
setlibraryinfo', element.target.title); } var elements = document.getelementsbytagname('img'); for (var i = 0; i < elements.length; i++) { elements[i].addeventlistener('mouseover',
setlibraryinfo, false); } one in the panel, which updates the panel's content with the library information: self.on("message", function(libraryinfo) { window.docum...
...ent.body.innerhtml = libraryinfo; }); finally main.js relays the library information from the widget to the panel: widget.port.on('
setlibraryinfo', function(libraryinfo) { widget.panel.postmessage(libraryinfo); }); ...
XUL Migration Guide - Archive of obsolete content
using the supported apis the sdk provides a
set of high level apis providing some basic user interface components and functionality commonly required by add-ons.
...this simple example modifies the selected tab's css to enable the user to highlight the selected tab: function highlightactivetab() { var window = require("sdk/window/utils").getmostrecentbrowserwindow(); var tab = require("sdk/tabs/utils").getactivetab(window); if (tab.style.getpropertyvalue('background-color')) { tab.style.
setproperty('background-color','','important'); } else { tab.style.
setproperty('background-color','rgb(255,255,100)','important'); } } require("sdk/ui/button/action").actionbutton({ id: "highlight-active-tab", label: "highlight active tab", icon: "./icon-16.png", onclick: highlightactivetab }); security implications the sdk implements a security model in which an add-on only get...
self - Archive of obsolete content
it comes from the id property
set in the package.json file in the main package (i.e.
...it comes from the version property
set in the package.json file in the main package.
autohide - Archive of obsolete content
« xul reference home autohide type: boolean when
set to true, the toolbar will be invisible unless the alt key is pressed by the user.
... when
set to false, the default, the toolbar is visible.
binding - Archive of obsolete content
ties object, predicate, subject examples fixme: (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties object type: string the object of the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related tbd ...
column - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements grid, columns, rows, row ...
columns - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements grid, column, rows, row.
conditions - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
dialogheader - Archive of obsolete content
depending on the platform and theme being used, some elements will have
set a maximum width so they will always appear cropped.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements dialog, window ...
dropmarker - Archive of obsolete content
examples properties accessibletype attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
elements - Archive of obsolete content
a action arrowscrollbox b bbox binding bindings box broadcaster broadcaster
set button browser c checkbox caption colorpicker column columns command
set command conditions content d deck description dialog dialogheader e editor grid grippy groupbox h hbox i iframe image k key key
set l label listbox listcell listcol listcols listhead listheader listitem m member menu menubar menuitem menulist menupopup menuseparator o observes overlay p page popup popup
set preference preferences prefpane prefwindow progressmeter r radio radiogroup resizer richlistbox richlistitem resizer row rows rule s script scrollbar scrollbox scrollcorn...
...er separator spacer splitter stack statusbar statusbarpanel stringbundle stringbundle
set t tab tabbrowser tabbox tabpanel tabpanels tabs template textnode textbox titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbar
set toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple v vbox w window wizard wizardpage ...
grid - Archive of obsolete content
p> </menulist> </row> </rows> </grid> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements columns, column, rows, row.
grippy - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
hbox - Archive of obsolete content
ex="1"/> <button label="connect"/> <button label="ping"/> </hbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements box, vbox ...
image - Archive of obsolete content
src type: url gets and
sets the value of the src attribute.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata style classes alert-icon class that adds an alert icon.
listcol - Archive of obsolete content
bel="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements listbox, listcell, listcols, listhead, listheader, listitem ...
listcols - Archive of obsolete content
bel="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements listbox, listcell, listcol, listhead, listheader, listitem ...
member - Archive of obsolete content
properties child, container examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties child type: ?
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
page - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
preferences - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related preferences system documentation: introduction: getting started | examples | troubleshooting reference: prefwindow | prefpane | preferences | preference | xul attributes ...
query - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
row - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements grid, columns, column, rows.
rows - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements grid, columns, column, row.
scrollbox - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
scrollcorner - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
separator - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata style classes the following classes may be used to style the element.
spacer - Archive of obsolete content
label="left"/> <spacer flex="1"/> <button label="right"/> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements separator, splitter ...
spinbuttons - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
statusbar - Archive of obsolete content
ned" value="82"/> <statusbarpanel label="right panel"/> </statusbar> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements statusbarpanel interfaces nsiaccessibleprovider ...
tabpanel - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements tabbox, tabs, tab, tabpanels.
textnode - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
toolbargrippy - Archive of obsolete content
properties accessible examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessible type: nsiaccessible returns the accessibility object for the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements toolbar, toolbarbutton, toolbaritem, toolbarpalette, toolbarseparator, toolbar
set, toolbarspacer, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbaritem - Archive of obsolete content
utton2" class="toolbarbutton-1" label="labe2l" /> </toolbaritem> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbarpalette, toolbarseparator, toolbar
set, toolbarspacer, toolbarspring, toolbox ...
toolbarpalette - Archive of obsolete content
ext;" oncommand="somefunction()"/> </toolbarpalette> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarseparator, toolbar
set, toolbarspacer, toolbarspring, toolbox ...
toolbarseparator - Archive of obsolete content
tor /> <toolbarbutton label="button 2"/> </toolbar> </toolbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbar
set, toolbarspacer, toolbarspring, toolbox ...
toolbarspacer - Archive of obsolete content
properties accessibletype examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbar
set, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbarspring - Archive of obsolete content
properties accessibletype examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbar
set, toolbarspacer, toolbox interfaces nsiaccessibleprovider ...
treechildren - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata example <tree flex="1"> <treecols> <treecol id="sender" label="sender" flex="1"/> <treecol id="subject" label="subject" flex="2"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="joe@somewhere.com"/> <treecell label="top secret plans"/> </treer...
treecols - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements tree, treecol, treechildren, treeitem, treerow, treecell and treeseparator.
triple - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata ...
vbox - Archive of obsolete content
acer flex="1"/> <label value="one"/> <label value="two"/> </vbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mou
sethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, databas...
..., getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(),
setattribute(),
setattributenode(),
setattributenodens(),
setattributens(),
setuserdata related elements box, hbox ...
Deploying XULRunner - Archive of obsolete content
an example of one such solution may be found in the article: creating a windows inno
setup installer for xulrunner applications.
... edit this as you need to, but cfbundleexecutable must be xulrunner, and cfbundleiconfile and cfbundleurliconfile should be
set to the filename of your application icon (app_icon.icns).
Dialogs in XULRunner - Archive of obsolete content
here is an example xul dialog: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <dialog id="mydialog" title="my dialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="window.sizetocontent();" buttons="accept,cancel" buttonlabelaccept="
set favorite" buttonaccesskeyaccept="s" ondialogaccept="return dosave();" buttonlabelcancel="cancel" buttonaccesskeycancel="n" ondialogcancel="return docancel();"> <script> function dosave(){ //dosomething() return true; } function docancel(){ return true; } </script> <dialogheader title="my dialog" description="example ...
...firefox and thunderbird both support nearly native page
setup and print dialogs.
Using LDAP XPCOM with XULRunner - Archive of obsolete content
moz_dll_suffix; nsresult nsgetmodule(nsicomponentmanager* acompmgr, nsifile* alocation, nsimodule* *aresult) { nsresult rv; nscomptr<nsifile> libraries; rv = alocation->getparent(getter_addrefs(libraries)); if (ns_failed(rv)) return rv; nscomptr<nsilocalfile> library(do_queryinterface(libraries)); if (!library) return ns_error_unexpected; library->
setnativeleafname(ns_literal_cstring("libraries")); library->appendnative(ns_literal_cstring("dummy")); // loop through and load dependent libraries for (char const *const *dependent = kdependentlibraries; *dependent; ++dependent) { library->
setnativeleafname(nsdependentcstring(*dependent)); prlibrary *lib; library->load(&lib); // 1) we don't care if this failed!
... } library->
setnativeleafname(ns_literal_cstring(krealcomponent)); prlibrary *lib; rv = library->load(&lib); if (ns_failed(rv)) return rv; nsgetmoduleproc getmoduleproc = (nsgetmoduleproc) pr_findfunctionsymbol(lib, ns_get_module_symbol); if (!getmoduleproc) return ns_error_failure; return getmoduleproc(acompmgr, alocation, aresult); } then change your .mozconfig to add this line: ac_add_options --enable-extensions=ldapstub rebuild xulrunner.
MacFAQ - Archive of obsolete content
need is the window.arguments[0]) <?xml version="1.0"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="myxul_hidden" windowtype="myxul:hiddenwindow" title="" width="0" height="0" persist="screenx screeny width height sizemode" > <!-- load the mozilla helpers --> <script type="application/javascript" src="chrome://global/content/nsuser
settings.js" /> <script><![cdata[ function debug(alogstring) { var mconsoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice) mconsoleservice.logstringmessage("myxul: " + alogstring + "\n"); } function checkotherwindows() { var singletonwindowtype = nspreferences.copyunicha...
....arguments && window.arguments[0]){ try { var cmdline = window.arguments[0] .queryinterface(components.interfaces.nsicommandline); for (var i = 0; i < cmdline.length; ++i) { debug(cmdline.getargument(i)) } } catch(ex) { debug(window.arguments[0]) // do something with window.arguments[0] //nspreferences.
setunicharpref("myxul.cmdlinevalue", window.arguments[0]) } window.addeventlistener("load", checkotherwindows , false); } ]]></script> </window> ...
Opening a Link in the Default Browser - Archive of obsolete content
to suppress this warning for particular protocols that are safe to open in the default application, you must
set default prefs (thunderbird
sets the following prefs): // suppress external-load warning for standard browser schemes pref("network.protocol-handler.warn-external.http", false); pref("network.protocol-handler.warn-external.https", false); pref("network.protocol-handler.warn-external.ftp", false); you can also check whether an external handler for a scheme exists.
... it: var extps = components.classes["@mozilla.org/uriloader/external-protocol-service;1"] .getservice(components.interfaces.nsiexternalprotocolservice); if (extps.externalprotocolhandlerexists("http")) { // handler for http:// urls exists } link within an iframe to enable a link inside an html document that is the "src" of an iframe to be opened in the default browser,
setting the preference: pref("network.protocol-handler.expose-all", false); seems to work.
Specifying Startup Chrome Window - Archive of obsolete content
an application wishing to have only one main window should
set the toolkit.singletonwindowtype preference and specify the windowtype attribute on the main application window.
...this default can be changed by
setting the toolkit.defaultchromefeatures preference.
Using SOAP in XULRunner 1.9 - Archive of obsolete content
etween jqsoapclient.js and sasoapclient.js 42c42 < var jsout = $.xmltojson(xdata.responsexml); --- > var jsout = xmlobjectifier.xmltojson(xdata.responsexml); 46,60c46,62 < $.ajax({ < type: "post", < url: soapclient.proxy, < datatype: "xml", < processdata: false, < data: content, < complete: getresponse, < contenttype: soapclient.contenttype + "; char
set=\"" + soapclient.char
set + "\"", < beforesend: function(req) { < req.
setrequestheader("method", "post"); < req.
setrequestheader("content-length", soapclient.contentlength); < req.
setrequestheader("soapserver", soapclient.soapserver); < req.
setrequestheader("soapaction", soapreq.action); < } < }); --- > var xhr = new xmlhttprequest(); > xhr.mozbackgroun...
...drequest = true; > xhr.open('post', soapclient.proxy, true); > xhr.onreadystatechange = function() { > if (4 != xhr.readystate) { return; } > getresponse(xhr); > }; > var headers = { > 'method': 'post', > 'content-type': soapclient.contenttype + '; char
set="' + > soapclient.char
set + '"', > 'content-length': soapclient.contentlength, > 'soapserver': soapclient.soapserver, > 'soapaction': soapreq.action > }; > for (var h in headers) { xhr.
setrequestheader(h, headers[h]); } > xhr.send(content); ...
CSSStyleValue - Web APIs
cssimagevalue csskeywordvalue cssnumericvalue csspositionvalue csstransformvalue cssunparsedvalue methods cssstylevalue.parse()
sets a specific css property to the specified values and returns the first value as a cssstylevalue object.
... cssstylevalue.parseall()
sets all occurences of a specific css property to the specified valueand returns an array of cssstylevalue objects, each containing one of the supplied values.
CSS Font Loading API - Web APIs
fontface
set an interface loading font faces and checking their download statuses.
... fontface
setloadevent fired whenever a fontface
set loads.
CSS Object Model (CSSOM) - Web APIs
the css object model is a
set of apis allowing the manipulation of css from javascript.
... reference animationevent caretposition css csschar
setrule cssconditionrule csscounterstylerule cssfontfacerule cssfontfeaturevaluesmap cssfontfeaturevaluesrule cssgroupingrule cssimportrule csskeyframerule csskeyframesrule cssmarginrule cssmediarule cssnamespacerule csspagerule cssrule cssrulelist cssstyledeclaration cssstylesheet cssstylerule csssupportsrule cssvariablesmap cssviewportrule elementcssinlinestyle fontface fontface
set fontface
setloadevent geometryutils getstyleutils linkstyle medialist mediaquerylist mediaquerylistevent mediaquerylistlistener screen stylesheet stylesheetlist transitionevent several other interfa...
Using the CSS properties and values API - Web APIs
with an unregisterd property, the browser likewise doesn't know what the value may be until it's calculated, and because of that, it can't
set up a transition from one value to another.
... when registered, though, you've told the browser what type of value it should expect, and because it knows that, it can then
set up the transitions properly.
CanvasGradient.addColorStop() - Web APIs
the canvasgradient.addcolorstop() method adds a new color stop, defined by an off
set and a color, to a given canvas gradient.
... syntax void gradient.addcolorstop(off
set, color); parameters off
set a number between 0 and 1, inclusive, representing the position of the color stop.
CanvasGradient - Web APIs
canvasgradient.addcolorstop() adds a new stop, defined by an off
set and a color, to the gradient.
... if the off
set is not between 0 and 1, inclusive, an index_size_err is raised; if the color can't be parsed as a css <color>, a syntax_err is raised.
CanvasPattern - Web APIs
canvaspattern.
settransform() applies an svgmatrix or dommatrix representing a linear transform to the pattern.
... living standard added
settransform() method in v5.
CanvasRenderingContext2D.addHitRegion() - Web APIs
(if you don't see the full smiley, check the browser compatibility table to see if your current browser supports hit regions already; you might need to activate a preference.) playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"></canvas> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="re
set" type="button" value="re
set" /> </div> <textarea id="code" class="playable-code" style="height:250px"> ctx.beginpath(); ctx.arc(100, 100, 75, 0, 2 * math.pi, false); ctx.linewidth = 5; ctx.stroke(); // eyes ctx.beginpath(); ctx.arc(70, 80, 10, 0, 2 * math.pi, false); ctx.arc(130, 80, 10, 0, 2 * math.pi, false); ctx.fill(); ctx.addhitregion({id: "eyes"}); // mouth ctx.beginpath(); ctx.arc(100, 1...
...10, 50, 0, math.pi, false); ctx.stroke();</textarea> var canvas = document.getelementbyid("canvas"); var ctx = canvas.getcontext("2d"); var textarea = document.getelementbyid("code"); var re
set = document.getelementbyid("re
set"); var edit = document.getelementbyid("edit"); var code = textarea.value; function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } re
set.addeventlistener("click", function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() { textarea.focus(); }); canvas.addeventlistener("mousemove", function(event){ if(event.region) { alert("ouch, my eye :("); } }); textarea.addeventlistener("input", drawcanvas); window.addeventlistener("load", drawcanvas); specifications canvas h...
CanvasRenderingContext2D.arcTo() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const p0 = { x: 230, y: 20 } const p1 = { x: 90, y: 130 } const p2 = { x: 20, y: 20 } const labelpoint = function (p) { const off
set = 15; ctx.filltext('(' + p.x + ',' + p.y + ')', p.x + off
set, p.y + off
set); } ctx.beginpath(); ctx.moveto(p0.x, p0.y); ctx.arcto(p1.x, p1.y, p2.x, p2.y, 50); ctx.lineto(p2.x, p2.y); labelpoint(p0); labelpoint(p1); labelpoint(p2); ctx.stroke(); result result of a large radius if you use a relatively large radius, the arc may appear in a place you didn't expect.
...nt.getelementbyid('radius-output'); const control = document.getelementbyid('radius'); control.oninput = () => { controlout.textcontent = r = control.value; }; const mouse = { x: 0, y: 0 }; let r = 100; // radius const p0 = { x: 0, y: 50 }; const p1 = { x: 100, y: 100 }; const p2 = { x: 150, y: 50 }; const p3 = { x: 200, y: 100 }; const labelpoint = function (p, off
set, i = 0){ const {x, y} = off
set; ctx.beginpath(); ctx.arc(p.x, p.y, 2, 0, math.pi * 2); ctx.fill(); ctx.filltext(`${i}:(${p.x}, ${p.y})`, p.x + x, p.y + y); } const drawpoints = function (points){ for (let i = 0; i < points.length; i++) { var p = points[i]; labelpoint(p, { x: 0, y: -20 } , i) } } // draw arc const drawarc = function ([p0, p1, p2], r) { ctx.begi...
CanvasRenderingContext2D.currentTransform - Web APIs
the canvasrenderingcontext2d.currenttransform property of the canvas 2d api returns or
sets a dommatrix (current specification) or svgmatrix (old specification) object for the current transformation matrix.
... examples manually changing the matrix this example uses the currenttransform property to
set a transformation matrix.
CanvasRenderingContext2D.fillText() - Web APIs
the text is rendered using the
settings specified by font, textalign, textbaseline, and direction.
... with that in hand, we
set the font to 50-pixel-tall "serif" (the user's default serif font), then call filltext() to draw the text "hello world," starting at the coordinates (50, 90).
CanvasRenderingContext2D.imageSmoothingQuality - Web APIs
the imagesmoothingquality property of the canvasrenderingcontext2d interface, part of the canvas api, lets you
set the quality of image smoothing.
... example
setting image smoothing quality this example uses the imagesmoothingquality property with a scaled image.
CanvasRenderingContext2D.scale() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // scaled rectangle ctx.scale(9, 3); ctx.fillstyle = 'red'; ctx.fillrect(10, 10, 8, 20); // re
set current transformation matrix to the identity matrix ctx.
settransform(1, 0, 0, 1, 0, 0); // non-scaled rectangle ctx.fillstyle = 'gray'; ctx.fillrect(10, 10, 8, 20); result the scaled rectangle is red, and the non-scaled rectangle is gray.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.scale(-1, 1); ctx.font = '48px serif'; ctx.filltext('hello world!', -280, 90); ctx.
settransform(1, 0, 0, 1, 0, 0); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.scale' in that specification.
CanvasRenderingContext2D.scrollPathIntoView() - Web APIs
context('2d'); ctx.beginpath(); ctx.fillrect(10, 10, 30, 30); ctx.scrollpathintoview(); edit the code below to see your changes update live in the canvas: playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"> <input id="button" type="range" min="1" max="12"> </canvas> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="re
set" type="button" value="re
set" /> </div> <textarea id="code" class="playable-code"> ctx.beginpath(); ctx.rect(10, 10, 30, 30); ctx.scrollpathintoview();</textarea> var canvas = document.getelementbyid("canvas"); var ctx = canvas.getcontext("2d"); var textarea = document.getelementbyid("code"); var re
set = document.getelementbyid("re
set"); var edit = document.getelementbyid("edit"); var code = tex...
...tarea.value; function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } re
set.addeventlistener("click", function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() { textarea.focus(); }) textarea.addeventlistener("input", drawcanvas); window.addeventlistener("load", drawcanvas); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.scrollpathintoview' in that specification.
ValidityState.rangeUnderflow - Web APIs
the read-only rangeunderflow property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints
set by the element's min attribute.
... if the field is numeric in nature, including the date, month, week, time, datetime-local, number and range types and a min value is
set, if the value don't doesn't conform to the constraints
set by the min value, the rangeunderflow property will be true.
ValidityState.stepMismatch - Web APIs
the read-only stepmismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints
set by the element's step attribute.
... if the field is numeric in nature, including the date, month, week, time, datetime-local, number and range types and the step value is not any, if the value don't doesn't conform to the constraints
set by the step and min values, then stepmismatch will be true.
ValidityState.typeMismatch - Web APIs
the read-only typemismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints
set by the element's type attribute.
... if the type attribute expects specific strings, such as the email and url types and the value don't doesn't conform to the constraints
set by the type, the typemismatch property will be true.
Vibration API - Web APIs
continued vibrations some basic
setinterval and clearinterval action will allow you to create persistent vibration: var vibrateinterval; // starts vibration at passed in level function startvibrate(duration) { navigator.vibrate(duration); } // stops vibration function stopvibrate() { // clear interval and stop persistent vibrating if(vibrateinterval) clearinterval(vibrateinterval); navigator.vibrate(0); } // sta...
...rt persistent vibration at given duration and interval // assumes a number value is given function startpersistentvibrate(duration, interval) { vibrateinterval =
setinterval(function() { startvibrate(duration); }, interval); } of course, the snippet above doesn't take into account the array method of vibration; persistent array-based vibration will require calculating the sum of the array items and creating an interval based on that number (with an additional delay, probably).
VideoTrackList - Web APIs
usage notes in addition to being able to obtain direct access to the video tracks present on a media element, videotracklist lets you
set event handlers on the addtrack and removetrack events, so that you can detect when tracks are added to or removed from the media element's stream.
...to keep it up to date, handlers for the addtrack and removetrack events are
set up.
WEBGL_compressed_texture_pvrtc - Web APIs
availability: pvrtc is typically only available on mobile devices with powervr chip
sets.
... 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 xoff
set and yoff
set parameters must be 0).
WebGL2RenderingContext.copyBufferSubData() - Web APIs
syntax void gl.copybuffersubdata(readtarget, writetarget, readoff
set, writeoff
set, size); parameters readtarget writetarget a glenum specifying the binding point (target) from whose data store should be read or written.
... readoff
set writeoff
set a glintptr specifying the byte off
set from which to start reading from or writing to the buffer.
WebGL2RenderingContext.getActiveUniforms() - Web APIs
gl.uniform_off
set: returns an array of glint indicating the uniform buffer off
sets.
... examples var uniformindices = gl.getuniformindices(program, ['ubored', 'ubogreen', 'uboblue']); var uniformoff
sets = gl.getactiveuniforms(program, uniformindices, gl.uniform_off
set); specifications specification status comment webgl 2.0the definition of 'getactiveuniforms' in that specification.
WebGL2RenderingContext.uniform[1234][uif][v]() - Web APIs
syntax void gl.uniform1ui(location, v0); void gl.uniform2ui(location, v0, v1); void gl.uniform3ui(location, v0, v1, v2); void gl.uniform4ui(location, v0, v1, v2, v3); void gl.uniform1fv(location, data, optional srcoff
set, optional srclength); void gl.uniform2fv(location, data, optional srcoff
set, optional srclength); void gl.uniform3fv(location, data, optional srcoff
set, optional srclength); void gl.uniform4fv(location, data, optional srcoff
set, optional srclength); void gl.uniform1iv(location, data, optional srcoff
set, optional srclength); void gl.uniform2iv(location, data, optional srcoff
set, optional srclength...
...); void gl.uniform3iv(location, data, optional srcoff
set, optional srclength); void gl.uniform4iv(location, data, optional srcoff
set, optional srclength); void gl.uniform1uiv(location, data, optional srcoff
set, optional srclength); void gl.uniform2uiv(location, data, optional srcoff
set, optional srclength); void gl.uniform3uiv(location, data, optional srcoff
set, optional srclength); void gl.uniform4uiv(location, data, optional srcoff
set, optional srclength); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
syntax void gl.uniformmatrix2fv(location, transpose, data, optional srcoff
set, optional srclength); void gl.uniformmatrix3x2fv(location, transpose, data, optional srcoff
set, optional srclength); void gl.uniformmatrix4x2fv(location, transpose, data, optional srcoff
set, optional srclength); void gl.uniformmatrix2x3fv(location, transpose, data, optional srcoff
set, optional srclength); void gl.uniformmatrix3fv(location, transpose, data, optional srcoff
set, optional srclength); void gl.uniformmatrix4x3fv(location, transpose, data...
..., optional srcoff
set, optional srclength); void gl.uniformmatrix2x4fv(location, transpose, data, optional srcoff
set, optional srclength); void gl.uniformmatrix3x4fv(location, transpose, data, optional srcoff
set, optional srclength); void gl.uniformmatrix4fv(location, transpose, data, optional srcoff
set, optional srclength); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
WebGLRenderingContext.blendColor() - Web APIs
the webglrenderingcontext.blendcolor() method of the webgl api is used to
set the source and destination blending factors.
... examples to
set the blend color, use: gl.blendcolor(0, 0.5, 1, 1); to get the blend color, query the blend_color constant which returns a float32array.
WebGLRenderingContext.blendEquation() - Web APIs
the webglrenderingcontext.blendequation() method of the webgl api is used to
set both the rgb blend equation and alpha blend equation to a single equation.
... examples to
set the blend equation, use: gl.blendequation(gl.func_add); gl.blendequation(gl.func_subtract); gl.blendequation(gl.func_reverse_subtract); to get the blend equations, query the blend_equation, blend_equation_rgb and blend_equation_alpha constants which return gl.func_add, gl.func_subtract, gl.func_reverse_subtract, or if the ext_blend_minmax is enabled: ext.min_ext or ext.max_ext.
WebGLRenderingContext.blendEquationSeparate() - Web APIs
the webglrenderingcontext.blendequationseparate() method of the webgl api is used to
set the rgb blend equation and alpha blend equation separately.
... examples to
set the blend equations, use: gl.blendequationseparate(gl.func_add, gl.func_subtract); to get the current blend equations, query the blend_equation, blend_equation_rgb and blend_equation_alpha constants which return gl.func_add, gl.func_subtract, gl.func_reverse_subtract, or if the ext_blend_minmax is enabled: ext.min_ext or ext.max_ext.
hyphens - CSS: Cascading Style Sheets
syntax /* keyword values */ hyphens: none; hyphens: manual; hyphens: auto; /* global values */ hyphens: inherit; hyphens: initial; hyphens: un
set; the hyphens property is specified as a single keyword value chosen from the list below.
... note: the auto
setting's behavior depends on the language being properly tagged to select the appropriate hyphenation rules.
Inheritance - CSS: Cascading Style Sheets
css properties can be categorized in two types: inherited properties, which by default are
set to the computed value of the parent element non-inherited properties, which by default are
set to initial value of the property refer to any css property definition to see whether a specific property inherits by default ("inherited: yes") or not ("inherited: no").
... see also css values for controlling inheritance: inherit, initial, un
set, and revert introducing the css cascade cascade and inheritance css key concepts: css syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values.
inline-size - CSS: Cascading Style Sheets
syntax /* <length> values */ inline-size: 300px; inline-size: 25em; /* <percentage> values */ inline-size: 75%; /* keyword values */ inline-size: max-content; inline-size: min-content; inline-size: fit-content(20em); inline-size: auto; /* global values */ inline-size: inherit; inline-size: initial; inline-size: un
set; if the writing mode is vertically oriented, the value of inline-size relates to the height of the element; otherwise, it relates to the width of the element.
... formal definition initial valueautoapplies tosame as width and heightinheritednopercentagesinline-size of containing blockcomputed valuesame as width and heightanimation typea length, percentage or calc(); formal syntax <'width'> examples
setting inline size in pixels html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; inline-size: 110px; } result specifications specification status comment css logical properties and values level 1the definition of 'inline-size' in that specification.
margin-block-end - CSS: Cascading Style Sheets
syntax /* <length> values */ margin-block-end: 10px; /* an absolute length */ margin-block-end: 1em; /* relative to the text size */ margin-block-end: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-block-end: auto; /* global values */ margin-block-end: inherit; margin-block-end: initial; margin-block-end: un
set; it corresponds to the margin-top, margin-right, margin-bottom, or margin-left property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples
setting block end margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definitio...
margin-block-start - CSS: Cascading Style Sheets
syntax /* <length> values */ margin-block-start: 10px; /* an absolute length */ margin-block-start: 1em; /* relative to the text size */ margin-block-start: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-block-start: auto; /* global values */ margin-block-start: inherit; margin-block-start: initial; margin-block-start: un
set; it corresponds to the margin-top, margin-right, margin-bottom, or margin-left property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples
setting block start margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; margin-block-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the defin...
margin-block - CSS: Cascading Style Sheets
/* <length> values */ margin-block: 10px 20px; /* an absolute length */ margin-block: 1em 2em; /* relative to the text size */ margin-block: 5% 2%; /* relative to the nearest block container's width */ margin-block: 10px; /*
sets both start and end values */ /* keyword values */ margin-block: auto; /* global values */ margin-block: inherit; margin-block: initial; margin-block: un
set; these values corresponds to the margin-top and margin-bottom, or margin-right, and margin-left property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typediscrete formal syntax <'margin-left'>{1,2} examples
setting block start and end margins html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-block: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1t...
margin-inline-end - CSS: Cascading Style Sheets
syntax /* <length> values */ margin-inline-end: 10px; /* an absolute length */ margin-inline-end: 1em; /* relative to the text size */ margin-inline-end: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-inline-end: auto; /* global values */ margin-inline-end: inherit; margin-inline-end: initial; margin-inline-end: un
set; it relates to margin-block-start, margin-block-end, and margin-inline-start, which define the other margins of the element.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples
setting inline end margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; margin-inline-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definit...
margin-inline - CSS: Cascading Style Sheets
/* <length> values */ margin-inline: 10px 20px; /* an absolute length */ margin-inline: 1em 2em; /* relative to the text size */ margin-inline: 5% 2%; /* relative to the nearest block container's width */ margin-inline: 10px; /*
sets both start and end values */ /* keyword values */ margin-inline: auto; /* global values */ margin-inline: inherit; margin-inline: initial; margin-inline: un
set; this property corresponds to the margin-top and margin-bottom, or margin-right, and margin-left properties, depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typediscrete formal syntax <'margin-left'>{1,2} examples
setting inline start and end margins html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-inline: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level ...
margin - CSS: Cascading Style Sheets
the margin css property
sets the margin area on all four sides of an element.
... syntax /* apply to all four sides */ margin: 1em; margin: -3px; /* vertical | horizontal */ margin: 5% auto; /* top | horizontal | bottom */ margin: 1em auto 2em; /* top | right | bottom | left */ margin: 2px 1em 0 auto; /* global values */ margin: inherit; margin: initial; margin: un
set; the margin property may be specified using one, two, three, or four values.
mask-border-repeat - CSS: Cascading Style Sheets
the mask-border-repeat css property
sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border.
... syntax /* keyword value */ mask-border-repeat: stretch; mask-border-repeat: repeat; mask-border-repeat: round; mask-border-repeat: space; /* vertical | horizontal */ mask-border-repeat: round stretch; /* global values */ mask-border-repeat: inherit; mask-border-repeat: initial; mask-border-repeat: un
set; the mask-border-repeat property may be specified using one or two values chosen from the list of values below.
mask-clip - CSS: Cascading Style Sheets
sk-clip: stroke-box; mask-clip: view-box; /* keyword values */ mask-clip: no-clip; /* non-standard keyword values */ -webkit-mask-clip: border; -webkit-mask-clip: padding; -webkit-mask-clip: content; -webkit-mask-clip: text; /* multiple values */ mask-clip: padding-box, no-clip; mask-clip: view-box, fill-box, border-box; /* global values */ mask-clip: inherit; mask-clip: initial; mask-clip: un
set; syntax one or more of the keyword values listed below, separated by commas.
...if a viewbox attribute is specified for the element creating the svg viewport, the reference box is positioned at the origin of the coordinate system established by the viewbox attribute and the dimension of the reference box is
set to the width and height values of the viewbox attribute.
mask-mode - CSS: Cascading Style Sheets
the mask-mode css property
sets whether the mask reference defined by mask-image is treated as a luminance or alpha mask.
... /* keyword values */ mask-mode: alpha; mask-mode: luminance; mask-mode: match-source; /* multiple values */ mask-mode: alpha, match-source; /* global values */ mask-mode: inherit; mask-mode: initial; mask-mode: un
set; syntax the mask-mode property is specified as one or more of the keyword values listed below, separated by commas.
max-inline-size - CSS: Cascading Style Sheets
syntax /* <length> values */ max-inline-size: 300px; max-inline-size: 25em; /* <percentage> values */ max-inline-size: 75%; /* keyword values */ max-inline-size: auto; max-inline-size: max-content; max-inline-size: min-content; max-inline-size: fit-content(20em); /* global values */ max-inline-size: inherit; max-inline-size: initial; max-inline-size: un
set; values the max-inline-size property takes the same values as the max-width and max-height properties.
... formal definition initial value0applies tosame as width and heightinheritednopercentagesinline-size of containing blockcomputed valuesame as max-width and max-heightanimation typea length, percentage or calc(); formal syntax <'max-width'> examples
setting max inline size in pixels html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; block-size: 100%; max-inline-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'max-inline-size' in that specification.
max() - CSS: Cascading Style Sheets
the max() css function lets you
set the largest (most positive) value from a list of comma-separated expressions as the value of a css property value.
... formal syntax max( <calc-sum># )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) examples
setting a minimum size for a font another use case for css functions is allow a font size to grow while ensuring it is at least a mimum size, enabling responsive font sizes while ensuring legibility.
min-block-size - CSS: Cascading Style Sheets
syntax /* <length> values */ min-block-size: 100px; min-block-size: 5em; /* <percentage> values */ min-block-size: 10%; /* keyword values */ min-block-size: max-content; min-block-size: min-content; min-block-size: fit-content(20em); /* global values */ min-block-size: inherit; min-block-size: initial; min-block-size: un
set; if the writing mode is vertically oriented, the value of min-block-size relates to the minimum width of the element; otherwise, it relates to the minimum height of the element.
... formal definition initial value0applies tosame as width and heightinheritednopercentagesblock-size of containing blockcomputed valuesame as min-width and min-heightanimation typea length, percentage or calc(); formal syntax <'min-width'> examples
setting minimum block size for vertical text html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; min-block-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'min-block-size' in that specification.
Proxy servers and tunneling - HTTP
the javascript function contained in the pac file defines the function: the auto-config file should be saved to a file with a .pac filename extension: proxy.pac and the mime type
set to: application/x-ns-proxy-autoconfig the file consists of a function called findproxyforurl.
... the example below will work in an environment where the internal dns server is
set up so that it can only resolve internal host names, and the goal is to use a proxy only for hosts that aren't resolvable: function findproxyforurl(url, host) { if (isresolvable(host)) return "direct"; else return "proxy proxy.mydomain.com:8080"; } see proxy auto-configuration (pac) for more examples.
206 Partial Content - HTTP
if there is only one range, the content-type of the whole response is
set to the type of the document, and a content-range is provided.
... if several ranges are sent back, the content-type is
set to multipart/byteranges and each fragment covers one range, with content-range and content-type describing it.
HTTP
when serving an http request, a server can send a
set-cookie http header with the response.
...the cookie can also be
set to expire on a certain date, or restricted to a specific domain and path.
Equality comparisons and sameness - JavaScript
there are four equality algorithms in es2015: abstract equality comparison (==) strict equality comparison (===): used by array.prototype.indexof, array.prototype.lastindexof, and case-matching samevaluezero: used by %typedarray% and arraybuffer constructors, as well as map and
set operations, and also string.prototype.includes and array.prototype.includes since es2016 samevalue: used in all other places javascript provides three different value-comparison operations: === - strict equality comparison ("strict equality", "identity", "triple equals") == - abstract equality comparison ("loose equality", "double equals") object.is provides samevalue (new in es2015).
... we can see that with double and triple equals, with the exception of doing a type check upfront in 11.9.6.1, the strict equality algorithm is a sub
set of the abstract equality algorithm, because 11.9.6.2–7 correspond to 11.9.3.1.a–f.
Introduction - JavaScript
javascript contains a standard library of objects, such as array, date, and math, and a core
set of language elements such as operators, control structures, and statements.
... javascript documentation versus the ecmascript specification the ecmascript specification is a
set of requirements for implementing ecmascript.
Regular expressions - JavaScript
(this property is
set only if the regular expression uses the g option, described in advanced searching with flags.) 5 source the text of the pattern.
... the change event activated when the user presses enter
sets the value of regexp.input.
Text formatting - JavaScript
it is a
set of "elements" of 16-bit unsigned integer values (utf-16 code units).
... substring, substr return the specified sub
set of the string, either by specifying the start and end indexes or the start index and a length.
JavaScript technologies overview - JavaScript
introduction whereas html defines a webpage's structure and content and css
sets the formatting and appearance, javascript adds interactivity to a webpage and creates rich web applications.
... other notable apis the
settimeout and
setinterval functions were first specified on the window interface in html standard.
constructor - JavaScript
this.name = 'square'; } get area() { return this.height * this.width; }
set area(value) { this.height = value**0.5; this.width = value**0.5; } } another example here the prototype of square class is changed—but the constructor of its base class polygon is still called when a new instance of a square is created.
... class polygon { constructor() { this.name = "polygon"; } } class square extends polygon { constructor() { super(); } } class rectangle {} object.
setprototypeof(square.prototype, rectangle.prototype); console.log(object.getprototypeof(square.prototype) === polygon.prototype); //false console.log(object.getprototypeof(square.prototype) === rectangle.prototype); //true let newinstance = new square(); console.log(newinstance.name); //polygon specifications specification ecmascript (ecma-262)the definition of 'constructor method' in that specification.
Warning: -file- is being assigned a //# sourceMappingURL, but already has one - JavaScript
there are two ways to assign a source map, either by using a comment or by
setting a header to the javascript file.
... examples
setting source maps
setting a source map by using a comment in the file: //# sourcemappingurl=http://example.com/path/to/your/sourcemap.map or, alternatively, you can
set a header to your javascript file: x-sourcemap: /path/to/file.js.map ...
TypeError: More arguments needed - JavaScript
message typeerror: argument is not an object and is not null (edge) typeerror: object.create requires at least 1 argument, but only 0 were passed typeerror: object.
setprototypeof requires at least 2 arguments, but only 0 were passed typeerror: object.defineproperties requires at least 1 argument, but only 0 were passed error type typeerror.
... examples required arguments not provided the object.create() method requires at least one argument and the object.
setprototypeof() method requires at least two arguments: var obj = object.create(); // typeerror: object.create requires at least 1 argument, but only 0 were passed var obj = object.
setprototypeof({}); // typeerror: object.
setprototypeof requires at least 2 arguments, but only 1 were passed you can fix this by
setting null as the prototype, for example: var obj = object.create(null); var obj = object.
setprototypeof({}, null); ...
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… ) {}, }; d...
...escription the shorthand syntax is similar to the getter and
setter syntax introduced in ecmascript 2015.
Array() constructor - JavaScript
arraylength if the only argument passed to the array constructor is an integer between 0 and 232-1 (inclusive), this returns a new javascript array with its length property
set to that number (note: this implies an array of arraylength empty slots, not slots with actual undefined values).
...an array with its length property
set to that number and the array elements are empty slots.
Array.prototype.reduceRight() - JavaScript
is [4, 5, 2, 3, 0, 1] run a list of asynchronous functions with callbacks in series each passing their results to the next const waterfall = (...functions) => (callback, ...args) => functions.reduceright( (composition, fn) => (...results) => fn(composition, ...results), callback )(...args); const randint = max => math.floor(math.random() * max) const add5 = (callback, x) => {
settimeout(callback, randint(1000), x + 5); }; const mult3 = (callback, x) => {
settimeout(callback, randint(1000), x * 3); }; const sub2 = (callback, x) => {
settimeout(callback, randint(1000), x - 2); }; const split = (callback, x) => {
settimeout(callback, randint(1000), x, x); }; const add = (callback, x, y) => {
settimeout(callback, randint(1000), x + y); }; const div4 = (callback, x) =>...
... {
settimeout(callback, randint(1000), x / 4); }; const computation = waterfall(add5, mult3, sub2, split, add, div4); computation(console.log, 5) // -> 14 // same as: const computation2 = (input, callback) => { const f6 = x=> div4(callback, x); const f5 = (x, y) => add(f6, x, y); const f4 = x => split(f5, x); const f3 = x => sub2(f4, x); const f2 = x => mult3(f3, x); add5(f2, input); } difference between reduce and reduceright var a = ['1', '2', '3', '4', '5']; var left = a.reduce(function(prev, cur) { return prev + cur; }); var right = a.reduceright(function(prev, cur) { return prev + cur; }); console.log(left); // "12345" console.log(right); // "54321" defining composible function the concept of compose function is simple it combines n function...
Array.prototype.every() - JavaScript
the range of elements processed by every is
set before the first invocation of callback.
...(it is vacuously true that all elements of the empty
set satisfy any given condition.) polyfill every was added to the ecma-262 standard in the 5th edition, and it may not be present in other implementations of the standard.
Web API reference - Web technology reference
device apis this
set of apis allows access to various hardware features available to web pages and applications.
... data management apis user data can be stored and managed using this
set of apis.
clip-path - SVG: Scalable Vector Graphics
this is the same as having a custom clipping path with a clippathunits
set to objectboundingbox --> <rect x="11" y="1" width="8" height="8" stroke="green" clip-path="circle() fill-box" /> <!-- bottom-left --> <rect x="1" y="11" width="8" height="8" stroke="green" clip-path="circle() stroke-box" /> <!-- bottom-right: apply a css basic shape on a view-box geometry.
... this is the same as having a custom clipping path with a clippathunits
set to userspaceonuse --> <rect x="11" y="11" width="8" height="8" stroke="green" clip-path="circle() view-box" /> </svg> usage notes value <url> | [ <basic-shape> || <geometry-box> ] | none default value none animatable yes <geometry-box> an extra information to tell how a <basic-shape> is applied to an element: fill-box indicates to use the object bounding box; stroke-box indicates to use the object bounding box extended with the stroke; view-box indicates to use the nearest svg viewport as the reference box.
color-interpolation-filters - SVG: Scalable Vector Graphics
therefore, it has no effect on filter primitives like <feoff
set>, <feimage>, <fetile> or <feflood>.
... as a presentation attribute, it can be applied to any element but it only has an effect on the following eighteen elements: <fespotlight>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoff
set>, <fespecularlighting>, <fetile>, <feturbulence> usage notes value auto | srgb | linearrgb default value linearrgb animatable yes auto indicates that the user agent can choose either the srgb or linearrgb spaces for color interpolation.
data-* - SVG: Scalable Vector Graphics
their custom data are available via the svgelement interface of the element the attributes belong to, with the svgelement.data
set property.
... the svgelement.data
set property is a domstringmap that provides the attribute data-test-value via svgelement.data
set.testvalue.
dur - SVG: Scalable Vector Graphics
five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <
set> html, body, svg { height: 100%; } <svg viewbox="0 0 220 150" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="indefinite"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="3s" repeatcount="indefinite"/> </rect> </svg> usage notes value <clock-value> | media | indefinite default value indefinite animatable no <clock-value> this value speci...
... note: the interpolation will not work if the simple duration is indefinite (although this may still be useful for <
set> elements).
exponent - SVG: Scalable Vector Graphics
four elements are using this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient" gradientunits="userspaceonuse" x1="0" y1="0" x2="200" y2="0"> <stop off
set="0" stop-color="#ff0000" /> <stop off
set="0.5" stop-color="#00ff00" /> <stop off
set="1" stop-color="#0000ff" /> </lineargradient> </defs> <filter id="componenttransfer1" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="gamma" exponent="1"/> <fefuncg type="gamma" exponent="1"/> <fefuncb type="gamma" exponent="1"/> </fecomponenttransfer...
...00" fill="url(#gradient)" style="filter: url(#componenttransfer1);" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 1 animatable yes <number> if the type attribute of the component element is
set to gamma, this value specifies the exponent of the gamma function specifications specification status comment filter effects module level 1the definition of 'exponent' in that specification.
fr - SVG: Scalable Vector Graphics
only one element is using this attribute: <radialgradient> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient1" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop off
set="0%" stop-color="white"/> <stop off
set="100%" stop-color="darkseagreen"/> </radialgradient> <radialgradient id="gradient2" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="25%"> <stop off
set="0%" stop-color="white"/> <stop off
set="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r="100" f...
...ill="url(#gradient2)" style="transform: translatex(240px);" /> </svg> usage notes value <length> default value 0 animatable none example <svg viewbox="0 0 120 120" width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop off
set="0%" stop-color="red"/> <stop off
set="100%" stop-color="blue"/> </radialgradient> </defs> <rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#gradient)" stroke="black" stroke-width="2"/> <circle cx="60" cy="60" r="50" fill="transparent" stroke="white" stroke-width="2"/> <circle cx="35" cy="35" r="2" fill="white" stroke="white"/> <circle cx="60" cy="60" r...
fx - SVG: Scalable Vector Graphics
only one element is using this attribute: <radialgradient> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient1" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop off
set="0%" stop-color="white"/> <stop off
set="100%" stop-color="darkseagreen"/> </radialgradient> <radialgradient id="gradient2" cx="0.5" cy="0.5" r="0.5" fx="0.75" fy="0.35" fr="5%"> <stop off
set="0%" stop-color="white"/> <stop off
set="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r...
... animatable none example <svg viewbox="0 0 120 120" width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop off
set="0%" stop-color="red"/> <stop off
set="100%" stop-color="blue"/> </radialgradient> </defs> <rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#gradient)" stroke="black" stroke-width="2"/> <circle cx="60" cy="60" r="50" fill="transparent" stroke="white" stroke-width="2"/> <circle cx="35" cy="35" r="2" fill="white" stroke="white"/> <circle cx="60" cy="...
fy - SVG: Scalable Vector Graphics
only one element is using this attribute: <radialgradient> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient1" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop off
set="0%" stop-color="white"/> <stop off
set="100%" stop-color="darkseagreen"/> </radialgradient> <radialgradient id="gradient2" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.75" fr="5%"> <stop off
set="0%" stop-color="white"/> <stop off
set="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r...
... animatable none example <svg viewbox="0 0 120 120" width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop off
set="0%" stop-color="red"/> <stop off
set="100%" stop-color="blue"/> </radialgradient> </defs> <rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#gradient)" stroke="black" stroke-width="2"/> <circle cx="60" cy="60" r="50" fill="transparent" stroke="white" stroke-width="2"/> <circle cx="35" cy="35" r="2" fill="white" stroke="white"/> <circle cx="60" cy="...
gradientTransform - SVG: Scalable Vector Graphics
two elements are using this attribute: <lineargradient> and <radialgradient> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <radialgradient id="gradient1" gradientunits="userspaceonuse" cx="100" cy="100" r="100" fx="100" fy="100"> <stop off
set="0%" stop-color="darkblue" /> <stop off
set="50%" stop-color="skyblue" /> <stop off
set="100%" stop-color="darkblue" /> </radialgradient> <radialgradient id="gradient2" gradientunits="userspaceonuse" cx="100" cy="100" r="100" fx="100" fy="100" gradienttransform="skewx(20) translate(-35, 0)"> <stop off
set="0%" stop-color="darkblue" /> <stop off
set="50%" stop-color="sk...
...yblue" /> <stop off
set="100%" stop-color="darkblue" /> </radialgradient> <rect x="0" y="0" width="200" height="200" fill="url(#gradient1)" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient2)" style="transform: translatex(220px);" /> </svg> usage notes default value identity transform value <transform-list> animatable yes <transform-list> a list of transformation functions specifying some additional transformation from the gradient coordinate system onto the target coordinate system.
height - SVG: Scalable Vector Graphics
twenty five elements are using this attribute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoff
set>, <fespecularlighting>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <image>, <mask>, <pattern>, <rect>, <svg>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <!-- with a height of 0 or less, nothing will be rendered --> <rect y="0" x="0" width="90" height="0"/> <rect y="0" x="100" width="90" height="60"/> <rect y="0" x="200" width="90" height="100%"/> </svg> ...
... value <length> | <percentage> default value 100% animatable yes feoff
set for <feoff
set>, height defines the vertical length for the rendering area of the primitive.
intercept - SVG: Scalable Vector Graphics
the intercept attribute defines the intercept of the linear function of color component transfers when the type attribute is
set to linear.
... four elements are using this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient" gradientunits="userspaceonuse" x1="0" y1="0" x2="200" y2="0"> <stop off
set="0" stop-color="#ff0000" /> <stop off
set="0.5" stop-color="#00ff00" /> <stop off
set="1" stop-color="#0000ff" /> </lineargradient> </defs> <filter id="componenttransfer1" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="linear" intercept="0"/> <fefuncg type="linear" intercept="0"/> <fefuncb type="linear" intercept="0"/> </fecomponenttransfer> </filter> <filter id="componenttransfer2" x="0" y="0" w...
opacity - SVG: Scalable Vector Graphics
circle>, <ellipse>, <foreignobject>, <g>, <iframe>, <image>, <line>, <marker>, <path>, <polygon>, <polyline>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, <use>, <unknown>, and <video> html, body, svg { height: 100%; } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient" x1="0%" y1="0%" x2="0" y2="100%"> <stop off
set="0%" style="stop-color:skyblue;" /> <stop off
set="100%" style="stop-color:seagreen;" /> </lineargradient> </defs> <rect x="0" y="0" width="100%" height="100%" fill="url(#gradient)" /> <circle cx="50" cy="50" r="40" fill="black" /> <circle cx="150" cy="50" r="40" fill="black" opacity="0.3" /> </svg> usage notes default value 1 value <alpha-value> ...
... animatable yes <alpha-value> the uniform opacity
setting to be applied across an entire object, as a <number>.
viewBox - SVG: Scalable Vector Graphics
{ display: inline-block; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- with relative unit such as percentage, the visual size of the square looks unchanged regardless of the viewbox --> <rect x="0" y="0" width="100%" height="100%"/> <!-- with a large viewbox the circle looks small as it is using user units for the r attribute: 4 resolved against 100 as
set in the viewbox --> <circle cx="50%" cy="50%" r="4" fill="white"/> </svg> <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <!-- with relative unit such as percentage, the visual size of the square looks unchanged regardless of the viewbox` --> <rect x="0" y="0" width="100%" height="100%"/> <!-- with a small viewbox the circle looks large as it is using user units ...
...for the r attribute: 4 resolved against 10 as
set in the viewbox --> <circle cx="50%" cy="50%" r="4" fill="white"/> </svg> <svg viewbox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"> <!-- the point of coordinate 0,0 is now in the center of the viewport, and 100% is still resolve to a width or height of 10 user units so the rectangle looks shifted to the bottom/right corner of the viewport --> <rect x="0" y="0" width="100%" height="100%"/> <!-- with the point of coordinate 0,0 in the center of the viewport the value 50% is resolve to 5 which means the center of the circle is in the bottom/right corner of the viewport.
visibility - SVG: Scalable Vector Graphics
note: if the visibility attribute is
set to hidden on a text element, then the text is invisible but still takes up space in text layout calculations.
... depending on the value of attribute pointer-events, graphics elements which have their visibility attribute
set to hidden still might receive events.
width - SVG: Scalable Vector Graphics
twenty five elements are using this attribute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoff
set>, <fespecularlighting>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <image>, <mask>, <pattern>, <rect>, <svg>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <!-- with a width of 0 or less, nothing will be rendered --> <rect x="0" y="0" width="0" height="90"/> <rect x="0" y="100" width="60" height="90"/> <rect x="0" y="200" width="100%" height="90"/> </svg> ...
... value <length> | <percentage> default value 100% animatable yes feoff
set for <feoff
set>, width defines the horizontal length for the rendering area of the primitive.
x - SVG: Scalable Vector Graphics
thirty seven elements are using this attribute: <altglyph>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fefunca>, <fefuncb>, <fefuncg>, <fefuncr>, <fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorphology>, <feoff
set>, <fepointlight>, <fespecularlighting>, <fespotlight>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <glyphref>, <image>, <mask>, <pattern>, <rect>, <svg>, <text>, <tref>, <tspan>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <rect x="20" y="20" width="60" height="60" /> <rect x="120" y="20" width="60" height="60" /> <re...
... value <length> | <percentage> default value 0% animatable yes feoff
set for <feoff
set>, x defines the minimum x coordinate for the rendering area of the primitive.
xlink:show - SVG: Scalable Vector Graphics
this is similar to the effect achieved by an html <a> element with target
set to _blank.
...this is similar to the effect achieved by an html <a> element with target
set to _self.
y - SVG: Scalable Vector Graphics
thirty seven elements are using this attribute: <altglyph>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fefunca>, <fefuncb>, <fefuncg>, <fefuncr>, <fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorphology>, <feoff
set>, <fepointlight>, <fespecularlighting>, <fespotlight>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <glyphref>, <image>, <mask>, <pattern>, <rect>, <svg>, <text>, <tref>, <tspan>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <rect y="20" x="20" width="60" height="60" /> <rect y="120" x="20" width="60" height="60" /> <re...
... value <length> | <percentage> default value 0% animatable yes feoff
set for <feoff
set>, y defines the minimum y coordinate for the rendering area of the primitive.
y1 - SVG: Scalable Vector Graphics
--> <lineargradient y1="0%" id="g0"> <stop off
set="5%" stop-color="black" /> <stop off
set="50%" stop-color="red" /> <stop off
set="95%" stop-color="black" /> </lineargradient> <rect x="1" y="1" width="8" height="8" fill="url(#g0)" /> <!-- here the gradient vector start at the bottom left corner of the bounding box of the shape it is applied to.
... --> <lineargradient y1="100%" id="g1"> <stop off
set="5%" stop-color="black" /> <stop off
set="50%" stop-color="red" /> <stop off
set="95%" stop-color="black" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'y1' in that specification.
y2 - SVG: Scalable Vector Graphics
--> <lineargradient y2="0%" id="g0"> <stop off
set="5%" stop-color="black" /> <stop off
set="50%" stop-color="red" /> <stop off
set="95%" stop-color="black" /> </lineargradient> <rect x="1" y="1" width="8" height="8" fill="url(#g0)" /> <!-- here the gradient vector end at the bottom right corner of the bounding box of the shape it is applied to.
... --> <lineargradient y2="100%" id="g1"> <stop off
set="5%" stop-color="black" /> <stop off
set="50%" stop-color="red" /> <stop off
set="95%" stop-color="black" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'y2' in that specification.
<a> - SVG: Scalable Vector Graphics
otably: requiredextensions, systemlanguage event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect,...
... aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face...
<altGlyph> - SVG: Scalable Vector Graphics
if the reference is to an <altglyphdef> element, then if an appropriate
set of alternate glyphs is located from processing the <altglyphdef> element, then those alternate glyphs are rendered instead of the character(s) that are inside of the <altglyph> element.
...ensions, systemlanguage event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility xlink attributes xlink:href, xlink:type, xlink:role, xlink:arcrole, xlink:title, xlink:show, xlink:actuate dom interface this element implements the svgaltglyphelement interface.
<circle> - SVG: Scalable Vector Graphics
ional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<circle>' in that spe...
<defs> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- some graphical objects to use --> <defs> <circle id="mycircle" cx="0" cy="0" r="5" /> <lineargradient id="mygradient" gradienttransform="rotate(90)"> <stop off
set="20%" stop-color="gold" /> <stop off
set="90%" stop-color="red" /> </lineargradient> </defs> <!-- using my graphical objects --> <use x="5" y="5" xlink:href="#mycircle" fill="url('#mygradient')" /> </svg> attributes global attributes core attributes most notably: id lang styling attributes class, style event attributes global event attributes, document element event ...
...attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch...
<ellipse> - SVG: Scalable Vector Graphics
ional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<ellipse>' in that sp...
<feGaussianBlur> - SVG: Scalable Vector Graphics
usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <
set> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes in stddeviation edgemode dom interface this element implements the svgfegaussianblurelement interface.
...ircle cx="60" cy="60" r="50" fill="green" /> <circle cx="170" cy="60" r="50" fill="green" filter="url(#blurme)" /> </svg> result screenshotlive sample drop shadow example svg <svg width="120" height="120" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <filter id="dropshadow"> <fegaussianblur in="sourcealpha" stddeviation="3" /> <feoff
set dx="2" dy="4" /> <femerge> <femergenode /> <femergenode in="sourcegraphic" /> </femerge> </filter> <circle cx="60" cy="60" r="50" fill="green" filter="url(#dropshadow)" /> </svg> result screenshotlive sample specifications specification status comment filter effects module level 1the definition of '<fegaussianblur>' in that s...
<foreignObject> - SVG: Scalable Vector Graphics
systemlanguage event attributes global event attributes, graphical event attributes, document event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<foreignobject>' in that specification.
<g> - SVG: Scalable Vector Graphics
ional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <imag...
<line> - SVG: Scalable Vector Graphics
ional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<line>' in that speci...
<linearGradient> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <lineargradient id="mygradient" gradienttransform="rotate(90)"> <stop off
set="5%" stop-color="gold" /> <stop off
set="95%" stop-color="red" /> </lineargradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg> attributes gradientunits this attribute defines the coordinate system for attributes x1, x2, y1, y2 value type: userspaceonuse|objectboundingbox ; default value: objectboundingbox; an...
... core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:descriptive elements<animate>, <animatetransform>, <
set>, <stop> specifications specification status comment ...
<marker> - SVG: Scalable Vector Graphics
s most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>...
<path> - SVG: Scalable Vector Graphics
ional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment svg pathsthe definition of '<path>' in that specification.
<pattern> - SVG: Scalable Vector Graphics
value type: <url>; default value: none; animatable: yes note: for browsers implementing href, if both href and xlink:href are
set, xlink:href will be ignored and only href will be used.
...s most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <col...
<polyline> - SVG: Scalable Vector Graphics
ional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polyline>' in that s...
<radialGradient> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <radialgradient id="mygradient"> <stop off
set="10%" stop-color="gold" /> <stop off
set="95%" stop-color="red" /> </radialgradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg> attributes cx this attribute defines the x coordinate of the end circle of the radial gradient.
... core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:descriptive elements<animate>, <animatetransform>, <
set>, <stop> specifications specification status comment ...
<rect> - SVG: Scalable Vector Graphics
ional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<rect>' in that speci...
<stop> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <lineargradient id="mygradient" gradienttransform="rotate(90)"> <stop off
set="5%" stop-color="gold" /> <stop off
set="95%" stop-color="red" /> </lineargradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg> attributes off
set this attribute defines where the gradient stop is placed along the gradient vector.
... global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: color, display, stop-color, stop-opacity, visibility usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:<animate>, <animatecolor>, <
set> specifications specification status comment scalable vector graphics (svg) 2the definition of '<stop>' in that specification.
<svg> - SVG: Scalable Vector Graphics
systemlanguage event attributes global event attributes, graphical event attributes, document event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <imag...
<switch> - SVG: Scalable Vector Graphics
in particular,
setting display:none on a child has no effect on the true/false testing for <switch> processing.
... svg <switch> example this example demonstrates showing different text content depending on the browser's language
settings.
<symbol> - SVG: Scalable Vector Graphics
ably: id styling attributes class, style event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowt...
...o, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <imag...
<tspan> - SVG: Scalable Vector Graphics
tributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoff
set, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expande...
...d, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posin
set, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-
setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <
set>, <tref>, <tspan> specifications specification status comment ...
SVG animation with SMIL - SVG: Scalable Vector Graphics
you can
set the attribute to define whether the object rotates following the tangent of the path.
...by
setting the value of the repeatcount attribute to indefinite, we indicate that the animation should loop forever, as long as the svg image exists.