Search completed in 0.95 seconds.
offset-anchor - CSS: Cascading Style Sheets
the
offset-anchor css property specifies the point inside the box of an element travelling along an
offset-path that is actually moving along the path. ...
... the
offset-anchor css property specifies the point inside the box of an element travelling along an
offset-path that is actually moving along the path. ...
... the
offset-anchor css property specifies the point inside the box of an element travelling along an
offset-path that is actually moving along the path. ...
...And 17 more matches
offset - CSS: Cascading Style Sheets
the
offset css shorthand property sets all the properties required for animating an element along a defined path. note: early versions of the spec called this property motion. ...
... the
offset css shorthand property sets all the properties required for animating an element along a defined path. note: early versions of the spec called this property motion. ...
... the
offset css shorthand property sets all the properties required for animating an element along a defined path. note: early versions of the spec called this property motion. ...
...And 17 more matches
offset-path - CSS: Cascading Style Sheets
the
offset-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. ...
... the
offset-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. ...
... the
offset-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. ...
...And 13 more matches
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
the xrreferencespace interface's get
offsetreferencespace() 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 get
offsetreferencespace() 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 get
offsetreferencespace(), 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 get
offsetreferencespace(). ...
... 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 get
offsetreferencespace(), 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 get
offsetreferencespace(). then, when drawing the scene, you can use the
offset reference space to not only position objects relative to one another, but to apply the needed transforms to render objects properly based upon the viewer's position. ...
...these values are added to the position and orientation of the current reference space and then the result is used as the position and orientation of the newly created xrreferencespace. ...
...And 8 more matches
offset-rotate - CSS: Cascading Style Sheets
this is the default value. <angle> the element has a constant clockwise rotation transformation applied to it by the specified rotation angle. ...
...this is the default value. <angle> the element has a constant clockwise rotation transformation applied to it by the specified rotation angle. ...
...this is the default value. <angle> the element has a constant clockwise rotation transformation applied to it by the specified rotation angle. ...
...And 6 more matches
offset-position - CSS: Cascading Style Sheets
the
offset-position css property defines the initial position of the
offset-path. syntax /* keyword values */
offset-position: auto;
offset-position: top;
offset-position: bottom;
offset-position: left;
offset-position: right;
offset-position: center; /* <percentage> values */
offset-position: 25% 75%; /* <length> values */
offset-position: 0 0;
offset-position: 1cm 2cm;
offset-position: 10ch 8em; /* edge
offsets values */
offset-position: bottom 10px right 20px;
offset-position: right 3em bottom 10px;
offset-position: bottom 10px right;
offset-position: top right 10px; /* global values */
offset-position: inherit;
offset-position: initial;
offset-position: unset; values auto the initial position is the position of the box specified by the position property. <position> a...
...an x/y coordinate, to place an item relative to the edges of an element's box. it can be defined using one to four values. if two non-keyword values are used, the first value represents the horizontal position and the second represents the vertical position. if only one value is specified, the second value is assumed to be center. if three or four values are used, the length-percentage values are
offsets for the preceding keyword value(s). for more explanation of these value types, see background-position. formal definition initial valueautoapplies totransformable elementsinheritednopercentagesrefertosizeofcontainingblockcomputed valuefor <length> the absolute value, otherwise a percentageanimation typea position formal syntax auto | <position>where <position> = [ [ left | center | right ] ...
...eanimation typea position formal syntax auto | <position>where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? ...
...And 5 more matches
HTMLElement.offsetTop - Web APIs
working draft browser compatibility the compatibility table on this page is generated from structured data. ...
... working draft browser compatibility the compatibility table on this page is generated from structured data. ...
... working draft browser compatibility the compatibility table on this page is generated from structured data. ...
...And 4 more matches
Window.pageYOffset - Web APIs
the read-only window property pagey
offset 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 pagey
offset 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 pagex
offset property, which returns the number of pixels scrolled along the horizontal axis (left and right), is an alias for scrollx. ...
...this number is subpixel precise, so it may not be an integer. ...
...this number is subpixel precise, so it may not be an integer. ...
...And 4 more matches
Date.prototype.getTimezoneOffset() - JavaScript
the gettimezone
offset() method returns the time zone difference, in minutes, from current locale (host system settings) to utc. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dateobj.gettimezone
offset() return value a number representing the time-zone
offset, in minutes, from the date based on current host system settings to utc. description the time-zone
offset is the difference, in minutes, from local time to utc. note that this means that the
offset is positive if the local timezone is behind utc, and negative if it is ahead. for example, for time zone utc+10:00 (australian eastern standard time, vlad...
...tes, from local time to utc. note that this means that the
offset is positive if the local timezone is behind utc, and negative if it is ahead. for example, for time zone utc+10:00 (australian eastern standard time, vladivostok time, chamorro standard time), -600 will be returned. current locale utc-8 utc utc+3 return value 480 0 -180 the time zone
offset returned is the one that applies for the date that it's called on. if the host system is configured for daylight saving, the
offset will change depending on the date and time that the date represents and that daylight saving applies. ...
...be returned. current locale utc-8 utc utc+3 return value 480 0 -180 the time zone
offset returned is the one that applies for the date that it's called on. if the host system is configured for daylight saving, the
offset will change depending on the date and time that the date represents and that daylight saving applies. ...
...And 4 more matches
stroke-dashoffset - SVG: Scalable Vector Graphics
the stroke-dash
offset attribute is a presentation attribute defining an
offset on the rendering of the associated dash array. note: as a presentation attribute stroke-dash
offset can be used as a css property. ...
...an be applied to any element but it has effect only on the following twelve elements: <altglyph>, <circle>, <ellipse>, <path>, <line>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="-3 0 33 10" xmlns="http://www.w3.org/2000/svg"> <!-- no dash array --> <line x1="0" y1="1" x2="30" y2="1" stroke="black" /> <!-- no dash
offset --> <line x1="0" y1="3" x2="30" y2="3" stroke="black" stroke-dasharray="3 1" /> <!-- the start of the dash array computation is pulled by 3 user units --> <line x1="0" y1="5" x2="30" y2="5" stroke="black" stroke-dasharray="3 1" stroke-dash
offset="3" /> <!-- the start of the dash array computation is pushed by 3 user units --> <line x1="0" y1="7" x...
...ay="3 1" /> <!-- the start of the dash array computation is pulled by 3 user units --> <line x1="0" y1="5" x2="30" y2="5" stroke="black" stroke-dasharray="3 1" stroke-dash
offset="3" /> <!-- the start of the dash array computation is pushed by 3 user units --> <line x1="0" y1="7" x2="30" y2="7" stroke="black" stroke-dasharray="3 1" stroke-dash
offset="-3" /> <!-- the start of the dash array computation is pulled by 1 user units which ends up in the same rendering as the previous example --> <line x1="0" y1="9" x2="30" y2="9" stroke="black" stroke-dasharray="3 1" stroke-dash
offset="1" /> <!-- the following red lines highlight the
offset of the dash array for each line --> <path d="m0,5 h-3 m0,7 h3 m0,9...
...And 4 more matches
HTMLElement.offsetWidth - Web APIs
this property will round the value to an integer. ...
... this property will round the value to an integer. ...
... this property will round the value to an integer. if you need a fractional value, use element.getboundingclientrect(). ...
...And 3 more matches
outline-offset - CSS: Cascading Style Sheets
a negative value places the outline inside the element. a value of 0 places the outline so that there is no space between it and the element. ...
...a negative value places the outline inside the element. a value of 0 places the outline so that there is no space between it and the element. ...
...a negative value places the outline inside the element. a value of 0 places the outline so that there is no space between it and the element. ...
...And 3 more matches
AbstractRange.endOffset - Web APIs
editor's draft initial definition. ...
... editor's draft initial definition. ...
... editor's draft initial definition. ...
...And 2 more matches
HTMLElement.offsetLeft - Web APIs
the htmlelement.
offsetleft read-only property returns the number of pixels that the upper left corner of the current element is
offset to the left within the htmlelement.
offsetparent node. for block-level elements,
offsettop,
offsetleft,
offsetwidth, and
offsetheight describe the border box of an element relative to the
offsetparent. however, for inline-level elements (such as span) that can wrap from one line to the next,
offsettop and
offsetleft describe the positions of the first border box (use element.getclientrects() to get its width and height), while
offsetwidth and
offsetheight describe the dimensions of the bounding border box (use element.getboundingclientrect() to get its position). ...
... elements (such as span) that can wrap from one line to the next,
offsettop and
offsetleft describe the positions of the first border box (use element.getclientrects() to get its width and height), while
offsetwidth and
offsetheight describe the dimensions of the bounding border box (use element.getboundingclientrect() to get its position). therefore, a box with the left, top, width and height of
offsetleft,
offsettop,
offsetwidth and
offsetheight will not be a bounding box for a span with wrapped text. syntax left = element.
offsetleft; left is an integer representing the
offset to the left in pixels from the closest relatively positioned parent element. ...
... <div style="width: 300px; border-color:blue; border-style:solid; border-width:1;"> <span>short span. ...
...And 2 more matches
SourceBuffer.timestampOffset - Web APIs
exceptions the following exceptions may be thrown when setting a new value for this property. exception explanation invalidstateerror one or more of the sourcebuffer objects in mediasource.sourcebuffers are being updated (i.e. ...
... exceptions the following exceptions may be thrown when setting a new value for this property. exception explanation invalidstateerror one or more of the sourcebuffer objects in mediasource.sourcebuffers are being updated (i.e. ...
... exceptions the following exceptions may be thrown when setting a new value for this property. exception explanation invalidstateerror one or more of the sourcebuffer objects in mediasource.sourcebuffers are being updated (i.e. ...
...And 2 more matches
StaticRange.endOffset - Web APIs
editor's draft initial definition. ...
... editor's draft initial definition. ...
... editor's draft initial definition. ...
...And 2 more matches
text-underline-offset - CSS: Cascading Style Sheets
the text-underline-
offset css property sets the
offset distance of an underline text decoration line (applied using text-decoration) from its original position. text-underline-
offset is not part of the text-decoration shorthand. while an element can have multiple text-decoration lines, text-underline-
offset only impacts underlining, and not other possible line decoration options such as overline or line-through. syntax /* single keyword */ text-underline-
offset: auto; /* length */ text-underline-
offset: 0.1em; text-underline-
offset: 3px; /* percentage */ text-underline-
offset: 20%; /* global values */ text-underline-
offset: inherit; text-underline-
offset: initial; text-underline-
offset: unset; the text-underline-
offset property is specified as a single value from the list below. values...
...-underline-
offset: auto; /* length */ text-underline-
offset: 0.1em; text-underline-
offset: 3px; /* percentage */ text-underline-
offset: 20%; /* global values */ text-underline-
offset: inherit; text-underline-
offset: initial; text-underline-
offset: unset; the text-underline-
offset property is specified as a single value from the list below. values auto the browser chooses the appropriate
offset for underlines. <length> specifies the
offset of underlines as a <length>, overriding the font file suggestion and the browser default. it is recommended to use em units so the
offset scales with the font size. <percentage> specifies the
offset of underlines as a <percentage> of 1 em in the element's font. a percentage inherits as a relative value, and so therefore scales with changes in the ...
... formal definition initial valueautoapplies toall elements. ...
...And 2 more matches
CanvasRenderingContext2D.lineDashOffset - Web APIs
the canvasrenderingcontext2d.linedash
offset property of the canvas 2d api sets the line dash
offset, or "phase." note: lines are drawn by calling the stroke() method. syntax ctx.linedash
offset = value; value a float specifying the amount of the line dash
offset. the default value is 0.0. examples
offsetting a line dash this example draws two dashed lines. the first has no dash
offset. the second has a dash
offset of 4. ...
...specifying the amount of the line dash
offset. the default value is 0.0. examples
offsetting a line dash this example draws two dashed lines. the first has no dash
offset. the second has a dash
offset of 4. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.setlinedash([4, 16]); // dashed line with no
offset ctx.beginpath(); ctx.moveto(0, 50); ctx.lineto(300, 50); ctx.stroke(); // dashed line with
offset of 4 ctx.beginpath(); ctx.strokestyle = 'red'; ctx.linedash
offset = 4; ctx.moveto(0, 100); ctx.lineto(300, 100); ctx.stroke(); result the line with a dash
offset is drawn in red. marching ants the marching ants effect is an animation technique often found in selection tools of computer graphi...
...h a dash
offset is drawn in red. marching ants the marching ants effect is an animation technique often found in selection tools of computer graphics programs. it helps the user to distinguish the selection border from the image background by animating the border. ...
...on tools of computer graphics programs. it helps the user to distinguish the selection border from the image background by animating the border. html <canvas id="canvas"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let
offset = 0; function draw() { ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.setlinedash([4, 2]); ctx.linedash
offset = -
offset; ctx.strokerect(10, 10, 100, 100); } function march() {
offset++; if (
offset > 16) {
offset = 0; } draw(); settimeout(march, 20); } march(); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.linedash
offset' in that specification. living standard ...
ConstantSourceNode.offset - Web APIs
the read-only
offset property of the constantsourcenode interface returns a audioparam object indicating the numeric a-rate value which is always returned by the source when asked for the next sample. while the audioparam named
offset is read-only, the value property within is not. so you can change the value of
offset by setting the value of constantsourcenode.
offset.value: myconstantsourcenode.
offset.value = newvalue; syntax let
offsetparameter = constantaudionode.
offset; let
offset = constantsourcenode.
offset.value; constantsourcenode.
offset.value = newvalue; value an audioparam object indicating the a-rate value returned for every sample by this node. the default value is 1.0. ...
...f
offset by setting the value of constantsourcenode.
offset.value: myconstantsourcenode.
offset.value = newvalue; syntax let
offsetparameter = constantaudionode.
offset; let
offset = constantsourcenode.
offset.value; constantsourcenode.
offset.value = newvalue; value an audioparam object indicating the a-rate value returned for every sample by this node. the default value is 1.0. to access the
offset parameter's current value, access the parameter's value property, as shown in the syntax box above. example this example shows how to set up a constantsourcenode so its
offset is used as the input to a pair of gainnodes; this snippet is derived from the complete example you can find in controlling multiple parameters with constantsourcenode. gainnode2 = context.creategain(); gainnode3 = contex...
...e source for the two gain nodes' gainnode.gain values. each of those values is also an audioparam. let's say we have an event handler (for click events, in this case) which needs to respond by altering the value of the two gain nodes. with the linkage above in place, that can be done using this simple event handler: function handleclickevent(event) { volumeslidercontrol.value = constantsource.
offset.value; } all this function has to do is fetch the current value of the slider control we're using to control the paired nodes' gains, then store that value into the constantsourcenode's
offset parameter. that's done by simply changing the contents of its audioparam.value property. the two gain nodes quickly adopt the new volume level. specifications specification status comment ...
... fetch the current value of the slider control we're using to control the paired nodes' gains, then store that value into the constantsourcenode's
offset parameter. that's done by simply changing the contents of its audioparam.value property. the two gain nodes quickly adopt the new volume level. specifications specification status comment web audio apithe definition of '
offset' in that specification. working draft ...
HTMLElement.offsetHeight - Web APIs
it does not include the height of pseudo-elements such as ::before or ::after. for the document body object, the measurement includes total linear content height instead of the element's css height. floated elements extending below other linear content are ignored. 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. this property will round the value to an integer. ...
...ar content height instead of the element's css height. floated elements extending below other linear content are ignored. 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. this property will round the value to an integer. if you need a fractional value, use element.getboundingclientrect(). ...
...ad of the element's css height. floated elements extending below other linear content are ignored. 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. this property will round the value to an integer. if you need a fractional value, use element.getboundingclientrect(). syntax var intelem
offsetheight = element.
offsetheight; intelem
offsetheight is a variable storing an integer corresponding to the
offsetheight pixel value of the element. the
offsetheight property is read-only. example the example image above shows a scrollbar and an
offsetheight which fits on the window. however, non-scrollable elements may have large
offsetheight values, much larger than the visible content. these elements a...
...ffsetheight values, much larger than the visible content. these elements are typically contained within scrollable elements; consequently, these non-scrollable elements may be completely or partly invisible, depending on the scrolltop setting of the scrollable container. specification specification status comment css object model (cssom) view modulethe definition of '
offsetheight' in that specification. working draft notes
offsetheight is a property of the dhtml object model which was first introduced by msie. it is sometimes referred to as an element's physical/graphical dimensions, or an element's border-box height. ...
Range.endOffset - Web APIs
the range.end
offset read-only property returns a number representing where in the range.endcontainer the range ends. if the endcontainer is a node of type text, comment, or cdatasection, then the
offset is the number of characters from the start of the endcontainer to the boundary point of the range. for other node types, the end
offset is the number of child nodes between the start of the endcontainer and the boundary point of the range. this property is read-only. to change the end
offset of a range, use one of the range.setend methods. ...
... living standard no change. ...
... living standard no change. ...
...r to the boundary point of the range. for other node types, the end
offset is the number of child nodes between the start of the endcontainer and the boundary point of the range. this property is read-only. to change the end
offset of a range, use one of the range.setend methods. syntax endrange
offset = range.end
offset; example var range = document.createrange(); range.setstart(startnode,start
offset); range.setend(endnode,end
offset); endrange
offset = range.end
offset; specifications specification status comment domthe definition of 'range.end
offset' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.end
offset' in that specification. obsolete initial speci...
SVGFEOffsetElement - Web APIs
the svgfe
offsetelement interface corresponds to the <fe
offset> element. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25...
...aco,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/svgfe
offsetelement" 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">svgfe
offsetelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this int...
...e="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfe
offsetelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes. svgfe
offsetelement.in1 read only an svganimatedstring corresponding to the in attribute of the given element. svgfe
offsetelement.dx read only an svganimatednumber corresponding to the dx attribute of the given element. svgfe
offsetelement.dy read only an svganimatednumber corresponding to the dy attribute of the given element. methods this interface does not provide any specific methods, but implem...
...nt.dy read only an svganimatednumber corresponding to the dy attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfe
offsetelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfe
offsetelement' in that specification. recommendation initial definition ...
WebGLRenderingContext.getVertexAttribOffset() - Web APIs
recommendation initial definition. opengl es 2.0the definition of 'glgetvertexattribpointerv' in that specification. ...
... recommendation initial definition. opengl es 2.0the definition of 'glgetvertexattribpointerv' in that specification. ...
... recommendation initial definition. opengl es 2.0the definition of 'glgetvertexattribpointerv' in that specification. ...
...parameters index a gluint specifying the index of the vertex attribute. pname a glenum which must be gl.vertex_attrib_array_pointer. return value a glintptr indicating the address of the vertex attribute. examples gl.getvertexattrib
offset(i, gl.vertex_attrib_array_pointer); specifications specification status comment webgl 1.0the definition of 'getvertexattrib
offset' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetvertexattribpointerv' in that specification. standard man page of the opengl api. ...
offset-distance - CSS: Cascading Style Sheets
the
offset-distance css property specifies a position along an
offset-path for an element to be placed. syntax /* default value */
offset-distance: 0; /* the middle of the
offset-path */
offset-distance: 50%; /* a fixed length positioned along the path */
offset-distance: 40px; <length-percentage> a length that specifies how far the element is along the path (defined with
offset-path). 100% represents the total length of the path (when the
offset-path is defined as a basic shape or path()). formal definition initial value0applies totransformable elementsinheritednopercentagesrefer to the total path lengthcomputed valuefor <length> the absolute value, otherwise a percentageanimation typea length, percentage or calc(); formal syntax <length-percentage>where <length-percentage> = <...
...(when the
offset-path is defined as a basic shape or path()). formal definition initial value0applies totransformable elementsinheritednopercentagesrefer to the total path lengthcomputed valuefor <length> the absolute value, otherwise a percentageanimation typea length, percentage or calc(); formal syntax <length-percentage>where <length-percentage> = <length> | <percentage> examples using
offset-distance in an animation the motion aspect in css motion path typically comes from animating the
offset-distance property. if you want to animate an element along its full path, you would define its
offset-path and then set up an animation that takes the
offset-distance from 0% to 100%. ...
... = <length> | <percentage> examples using
offset-distance in an animation the motion aspect in css motion path typically comes from animating the
offset-distance property. if you want to animate an element along its full path, you would define its
offset-path and then set up an animation that takes the
offset-distance from 0% to 100%. ...
...nimate an element along its full path, you would define its
offset-path and then set up an animation that takes the
offset-distance from 0% to 100%. html <div id="motion-demo"></div> css #motion-demo {
offset-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% {
offset-distance: 0%; } 100% {
offset-distance: 100%; } } result specifications specification status comment motion path module level 1the definition of '
offset-distance' in that specification. working draft initial definition ...
startOffset - SVG: Scalable Vector Graphics
the start
offset attribute defines an
offset from the start of the path for the initial current text position along the path after converting the path to the <textpath> element's coordinate system. only one element is using this attribute: <textpath> html,body,svg { height:100% } <svg viewbox="0 0 220 100" xmlns="http://www.w3.org/2000/svg"> <path id="path1" fill="none" stroke="red" d="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <path id="path2" fill="none" stroke="red" d="m130,90 q210,90 210,45 q210,10 170,10 q130,10 130,40 q130,70 165,70 q190,70 195,50" /> <text> <textpath href="#path1" start
offset="0"> quick brown fox jumps over the lazy dog. ...
... d="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <path id="path2" fill="none" stroke="red" d="m130,90 q210,90 210,45 q210,10 170,10 q130,10 130,40 q130,70 165,70 q190,70 195,50" /> <text> <textpath href="#path1" start
offset="0"> quick brown fox jumps over the lazy dog. </textpath> </text> <text> <textpath href="#path2" start
offset="40"> quick brown fox jumps over the lazy dog. </textpath> </text> </svg> usage notes value <length-percentage> | <number> default value 0 animatable yes <length-percentage> a length represents a distance along the path measured in the current user coordinate system for the <textpath> element. if a percentage is given, then the st...
..."> quick brown fox jumps over the lazy dog. </textpath> </text> </svg> usage notes value <length-percentage> | <number> default value 0 animatable yes <length-percentage> a length represents a distance along the path measured in the current user coordinate system for the <textpath> element. if a percentage is given, then the start
offset represents a percentage distance along the entire path. thus, 0% indicates the start point of the path and 100% indicates the end point of the path. <number> this value indicates a distance along the path measured in the current user coordinate system for the <textpath> element. note: negative values and values larger than the path length (e.g. 150%) are allowed. specifications ...
...nd 100% indicates the end point of the path. <number> this value indicates a distance along the path measured in the current user coordinate system for the <textpath> element. note: negative values and values larger than the path length (e.g. 150%) are allowed. specifications specification status comment scalable vector graphics (svg) 2the definition of 'start
offset' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'start
offset' in that specification. recommendation initial definition ...
<feOffset> - SVG: Scalable Vector Graphics
the <fe
offset> svg filter primitive allows to
offset the input image. the input image as a whole is
offset by the values specified in the dx and dy attributes. 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 dx dy dom interface this element implements the svgfe
offsetelement interface. ...
... 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 dx dy dom interface this element implements the svgfe
offsetelement interface. ...
...rder:<animate>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes in dx dy dom interface this element implements the svgfe
offsetelement interface. ...
...telement interface. example svg <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <filter id="
offset" width="180" height="180"> <fe
offset in="sourcegraphic" dx="60" dy="60" /> </filter> </defs> <rect x="0" y="0" width="100" height="100" stroke="black" fill="green"/> <rect x="0" y="0" width="100" height="100" stroke="black" fill="green" filter="url(#
offset)"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fe
offset>' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fe
offset>' in that specification. recommendation initial definition ...
CanvasRenderingContext2D.shadowOffsetX - Web APIs
the canvasrenderingcontext2d.shadow
offsetx property of the canvas 2d api specifies the distance that shadows will be
offset horizontally. note: shadows are only drawn if the shadowcolor property is set to a non-transparent value. one of the shadowblur, shadow
offsetx, or shadow
offsety properties must be non-zero, as well. syntax ctx.shadow
offsetx =
offset;
offset a float specifying the distance that shadows will be
offset horizontally. positive values are to the right, and negative to the left. the default value is 0 (no horizontal
offset). infinity and nan values are ignored. examples moving a shadow horizontally this example adds a blurred shadow to a rectangle. ...
... ctx.shadow
offsetx =
offset;
offset a float specifying the distance that shadows will be
offset horizontally. positive values are to the right, and negative to the left. the default value is 0 (no horizontal
offset). infinity and nan values are ignored. examples moving a shadow horizontally this example adds a blurred shadow to a rectangle. the shadowcolor property sets its color, shadow
offsetx sets its
offset 25 units to the right, and shadowblur gives it a blur level of 10. ...
...ing a shadow horizontally this example adds a blurred shadow to a rectangle. the shadowcolor property sets its color, shadow
offsetx sets its
offset 25 units to the right, and shadowblur gives it a blur level of 10. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadow
offsetx = 25; ctx.shadowblur = 10; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadow
offsetx' in that specification. living standard ...
CanvasRenderingContext2D.shadowOffsetY - Web APIs
the canvasrenderingcontext2d.shadow
offsety property of the canvas 2d api specifies the distance that shadows will be
offset vertically. note: shadows are only drawn if the shadowcolor property is set to a non-transparent value. one of the shadowblur, shadow
offsetx, or shadow
offsety properties must be non-zero, as well. syntax ctx.shadow
offsety =
offset;
offset a float specifying the distance that shadows will be
offset vertically. positive values are down, and negative are up. the default value is 0 (no vertical
offset). infinity and nan values are ignored. examples moving a shadow vertically this example adds a blurred shadow to a rectangle. ...
..., as well. syntax ctx.shadow
offsety =
offset;
offset a float specifying the distance that shadows will be
offset vertically. positive values are down, and negative are up. the default value is 0 (no vertical
offset). infinity and nan values are ignored. examples moving a shadow vertically this example adds a blurred shadow to a rectangle. the shadowcolor property sets its color, shadow
offsety sets its
offset 25 units towards the bottom, and shadowblur gives it a blur level of 10. ...
...a shadow vertically this example adds a blurred shadow to a rectangle. the shadowcolor property sets its color, shadow
offsety sets its
offset 25 units towards the bottom, and shadowblur gives it a blur level of 10. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadow
offsety = 25; ctx.shadowblur = 10; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 80); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadow
offsety' in that specification. living standard ...
HTMLElement.offsetParent - Web APIs
the htmlelement.
offsetparent read-only property returns a reference to the element which is the closest (nearest in the containment hierarchy) positioned ancestor element. if there is no positioned ancestor element, the nearest ancestor td, th, table will be returned, or the body if there are no ancestor table elements either. note:
offsetparent returns null in the following situations: the element or its parent element has the display property set to none. the element has the position property set to fixed (firefox returns <body>). the element is <body> or <html>.
offsetparent is useful because
offsettop and
offsetleft are relative to its padding edge. ...
...or table elements either. note:
offsetparent returns null in the following situations: the element or its parent element has the display property set to none. the element has the position property set to fixed (firefox returns <body>). the element is <body> or <html>.
offsetparent is useful because
offsettop and
offsetleft are relative to its padding edge. syntax parentobj = element.
offsetparent; parentobj is an object reference to the element in which the current element is
offset. specification specification status comment css object model (cssom) view modulethe definition of '
offsetparent' in that specification. working draft browser compatibility the compatibility table on this page is generated from structured data. if you'd li...
...g draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
Range.startOffset - Web APIs
the range.start
offset read-only property returns a number representing where in the startcontainer the range starts. if the startcontainer is a node of type text, comment, or cdatasection, then the
offset is the number of characters from the start of the startcontainer to the boundary point of the range. for other node types, the start
offset is the number of child nodes between the start of the startcontainer and the boundary point of the range. to change the start
offset of a range, use the range.setstart method. ...
...is a node of type text, comment, or cdatasection, then the
offset is the number of characters from the start of the startcontainer to the boundary point of the range. for other node types, the start
offset is the number of child nodes between the start of the startcontainer and the boundary point of the range. to change the start
offset of a range, use the range.setstart method. syntax startrange
offset = range.start
offset; example var range = document.createrange(); range.setstart(startnode,start
offset); range.setend(endnode,end
offset); var startrange
offset = range.start
offset; specifications specification status comment domthe definition of 'range.start
offset' in that specification. living standard no change. document object model (dom) level 2 trav...
...erange(); range.setstart(startnode,start
offset); range.setend(endnode,end
offset); var startrange
offset = range.start
offset; specifications specification status comment domthe definition of 'range.start
offset' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.start
offset' in that specification. obsolete initial specification. ...
WebGLRenderingContext.polygonOffset() - Web APIs
the webglrenderingcontext.polygon
offset() method of the webgl api specifies the scale factors and units to calculate depth values. the
offset is added before the depth test is performed and before the value is written into the depth buffer. syntax void gl.polygon
offset(factor, units); parameters factor a glfloat which sets the scale factor for the variable depth
offset for each polygon. the default value is 0. units a glfloat which sets the multiplier by which an implementation-specific value is multiplied with to create a constant depth
offset. the default value is 0. return value none. examples the polygon
offset fill is disabled by default. to enable or disable polygon
offset fill, use the enable() and disable() methods with the argument gl.polygon_
offset_fill. gl.enable(gl.
...lue is 0. units a glfloat which sets the multiplier by which an implementation-specific value is multiplied with to create a constant depth
offset. the default value is 0. return value none. examples the polygon
offset fill is disabled by default. to enable or disable polygon
offset fill, use the enable() and disable() methods with the argument gl.polygon_
offset_fill. gl.enable(gl.polygon_
offset_fill); gl.polygon
offset(2, 3); to check the current polygon
offset factor or units, query the polygon_
offset_factor and polygon_
offset_units constants. gl.getparameter(gl.polygon_
offset_factor); // 2 gl.getparameter(gl.polygon_
offset_units); // 3 specifications specification status comment webgl 1.0the definition of 'polygon
offset' in that specification. recommen...
...units, query the polygon_
offset_factor and polygon_
offset_units constants. gl.getparameter(gl.polygon_
offset_factor); // 2 gl.getparameter(gl.polygon_
offset_units); // 3 specifications specification status comment webgl 1.0the definition of 'polygon
offset' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glpolygon
offset' in that specification. standard man page of the opengl api. ...
MediaSessionActionDetails.seekOffset - Web APIs
the mediasessionactiondetails dictionary's seek
offset 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 = { seek
offset: deltatimeinseconds }; let deltatime = mediasessionactiondetails.seek
offset; 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
offset isn't specified, the user agent will choose an appropriate
offset automatically. this is typically in the range of five to ten seconds. ...
...dicating the time delta in seconds by which to move the playback position relative to its current timestamp. if the
offset isn't specified, the user agent will choose an appropriate
offset automatically. this is typically in the range of five to ten seconds. specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.seek
offset' in that specification. draft initial definition. ...
DataView.prototype.byteOffset - JavaScript
the byte
offset accessor property represents the
offset (in bytes) of this view from the start of its arraybuffer or sharedarraybuffer. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. description the byte
offset property is an accessor property whose set accessor function is undefined, meaning that you can only read this property. the value is established when an dataview is constructed and cannot be changed. ...
...u'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. description the byte
offset property is an accessor property whose set accessor function is undefined, meaning that you can only read this property. the value is established when an dataview is constructed and cannot be changed. examples using the byte
offset property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.byte
offset; // 0 (no
offset specified) var dataview2 = new dataview(buffer, 3); dataview2.byte
offset; // 3 (as specified when constructing the dataview) specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.byte
offset' in that specification. ...
moveByOffset - Archive of obsolete content
if isselecting is true, then the selection is also adjusted. if isselectingrange is also true, then the new item is selected in addition to any currently selected items. if isselectingrange is false, any existing selection is cleared. ...
AbstractRange.startOffset - Web APIs
the read-only start
offset property of the abstractrange interface returns the
offset into the start node of the range's start position. syntax var start
offset = range.start
offset 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 'start
offset' in that specification. living standard static rangethe definition of 'start
offset' in that specification. editor's draft initial definition. ...
MouseEvent.offsetX - Web APIs
early versions of the spec defined this as an integer. see the browser compatibility section for details. specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification. ...
MouseEvent.offsetY - Web APIs
early versions of the spec defined this as an integer. see the browser compatibility section for details. specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification. ...
Selection.anchorOffset - Web APIs
the selection.anchor
offset read-only property returns the number of characters that the selection's anchor is
offset within the selection.anchornode. this number is zero-based. if the selection begins with the first character in the selection.anchornode, 0 is returned. syntax number = sel.anchor
offset specifications specification status comment selection apithe definition of 'selection.anchor
offset' in that specification. working draft current ...
Selection.focusOffset - Web APIs
the selection.focus
offset read-only property returns the number of characters that the selection's focus is
offset within the selection.focusnode. this number is zero-based. if the selection ends with the first character in the selection.focusnode, 0 is returned. syntax
offset = sel.focus
offset specifications specification status comment selection apithe definition of 'selection.focus
offset' in that specification. working draft current ...
StaticRange.startOffset - Web APIs
the read-only start
offset property of the staticrange interface returns the
offset into the start node of the range's start position. syntax var start
offset = staticrange.start
offset 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 'start
offset' in that specification. living standard static rangethe definition of 'start
offset' in that specification. editor's draft initial definition. ...
Window.pageXOffset - Web APIs
the read-only window property pagex
offset is an alias for scrollx. specification specification status comment css object model (cssom) view modulethe definition of 'window.pagex
offset' in that specification. working draft ...
TypedArray.prototype.byteOffset - JavaScript
the byte
offset accessor property represents the
offset (in bytes) of a typed array from the start of its arraybuffer. description the byte
offset property is an accessor property whose set accessor function is undefined, meaning that you can only read this property. the value is established when a typedarray is constructed and cannot be changed. typedarray is one of the typedarray objects. examples using the byte
offset property var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.byte
offset; // 0 (no
offset specified) var uint8 = new uint8array(buffer, 3); uint8.byte
offset; // 3 (as specified when constructing uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.byte
offset' in that specification. ...
Index - Web APIs
interface returns true if the range's start position and end position are the same. 18 abstractrange.endcontainer api, abstractrange, dom, dom api, end, node, position, property, range, read-only, reference, container, endcontainer the endcontainer property of the abstractrange interface returns the node in which the end of the range is located. 19 abstractrange.end
offset api, abstractrange, dom, dom api, end, property, range, read-only, reference, end
offset,
offset the end
offset property of the abstractrange interface returns the
offset into the end node of the range's end position. 20 abstractrange.startcontainer api, abstractrange, dom, dom api, property, range, read-only, reference, start, startcontainer the read-only startcontai...
...ffset property of the abstractrange interface returns the
offset into the end node of the range's end position. 20 abstractrange.startcontainer api, abstractrange, dom, dom api, property, range, read-only, reference, start, startcontainer the read-only startcontainer property of the abstractrange interface returns the start node for the range. 21 abstractrange.start
offset api, abstractrange, dom, dom api, property, range, read-only, reference,
offset, start
offset the read-only start
offset property of the abstractrange interface returns the
offset into the start node of the range's start position. 22 abstractworker api, abstract, abstractworker, interface, reference, sharedworker, web workers, web workers api, worker the abstractworke...
...g of oscillation in cents. 116 audiobuffersourcenode.loop api, audio, audiobuffersourcenode, loop, media, property, reference, web audio api, sound the loop property's default value is false. 117 audiobuffersourcenode.loopend api, audio, audiobuffersourcenode, media, property, reference, web audio api, loopend, sound a floating-point number indicating the
offset, in seconds, into the audio buffer at which each loop will loop return to the beginning of the loop (that is, the current play time gets reset to audiobuffersourcenode.loopstart). this property is only used if the loop property is true. 118 audiobuffersourcenode.loopstart api, audio, audiobuffersourcenode, media, property, reference, web audio api, loopstart, sound the loopst...
...And 56 more matches
IAccessibleText
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) this enum defines values which specify a text() boundary type. ia2_text_boundary_sentence is optional. when a method doesn't implement this method it must return s_false. typically this feature would not be implemented by an application. ...
...y this feature would not be implemented by an application. however, if the application developer was not satisfied with how screen readers have handled the reading of sentences this boundary type could be implemented and screen readers could use the application's version of a sentence rather than the screen reader's. the rest of the boundary types must be supported. ...
...ould not be implemented by an application. however, if the application developer was not satisfied with how screen readers have handled the reading of sentences this boundary type could be implemented and screen readers could use the application's version of a sentence rather than the screen reader's. the rest of the boundary types must be supported. ...
...And 54 more matches
StringView - Archive of obsolete content
https://developer.mozilla.org/add-ons/code_snippets/stringview |*| https://developer.mozilla.org/docs/user:fusionchess |*| https://github.com/madmurphy/stringview.js |*| |*| this framework is released under the gnu lesser general public license, version 3 or later. ...
...m/madmurphy/stringview.js |*| |*| this framework is released under the gnu lesser general public license, version 3 or later. ...
.../stringview.js |*| |*| this framework is released under the gnu lesser general public license, version 3 or later. ...
...And 48 more matches
nsIAccessibleText
accessible/public/nsiaccessibletext.idlscriptable please add a summary to this article. ...
... accessible/public/nsiaccessibletext.idlscriptable please add a summary to this article. ...
... accessible/public/nsiaccessibletext.idlscriptable please add a summary to this article. ...
...And 36 more matches
nsIDOMWindowUtils
tivekeyevent(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 a
offset, in unsigned long alength, in long ax, in long ay); obsolete since gecko 31.0 nsiquerycontenteventresult sendquerycontentevent(in unsigned long atype, in unsigned long a
offset, in unsigned long alength, in long ax, in long ay, [optional] in unsigned long aadditionalflags); boolean sendselectionsetevent(in unsigned long a
offset, in unsigned long alength, in boolean areverse); ...
... nsiquerycontenteventresult sendquerycontentevent(in unsigned long atype, in unsigned long a
offset, in unsigned long alength, in long ax, in long ay, [optional] in unsigned long aadditionalflags); boolean sendselectionsetevent(in unsigned long a
offset, in unsigned long alength, in boolean areverse); obsolete since gecko 31.0 boolean sendselectionsetevent(in unsigned long a
offset, 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 asecon...
...rtedtext 0x04 obsolete since gecko 38.0 composition_attr_selectedconvertedtext 0x05 obsolete since gecko 38.0 query_content_flag_use_native_line_break 0x0000 one of values of aadditionalflags of sendquerycontentevent(). this flag must not be set with query_content_flag_use_xp_line_break. when this is set (or not set query_content_flag_use_xp_line_break), the a
offset and alength are
offset and length in/of the content generated with native line breaks (e.g., "\r\n" on windows). additionally, the
offset, length and string of result are also computed with native line breaks. query_content_flag_use_xp_line_break 0x0001 one of values of aadditionalflags of sendquerycontentevent(). this flag must not be set with query_content_flag_use_native_line_b...
...And 25 more matches
NS_ConvertASCIItoUTF16
or=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 20 more matches
NS_ConvertUTF8toUTF16
or=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 20 more matches
nsAdoptingString
i prunichar operator[](pruint32) const - source parameters pruint32 i get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 20 more matches
nsAutoString
or=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 20 more matches
nsDependentString
or=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 20 more matches
nsFixedString
or=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 20 more matches
nsPromiseFlatString
or=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 20 more matches
nsString
or=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 20 more matches
nsXPIDLString
or=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 20 more matches
source-editor.jsm
r); 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 getcaret
offset(); object getcaretposition(); object getselection(); void setcaret
offset(number a
offset); 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 get...
...er find( [optional] string astring [optional] object aoptions ); parameters astring optional the string for which to search. if not specified, the currently selected text in the editor is used as the search string. aoptions optional an optional object containing properties customizing the search operation. see find options for details. return value returns an integer indicating the
offset into the text at which the first character of the found string is located, or -1 if the string wasn't found. find options the aoptions object can customize the search operation. it may have the following properties: property type description backwards boolean if true, the search begins at start (or the end of the text, if start is not specified) and progresses tow...
...the search begins at start (or the end of the text, if start is not specified) and progresses toward the beginning of the text. otherwise the search progresses forward. the default is false. ignorecase boolean if true, the search is performed in a case-insensitive manner; otherwise case is considered. the default is false. start number an integer value indicating the
offset into the text at which to begin the find operation. the default is 0 if backwards is false, or text.length if backwards is true. findnext() finds the next occurrence of the search operation started by the last call to find(). note: this ignores the value you specified for backwards in the original search; it always searches forward. number findnext( boolean awrap }; parameters aw...
...And 18 more matches
WebGLRenderingContext.texSubImage2D() - Web APIs
the webglrenderingcontext.texsubimage2d() method of the webgl api specifies a sub-rectangle of the current texture. ...
... the webglrenderingcontext.texsubimage2d() method of the webgl api specifies a sub-rectangle of the current texture. ...
... the webglrenderingcontext.texsubimage2d() method of the webgl api specifies a sub-rectangle of the current texture. ...
...And 18 more matches
IAccessibleEditableText
nged in gecko 1.9 (firefox 3) this interface is typically used in conjunction with the iaccessibletext interface and complements that interface with the additional capability of clipboard operations. note that even a read only text object can support the copy capability so this interface is not limited to editable objects. the substrings used with this interface are specified as follows: if start
offset is less than end
offset, the substring starts with the character at start
offset and ends with the character just before end
offset. if end
offset is lower than start
offset, the result is the same as a call with the two arguments exchanged. the whole text can be defined by passing the indices zero and iaccessibletext.ncharacters(). if both indices have the same value, an empty string is defined. refe...
...t, the substring starts with the character at start
offset and ends with the character just before end
offset. if end
offset is lower than start
offset, the result is the same as a call with the two arguments exchanged. the whole text can be defined by passing the indices zero and iaccessibletext.ncharacters(). if both indices have the same value, an empty string is defined. refer to the @ref _special
offsets "special
offsets for use in the iaccessibletext and iaccessibleeditabletext methods" for information about a special
offset constant that can be used in iaccessibleeditabletext methods. ...
... by passing the indices zero and iaccessibletext.ncharacters(). if both indices have the same value, an empty string is defined. refer to the @ref _special
offsets "special
offsets for use in the iaccessibletext and iaccessibleeditabletext methods" for information about a special
offset constant that can be used in iaccessibleeditabletext methods. ...
...And 16 more matches
WebGL2RenderingContext.texSubImage3D() - Web APIs
the webgl2renderingcontext.texsubimage3d() method of the webgl api specifies a sub-rectangle of the current texture. ...
... the webgl2renderingcontext.texsubimage3d() method of the webgl api specifies a sub-rectangle of the current texture. ...
... the webgl2renderingcontext.texsubimage3d() method of the webgl api specifies a sub-rectangle of the current texture. ...
...And 16 more matches
Gradients in SVG - SVG: Scalable Vector Graphics
section as opposed to on a shape itself to promote reusability. linear gradient linear gradients change along a straight line. to insert one, you create a <lineargradient> node inside the definitions section of your svg file. ...
...o promote reusability. linear gradient linear gradients change along a straight line. to insert one, you create a <lineargradient> node inside the definitions section of your svg file. ...
...near gradients change along a straight line. to insert one, you create a <lineargradient> node inside the definitions section of your svg file. ...
...And 16 more matches
Bytecode Descriptions
on steps 6.e.ii, 6.g.iii, and 12 for derived classes. format: jof_object classconstructor operands: (uint32_t nameindex, uint32_t sourcestart, uint32_t sourceend) stack: ⇒ constructor create and push a default constructor for a base class. a default constructor behaves like constructor() {}. implements: classdefinitionevaluation for classtail, steps 10.b. and 12-17. the sourcestart/sourceend
offsets are the start/end
offsets of the class definition in the source buffer, used for tostring(). they must be valid
offsets into the source buffer, measured in code units, such that scriptsource->substring(cx, start, end) is valid. format: jof_class_ctor derivedconstructor operands: (uint32_t nameindex, uint32_t sourcestart, uint32_t sourceend) stack: proto ⇒ constructor create and push a defau...
... backwards jump for some loop. this is a jump target instruction (see jsop::jumptarget). additionally, it checks for interrupts and handles jit tiering. the depthhint operand is a loop depth hint for ion. it starts at 1 and deeply nested loops all have the same value. for the convenience of the jits, scripts must not start with this instruction. see bug 1602390. ...
...loop. this is a jump target instruction (see jsop::jumptarget). additionally, it checks for interrupts and handles jit tiering. the depthhint operand is a loop depth hint for ion. it starts at 1 and deeply nested loops all have the same value. for the convenience of the jits, scripts must not start with this instruction. see bug 1602390. ...
...And 15 more matches
transform-origin - CSS: Cascading Style Sheets
translating by the negated property value. this means, this definition transform-origin: -100% 50%; transform: rotate(45deg); results in the same transformation as transform-origin: 0 0; transform: translate(-100%, 50%) rotate(45deg) translate(100%, -50%); by default, the origin of a transform is center. ...
...g by the negated property value. this means, this definition transform-origin: -100% 50%; transform: rotate(45deg); results in the same transformation as transform-origin: 0 0; transform: translate(-100%, 50%) rotate(45deg) translate(100%, -50%); by default, the origin of a transform is center. ...
...s, this definition transform-origin: -100% 50%; transform: rotate(45deg); results in the same transformation as transform-origin: 0 0; transform: translate(-100%, 50%) rotate(45deg) translate(100%, -50%); by default, the origin of a transform is center. ...
...And 15 more matches
Space Manager Detailed Design - Archive of obsolete content
represents the accumulated calls to * translate(). */ void gettranslation(nscoord& ax, nscoord& ay) const { ax = mx; ay = my; } /** * returns the y-most of the bottommost band or 0 if there are no bands. * * @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-
offset. the band data * indicates which parts of the band are available, and which parts * are unavailable * * the band data that is returned is in the coordinate space of the * local coordinate system. * * the local coordinate space origin, the y-
offset, and the max size * describe a rectangle that's used to clip the underlying band of * available space, i.e. * {0, ayoffse...
...re unavailable * * the band data that is returned is in the coordinate space of the * local coordinate system. * * the local coordinate space origin, the y-
offset, and the max size * describe a rectangle that's used to clip the underlying band of * available space, i.e. * {0, ay
offset, amaxsize.width, amaxsize.height} in the local * coordinate space * * @param ay
offset the y-
offset of where the band begins. the coordinate is * relative to the upper-left corner of the local coordinate space * @param amaxsize the size to use to constrain the band data * @param abanddata [in,out] used to return the list of trapezoids that * describe the available space and the unavailable space * @return ns_ok if successful and ns_error_fa...
...ata [in,out] used to return the list of trapezoids that * describe the available space and the unavailable space * @return ns_ok if successful and ns_error_failure if the band data is not * not large enough. the 'count' member of the band data struct * indicates how large the array of trapezoids needs to be */ nsresult getbanddata(nscoord ay
offset, const nssize& amaxsize, nsbanddata& abanddata) const; /** * add a rectangular region of unavailable space. the space is * relative to the local coordinate system. * * the region is tagged with a frame * * @param aframe the frame used to identify the region. must not be null * @param aunavailablespace the bounding rect of...
...And 13 more matches
NS_ConvertUTF16toUTF8
rator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 13 more matches
NS_LossyConvertUTF16toASCII
rator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 13 more matches
nsAdoptingCString
print32 i char operator[](pruint32) const - source parameters pruint32 i get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 13 more matches
nsCAutoString
scsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
... const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...rint32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 13 more matches
nsCString
rator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 13 more matches
nsDependentCString
rator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 13 more matches
nsFixedCString
rator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 13 more matches
nsPromiseFlatCString
rator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 13 more matches
nsXPIDLCString
rator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. ...
...get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within this string. @param astring is substring to be sought in this @param aignorecase selects case sensitivity @param a
offset tells us where in this string to start searching @param acount tells us how far from the
offset we are to search. use -1 to search the whole string. ...
...And 13 more matches
Debugger.Script - Firefox Developer Tools
refers to webassembly code, throw a typeerror. format if the instance refers to a jsscript, "js". if the instance refers to webassembly code, "wasm". function properties of the debugger.script prototype object the functions described below may only be called with a this value referring to a debugger.script instance; they may not be used as methods of other kinds of objects. ...
...fers to webassembly code, "wasm". function properties of the debugger.script prototype object the functions described below may only be called with a this value referring to a debugger.script instance; they may not be used as methods of other kinds of objects. getall
offsets() if the instance refers to a jsscript, return an arrayl describing the relationship between bytecode instruction
offsets and source code positions in this script.l is sparse, and indexed by source line number. if a source line numberline has no code, thenl has noline property. if there is code forline, then l[line] is an array of
offsets of byte code instructions that are entry points to that line. for example, suppose we have a script for the following source code: a=[] for (i=1; i < 10; i++) // it's hip ...
...s sparse, and indexed by source line number. if a source line numberline has no code, thenl has noline property. if there is code forline, then l[line] is an array of
offsets of byte code instructions that are entry points to that line. for example, suppose we have a script for the following source code: a=[] for (i=1; i < 10; i++) // it's hip to be square. ...
...And 13 more matches
background-position - CSS: Cascading Style Sheets
values ...
...an x/y coordinate, to place an item relative to the edges of an element's box. it can be defined using one to four values. if two non-keyword values are used, the first value represents the horizontal position and the second represents the vertical position. if only one value is specified, the second value is assumed to be center. if three or four values are used, the length-percentage values are
offsets for the preceding keyword value(s). 1-value syntax: the value may be: the keyword value center, which centers the image. one of the keyword values top, left, bottom, right. this specifies an edge against which to place the item. the other dimension is then set to 50%, so the item is placed in the middle of the edge specified. a <length> or <percentage>. this specifies the x coordinat...
...> values, then the first defines x and the second y. note that: if one value is top or bottom, then the other value may not be top or bottom. if one value is left or right, then the other value may not be left or right. this means, e.g., that top top and left right are not valid. the default value is top left or 0% 0%. ...
...And 12 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
enderstate({ baselayer: new xrwebgllayer(xrsession, gl) }); if (session_type == "immersive-vr") { refspacetype = "local"; } else { refspacetype = "viewer"; } mat4.fromtranslation(cubematrix, viewerstartposition); vec3.copy(cubeorientation, viewerstartorientation); xrsession.requestreferencespace(refspacetype) .then((refspace) => { xrreferencespace = refspace.get
offsetreferencespace( new xrrigidtransform(viewerstartposition, cubeorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); }); return xrsession; } after storing the newly-created xrsession object into xrsession, the label of the button is set to "exit webxr" to indicate its new function after starting the scene, and a handler is installed for the end eve...
...entation, viewerstartorientation, is copied into the cubeorientation property, which will be used to track the rotation of the cube over time. sessionstarted() finishes up by calling the session's requestreferencespace() method to get a reference space object describing the space in which the object is being created. when the promise returned resolves to a xrreferencespace object, we call its get
offsetreferencespace function to obtain a reference space object to represent the object's coordinate system. the origin of the new space is located at the world coordinates specified by the viewerstartposition and its orientation set to cubeorientation. then we let the session know we're ready to draw a frame by calling its requestanimationframe() function. we record the returned request id in case we...
...rols now let's take a look at the code that handles turning keyboard and mouse events into something usable for controlling an avatar in a webxr scenario. moving using the keyboard in order to allow the user to move through the 3d world even if they don't have a webxr device with the inputs to perform movement through space, our handler for keydown events, handlekeydown(), responds by updating
offsets from the object's origin based on which key was pressed. function handlekeydown(event) { switch(event.key) { case "w": case "w": verticaldistance -= move_distance; break; case "s": case "s": verticaldistance += move_distance; break; case "a": case "a": transversedistance += move_distance; break; case "d": case "d": tran...
...And 10 more matches
box-shadow - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the box-shadow property enables you to cast a drop shadow from the frame of almost any element. ...
...he frame of almost any element. if a border-radius is specified on the element with a box shadow, the box shadow takes on the same rounded corners. the z-ordering of multiple box shadows is the same as multiple text shadows (the first specified shadow is on top). box-shadow generator is an interactive tool allowing you to generate a box-shadow. ...
... almost any element. if a border-radius is specified on the element with a box shadow, the box shadow takes on the same rounded corners. the z-ordering of multiple box shadows is the same as multiple text shadows (the first specified shadow is on top). box-shadow generator is an interactive tool allowing you to generate a box-shadow. ...
...And 10 more matches
Applying styles and colors - Web APIs
es. linejoin = type sets the appearance of the "corners" where lines meet. miterlimit = value establishes a limit on the miter when two lines join at a sharp angle, to let you control how thick the junction becomes. getlinedash() returns the current line dash pattern array containing an even number of non-negative numbers. setlinedash(segments) sets the current line dash pattern. linedash
offset = value specifies where to start a dash array on a line. you'll get a better understanding of what these do by looking at the examples below. a linewidth example this property sets the current line thickness. values must be positive numbers. by default this value is set to 1.0 units. the line width is the thickness of the stroke centered on the given path. in other words, the area that's dr...
... in this example we are creating a marching ants effect. it is an animation technique often found in selection tools of computer graphics programs. it helps the user to...
... in this example we are creating a marching ants effect. ...
...And 9 more matches
Architecture - Accessibility
to collect information about itself it is still exposed in msaa for backward compatibility by old windows assistive technologies. those at's don't yet know about any iaccessibletext yet, and want to see the hierarchy how they always did -- with text in leaf nodes. how does an at deal with text (a) to get the embedded object for an embedded object char: linkindex = iahypertext::getlinkindex(
offset) iahyperlink*object = iahypertext::getlink(linkindex) iaccessible* accessible = qi/qs(object) (b) to get the
offset 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
offset within the parent. examples of objects no...
...rn its child
offset within the parent. examples of objects not embedded in text are the child options in list boxes and combo boxes. otherwise, use iahyperlink::getstartindex() to find the index in parent. ...
...rtindex() to find the index in parent. ...
...And 9 more matches
Animated PNG graphics
... ... decoders must treat out-of-order apng chunks as an error. apng-aware png editors should restore them to correct order using the sequence numbers. 'actl': the animation control chunk the 'actl' chunk is an ancillary chunk as defined in the png specification. it must appear before the first 'idat' chunk within a valid png stream. the 'actl' chunk contains: byte
offset field name field type description 0 num_frames unsigned int the number of frames in the apng. 4 num_plays unsigned int the number of times to loop this apng. 0 indicates infinite looping. num_frames indicates the total number of frames in the animation. this must equal the number of 'fctl' chunks. 0 is not a valid value. 1 is a valid value for a...
...st appear after all 'idat' chunks and before the 'fdat' chunks for the frame. for all subsequent frames, the 'fctl' chunk for frame n must appear after the 'fdat' chunks from frame n-1 and before the 'fdat' chunks for frame n. other ancillary chunks are allowed to appear among the apng chunks, including between 'fdat' chunks. exactly one 'fctl' chunk is required for each frame. byte
offset field name field type description 0 sequence_number unsigned int sequence number of the animation chunk, starting with 0. 4 width unsigned int width of the following frame. 8 height unsigned int height of the following frame. 12 x_
offset unsigned int x position at which to render the following frame. 16 y...
... field name field type description 0 sequence_number unsigned int sequence number of the animation chunk, starting with 0. 4 width unsigned int width of the following frame. 8 height unsigned int height of the following frame. 12 x_
offset unsigned int x position at which to render the following frame. 16 y_
offset unsigned int y position at which to render the following frame. 20 delay_num unsigned short frame delay fraction numerator. 22 delay_den unsigned short frame delay fraction denominator. 24 dispose_op byte type of frame area disposal to be done after rendering this frame. 25 blend_op byte type of frame area rendering for...
...And 8 more matches
nsCStringContainer (External)
parameters char other equalsliteral prbool equalsliteral(const char*) const - source parameters char other find(const nsacstring&, print32 (*) print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
... first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring astr print32* c find(const nsacstring&, pruint32, print32 (*) print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring astr pruint32 a
offset print32* c find(const char*, print32 (*) print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...rrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring astr pruint32 a
offset print32* c find(const char*, print32 (*) print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...And 8 more matches
nsISelectionPrivate
hanged in gecko 35 (firefox 35 / thunderbird 35 / seamonkey 2.32) warning: the content of this article may be out of date. this page wasn't updated since the initial import in 2011. see the idl file linked above for up-to-date information. ...
...bird 35 / seamonkey 2.32) warning: the content of this article may be out of date. this page wasn't updated since the initial import in 2011. see the idl file linked above for up-to-date information. ...
... void addselectionlistener(in nsiselectionlistener newlistener); void endbatchchanges(); void getcachedframe
offset(in nsiframe aframe, in print32 in
offset, in nspointref apoint); native code only! nsienumerator getenumerator(); nsframeselection getframeselection(); native code only! void getrangesforinterval(in nsidomnode beginnode, in print32 begin
offset, in nsidomnode endnode, in print32 end
offset, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results); void getrangesforintervalarray(in nsinode beginnode, in print32 begin
offset, in nsinode endnode, in print32 end
offset, in boolean allowadjacent, in rangearray results); native code only! void getrangesforintervalcomarra...
...And 8 more matches
Selection.setBaseAndExtent() - Web APIs
the setbaseandextent() method of the selection interface sets the selection to be a range including all or parts of two specified dom nodes, and any content located between them. syntax sel.setbaseandextent(anchornode,anchor
offset,focusnode,focus
offset) parameters anchornode the node at the start of the selection. anchor
offset the number of child nodes from the start of the anchor node that should be excluded from the selection. so for example, if the value is 0 the whole node is included. if the value is 1, the whole node minus the first child node is included. and so on. focusnode the node at the end of the selection. focus
offset the number of child nodes from the start of the focus node that should be included in the selection. so for example, if the value is 0 the wh...
...if the focus position appears before the anchor position in the document, the direction of the selection is reversed — the caret is placed at the beginning of the text rather the end, which matters for any keyboard command that might follow. for example, shift + ➡︎ would cause the selection to narrow from the beginning rather than grow at the end. return value void. exceptions if anchor
offset is larger than the number of child nodes inside anchornode, or if focus
offset is larger than the number of child nodes inside focusnode, an indexsizeerror exception is thrown. examples in this example, we have two paragraphs containing spans, each one containing a single word. the first one is set as the anchornode and the second is set as the focusnode. we also have an additional paragraph tha...
...e number of child nodes inside focusnode, an indexsizeerror exception is thrown. examples in this example, we have two paragraphs containing spans, each one containing a single word. the first one is set as the anchornode and the second is set as the focusnode. we also have an additional paragraph that sits in between the two nodes. next, we have two form inputs that allow you to set the anchor
offset and focus
offset — they both have a default value of 0. we also have a button that when pressed invokes a function that runs the setbaseandextent() method with the specified
offsets, and copies the selection into the output paragraph at the very bottom of the html. <h1>setbaseandextent example</h1> <div> <p class="one"><span>fish</span><span>dog</span><span>cat</span><span>bird</span></p> ...
...And 8 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
ms, as well as webxr spaces, reference spaces, and how reference spaces are used to create local coordinate systems for individual objects or movable components within a scene. 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
offset from another coordinate system that is itself defined by some other space. thus, a reference space can be used to define the position and orientation of a point and by extension the entire object for which that point is the origin. while this is a little heavy-handed to be used for every single object in a scene, it can be very useful for a few specific objects to have their own coordinate system...
... foundation, the webxr device api can easily be used to convert among the coordinate systems, perform operations affecting these spaces and their corresponding objects, and so forth. describing a position relative to a space there are two scenarios in which you may need to describe a position and/or orientation relative to a space. the first is described above: applying a reference space to an
offset (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. poses once your reference space or spaces are established for the various key objects in the scene, you will have times when you need to describe another position relative to the origin of a particular reference space. this is done using poses.
...ting the xrsession from the frame object, then uses the frame's getviewerpose() method to compute the xrviewerpose for the viewer, given viewerrefspace, which describes the current facing direction and position of the viewer. the returned viewer pose, viewerpose, can in turn be used to compute positions and orientations to properly render the objects in the scene given the user's point of view. ...
...And 8 more matches
DataView - JavaScript
ittleendian); // true or false 64-bit integer values because javascript does not currently include standard support for 64-bit integer values, dataview does not offer native 64-bit operations. as a workaround, you could implement your own getuint64() function to obtain a value with precision up to number.max_safe_integer, which could suffice for certain cases. ...
...for 64-bit integer values, dataview does not offer native 64-bit operations. as a workaround, you could implement your own getuint64() function to obtain a value with precision up to number.max_safe_integer, which could suffice for certain cases. function getuint64(dataview, byte
offset, littleendian) { // split 64-bit number into two 32-bit (4-byte) parts const left = dataview.getuint32(byte
offset, littleendian); const right = dataview.getuint32(byte
offset+4, littleendian); // combine the two 32-bit values const combined = littleendian? left + 2**32*right : 2**32*left + right; if (!number.issafeinteger(combined)) console.warn(combined, 'exceeds max_safe_integer. precision may be lost'); return combined; } alternatively, if you need full 64-bit range, you can create a big...
...combined; } alternatively, if you need full 64-bit range, you can create a bigint. further, although native bigints are much faster than user-land library equivalents, bigints will always be much slower than 32-bit integers in javascript due to the nature of their variable size. ...
...And 8 more matches
NS ConvertUTF16toUTF8 external
st char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...onst - source find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring& astr pruint32 a
offset print32 (*)(char*, char*, pruint32) c print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...And 7 more matches
NS LossyConvertUTF16toASCII external
st char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...onst - source find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring& astr pruint32 a
offset print32 (*)(char*, char*, pruint32) c print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...And 7 more matches
PromiseFlatCString (External)
st char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...onst - source find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring& astr pruint32 a
offset print32 (*)(char*, char*, pruint32) c print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...And 7 more matches
nsACString (External)
st char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...onst - source find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring& astr pruint32 a
offset print32 (*)(char*, char*, pruint32) c print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...And 7 more matches
nsCAutoString (External)
st char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...onst - source find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring& astr pruint32 a
offset print32 (*)(char*, char*, pruint32) c print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...And 7 more matches
nsCString external
st char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...onst - source find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring& astr pruint32 a
offset print32 (*)(char*, char*, pruint32) c print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...And 7 more matches
nsDependentCString external
st char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...onst - source find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring& astr pruint32 a
offset print32 (*)(char*, char*, pruint32) c print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...And 7 more matches
nsDependentCSubstring external
st char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...onst - source find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring& astr pruint32 a
offset print32 (*)(char*, char*, pruint32) c print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...And 7 more matches
nsLiteralCString (External)
st char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...onst - source find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring& astr pruint32 a
offset print32 (*)(char*, char*, pruint32) c print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...And 7 more matches
nsLiteralString (External)
st char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...onst - source find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsacstring& astr pruint32 a
offset print32 (*)(char*, char*, pruint32) c print32 find(const char*, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string. ...
...And 7 more matches
AbstractRange - Web APIs
ractrange</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties collapsed read only a boolean value which is true if the range is collapsed. a collapsed range is one whose start position and end position are the same, resulting in a zero-character-long range. ...
... a:hover text { fill: #0095dd; pointer-events: all;} properties collapsed read only a boolean value which is true if the range is collapsed. a collapsed range is one whose start position and end position are the same, resulting in a zero-character-long range. endcontainer read only the dom node in which the end of the range, as specified by the end
offset property, is located. ...
...ll;} properties collapsed read only a boolean value which is true if the range is collapsed. a collapsed range is one whose start position and end position are the same, resulting in a zero-character-long range. endcontainer read only the dom node in which the end of the range, as specified by the end
offset property, is located. ...
...And 7 more matches
Box-shadow generator - CSS: Cascading Style Sheets
decrement = function decrement(topic) { var slider = sliders[topic]; if (slider === null || slider === undefined) return; if (slider.value - slider.step >= slider.min) { slider.value -= slider.step; setvalue(topic, slider.value) notify.call(slider); } } // this = slider object var updateslider = function updateslider(e) { var node = this.node; var pos = e.pagex - node.
offsetleft; var width = node.clientwidth; var delta = this.max - this.min; var
offset = this.pointer.clientwidth + 4; // border width * 2 if (pos < 0) pos = 0; if (pos > width) pos = width; var value = pos * delta / width | 0; var precision = value % this.step; value = value - precision + this.min; if (precision > this.step / 2) value = value + this.step; if (this.snap) pos ...
... var
offset = this.pointer.clientwidth + 4; // border width * 2 if (pos < 0) pos = 0; if (pos > width) pos = width; var value = pos * delta / width | 0; var precision = value % this.step; value = value - precision + this.min; if (precision > this.step / 2) value = value + this.step; if (this.snap) pos = (value - this.min) * width / delta; this.pointer.style.left = pos -
offset/2 + "px"; this.value = value; node.setattribute('data-value', value); notify.call(this); } var setvalue = function setvalue(topic, value) { var slider = sliders[topic]; if (value > slider.max || value < slider.min) return; var delta = slider.max - slider.min; var width = slider.node.clientwidth; var
offset = slider.pointer.clientwidth; var pos = (value - slider.min) * w...
... notify.call(this); } var setvalue = function setvalue(topic, value) { var slider = sliders[topic]; if (value > slider.max || value < slider.min) return; var delta = slider.max - slider.min; var width = slider.node.clientwidth; var
offset = slider.pointer.clientwidth; var pos = (value - slider.min) * width / delta; slider.value = value; slider.pointer.style.left = pos -
offset / 2 + "px"; slider.node.setattribute('data-value', value); notify.call(slider); } var setmousetracking = function setmousetracking(elem, callback) { elem.addeventlistener("mousedown", function(e) { callback(e); document.addeventlistener("mousemove", callback); }); document.addeventlistener("mouseup", function(e) { document.removeeventlistener("mousemove", callback); }); ...
...And 7 more matches
text-shadow - CSS: Cascading Style Sheets
the text-shadow css property adds shadows to text. it accepts a comma-separated list of shadows to be applied to the text and any of its decorations. each shadow is described by some combination of x and y
offsets from the element, blur radius, and color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... to be applied to the text and any of its decorations. each shadow is described by some combination of x and y
offsets from the element, blur radius, and color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...ied to the text and any of its decorations. each shadow is described by some combination of x and y
offsets from the element, blur radius, and color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...And 7 more matches
Filter effects - SVG: Scalable Vector Graphics
ations (like blurring, adding a lighting effect, etc). to apply your created filter on a graphic element, you set the filter attribute. ...
... 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"> <!--
offsetblur --> <fegaussianblur in="sourcealpha" stddeviation="4" result="blur"/> <fe
offset in="blur" dx="4" dy="4" result="
offsetblur"/> <!-- 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"/> <f...
...And 7 more matches
Audio for Web games - Game development
parts of your music are ready earlier and you can start playing them while others load. either way you may want to synchronize tracks or loops. the web audio api contains the notion of an internal clock that starts ticking the moment you create an audio context. you'll need to take account of the time between creating an audio context and when the first audio track starts playing. recording this
offset and querying the playing track's current time gives you enough information to synchronize separate pieces of audio. to see this in action, let's lay out some separate tracks: <section id="tracks"> <ul> <li data-loading="true"> <a href="leadguitar.mp3" class="track">lead guitar</a> <p class="loading-text">loading...</p> <button data-playing="false" aria-decribedby="guitar...
...cuting. 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. ...
...epath) { const track = await getfile(filepath); return track; } let's also create a playtrack() function, which we can call once a file has been fetched. we need an
offset here, so if we have started one file playing, we have a record of how far through to start another file. start() takes two optional parameters. the first is when to commence playback and the second is where, which is our
offset. ...
...And 6 more matches
nsAString (External)
urce parameters char* aasciistring lowercaseequalsliteral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match this string to a lowercase ascii string. parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string. ...
...onst prunichar*, pruint32)) const - source find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const nsastring&, pruint32, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsastring& astr pruint32 a
offset print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase print32 find(const char*, pruint32, prbool) const - source parameters ...
...of astr, or -1 if not found parameters nsastring& astr pruint32 a
offset print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase print32 find(const char*, pruint32, prbool) const - source parameters char* astr pruint32 a
offset prbool aignorecase rfind print32 rfind(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the last occurrence of astr in this string. @return the
offset of astr from the beginning of the string, or -1 if not found. parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c print32 rfind(const nsastring&, print32, print32 (*)...
...And 6 more matches
nsISelection
?????????????????????????????????. ...
...r selection = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsiselection); method overview void addrange(in nsidomrange range); void collapse(in nsidomnode parentnode, in long
offset); [noscript,notxpcom,nostdcall] boolean collapsed(); void collapsenative(in nsidomnode parentnode, in long
offset); native code only! void collapsetoend(); void collapsetostart(); boolean containsnode(in nsidomnode node, in boolean partlycontained); void deletefromdocument(); void extend(in nsidomnode parentnode, in long
offset); void extendnative(in nsidomnode parentnode, in long
offset); native code only! nsidomrange getrangeat(in long index)...
... void removeallranges(); void removerange(in nsidomrange range); void selectallchildren(in nsidomnode parentnode); void selectionlanguagechange(in boolean langrtl); domstring tostring(); attributes attribute type description anchornode nsidomnode returns the node in which the selection begins. read only. anchor
offset long the
offset within the (text) node where the selection begins. read only. focusnode nsidomnode returns the node in which the selection ends. read only. focus
offset long the
offset within the (text) node where the selection ends. read only. iscollapsed boolean indicates if the selection is collapsed() or not. read only. rangecount ...
...And 6 more matches
filter - CSS: Cascading Style Sheets
repeat scroll 0% 0% rgb(238, 238, 238); text-align: left; font-weight: bold; } table.standard-table td { padding: 5px; border: 1px solid rgb(204, 204, 204); text-align: left; vertical-align: top; width:25%; height:auto; } #img3 { height:100%; } drop-shadow() the drop-shadow() function applies a drop shadow effect to the input image. a drop shadow is effectively a blurred,
offset 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 inset keyword is not allowed. this function is similar to the more established box-shadow property; the difference is that with filters, some browsers provide hardware acceleration for better p...
...posited below the image. the function accepts a parameter of type <shadow> (defined in css3 backgrounds), with the exception that the inset keyword is not allowed. this function is similar to the more established box-shadow property; the difference is that with filters, some browsers provide hardware acceleration for better performance. the parameters of the <shadow> parameter are as follows: <
offset-x> <
offset-y> (required) these are two <length> values to set the shadow
offset. <
offset-x> specifies the horizontal distance. negative values place the shadow to the left of the element. <
offset-y> specifies the vertical distance. negative values place the shadow above the element. see <length> for possible units. if both values are 0, the shadow is placed behind the element (and may generate ...
... specified, the color used depends on the browser - it is usually the value of the <color> property, but note that safari currently paints a transparent shadow in this case. ...
...And 6 more matches
Date and time formats used in HTML - HTML: Hypertext Markup Language
seconds are optional when zero, and the normalized string minimizes the length of the string. global date and time strings a global date and time string specifies a date and time as well as the time zone in which it occurs. a valid global date and time string is the same format as a local date and time string, except it has a time zone string appended to the end, following the time. ...
...ero, and the normalized string minimizes the length of the string. global date and time strings a global date and time string specifies a date and time as well as the time zone in which it occurs. a valid global date and time string is the same format as a local date and time string, except it has a time zone string appended to the end, following the time. ...
...ng minimizes the length of the string. global date and time strings a global date and time string specifies a date and time as well as the time zone in which it occurs. a valid global date and time string is the same format as a local date and time string, except it has a time zone string appended to the end, following the time. ...
...And 6 more matches
begin - SVG: Scalable Vector Graphics
the begin attribute defines when an animation should begin or when an element should be discarded. the attribute value is a semicolon separated list of values. the interpretation of a list of start times is detailed in the smil specification in "evaluation of begin and end time lists". each individual value can be one of the following : <
offset-value>, <syncbase-value>, <event-value>, <repeat-value>, <accesskey-value>, <wallclock-sync-value> or the keyword indefinite. six elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <discard>, and <set> animate, animatecolor, animatemotion, animatetransform, set for <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>, begin defines when the element should begin, i.e. become active. ...
...atecolor, animatemotion, animatetransform, set for <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>, begin defines when the element should begin, i.e. become active. value <begin-value-list> default value 0s animatable no the <begin-value-list> is a semicolon-separated list of values. each value can be one of the following: <
offset-value> this value defines a clock-value that represents a point in time relative to the beginning of the svg document (usually the load or domcontentloaded event). negative values are valid. <syncbase-value> this value defines a syncbase and an optional
offset from that syncbase. the element's animation start time is defined relative to the begin or active end of another animation. a valid sy...
...the animation start time is defined relative to the time that the specified event is fired. ...
...And 6 more matches
NS ConvertASCIItoUTF16 external
eral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match this string to a lowercase ascii string. parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const nsastring&, pruint32, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsastring& astr pruint32 a
offset print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase ...
...nt32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase print32 find(const char*, pruint32, prbool) const - source parameters char* astr pruint32 a
offset prbool aignorecase rfind print32 rfind(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the last occurrence of astr in this string. @return the
offset of astr from the beginning of the string, or -1 if not found. parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c ...
...And 5 more matches
NS ConvertUTF8toUTF16 external
eral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match this string to a lowercase ascii string. parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const nsastring&, pruint32, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsastring& astr pruint32 a
offset print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase ...
...nt32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase print32 find(const char*, pruint32, prbool) const - source parameters char* astr pruint32 a
offset prbool aignorecase rfind print32 rfind(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the last occurrence of astr in this string. @return the
offset of astr from the beginning of the string, or -1 if not found. parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c ...
...And 5 more matches
PromiseFlatString (External)
eral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match this string to a lowercase ascii string. parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const nsastring&, pruint32, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsastring& astr pruint32 a
offset print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase ...
...nt32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase print32 find(const char*, pruint32, prbool) const - source parameters char* astr pruint32 a
offset prbool aignorecase rfind print32 rfind(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the last occurrence of astr in this string. @return the
offset of astr from the beginning of the string, or -1 if not found. parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c ...
...And 5 more matches
nsAutoString (External)
eral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match this string to a lowercase ascii string. parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const nsastring&, pruint32, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsastring& astr pruint32 a
offset print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase ...
...nt32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase print32 find(const char*, pruint32, prbool) const - source parameters char* astr pruint32 a
offset prbool aignorecase rfind print32 rfind(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the last occurrence of astr in this string. @return the
offset of astr from the beginning of the string, or -1 if not found. parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c ...
...And 5 more matches
nsDependentString external
eral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match this string to a lowercase ascii string. parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const nsastring&, pruint32, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsastring& astr pruint32 a
offset print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase ...
...nt32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase print32 find(const char*, pruint32, prbool) const - source parameters char* astr pruint32 a
offset prbool aignorecase rfind print32 rfind(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the last occurrence of astr in this string. @return the
offset of astr from the beginning of the string, or -1 if not found. parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c ...
...And 5 more matches
nsDependentSubstring external
aseequalsliteral(const char*) const - source case-insensitive match this string to a lowercase ascii string. parameters char aasciistring find(const nsastring&, print32 (*) print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string. ...
...occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsastring astr print32* c find(const nsastring&, pruint32, print32 (*) print32 find(const nsastring&, pruint32, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsastring astr pruint32 a
offset print32* c find print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char astr prbool aignorecase print32 find(co...
...int32 a
offset print32* c find print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char astr prbool aignorecase print32 find(const char*, pruint32, prbool) const - source parameters char astr pruint32 a
offset prbool aignorecase rfind(const nsastring&, print32 (*) print32 rfind(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the last occurrence of astr in this string. @return the
offset of astr from the beginning of the string, or -1 if not found. parameters nsastring astr print32* c ...
...And 5 more matches
nsStringContainer (External)
eral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match this string to a lowercase ascii string. parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const nsastring&, pruint32, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsastring& astr pruint32 a
offset print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase ...
...nt32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase print32 find(const char*, pruint32, prbool) const - source parameters char* astr pruint32 a
offset prbool aignorecase rfind print32 rfind(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the last occurrence of astr in this string. @return the
offset of astr from the beginning of the string, or -1 if not found. parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c ...
...And 5 more matches
nsString external
eral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match this string to a lowercase ascii string. parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string. ...
... find the first occurrence of astr in this string. @return the
offset of astr, or -1 if not found parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const nsastring&, pruint32, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string, beginning at a
offset. @return the
offset of astr, or -1 if not found parameters nsastring& astr pruint32 a
offset print32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase ...
...nt32 (*)(prunichar*, prunichar*, pruint32) c print32 find(const char*, prbool) const - source find an ascii string within this string. @return the
offset of astr, or -1 if not found. parameters char* astr prbool aignorecase print32 find(const char*, pruint32, prbool) const - source parameters char* astr pruint32 a
offset prbool aignorecase rfind print32 rfind(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the last occurrence of astr in this string. @return the
offset of astr from the beginning of the string, or -1 if not found. parameters nsastring& astr print32 (*)(prunichar*, prunichar*, pruint32) c ...
...And 5 more matches
KeyframeEffect.setKeyframes() - Web APIs
s are replaced with a sequence of empty keyframes. there are two different ways to format keyframes: an array of objects (keyframes) consisting of properties and values to iterate over. this is the canonical format returned by the getkeyframes() method. element.animate([ { // from opacity: 0, color: "#fff" }, { // to opacity: 1, color: "#000" } ], 2000);
offsets for each keyframe can be specified by providing an
offset value. element.animate([ { opacity: 1 }, { opacity: 0.1,
offset: 0.7 }, { opacity: 0 } ], 2000); note:
offset values, if provided, must be between 0.0 and 1.0 (inclusive) and arranged in ascending order. it is not necessary to specify an
offset for every keyframe. keyfram...
... the easing to apply between keyframes can be specified by providing an easing value as illustrated below. ...
...-value pairs consisting of the property to animate and an array of values to iterate over. element.animate({ opacity: [ 0, 1 ], // [ from, to ] color: [ "#fff", "#000" ] // [ from, to ] }, 2000); using this format, the number of elements in each array does not need to be equal. the provided values will be spaced out independently. ...
...And 5 more matches
Color picker tool - CSS: Cascading Style Sheets
sl'); else this.setpickermode('hsv'); }.bind(this)); this.node.appendchild(button); }; /*************************************************************************/ // updates properties of ui elements /*************************************************************************/ colorpicker.prototype.updatecolor = function updatecolor(e) { var x = e.pagex - this.picking_area.
offsetleft; var y = e.pagey - this.picking_area.
offsettop; var picker_
offset = 5; // width and height should be the same var size = this.picking_area.clientwidth; if (x > size) x = size; if (y > size) y = size; if (x < 0) x = 0; if (y < 0) y = 0; var value = 100 - (y * 100 / size) | 0; var saturation = x * 100 / size | 0; if (this.picker_mode === 'hsv') this.color.sethsv(thi...
...if (x > size) x = size; if (y > size) y = size; if (x < 0) x = 0; if (y < 0) y = 0; var value = 100 - (y * 100 / size) | 0; var saturation = x * 100 / size | 0; if (this.picker_mode === 'hsv') this.color.sethsv(this.color.hue, saturation, value); if (this.picker_mode === 'hsl') this.color.sethsl(this.color.hue, saturation, value); this.color_picker.style.left = x - picker_
offset + 'px'; this.color_picker.style.top = y - picker_
offset + 'px'; this.updatealphagradient(); this.updatepreviewcolor(); this.notify('value', value); this.notify('lightness', value); this.notify('saturation', saturation); this.notify('red', this.color.r); this.notify('green', this.color.g); this.notify('blue', this.color.b); this.notify('hexa', this.color.gethexa()); notif...
...tify('value', value); this.notify('lightness', value); this.notify('saturation', saturation); this.notify('red', this.color.r); this.notify('green', this.color.g); this.notify('blue', this.color.b); this.notify('hexa', this.color.gethexa()); notify(this.topic, this.color); }; colorpicker.prototype.updatehueslider = function updatehueslider(e) { var x = e.pagex - this.hue_area.
offsetleft; var width = this.hue_area.clientwidth; if (x < 0) x = 0; if (x > width) x = width; // todo 360 => 359 var hue = ((359 * x) / width) | 0; // if (hue === 360) hue = 359; this.updatesliderposition(this.hue_picker, x); this.sethue(hue); }; colorpicker.prototype.updatealphaslider = function updatealphaslider(e) { var x = e.pagex - this.alpha_area.
offsetleft; var width = ...
...And 5 more matches
end - SVG: Scalable Vector Graphics
d value for the animation that can constrain the active duration. five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> usage notes default value none value <end-value-list> animatable no the <end-value-list> is a semicolon-separated list of values. each value can be one of the following: <
offset-value> this value defines a clock-value that represents a point in time relative to the beginning of the svg document (usually the load or domcontentloaded event). negative values are valid. <syncbase-value> this value defines a syncbase and an optional
offset from that syncbase. the element's animation end time is defined relative to the begin or active end of another animation. a valid sync...
...the animation end time is defined relative to the time that the specified event is fired. ...
...the animation end time is defined relative to the time that the specified event is fired. a valid event-value consists of an element id followed by a dot and one of the supported events for that element. ...
...And 5 more matches
The new nsString class implementation (1999) - Archive of obsolete content
truct nsstrimpl, given below: struct nsstrimpl { print32 mlength; void* mbuffer; print32 mcapacity; char mcharsize; char munused; // and now for the nsstrimpl api... static void ensurecapacity(nsstrimpl& astring,pruint32 anewlength); static void growcapacity(nsstrimpl& astring,pruint32 anewlength); static void append(nsstrimpl& adest,const nsstrimpl& asource,pruint32 an
offset,print32 acount); static void appendcstring(nsstrimpl& adest,const char* asource,pruint32 an
offset,print32 acount); static void assign(nsstrimpl& adest,const nsstrimpl& asource,pruint32 an
offset,print32 acount); static void assigncstring(nsstrimpl& adest,const char* asource,pruint32 an
offset,print32 acount); // assign a char or a substring into the existing string... static void insert...
...appendcstring(nsstrimpl& adest,const char* asource,pruint32 an
offset,print32 acount); static void assign(nsstrimpl& adest,const nsstrimpl& asource,pruint32 an
offset,print32 acount); static void assigncstring(nsstrimpl& adest,const char* asource,pruint32 an
offset,print32 acount); // assign a char or a substring into the existing string... ...
...t,print32 acount); static void assign(nsstrimpl& adest,const nsstrimpl& asource,pruint32 an
offset,print32 acount); static void assigncstring(nsstrimpl& adest,const char* asource,pruint32 an
offset,print32 acount); // assign a char or a substring into the existing string... ...
...And 4 more matches
Square tilemaps implementation: Scrolling maps - Game development
ate the last tile to be rendered. ...
...ow = 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
offset by. since the camera is pointing at (5, 10), we know that the first tile should be shifted by (-5,-10) pixels. in our demo the shifting amount is stored in the
offsetx and
offsety variables. ...
...e); 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
offset by. since the camera is pointing at (5, 10), we know that the first tile should be shifted by (-5,-10) pixels. in our demo the shifting amount is stored in the
offsetx and
offsety variables. ...
...And 4 more matches
Drawing graphics - Learn web development
the top left corner. this is very useful in many situations, like this one, where we want our design to be drawn relative to the center of the canvas. now add the following code to the bottom of the javascript: function degtorad(degrees) { return degrees * math.pi / 180; }; function rand(min, max) { return math.floor(math.random() * (max-min+1)) + (min); } let length = 250; let move
offset = 20; for(var i = 0; i < length; i++) { } here we are implementing the same degtorad() function we saw in the triangle example above, a rand() function that returns a random number between given lower and upper bounds, length and move
offset variables (which we'll find out more about later), and an empty for loop. the idea here is that we'll draw something on the canvas inside the for l...
...th and move
offset variables (which we'll find out more about later), and an empty for loop. the idea here is that we'll draw something on the canvas inside the for loop, and iterate on it each time so we can create something interesting. ...
...ffset variables (which we'll find out more about later), and an empty for loop. the idea here is that we'll draw something on the canvas inside the for loop, and iterate on it each time so we can create something interesting. ...
...And 4 more matches
WebGL2RenderingContext.uniform[1234][uif][v]() - Web APIs
eger, i for integer, f for float, and v for vector. not all combinations are valid: u cannot be combined with f. see the syntax table below. ...
...e valid: u cannot be combined with f. see the syntax table below. ...
... regex: uniform[1234](u?i|f)v? ...
...And 4 more matches
Keyframe Formats - Web APIs
s to this format, which are explained below. syntax there are two different ways to format keyframes: an array of objects (keyframes) consisting of properties and values to iterate over. this is the canonical format returned by the getkeyframes() method. element.animate([ { // from opacity: 0, color: "#fff" }, { // to opacity: 1, color: "#000" } ], 2000);
offsets for each keyframe can be specified by providing an
offset value. element.animate([ { opacity: 1 }, { opacity: 0.1,
offset: 0.7 }, { opacity: 0 } ], 2000); note:
offset values, if provided, must be between 0.0 and 1.0 (inclusive) and arranged in ascending order. it is not necessary to specify an
offset for every keyframe. keyfram...
... the easing to apply between keyframes can be specified by providing an easing value as illustrated below. ...
...-value pairs consisting of the property to animate and an array of values to iterate over. element.animate({ opacity: [ 0, 1 ], // [ from, to ] color: [ "#fff", "#000" ] // [ from, to ] }, 2000); using this format, the number of elements in each array does not need to be equal. the provided values will be spaced out independently. ...
...And 4 more matches
Patterns - SVG: Scalable Vector Graphics
erns patterns are arguably one of the more confusing fill types to use in svg. they're also very powerful, so they're worth talking about and getting at least a fundamental grasp on. like gradients, the <pattern> element should be put in the <defs> section of your svg file. ...
...onfusing fill types to use in svg. they're also very powerful, so they're worth talking about and getting at least a fundamental grasp on. like gradients, the <pattern> element should be put in the <defs> section of your svg file. ...
...asp on. like gradients, the <pattern> element should be put in the <defs> section of your svg file. ...
...And 4 more matches
jspage - Archive of obsolete content
ype==3){g=g.parentnode;}if(j.test(/key/)){var b=a.which||a.keycode;var m=event.keys.keyof(b);if(j=="keydown"){var d=b-111; if(d>0&&d<13){m="f"+d;}}m=m||string.fromcharcode(b).tolowercase();}else{if(j.match(/(click|mouse|menu)/i)){k=(!k.compatmode||k.compatmode=="css1compat")?k.html:k.body; var i={x:a.pagex||a.clientx+k.scrollleft,y:a.pagey||a.clienty+k.scrolltop};var c={x:(a.pagex)?a.pagex-f.pagex
offset:a.clientx,y:(a.pagey)?a.pagey-f.pagey
offset:a.clienty}; if(j.match(/dommousescroll|mousewheel/)){var h=(a.wheeldelta)?a.wheeldelta/120:-(a.detail||0)/3;}var e=(a.which==3)||(a.button==2);var l=null;if(j.match(/over|out/)){switch(j){case"mouseover":l=a.relatedtarget||a.fromelement; break;case"mouseout":l=a.relatedtarget||a.toelement;}if(!(function(){while(l&&l.nodetype==3){l=l.parentnode;}return t...
...omputedstyle(g);}if(a){a=string(a);var c=a.match(/rgba?\([\d\s,]+\)/); if(c){a=a.replace(c[0],c[0].rgbtohex());}}if(browser.engine.presto||(browser.engine.trident&&!$chk(parseint(a,10)))){if(g.test(/^(height|width)$/)){var b=(g=="width")?["left","right"]:["top","bottom"],d=0; b.each(function(h){d+=this.getstyle("border-"+h+"-width").toint()+this.getstyle("padding-"+h).toint();},this);return this["
offset"+g.capitalize()]-d+"px"; }if((browser.engine.presto)&&string(a).test("px")){return a;}if(g.test(/(border(.+)width|margin|padding)/)){return"0px";}}return a;},setstyles:function(b){for(var a in b){this.setstyle(a,b[a]); }return this;},getstyles:function(){var a={};array.flatten(arguments).each(function(b){a[b]=this.getstyle(b);},this);return a;}});element.styles=new hash({left:"@px",top:"@px",bott...
...ar d=e+"width",a=e+"style",c=e+"color"; f[e]={};f.borderwidth[d]=f[e][d]=b[d]="@px";f.borderstyle[a]=f[e][a]=b[a]="@";f.bordercolor[c]=f[e][c]=b[c]="rgb(@, @, @)";});(function(){element.implement({scrollto:function(h,i){if(b(this)){this.getwindow().scrollto(h,i); }else{this.scrollleft=h;this.scrolltop=i;}return this;},getsize:function(){if(b(this)){return this.getwindow().getsize();}return{x:this.
offsetwidth,y:this.
offsetheight}; },getscrollsize:function(){if(b(this)){return this.getwindow().getscrollsize();}return{x:this.scrollwidth,y:this.scrollheight};},getscroll:function(){if(b(this)){return this.getwindow().getscroll(); }return{x:this.scrollleft,y:this.scrolltop};},getscrolls:function(){var i=this,h={x:0,y:0};while(i&&!b(i)){h.x+=i.scrollleft;h.y+=i.scrolltop;i=i.parentnode; }return h;},get...
...And 3 more matches
Build the brick field - Game development
(); } now onto the function itself. add the initbricks() function at the end of our games code, just before the closing </script> tag, as shown below. ...
...kinfo = { width: 50, height: 20, count: { row: 3, col: 7 },
offset: { top: 50, left: 60 }, padding: 10 }; } this brickinfo object will hold all the information we need: the width and height of a single brick, the number of rows and columns of bricks we will see on screen, the top and left
offset (the location on the canvas where we shall start to draw the bricks) and the padding between each row and column of bricks. now, let's start creating the bricks themselves — add an empty group first to contain the bricks, by adding the following line at the bottom of the initbricks() function: bricks = game.add.group(); we can loop through the rows and columns to create new brick on each it...
...t 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. the problem currently is that we're painting all the bricks in one place, at coordinates (0,0). what we need to do is draw each brick at its own x and y position. update the brickx and bricky lines as follows: var brickx = (c*(brickinfo.width+brickinfo.padding))+brickinfo.
offset.left; var bricky = (r*(brickinfo.height+brickinfo.padding))+brickinfo.
offset.top; each brickx position is worked out as brickinfo.width plus brickinfo.padding, multiplied by the column number, c, plus the brickinfo.
offset.left; the logic for the bricky is identical except that it uses the values for row number, r, brickinfo.height, and brickinfo.
offset.top. now every single brick can be placed ...
...And 3 more matches
Introduction to CSS layout - Learn web development
milar to absolute positioning, except that it fixes an element relative to the browser viewport, not another element. this is useful for creating effects such as a persistent navigation menu that always stays in the same place on the screen as the rest of the content scrolls. sticky positioning is a newer positioning method which makes an element act like position: static until it hits a defined
offset from the viewport, at which point it acts like position: fixed. simple positioning example to provide familiarity with these page layout techniques, we'll show you a couple of quick examples. our examples will all feature the same html, which is as follows: <h1>positioning</h1> <p>i am a basic block level element.</p> <p class="positioned">i am a basic block level element.</p> <p>i am a basi...
...this means you could achieve a task such as moving an icon down a bit so it lines up with a text label. to do this, we could add the following rule to add relative positioning: .positioned { position: relative; top: 30px; left: 30px; } here we give our middle paragraph a position value of relative — this doesn't do anyth...
... going back to our original non-positioned example, we could add the following css rule to implement absolute positioning: .positioned { position: absolute; top: 30px; left: 30px; } here we give our middle paragraph a position value of absolute, and the same top and left properties as before. adding this code, however, will give the following result:...
...And 3 more matches
PR_Seek64
pr_seek_cur. ...
... pr_seek_cur. ...
... pr_seek_cur. ...
...And 3 more matches
Introduction to the JavaScript shell
internalizes the specified string into the atom table. every string has a unique identifier, called an atom. this system makes it easier to do comparisons between strings. note: this function is intended only for use when testing the javascript engine. line2pc([function, ] line) returns the program counter value corresponding to the specified line of code. if function is specified, line is an
offset into the specified function. load(filename1 [filename]) loads the javascript files with the specified names. note: for loading non-javascript files, use read(). options([option ...]) lets you set or get options. if you specified options on the command line, the results of calling options will indicate which options you requested. you can also pass in new options to set. the available option...
...tion strict strict mode is enabled. werror warnings should be treated as errors. atline when atline is enabled, comments of the form //@line num set the number of the following line to num. pc2line(function, [pc]) returns the line number of the javascript code that corresponds to the first line of the specified function. if you specify a program counter
offset into the function, the line number of the line of code containing that
offset is returned. print([expression ...]) evaluates the expression(s) and displays the result(s) on stdout, separated by spaces (" ") and terminated by a newline ("\n"). putstr(expression) evaluates the expression and displays the result on stdout. quit([status]) exits the shell. status defaults to 0 if omitted. read(...
...upported. returns true on success, false if the sleep was interrupted. stackquota([number]) get or set the script stack quota. throwerror() throws an error from the js_reporterror() function. note: this function is intended only for use when testing the javascript engine. trap([function, [pc,]] expression) sets a trap at the specific point in the javascript code. when the bytecode at the
offset specified by pc in the function function is about to be executed, the expression is evaluated. this is a powerful debugging mechanism when used in concert with line2pc(). for example, if you want to display a message when line 6 of a function, dosomething() is executed, you can enter the following: trap(dosomething, line2pc(dosomething, 6), "print('line 6!\n')"); note: when a trap is set, the...
...And 3 more matches
Index
pcom interface reference this interface is typically used in conjunction with the iaccessibletext interface and complements that interface with the additional capability of clipboard operations. note that even a read only text object can support the copy capability so this interface is not limited to editable objects. the substrings used with this interface are specified as follows: if start
offset is less than end
offset, the substring starts with the character at start
offset and ends with the character just before end
offset. if end
offset is lower than start
offset, the result is the same as a call with the two arguments exchanged. the whole text can be defined by passing the indices zero and iaccessibletext.ncharacters(). if both indices have the same value, an empty string is defined. refe...
...t, the substring starts with the character at start
offset and ends with the character just before end
offset. if end
offset is lower than start
offset, the result is the same as a call with the two arguments exchanged. the whole text can be defined by passing the indices zero and iaccessibletext.ncharacters(). if both indices have the same value, an empty string is defined. refer to the @ref _special
offsets "special
offsets for use in the iaccessibletext and iaccessibleeditabletext methods" for information about a special
offset constant that can be used in iaccessibleeditabletext methods. 166 iaccessiblehyperlink interfaces, xpcom, xpcom interface reference this interface represents a hyperlink associated with a single substring of text or single non-text object. non-text obje...
...y this feature would not be implemented by an application. however, if the application developer was not satisfied with how screen readers have handled the reading of sentences this boundary type could be implemented and screen readers could use the application's version of a sentence rather than the screen reader's. the rest of the boundary types must be supported. this enum is used in textbefore
offset(), textat
offset(), and textafter
offset(). 174 iaccessiblevalue interfaces, xpcom, xpcom interface reference the iaccessiblevalue interface represents a single numerical value and should be implemented by any class that supports numerical value like progress bars and spin boxes. this interface lets you access the value and its upper and lower bounds. 175 idispatch ...
...And 3 more matches
nsISelection2
add a summary to this article. 1.0 66 introduced gecko 1.8 obsolete gecko 8.0 inherits from: nsiselection last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) in gecko 8.0 this interface was merged into the nsiselectionprivate interface. ...
... 66 introduced gecko 1.8 obsolete gecko 8.0 inherits from: nsiselection last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) in gecko 8.0 this interface was merged into the nsiselectionprivate interface. ...
...e was merged into the nsiselectionprivate interface. ...
...And 3 more matches
CanvasRenderingContext2D.shadowColor - Web APIs
the canvasrenderingcontext2d.shadowcolor property of the canvas 2d api specifies the color of shadows. be aware that the shadow's rendered opacity will be affected by the opacity of the fillstyle color when filling, and of the strokestyle color when stroking. note: shadows are only drawn if the shadowcolor property is set to a non-transparent value. ...
...e canvasrenderingcontext2d.shadowcolor property of the canvas 2d api specifies the color of shadows. be aware that the shadow's rendered opacity will be affected by the opacity of the fillstyle color when filling, and of the strokestyle color when stroking. note: shadows are only drawn if the shadowcolor property is set to a non-transparent value. ...
...w
offsetx, or shadow
offsety properties must be non-zero, as well. syntax ctx.shadowcolor = color; color a domstring parsed as a css <color> value. the default value is fully-transparent black. examples adding a shadow to shapes this example adds a shadow to two squares; the first one is filled, and the second one is stroked. the shadowcolor property sets the shadows' color, while shadow
offsetx and shadow
offsety set their position relative to the shapes. ...
...And 3 more matches
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
syntax var caretposition = document.caretpositionfrompoint(float x, float y); parameters x the horizontal coordinate of a point. y the vertical coordinate of a point. returns a caretposition object. example this example inserts line breaks wherever you click. the code for it is below the demo. ...
...ontent <p>lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. at vero eos et accusam et justo duo dolores et ea rebum. ...
...yam erat, sed diam voluptua. at vero eos et accusam et justo duo dolores et ea rebum. ...
...And 3 more matches
Range.setEnd() - Web APIs
return value undefined. ...
... return value undefined. ...
... return value undefined. ...
...And 3 more matches
StaticRange - Web APIs
he default values for its properties. properties the properties below are inherited from its parent interface, abstractrange. staticrange.collapsed read only returns a boolean value which is true if the range's start and end positions are the same, resulting in a range of length 0. staticrange.endcontainer read only returns the dom node which contains the ending point of the range. ...
...inherited from its parent interface, abstractrange. staticrange.collapsed read only returns a boolean value which is true if the range's start and end positions are the same, resulting in a range of length 0. staticrange.endcontainer read only returns the dom node which contains the ending point of the range. the
offset into the node at which the end position is located is indicated by end
offset. ...
...t interface, abstractrange. staticrange.collapsed read only returns a boolean value which is true if the range's start and end positions are the same, resulting in a range of length 0. staticrange.endcontainer read only returns the dom node which contains the ending point of the range. the
offset into the node at which the end position is located is indicated by end
offset. ...
...And 3 more matches
WebGLRenderingContext.getParameter() - Web APIs
gl.renderer domstring gl.sample_buffers glint gl.sample_coverage_invert glboolean gl.sample_coverage_v...
... gl.renderer domstring gl.sample_buffers glint gl.sample_coverage_invert glboolean gl.sample_coverage_value glfloat gl.samples glint ...
... gl.renderer domstring gl.sample_buffers glint gl.sample_coverage_invert glboolean gl.sample_coverage_value glfloat gl.samples glint gl.scissor_box int32array (with 4...
...And 3 more matches
Using the Web Animations API - Web APIs
mething most web developers have played with before: css animations. css animations have a familiar syntax that breaks down nicely for demonstration purposes. 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
offset from her spinning. we’re going to focus on just alice for this tutorial. here’s the simplified css that controls alice’s animation: #alice { animation: alicetumbling infinite 3s linear; } @keyframes alicetumbling { 0% { color: #000; transform: rotate(0) translate3d(-50%, -50%, 0); } 30% { color: #431236; } 100% { color: #000; transform: rotate(360deg) trans...
...k to a deep burgundy then back again by the end of the loop. moving it to javascript now let’s try creating the same animation with the web animations api. 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',
offset: 0.3}, { transform: 'rotate(360deg) translate3d(-50%, -50%, 0)', color: '#000' } ]; here we’re using an array containing multiple objects. each object represents a key from the original css. however, unlike css, the web animations api doesn’t need to explicitly be told the percentages along the animation for each key to appear at. it will automatically divide the animation into equal parts...
...ions api doesn’t need to explicitly be told the percentages along the animation for each key to appear at. it will automatically divide the animation into equal parts based on the number of keys you give it. this means that a keyframe object with three keys will play the middle key 50% of the way through each loop of the animation unless told otherwise. when we want to explicitly set a key’s
offset from the other keys, we can specify an
offset directly in the object, separated from the declaration with a comma. in the above example, to make sure that alice’s color changes at 30% (not 50%) for the color change, we are giving it
offset: 0.3. currently, there should be at least two keyframes specified (representing the starting and ending states of the animation sequence). if your keyframe ...
...And 3 more matches
Window.scrollX - Web APIs
ound it off. in more technical terms, scrollx returns the x coordinate of the left edge of the current viewport. if there is no viewport, the returned value is 0. example this example checks the current horizontal scroll position of the document. if it's greater than 400 pixels, the window is scrolled back to the beginning. ...
...inate of the left edge of the current viewport. if there is no viewport, the returned value is 0. example this example checks the current horizontal scroll position of the document. if it's greater than 400 pixels, the window is scrolled back to the beginning. ...
... is 0. example this example checks the current horizontal scroll position of the document. if it's greater than 400 pixels, the window is scrolled back to the beginning. if (window.scrollx > 400) { window.scroll(0,0); } notes the pagex
offset property is an alias for the scrollx property: window.pagex
offset == window.scrollx; // always true for cross-browser compatibility, use window.pagex
offset instead of window.scrollx. ...
...And 3 more matches
Window.scrollY - Web APIs
he returned value is 0. example // make sure and go down to the second page if (window.scrolly) { window.scroll(0, 0); // reset the scroll position to the top left of the document. } window.scrollbypages(1); notes use this property to check that the document hasn't already been scrolled when using relative scroll functions such as scrollby(), scrollbylines(), or scrollbypages(). ...
...econd page if (window.scrolly) { window.scroll(0, 0); // reset the scroll position to the top left of the document. } window.scrollbypages(1); notes use this property to check that the document hasn't already been scrolled when using relative scroll functions such as scrollby(), scrollbylines(), or scrollbypages(). ...
... top left of the document. } window.scrollbypages(1); notes use this property to check that the document hasn't already been scrolled when using relative scroll functions such as scrollby(), scrollbylines(), or scrollbypages(). the pagey
offset property is an alias for the scrolly property: window.pagey
offset === window.scrolly; // always true for cross-browser compatibility, use window.pagey
offset instead of window.scrolly. ...
...And 3 more matches
XRReferenceSpace - Web APIs
i's xrreferencespace interface describes the coordinate system for a specific tracked entity or object within the virtual world using a specified tracking behavior. the tracking behavior is defined by the selected reference space type. it expands upon the base class, xrspace, by adding support for several different tracking behaviors as well as to request a new reference space which describes the
offset transform between the tracked object and another location in the world. all reference spaces—with the sole exception being bounded reference spaces—are described using the xrreferencespace type. bounded spaces are implemented as xrboundedreferencespace objects. these are special spaces which let you establish a perimeter within which it's "safe" for the viewer to move. for xr systems that al...
...herited from xrspace (of which there are none at this time), xrreferencespace also inherits the properties of eventtarget. xrreferencespace defines no additional properties. methods in addition to the methods inherited from its parent interface, xrspace (there are none at this time), xrreferencespace inherits methods from eventtarget. xrreferencespace also provides the following methods. get
offsetreferencespace() creates and returns a new reference space object as the same type as the one on which you call the method (so, either xrreferencespace or xrboundedreferencespace). the new reference space can be used to transform a coordinate from the reference space of the object on which the method is called into a different coordinate space. this is useful for positioning objects while render...
... viewer a tracking space whose native origin tracks the viewer's position and orientation. this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions. it's particularly useful when determining the distance between the viewer and an input, or when working with
offset spaces. otherwise, typically, one of the other reference space types will be used more often. xrreferencespace usage notes creating an xrreferencespace there are two situations in which you need to obtain an xrreferencespace. the first is when you set up your scene and need to obtain a reference space to represent the user's viewpoint on the world for the duration of the xrsession. t...
...And 3 more matches
Coordinate systems - CSS: Cascading Style Sheets
when specifying the location of a pixel in a graphics context (just like when specifying coordinate systems in algebra), its position is defined relative to a fixed point in the context. this fixed point is called the origin. the position is specified as the number of pixels
offset from the origin along each dimension of the context. this guide describes the standard coordinate systems used by the css object model. these are generally only different in terms of where their origin is located. dimensions in the coordinate systems used by web technologies, convention dictates that the horizontal
offset 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 offse...
...rom the viewer if positive and toward the viewer if negative. it's actually possible to change the definitions and orientations of these coordinate systems using css properties such as transform. however, we'll only talk about the standard coordinate system for now. standard cssom coordinate systems there are four standard coordinate systems used by the css object model, as described below.
offset coordinates specified using the "
offset" model use the top-left corner of the element being examined, or on which an event has occurred. for example, when a mouse event occurs, the position of the mouse as specified in the event's
offsetx and
offsety properties are given relative to the top-left corner of the node to which the event has been delivered. the origin is inset by the distances speci...
...variables idx and idy are set to strings with the names of the properties corresponding to the coordinates in the given coordinate system. for example, if the value of type is "page", then idx is "pagex" and idy is "pagey". handling the mouse events setcoords() is called by the event handler for the various mouse events, named update(); this is shown below. function update(e) { setcoords(e, "
offset"); setcoords(e, "client"); setcoords(e, "page"); setcoords(e, "screen"); } inner.addeventlistener("mouseenter", update, false); inner.addeventlistener("mousemove", update, false); inner.addeventlistener("mouseleave", update, false); the event handler is in the update() method. it simply calls setcoords() once for each coordinate system, passing in the event that occurred. our main code s...
...And 3 more matches
spreadMethod - SVG: Scalable Vector Graphics
x1, x2, y1 and y2 attributes. in the case of a radial gradient, the edges may be defined as outer and inner circles by the cx, cy and r (outer) and fx, fy and fr (inner) attributes. ...
...radial gradient, the edges may be defined as outer and inner circles by the cx, cy and r (outer) and fx, fy and fr (inner) attributes. ...
...gradients svg <svg width="220" height="150" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="padgradient" x1="33%" x2="67%"> <stop
offset="0%" stop-color="fuchsia"/> <stop
offset="100%" stop-color="orange"/> </lineargradient> <lineargradient id="reflectgradient" spreadmethod="reflect" x1="33%" x2="67%"> <stop
offset="0%" stop-color="fuchsia"/> <stop
offset="100%" stop-color="orange"/> </lineargradient> <lineargradient id="repeatgradient" spreadmethod="repeat" x1="33%" x2="67%"> <stop
offset="0%" stop-color="fuchsia"/> <stop
offset="100%" stop-color="orange"/> </lineargradient> </defs> <rect fill="url(#padgradient)" x="10" y="0" width="200" h...
...And 3 more matches
<feComponentTransfer> - SVG: Scalable Vector Graphics
tes core attributes presentation attributes filter primitive attributes class style specific attributes in dom interface this element implements the svgfecomponenttransferelement interface. ...
...ter primitive attributes class style specific attributes in dom interface this element implements the svgfecomponenttransferelement interface. ...
...ibutes in dom interface this element implements the svgfecomponenttransferelement interface. ...
...And 3 more matches
SVG documentation index - SVG: Scalable Vector Graphics
the bias attribute shifts the range of the filter. after applying the kernelmatrix of the <feconvolvematrix> element to the input image to yield a number and applied the divisor attribute, the bias attribute is added to each component. this allows representation of values that would otherwise be clamped to 0 or 1. 36 by svg, svg attribute the by attribute specifies a relative
offset value for an attribute that will be modified during an animation. 37 calcmode needscompattable, needsexample, svg, svg attribute the calcmode attribute specifies the interpolation mode for the animation. 38 cap-height deprecated, svg, svg attribute the cap-height attribute defines the height of uppercase glyphs of the font within the font coordinate syste...
... value the stronger the reflection. 190 specularexponent filters, svg, svg attribute the specularexponent attribute controls the focus for the light source. the bigger the value the brighter the light. 191 spreadmethod svg, svg attribute the spreadmethod attribute determines how a shape is filled beyond the defined edges of a gradient. 192 start
offset svg, svg attribute the start
offset attribute defines an
offset from the start of the path for the initial current text position along the path after converting the path to the <textpath> element's coordinate system. 193 stddeviation filters, svg, svg attribute the stddeviation attribute defines the standard deviation for the blur operation. 194 stemh ...
... 205 stroke-linecap svg, svg attribute the stroke-linecap attribute is a presentation attribute defining the shape to be used at the end of open subpaths when they are stroked. 206 stroke-linejoin reference, s...
...And 3 more matches
SVG Filters Tutorial - SVG: Scalable Vector Graphics
stddeviation attribute. svg filter example <defs> <filter id="drop-shadow"> <fegaussianblur in="sourcealpha" stddeviation="3"/> </filter> </defs> <g id="ghost" style="filter: url(#drop-shadow);"/> <!--ghost drawing in here--> </g> this above example will not produced the desired output. instead we need to add more filter primitives which will produce the desire rendering. ...
...hadow);"/> <!--ghost drawing in here--> </g> this above example will not produced the desired output. instead we need to add more filter primitives which will produce the desire rendering. by adding fe
offset and result, the effect layer is defined <result> attribute is a reference that can be use later. it is quite different to an xml id and only can be referenced within the actual filter. <fe
offset> primitive has the blur result from the gaussian blur. ...
...imitives which will produce the desire rendering. by adding fe
offset and result, the effect layer is defined <result> attribute is a reference that can be use later. it is quite different to an xml id and only can be referenced within the actual filter. <fe
offset> primitive has the blur result from the gaussian blur. ...
...And 3 more matches
Understanding WebAssembly text format - WebAssembly
h returns an arraybuffer that points at the whole linear memory. memory instances can also grow, for example via the memory.grow() method in javascript. when growth occurs, since arraybuffers can’t change size, the current arraybuffer is detached and a new arraybuffer is created to point to the newer, bigger memory. ...
...fer is detached and a new arraybuffer is created to point to the newer, bigger memory. this means all we need to do to pass a string to javascript is to pass out the
offset of the string in linear memory along with some way to indicate the length. while there are many different ways to encode a string’s length in the string itself (for example, c strings); for simplicity here we just pass both
offset and length as parameters: (import "console" "log" (func $log (param i32) (param i32))) on the javascript side, we can use the textdecoder api to easily decode our bytes into a javascript string. ...
... string’s length in the string itself (for example, c strings); for simplicity here we just pass both
offset and length as parameters: (import "console" "log" (func $log (param i32) (param i32))) on the javascript side, we can use the textdecoder api to easily decode our bytes into a javascript string. (we specify utf8 here, but many other encodings are supported.) function consolelogstring(
offset, length) { var bytes = new uint8array(memory.buffer,
offset, length); var string = new textdecoder('utf8').decode(bytes); console.log(string); } the last missing piece of the puzzle is where consolelogstring gets access to the webassembly memory. webassembly gives us a lot of flexibility here: we can either create a memory object in javascript and have the webassembly module import the mem...
...And 3 more matches
Positioning - Archive of obsolete content
re is not enough room to display the menu at full size below or to the right. if there is not enough room on either side, the menu will be shrunk down to fit. for popups attached using the popup or context attributes, the default position to appear is with the upper left corner (or upper right corner in right to left locales) at the position where the mouse was clicked. context menus will appear
offset down and to the right a couple of pixels so that the menu can be dismissed again just by clicking in the same place. if a context menu was opened via the keyboard only, the menu will appear at the top left corner of the document, or underneath the currently selected item if a list is focused. context menus will always appear in this location, and not respect any position attribute value. toolti...
...enu can be dismissed again just by clicking in the same place. if a context menu was opened via the keyboard only, the menu will appear at the top left corner of the document, or underneath the currently selected item if a list is focused. context menus will always appear in this location, and not respect any position attribute value. tooltips will always appear near the current mouse position,
offset vertically by a small amount. the position attribute the position of all types of popups can be controlled in two ways. first, the position can be specified when using the popup's openpopup method. this is used when a popup is opened by a script. second, the position can be specified using several attributes placed on the menupopup, panel or tooltip element. these attributes are described below...
...tton or toolbarbutton. for a menupopup or panel attached using the popup attribute, the position attribute controls how the popup is anchored to the element with the popup attribute. for a context menu, that is, a menu that is attached to an an element using the context attribute and opened via context-clicking the mouse, the position attribute is ignored. the menu appears at the mouse position
offset by a couple of pixels so that the user can close the context menu just by clicking in the same location. for a tooltip, the position attribute controls how the tooltip is anchored to the element with the tooltip attribute. you wouldn't normally use the position attribute on a tooltip; instead you would just want the tooltip to appear at its default position which is near the mouse pointer. for...
...And 2 more matches
Build the brick field - Game development
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. add the following lines to your code below the variables which you have previously declared in your program. var brickrowcount = 3; var brickcolumncount = 5; var brickwidth = 75; var brickheight = 20; var brickpadding = 10; var brick
offsettop = 30; var brick
offsetleft = 30; here we've defined the number of rows and columns of bricks , their width and height, the padding between the bricks so they won't touch each other and a top and left
offset so they won't start being drawn right from the edge of the canvas. we will hold all our bricks in a two-dimensional array. it will contain the brick columns (c), which in turn will contain...
...e x and y position of each brick, and we're also painting a brick on the canvas — size brickwidth x brickheight — with each loop iteration. the problem is that we're painting them all in one place, at coordinates (0,0). what we need to do is include some calculations that will work out the x and y position of each brick for each loop iteration: var brickx = (c*(brickwidth+brickpadding))+brick
offsetleft; var bricky = (r*(brickheight+brickpadding))+brick
offsettop; each brickx position is worked out as brickwidth + brickpadding, multiplied by the column number, c, plus the brick
offsetleft; the logic for the bricky is identical except that it uses the values for row number, r, brickheight, and brick
offsettop. now every single brick can be placed in its correct place row and column, with paddin...
...+brickpadding))+brick
offsettop; each brickx position is worked out as brickwidth + brickpadding, multiplied by the column number, c, plus the brick
offsetleft; the logic for the bricky is identical except that it uses the values for row number, r, brickheight, and brick
offsettop. now every single brick can be placed in its correct place row and column, with padding between each brick, drawn at an
offset from the left and top canvas edges. the final version of the drawbricks() function, after assigning the brickx and bricky values as the coordinates instead of (0,0) each time, will look like this — add this into your code below the drawpaddle() function: function drawbricks() { for(var c=0; c<brickcolumncount; c++) { for(var r=0; r<brickrowcount; r++) { var brickx = (c...
...And 2 more matches
IME handling guide
e data: mtext whole text in focused editor. this may be too big but ime may request all text in the editor. if we can separate editor contents per paragraph, moving selection between paragraphs generates pseudo focus move, we can reduce this size and runtime cost of contenteventhandler. however, we've not had a plan to do that yet. note that microsoft word uses this hack. ...
... editor contents per paragraph, moving selection between paragraphs generates pseudo focus move, we can reduce this size and runtime cost of contenteventhandler. however, we've not had a plan to do that yet. note that microsoft word uses this hack. mcompositionstart
offset of composition string in mtext. when there is no composition, this is uint32_max. mselection::manchor, mselection::mfocus
offset of selection anchor and focus in mtext. mselection::mwritingmode writing mode at selection start. mselection::manchorcharrect, mselection::mfocuscharrect next character rect of mselection::manchor and mselection::mfocus. if correspoinding
offset is end of the editor contents, its rect should be caret rect. these rects shouldn't be empty rect. mselection::mrect unifiied character rect in se...
... mtextrectarray::mstart if there is composition, mstart is same as mcompositionstart. otherwise, uint32_max. ...
...And 2 more matches
Index
follows rfc 1113. for certificate requests, ascii output defaults to standard output unless redirected. -b validity-time specify a time at which a certificate is required to be valid. use when checking certificate validity with the -v option. the format of the validity-time argument is yymmddhhmmss[+hhmm|-hhmm|z], which allows
offsets to be set relative to the validity end time. specifying seconds (ss) is optional. when specifying an explicit time, use a z at the end of the term, yymmddhhmmssz, to close it. when specifying an
offset time, use yymmddhhmmss+hhmm or yymmddhhmmss-hhmm for adding or subtracting time, respectively. if this option is not used, the validity chec...
... o c (as an ssl client) o v (as an ssl server) o s (as an email signer) o r (as an email recipient) o o (as an ocsp status responder) o j (as an object signer) -v valid-months set the number of months a new certificate will be valid. the validity period begins at the current system time unless an
offset is added or subtracted with the -w option. if this argument is not used, the default validity period is three months. when this argument is used, the default three-month period is automatically added to any value given in the valid-month argument. for example, using this option to set a value of 3 would cause 3 to be added to the t...
...alid-month argument. for example, using this option to set a value of 3 would cause 3 to be added to the three-month default, creating a validity period of six months. you can use negative values to reduce the default period. for example, setting a value of -2 would subtract 2 from the default and create a validity period of one month. -w
offset-months set an
offset from the current system time, in months, for the beginning of a certificate's validity period. use when creating the certificate or adding it to a database. express the
offset in integers, using a minus sign (-) to indicate a negative
offset. if this argument is not used, the validity period begins at the curr...
...And 2 more matches
NSS Tools certutil
efaults to standard output unless redirected. -b validity-time specify a time at which a certificate is required to be valid. use when checking certificate validity with the -v option. the format of thevalidity-time argument is "yymmddhhmmss[+hhmm|-hhmm|z]". specifying seconds (ss) is optional. when specifying an explicit time, use "yymmddhhmmssz". when specifying an
offset time, use "yymmddhhmmss+hhmm" or "yymmddhhmmss-hhmm". if this option is not used, the validity check defaults to the current system time. -c issuer identify the certificate of the ca from which a new certificate will derive its authenticity. use the exact nickname or alias of the ca certificate, or use the ca's email address. bracket theissuer string with quotation m...
... specify a usage context to apply when validating a certificate with the -v option. the contexts are the following: c (as an ssl client) v (as an ssl server) s (as an email signer) r (as an email recipient) -v valid-months set the number of months a new certificate will be valid. the validity period begins at the current system time unless an
offset is added or subtracted with the -w option. if this argument is not used, the default validity period is three months. when this argument is used, the default three-month period is automatically added to any value given in thevalid-month argument. for example, using this option to set a value of 3 would cause 3 to be added to the three-month default, creating a validity period of six months. you c...
...atically added to any value given in thevalid-month argument. for example, using this option to set a value of 3 would cause 3 to be added to the three-month default, creating a validity period of six months. you can use negative values to reduce the default period. for example, setting a value of -2 would subtract 2 from the default and create a validity period of one month. -w
offset-months set an
offset from the current system time, in months, for the beginning of a certificate's validity period. use when creating the certificate or adding it to a database. express the
offset in integers, using a minus sign (-) to indicate a negative
offset. if this argument is not used, the validity period begins at the current system time. the length of the validity period is s...
...And 2 more matches
certutil
follows rfc 1113. for certificate requests, ascii output defaults to standard output unless redirected. -b validity-time specify a time at which a certificate is required to be valid. use when checking certificate validity with the -v option. the format of the validity-time argument is yymmddhhmmss[+hhmm|-hhmm|z], which allows
offsets to be set relative to the validity end time. specifying seconds (ss) is optional. when specifying an explicit time, use a z at the end of the term, yymmddhhmmssz, to close it. when specifying an
offset time, use yymmddhhmmss+hhmm or yymmddhhmmss-hhmm for adding or subtracting time, respectively. if this option is not used, the validity chec...
... o c (as an ssl client) o v (as an ssl server) o s (as an email signer) o r (as an email recipient) o o (as an ocsp status responder) o j (as an object signer) -v valid-months set the number of months a new certificate will be valid. the validity period begins at the current system time unless an
offset is added or subtracted with the -w option. if this argument is not used, the default validity period is three months. when this argument is used, the default three-month period is automatically added to any value given in the valid-month argument. for example, using this option to set a value of 3 would cause 3 to be added to the t...
...alid-month argument. for example, using this option to set a value of 3 would cause 3 to be added to the three-month default, creating a validity period of six months. you can use negative values to reduce the default period. for example, setting a value of -2 would subtract 2 from the default and create a validity period of one month. -w
offset-months set an
offset from the current system time, in months, for the beginning of a certificate's validity period. use when creating the certificate or adding it to a database. express the
offset in integers, using a minus sign (-) to indicate a negative
offset. if this argument is not used, the validity period begins at the curr...
...And 2 more matches
nsIAccessibleEditableText
mplemented void settextcontents(in astring text); attributes attribute type description associatededitor nsieditor returns an editor associated with the accessible. read only. native code only! methods copytext() copies the text range into the clipboard. ...
... attributes attribute type description associatededitor nsieditor returns an editor associated with the accessible. read only. native code only! methods copytext() copies the text range into the clipboard. void copytext( in long startpos, in long endpos ); parameters startpos start
offset of the text to be copied into the clipboard. endpos end
offset of the text to be copied into the clipboard. ...
...parameters startpos start
offset of the text to be copied into the clipboard. endpos end
offset of the text to be copied into the clipboard. exceptions thrown ns_error_failure indicates the text cannot be copied into the clipboard. cuttext() deletes a range of text and copies it to the clipboard. void cuttext( in long startpos, in long endpos ); parameters startpos start
offset of the text to be deleted and copied to clipboard. endpos end
offset of the text to be copied into the clipboard. exceptions thrown ns_error_failure indicates the text cannot be deleted or copied into the clipboard. deletetext() deletes a range of text. void deletetext( in long startpos, in long endpos ); parameters startpos start
offset of the text to be deleted. endpos e...
...And 2 more matches
Document.caretRangeFromPoint() - Web APIs
osition: html <p>lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. at vero eos et accusam et justo duo dolores et ea rebum. ...
...na aliquyam erat, sed diam voluptua. at vero eos et accusam et justo duo dolores et ea rebum. ...
..., sed diam voluptua. at vero eos et accusam et justo duo dolores et ea rebum. ...
...And 2 more matches
GlobalEventHandlers.onkeypress - Web APIs
pasting (since pasted content might include non-number characters) input.onpaste = event => false; result capture the typing of a hidden word the following javascript function will do something after the user types the word "exit" in any point of a page. /* type the word "exit" in any point of your page... ...
...*/ alert("yesss!!!"); location.assign("https://developer.mozilla.org/"); } return true; }; })(); note: a more complete framework for capturing the typing of hidden words is available on gi...
...*/ alert("yesss!!!"); location.assign("https://developer.mozilla.org/"); } return true; }; })(); note: a more complete framework for capturing the typing of hidden words is available on github. specificat...
...And 2 more matches
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
offsets. syntax var keyframes = keyframeeffect.getkeyframes(); parameters none. return value returns a sequence of objects with the following format: property value pairs as many property value pairs as are contained in each keyframe of the animation.
offset the
offset of the keyframe specified as a number between 0.0 and 1.0 inclusive or null. this is equivalent to specifying start and end states in percentages in css stylesheets using @keyframes. ...
... easing the timing function used from this keyframe until the next keyframe in the series. ...
... easing the timing function used from this keyframe until the next keyframe in the series. ...
...And 2 more matches
WebGL2RenderingContext.getBufferSubData() - Web APIs
possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data. gl.element_array_buffer: buffer used for element indices. ...
...possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data. gl.element_array_buffer: buffer used for element indices. ...
...ing from one buffer object to another. gl.copy_write_buffer: buffer for copying from one buffer object to another. gl.transform_feedback_buffer: buffer for transform feedback operations. gl.uniform_buffer: buffer used for storing uniform blocks. gl.pixel_pack_buffer: buffer used for pixel transfer operations. gl.pixel_unpack_buffer: buffer used for pixel transfer operations. ...
...And 2 more matches
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
the webgl2renderingcontext.uniformmatrix[234]x[234]fv() methods of the webgl 2 api specify matrix values for uniform variables. there are no 2x2, 3x3, and 4x4 versions of this method. they are abbreviated in 2, 3, and 4, respectively. see the syntax below. ...
...niformmatrix[234]x[234]fv() methods of the webgl 2 api specify matrix values for uniform variables. there are no 2x2, 3x3, and 4x4 versions of this method. they are abbreviated in 2, 3, and 4, respectively. see the syntax below. ...
...les. there are no 2x2, 3x3, and 4x4 versions of this method. they are abbreviated in 2, 3, and 4, respectively. see the syntax below. ...
...And 2 more matches
WebGLRenderingContext.bufferSubData() - Web APIs
possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data. ...
...possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data. ...
...possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data. ...
...And 2 more matches
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
the webglrenderingcontext.compressedtexsubimage2d() method of the webgl api specifies a two-dimensional sub-rectangle for a texture image in a compressed format. compressed image formats must be enabled by webgl extensions before using this method or a webgl2renderingcontext must be used. ...
... the webglrenderingcontext.compressedtexsubimage2d() method of the webgl api specifies a two-dimensional sub-rectangle for a texture image in a compressed format. compressed image formats must be enabled by webgl extensions before using this method or a webgl2renderingcontext must be used. ...
...ngle for a texture image in a compressed format. compressed image formats must be enabled by webgl extensions before using this method or a webgl2renderingcontext must be used. syntax // webgl 1: void gl.compressedtexsubimage2d(target, level, x
offset, y
offset, width, height, format, arraybufferview? pixels); // additionally available in webgl 2: void gl.compressedtexsubimage2d(target, level, x
offset, y
offset, width, height, format, imagesize,
offset); void gl.compressedtexsubimage2d(target, level, x
offset, y
offset, width, height, format, arraybufferview srcdata, optional src
offset, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active compressed texture. possible values: gl.texture_2d: a two-dimensional texture. gl.texture_cu...
...And 2 more matches
Geometry and reference spaces in WebXR - Web APIs
esponding to a specific physical location in the user's environment. each space has its own native origin, which is tracked by the xr device's tracking system. this may be different from the effective origin, which is the origin point for the space's local coordinate system. the directionality of the coordinate system can be seen in the following diagram: an xrrigidtransform called the origin
offset is used to transform points from the space's own effective coordinate system to the xr device's native coordinate system. the origin
offset is initially simply an identity transform, since typically the two origins are aligned when the space is first established. however, as changes in alignment accumulate over time the origin
offset may change to compensate. the position of a point in space rel...
... -1.0 at the bottom of the world's space. the z-axis extends from the origin outward from the screen, reaching +1.0 at the closest point to the user in that direction. negative values of z extend away from the user further into the screen, with the farthest away point in the world having a z of -1.0. every object is, at the simplest level, a set of polygons defined by points in 3d space and an
offset transform, indicating how to move and rotate the object to position it at the desired point in space. if the
offset transform is an identity matrix, the object is located at the origin point. to be useful for spatial tracking and scene geometry, though, you need to be able to correlate the xr device's perceived position with the space's coordinate system. that's where reference spaces come in. ...
... viewer a tracking space whose native origin tracks the viewer's position and orientation. this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions. it's particularly useful when determining the distance between the viewer and an input, or when working with
offset spaces. otherwise, typically, one of the other reference space types will be used more often. xrreferencespace the remainder of this guide explores how to select the right reference space for your app's needs. defining spatial relationships with reference spaces there are a number of commonly used ways to reference the positions and orientations of objects relative to their environme...
...And 2 more matches
drop-shadow() - CSS: Cascading Style Sheets
the drop-shadow() css function applies a drop shadow effect to the input image. its result is a <filter-function>. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...et version of the input image's alpha mask, drawn in a specific color and composited below the image. note: this function is somewhat similar to the box-shadow property. the box-shadow property creates a rectangular shadow behind an element's entire box, while the drop-shadow() filter function creates a shadow that conforms to the shape (alpha channel) of the image itself. ...
...n of the input image's alpha mask, drawn in a specific color and composited below the image. note: this function is somewhat similar to the box-shadow property. the box-shadow property creates a rectangular shadow behind an element's entire box, while the drop-shadow() filter function creates a shadow that conforms to the shape (alpha channel) of the image itself. ...
...And 2 more matches
position - CSS: Cascading Style Sheets
a pull request. syntax the position property is specified as a single keyword chosen from the list of values below. values static the element is positioned according to the normal flow of the document. the top, right, bottom, left, and z-index properties have no effect. this is the default value. relative the element is positioned according to the normal flow of the document, and then
offset relative to itself based on the values of top, right, bottom, and left. the
offset 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. this value creates a new stacking context when the value of z-index is not auto. its effect on table-*-group, table-row, table-column, table-cell, and table-caption e...
...e browser inconsistencies with perspective and filter contributing to containing block formation.) its final position is determined by the values of top, right, bottom, and left. this value always creates a new stacking context. in printed documents, the element is placed in the same position on every page. sticky the element is positioned according to the normal flow of the document, and then
offset relative to its nearest scrolling ancestor and containing block (nearest block-level ancestor), including table-related elements, based on the values of top, right, bottom, and left. the
offset does not affect the position of any other elements. this value always creates a new stacking context. note that a sticky element "sticks" to its nearest ancestor that has a "scrolling mechanism" (created ...
... any "sticky" behavior (see the github issue on w3c csswg). description types of positioning a positioned element is an element whose computed position value is either relative, absolute, fixed, or sticky. (in other words, it's anything except static.) a relatively positioned element is an element whose computed position value is relative. the top and bottom properties specify the vertical
offset from its normal position; the left and right properties specify the horizontal
offset. an absolutely positioned element is an element whose computed position value is absolute or fixed. the top, right, bottom, and left properties specify
offsets from the edges of the element's containing block. (the containing block is the ancestor relative to which the element is positioned.) if the element has...
...And 2 more matches
DataView.prototype.setBigInt64() - JavaScript
value the value to set as a bigint. the highest possible value that fits in a signed 64-bit integer is 2n ** (64n -1n) - 1n (9223372036854775807n). ...
... value the value to set as a bigint. the highest possible value that fits in a signed 64-bit integer is 2n ** (64n -1n) - 1n (9223372036854775807n). ...
... value the value to set as a bigint. the highest possible value that fits in a signed 64-bit integer is 2n ** (64n -1n) - 1n (9223372036854775807n). upon overflow, it will be negative (-9223372036854775808n). ...
...And 2 more matches
DataView.prototype.setBigUint64() - JavaScript
value the value to set as a bigint. the highest possible value that fits in an unsigned 64-bit integer is 2n ** 64n - 1n (18446744073709551615n). ...
... value the value to set as a bigint. the highest possible value that fits in an unsigned 64-bit integer is 2n ** 64n - 1n (18446744073709551615n). ...
... value the value to set as a bigint. the highest possible value that fits in an unsigned 64-bit integer is 2n ** 64n - 1n (18446744073709551615n). upon overflow, it will be zero (0n). ...
...And 2 more matches
for - JavaScript
.log(i); if (i > 3) break; // more statements } you can also omit all three blocks. again, make sure to use a break statement to end the loop and also modify (increase) a variable, so that the condition for the break statement is true at some point. ...
...crease) a variable, so that the condition for the break statement is true at some point. var i = 0; for (;;) { if (i > 3) break; console.log(i); i++; } using for without a statement the following for cycle calculates the
offset position of a node in the final-expression section, and therefore it does not require the use of a statement section, a semicolon is used instead. ...
...out a statement the following for cycle calculates the
offset position of a node in the final-expression section, and therefore it does not require the use of a statement section, a semicolon is used instead. ...
...And 2 more matches
cx - SVG: Scalable Vector Graphics
the cx attribute define the x-axis coordinate of a center point. 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
offset="0" stop-color="white" /> <stop
offset="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-percentage> default value 0 animatable yes note: starting with svg2 cx, is a geometry property,...
...roperty for ellipses. radialgradient for <radialgradient>, cx defines the x-axis coordinate of the end circle for the radial gradient. ...
...ialgradient>, cx defines the x-axis coordinate of the end circle for the radial gradient. ...
...And 2 more matches
cy - SVG: Scalable Vector Graphics
the cy attribute define the y-axis coordinate of a center point. 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
offset="0" stop-color="white" /> <stop
offset="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> | <percentage> default value 0 animatable yes note: starting with svg2, cy is a geometry pro...
...roperty for ellipses. radialgradient for <radialgradient>, cy defines the y-axis coordinate of the end circle for the radial gradient. ...
...ialgradient>, cy defines the y-axis coordinate of the end circle for the radial gradient. ...
...And 2 more matches
dx - SVG: Scalable Vector Graphics
the dx attribute indicates a shift along the x-axis on the position of an element or its content. ...
...ple values, dx defines a shift along the x-axis for each individual glyph relative to the preceding glyph. if there are less values than glyphs, the remaining glyphs use a value of 0. if there are more values than glyphs, extra values are ignored. value list of <length> default value none animatable yes fedropshadow for <fedropshadow>, dx defines the x
offset of the droped shadow. the unit used to resolve the value of the attribute is set by the primitiveunits attribute of the <filter> element. value <number> default value 2 animatable yes fe
offset for <fe
offset>, dx defines the x
offset of the filter input graphic. the unit used to resolve the value of the attribute is set by the primitiveunits attribute o...
... value <number> default value 0 animatable yes text for <text>, if it contains a single value, dx defines a shift along the x-axis for all glyphs. if there are multiple values, dx defines a shift along the x-axis for each individual glyph relative to the preceding glyph. ...
...And 2 more matches
dy - SVG: Scalable Vector Graphics
the dy attribute indicates a shift along the y-axis on the position of an element or its content. ...
... values, dy defines a shift along the y-axis for each individual glyph relative to the preceding glyph. if there are less values than glyphes, the remaining glyphes use a value of 0. if there are more values than glyphes, extra values are ignored. value list of <length> default value none animatable yes fedropshadow for <fedropshadow>, dy defines the y
offset of the dropped shadow. the unit used to resolve the value of the attribute is set by the primitiveunits attribute of the <filter> element. value <number> default value 2 animatable yes fe
offset for <fe
offset>, dy defines the y
offset of the filter input graphic. the unit used to resolve the value of the attribute is set by the primitiveunits attribute ...
... value <number> default value 0 animatable yes text for <text>, if it contains a single value, dy defines a shift along the y-axis for all glyphs. if there are multiple values, dy defines a shift along the y-axis for each individual glyph relative to the preceding glyph. ...
...And 2 more matches
fx - SVG: Scalable Vector Graphics
the fx attribute defines the x-axis coordinate of the focal point for a radial gradient. ...
...defines the x-axis coordinate of the focal point for a radial gradient. ...
...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
offset="0%" stop-color="white"/> <stop
offset="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
offset="0%" stop-color="white"/> <stop
offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r="100" fill="url(#gradient2)" style="transform: translatex(240px);" /> </svg> usage notes value <length> default value coincides with the presentational value of cx f...
...And 2 more matches
fy - SVG: Scalable Vector Graphics
the fy attribute defines the y-axis coordinate of the focal point for a radial gradient. ...
...defines the y-axis coordinate of the focal point for a radial gradient. ...
...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
offset="0%" stop-color="white"/> <stop
offset="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
offset="0%" stop-color="white"/> <stop
offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r="100" fill="url(#gradient2)" style="transform: translatex(240px);" /> </svg> usage notes value <length> default value coincides with the presentational value of cy f...
...And 2 more matches
Index - Archive of obsolete content
iwithflags xul methods, xul reference (see nsiwebnavigation.loaduri() for details on the referrer and postdata parameters.) 1263 makeeditable xul methods, xul reference no summary! 1264 menulist.appenditem xul methods, xul reference no summary! 1265 menulist.select xul methods, xul reference no summary! 1266 moveby
offset xul methods, xul reference no summary! 1267 movetabto xul methods, xul reference no summary! 1268 moveto xul methods, xul reference no summary! 1269 movetoalertposition xul methods, xul reference no summary! 1270 onfindagaincommand no summary! 1271 onsearchcomplete needshelp, xul methods,...
...ndard, reference, recipe:css-property the -ms-wrap-flow css property is a microsoft extension that specifies how exclusions impact inline content within block-level elements. 2132 -ms-wrap-margin css, css property, css:microsoft extensions, non-standard, reference, recipe:css-property the -ms-wrap-margin css property is a microsoft extension that specifies a margin that
offsets the inner wrap shape from other shapes. 2133 -ms-wrap-through css, css property, css:microsoft extensions, non-standard, reference, recipe:css-property the -ms-wrap-through css property is a microsoft extension that specifies how content should wrap around an exclusion element. 2134 :-moz-full-screen-ancestor css, css:mozilla extensions, deprecated, non-standa...
...es a simple tone generator, and plays the resulting tone. the function requestsounddata() produces the samples to be played. this function is called at a certain interval through the setinterval() function. the function mozwriteaudio() is called to write those samples produced in the audio stream. in order to always have samples to play, a buffer of 500 ms is created. the function mozcurrentsample
offset() is used to know the position of the samples being played so that we can fill a 500 ms buffer of audio samples. 3418 defining cross-browser tooltips css, cross-browser_development, guide, junk, web development summary: authors are used to having alt text appear as a "tooltip" above images, but that's not how it was meant to be used. learn how to define "toolti...
...process by which the geometry of the layout engine's formatting objects are computed. the html formatting objects are called frames : a frame corresponds to the geometric information for (roughly) a single element in the content model; the frames are arranged into a hierarchy that parallels the containment hierarchy in the content model. a frame is rectangular, with width, height, and an
offset from the parent frame that contains it. 3427 same-origin policy for file: uris same-origin policy, security, xmlhttprequest in gecko 1.8 or earlier, any two file: uris are considered to be same-origin. in other words, any html file on your local disk can read any other file on your local disk. 3428 source navigator note: this document is still in the dr...
Introducing the Audio API extension - Archive of obsolete content
00); var samples = new float32array(22050); for (var i = 0; i < samples.length ; i++) { samples[i] = math.sin( i / 20 ); } output.mozwriteaudio(samples); } </script> </head> <body> <p>this demo plays a one second tone when you click the button below.</p> <button onclick="playtone();">play</button> </body> </html> the mozcurrentsample
offset() method gives the audible position of the audio stream, meaning the position of the last heard sample. // get current audible position of the underlying audio stream, measured in samples. var currentsample
offset = audiooutput.mozcurrentsample
offset(); audio data written using the mozwriteaudio() method needs to be written at a regular interval in equal portions, in order to keep a little ahea...
...ble position of the audio stream, meaning the position of the last heard sample. // get current audible position of the underlying audio stream, measured in samples. var currentsample
offset = audiooutput.mozcurrentsample
offset(); audio data written using the mozwriteaudio() method needs to be written at a regular interval in equal portions, in order to keep a little ahead of the current sample
offset (the sample
offset that is currently being played by the hardware can be obtained with mozcurrentsample
offset()), where "a little" means something on the order of 500 ms of samples. for example, if working with two channels at 44100 samples per second, a writing interval of 100 ms, and a pre-buffer equal to 500 ms, one would write an array of (2 * 44100 / 10) = 8820 samples, and a total of (curre...
...mple
offset that is currently being played by the hardware can be obtained with mozcurrentsample
offset()), where "a little" means something on the order of 500 ms of samples. for example, if working with two channels at 44100 samples per second, a writing interval of 100 ms, and a pre-buffer equal to 500 ms, one would write an array of (2 * 44100 / 10) = 8820 samples, and a total of (currentsample
offset + 2 * 44100 / 2). it's also possible to auto-detect the minimal duration of the pre-buffer, such that the sound is played without interruptions, and lag between writing and playback is minimal. to do this start writing the data in small portions and wait for the value returned by mozcurrentsample
offset() to be greater than 0. var prebuffersize = samplerate * 0.020; // initial buffer is 20 ms va...
...iting the data in small portions and wait for the value returned by mozcurrentsample
offset() to be greater than 0. var prebuffersize = samplerate * 0.020; // initial buffer is 20 ms var autolatency = true, started = new date().valueof(); ... // auto latency detection if (autolatency) { prebuffersize = math.floor(samplerate * (new date().valueof() - started) / 1000); if (audio.mozcurrentsample
offset()) { // play position moved? autolatency = false; } processing an audio stream since the mozaudioavailable event and the mozwriteaudio() method both use float32array values, it is possible to take the output of one audio stream and pass it directly (or process first and then pass) to a second. the first audio stream needs to be muted so that only the second audio element is heard. <audio ...
Table Cellmap - Archive of obsolete content
ar that in the cells that are the origin of a table cells one will find a address the more interesting question is, what will be the content in the upper right cell. the bitfield will hold a 0x00090001. ...
...the origin of a table cells one will find a address the more interesting question is, what will be the content in the upper right cell. the bitfield will hold a 0x00090001. ...
...this shows that the maximum handled row- or colspan val...
... row_span_0 0x00000004 // the row span is 0 #define row_span_
offset 0x0000fff8 // the row
offset to the data containing the original cell #define col_span 0x00010000 // there is a col span #define col_span_0 0x00020000 // the col span is 0 #define overlap 0x00040000 // there is a row span and col span but no by same cell #define col_span_
offset 0xfff80000 // the col
offset to the data containing the original cell #define row_span_shift 3 // num bits to shift to get right justified row span #define col_span_shift 19 // num bits to shift to get right justified col span showing that there is a span, this span is a colspan and the colspan origin is one cell away. this shows that the maximum handled row- or colspan value for a cell is 0xfff8 >> 3 =...
Legacy layout methods - Learn web development
les for existing semantic classes. for example, if you had a <div> with a class of content on it that you wanted to span 8 columns, you could copy across the width from the span8 class, giving you a rule like so: .content { width: calc((6.25%*8) + (2.08333333%*7)); } note: if you were to use a preprocessor such as sass, you could create a simple mixin to insert that value for you. enabling
offset containers in our grid the grid we have created works well as long as we want to start all of the containers flush with the left hand side of the grid. if we wanted to leave an empty column space before the first container — or between containers — we would need to create an
offset class to add a left margin to our site to push it across the grid visually. more math! let's try this out. s...
...left hand side of the grid. if we wanted to leave an empty column space before the first container — or between containers — we would need to create an
offset class to add a left margin to our site to push it across the grid visually. more math! let's try this out. start with your previous code, or use our fluid-grid.html file as a starting point. let's create a class in our css that will
offset a container element by one column width. add the following to the bottom of your css: .
offset-by-one { margin-left: calc(6.25% + (2.08333333%*2)); } or if you prefer to calculate the percentages yourself, use this one: .
offset-by-one { margin-left: 10.41666666%; } you can now add this class to any container you want to leave a one column wide empty space on the left hand side of it. for e...
...: calc(6.25% + (2.08333333%*2)); } or if you prefer to calculate the percentages yourself, use this one: .
offset-by-one { margin-left: 10.41666666%; } you can now add this class to any container you want to leave a one column wide empty space on the left hand side of it. for example, if you have this in your html: <div class="col span6">14</div> try replacing it with <div class="col span5
offset-by-one">14</div> note: notice that you need to reduce the number of columns spanned, to make room for the
offset! ...
... want to leave a one column wide empty space on the left hand side of it. for example, if you have this in your html: <div class="col span6">14</div> try replacing it with <div class="col span5
offset-by-one">14</div> note: notice that you need to reduce the number of columns spanned, to make room for the
offset! try loading and refreshing to see the difference, or check out our fluid-grid-
offset.html example (see it running live also). the finished example should look like this: note: as an extra exercise, can you implement an
offset-by-two class? floated grid limitations when using a system like this you do need to take care that your total widths add up correctly, and that you don’t include elements in a row that span more columns than the row can contain. due to the way float...
Extras
o> <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" v
offset="-15px"> <mtext> <svg width="30px" height="30px"> <defs> <radialgradient id="radgrad1" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop
offset="0%" style="stop-color:rgb(255,255,255); stop-opacity:1;"/> <stop
offset="100%" style="stop-color:rgb(255,0,0); stop-opacity:.8;"/> </radialgradient> </defs> <g transform="translate(15,1...
... 10 l 30 15 l 20 20 l 15 30 l 10 20 l 0 15 l 10 10"/> </g> </g> </g> </svg> </mtext> </mpadded> </msqrt> <mo>=</mo> <msubsup> <mo>∫</mo> <mn>0</mn> <mfrac> <mi>π</mi> <mn>2</mn> </mfrac> </msubsup> <msup> <mi>θ</mi> <mtext> <svg width="15px" height="15px"> <defs> <radialgradient id="radgrad2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop
offset="0%" style="stop-color:rgb(255,255,255); stop-opacity:1;"/> <stop
offset="100%" style="stop-color:rgb(0,0,255); stop-opacity:.9;"/> </radialgradient> </defs> <g> <animatemotion path="m0,0 l3,0 l2,5 l5,5 l0,4 l5,2 z" begin="0s" dur="0.5s" repeatcount="indefinite"/> <circle fill="url(#radgrad2)" r="5px" cx="5px" cy="5px"/> </g> </svg> </m...
...l0,4 l5,2 z" begin="0s" dur="0.5s" repeatcount="indefinite"/> <circle fill="url(#radgrad2)" r="5px" cx="5px" cy="5px"/> </g> </svg> </mtext> </msup> <mrow> <mo>ⅆ</mo> <mi>θ</mi> </mrow> </math> <div style="width: 300px; margin-left: auto; margin-right: auto;"> <svg width="300px" height="250px"> <defs> <lineargradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%"> <stop
offset="0%" style="stop-color:rgb(0,0,255);stop-opacity:1"/> <stop
offset="100%" style="stop-color:rgb(0,255,0);stop-opacity:1"/> </lineargradient> <lineargradient id="grad2" x1="0%" y1="0%" x2="0%" y2="100%"> <stop
offset="0%" style="stop-color:rgb(255,0,0);stop-opacity:1"/> <stop
offset="100%" style="stop-color:rgb(255,255,0);stop-opacity:1"/> </lineargradient> <radialgradient id="grad3" cx="50%" cy...
...p-opacity:1"/> <stop
offset="100%" style="stop-color:rgb(0,255,0);stop-opacity:1"/> </lineargradient> <lineargradient id="grad2" x1="0%" y1="0%" x2="0%" y2="100%"> <stop
offset="0%" style="stop-color:rgb(255,0,0);stop-opacity:1"/> <stop
offset="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
offset="0%" style="stop-color:rgb(0,255,255);stop-opacity:1"/> <stop
offset="100%" style="stop-color:rgb(255,255,255);stop-opacity:.8"/> </radialgradient> </defs> <rect width="300" height="250" fill="url(#grad1)"/> <g transform="translate(150,125)"> <g> <animatetransform attributename="transform" attributetype="xml" type="rotate" from="0" to="360" du...
nss tech note1
c_asn1_choice modifier, you must also specify additional templates in a null terminated array to list the various possible types that this component can have. in all other cases, only the first template structure passed to the decoder will be considered, even if additonal templates are passed in an array. when only one template is needed, you do not need a null template to terminate the array. ...
... sub† . this field does not apply to all template types. if kind contains the sec_asn1_inline or sec_asn1_pointer modifiers, then it must point to the required subtemplate. ...
...ed subtemplate to continue processing. this is typically used for sec_asn1_sequence or sec_asn1_choice definitions, which always need to be the first template in a template array of their own. sec_asn1_pointer: similar to sec_asn1_inline, except that the memory in the target will be allocated dynamically and a pointer to the dynamically allocated memory will be stored in the dest struct at the
offset. this requires that the subtemplate contains a non-zero size field. sec_asn1_group: can only be used in conjunction with a sec_asn1_set or sec_asn1_sequence. it tells the decoder that the component is an asn.1 set of or sequence of respectively. you can also use the macros sec_asn1_set_of and sec_asn1_sequence_of which define both the tag number and this modifier (but still need the method typ...
...t: abort the decoding. this is used in a template array within a sequence, if you don't care about the fields at the end of it. sec_asn1decodeitem only supports this modifier in the top-level template. sec_quickderdecodeitem allows it at any nested sublevel. sec_asn1_choice: allows decoding of components that are of variable type. this must be the first template in a null-terminated array. the
offset parameter specifies where to store the type identifier in the target data . subsequent templates specify a custom identifier for each possible component type in the size parameter . sec_asn1_debug_break: makes the decoder assert when processing the template. this option is only supported with sec_quickderdecodeitem . it is useful to debug your templates or when writing new templates if they do...
NSS tools : certutil
ollows rfc 1113. for certificate requests, ascii output defaults to standard output unless redirected. -b validity-time specify a time at which a certificate is required to be valid. use when checking certificate validity with the -v option. the format of the validity-time argument is yymmddhhmmss[+hhmm|-hhmm|z], which allows
offsets to be set relative to the validity end time. specifying seconds (ss) is optional. when specifying an explicit time, use a z at the end of the term, yymmddhhmmssz, to close it. when specifying an
offset time, use yymmddhhmmss+hhmm or yymmddhhmmss-hhmm for adding or subtracting time, respectively. if this option is not ...
...· a (as any ca) · y (verify ca) · s (as an email signer) · r (as an email recipient) · o (as an ocsp status responder) · j (as an object signer) -v valid-months set the number of months a new certificate will be valid. the validity period begins at the current system time unless an
offset is added or subtracted with the -w option. if this argument is not used, the default validity period is three months. when this argument is used, the default three-month period is automatically added to any value given in the valid-month argument. for example, using this option to set a value of 3 would cause 3 to be added to the t...
...gument. for example, using this option to set a value of 3 would cause 3 to be added to the three-month default, creating a validity period of six months. you can use negative values to reduce the default period. for example, setting a value of -2 would subtract 2 from the default and create a validity period of one month. -w
offset-months set an
offset from the current system time, in months, for the beginning of a certificate's validity period. use when creating the certificate or adding it to a database. express the
offset in integers, using a minus sign (-) to indicate a negative
offset. if this argument is not used, the validity period begins at the curre...
...a certificate request is created, a certificate can be generated by using the request and then referencing a certificate authority signing certificate (the issuer specified in the -c argument). the issuing certificate must be in the certificate database in the specified directory. ...
JS::CompileOptions
returns false if it failed to duplicate. methods of js::compileoptions method description jsobject *element() const same as js::owningcompileoptions. jsstring ...
...returns false if it failed to duplicate. ...
... versionset bool true if version is set. utf8 bool true if the character set of the source code is utf-8. lineno unsigned line number of the f...
... run" "js shell disfile" "js shell compfile" "js shell parse" "js shell syntaxparse" "js shell offthreadcompilescript" and the following are used in self-hosted code and debugger: "self-hosted" "debugger eval" introductionlineno unsigned line number in the source code which introduces this source code. introduction
offset uint32_t bytecode
offset in the code which introduces this source code. hasintroductioninfo bool true if setintroductioninfo is called. description in the most common use case, a compileoptions instance is allocated on the stack, and holds non-owning references to non-pod option values: strings; principals; objects; and so on. the code declaring the instance guarantee...
nsIHTMLEditor
void 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 adestination
offset, 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...
...tstring ); parameters ainputstring the string to be inserted. inserthtmlwithcontext() insert some html source, interpreting the string argument according to the given context. ...
... adeleteselection used with adestnode during drag&drop. insertlinkaroundselection() insert an link element as the parent of the current selection. ...
..."yellow" setbodyattribute() set an attribute on the document's <body> element such as text, link, background colors. void setbodyattribute( in astring aattr, in astring avalue ); parameters aattr the attribute to be set. avalue the value of the attribute. setcaretafterelement() create a collapsed selection just after aelement. the selection is set to parent-of-aelement with an
offset 1 greater than aelement's
offset but it enforces the html 4.0 dtd "cancontain" rules, so it should be useful for other elements. void setcaretafterelement( in nsidomelement aelement ); parameters aelement an element in the document. setcssinlineproperty() setinlineproperty() sets the aggregate properties on the current selection. void setcssinlineproperty( in nsiatom aproperty, i...
nsISeekableStream
xpcom/io/nsiseekablestream.idlscriptable provides seeking support in data streams. inherits from: nsisupports last changed in gecko 1.7 method overview void seek(in long whence, in long long
offset); void seteof(); long long tell(); constants constant value description ns_seek_set 0 specifies that the
offset is relative to the start of the stream. ns_seek_cur 1 specifies that the
offset is relative to the current position in the stream. ...
...eek(in long whence, in long long
offset); void seteof(); long long tell(); constants constant value description ns_seek_set 0 specifies that the
offset is relative to the start of the stream. ns_seek_cur 1 specifies that the
offset is relative to the current position in the stream. ns_seek_end 2 specifies that the
offset is relative to the end of the stream. methods seek() this method moves the stream
offset of the stream implementing this interface. ...
... that the
offset is relative to the start of the stream. ns_seek_cur 1 specifies that the
offset is relative to the current position in the stream. ns_seek_end 2 specifies that the
offset is relative to the end of the stream. methods seek() this method moves the stream
offset of the stream implementing this interface. void seek( in long whence, in long long
offset ); parameters whence specifies how to interpret the '
offset' parameter in setting the stream
offset associated with the implementing stream, according to the table of constants above.
offset specifies a value, in bytes, that is used in conjunction with the 'whence' parameter to set the stream
offset of the implementing stream. a negative value causes seeking in the reverse direc...
...stream, according to the table of constants above.
offset specifies a value, in bytes, that is used in conjunction with the 'whence' parameter to set the stream
offset of the implementing stream. a negative value causes seeking in the reverse direction. exceptions thrown ns_base_stream_closed if called on a closed stream. seteof() this method truncates the stream at the current
offset. void seteof(); parameters none. exceptions thrown ns_base_stream_closed if called on a closed stream. tell() this method reports the current
offset, in bytes, from the start of the stream. long long tell(); parameters none. return value the current
offset, in bytes, from the start of the stream. exceptions thrown ns_base_stream_closed if called on a closed stream. ...
AudioBufferSourceNode.start() - Web APIs
the start() method of the audiobuffersourcenode interface is used to schedule playback of the audio data contained in the buffer, or to begin playback immediately. syntax audiobuffersourcenode.start([when][,
offset][, duration]); parameters when optional the time, in seconds, at which the sound should begin to play, in the same time coordinate system used by the audiocontext. if when is less than (audiocontext.currenttime, or if it's 0, the sound begins to play at once. the default value is 0.
offset optional an
offset, 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,
offset should be 5. the default value, 0,...
...to play at once. the default value is 0.
offset optional an
offset, 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,
offset should be 5. the default value, 0, will begin playback at the beginning of the audio buffer, and
offsets past the end of the audio which will be played (based on the audio buffer's duration and/or the loopend property) are silently clamped to the maximum value allowed. ...
... that playback should begin. for example, to start playback halfway through a 10-second audio clip,
offset should be 5. the default value, 0, will begin playback at the beginning of the audio buffer, and
offsets past the end of the audio which will be played (based on the audio buffer's duration and/or the loopend property) are silently clamped to the maximum value allowed. the computation of the
offset into the sound is performed using the sound buffer's natural sample rate, rather than the current playback rate, so even if the sound is playing at twice its normal speed, the midway point through a 10-second audio buffer is still 5. duration optional the duration of the sound to be played, specified in seconds. if this parameter isn't specified, the sound plays until it reaches its natural con...
...even if the sound is playing at twice its normal speed, the midway point through a 10-second audio buffer is still 5. duration optional the duration of the sound to be played, specified in seconds. if this parameter isn't specified, the sound plays until it reaches its natural conclusion or is stopped using the stop() method. using this parameter is functionally identical to calling start(when,
offset) and then calling stop(when+duration). return value undefined. exceptions typeerror a negative value was specified for one or more of the three time parameters. please don't attempt to tamper with the laws of temporal physics. invalidstateerror start() has already been called. you can only call this function once during the lifetime of an audiobuffersourcenode. examples the most simp...
DataTransfer.setDragImage() - Web APIs
ou do not need to create it yourself. however, if a custom image is desired, the datatransfer.setdragimage() method can be used to set the custom image to be used. the image will typically be an <image> element but it can also be a <canvas> or any other visible element. the method's x and y coordinates define how the image should appear relative to the mouse pointer. ...
...define how the image should appear relative to the mouse pointer. these coordinates define the
offset into the image where the mouse cursor should be. for instance, to display the image so that the pointer is at its center, use values that are half the width and height of the image. this method must be called in the dragstart event handler. syntax void datatransfer.setdragimage(img | element, x
offset, y
offset); arguments img | element an image element element to use for the drag feedback image. ...
... return value void example this example shows how to use the setdragimage() method. note the example refers to an image file named example.gif. ...
... arguments img | element an image element element to use for the drag feedback image. if element is an img element, then set the drag data store bitmap to the element's image (at its intrinsic size); otherwise, set the drag data store bitmap to an image generated from the given element (the exact mechanism for doing so is not currently specified). x
offset a long indicating the horizontal
offset within the image. y
offset a long indicating the vertical
offset within the image. return value void example this example shows how to use the setdragimage() method. note the example refers to an image file named example.gif. if that file is present, it will be used as the drag image and if that file is not present, the browser will use its default drag image. demo <!doctype html> <h...
Element.msZoomTo() - Web APIs
scrollable elements and no zooming effect on non-zoomable elements (e.g., elements with "-ms-content-zooming: none"). ...
...and no zooming effect on non-zoomable elements (e.g., elements with "-ms-content-zooming: none"). ...
...e elements (e.g., elements with "-ms-content-zooming: none"). this method has no effect if called from a parent document to scroll or zoom content hosted in an iframe. ...
...lements with "-ms-content-zooming: none"). this method has no effect if called from a parent document to scroll or zoom content hosted in an iframe. ...
Selection.extend() - Web APIs
if not specified, the default value 0 is used. ...
...if not specified, the default value 0 is used. ...
...if not specified, the default value 0 is used. ...
... nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yes
offset parameter is optional experimentalchrome full support yesedge full support ≤79firefox full support 55ie no support noopera full support yessafari full suppo...
VisualViewport - Web APIs
port that's distinct from the layout viewport. therefore, it's generally only the visualviewport object of the top-level window that's useful. for an <iframe>, visual viewport metrics like visualviewport.width always correspond to layout viewport metrics like document.documentelement.clientwidth. properties visualviewport also inherits properties from its parent, eventtarget. visualviewport.
offsetleft read only returns the
offset of the left edge of the visual viewport from the left edge of the layout viewport in css pixels. visualviewport.
offsettop read only returns the
offset of the top edge of the visual viewport from the top edge of the layout viewport in css pixels. visualviewport.pageleft read only returns the x coordinate of the visual viewport relative to the initial contai...
...sual viewport readme, shows how to use this api to simulate position: device-fixed, which fixes elements to the visual viewport. a live sample is also available. var bottombar = document.getelementbyid('bottombar'); var viewport = window.visualviewport; function viewporthandler() { var layoutviewport = document.getelementbyid('layoutviewport'); // since the bar is position: fixed we need to
offset it by the visual // viewport's
offset from the layout viewport origin. var
offsetleft = viewport.
offsetleft; var
offsettop = viewport.height - layoutviewport.getboundingclientrect().height + viewport.
offsettop; // you could also do this by setting style.left and style.top if you // use width: 100% instead. bottombar.style.transform = 'translate(' + ...
...viewport's
offset from the layout viewport origin. var
offsetleft = viewport.
offsetleft; var
offsettop = viewport.height - layoutviewport.getboundingclientrect().height + viewport.
offsettop; // you could also do this by setting style.left and style.top if you // use width: 100% instead. ...
... var
offsetleft = viewport.
offsetleft; var
offsettop = viewport.height - layoutviewport.getboundingclientrect().height + viewport.
offsettop; // you could also do this by setting style.left and style.top if you // use width: 100% instead. bottombar.style.transform = 'translate(' +
offsetleft + 'px,' +
offsettop + 'px) ' + 'scale(' + 1/viewport.scale + ')' } window.visualviewport.addeventlistener('scroll', viewporthandler); window.visualviewport.addeventlistener('resize', viewporthandler); note: this technique should be used with care; emulating position: device-fixed in this way can result in the fixed element flickering during scrolling. specifications spe...
Visual Viewport API - Web APIs
t object provides information about the viewport's position and size, and receives the resize and event:visualviewport:scroll events you can onitor to know when chances occur to the window's viewport. example the code below is based on the sample the specification, though it adds a few things that make it function better. it shows a function called viewporthandler(). when called it queries the
offsetleft and height properties for values it uses in a css translate() method. you invoke this function by passing it to both event calls. one thing that may not be clear in this example is the use of the pendingupdate flag and the call to requestanimationframe(). the pendingupdate flag serves to prevent multiple invocations of the transfrom that can occur when onresize and onscroll fire at the same ...
... the same time. using requestanimationframe() ensures that the transform ocurrs before the next render. let pendingupdate = false; function viewporthandler(event) { if (pendingupdate) return; pendingupdate = true; requestanimationframe(() => { pendingupdate = false; var layoutviewport = document.getelementbyid('layoutviewport'); // since the bar is position: fixed we need to
offset it by the // visual viewport's
offset from the layout viewport origin. var viewport = event.target; var
offsetleft = viewport.
offsetleft; var
offsettop = viewport.height - layoutviewport.getboundingclientrect().height + viewport.
offsettop; // you could also do this by setting style.left and style.top if you // use width: 100% instead. b...
.... var viewport = event.target; var
offsetleft = viewport.
offsetleft; var
offsettop = viewport.height - layoutviewport.getboundingclientrect().height + viewport.
offsettop; // you could also do this by setting style.left and style.top if you // use width: 100% instead. ...
... = viewport.
offsetleft; var
offsettop = viewport.height - layoutviewport.getboundingclientrect().height + viewport.
offsettop; // you could also do this by setting style.left and style.top if you // use width: 100% instead. bottombar.style.transform = 'translate(' +
offsetleft + 'px,' +
offsettop + 'px) ' + 'scale(' + 1/viewport.scale + ')' }) } window.visualviewport.addeventlistener('scroll', viewporthandler); window.visualviewport.addeventlistener('resize', viewporthandler); specifications specification status comment visual viewport apithe definition of 'visualviewport' in that specification. draft initial definiti...
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
the webgl2renderingcontext.compressedtexsubimage3d() method of the webgl api specifies a three-dimensional sub-rectangle for a texture image in a compressed format. syntax // read from the buffer bound to gl.pixel_unpack_buffer void gl.compressedtexsubimage3d(target, level, x
offset, y
offset, z
offset, width, height, depth, format, imagesize,
offset); void gl.compressedtexsubimage3d(target, level, x
offset, y
offset, z
offset, width, height, depth, format, arraybufferview srcdata, optional src
offset, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active texture. possible values: gl.texture_3d: a three-dimensional texture. gl.texture_2d_array: a two-dimensional array texture. level a glint specifying the level of det...
... width a glsizei specifying the width of the texture. height a glsizei specifying the height of the texture. ...
...rclengthoverride); parameters target a glenum specifying the binding point (target) of the active texture. possible values: gl.texture_3d: a three-dimensional texture. gl.texture_2d_array: a two-dimensional array texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. x
offset a glint specifying the x
offset within the compressed texture image. y
offset a glint specifying the y
offset within the compressed texture image. z
offset a glint specifying the z
offset within the compressed texture image. width a glsizei specifying the width of the texture. height a glsizei specifying the height of the texture. depth a glsizei specifying the depth of the texture. format a glenum specifying the comp...
...signed_r11_eac gl.compressed_rg11_eac gl.compressed_signed_rg11_eac gl.compressed_rgb8_etc2 gl.compressed_rgba8_etc2_eac gl.compressed_srgb8_etc2 gl.compressed_srgb8_alpha8_etc2_eac gl.compressed_rgb8_punchthrough_alpha1_etc2 gl.compressed_srgb8_punchthrough_alpha1_etc2 imagesize a glint specifying the number of bytes to read from the buffer bound to gl.pixel_unpack_buffer.
offset a glint specifying the
offset in bytes from which to read from the buffer bound to gl.pixel_unpack_buffer. srcdata an arraybufferview that be used as a data store for the compressed image data in memory. return value none. examples gl.compressedtexsubimage3d(gl.texture_3d, 0, 0, 0, 512, 512, 512, gl.compressed_r11_eac, texturedata); specifications specification status co...
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
ats must be enabled by webgl extensions before using these methods. ...
...ight, border, arraybufferview? ...
...der, glsizei imagesize, glintptr
offset); void gl.compressedteximage2d(target, level, internalformat, width, height, border, arraybufferview srcdata, optional src
offset, optional srclengthoverride); // read from buffer bound to gl.pixel_unpack_buffer void gl.compressedteximage3d(target, level, internalformat, width, height, depth, border, glsizei imagesize, glintptr
offset); void gl.compressedteximage3d(target, level, internalformat, width, height, depth, border, arraybufferview srcdata, optional src
offset, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active texture. possible values for compressedteximage2d: gl.texture_2d: a two-dimensional texture. gl.texture_cube_map_p...
...t width a glsizei specifying the width of the texture. height a glsizei specifying the height of the texture. depth a glsizei specifying the depth of the texture/the number of textures in a texture_2d_array. border a glint specifying the width of the border. must be 0. imagesize a glsizei specifying the number of bytes to read from the buffer bound to gl.pixel_unpack_buffer.
offset a glintptr specifying the
offset in bytes from which to read from the buffer bound to gl.pixel_unpack_buffer. pixels an arraybufferview that be used as a data store for the compressed image data in memory. return value none. examples var ext = ( gl.getextension('webgl_compressed_texture_s3tc') || gl.getextension('moz_webgl_compressed_texture_s3tc') || gl.getextension('webkit_webgl_c...
WebGLRenderingContext.texImage2D() - Web APIs
imageelement? pixels); void gl.teximage2d(target, level, internalformat, format, type, htmlcanvaselement? pixels); void gl.teximage2d(target, level, internalformat, format, type, htmlvideoelement? pixels); void gl.teximage2d(target, level, internalformat, format, type, imagebitmap? ...
...possible values: gl.texture_2d: a two-dimensional texture. gl.texture_cube_map_positive_x: positive x face for a cube-mapped texture. gl.texture_cube_map_negative_x: negative x face for a cube-mapped texture. gl.texture_cube_map_positive_y: positive y face for a cube-mapped texture. gl.text...
..._4 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
offset 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 ...
...rray must be used if type is either gl.unsigned_short_5_6_5, gl.unsigned_short_4_4_4_4, gl.unsigned_short_5_5_5_1, gl.unsigned_short or ext.half_float_oes. a uint32array must be used if type is gl.unsigned_int or ext.unsigned_int_24_8_webgl. a float32array must be used if type is gl.float. imagedata, htmlimageelement, htmlcanvaselement, htmlvideoelement, imagebitmap.
offset (webgl 2 only) a glintptr byte
offset into the webglbuffer's data store. used to upload data to the currently bound webgltexture from the webglbuffer bound to the pixel_unpack_buffer target. return value none. examples gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.unsigned_byte, image); specifications specification status comment webgl 1.0the defini...
WebGLRenderingContext.vertexAttribPointer() - Web APIs
size a glint specifying the number of components per vertex attribute. must be 1, 2, 3, or 4. ...
...a glboolean specifying whether integer data values should be normalized into a certain range when being cast to a float. for types gl.byte and gl.short, normalizes the values to [-1, 1] if true. for types gl.unsigned_byte and gl.unsigned_short, normalizes the values to [0, 1] if true. for types gl.float and gl.half_float, this parameter has no effect. ...
...oat, this parameter has no effect. stride a glsizei specifying the
offset in bytes between the beginning of consecutive vertex attributes. cannot be larger than 255. if stride is 0, the attribute is assumed to be tightly packed, that is, the attributes are not interleaved but each attribute is in a separate block, and the next vertex' attribute follows immediately after the current vertex.
offset a glintptr specifying an
offset in bytes of the first component in the vertex attribute array. must be a multiple of the byte length of type. return value none. exceptions a gl.invalid_value error is thrown if
offset is negative. a gl.invalid_operation error is thrown if stride and
offset are not multiples of the size of the data type. a gl.invalid_operation error is thrown if no webglb...
...tex shader may be using a position and a color attribute. most meshes have the color specified at a per-vertex level, but some meshes are of a uniform shade. for those meshes, it is not necessary to place the same color for each vertex into the array buffer, so you use gl.vertexattrib4fv() to set a constant color. querying current settings you can call gl.getvertexattrib() and gl.getvertexattrib
offset() to get the current parameters for an attribute, e.g. the data type or whether the attribute should be normalized. keep in mind that these webgl functions have a slow performance and it is better to store the state inside your javascript application. however, these functions are great for debugging a webgl context without touching the application code. examples this example shows how to send y...
WebGL constants - Web APIs
0x0cf5 pack_alignment 0x0d05 max_texture_size 0x0d33 max_viewport_dims 0x0d3a subpixel_bits 0x0d50 red_bits 0x0d52 green_bits 0x0d53 blue_bits 0x0d54 alpha_bits 0x0d55 depth_bits 0x0d56 stencil_bits 0x0d57 polygon_
offset_units 0x2a00 polygon_
offset_factor 0x8038 texture_binding_2d 0x8069 sample_buffers 0x80a8 samples 0x80a9 sample_coverage_value 0x80aa sample_coverage_invert 0x80ab compressed_texture_formats 0x86a3 vendor 0x1f00 renderer 0x1f01 v...
...lending. can also be used with getparameter to find the current blending method. depth_test 0x0b71 passed to enable/disable to turn on/off the depth test. can also be used with getparameter to query the depth test. dither 0x0bd0 passed to enable/disable to turn on/off dithering. can also be used with getparameter to find the current dithering method. polygon_
offset_fill 0x8037 passed to enable/disable to turn on/off the polygon
offset. useful for rendering hidden-line images, decals, and or solids with highlighted edges. can also be used with getparameter to query the scissor test. sample_alpha_to_coverage 0x809e passed to enable/disable to turn on/off the alpha to coverage. used in multi-sampling alpha channels. sample_coverag...
...npack_image_height 0x806e max_3d_texture_size 0x8073 max_elements_vertices 0x80e8 max_elements_indices 0x80e9 max_texture_lod_bias 0x84fd max_fragment_uniform_components 0x8b49 max_vertex_uniform_components 0x8b4a max_array_texture_layers 0x88ff min_program_texel_
offset 0x8904 max_program_texel_
offset 0x8905 max_varying_components 0x8b4b fragment_shader_derivative_hint 0x8b8b rasterizer_discard 0x8c89 vertex_array_binding 0x85b5 max_vertex_output_components 0x9122 max_fragment_input_components 0x9125 max_server_wait_timeout 0...
... max_vertex_uniform_blocks 0x8a2b max_fragment_uniform_blocks 0x8a2d max_combined_uniform_blocks 0x8a2e max_uniform_buffer_bindings 0x8a2f max_uniform_block_size 0x8a30 max_combined_vertex_uniform_components 0x8a31 max_combined_fragment_uniform_components 0x8a33 uniform_buffer_
offset_alignment 0x8a34 active_uniform_blocks 0x8a36 uniform_type 0x8a37 uniform_size 0x8a38 uniform_block_index 0x8a3a uniform_
offset 0x8a3b uniform_array_stride 0x8a3c uniform_matrix_stride 0x8a3d uniform_is_row_major 0x8a3e uniform_block_binding ...
Adding 2D content to a WebGL context - Web APIs
ffer into the vertexposition attribute. ...
... from one set of values to the next // 0 = use type and numcomponents above const
offset = 0; // how many bytes inside the buffer to start from gl.bindbuffer(gl.array_buffer, buffers.position); gl.vertexattribpointer( programinfo.attriblocations.vertexposition, numcomponents, type, normalize, stride,
offset); gl.enablevertexattribarray( programinfo.attriblocations.vertexposition); } // tell webgl to use our program when drawing gl.useprogram(programinfo.program); // set the shader uniforms gl.uniformmatrix4fv( programinfo.uniformlocations.projectionmatrix, false, projectionmatrix); gl.uniformmatrix4fv( programinfo.uniformlocations.modelviewmatrix, ...
...we set a field of view of 45°, with a width to height ratio that matches the display dimensions of our canvas. we also specify that we only want objects between 0.1 and 100 units from the cam...
...we set a field of view of 45°, with a width to height ratio that matches the display dimensions of our canvas. we also specify that we only want objects between 0.1 and 100 units from the camera to be rendered. then we establish the position of the square plane by l...
Writing a WebSocket server in C# - Web APIs
} tcpclient methods: system.net.sockets.networkstream getstream() gets the stream which is the communication channel. both sides of the channel have reading and writing capability. properties: int available this property indicates how many bytes of data have been sent. the value is zero until networkstream.dataavailable is true. networkstream methods: write(byte[] buffer, int
offset, int size) writes bytes from buffer,
offset and size determine length of message. read(byte[] buffer, int
offset, int size) reads bytes to buffer.
offset and size determine the length of the message. let us extend our example. tcpclient client = server.accepttcpclient(); console.writeline("a client connected."); networkstream stream = client.getstream(); //enter to an infinite cycle to...
... 0, response.length); } else { bool fin = (bytes[0] & 0b10000000) != 0, mask = (bytes[1] & 0b10000000) != 0; // must be true, "all messages from the client to the server have this bit set" int opcode = bytes[0] & 0b00001111, // expecting 1 - text message msglen = bytes[1] - 128, // & 0111 1111
offset = 2; if (msglen == 126) { // was touint16(bytes,
offset) but the result is incorrect msglen = bitconverter.touint16(new byte[] { bytes[3], bytes[2] }, 0);
offset = 4; } else if (msglen == 127) { console.writeline("todo: msglen == 127, needs qword to store msglen"); ...
...
offset = 4; } else if (msglen == 127) { console.writeline("todo: msglen == 127, needs qword to store msglen"); // i don't really know the byte order, please edit this // msglen = bitconverter.touint64(new byte[] { bytes[5], bytes[4], bytes[3], bytes[2], bytes[9], bytes[8], bytes[7], bytes[6] }, 0); //
offset = 10; } if (msglen == 0) console.writeline("msglen == 0"); else if (mask) { byte[] decoded = new byte[msglen]; byte[] masks = new byte[4] { bytes[
offset], bytes[
offset + 1], bytes[
offset + 2], bytes[
offset + 3] };
offset += 4; for (int i = 0; i < ms...
... console.writeline("msglen == 0"); else if (mask) { byte[] decoded = new byte[msglen]; byte[] masks = new byte[4] { bytes[
offset], bytes[
offset + 1], bytes[
offset + 2], bytes[
offset + 3] };
offset += 4; for (int i = 0; i < msglen; ++i) decoded[i] = (byte)(bytes[
offset + i] ^ masks[i % 4]); string text = encoding.utf8.getstring(decoded); console.writeline("{0}", text); } else console.writeline("mask bit not set"); console.writeline(); } } } } client.html <!doctype html> <style> textarea { vertical-align: bottom; } #output { overflow: a...
Controlling multiple parameters with ConstantSourceNode - Web APIs
you may have times when you want to have multiple audio parameters be linked so they share the same value even while being changed in some way. 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. ...
...le, and it involves using an audio node type which, at first glance, doesn't look all that useful: constantsourcenode. the technique this is actually a really easy way to do something that sounds like it might be hard to do. you simply need to create a constantsourcenode and connect it to all of the audioparams whose values should be linked to always match each other. since constantsourcenode's
offset 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. the diagram below shows how this works; an input value, n, is set as the value of the constantsourcenode.
offset property. the constantsourcenode can have as many outputs as necessary; in this case, we've connected it to three nodes: two gainnodes and a stereo...
...o the same value, so it is synchronized with the gain level it controls. once all the gain nodes are created, we create the constantsourcenode, constantnode. we connect its output to the gain audioparam on both gainnode2 and gainnode3, and we start the constant node running by calling its start() method; now it's sending the value 0.5 to the two gain nodes' values, and any change to constantnode.
offset will automatically set the gain of both gainnode2 and gainnode3 (affecting their audio inputs as expected). finally, we connect all the gain nodes to the audiocontext's destination, so that any sound delivered to the gain nodes will reach the output, whether that output be speakers, headphones, a recording stream, or any other destination type. after setting the window's load event handler to b...
... to be the unicode character "pause symbol" (⏸) and call startoscillators() to start the oscillators playing their tones. that code is covered under starting the oscillators below. controlling the linked oscillators the changevolume() function—the event handler for the slider control for the gain on the linked oscillator pair—looks like this: function changevolume(event) { constantnode.
offset.value = volumecontrol.value; } that simple function controls the gain on both nodes. all we have to do is set the value of the constantsourcenode's
offset parameter. that value becomes the node's constant output value, which is fed into all of its outputs, which are, as set above, gainnode2 and gainnode3. while this is an extremely simple example, imagine having a 32 oscillator synthesizer with...
window.location - Web APIs
he current url with "?some%20data" appended is sent to the server (if no action is taken by the server, the current document is reloaded with the modified search string). ...
...e server (if no action is taken by the server, the current document is reloaded with the modified search string). ...
... living standard no change from html5. html5the definition of 'window.loca...
... living standard no change from html5. html5the definition of 'window.location' in that specification. ...
Window.screenLeft - Web APIs
rowser viewport to the left edge of the screen. examples in our screenleft-screentop example, you'll see a canvas onto which has been drawn a circle. in this example we are using screenleft/screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...les in our screenleft-screentop example, you'll see a canvas onto which has been drawn a circle. in this example we are using screenleft/screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...wn a circle. in this example we are using screenleft/screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...entop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
Window.screenTop - Web APIs
browser viewport to the top edge of the screen. examples in our screenleft-screentop example, you'll see a canvas onto which has been drawn a circle. in this example we are using screenleft/screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...les in our screenleft-screentop example, you'll see a canvas onto which has been drawn a circle. in this example we are using screenleft/screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...wn a circle. in this example we are using screenleft/screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...entop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
Window.screenX - Web APIs
edge of the screen. examples in our screenleft-screentop (source code) example, you'll see a canvas onto which has been drawn a circle. in this example we are using window.screenleft/window.screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...ntop (source code) example, you'll see a canvas onto which has been drawn a circle. in this example we are using window.screenleft/window.screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...n this example we are using window.screenleft/window.screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...entop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
Window.screenY - Web APIs
rt to the top edge of the screen. examples in our screenleft-screentop example, you'll see a canvas onto which has been drawn a circle. in this example we are using window.screenleft/window.screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...reenleft-screentop example, you'll see a canvas onto which has been drawn a circle. in this example we are using window.screenleft/window.screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...n this example we are using window.screenleft/window.screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
...entop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved. ...
XRRigidTransform - Web APIs
the transform of an xrview. the transform of an xrpose. the xrreferencespaceevent event's transform property, as found in the reset event received by an xrreferencespace. ...
... the transform of an xrview. the transform of an xrpose. the xrreferencespaceevent event's transform property, as found in the reset event received by an xrreferencespace. ...
... inverse of this transform. that is, if applied to an object that had been previously transformed by the original transform, it will undo the transform and return the original object. usage notes when an xrrigidtransform is interpreted, the orientation is always applied to the affected object before the position is applied. ...
...ates an xrrigidtransform to specify the
offset and orientation in relation to the current reference space to use when creating a new reference space. it then requests the first animation frame callback by calling the session's requestanimationframe() method. xrsession.requestreferencespace(refspacetype) .then((refspace) => { xrreferencespace = refspace; xrreferencespace = xrreferencespace.get
offsetreferencespace( new xrrigidtransform(viewerstartposition, cubeorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); specifications specification status comment webxr device apithe definition of 'xrrigidtransform' in that specification. working draft initial definition. ...
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3"> this block is absolutely positioned. in this example the grid container is the containing block and so the absolute positioning
offset values are calculated in from the outer edges of the area it has been placed into. </div> <div class="box4">four</div> </div> .wrapper { display: grid; grid-template-columns: repeat(4,1fr); grid-auto-rows: 200px; grid-gap: 20px; position: relative; } .box3 { grid-column-start: 2; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; position: absolute; top: 40px; l...
... .wrapper { display: grid; grid-template-columns: repeat(4,1fr); grid-auto-rows: 200px; grid-gap: 20px; position: relative; } .box3 { grid-column-start: 2; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; position: absolute; top: 40px; left: 40px; } you can see that the item is taking the area from grid column line 2 to 4, and starting after line 1. then it is
offset in that area using the top and left properties. however, it has been taken out of flow as is usual for absolutely positioned items and so the auto-placement rules now place items into the same space. the item also doesn’t cause the additional row to be created to span to row line 3. if we remove position: absolute from the rules for .box3 you can see how it would display without the positionin...
...t in terms of sizing or when other items are auto-placed. with a grid area as the parent if the absolutely positioned item is nested inside a grid area then you can create a positioning context on that area. in the below example we have our grid as before but this time i have nested an item inside .box3 of the grid. i have given .box3 position relative and then positioned the sub-item with the
offset properties. in this case, the positioning context is the grid area. * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="box1">one</div> <div class="box2...
...} .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three <div class="abspos"> this block is absolutely positioned. in this example the grid area is the containing block and so the absolute positioning
offset values are calculated in from the outer edges of the grid area. </div> </div> <div class="box4">four</div> </div> .wrapper { display: grid; grid-template-columns: repeat(4,1fr); grid-auto-rows: 200px; grid-gap: 20px; } .box3 { grid-column-start: 2; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; position: relative; } .abspos { position: absolute; top: 40px;...
CSS Motion Path - CSS: Cascading Style Sheets
motion path is a css module that allows authors to animate any graphical object along a custom path. the idea is that when you want to animate an element moving along a path, you previously only had animating translation, position, etc. at your disposal, which wasn't ideal and only allowed for simple movements. with
offset-path you can define a specific path of any shape you want. ...
...llows authors to animate any graphical object along a custom path. the idea is that when you want to animate an element moving along a path, you previously only had animating translation, position, etc. at your disposal, which wasn't ideal and only allowed for simple movements. with
offset-path you can define a specific path of any shape you want. you then animate it along that path by animating
offset-distance, and can choose to rotate it at any point using
offset-rotate. ...
...ou previously only had animating translation, position, etc. at your disposal, which wasn't ideal and only allowed for simple movements. with
offset-path you can define a specific path of any shape you want. you then animate it along that path by animating
offset-distance, and can choose to rotate it at any point using
offset-rotate. ...
... shape you want. you then animate it along that path by animating
offset-distance, and can choose to rotate it at any point using
offset-rotate. basic example <div id="motion-demo"></div> #motion-demo {
offset-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% {
offset-distance: 0%; } 100% {
offset-distance: 100%; } } reference properties
offset offset-anchor
offset-distance
offset-path
offset-position
offset-rotate specifications specification status comment motion path module level 1 working draft initial definition. ...
<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
offset-anchor properties. note: the final position described by the <position> value does not need to be inside the element's box. syntax the <position> data type is specified with one or two keywords, with optional
offsets. the keyword values are center, top, right, bottom, and left. each keyword represents either an edge of the element's box or the center line between two edges. ...
...tion> data type is specified with one or two keywords, with optional
offsets. the keyword values are center, top, right, bottom, and left. each keyword represents either an edge of the element's box or the center line between two edges. depending on the context, center represents either the center between the left and right edges, or the center between the top and bottom edges. if specified, an
offset can be either a relative <percentage> value or an absolute <length> value. positive values are
offset towards the right or the bottom, whichever is appropriate. negative values are
offset in the opposite directions. if only a single
offset value is specified, it defines the x-coordinate, with the value for the other axis defaulting to center. /* 1-value syntax */ keyword /* eit...
...| [ [ left | right ] [ <length> | <percentage> ] ] && [ [ top | bottom ] [ <length> | <percentage> ] ] ] note: the background-position property also accepts a three-value sy...
...ition>' in that specification. candidate recommendation relists links to both definitions: if css backgrounds and borders module level 3 is supported, its definition of <position> must also be used. css backgrounds and borders module level 3the definition of '<bg-position>' in that specification. candidate recommendation defines <position> explicitly and extends it to support
offsets from any edge. css level 2 (revision 1)the definition of '<position>' in that specification. recommendation allows combination of a keyword with a <length> or <percentage> value. css level 1the definition of '<position>' in that specification. recommendation defines <position> anonymously as the value of background-position. ...
String.prototype.replace() - JavaScript
name supplied value match the matched substring. (corresponds to $& above.) p1, p2, ... the nth string found by a parenthesized capture group (including named capturing groups), provided the first argument to replace() was a regexp object. (corresponds to $1, $2, etc. above.) for example, if /(\a+)(\b+)/, was given, p1 is the match for \a+, and p2 for \b+.
offset the
offset of the matched substring within the whole string being examined. (for example, if the whole string was 'abcd', and the matched substring was 'bc', then this argument will be 1.) string the whole string being examined. groups in browser versions supporting named capturing groups, will be an object whose keys are the used group names, and whose values are the m...
...ing groups, will be an object whose keys are the used group names, and whose values are the matched portions (undefined if not matched). (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,
offset, 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 regular expression is defined in replace() and includes the ignore case flag. let ...
...nserted just before the match location. the important thing here is that additional operations are needed on the matched item before it is given back as a replacement. the replacement function accepts the matched snippet as its parameter, and uses it to transform the case and concatenate the hyphen before returning. function stylehyphenformat(propertyname) { function uppertohyphenlower(match,
offset, string) { return (
offset > 0 ? '-' : '') + match.tolowercase(); } return propertyname.replace(/[a-z]/g, uppertohyphenlower); } given stylehyphenformat('bordertop'), this returns 'border-top'. because we want to further transform the result of the match before the final substitution is made, we must use a function. this forces the evaluation of the match prior to the tolowercase() meth...
...gular expression test checks for any number that ends with f. the number of fahrenheit degree is accessible to the function through its second parameter, p1. the function sets the celsius number based on the fahrenheit degree passed in a string to the f2c() function. f2c() then returns the celsius number. this function approximates perl's s///e flag. function f2c(x) { function convert(str, p1,
offset, s) { return ((p1 - 32) * 5/9) + 'c'; } let s = string(x); let test = /(-?\d+(?:\.\d*)?)f\b/g; return s.replace(test, convert); } specifications specification ecmascript (ecma-262)the definition of 'string.prototype.replace' in that specification. ...
fr - SVG: Scalable Vector Graphics
the fr attribute defines the radius of the focal point for the radial gradient. ...
...ttribute defines the radius of the focal point for the radial gradient. ...
...vg 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
offset="0%" stop-color="white"/> <stop
offset="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
offset="0%" stop-color="white"/> <stop
offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r="100" fill="url(#gradient2)" style="transform: translatex(240px);" /> </svg> usage notes value <length> default value 0 animatable none example <...
...="100" fill="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
offset="0%" stop-color="red"/> <stop
offset="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="...
r - SVG: Scalable Vector Graphics
the r attribute defines the radius of a circle. ...
... the r attribute defines the radius of a circle. ...
...adius of a circle. ...
...s attribute: <circle>, and <radialgradient> html,body,svg { height:100% } <svg viewbox="0 0 300 200" xmlns="http://www.w3.org/2000/svg"> <radialgradient r="0" id="mygradient000"> <stop
offset="0" stop-color="white" /> <stop
offset="100%" stop-color="black" /> </radialgradient> <radialgradient r="50%" id="mygradient050"> <stop
offset="0" stop-color="white" /> <stop
offset="100%" stop-color="black" /> </radialgradient> <radialgradient r="100%" id="mygradient100"> <stop
offset="0" stop-color="white" /> <stop
offset="100%" stop-color="black" /> </radialgradient> <circle cx="50" cy="50" r="0"/> <circle cx="150" cy="50" r="25"/> <circle cx="250" cy="50" r="50"/> <rect x="20" y="120" width="60" height="60" fill="url(#mygradient000)" /> <re...
y1 - SVG: Scalable Vector Graphics
ntunits attributs value <length> | <percentage> default value 0% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector start at the top left corner of the bounding box of the shape it is applied to. ...
... | <percentage> default value 0% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector start at the top left corner of the bounding box of the shape it is applied to. ...
... animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector start at the top left corner of the bounding box of the shape it is applied to. ...
... id="g0"> <stop
offset="5%" stop-color="black" /> <stop
offset="50%" stop-color="red" /> <stop
offset="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
offset="5%" stop-color="black" /> <stop
offset="50%" stop-color="red" /> <stop
offset="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. candidate recommendation definit...
y2 - SVG: Scalable Vector Graphics
entunits attributs value <length> | <percentage> default value 0% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector end at the top right corner of the bounding box of the shape it is applied to. ...
...> | <percentage> default value 0% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector end at the top right corner of the bounding box of the shape it is applied to. ...
... animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector end at the top right corner of the bounding box of the shape it is applied to. ...
..." id="g0"> <stop
offset="5%" stop-color="black" /> <stop
offset="50%" stop-color="red" /> <stop
offset="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
offset="5%" stop-color="black" /> <stop
offset="50%" stop-color="red" /> <stop
offset="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. candidate recommendation definit...
Documentation for BiDi Mozilla - Archive of obsolete content
ances, even on a platform with bidi capability, the layout code has to reverse text fragments or to allow for the fact that they are displayed in reverse. in general, this happens whenever we are dealing with less than a whole frame. examples of this are in nstextframe::painttextslowly; nstextframe::paintunicodetext when a selection is displayed; nstextframe::getposition; nstextframe::getpointfrom
offset. text in visual mode must also be reversed before display on a bidi platform. text fields and composer the specification of the bidi changes to composer was posted in the editor and i18n newsgroups, and responses there were taken into account. the implementation is mostly in layout code, especially in nsselection.cpp and nscaret.cpp. other bidi functionality clipboard: based on bidi options i...
...it is created when resolving text containing a unicode bidi control character, a bdo tag, or right-to-left alignment caused by a dir tag or css. nsibidikeyboard widget/public/nsibidikeyboard.idl wid...
...it is created when resolving text containing a unicode bidi control character, a bdo tag, or right-to-left alignment caused by a dir tag or css. nsibidikeyboard widget/public/nsibidikeyboard.idl widget/src/%platform%/nsbidike...
OpenClose - Archive of obsolete content
ple, indicates to place the left edge of the popup along the right edge of the the anchor element, aligned along the top edge of both. this may be confusing to understand, so see positioning a popup which describes this process in more detail and provides images which show the possible values and how a popup would be aligned for each value. the third and fourth arguments to openpopup are x and y
offsets. after the popup is positioned, you can further position the popup by specifying non-zero values for these
offsets. this allows the position of the popup to be precisely controlled while still being anchored to a specific element. you can use positive values to adjust the popup to the right or downwards and negative values to adjust the popup to the left or upwards. in the following example, th...
... somepopup.openpopup(anchor, "after_start", 10, -2, false, false); note that the anchor and positioning only specifies the position when the popup is opened. if the anchor is moved or removed while the popup is open, the popup does not follow it. ...
...ore details on these attributes can be found at positioning a popup. unanchored popups with openpopup if the first argument to the openpopup method is null, this creates an unanchored popup. in this case, the second argument, the position, is not used, so an empty string can be used. here is an example: somepopup.openpopup(null, "", 60, 50, false, false); an unanchored popup uses the x and y
offsets, in this case 60 and 50 as
offsets from the edge of the window or frame. this way, a popup can be positioned relative to the window, rather than relative to a specific node. for example, you might wish to open a popup at the current mouse position when the mouse is clicked. here is an example mouse click event listener: function mouseclicked(event) { var panel = document.getelementbyid("some-...
NPP_Write - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary delivers data to a plug-in instance. (remark: hence the name "npp_write" is misleading - just think of:"data_arrived") syntax #include <npapi.h> int32 npp_write(npp instance, npstream* stream, int32
offset, int32 len, void* buf); parameters the function has the following parameters: instance pointer to the current plug-in instance. stream pointer to the current stream.
offset offset in bytes of buf from the beginning of the data in the stream. can be used to check stream progress or by range requests from npn_requestread. len length in bytes of buf; number of bytes accepted. buf buffer of data, delivered by the stream, that contains len bytes of dat...
...the buffer is allocated by the browser and is deleted after returning from the function, so the plug-in should make a copy of the data it needs to keep. returns the plug-in should return the number of bytes written (consumed by the instance). ...
...browser calls npp_write either: if the plug-in requested a normal-mode stream, the data in the stream is delivered to the plug-in instance in a series of calls to npp_writeready and npp_write. if the plug-in requested a seekable stream, the npn_requestread function requests reads of a specified byte range that results in a series of calls to npp_writeready and npp_write. the plug-in can use the
offset parameter to track the bytes that are written. this gives you different information depending in the type of stream. in a normal-mode stream., the parameter value increases as the each buffer is written. the buf parameter is not persistent, so the plug-in must process data immediately or allocate memory and save a copy of it. in a seekable stream with byte range requests, you can use this paramet...
Browser Detection and Cross Browser Support - Archive of obsolete content
tscape 7. using javascript objects to determine vendor/version as we already discussed, a common approach in the past was to use objects to classify browsers by vendor/version. a common type of detection which originally was written to support only netscape navigator 4 and internet explorer 4 might look like: // wrong approach - do not use! if (document.all) { // ie4 height = document.body.
offsetheight; } 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). many web authors decided that the easiest way to add support for netscape gecko was to add another code fork as follows: // wron...
... 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). many web authors decided that the easiest way to add support for netscape gecko was to add another code fork as follows: // wrong approach - do not use! if (document.all) { // ie4 height = document.body.
offsetheight; } else if (document.layers) { // nn4 height = window.innerheight; } else if (document.getelementbyid) { // they think this is gecko // but could be wrong! height = window.innerheight; } else { // other height = 0; } the approach is incorrect since it assumes that the only other browser besides internet explorer 5+ that implements document.getelementbyid is gecko. this is no...
...ttempting to use them in a script. the classic example is: if (document.images) { // code which processes the images } the advantage to feature detection is that it will work regardless of the vendor/version. we can rewrite the earlier example which illustrated problems with using objects to determine vendor/version to use feature detection instead. if (document.body && typeof(document.body.
offsetheight) == 'number') { height = document.body.
offsetheight; } else if (typeof(window.innerheight) == 'number') { height = window.innerheight; } else { height = 0; } note how the previous example does not make assumptions about which browser is being used. instead, it only tests for the objects which it wishes to use. since the numeric values could potentially be zero, the script tests the ...
Mobile touch controls - Game development
we can get the first touch (e.touches[0], our example is not multitouch-enabled),...
...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...
....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
offset (distance from the canvas and the edge of the screen) and half the player's width and height. to see if it's working correctly we can output the x and y positions using the output element. the preventdefault() function is needed to prevent the browser from moving — without it you'd have the default behaviour, and the canvas would be dragged around the page, which would show the browser scrol...
Mobile accessibility - Learn web development
we mean. alternatively, mouse-specific events such as mousedown and mouseup create problems — their event handlers cannot be invoked using non-mouse controls. if you try to control our simple-box-drag.html (see example live) example with a keyboard or touch, you'll see the problem. ...
...pecific events such as mousedown and mouseup create problems — their event handlers cannot be invoked using non-mouse controls. if you try to control our simple-box-drag.html (see example live) example with a keyboard or touch, you'll see the problem. ...
...is occurs because we are using code such as the following: div.onmousedown = function() { initialboxx = div.
offsetleft; initialboxy = div.
offsettop; movepanel(); } document.onmouseup = stopmove; to enable other forms of control, you need to use different, yet equivalent events — for example, touch events work on touchscreen devices: div.ontouchstart = function(e) { initialboxx = div.
offsetleft; initialboxy = div.
offsettop; positionhandler(e); movepanel(); } panel.ontouchend = stopmove; we've provided a simple example that shows how to use the mouse and touch events together — see multi-control-box-drag.html (see the example live also). note: you can also see fully functional examples showing how to implement different control mechanisms at implementing game control mech...
Advanced styling effects - Learn web development
the third length value is the blur radius — the amount of blurring applied to the shadow. the color value is the base colo...
... the third length value is the blur radius — the amount of blurring applied to the shadow. the color value is the base color of the shadow. you can use any length and color...
...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
offset — the distance to the right the shadow is
offset from the original box (or left, if the value is negative). the second length value is the vertical
offset — the distance downwards that the shadow is
offset from the original box (or upwards, if the value is negative). the third length value is the blur radius — the amount of blurring applied to the shadow. the color value is the base color of the shadow. you can use any length and color units that would make sense to do so to define these values. multiple box shadows you can also specify m...
Investigating leaks using DMD heap scan mode
memory that (possibly) contains a pointer to that object. you can pass some additional options to affect how the results are displayed. “-sfl 10000 -a” is useful. the -sfl 10000 tells it to not truncate stack frames, and -a tells it to not display generic frames related to the allocator. caveat: i think block_analyzer.py does not attempt to clamp the address you pass into it, so if it is an
offset from the start of the block, it won’t find it. block_analyzer.py will return a series of entries that look like this (with the [...] indicating where i have removed things): 0x7f089306b000 size = 4096 bytes at byte
offset 2168 nsattrandchildarray::growby[...] nsattrandchildarray::insertchildat[...] [...] 0x7f089306b000 is the address of the block that contains $leakaddr. 144 bytes is t...
...this is mostly useful for larger objects, and you can potentially combine this with debugging information to figure out exactly what field this is. ...
...here you first go through and mark off the things that are easily categorizable, and repeat until you have a small list of things to analyze. example analysis of block_analyzer.py results in one debugging session where i was investigating the leak from bug 1451985, i eventually reduced the list of entries until this was the most suspicious looking entry: 0x7f0892f29630 size = 392 bytes at byte
offset 56 mozilla::dom::scriptloader::processexternalscript[...] [...] i went to that line of scriptloader::processexternalscript(), and it contained a call to scriptloader::createloadrequest(). fortunately, this method mostly just contains two calls to new, one for scriptloadrequest and one for moduleloadrequest. (this is where an unoptimized build comes in handy, as it would have pointed out the ...
PRTimeParameters
a representation of time zone information. syntax #include <prtime.h> typedef struct prtimeparameters { print32 tp_gmt_
offset; print32 tp_dst_
offset; } 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
offset (in seconds) from gmt. the overall
offset is broken into two components: tp_gmt_
offset the
offset of the local standard time from gmt. tp_dst_
offset if daylight savings time (dst) is in effect, the dst adjustment from the local standard time. ...
...formation in terms of the
offset (in seconds) from gmt. the overall
offset is broken into two components: tp_gmt_
offset the
offset of the local standard time from gmt. tp_dst_
offset if daylight savings time (dst) is in effect, the dst adjustment from the local standard time. this is most commonly 1 hour, but may also be 30 minutes or some other amount. if dst is not in effect, the tp_dst_
offset component is 0. for example, the us pacific time zone has both a standard time zone (pacific standard time, or pst) and a daylight time zone (pacific daylight time, or pdt). in pst, the local time is 8 hours behind gmt, so tp_gmt_
offset is -28800 seconds. tp_dst_
offset is 0, indicating that daylight saving time is not in effect. in pdt, the clock is turned forward by one hour, so the loc...
...ime zone (pacific standard time, or pst) and a daylight time zone (pacific daylight time, or pdt). in pst, the local time is 8 hours behind gmt, so tp_gmt_
offset is -28800 seconds. tp_dst_
offset is 0, indicating that daylight saving time is not in effect. in pdt, the clock is turned forward by one hour, so the local time is 7 hours behind gmt. this is broken down as -8 + 1 hours, so tp_gmt_
offset is -28800 seconds, and tp_dst_
offset is 3600 seconds. a second example is japan, which is 9 hours ahead of gmt. japan does not use daylight saving time, so the only time zone is japan standard time (jst). in jst tp_gmt_
offset is 32400 seconds, and tp_dst_
offset is 0. ...
PR_GMTParameters
description this is a frequently-used time parameter callback function. you don't normally call it directly; instead, you pass it as a parameter to pr_explodetime() or pr_normalizetime(). ...
... description this is a frequently-used time parameter callback function. you don't normally call it directly; instead, you pass it as a parameter to pr_explodetime() or pr_normalizetime(). ...
...equires gmt as input, its primary use is as "filler" for cases in which you need a do-nothing callback. syntax #include <prtime.h> prtimeparameters pr_gmtparameters ( const prexplodedtime *gmt); parameter gmt a pointer to the clock/calendar time whose
offsets are to be determined. this time should be specified in gmt. returns a time parameters structure that expresses the time zone
offsets at the specified time. description this is a frequently-used time parameter callback function. you don't normally call it directly; instead, you pass it as a parameter to pr_explodetime() or pr_normalizetime(). this is a trivial function; for any input, it returns a prtimeparameters structure with both fields set to zero. ...
PR_LocalTimeParameters
description this is a frequently-used time parameter callback function. ...
... description this is a frequently-used time parameter callback function. ...
... description this is a frequently-used time parameter callback function. ...
PR_Seek
moves the current read-write file pointer by an
offset expressed as a 32-bit integer. deprecated in favor of pr_seek64. syntax #include <prio.h> print32 pr_seek( prfiledesc *fd, print32
offset, prseekwhence whence); parameters the function has the following parameters: fd a pointer to a prfiledesc object.
offset a value, in bytes, used with the whence parameter to set the file pointer. a negative value causes seeking in the reverse direction. whence a value of type prseekwhence that specifies how to interpret the
offset parameter in setting the file pointer associated with the fd parameter. the value for the whence parameter can be one of the following: pr_seek_set. sets the file pointer to the value of the
offset parameter. pr_seek_cur. sets the file pointer to its...
...the reverse direction. whence a value of type prseekwhence that specifies how to interpret the
offset parameter in setting the file pointer associated with the fd parameter. the value for the whence parameter can be one of the following: pr_seek_set. sets the file pointer to the value of the
offset parameter. pr_seek_cur. sets the file pointer to its current location plus the value of the
offset parameter. pr_seek_end. sets the file pointer to the size of the file plus the value of the
offset parameter. returns the function returns one of the following values: if the function completes successfully, it returns the resulting file pointer location, measured in bytes from the beginning of the file. if the function fails, the file pointer remains unchanged and the function retur...
...ion, measured in bytes from the beginning of the file. if the function fails, the file pointer remains unchanged and the function returns -1. the error code can then be retrieved with pr_geterror. description here's an idiom for obtaining the current location of the file pointer for the file descriptor fd: pr_seek(fd, 0, pr_seek_cur) see also if you need to move the file pointer by a large
offset that's out of the range of a 32-bit integer, use pr_seek64. new code should use pr_seek64 so that it can handle files larger than 2 gb. ...
nsACString_internal
32) const - source parameters pruint32 i operator[] char operator[](pruint32) const - source parameters pruint32 i first char first() const - source last char last() const - source countchar pruint32 countchar(char) const - source parameters char <anonymous> findchar print32 findchar(char, pruint32) const - source parameters char <anonymous> pruint32
offset equals prbool equals(const nsacstring_internal&) const - source equality parameters 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...
... data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. ...
...never null, but can be marked void. if true, the string will be truncated. ...
nsAString_internal
uint32 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
offset 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...
... pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. ...
..., but can be marked void. if true, the string will be truncated. ...
nsDependentCSubstring
32) const - source parameters pruint32 i operator[] char operator[](pruint32) const - source parameters pruint32 i first char first() const - source last char last() const - source countchar pruint32 countchar(char) const - source parameters char <anonymous> findchar print32 findchar(char, pruint32) const - source parameters char <anonymous> pruint32
offset equals prbool equals(const nsacstring_internal&) const - source equality parameters 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...
... data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. ...
...never null, but can be marked void. if true, the string will be truncated. ...
nsDependentSubstring
uint32 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
offset 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...
... pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. ...
..., but can be marked void. if true, the string will be truncated. ...
nsICacheEntryDescriptor
criptor.idlscriptable this interface provides a cache entry descriptor. 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
offset); nsioutputstream openoutputstream(in unsigned long
offset); 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. s...
...s are given a descriptor to the object. void markvalid(); parameters none. openinputstream() this method opens blocking input stream to cache data. this will fail if the cache entry is not stream based. use the stream transport service to asynchronously read this stream on a background thread. the returned stream may implement nsiseekablestream. nsiinputstream openinputstream( in unsigned long
offset ); parameters
offset read starting from this
offset into the cached data. an
offset beyond the end of the stream has undefined consequences. return value returns blocking, unbuffered input stream. openoutputstream() this method opens blocking output stream to cache data. this will fail if the cache entry is not stream based. use the stream transport service to asynchronously write to this stre...
...nbuffered input stream. openoutputstream() this method opens blocking output stream to cache data. this will fail if the cache entry is not stream based. use the stream transport service to asynchronously write to this stream on a background thread. the returned stream may implement nsiseekablestream. if opening an output stream to existing cached data, the data will be truncated to the specified
offset. nsioutputstream openoutputstream( in unsigned long
offset ); parameters
offset write starting from this
offset into the cached data. an
offset beyond the end of the stream has undefined consequences. return value returns blocking, unbuffered output stream. setdatasize() this method sets the cache entry data size. this will fail if the cache entry is stream based. void setdatasize( in unsi...
nsIDOMHTMLAudioElement
the nsidomhtmlaudioelement interface is used to implement the html5 <audio> element. dom/interfaces/html/nsidomhtmlaudioelement.idlscriptable please add a summary to this article. last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsidomhtmlmediaelement method overview unsigned long long mozcurrentsample
offset(); void mozsetup(in pruint32 channels, in pruint32 rate); [implicit_jscontext] unsigned long mozwriteaudio(in jsval data); methods mozcurrentsample
offset() non-standard this feature is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the...
...return value an unsigned 64-bit value indicating how many audio samples have been played since the stream began playing. ...
...return value an unsigned 64-bit value indicating how many audio samples have been played since the stream began playing. ...
nsIMsgSearchTerm
ch for junkscoreorigin * @param ajunkscoreorigin who set junk score? possible values: * plugin filter imapflag user whitelist * @return true if matches */ boolean matchjunkscoreorigin(in string ajunkscoreorigin); matchbody /** * test if the body of the passed in message matches "this" search term. ...
...junkscoreorigin * @param ajunkscoreorigin who set junk score? possible values: * plugin filter imapflag user whitelist * @return true if matches */ boolean matchjunkscoreorigin(in string ajunkscoreorigin); matchbody /** * test if the body of the passed in message matches "this" search term. ...
...passed in message matches "this" search term. * @param ascopeterm scope of search * @param a
offset offset of message in message store. * @param alength length of message. * @param acharset folder charset. * @param amsg db msg hdr of message to match. * @param adb db containing msg header. ...
nsISelectionController
om: nsiselectiondisplay last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void characterextendforbackspace(); native code only! void characterextendfordelete(); native code only! ...
...lay last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void characterextendforbackspace(); native code only! void characterextendfordelete(); native code only! ...
...e selection if the extend = pr_false the "point" of selection that is extended is considered the "focus" point, or the last point adjusted by the selection. void charactermove( in boolean forward, in boolean extend ); parameters forward forward or backward if pr_false. extend should it collapse the selection or extend it? checkvisibility() checks if textnode and
offsets are actually rendered in the current precontext. boolean checkvisibility( in nsidomnode node, in short start
offset, in short end
offset ); parameters node nsidomnode to test. start
offset offset in dom to first char of textnode to test. end
offset offset in dom to last char of textnode to test. return value true if visible, false if not. completemo...
NS_CStringSetDataRange
see bug 239123 for details. see also nsacstring ...
...see bug 239123 for details. see also nsacstring ...
...see bug 239123 for details. see also nsacstring ...
NS_StringSetDataRange
see bug 239123 for details. see also nsastring ...
...see bug 239123 for details. see also nsastring ...
...see bug 239123 for details. see also nsastring ...
Debugger.Source - Firefox Developer Tools
<script> elements. "javascripturl", for code presented in javascript: urls. "settimeout", for code passed to settimeout as a string. "setinterval", for code passed to setinterval as a string. undefined, if the implementation doesn’t know how the code was introduced. if the instance refers to webassembly code, "wasm". introductionscript, introduction
offset if the instance refers to javascript source, and if this source was introduced by calling a function from debuggee code, then introductionscript is the debugger.script instance referring to the script containing that call, and introduction
offset is the call’s bytecode
offset within that script. otherwise, these are both undefined. taken together, these properties indicate the location of the...
...ript. otherwise, these are both undefined. taken together, these properties indicate the location of the introducing call. for the purposes of these accessors, assignments to accessor properties are treated as function calls. thus, setting a dom element’s event handler idl attribute by assigning to the corresponding javascript property creates a source whose introductionscript and introduction
offset refer to the property assignment. since a <script> element parsed from a web page’s original html was not introduced by any scripted call, its source’s introductionscript and introduction
offset accessors both return undefined. if a <script> element was dynamically inserted into a document, then these accessors refer to the call that actually caused the script to run—usually the call tha...
...ot to be a debuggee of the debugger instance that owns this source; and thus the creating call is never “in debuggee code”. relating a worker to its creator, and other multi-threaded debugging concerns, are out of scope for debugger. if the instance refers to webassembly code, introductionscript is the debugger.script instance referring to the same underlying webassembly module. introduction
offset is undefined. source metadata generated from file: js/src/doc/debugger/debugger.source.md watermark: sha256:5ca245813db96628aab1c78b803355eb2aa8c575839c67eb7d7bde177898df88 changeset: e91b2c85aacd ...
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
the angle_instanced_arrays.drawelementsinstancedangle() method of the webgl api renders primitives from array data like the gl.drawelements() method. in addition, it can execute multiple instances of a set of elements. note: when using webgl2, this method is available as gl.drawelementsinstanced() by default. syntax void ext.drawelementsinstancedangle(mode, count, type,
offset, primcount); parameters mode a glenum specifying the type primitive to render. possible values are: gl.points: draws a single dot. gl.line_strip: draws a straight line to the next vertex. gl.line_loop: draws a straight line to the next vertex, and connects the last vertex back to the first. gl.lines: draws a line between a pair of vertices. gl.triangle_strip gl.triangle_fan gl.triangles: draws a...
...gl.triangle_strip gl.triangle_fan gl.triangles: draws a triangle for a group of three vertices. count a glsizei specifying the number of elements to be rendered. type a glenum specifying the type of the values in the element array buffer. ...
...an gl.triangles: draws a triangle for a group of three vertices. count a glsizei specifying the number of elements to be rendered. type a glenum specifying the type of the values in the element array buffer. possible values are: gl.unsigned_byte gl.unsigned_short when using the oes_element_index_uint extension: gl.unsigned_int
offset a glintptr specifying an
offset in the element array buffer. must be a valid multiple of the size of the given type. primcount a glsizei specifying the number of instances of the set of elements to execute. return value none. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if
offset is a invalid multiple of the size of the given type, a gl.invalid_operation error is thrown. if...
AudioBufferSourceNode.loopStart - Web APIs
this value is only used when the loop parameter is true. ...
...this value is only used when the loop parameter is true. ...
...this value is only used when the loop parameter is true. ...
CanvasRenderingContext2D - Web APIs
pe of corners where two lines meet. possible values: round, bevel, miter (default). canvasrenderingcontext2d.miterlimit miter limit ratio. default 10. canvasrenderingcontext2d.getlinedash() returns the current line dash pattern array containing an even number of non-negative numbers. canvasrenderingcontext2d.setlinedash() sets the current line dash pattern. canvasrenderingcontext2d.linedash
offset specifies where to start a dash array on a line. text styles the following properties control how text is laid out. canvasrenderingcontext2d.font font setting. default value 10px sans-serif. canvasrenderingcontext2d.textalign text alignment setting. possible values: start (default), end, left, right, center. canvasrenderingcontext2d.textbaseline baseline alignment setting. possible va...
...creates a pattern using the specified image (a canvasimagesource). it repeats the source in the directions specified by the repetition argument. this method returns a canvaspattern. shadows canvasrenderingcontext2d.shadowblur specifies the blurring effect. default: 0 canvasrenderingcontext2d.shadowcolor color of the shadow. default: fully-transparent black. canvasrenderingcontext2d.shadow
offsetx horizontal distance the shadow will be
offset. default: 0. canvasrenderingcontext2d.shadow
offsety vertical distance the shadow will be
offset. default: 0. paths the following methods can be used to manipulate paths of objects. canvasrenderingcontext2d.beginpath() starts a new path by emptying the list of sub-paths. call this method when you want to create a new path. canvasrenderingco...
...enderingcontext2d.setfillcolor() use canvasrenderingcontext2d.fillstyle instead. canvasrenderingcontext2d.setshadow() use canvasrenderingcontext2d.shadowcolor and canvasrenderingcontext2d.shadowblur instead. canvasrenderingcontext2d.webkitlinedash use canvasrenderingcontext2d.getlinedash() and canvasrenderingcontext2d.setlinedash() instead. canvasrenderingcontext2d.webkitlinedash
offset use canvasrenderingcontext2d.linedash
offset instead. canvasrenderingcontext2d.webkitimagesmoothingenabled use canvasrenderingcontext2d.imagesmoothingenabled instead. blink only canvasrenderingcontext2d.iscontextlost() inspired by the same webglrenderingcontext method it returns true if the canvas context has been lost, or false if not. webkit only canvasrenderingcontext2d.
ConstantSourceNode - Web APIs
the constantsourcenode interface—part of the web audio api—represents an audio source (based upon audioscheduledsourcenode) whose output is single unchanging value. this makes it useful for cases in which you need a constant value coming in from an audio source. in addition, it can be used like a constructible audioparam by automating the value of its
offset or by connecting another node to it; see controlling multiple parameters with constantsourcenode. a constantsourcenode has no inputs and exactly one monaural (one-channel) output. the output's value is always the same as the value of the
offset parameter. number of inputs 0 number of outputs 1 constructor constantsourcenode() creates and returns a new constantsourcenode instance, optionally specifyin...
...a new constantsourcenode instance, optionally specifying an object which establishes initial values for the object's properties. you can also create a constantsourcenode whose properties are initialized to their default values by calling audiocontext.createconstantsource(). properties inherits properties from its parent interface, audioscheduledsourcenode, and adds the following properties:
offset an audioparam which specifies the value that this source continuously outputs. the default value is 1.0. event handlers inherits event handlers from its parent interface, audioscheduledsourcenode. some browsers' implementations of this event handler are part of the audioscheduledsourcenode interface. onended fired whenever the constantsourcenode data has stopped playing. methods in...
...to 0.5. then the constantsourcenode is created by calling audiocontext.createconstantsource(), and the gain parameters of each of the two gain nodes are connected to the constantsourcenode. after starting the constant source by calling its start() method. finally, the two gain nodes are connected to the audio destination (typically speakers or headphones). now, whenever the value of constantnode.
offset changes, the gain on both gainnode2 and gainnode3 will change to have that same value. to see this example in action, as well as to read the rest of the code from which these snippets were derived, see controlling multiple parameters with constantsourcenode. specification specification status comment web audio apithe definition of 'constantsourcenode' in that specificat...
Element: mousedown event - Web APIs
ing to false. ...
...html <h1>drawing with mouse events</h1> <canvas id="mypics" width="560" height="360"></canvas> css canvas { border: 1px solid black; width: 560px; height: 360px; } javascript // when true, moving the mouse draws on the canvas let isdrawing = false; let x = 0; let y = 0; const mypics = document.getelementbyid('mypics'); const context = mypics.getcontext('2d'); // event.
offsetx, event.
offsety gives the (x,y)
offset from the edge of the canvas. // add the event listeners for mousedown, mousemove, and mouseup mypics.addeventlistener('mousedown', e => { x = e.
offsetx; y = e.
offsety; isdrawing = true; }); mypics.addeventlistener('mousemove', e => { if (isdrawing === true) { drawline(context, x, y, e.
offsetx, e.
offsety); x = e.
offsetx; y = e.
offsety; } }); window.
...wn, mousemove, and mouseup mypics.addeventlistener('mousedown', e => { x = e.
offsetx; y = e.
offsety; isdrawing = true; }); mypics.addeventlistener('mousemove', e => { if (isdrawing === true) { drawline(context, x, y, e.
offsetx, e.
offsety); x = e.
offsetx; y = e.
offsety; } }); window.addeventlistener('mouseup', e => { if (isdrawing === true) { drawline(context, x, y, e.
offsetx, e.
offsety); x = 0; y = 0; isdrawing = false; } }); function drawline(context, x1, y1, x2, y2) { context.beginpath(); context.strokestyle = 'black'; context.linewidth = 1; context.moveto(x1, y1); context.lineto(x2, y2); context.stroke(); context.closepath(); } result specifications specification status ui eventsthe definition of 'mousedo...
Element: mousemove event - Web APIs
ing to false. ...
...html <h1>drawing with mouse events</h1> <canvas id="mypics" width="560" height="360"></canvas> css canvas { border: 1px solid black; width: 560px; height: 360px; } javascript // when true, moving the mouse draws on the canvas let isdrawing = false; let x = 0; let y = 0; const mypics = document.getelementbyid('mypics'); const context = mypics.getcontext('2d'); // event.
offsetx, event.
offsety gives the (x,y)
offset from the edge of the canvas. // add the event listeners for mousedown, mousemove, and mouseup mypics.addeventlistener('mousedown', e => { x = e.
offsetx; y = e.
offsety; isdrawing = true; }); mypics.addeventlistener('mousemove', e => { if (isdrawing === true) { drawline(context, x, y, e.
offsetx, e.
offsety); x = e.
offsetx; y = e.
offsety; } }); window.
...wn, mousemove, and mouseup mypics.addeventlistener('mousedown', e => { x = e.
offsetx; y = e.
offsety; isdrawing = true; }); mypics.addeventlistener('mousemove', e => { if (isdrawing === true) { drawline(context, x, y, e.
offsetx, e.
offsety); x = e.
offsetx; y = e.
offsety; } }); window.addeventlistener('mouseup', e => { if (isdrawing === true) { drawline(context, x, y, e.
offsetx, e.
offsety); x = 0; y = 0; isdrawing = false; } }); function drawline(context, x1, y1, x2, y2) { context.beginpath(); context.strokestyle = 'black'; context.linewidth = 1; context.moveto(x1, y1); context.lineto(x2, y2); context.stroke(); context.closepath(); } result specifications specification status ui eventsthe definition of 'mousemo...
Element: mouseup event - Web APIs
ing to false. ...
...html <h1>drawing with mouse events</h1> <canvas id="mypics" width="560" height="360"></canvas> css canvas { border: 1px solid black; width: 560px; height: 360px; } javascript // when true, moving the mouse draws on the canvas let isdrawing = false; let x = 0; let y = 0; const mypics = document.getelementbyid('mypics'); const context = mypics.getcontext('2d'); // event.
offsetx, event.
offsety gives the (x,y)
offset from the edge of the canvas. // add the event listeners for mousedown, mousemove, and mouseup mypics.addeventlistener('mousedown', e => { x = e.
offsetx; y = e.
offsety; isdrawing = true; }); mypics.addeventlistener('mousemove', e => { if (isdrawing === true) { drawline(context, x, y, e.
offsetx, e.
offsety); x = e.
offsetx; y = e.
offsety; } }); window.
...wn, mousemove, and mouseup mypics.addeventlistener('mousedown', e => { x = e.
offsetx; y = e.
offsety; isdrawing = true; }); mypics.addeventlistener('mousemove', e => { if (isdrawing === true) { drawline(context, x, y, e.
offsetx, e.
offsety); x = e.
offsetx; y = e.
offsety; } }); window.addeventlistener('mouseup', e => { if (isdrawing === true) { drawline(context, x, y, e.
offsetx, e.
offsety); x = 0; y = 0; isdrawing = false; } }); function drawline(context, x1, y1, x2, y2) { context.beginpath(); context.strokestyle = 'black'; context.linewidth = 1; context.moveto(x1, y1); context.lineto(x2, y2); context.stroke(); context.closepath(); } result specifications specification status ui eventsthe definition of 'mouseup...
HTMLElement - Web APIs
presenting the language of an element's attributes, text, and element contents. htmlelement.nomodule is a boolean indicating whether an import script can be executed in user agents that support module scripts. htmlorforeignelement.nonce returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed. ...
...ndicating whether an import script can be executed in user agents that support module scripts. htmlorforeignelement.nonce returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed. htmlelement.
offsetheight read only returns a double containing the height of an element, relative to the layout. htmlelement.
offsetleft read only returns a double, the distance from this element's left border to its
offsetparent's left border. htmlelement.
offsetparent read only returns a element that is the element from which all
offset calculations are currently computed. htmlelement.
offsettop read only returns a double, the distance from this element's top border to its
offsetparent's top border. htmlelement.off...
...st created. also available via the ontransitionrun property. transitionstart fired when a css transition has actually started. also available via the ontransitionstart property. specifications specification status comment css object model (cssom) view modulethe definition of 'htmlelement' in that specification. working draft added the following properties:
offsetparent,
offsettop,
offsetleft,
offsetwidth, and
offsetheight. html living standardthe definition of 'htmlelement' in that specification. living standard added the following properties: translate, itemscope, itemtype, itemid, itemref, itemprop, properties, and itemvalue. added the following method: forcespellcheck(). moved the onxyz attributes to the globaleventhandlers inter...
Drag Operations - Web APIs
etting the drag feedback image when a drag occurs, a translucent image is generated from the drag target (the element the "dragstart" event is fired at), and follows the user's pointer during the drag. this image is created automatically, so you do not need to create it yourself. however, you can use setdragimage() to specify a custom drag feedback image. event.datatransfer.setdragimage(image, x
offset, y
offset); three arguments are necessary. the first is a reference to an image. this reference will typically be to an <img> element, but it can also be to a <canvas> or any other element. the feedback image will be generated from whatever the image looks like on screen, although for images, they will be drawn at their original size. the second and third arguments to the setdragimage() method a...
... it is also possible to use images and canvases that are not in a document. ...
...as.width = canvas.height = 50; const ctx = canvas.getcontext("2d"); ctx.linewidth = 4; ctx.moveto(0, 0); ctx.lineto(50, 50); ctx.moveto(0, 50); ctx.lineto(50, 0); ctx.stroke(); const dt = event.datatransfer; dt.setdata('text/plain', 'data to drag'); dt.setdragimage(canvas, 25, 25); } in this example, we make one canvas the drag image. as the canvas is 50×50 pixels, we use
offsets of half of this (25) so that the image appears centered on the mouse pointer. drag effects when dragging, there are several operations that may be performed. the copy operation is used to indicate that the data being dragged will be copied from its present location to the drop location. the move operation is used to indicate that the data being dragged will be moved, and the link operation is ...
WebGL2RenderingContext.clearBuffer[fiuv]() - Web APIs
possible values are: gl.color: color buffer. gl.depth: depth buffer. gl.stencil: stencil buffer. ...
...possible values are: gl.color: color buffer. gl.depth: depth buffer. gl.stencil: stencil buffer. ...
...possible values are: gl.color: color buffer. gl.depth: depth buffer. gl.stencil: stencil buffer. ...
WebGL2RenderingContext.copyBufferSubData() - Web APIs
possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data. gl.element_array_buffer: buffer used for element indices. ...
...possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data. gl.element_array_buffer: buffer used for element indices. ...
...gl.copy_write_buffer: buffer for copying from one buffer object to another (provided specifically for copy operations). gl.transform_feedback_buffer: buffer for transform feedback operations. gl.uniform_buffer: buffer used for storing uniform blocks. gl.pixel_pack_buffer: buffer used for pixel transfer operations. gl.pixel_unpack_buffer: buffer used for pixel transfer operations. read
offset write
offset a glintptr specifying the byte
offset from which to start reading from or writing to the buffer. size a glsizei in bytes specifying the size of the data to be copied from readtarget to writetarget. return value none. examples var srcbuffer = gl.createbuffer(); var dstbuffer = gl.createbuffer(); var data = new float32array(vertices); var length = vertices.length * 4; gl.bind...
WebGL2RenderingContext.copyTexSubImage3D() - Web APIs
the webgl2renderingcontext.copytexsubimage3d() method of the webgl api copies pixels from the current webglframebuffer into an existing 3d texture sub-image. syntax void gl.copytexsubimage3d(target, level, x
offset, y
offset, z
offset, x, y, width, height); parameters target a glenum specifying the binding point (target) of the active texture. possible values: gl.texture_3d: a three-dimensional texture. gl.texture_2d_array: a two-dimensional array texture. level a glint specifying the level of detail. ...
... x a glint specifying the x coordinate of the lower left corner where to start copying. y a glint specifying the y coordinate of the lower left corner where to start copying. ...
...y, width, height); parameters target a glenum specifying the binding point (target) of the active texture. possible values: gl.texture_3d: a three-dimensional texture. gl.texture_2d_array: a two-dimensional array texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. x
offset a glint specifying the x
offset within the texture image. y
offset a glint specifying the y
offset within the texture image. z
offset a glint specifying the z
offset within the texture image. x a glint specifying the x coordinate of the lower left corner where to start copying. y a glint specifying the y coordinate of the lower left corner where to start copying. width a glsizei specifying the width of the texture. hei...
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
the webgl2renderingcontext.drawelementsinstanced() method of the webgl 2 api renders primitives from array data like the gl.drawelements() method. in addition, it can execute multiple instances of a set of elements. note: when using webgl 1, the angle_instanced_arrays extension can provide this method, too. syntax void gl.drawelementsinstanced(mode, count, type,
offset, instancecount); parameters mode a glenum specifying the type primitive to render. possible values are: gl.points: draws a single dot. gl.line_strip: draws a straight line to the next vertex. gl.line_loop: draws a straight line to the next vertex, and connects the last vertex back to the first. gl.lines: draws a line between a pair of vertices. gl.triangle_strip gl.triangle_fan gl.triangles: d...
...gl.triangle_strip gl.triangle_fan gl.triangles: draws a triangle for a group of three vertices. count a glsizei specifying the number of elements to be rendered. type a glenum specifying the type of the values in the element array buffer. ...
...an gl.triangles: draws a triangle for a group of three vertices. count a glsizei specifying the number of elements to be rendered. type a glenum specifying the type of the values in the element array buffer. possible values are: gl.unsigned_byte gl.unsigned_short when using the oes_element_index_uint extension: gl.unsigned_int
offset a glintptr specifying an
offset in the element array buffer. must be a valid multiple of the size of the given type. instancecount a glsizei specifying the number of instances of the set of elements to execute. return value none. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if
offset is a valid multiple of the size of the given type, a gl.invalid_operation error is thrown. ...
WebGL2RenderingContext.texImage3D() - Web APIs
the webglrenderingcontext.teximage3d() method of the webgl api specifies a three-dimensional texture image. ...
...possible values: gl.texture_3d: a three-dimensional texture. gl.texture_2d_array: a two-dimensional array texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. internalformat a glint specifying the color compo...
..._float gl.float gl.unsigned_int_2_10_10_10_rev gl.unsigned_int_10f_11f_11f_rev gl.unsigned_int_5_9_9_9_rev gl.unsigned_int_24_8 gl.float_32_unsigned_int_24_8_rev (pixels must be null) source one of the following objects can be used as a pixel source for the texture: arraybufferview, imagebitmap, imagedata, htmlimageelement, htmlcanvaselement, htmlvideoelement.
offset a glintptr byte
offset into the webglbuffer's data store. used to upload data to the currently bound webgltexture from the webglbuffer bound to the pixel_unpack_buffer target. return value none. examples gl.teximage3d(gl.texture_3d, 0, // level gl.rgba, // internalformat ...
WebGLRenderingContext.copyTexSubImage2D() - Web APIs
possible values: gl.texture_2d: a two-dimensional texture. gl.texture_cube_map_positive_x: positive x face for a cube-mapped texture. gl.texture_cube_map_negative_x: negative x face for a cube-mapped texture. ...
...possible values: gl.texture_2d: a two-dimensional texture. gl.texture_cube_map_positive_x: positive x face for a cube-mapped texture. gl.texture_cube_map_negative_x: negative x face for a cube-mapped texture. ...
...e y face for a cube-mapped texture. gl.texture_cube_map_negative_y: negative y face for a cube-mapped texture. gl.texture_cube_map_positive_z: positive z face for a cube-mapped texture. gl.texture_cube_map_negative_z: negative z face for a cube-mapped texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. x
offset a glint specifying the horizontal
offset within the texture image. y
offset a glint specifying the vertical
offset within the texture image. x a glint specifying the x coordinate of the lower left corner where to start copying. y a glint specifying the y coordinate of the lower left corner where to start copying. width a glsizei specifying the width of the texture. height a glsizei spec...
WebGLRenderingContext - Web APIs
() specifies hints for certain behaviors. the interpretation of these hints depend on the implementation. webglrenderingcontext.isenabled() tests whether a specific webgl capability is enabled or not for this context. webglrenderingcontext.linewidth() sets the line width of rasterized lines. webglrenderingcontext.pixelstorei() specifies the pixel storage modes webglrenderingcontext.polygon
offset() specifies the scale factors and units to calculate depth values. webglrenderingcontext.samplecoverage() specifies multi-sample coverage parameters for anti-aliasing effects. webglrenderingcontext.stencilfunc() sets the both front and back function and reference value for stencil testing. webglrenderingcontext.stencilfuncseparate() sets the front and/or back function and reference value f...
...ilop() sets both the front and back-facing stencil test actions. webglrenderingcontext.stencilopseparate() sets the front and/or back-facing stencil test actions. buffers webglrenderingcontext.bindbuffer() binds a webglbuffer object to a given target. webglrenderingcontext.bufferdata() updates buffer data. webglrenderingcontext.buffersubdata() updates buffer data starting at a passed
offset. webglrenderingcontext.createbuffer() creates a webglbuffer object. webglrenderingcontext.deletebuffer() deletes a webglbuffer object. webglrenderingcontext.getbufferparameter() returns information about the buffer. webglrenderingcontext.isbuffer() returns a boolean indicating if the passed buffer is valid. framebuffers webglrenderingcontext.bindframebuffer() binds a webglframebuffe...
...etattriblocation() returns the location of an attribute variable. webglrenderingcontext.getuniform() returns the value of a uniform variable at a given location. webglrenderingcontext.getuniformlocation() returns the location of a uniform variable. webglrenderingcontext.getvertexattrib() returns information about a vertex attribute at a given position. webglrenderingcontext.getvertexattrib
offset() returns the address of a given vertex attribute. webglrenderingcontext.uniform[1234][fi][v]() specifies a value for a uniform variable. webglrenderingcontext.uniformmatrix[234]fv() specifies a matrix value for a uniform variable. webglrenderingcontext.vertexattrib[1234]f[v]() specifies a value for a generic vertex attribute. webglrenderingcontext.vertexattribpointer() specifies the dat...
Using bounded reference spaces - Web APIs
he right place. keep in mind that by default, the viewer's position is placed immediately above the floor, like a camera lying on the ground. ...
...ferencespace method request
offsetreferencespace(). this would change the onrefspacecreated() method from the above snippet to: function onrefspacecreated(refspace) { xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl) }); let startposition = vec3.fromvalues(0, 1.5, 0); const startorientation = vec3.fromvalues(0, 0, 1.0); xrreferencespace = xrreferencespace.get
offsetreferencespace( new xrrigidtransform(startposition, startorientation)); xrsession.requestanimationframe(ondrawframe); } in this code, executed after the reference space has been created, we create an xrrigidtransform representing the transform that will move the viewpoint upward by 1.5 meters. this approximates human height, though it assumes we've previously transformed the coordin...
..., we create an xrrigidtransform representing the transform that will move the viewpoint upward by 1.5 meters. this approximates human height, though it assumes we've previously transformed the coordinate system so that the value of each coordinate is no longer constrained to -1 to 1, while maintaining the definition that a value of 1 represents one meter). the new transform is passed into request
offsetreferenceframe() to obtain a reference frame which maps the coordinates between the base coordinate system and that of the rendered image. the new reference space replaces the original one. finally, drawing begins by calling the xrsession method requestanimationframe(). ...
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
ngths throughout our field of view—one from each eye. the brain uses this data to construct the scene in our minds, using the slight differences between the two perspectives to figure out depth and distance. rendering the scene an xr—shorthand that encompasses both virtual reality (vr) and augmented reality (ar)—headset presents 3d imagery to us by drawing two views of the scene, slightly
offset from one another just like the views obtained by our two eyes. these views are then separately fed to each eye, in order to allow them to collect the data our brain needs in order to construct a 3d image in our minds. to do this, webxr asks your renderer to draw the scene twice for each frame of video—once for each eye. the two views are rendered into the same framebuffer, one on the left and ...
...ich is a string whose value is left or right (a third possible value, none, theoretically may be used to represent another point of view, but support for this is not entirely available in the current api). ...
...the adjusted domxref("xrreferencespace")}} returned by this function is then passed into the xrframe method getviewerpose() to get the xrviewerpose representing the viewer's posi...
Inputs and input sources - Web APIs
e objecxrinputsource, but can just as well be used to draw any object, such as a ball, a tool, or a weapon. we covered the grip space above, but let's see how it can be used to draw objects representative of the hand or in the hand. since the origin of the grip space is located at the center of the hand's grip, you can use it as a starting point for rendering your object. simply apply any needed
offset transform to shift the origin to the start point for rendering your object as you apply any rotation needed to orient your model correctly to align with the grip space's orientation. <<<--- diagram needed: applying transform to grip space to position/orient object --->>> advanced controllers using the gamepad object an xrinputsource has a gamepad property whose value, if not null, is a gamepad...
...cause we are managing the avatar's position as defined by the keyboard and mouse in addition to anything the xr hardware might be doing, we need to maintain that information separately and apply it as a transform before rendering the avatar (or the world from the avatar's point of view). to accomplish that, we include in the avatar object a posdelta property, of type dompoint, which includes the
offsets to apply to all three axes in order to adjust the avatar's position (the viewer pose's reference space's origin) to include movement and rotation from the keyboard and mouse. the corresponding code for keyboard input might look something like this: document.addeventlistener("keydown", event => { switch(event.key) { case: "a": case: "a": avatar.posdelta.x -= accel_x; break...
...ew reference space that incorporates the updated deltas. function applyexternalinputs(avatar) { if (!avatar.posdelta.x && !avatar.posdelta.y && !avatar.posdelta.z) { return; // player hasn't moved with keyboard } let newtransform = new xrrigidtransform( { x: avatar.posdelta.x, y: avatar.posdelta.y, z: avatar.posdelta.z } ); avatar.referencespace = avatar.referencespace.get
offsetreferencespace(newtransform); } ...
Rendering and the WebXR frame animation callback - Web APIs
ser call your rendering function the next time it needs a framebuffer to render your scene. this is done by calling the xrsession method requestanimationframe(). ...
...ession) { worldrefspace = await xrsession.requestreferencespace("immersive-vr"); if (worldrefspace) { viewerrefspace = worldrefspace.get
offsetreferencespace( new xrrigidtransform(viewerstartposition, viewerstartorientation)); animationframerequestid = xrsession.requestanimationframe(mydrawframe); } } after getting a reference space for the immersive world, this creates an
offset reference space representing the position and orientation of the viewer by creating an xrrigidtransform representing that position and orientation, then calling the xrreferencespace method get
offsetreferencespace(). then the first animation frame is scheduled by calling the xrsession method requestanimationframe(), providing a callback function, mydrawframe(), whose job is to render the frame. ...
...eve three dimensions despite our retinas only being 2d surfaces. this is illustrated in the diagram below, in which we see how each eye perceives a die located directly in front of the viewer. while this diagram exaggerates the effect in some respects for illustrative purposes, the concept is the same. each eye sees an area whose boundaries make up an arc in front of the eye. because each eye is
offset to one side or the other of the head's centerline, and each eye sees about the same field of view, the result is that each eye sees a slightly different part of the world in front of it, and from a slightly different angle. the left eye sees the die from a little bit to the left of center, and the right eye sees it from a bit to the right of center. as a result, the left eye sees just a little...
Starting up and shutting down a WebXR session - Web APIs
this includes the xrsession itself,...
...select the right reference space for your needs, see selecting the reference space type in geometry and reference spaces in webxr. the reference space returned by requestreferencespace() places the origin (0, 0, 0) in the center of the space. this is great—if your player's viewpoint starts in the exact center of the world. but most likely, that's not the case at all. ...
...eometry and reference spaces in webxr. the reference space returned by requestreferencespace() places the origin (0, 0, 0) in the center of the space. this is great—if your player's viewpoint starts in the exact center of the world. but most likely, that's not the case at all. if that's so, you call get
offsetreferencespace() on the initial reference space to create a new reference space which
offsets the coordinate system so that (0, 0, 0) is located at the position of the viewer, with the orientation likewise shifted to face in the desired direction. the input value into get
offsetreferencespace() is an xrrigidtransform encapsulating the player's position and orientation as specified in the default world coordinates. with the new reference space in hand and stored into the worlddata object ...
XRView - Web APIs
te a new reference space for that object which applies a transform that encapsulates the desired changes. 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
offsets for yaw, pitch, and position along all three axes. function applymousemovement(refspace) { if (!mouseyaw && !mousepitch && !axialdistance && !transversedistance && !verticaldistance) { return refspace; } // compute the quaternion used to rotate the image based // on the pitch and yaw. quat.identity(inverseorientation); quat.rotatex(inverseorientation, inverseorientation,...
... z: axialdistance}, {x: inverseorientation[0], y: inverseorientation[1], z: inverseorientation[2], w: inverseorientation[3]}); mat4.copy(mousematrix, newtransform.matrix); // create a new reference space that transforms the object to the new // position and orientation, returning the new reference space. return refspace.get
offsetreferencespace(newtransform); } this code is broken into four sections. in the first, the quaternion inverseorientation is computed. this represents the rotation of the object given the values of mousepitch (rotation around the object's reference's space's x axis) and mouseyaw (rotation around the object's y axis). the second section computes the "up" vector for the object. this vector indicates...
...ct given the values of mousepitch (rotation around the object's reference's space's x axis) and mouseyaw (rotation around the object's y axis). the second section computes the "up" vector for the object. this vector indicates the direction which is "up" in the scene overall, but in the object's reference space. the third section creates the new xrrigidtransform, specifying a point providing the
offsets along the three axes as the first parameter, and the orientation quaternion as the second parameter. the returned object's matrix property is the actual matrix that transforms points from the scene's reference space to the object's new position. finally, a new reference space is created to describe the relationship between the two reference spaces fully. that reference space is returnedto the c...
Border-image generator - CSS: Cascading Style Sheets
bscribe : subscribe, unsubscribe : unsubscribe }; })(); window.addeventlistener("load", function() { borderimage.init(); }); var borderimage = (function borderimage() { var getelembyid = document.getelementbyid.bind(document); var subject; var preview; var guidelines = []; var positions = ['top', 'right', 'bottom', 'left']; var makedraggable = function makedraggable(elem) { var
offsettop; var
offsetleft; elem.setattribute('data-draggable', 'true'); var dragstart = function dragstart(e) { if (e.target.getattribute('data-draggable') !== 'true' || e.target !== elem || e.button !== 0) return;
offsetleft = e.clientx - elem.
offsetleft;
offsettop = e.clienty - elem.
offsettop; document.addeventlistener('mousemove', mousedrag); document.addeventlistener...
...enty - elem.
offsettop; document.addeventlistener('mousemove', mousedrag); document.addeventlistener('mouseup', dragend); }; var dragend = function dragend(e) { if (e.button !== 0) return; document.removeeventlistener('mousemove', mousedrag); document.removeeventlistener('mouseup', dragend); }; var mousedrag = function mousedrag(e) { elem.style.left = e.clientx -
offsetleft + 'px'; elem.style.top = e.clienty -
offsettop + 'px'; }; elem.addeventlistener('mousedown', dragstart, false); }; var previewcontrol = function previewcontrol() { var dragging = false; var valuex = null; var valuey = null; var dragstart = function dragstart(e) { if (e.button !== 0) return; valuex = e.clientx - preview.clientwidth; valuey = e.clienty - previ...
... if (unit_topic) inputslidermanager.setstep(unit_topic, value); }; var show = function show(e) { var topic = e.target.getattribute('data-topic'); var precision = inputslidermanager.getprecision(topic); var step = inputslidermanager.getstep(topic); unit_topic = topic; title.textcontent = topic; panel.setattribute('data-active', 'true'); panel.style.top = e.target.
offsettop - 40 + 'px'; panel.style.left = e.target.
offsetleft + 30 + 'px'; inputslidermanager.setvalue('unit-precision', precision); inputslidermanager.setvalue('unit-step', step); }; var init = function init() { panel = document.createelement('div'); title = document.createelement('div'); var close = document.createelement('div'); step = inputslidermanager.createslider('unit...
Basic Shapes - CSS: Cascading Style Sheets
gin box. we will see this in the following examples of basic shapes. for an excellent description of references boxes as they apply to css shapes see understanding reference boxes for css shapes. inset() the inset() 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 inset() types enables the definition of
offsets, thus pulling the content in over the shape. therefore inset() takes four values for the top, right, bottom and left values plus a final value for border-radius. the below css creates a rectangular shape inset from the reference box of the floated element 20 pixels from the top and bottom and 10 pixels from the left and right, with a border-radius value of 10 pixels. .shape { float: left; ...
...alue for border-radius. the below css creates a rectangular shape inset from the reference box of the floated element 20 pixels from the top and bottom and 10 pixels from the left and right, with a border-radius value of 10 pixels. .shape { float: left; shape-outside: inset(20px 10px 20px 10px round 10px); } using the same rules as we use for the margin shorthand, you can set more than one
offset at once. if there is only one value, it applies to all sides. if there are two values, the top and bottom
offsets are set to the first value and the right and left
offsets are set to the second. if there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. if there are four values, they apply to the top, right, bottom, ...
... value, the left and right are set to the second, and the bottom is set to the third. if there are four values, they apply to the top, right, bottom, and left, respectively. so, the above rules could also be described as: .shape { float: left; shape-outside: inset(20px 10px round 10px); } in the example below we have an inset() shape used to pull content over the floated element. change the
offset values to see how the shape changes. you can also add the box value that you wish to use as a reference box. in the example below change the reference box from margin-box to border-box, padding-box or content-box to see how the reference box used as the starting point before
offsets are calculated changes. circle() the circle() value for shape-outside can accept two possible arguments. the...
Linear-gradient Generator - CSS: Cascading Style Sheets
sl'); else this.setpickermode('hsv'); }.bind(this)); this.node.appendchild(button); }; /*************************************************************************/ // updates properties of ui elements /*************************************************************************/ colorpicker.prototype.updatecolor = function updatecolor(e) { var x = e.pagex - this.picking_area.
offsetleft; var y = e.pagey - this.picking_area.
offsettop; // width and height should be the same var size = this.picking_area.clientwidth; if (x > size) x = size; if (y > size) y = size; if (x < 0) x = 0; if (y < 0) y = 0; var value = 100 - (y * 100 / size) | 0; var saturation = x * 100 / size | 0; if (this.picker_mode === 'hsv') this.color.sethsv(this.color.hue, saturation, ...
...tify('value', value); this.notify('lightness', value); this.notify('saturation', saturation); this.notify('red', this.color.r); this.notify('green', this.color.g); this.notify('blue', this.color.b); this.notify('hexa', this.color.gethexa()); notify(this.topic, this.color); }; colorpicker.prototype.updatehueslider = function updatehueslider(e) { var x = e.pagex - this.hue_area.
offsetleft; var width = this.hue_area.clientwidth; if (x < 0) x = 0; if (x > width) x = width; var hue = ((359 * x) / width) | 0; this.updatesliderposition(this.hue_picker, x - 1); this.sethue(hue); }; colorpicker.prototype.updatealphaslider = function updatealphaslider(e) { var x = e.pagex - this.alpha_mask.
offsetleft; var width = this.alpha_mask.clientwidth; if (x < 0) x = 0; ...
...ibute('axisid')); }); axis.addeventlistener('dragover', allowdropevent); axis.addeventlistener('drop', function swap(e) { if (dragelem === this) return; var from = getorderid(e.datatransfer.getdata('axisid')); var to = getorderid(this.getattribute('axisid')); var swap = lg_axes[from]; lg_axes[from] = lg_axes[to]; lg_axes[to] = swap; var left = dragelem.
offsetleft; dragelem.style.left = this.
offsetleft + 'px'; this.style.left = left + 'px'; updatecssgradient(); }); activateaxisshortcut(axis); return axis; }; var activateaxisshortcut = function activateaxisshortcut(node) { if (activeshortcut) activeshortcut.removeattribute('data-state'); node.setattribute('data-state', 'active'); activeshortcut = node; }; va...
background-position-x - CSS: Cascading Style Sheets
rty is specified as one or more values, separated by commas. values left aligns the left edge of the background image with the left edge of the background position layer. center aligns the center of the background image with the center of the background position layer. right aligns the right edge of the background image with the right edge of the background position layer. <length> the
offset of the given background image's left vertical edge from the background position layer's left vertical edge. (some browsers allow assigning the right edge for
offset). <percentage> the
offset of the given background image's horizontal position relative to the container. a value of 0% means that the left edge of the background image is aligned with the left edge of the container, and a value of 1...
...tainer, and a value of 100% means that the right edge of the background image is aligned with the right edge of the container, thus a value of 50% horizontally centers the background image. ...
...oid full support 18firefox android full support 49opera android full support 18safari ios full support 1samsung internet android full support 1.0two-value syntax (support for
offsets from any edge)chrome no support noedge no support 12 — 79firefox full support 49ie full support 9opera no support nosafari no support nowebview a...
background-position-y - CSS: Cascading Style Sheets
s one or more values, separated by commas. values top aligns the top edge of the background image with the top edge of the background position layer. center aligns the vertical center of the background image with the vertical center of the background position layer. bottom aligns the bottom edge of the background image with the bottom edge of the background position layer. <length> the
offset of the given background image's horizontal edge from the corresponding background position layer's top horizontal edge. (some browsers allow assigning the bottom edge for
offset). <percentage> the
offset of the given background image's vertical position relative to the container. a value of 0% means that the top edge of the background image is aligned with the top edge of the container, and a v...
...tainer, and a value of 100% means that the bottom edge of the background image is aligned with the bottom edge of the container, thus a value of 50% vertically centers the background image. ...
...oid full support 18firefox android full support 49opera android full support 14safari ios full support 1samsung internet android full support 1.0two-value syntax (support for
offsets from any edge)chrome no support noedge no support 12 — 79firefox full support 49ie full support 9opera no support nosafari no support nowebview a...
background - CSS: Cascading Style Sheets
ackground-origin: padding-boxbackground-clip: border-boxbackground-attachment: scrollbackground-color: transparentapplies toall elements. ...
...-clip: border-boxbackground-attachment: scrollbackground-color: transparentapplies toall elements. ...
...minus size of background image; size refers to the width for horizontal
offsets and to the height for vertical
offsetsbackground-size: relative to the background positioning areacomputed valueas each of the properties of the shorthand:background-image: as specified, but with <url> values made absolutebackground-position: a list, each item consisting of two keywords representing the origin and two
offsets from that origin, each given as an absolute length (if given a <length>), otherwise as a percentagebackground-size: as specified, but with relative lengths converted into absolute lengthsbackground-repeat: a list, each item consisting of two keywords, one per dimensionbackground-origin: as specifiedbackground-clip: as specifiedbackground-attachment: as specifiedbackground-color: computed coloran...
<basic-shape> - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax the <basic-shape> data type is defined with one of the basic shape functions listed below. when creating a shape, the reference box is defined by each property that uses <basic-shape> values. the coordinate system for the shape has its origin at the top-left corner of the reference box, with the x-axis running to the right and the y-axis running downwards. ...
...from the used dimensions of the reference box. shape functions the following shapes are supported. all <basic-shape> values use functional notation and are defined here using the value definition syntax. inset() inset( <shape-arg>{1,4} [round <border-radius>]? ) defines an inset rectangle. when all of the first four arguments are supplied they represent the top, right, bottom and left
offsets from the reference box inward that define the positions of the edges of the inset rectangle. these arguments follow the syntax of the margin shorthand, that let you set all four insets with one, two or four values. the optional <border-radius> argument(s) define rounded corners for the inset rectangle using the border-radius shorthand syntax. a pair of insets in either dimension that add up ...
...ence box. for circles, this is the farthest side in any dimension. for ellipses, this is the farthest side in the radius dimension. description computed values of basic shapes the values in a <basic-shape> function are computed as specified, with these exceptions: omitted values are included and compute to their defaults. a <position> value in circle() or ellipse() is computed as a pair of
offsets (horizontal then vertical) from the top left origin, each given as a combination of an absolute length and a percentage. a <border-radius> value in inset() is computed as an expanded list of all eight <length> or percentage values. interpolation of basic shapes when animating between one <basic-shape> and another, the rules below are applied. the values in the shape functions interpolate as ...
inset-block-end - CSS: Cascading Style Sheets
it corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation. /* <length> values */ inset-block-end: 3px; inset-block-end: 2.4em; /* <percentage>s of the width or height of the containing block */ inset-block-end: 10%; /* keyword value */ inset-block-end: auto; /* global values */ inset-block-end: inherit; inset-block-end: initial; inset-block-end: unset; syntax values the inset-block-end property takes the same values as the left property. ...
...et-block-end: 10%; /* keyword value */ inset-block-end: auto; /* global values */ inset-block-end: inherit; inset-block-end: initial; inset-block-end: unset; syntax values the inset-block-end property takes the same values as the left property. ...
... the inset-block-end property takes the same values as the left property. ...
inset-block-start - CSS: Cascading Style Sheets
it corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation. ...
...rt: 10%; /* keyword value */ inset-block-start: auto; /* global values */ inset-block-start: inherit; inset-block-start: initial; inset-block-start: unset; syntax values the inset-block-start property takes the same values as the left property. ...
... inset-block-start property takes the same values as the left property. ...
inset-block - CSS: Cascading Style Sheets
it corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and text-orientation. ...
...t-block: initial; inset-block: unset; constituent properties this property is a shorthand for the following css properties: inset-block-end inset-block-start syntax values the inset-block property takes the same values as the left property. ...
...block property takes the same values as the left property. ...
inset-inline-start - CSS: Cascading Style Sheets
it corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation. ...
...et-inline-start: inherit; inset-inline-start: initial; inset-inline-start: unset; the shorthand for inset-inline-start and inset-inline-end is inset-inline. syntax values the inset-inline-start property takes the same values as the left property. ...
...inset-inline-start property takes the same values as the left property. ...
inset-inline - CSS: Cascading Style Sheets
it corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and text-orientation. ...
...line: initial; inset-inline: unset; constituent properties this property is a shorthand for the following css properties: inset-inline-end inset-inline-start syntax values the inset-inline property takes the same values as the left property. ...
...nline property takes the same values as the left property. ...
inset - CSS: Cascading Style Sheets
it has the same multi-value syntax of the margin shorthand. it is a shorthand that corresponds to the top, right, bottom, and/or left properties. ...
... height (top/bottom) of the containing block */ inset: 10% 5% 5% 5%; /* keyword value */ inset: auto; /* global values */ inset: inherit; inset: initial; inset: unset; syntax values the inset property takes the same values as the left property. ...
... syntax values the inset property takes the same values as the left property. ...
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 source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the scroll-padding properties define
offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport. constituent properties this property is a shorthand for t...
...this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed ...
...es */ 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: unset; values <length-percentage> an inwards
offset from the corresponding edge of the scrollport, as a valid length or a percentage. auto the
offset is determind by the user agent. this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]...
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 source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the scroll-padding properties define
offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. constituent properties this property is a shorthand fo...
...this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed ...
...croll-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: unset; values <length-percentage> an inwards
offset from the corresponding edge of the scrollport, as a valid length or a percentage. auto the
offset is determind by the user agent. this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]...
scroll-padding - CSS: Cascading Style Sheets
hand property sets scroll padding on all sides of an element at once, much like the padding property does for padding on an element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the scroll-padding-* properties define
offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars), or simply to put more breathing room between a targeted element and the edges of the scrollport. constituent properties this ...
...this will generally be 0px, but the user agent is free to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcom...
...-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: unset; values <length-percentage> an inwards
offset from the corresponding edge of the scrollport, as a valid <length> or a <percentage>. auto the
offset is determind by the user agent. this will generally be 0px, but the user agent is free to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage>...
TypedArray - JavaScript
bigint uint64_t (unsigned long long) constructor this object cannot be instantiated directly. instead, you create an instance of an array of a particular type, such as a int8array or a bigint64array. these objects all have a common syntax for their constructors: new typedarray(); new typedarray(length); new typedarray(typedarray); new typedarray(object); new typedarray(buffer [, byte
offset [, length]]); where typedarray is a constructor for one of the concrete types. 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typeda...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. static properties ...
...() creates a new typedarray with a variable number of arguments. see also array.of(). instance properties typedarray.prototype.buffer returns the arraybuffer referenced by the typed array. fixed at construction time and thus read only. typedarray.prototype.bytelength returns the length (in bytes) of the typed array. fixed at construction time and thus read only. typedarray.prototype.byte
offset returns the
offset (in bytes) of the typed array from the start of its arraybuffer. fixed at construction time and thus read only. typedarray.prototype.length returns the number of elements held in the typed array. fixed at construction time and thus read only. instance methods typedarray.prototype.copywithin() copies a sequence of array elements within the array. see also array.prototyp...
exponent - SVG: Scalable Vector Graphics
the exponent attribute defines the exponent of the gamma function. ...
...the exponent of the gamma function. ...
...s 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
offset="0" stop-color="#ff0000" /> <stop
offset="0.5" stop-color="#00ff00" /> <stop
offset="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> </filter> <filter id="componenttransfer2" x="0" y="0" width="100%" height="100...
gradientTransform - SVG: Scalable Vector Graphics
e implicit transformation necessary to convert from object bounding box units to user space. ...
...from object bounding box units to user space. ...
...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
offset="0%" stop-color="darkblue" /> <stop
offset="50%" stop-color="skyblue" /> <stop
offset="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
offset="0%" stop-color="darkblue" /> <stop
offset="50%" stop-color="skyblue" /> <stop
offset="100%" stop-color="darkblue" /> </radialgradient> <rect x="0" ...
intercept - SVG: Scalable Vector Graphics
ar function of color component transfers when the type attribute is set to linear. ...
...he type attribute is set to linear. ...
...s 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
offset="0" stop-color="#ff0000" /> <stop
offset="0.5" stop-color="#00ff00" /> <stop
offset="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" width="100%" heigh...
requiredFeatures - SVG: Scalable Vector Graphics
//www.w3.org/tr/svg11/feature#text the browser supports the <text>, <tspan>, <tref>, <textpath>, <altglyph>, <altglyphdef>, <altglyphitem> and <glyphref> elements. ...
...w3.org/tr/svg11/feature#paintattribute the browser supports the color, fill, fill-rule, stroke, stroke-dasharray, stroke-dash
offset, 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-dash
offset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width and color-rendering attributes http://www.w3.org/tr/svg11/feature#opacityattribute the browser supports the opacity, stroke-opacity and fill-opacity attributes http://www.w3.org/tr/svg11/feature#graphicsattribute the browser supports the display, image-rendering, pointer-events, shape-rendering, text-rendering and visib...
...ip-path attribute http://www.w3.org/tr/svg11/feature#mask the browser supports the <mask> element http://www.w3.org/tr/svg11/feature#filter the browser supports the <filter>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorphology>, <fe
offset>, <fespecularlighting>, <fetile>, <fedistantlight>, <fepointlight>, <fespotlight>, <fefuncr>, <fefuncg>, <fefuncb> and <fefunca> elements http://www.w3.org/tr/svg11/feature#basicfilter the browser supports the <filter>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femergenode>, <fe
offset>, <fetile>, <fefuncr>, <fefuncg...
tableValues - SVG: Scalable Vector Graphics
s defining a lookup table of values for a for a color component transfer function. ...
... color component transfer function. ...
...s 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
offset="0" stop-color="#ff0000" /> <stop
offset="0.5" stop-color="#00ff00" /> <stop
offset="1" stop-color="#0000ff" /> </lineargradient> </defs> <filter id="componenttransfer1" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="table" tablevalues="0 1"/> <fefuncg type="table" tablevalues="0 1"/> <fefuncb type="table" tablevalues="0 1"/> </fecomponenttransfer> </filter> <filter id="componenttransfer2" x="0" y="0" width="10...
SVG Attribute reference - SVG: Scalable Vector Graphics
g 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
offset 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...
...nunits 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 start
offset stddeviation stemh stemv stitchtiles stop-color stop-opacity strikethrough-position strikethrough-thickness string stroke stroke-dasharray stroke-dash
offset 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 textlengt...
..., flood-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-dash
offset, 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,
offset...
<defs> - SVG: Scalable Vector Graphics
svg content and is beneficial to the overall accessibility of the document. ...
...ccessibility of the document. ...
...ly: 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-dash
offset, 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>, <f...
<feMerge> - SVG: Scalable Vector Graphics
d concurrently instead of sequentially. this is achieved by other filters storing their output via the result attribute and then accessing it in a <femergenode> child. ...
...by other filters storing their output via the result attribute and then accessing it in a <femergenode> child. ...
.../svg"> <filter id="fe
offset" x="-40" y="-20" width="100" height="200"> <fe
offset in="sourcegraphic" dx="60" dy="60" /> <fegaussianblur stddeviation="5" result="blur2" /> <femerge> <femergenode in="blur2" /> <femergenode in="sourcegraphic" /> </femerge> </filter> <rect x="40" y="40" width="100" height="100" style="stroke: #000000; fill: green; filter: url(#fe
offset);" /> </svg> result attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes none dom interface this element implements the svgfemergeelement interface. specifications specification status comment filter effects module level 1the definition of '<femerge>' in that specification.
<feMergeNode> - SVG: Scalable Vector Graphics
the femergenode takes the result of another filter to be processed by its parent <femerge>. ...
...genode takes the result of another filter to be processed by its parent <femerge>. ...
..."100" height="200"> <fe
offset in="sourcegraphic" dx="60" dy="60" /> <fegaussianblur in="sourcegraphic" stddeviation="5" result="blur2" /> <femerge> <femergenode in="blur2" /> <femergenode in="sourcegraphic" /> </femerge> </filter> <rect x="40" y="40" width="100" height="100" style="stroke: #000000; fill: green; filter: url(#fe
offset);" /> <rect x="40" y="40" width="100" height="100" style="stroke: #000000; fill: green;" /> </svg> result attributes global attributes core attributes » specific attributes in dom interface this element implements the svgfemergenodeelement interface. specifications specification status comment filter effects module level 1the definition...
<linearGradient> - SVG: Scalable Vector Graphics
raphical elements. don't be confused with css linear-gradient() as css gradients can only apply to html elements where svg gradient can only apply to svg elements. ...
...s linear-gradient() as css gradients can only apply to html elements where svg gradient can only apply to svg elements. ...
...es 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-dash
offset, 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 ...
Creating a Web based tone generator - Archive of obsolete content
es a simple tone generator, and plays the resulting tone. the function requestsounddata() produces the samples to be played. this function is called at a certain interval through the setinterval() function. the function mozwriteaudio() is called to write those samples produced in the audio stream. in order to always have samples to play, a buffer of 500 ms is created. the function mozcurrentsample
offset() is used to know the position of the samples being played so that we can fill a 500 ms buffer of audio samples. <!doctype html> <html> <head> <title>javascript audio write example</title> </head> <body> <input type="text" size="4" id="freq" value="440"><label for="hz">hz</label> <button onclick="start()">play</button> <button onclick="stop()">stop</button> <script ty...
...writeposition += written; if(written < tail.length) { // not all the data was written, saving the tail... tail = tail.subarray(written); return; // ... and exit the function. } tail = null; } // check if we need add some data to the audio output. var currentposition = audio.mozcurrentsample
offset(); var available = currentposition + prebuffersize - currentwriteposition; if(available > 0) { // request some sound data from the callback function. var sounddata = new float32array(parsefloat(available)); readfn(sounddata); // writing the data. written = audio.mozwriteaudio(sounddata); if(written < soun...
listbox - Archive of obsolete content
keynavigation, itemcount, listboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, moveby
offset, 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 ...
...item(0). insertitemat( index, label, value ) return type: element this method creates a new item and inserts it at the specified position. you may optionally set a value. the new item element is returned. invertselection() return type: no return value reverses the selected state of all items. selected items become deselected, and deselected items become selected. moveby
offset(
offset , isselecting, isselectingrange) return type: no return value if
offset is positive, adjusts the focused item forward by that many items. if
offset is negative, adjusts the focused item backward by that many items. if isselecting is true, then the selection is also adjusted. if isselectingrange is also true, then the new item is selected in addition to any currently selected items. if i...
menupopup - Archive of obsolete content
s on the direction of the anchor. position possible values for position are: before_start, before_end, after_start, after_end, start_before, start_after, end_before, end_after, overlap, and after_pointer. check positioning of the popup guide for a precise description of the effect of the different values. x, y for an anchored popup, the x and y arguments may be used to
offset the popup from its anchored position by some number, measured in css pixels. an unanchored popup appears at the position specified by x and y, relative to the viewport of the document containing the popup node. in this case, the position and attributesoverride arguments are ignored. iscontextmenu the iscontextmenu argument should be true for context menus and false for all other typ...
...the anchor and align arguments may be used to further control where the popup appears relative to the element. the anchor argument corresponds to the popupanchor attribute on the element. the align argument corresponds to the popupalign attribute on the element. the anchor and align arguments are ignored if either x or y are not -1. to have a popup appear relative to another element yet still
offset by some number of pixels, determine the actual screen position of the element using the boxobject.screenx and boxobject.screeny properties of the element, and use those as the x and y arguments
offset by the desired values. the popuptype should be one of the strings popup, context, or tooltip. each type of popup is intended to be displayed only temporarily; they are not expected to be display...
richlistbox - Archive of obsolete content
ynavigation, itemcount, scrollboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, moveby
offset, 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...
...m(0). insertitemat( index, label, value ) return type: element this method creates a new item and inserts it at the specified position. you may optionally set a value. the new item element is returned. invertselection() return type: no return value reverses the selected state of all items. selected items become deselected, and deselected items become selected. moveby
offset(
offset , isselecting, isselectingrange) return type: no return value if
offset is positive, adjusts the focused item forward by that many items. if
offset is negative, adjusts the focused item backward by that many items. if isselecting is true, then the selection is also adjusted. if isselectingrange is also true, then the new item is selected in addition to any currently selected items. if i...
tooltip - Archive of obsolete content
s on the direction of the anchor. position possible values for position are: before_start, before_end, after_start, after_end, start_before, start_after, end_before, end_after, overlap, and after_pointer. check positioning of the popup guide for a precise description of the effect of the different values. x, y for an anchored popup, the x and y arguments may be used to
offset the popup from its anchored position by some number, measured in css pixels. an unanchored popup appears at the position specified by x and y, relative to the viewport of the document containing the popup node. in this case, the position and attributesoverride arguments are ignored. iscontextmenu the iscontextmenu argument should be true for context menus and false for all other typ...
...the anchor and align arguments may be used to further control where the popup appears relative to the element. the anchor argument corresponds to the popupanchor attribute on the element. the align argument corresponds to the popupalign attribute on the element. the anchor and align arguments are ignored if either x or y are not -1. to have a popup appear relative to another element yet still
offset by some number of pixels, determine the actual screen position of the element using the boxobject.screenx and boxobject.screeny properties of the element, and use those as the x and y arguments
offset by the desired values. the popuptype should be one of the strings popup, context, or tooltip. each type of popup is intended to be displayed only temporarily; they are not expected to be display...
Browser Feature Detection - Archive of obsolete content
ueafter 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 marker
offset 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...
...{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': false}, {name: 'left', 'supported': false}, {name: 'marker
offset', 'supported': false}, {name: 'marks', 'supported': false}, {name: 'maxheight', 'supported': false}, {name: 'maxwidth', 'supported': false}, {name: 'minheight', 'supported': false}, {name: 'minwidth', 'supported': false}, {name: 'orphans', 'supported': false}, {name: 'outline', 'supported': false}, {name: 'outlinecolor', 'supported': false}, {name: 'outlinestyle', 'supported': f...
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
e the fish names. these are enclosed in h3 elements, so the field was pretty wide open in terms of what we could do. 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. rather than try to fight it or push the image below the h3's element box, i let the image mostly overlap the h3, but with a slight
offset. i then set up a thicker double border on the left, a one-pixel border the rest of the way around, and set the background to match the rest of the design. thus: div.card {float: left; width: 45%; margin: 1em 2% 0 2%;} div.card img {float: left; margin: 4px 0 0 0; border: 1px solid #339;} div.card h3 {border: 1px solid #339; border-left: 5px double #339; background: #eec url(body-bg-tan.jpg) ...
... basically touching the right side of the floated image... ...or it would have been, except in some browsers the heading was drawn over the floated image, in contradiction to the css specification. getting the image back on top of the heading turned out to be a matter of relatively positioning the floated image, and then giving it a z-index value. in order to create visual appeal, i decided to
offset the top let corners of the fish image and fish name. with just a few simple margin and padding changes, this was possible. div.card {float: left; width: 45%; margin: 1em 2% 0 2%;} div.card img {float: left; position: relative; z-index: 10; margin: 4px 0 0 0; border: 1px solid #339;} div.card h3 {margin: 0 0 0 4px; padding: 0.2em 0 1px 150px; border: 1px solid #339; border-left: 5px double #3...
Collision detection - Game development
drawing it — if status is 1, then draw it, but if it's 0, then it was hit by the ball and we don't want it on the screen anymore. ...
...by the ball and we don't want it on the screen anymore. ...
Mouse controls - Game development
p event: document.addeventlistener("mousemove", mousemovehandler, false); anchoring the paddle movement to the mouse movement we can update the paddle position based on the pointer coordinates — the following handler function will do exactly that. ...
...usemovehandler(e) { var relativex = e.clientx - canvas.
offsetleft; if(relativex > 0 && relativex < canvas.width) { paddlex = relativex - paddlewidth/2; } } in this function we first work out a relativex value, which is equal to the horizontal mouse position in the viewport (e.clientx) minus the distance between the left edge of the canvas and left edge of the viewport (canvas.
offsetleft) — effectively this is equal to the distance between the canvas left edge and the mouse pointer. if the relative x pointer position is greater than zero and lower than the canvas width, the pointer is within the canvas boundaries, and the paddlex position (anchored on the left edge of the paddle) is set to the relativex value minus half the width of the paddle, so that the movement will act...
Accessibility/LiveRegionDevGuide
types - ia2_event_text_removed and ia2_event_text_inserted. the text associated with an at-spi text changed event is directly in the event object. the event.any_data field holds the entire text string while event.detail1 is the start index while event.detail2 is the text string length. in iaccessible2, iaccessibletext::get_oldtext and iaccessibletext::get_newtext are used to acquire the text and
offsets. filtering events text changed events certain web page mutation events, such as adding to a list, trigger both an object changed and a text changed event. both events should not be acted upon or double announcements would result. instead, all text changed events should be examined for the presence of an embed character. if one is present, the text changed event should be discarded because a...
...wed to finish but the 'rude' messages should be output as soon as possible. container-atomic the atomic property determines if a live region change should be presented on it's own or if an at should present the entire region. 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. the text
offsets associated with a text changed event are used when supporting this property. the
offsets can be acquired directly in a text changed event object in at-spi and through the use of iaccessibletext::get_oldtext and iaccessibletext::get_newtext in iaccessible2. when atomic is set to "false", the start index and end index/run length are used as given. the result being that only the change will be pres...
Performance best practices for Firefox front-end engineers
do i avoid triggering uninterruptible reflow? here's a list of things that javascript can ask for that can cause uninterruptible reflow, to help you think about the problem. note that some items in the list may be browser-specific or subject to change, and that an item not occurring explicitly in the list doesn't mean it doesn't cause reflow. for instance, at time of writing accessing event.range
offset triggers reflow in gecko, and does not occur in the earlier link. if you're unsure whether something causes reflow, check! note how abundant the properties in that first list are. this means that when enumerating properties on dom objects (e.g. elements/nodes, events, windows, etc.) accessing the value of each enumerated property will almost certainly (accidentally) cause uninterruptible reflow,...
...formation you get is potentially out-of-date, but allows you to avoid a sync reflow. if you can make do with information that may not be quite current, this can be helpful. nsidomwindowutils.getrootbounds() like getboundswithoutflushing(), getrootbounds() lets you get the dimensions of the window without risking a synchronous reflow. nsidomwindowutils.getscrollxy() returns the window's scroll
offsets without taking the chance of causing a sync reflow. writing tests to ensure you don’t add more unintentional reflow the interface nsireflowobserver lets us detect both interruptible and uninterruptible reflows. a number of tests have been written that exercise various functions of the browser (opening tabs, opening windows) and ensure that we don’t add new uninterruptible reflows accidenta...
I/O Types
ude the types used for system access, normal file i/o, and socket (network) i/o. types unique to a particular function are described with the function itself. for sample code that illustrates basic i/o operations, see introduction to nspr. directory type file descriptor types file info types network address types types used with socket options functions type used with memory-mapped i/o
offset interpretation for seek functions directory type prdir file descriptor types nspr represents i/o objects, such as open files and sockets, by file descriptors of type prfiledesc. this section introduces prfiledesc and related types. prfiledesc priomethods prfileprivate prdescidentity note that the nspr documentation follows the unix convention of using the termfiles to refer to man...
...mple, the netscape implementation of the secure sockets layer (ssl) protocol is implemented as an i/o layer on top of nspr's socket layer. file info types prfileinfo prfileinfo64 prfiletype network address types prnetaddr pripv6addr types used with socket options functions prsocketoptiondata prsockoption prlinger prmcastrequest type used with memory-mapped i/o prfilemap
offset interpretation for seek functions prseekwhence ...
Shell global objects
ls are toys, meant only for testing; one shell principal subsumes another if its set bits are a superset of the other's. thus, a principal of 0 subsumes nothing, while a principals of ~0 subsumes all other principals. the absence of a principal is treated as if its bits were 0xffff, for subsumption purposes. if this property is omitted, supply no principal. createmappedarraybuffer(filename, [
offset, [size]]) create an array buffer that mmaps the given file. addpromisereactions(promise, onresolve, onreject) calls the js::addpromisereactions jsapi function with the given arguments. getmaxargs() return the maximum number of supported args for a call. objectemulatingundefined() return a new object obj for which typeof obj === "undefined", obj == null and obj == undefined (and vice versa ...
...trumentation and corresponding assertions, with slow assertions disabled. enablespsprofilingwithslowassertions() enables sps instrumentation and corresponding assertions, with slow assertions enabled. disablespsprofiling() disables sps instrumentation islatin1(s) return true iff the string's characters are stored as latin1. stackpointerinfo() return an int32 value which corresponds to the
offset of the latest stack pointer, such that one can take the differences of 2 to estimate a frame-size. entrypoints(params) carry out some jsapi operation as directed by params, and return an array of objects describing which javascript entry points were invoked as a result. params is an object whose properties indicate what operation to perform. here are the recognized groups of properties: { f...
Secure Development Guidelines
+2147483647 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,
offsets, 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%...
...1; 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,
offsets, 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 ?
Insert
« xpcom api reference summary the insert family of functions inserts a value into a string's internal buffer. void insert( const self_type& astring, index_type aposition ); parameters astring [in] a nsacstring to append to this string. aposition [in] an
offset into the string's internal buffer specifying where to place the given characters. void insert( const char_type* adata, index_type aposition, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to append to this string. aposition [in] an
offset into the string's internal buffer specifying where to place the given characters. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise,...
...tring's internal buffer specifying where to place the given characters. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void insert( char_type achar, index_type aposition ); parameters achar [in] a character to append to this string. aposition [in] an
offset into the string's internal buffer specifying where to place the given characters. remarks if insufficient memory is available to perform the assignment, then the string's internal buffer will point to a static empty (zero-length) buffer. ...
Insert
« xpcom api reference summary the insert family of functions inserts a value into a string's internal buffer. void insert( const self_type& astring, index_type aposition ); parameters astring [in] a nsastring to append to this string. aposition [in] an
offset into the string's internal buffer specifying where to place the given characters. void insert( const char_type* adata, index_type aposition, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to append to this string. aposition [in] an
offset into the string's internal buffer specifying where to place the given characters. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, ...
...tring's internal buffer specifying where to place the given characters. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void insert( char_type achar, index_type aposition ); parameters achar [in] a character to append to this string. aposition [in] an
offset into the string's internal buffer specifying where to place the given characters. remarks if insufficient memory is available to perform the assignment, then the string's internal buffer will point to a static empty (zero-length) buffer. ...
IAccessibleHyperlink
ely this method could return an iunknown variant of a com interface representing a target object to be activated when the link is activated. see the section about. return value e_invalidarg if bad [in] passed, [out] value is null. s_false if there is nothing to return, [out] value is null. s_ok. ...
...the returned value is related to the iaccessibletext interface of the object that owns this hyperlink. return value s_ok. valid() returns whether the target object referenced by this link is still valid. this is a volatile state that may change without sending an appropriate event. ...
mozITXTToHTMLConv
ls of email reply quotes are used, when the text uses "quote" characters (such as ">") at the beginning of the line to indicate cite levels. unsigned long citeleveltxt( in wstring line, out unsigned long loglinestart ); parameters line the original line of text, which may begin with one or more cite characters such as ">". loglinestart on output, this parameter is set to indicate the
offset into the string of the first non-cite character. you must set this value to zero before calling this method. return value the cite level of the quote; that is, the number of text quote characters found at the beginning of the string. findurlinplaintext() returns the start and end
offsets of the first url found in a substring. void findurlinplaintext( in wstring text, in long alength, ...
...aracters found at the beginning of the string. findurlinplaintext() returns the start and end
offsets of the first url found in a substring. void findurlinplaintext( in wstring text, in long alength, in long apos, out long astartpos, out long aendpos ); parameters text the string to scan for the presence of a url. alength the length of the buffer to scan. apos the character
offset into the string at which to begin the scan. astartpos on return, indicates the
offset to the first character of the first found url, or -1 if no url was found. aendpos on return, indicates the
offset to the last character of the first found url, or -1 if no url was found. remarks you can call this method repeatedly, passing in updated values for apos, to locate all the urls in a string. ...
nsIAccessibleHyperLink
this hyperlink. is normally 1 for anchors. this anchor is, for example, the visible output of the html:a tag. with an image map, reflects the actual areas within the map. read only. note: renamed from anchors in gecko 1.9 exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree. endindex long the end
offset of the hyperlink accessible within the parent accessible. the returned value is related to the nsiaccessiblehyperlink interface of the object that owns this hyperlink. read only. note: the link itself is represented by one embedded character within the parent text, so the endindex should be startindex + 1. exceptions thrown ns_error_failure indicates that the accessible i...
...us, for example after returning from the destination page. read only. 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. exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree. startindex long the
offset of the hyperlink accessible within the parent accessible. the returned value is related to the nsiaccessiblehyperlink interface of the object that owns this hyperlink. read only. exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree. valid boolean determines whether the hyperlink is valid, for exam...
nsICompositionStringSynthesizer
this means that the clause is not converted. i.e., raw text of user input. attr_selectedrawtext 0x03 a clause attribute but this is typically not used. this means that the clause is not conver...
...fying composition string. boolean dispatchevent(); return value if dispatched event's default is prevented, returns true. however, this must always return false since all dispatching dom events are not cancelable. setcaret() sets caret position in the composition string set by setstring(). this is optional. i.e., you may not call this before dispatchevent(). void setcaret(in unsigned long a
offset, in unsigned long alength); parameters a
offset caret
offset in the composition string. this value must be between 0 and the length of astring of setstring(). alength if you want wide caret, you can set over 0. however, gecko doesn't support wide caret yet. (bug 979112) setstring() sets new composition string. this must be called before every call of dispatchevent(). void...
nsIContentView
entheight float read only. contentwidth float dimensions of scrolled content in chrome-document css pixels. read only. id nscontentviewid id that can be used in conjunction with nsidomwindowutils to change the actual document, instead of just how it is transformed; this is a 64-bit unsigned integer. read only. ...
...on with nsidomwindowutils to change the actual document, instead of just how it is transformed; this is a 64-bit unsigned integer. read only. scrollx float horizontal scroll
offset 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
offset. note: when this view becomes inactive, the new content view will have scroll values that are reset to the default. read only. scrolly float horizontal scroll
offset in chrome-document css pixels. read only. viewportheight float height of the viewport in chrome-document css pixels. read only. viewportwidth float width of the viewport in ch...
nsIDocShell
stream(in nsiinputstream astream, in nsiuri auri, in acstring acontenttype, in acstring acontentcharset, in nsidocshellloadinfo aloadinfo); native code only! void loaduri(in nsiuri uri, in nsidocshellloadinfo loadinfo, in unsigned long aloadflags, in boolean firstparty); native code only! void preparefornewcontentmodel(); void resumerefreshuris(); void setchild
offset(in unsigned long
offset); 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 passwor...
... document viewer. called by the document before initiating an out of band document.write(). void preparefornewcontentmodel(); parameters none. resumerefreshuris() restart the xpcom timers for each meta-refresh uri in this docshell, and this docshell's children, recursively. if the timers are already running, this has no effect. void resumerefreshuris(); parameters none. native code only!setchild
offset set the
offset of this child in its container. void setchild
offset( in unsigned long
offset ); parameters
offset the
offset of this nsidocshell within its parent. used to restore session history for frames. setcurrenturi() for editors and suchlike who wish to change the uri associated with the document. note if you want to get the current uri, use the read-only property on nsiwebnav...
nsIDragService
ferables an array of transferables to be dragged. aregion a region containing rectangles for cursor feedback, in window coordinates. aactiontype specified which of copy/move/link are allowed. invokedragsessionwithimage() starts a modal drag session using an image. a custom image may be specified using the aimage argument. ...
... feedback, in window coordinates. aactiontype specified which of copy/move/link are allowed. invokedragsessionwithimage() starts a modal drag session using an image. a custom image may be specified using the aimage argument. if this is supplied, the aimagex and aimagey arguments specify the
offset within the image where the cursor would be positioned. that is, when the image is drawn, it is
offset up and left the amount so that the cursor appears at that location within the image. if aimage is null, aimagex and aimagey are not used and the image is instead determined from the source node adomnode, and the
offset calculated so that the initial location for the image appears in the same screen position as where the element is located. the node must be within a document. currently, supported...
nsIMsgFolder
msgwindow); void setmsgdatabase(in nsimsgdatabase msgdatabase); nsimsgdatabase getdbfolderinfoanddb(out nsidbfolderinfo folderinfo); nsimsgdbhdr getmessageheader(in nsmsgkey msgkey); boolean shouldstoremsgoffline(in nsmsgkey msgkey); boolean hasmsgoffline(in nsmsgkey msgkey); nsiinputstream getofflinefilestream(in nsmsgkey msgkey, out pruint32
offset, out pruint32 size); void downloadmessagesforoffline(in nsisupportsarray messages, in nsimsgwindow window); nsimsgfolder getchildwithuri(in acstring uri, in boolean deep, in boolean caseinsensitive); void downloadallforoffline(in nsiurllistener listener, in nsimsgwindow window); void enablenotifications(in long notificationtype, in boolean enable, in boolean db...
...tdbfolderinfoanddb(out nsidbfolderinfo folderinfo); getmessageheader() nsimsgdbhdr getmessageheader(in nsmsgkey msgkey); shouldstoremsgoffline() boolean shouldstoremsgoffline(in nsmsgkey msgkey); hasmsgoffline() boolean hasmsgoffline(in nsmsgkey msgkey); getofflinefilestream() nsiinputstream getofflinefilestream(in nsmsgkey msgkey, out pruint32
offset, out pruint32 size); downloadmessagesforoffline() void downloadmessagesforoffline(in nsisupportsarray messages, in nsimsgwindow window); getchildwithuri() nsimsgfolder getchildwithuri(in acstring uri, in boolean deep, in boolean caseinsensitive); downloadallf...
nsINavHistoryQuery
annotation autf8string the annotation name. annotationisnot boolean test for existance or non-existance of a given annotation. we don't currently support >1 annotation name per query. if annotationisnot is true, we test for the non-existance of the speci...
... annotation autf8string the annotation name. ...
nsIOutputStream
urns true. ns_error_not_implemented indicates that the stream does not have an internal buffer that can be written to directly. ...
...id* aclosure, char* atosegment, pruint32 afrom
offset, pruint32 acount, pruint32* areadcount) { // afromsegment now contains acount bytes of data. nsacstring* pbuf = (nsacstring*) aclosure; const char* data; pruint32 len = ns_cstringgetdata(&data); data += afrom
offset; len -= afrom
offset; if (len > acount) len = acount; memcpy(atosegment, data, len); // indicate that we have copied len bytes to the segment *areadcount = len; return ns_ok; } // write the contents of asource into astream, using writesegments // to avoid intermediate buffer copies. nsresult writestream(const nsacstring& asource, nsiinputstream* astream) { pruint3...
nsIResumableChannel
entityid); attributes attribute type description entityid acstring the entity id for this uri. available after onstartrequest. read only. exceptions thrown ns_error_not_resumable if this load is not resumable. 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
offset. the request given to the nsistreamlistener will be qiable to nsiresumableinfo. void asyncopenat( in nsistreamlistener listener, in nsisupports ctxt, in unsigned long startpos, in nsiresumableentityid entityid ); parameters listener as for asyncopen. ctxt as for asyncopen. startpos the starting
offset, in bytes, to use to download. entityid information about the file, to match before ob...
...the status of this channel during onstartrequest may be ns_error_entity_changed, which indicates that the entity has changed, as indicated by a changed entityid. in both of these cases, no ondataavailable will be called, and onstoprequest will immediately follow with the same status code. void resumeat( in unsigned long long startpos, in acstring entityid ); parameters startpos the starting
offset, in bytes, to use to download. entityid information about the file, to match before obtaining the file. pass an empty string to use anything. see also implementing download resuming ...
nsIStreamListener
nt to consume data from a nsichannel need to implement this interface. nsirequestobserver contains two methods. so, in all the three methods - ondataavailable(), nsirequestobserver.onstartrequest() and nsirequestobserver.onstoprequest() have to be implemented. method overview void ondataavailable(in nsirequest arequest, in nsisupports acontext, in nsiinputstream ainputstream, in unsigned long a
offset, 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. the data can be read from the nsiinputstream object passed as the argument to this method. note: your implementation of this method must read exactly acount bytes of data before returning. void ondataavailable( in nsir...
... of data for the ongoing request may be read without blocking the calling thread. the data can be read from the nsiinputstream object passed as the argument to this method. note: your implementation of this method must read exactly acount bytes of data before returning. void ondataavailable( in nsirequest arequest, in nsisupports acontext, in nsiinputstream ainputstream, in unsigned long a
offset, in unsigned long acount ); parameters arequest an nsirequest indicating the source of the data. acontext a user-defined context value. ainputstream an nsiinputstream from which the data is to be read. a
offset number of bytes that were sent in previous ondataavailable() calls for this request. in other words, the sum of all previous count parameters. if that number is greater than or equal to...
nsITextInputProcessor
vent adomkeyevent, [optional] in unsigned long akeyflags); boolean getmodifierstate(in domstring amodifierkeyname); boolean keydown([optional] in nsidomkeyevent adomkeyevent, [optional] in unsigned long akeyflags); boolean keyup([optional] in nsidomkeyevent adomkeyevent, [optional] in unsigned long akeyflags); void setcaretinpendingcomposition(in unsigned long a
offset); void setpendingcompositionstring(in domstring astring); void sharemodifierstateof(in nsitextinputprocessor aother); boolean startcomposition([optional] in nsidomkeyevent adomkeyevent, [optional] in unsigned long akeyflags); attributes attribute type description hascomposition boolean whether the instance has composition or not...
...y_* constants. if this is not specified, the value is assumed as 0. return value true if keyup event isn't consumed by a call of preventdefault(). setcaretinpendingcomposition() sets caret position in the composition string set by setpendingcompositionstring(). this is optional, i.e., you may not call this before flushpendingcomposition(). void setcaretinpendingcomposition(in unsigned long a
offset); parameters a
offset caret
offset in the composition string. this value must be between 0 and the length of astring of setpendingcompositionstring(). setpendingcompositionstring() sets pending composition string. this must be called before every call of flushpendingcomposition(). void setpendingcompositionstring(in astring astring); parameters astring new pending composition string...
nsITraceableChannel
var data = istream.readbytes(aco...
...ure why its 8192 but thats how eveyrone is doing it, we should ask why var ostream = new binaryoutputstream(sstream.getoutputstream(0)); // binaryoutputstream // copy received data as they come. ...
Drawing and Event Handling - Plugins
e window, often a child window of the the browser window itself, to draw into. the plug-in has complete control over drawing and event handling within that window. on mac os, the browser does not give a windowed plug-in a native window, because the mac os platform does not support child windows. instead, the windowed plug-in draws into the graphics port associated with the browser window, at the
offset that the browser specifies. on ms windows and unix, the browser creates a child window for each plug-in instance and passes it a window through npp_setwindow. on mac os, the application uses npp_setwindow to dedicate a rectangular part of its graphics port to each instance. on any platform, the browser should be careful not to draw in the plug-in's area, and vice versa. the data structure passed...
...p_handleevent or before the plug-in calls a drawing-related browser method. unix/x11 the plug-in receives a graphicsexpose event. the xgraphicsexposeevent structure contains the xlib drawable (which is an offscreen pixmap), its display, and the dirty rectangle (optional clip rectangle) specified relative to the top-left corner of the drawable. the plugin should draw to the drawable with the
offset specified in the x and y members of the npwindow structure, with the clip rectangle specified in the cliprect member, and with the visual and colormap specified in the ws_info member. making a plug-in opaque a windowless plug-in is opaque if it has no transparent areas. when the browser generates a paint message for the plug-in, it assumes that the plug-in is responsible for painting the entire...
Streams - Plugins
function should return the number of bytes consumed by the instance. if this is a negative number, the browser calls npp_destroystream to destroy the stream. if the number returned is smaller than the size of the buffer, the browser sends the remaining data in the buffer to the plug-in through repeated calls to npp_writeready and npp_write. int32 npp_write(npp instance, npstream *stream, int32
offset, int32 len, void *buf); the instance parameter is the current plug-in instance; the stream parameter specifies the current stream. the
offset parameter specifies the
offset, in bytes, of buf from the beginning of the data in the stream. the len parameter specifies the length, in bytes, of buf, the buffer of data (delivered by the stream). the buffer allocated by the browser is deleted after ret...
...riteready and npp_write calls occur on the same stream. an individual call to npn_requestread can request discontiguous ranges, and you can have many outstanding npn_requestread calls. there is no guarantee that npp_write will receive requests for ranges in the same order as you requested (although this typically is the case; the server controls the order). so, you'll need to pay attention to the
offsets as data is being written. the stream processes all byte-range requests, and then is placed in seek mode (either explicitly in npp_newstream, or implicitly by a call to npn_requestread). it remains open until the plug-in closes it by calling npn_destroystream, or until the instance is destroyed. note: if you want to be sure that the npn_*stream functions are called in the order you want and beh...
Debugger.Frame - Firefox Developer Tools
has a depth of zero. live true if the frame this debugger.frame instance refers to is still on the stack; false if it has completed execution or been popped in some other way. script the script being executed in this frame (a debugger.script instance), or null on frames that do not represent calls to debuggee code. on frames whose callee property is not null, this is equal to callee.script.
offset the
offset of the bytecode instruction currently being executed in script, or undefined if the frame’s script property is null. for a wasmcall frame, this property throws a typeerror. environment the lexical environment within which evaluation is taking place (a debugger.environment instance), or null on frames that do not represent the evaluation of debuggee code, like calls non-debuggee fu...
...rame is popped, passing a completion value indicating how this frame’s execution completed, and providing this debugger.frame instance as the this value. the function should return a resumption value indicating how execution should proceed. on newly created frames, this property’s value is undefined. when this handler is called, this frame’s current execution location, as reflected in its
offset and environment properties, is the operation which caused it to be unwound. in frames returning or throwing an exception, the location is often a return or a throw statement. in frames propagating exceptions, the location is a call. when an onpop call reports the completion of a construction call (that is, a function called via the new operator), the completion value passed to the handler descr...
Debugger - Firefox Developer Tools
de coverage should be enabled inside each debuggee of this debugger instance. changing this flag value will recompile all jit code to add or remove code coverage instrumentation. changing this flag when any frame of the debuggee is currently active on the stack will produce an exception. setting this to true enables code coverage instrumentation, which can be accessed via the debugger.script get
offsetscoverage function. in some cases, the code coverage might expose information which pre-date the modification of this flag. code coverage reports are monotone, thus one can take a snapshot when the debugger is enabled, and output the difference. setting this to false prevents this debugger instance from requiring any code coverage instrumentation, but it does not guarantee that the instrumentati...
...report is an object describing the error, with the following properties: message the fully formatted error message. file if present, the source file name, url, etc. (if this property is present, theline property will be too, and vice versa.) line if present, the source line number at which the error occurred. linetext if present, this is the source code of the offending line.
offset the index of the character within linetext at which the error occurred. warning present and true if this is a warning; absent otherwise. strict present and true if this error or warning is due to the strict option (not to be confused with es strict mode) exception present and true if an exception will be thrown; absent otherwise. arguments an array of strings, representing the a...
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
e content of the loop. the sample frames, comprising the loop, run from the values loopstart to loopend-(1/samplerate). it's sensible to set this to a value between 0 and the duration of the buffer. if loopend is less than 0, looping will end at 0. if loopend is greater than the duration of the buffer, looping will end at the end of the buffer. this attribute is converted to an exact sample frame
offset within the buffer, by multiplying by the buffer's sample rate and rounding to the nearest integer value. thus, its behavior is independent of the value of the playbackrate parameter. loopstart: an optional value in seconds, where looping should begin if the loop attribute is true. the default is 0. it's sensible to set this to a value between 0 and the duration of the buffer. if loopstart ...
...tart: an optional value in seconds, where looping should begin if the loop attribute is true. the default is 0. it's sensible to set this to a value between 0 and the duration of the buffer. if loopstart is less than 0, looping will begin at 0. if loopstart is greater than the duration of the buffer, looping will begin at the end of the buffer. this attribute is converted to an exact sample frame
offset within the buffer, by multiplying by the buffer's sample rate and rounding to the nearest integer value. thus, its behavior is independent of the value of the playbackrate parameter. playbackrate: the speed at which to render the audio stream. its default value is 1. this parameter is k-rate. this is a compound parameter with detune. its nominal range is (-∞ to +∞). return value a ne...
AudioScheduledSourceNode.start() - Web APIs
the start() method on audioscheduledsourcenode schedules a sound to begin playback at the specified time. if no time is specified, then the sound begins playing immediately. syntax audioscheduledsourcenode.start([when [,
offset [, duration]]]); parameters when optional the time, in seconds, at which the sound should begin to play. this value is specified in the same time coordinate system as the audiocontext is using for its currenttime attribute. a value of 0 (or omitting the when parameter entirely) causes the sound to start playback immediately.
offset optional a floating-point number indicating the
offset, in seconds, into the audio buffer where playback should begin. if 0 is passed then the playback will start from the beginning. duration optional a floating-point number indica...
...this error occurs even if the node is no longer running because of a prior call to stop(). rangeerror the value specified for when is negative. ...
Blob.slice() - Web APIs
the blob interface's slice() method creates and returns a new blob object which contains data from a subset of the blob on which it's called. syntax var newblob = blob.slice(start, end, contenttype); parameters start optional an index into the blob indicating the first byte to include in the new blob. if you specify a negative value, it's treated as an
offset from the end of the blob toward the beginning. for example, -10 would be the 10th from last byte in the blob. the default value is 0. if you specify a value for start that is larger than the size of the source blob, the returned blob has size 0 and contains no data. end optional an index into the blob indicating the first byte that will *not* be included in the new blob (i.e. the byte exactly at this index is not included). if you...
...from last byte in the blob. the default value is 0. if you specify a value for start that is larger than the size of the source blob, the returned blob has size 0 and contains no data. end optional an index into the blob indicating the first byte that will *not* be included in the new blob (i.e. the byte exactly at this index is not included). if you specify a negative value, it's treated as an
offset from the end of the blob toward the beginning. for example, -10 would be the 10th from last byte in the blob. the default value is size. contenttype optional the content type to assign to the new blob; this will be the value of its type property. the default value is an empty string. return value a new blob object containing the specified subset of the data contained within the blob on which...
Determining the dimensions of elements - Web APIs
erties are read-only. 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. how much room does it use up? 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.
offsetwidth and htmlelement.
offsetheight properties. most of the time these are the same as width and height of element.getboundingclientrect(), when there aren't any transforms applied to the element. in case of transforms, the
offsetwidth and
offsetheight returns the element's layout width and height, while getboundingclientrect() returns the rendering width and height. as an example, if the element h...
...lement.getboundingclientrect(), when there aren't any transforms applied to the element. in case of transforms, the
offsetwidth and
offsetheight 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
offsetwidth will return 100. what's the size of the displayed content? if you need to know how much space the actual displayed content takes up, including padding but not including the border, margins, or scrollbars, you want to use the element.clientwidth and element.clientheight properties: how big is the content? if you need to know the actual size of the content, regardless of how much of it...
CanvasRenderingContext2D.arcTo() - Web APIs
nects the arc to (20, 20) with a straight line. note that the arc's second control point and the point specified by lineto() are the same, which produces a totally smooth corner. 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
offset = 15; ctx.filltext('(' + p.x + ',' + p.y + ')', p.x +
offset, p.y +
offset); } 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. in this example, the ar...
...ument.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,
offset, i = 0){ const {x, y} =
offset; 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.shadowBlur - Web APIs
syntax ctx.shadowblur = level; level a non-negative float specifying the level of shadow blur, where 0 represents no blur and larger numbers represent increasingly more blur. ...
... syntax ctx.shadowblur = level; level a non-negative float specifying the level of shadow blur, where 0 represents no blur and larger numbers represent increasingly more blur. ...
CharacterData - Web APIs
st one in the list. methods inherits methods from its parent, node, and implements the childnode and nondocumenttypechildnode interface. characterdata.appenddata() appends the given domstring to the characterdata.data string; when this method returns, data contains the concatenated domstring. characterdata.deletedata() removes the specified amount of characters, starting at the specified
offset, from the characterdata.data string; when this method returns, data contains the shortened domstring. characterdata.insertdata() inserts the specified characters, at the specified
offset, in the characterdata.data string; when this method returns, data contains the modified domstring. childnode.remove() removes the object from its parent children list. characterdata.replacedata() replaces...
... data contains the shortened domstring. characterdata.insertdata() inserts the specified characters, at the specified
offset, in the characterdata.data string; when this method returns, data contains the modified domstring. childnode.remove() removes the object from its parent children list. characterdata.replacedata() replaces the specified amount of characters, starting at the specified
offset, 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
offset. specifications specification status comment domthe definition of 'characterdata' in that specification. living standar...
ConstantSourceNode() - Web APIs
senting an audio source which constantly outputs samples whose values are always the same. syntax var constantsourcenode = new constantsourcenode(context, options); parameters context an audiocontext representing the audio context you want the node to be associated with. options a constantsourceoptions dictionary object defining the properties you want the constantsourcenode to have:
offset: a read-only audioparam specifying the constant value generated by the source. the default is 1.0. the normal range is -1.0 to 1.0, but the value can be anywhere in the range from -infinity to +infinity. example in this example, an audio context is created, then a constantsourcenode is established with its
offset initialized to 0.5. let audiocontext = new audiocontext(); let myconstantso...
...nt value generated by the source. the default is 1.0. the normal range is -1.0 to 1.0, but the value can be anywhere in the range from -infinity to +infinity. example in this example, an audio context is created, then a constantsourcenode is established with its
offset initialized to 0.5. let audiocontext = new audiocontext(); let myconstantsource = new constantsourcenode(audiocontext, {
offset: 0.5 }); note: the new constantsourcenode created by the constructor has a channelcount of 2. specifications specification status comment web audio apithe definition of 'constantsourcenode: constantsourcenode' in that specification. working draft ...
DOMLocator - Web APIs
domlocator.relatednode read only returns a positive integer or -1. ...
... domlocator.relatednode read only returns a positive integer or -1. ...
EffectTiming.iterationStart - Web APIs
rationstart corresponds directly to animationeffecttimingreadonly.iterationstart in timing objects returned by animationeffectreadonly, keyframeeffectreadonly, and keyframeeffect. ...
...since all animations' iteration indexes start at 0, a value of 0.5 would start the animation halfway through its first iteration or loop. ...
HTMLAudioElement - Web APIs
ding an audio file into it if the file url is given. properties no specific properties; inherits properties from its parent, htmlmediaelement, and from htmlelement. methods inherits methods from its parent, htmlmediaelement, and from htmlelement. it offers no methods of its own. obsolete mozilla-only methods the following methods are non-standard and should not be used. ...
.... mozcurrentsample
offset() 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(). mozsetup() 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
offset, returning the number of bytes actually written to the stream. examples basic usage you can create a htmlaudioelement entirely with javascript using the audio() constructor: var audioelement = new audio('car_horn.wav'); then you can invoke the play() method on the element audioelement.play(); a common gotcha is trying to play an audio element immediately on page load. modern browser's d...
Intersection Observer API - Web APIs
ow clip, the root intersection rectangle is the root element's content area. otherwise, the root intersection rectangle is the intersection root's bounding client rectangle (as returned by calling getboundingclientrect() on it). the root intersection rectangle can be adjusted further by setting the root margin, rootmargin, when creating the intersectionobserver. the values in rootmargin define
offsets added to each side of the intersection root's bounding box to create the final intersection root bounds (which are disclosed in intersectionobserverentry.rootbounds when the callback is executed). thresholds rather than reporting every infinitesimal change in how much a target element is visible, the intersection observer api uses thresholds. when you create an observer, you can provide one or...
... rootmargin: "0px", threshold: buildthresholdlist() }; observer = new intersectionobserver(handleintersect, options); observer.observe(boxelement); } this begins by setting up an options object containing the settings for the observer. we want to watch for changes in visibility of the target element relative to the document's viewport, so root is null. we need no margin, so the margin
offset, rootmargin, is specified as "0px". this causes the observer to watch for changes in the intersection between the target element's bounds and those of the viewport, without any added (or subtracted) space. the list of visibility ratio thresholds, threshold, is constructed by the function buildthresholdlist(). the threshold list is built programmatically in this example since there are a number o...
KeyboardEvent.code - Web APIs
(). this function takes as input the distance the ship is to be moved, where positive is a forward movement and negative is a backward movement. this function computes the new position of the ship given the distance moved and the current direction the ship is facing. it also handles ensuring that the ship wraps across the boundaries of the play field instead of vanishing. ...
...ositive is a forward movement and negative is a backward movement. this function computes the new position of the ship given the distance moved and the current direction the ship is facing. it also handles ensuring that the ship wraps across the boundaries of the play field instead of vanishing. function updateposition(
offset) { let rad = angle * (math.pi/180); position.x += (math.sin(rad) *
offset); position.y -= (math.cos(rad) *
offset); 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 by using an svg transform. function refresh() { let x = position.x - (ship...
MediaSessionActionDetails - Web APIs
indicating whether or not to perform a "fast" seek. a "fast" seek is a seek being performed in a rapid sequence, such as when fast-forwarding or reversing through the media, rapidly skipping through it. this property can be used to indicate that you should use the shortest possible method to seek the media. fastseek is not included on the final action in the seek sequence in this situation. seek
offset optional if the action is either seekforward or seekbackward and this property is present, it is a floating point value which indicates the number of seconds to move the play position forward or backward. if this property isn't present, those actions should choose a reasonable default distance to skip forward or backward (such as 7 or 10 seconds). seektime optional if the action is seekto, thi...
...rmed. the following strings identify the currently available types of media session action: nexttrack advances playback to the next track. pause pauses playback of the media. play begins (or resumes) playback of the media. previoustrack moves back to the previous track. seekbackward seeks backward through the media from the current position. the mediasessionactiondetails property seek
offset specifies the amount of time to seek backward. seekforward seeks forward from the current position through the media. the mediasessionactiondetails property seek
offset specifies the amount of time to seek forward. seekto moves the playback position to the specified time within the media. the time to which to seek is specified in the mediasessionactiondetails property seektime. if you intend t...
MouseEvent - Web APIs
n when the mouse event was fired. mouseevent.metakey read only returns true if the meta key was down when the mouse event was fired. mouseevent.movementx read only the x coordinate of the mouse pointer relative to the position of the last mousemove event. mouseevent.movementy read only the y coordinate of the mouse pointer relative to the position of the last mousemove event. mouseevent.
offsetx read only the x coordinate of the mouse pointer relative to the position of the padding edge of the target node. mouseevent.
offsety read only the y coordinate of the mouse pointer relative to the position of the padding edge of the target node. mouseevent.pagex read only the x coordinate of the mouse pointer relative to the whole document. mouseevent.pagey read only the y coordina...
... pointer lockthe definition of 'mouseevent' in that specification. candidate recommendation from document object model (dom) level 3 events specification, added movementx and movementy properties. css object model (cssom) view modulethe definition of 'mouseevent' in that specification. working draft from document object model (dom) level 3 events specification, added
offsetx and
offsety, pagex and pagey, x, and y properties. redefined screen, page, client, and coordinate (x and y) properties as double from long. ui eventsthe definition of 'mouseevent' in that specification. working draft document object model (dom) level 3 events specificationthe definition of 'mouseevent' in that specification. obsolete from document object model (dom...
PannerNode.coneInnerAngle - Web APIs
ientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume. to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector. the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are
offset by the same amount in radians. however, normally this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'hor...
...at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and
offset 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. they range between -1 and 1 const x = math.cos(radians); const z = math.sin(radians); // we hard-code the y component to 0, as y is the axis of rotation return [x, 0, z]; }; now we can create our audioco...
PannerNode.coneOuterAngle - Web APIs
ientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume. to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector. the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are
offset by the same amount in radians. however, normally this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'hor...
...at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and
offset 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. they range between -1 and 1 const x = math.cos(radians); const z = math.sin(radians); // we hard-code the y component to 0, as y is the axis of rotation return [x, 0, z]; }; now we can create our audioco...
PannerNode.coneOuterGain - Web APIs
ientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume. to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector. the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are
offset by the same amount in radians. however, normally this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'hor...
...at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and
offset 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. they range between -1 and 1 const x = math.cos(radians); const z = math.sin(radians); // we hard-code the y component to 0, as y is the axis of rotation return [x, 0, z]; }; now we can create our audioco...
PannerNode.orientationX - Web APIs
ientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume. to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector. the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are
offset by the same amount in radians. however, normally this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'hor...
...at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and
offset 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. they range between -1 and 1 const x = math.cos(radians); const z = math.sin(radians); // we hard-code the y component to 0, as y is the axis of rotation return [x, 0, z]; }; now we can create our audioco...
PannerNode.orientationY - Web APIs
ientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume. to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector. the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are
offset by the same amount in radians. however, normally this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'hor...
...at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and
offset 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. they range between -1 and 1 const x = math.cos(radians); const z = math.sin(radians); // we hard-code the y component to 0, as y is the axis of rotation return [x, 0, z]; }; now we can create our audioco...
PannerNode.orientationZ - Web APIs
ientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume. to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector. the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are
offset by the same amount in radians. however, normally this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'hor...
...at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`. it's more useful to
offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation. // this utility converts amount of rotation around the y axis // (i.e. rotation in the 'horizontal plane') to an orientation vector const yrotationtovector = degrees => { // convert degrees to radians and
offset 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. they range between -1 and 1 const x = math.cos(radians); const z = math.sin(radians); // we hard-code the y component to 0, as y is the axis of rotation return [x, 0, z]; }; now we can create our audioco...
Range.selectNodeContents() - Web APIs
syntax range.selectnodecontents(referencenode); parameters referencenode the node whose contents will be selected within a range. ...
... syntax range.selectnodecontents(referencenode); parameters referencenode the node whose contents will be selected within a range. ...
Range.setStart() - Web APIs
the range.setstart() method sets the start position of a range. if the startnode is a node of type text, comment, or cdatasection, then start
offset is the number of characters from the start of startnode. for other node types, start
offset is the number of child nodes between the start of the startnode. setting the start point below (lower in the document) the end point will result in a collapsed range with the start and end points both set to the specified start position. syntax range.setstart(startnode, start
offset); parameters startnode the node where the range should start. start
offset an integer greater than or equal to zero representing the
offset for the start of the range from the start of startnode. examples highlight part of an element this example uses the range.setsta...
...</p> <hr> <p>nodes in the original address:</p> <ol id="log"></ol> javascript const address = document.getelementbyid('address'); const log = document.getelementbyid('log'); // log info address.childnodes.foreach(node => { const li = document.createelement('li'); li.textcontent = `${node.nodename}, ${node.nodevalue}`; log.appendchild(li); }); // highlight the street and city const start
offset = 2; // start at third node: 101 e. main st. const end
offset = 5; // end at fifth node: dodge city, ks const range = document.createrange(); range.setstart(address, start
offset); range.setend(address, end
offset); const mark = document.createelement('mark'); range.surroundcontents(mark); result get characters from a text node this example uses the range.setstart() and range.setend() meth...
SVGAnimationElement - Web APIs
inite), then a domexception with code not_supported_err is raised. svganimationelement.beginelement() creates a begin instance time for the current time. the new instance time is added to the begin instance times list. the behavior of this method is equivalent to beginelementat(0). svganimationelement.beginelementat() creates a begin instance time for the current time plus the specified
offset. ...
...the new instance time is added to the end instance times list. events listen to these events using addeventlistener() or by assigning an event listener to the on... handler property of this interface. beginevent fired when the element local timeline begins to play. also available via the onbegin property. endevent fired when at the active end of the animation is reached. ...
Selection - Web APIs
s should not be confused with the start and end positions of a selection. the anchor can be placed before the focus or vice-versa, depending on the direction you made your selection. properties selection.anchornoderead only returns the node in which the selection begins. can return null if selection never existed in the document (e.g., an iframe that was never clicked on). selection.anchor
offsetread only returns a number representing the
offset of the selection's anchor within the anchornode. if anchornode is a text node, this is the number of characters within anchornode preceding the anchor. if anchornode is an element, this is the number of child nodes of the anchornode preceding the anchor. selection.focusnoderead only returns the node in which the selection ends. can return nul...
...is a text node, this is the number of characters within anchornode preceding the anchor. if anchornode is an element, this is the number of child nodes of the anchornode preceding the anchor. selection.focusnoderead only returns the node in which the selection ends. can return null if selection never existed in the document (for example, in an iframe that was never clicked on). selection.focus
offsetread only returns a number representing the
offset of the selection's anchor within the focusnode. if focusnode is a text node, this is the number of characters within focusnode preceding the focus. if focusnode is an element, this is the number of child nodes of the focusnode preceding the focus. selection.iscollapsedread only returns a boolean indicating whether the selection's start and en...
Selection API - Web APIs
opera full support yessafari full support yeswebview android ...
... opera full support yessafari full support yeswebview android...
Text.splitText() - Web APIs
the text.splittext() method breaks the text node into two nodes at the specified
offset, keeping both nodes in the tree as siblings. after the split, the current node contains all the content up to the specified
offset point, and a newly created node of the same type contains the remaining text. the newly created node is returned to the caller. if the original node had a parent, the new node is inserted as the next sibling of the original node. if the
offset is equal to the length of the original node, the newly created node has no data. separated text nodes can be concatenated using the node.normalize() method. syntax newnode = textnode.splittext(
offset) parameters
offset the index immediately before which to break the text node. return value returns a newly created text node that...
...node. if the
offset is equal to the length of the original node, the newly created node has no data. separated text nodes can be concatenated using the node.normalize() method. syntax newnode = textnode.splittext(
offset) parameters
offset the index immediately before which to break the text node. return value returns a newly created text node that contains the text after the specified
offset point. exceptions thrown a domexception with a value of index_size_err is thrown if the specified
offset is negative or is greater than the number of 16-bit units in the node's text; a domexception with a value of no_modification_allowed_err is thrown if the node is read-only. example in this example, the text of a <p> is split into two text nodes, and a <u> is inserted between them. html <...
Touch() - Web APIs
ng fields: "identifier", required, of type long, that is the identification number for the touch point. "target", required, of type eventtarget, the item at which the touch point started when it was first placed on the surface. "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
offset. "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
offset. "screenx", optional and defaulting to 0, of type double, that is the horizontal position of the touch on the user's screen. "screeny", optional and defaulting to 0, of type double, that is the vertical position of the to...
... optional and defaulting to 0, of type double, that is the horizontal position of the touch on the user's screen. "screeny", optional and defaulting to 0, of type double, that is the vertical position of the touch on the user's screen. "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
offset. "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
offset. "radiusx", optional and defaulting to 0, of type float, that is the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the axis indicated by rotationangle, in css pixels of t...
Touch.screenY - Web APIs
example the touch.screenx example includes an example of this property's usage. ...
... example the touch.screenx example includes an example of this property's usage. ...
Touch - Web APIs
the same touch all the time. touch.screenx read only returns the x coordinate of the touch point relative to the left edge of the screen. touch.screeny read only returns the y coordinate of the touch point relative to the top edge of the screen. touch.clientx read only returns the x coordinate of the touch point relative to the left edge of the browser viewport, not including any scroll
offset. touch.clienty read only returns the y coordinate of the touch point relative to the top edge of the browser viewport, not including any scroll
offset. touch.pagex read only returns the x coordinate of the touch point relative to the left edge of the document. unlike clientx, this value includes the horizontal scroll
offset, if any. touch.pagey read only returns the y coordinate of the t...
... touch.target read only returns the element on which the touch point started when it was first placed on the surface, even if the touch point has since moved outside the interactive area of that element or even been removed from the document. ...
WebGL2RenderingContext.drawRangeElements() - Web APIs
the webgl2renderingcontext.drawrangeelements() method of the webgl api renders primitives from array data in a given range. syntax void gl.drawrangeelements(mode, start, end, count, type,
offset); parameters mode a glenum specifying the type primitive to render. possible values are: gl.points: draws a single dot. gl.line_strip: draws a straight line to the next vertex. gl.line_loop: draws a straight line to the next vertex, and connects the last vertex back to the first. gl.lines: draws a line between a pair of vertices. gl.triangle_strip gl.triangle_fan gl.triangles: draws a triangle for a group of three vertices. start a gluint specifying the minimum array index contained in
offset. end a gluint specifying the maximum array index contained in
offset. ...
... of three vertices. start a gluint specifying the minimum array index contained in
offset. end a gluint specifying the maximum array index contained in
offset. count a glsizei specifying the number of elements to be rendered. type a glenum specifying the type of the values in the element array buffer. possible values are: gl.unsigned_byte gl.unsigned_short gl.unsigned_int
offset a glintptr specifying an
offset in the element array buffer. must be a valid multiple of the size of the given type. return value none. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if
offset is a valid multiple of the size of the given type, a gl.invalid_operation error is thrown. if count is negative, a gl.invalid_value error is thrown. exa...
WebGL2RenderingContext.getActiveUniforms() - Web APIs
the indices of the active uniforms to query. pname a glenum specifying which information to query. possible values: gl.uniform_type: returns an array of glenum indicating the types of the uniforms. gl.uniform_size: returns an array of gluint indicating the sizes of the uniforms. gl.uniform_block_index: returns an array of glint indicating the block indices of the uniforms. gl.uniform_
offset: returns an array of glint indicating the uniform buffer
offsets. gl.uniform_array_stride: returns an array of glint indicating the strides between the elements. gl.uniform_matrix_stride: returns an array of glint indicating the strides between columns of a column-major matrix or a row-major matrix. gl.uniform_is_row_major: returns an array of glboolean indicating whether each of the unifor...
...he strides between columns of a column-major matrix or a row-major matrix. gl.uniform_is_row_major: returns an array of glboolean indicating whether each of the uniforms is a row-major matrix or not. return value depends on which information is requested using the pname parameter. examples var uniformindices = gl.getuniformindices(program, ['ubored', 'ubogreen', 'uboblue']); var uniform
offsets = gl.getactiveuniforms(program, uniformindices, gl.uniform_
offset); specifications specification status comment webgl 2.0the definition of 'getactiveuniforms' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glgetactiveuniformsiv' in that specification. standard man page of the (similar) opengl api.
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
the webgl2renderingcontext.vertexattribipointer() method of the webgl 2 api specifies integer data formats and locations of vertex attributes in a vertex attributes array. syntax void gl.vertexattribipointer(index, size, type, stride,
offset); parameters index a gluint specifying the index of the vertex attribute that is to be modified. size a glint specifying the number of components per vertex attribute. must be 1, 2, 3, or 4. type a glenum specifying the data type of each component in the array. ...
...rameters index a gluint specifying the index of the vertex attribute that is to be modified. size a glint specifying the number of components per vertex attribute. must be 1, 2, 3, or 4. type a glenum specifying the data type of each component in the array. must be one of: gl.byte, gl.unsigned_byte, gl.short, gl.unsigned_short, gl.int, or gl.unsigned_int. stride a glsizei specifying the
offset in bytes between the beginning of consecutive vertex attributes.
offset a glintptr specifying an
offset in bytes of the first component in the vertex attribute array. must be a multiple of type. return value none. description very similar to webglrenderingcontext.vertexattribpointer(). the main difference is that while values specified by vertexattribpointer are always interpreted as floa...
WebGLRenderingContext.bufferData() - Web APIs
the webglrenderingcontext.bufferdata() method of the webgl api initializes and creates the buffer object's data store. syntax // webgl1: void gl.bufferdata(target, size, usage); void gl.bufferdata(target, arraybuffer? srcdata, usage); void gl.bufferdata(target, arraybufferview srcdata, usage); // webgl2: void gl.bufferdata(target, arraybufferview srcdata, usage, src
offset, length); parameters target a glenum specifying the binding point (target). possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data. gl.element_array_buffer: buffer used for element indices. when using a webgl 2 context, the following values are available additionally: gl.copy_read_buffer: buffer for copying from one...
...mmands. gl.dynamic_copy: the contents are intended to be respecified repeatedly by reading data from webgl, and used many times as the source for webgl drawing and image specification commands. gl.stream_copy: the contents are intended to be specified once by reading data from webgl, and used at most a few times as the source for webgl drawing and image specification commands. src
offset a gluint specifying the element index
offset where to start reading the buffer. length optional a gluint defaulting to 0. return value none. exceptions a gl.out_of_memory error is thrown if the context is unable to create a data store with the given size. a gl.invalid_value error is thrown if size is negative. a gl.invalid_enum error is thrown if target or usage are not one of the all...
WebGLRenderingContext.drawElements() - Web APIs
possible values are: gl.points: draws a single dot. gl.line_strip: draws a straight line to the next vertex. gl.line_loop: draws a straight line to the next vertex, and connects the last vertex back to the first. gl.lines: draws a line between a pair of vertices. gl.triangle_strip gl.triangle_fan gl.triangles: draws a triangle for a group of three vertices. ...
...gl.triangle_strip gl.triangle_fan gl.triangles: draws a triangle for a group of three vertices. count a glsizei specifying the number of elements to be rendered. type a glenum specifying the type of the values in the element array buffer. possible values are: gl.unsigned_byte gl.unsigned_short when using the oes_element_index_uint extension: gl.unsigned_int
offset a glintptr specifying a byte
offset in the element array buffer. must be a valid multiple of the size of the given type. return value none. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if
offset is not a valid multiple of the size of the given type, a gl.invalid_operation error is thrown. if count is negative, a gl.invalid_value error is throw...
WebGLRenderingContext.readPixels() - Web APIs
the webglrenderingcontext.readpixels() method of the webgl api reads a block of pixels from a specified rectangle of the current color framebuffer into an arraybufferview object. syntax // webgl1: void gl.readpixels(x, y, width, height, format, type, pixels); // webgl2: void gl.readpixels(x, y, width, height, format, type, glintptr
offset); void gl.readpixels(x, y, width, height, format, type, arraybufferview pixels, gluint dst
offset); parameters x a glint specifying the first horizontal pixel that is read from the lower left corner of a rectangular block of pixels. y a glint specifying the first vertical pixel that is read from the lower left corner of a rectangular block of pixels. width a glsizei specifying the width of the rectangle. height a glsizei specifying the height of ...
... gl.unsigned_short gl.int gl.unsigned_int gl.unsigned_int_10f_11f_11f_rev gl.unsigned_int_5_9_9_9_rev pixels an arraybufferview object to read data into. the array type must match the type of the type parameter. uint8array for gl.unsigned_byte. uint16array for gl.unsigned_short_5_6_5, gl.unsigned_short_4_4_4_4, or gl.unsigned_short_5_5_5_1. float32array for gl.float. dst
offset optional
offset. defaults to 0. return value none. exceptions a gl.invalid_enum error is thrown if format or type is not an accepted value. a gl.invalid_operation error is thrown if type is gl.unsigned_short_5_6_5 and format is not gl.rgb. type is gl.unsigned_short_4_4_4_4 and format is not gl.rgba. type does not match the typed array type of pixels. a gl.invalid_frameb...
Creating 3D objects using WebGL - Web APIs
added a z-component to our vertices, we need to update the numcomponents of our vertexposition attribute to 3. // tell webgl how to pull out the positions from the position // buffer into the vertexposition attribute { const numcomponents = 3; ... gl.vertexattribpointer( programinfo.attriblocations.vertexposition, numcomponents, type, normalize, stride,
offset); gl.enablevertexattribarray( programinfo.attriblocations.vertexposition); } define the vertices' colors we also need to build an array of colors for each of the 24 vertices. this code starts by defining a color for each face, then uses a loop to assemble an array of all the colors for each of the vertices. const facecolors = [ [1.0, 1.0, 1.0, 1.0], // front face: white ...
... collection of 12 triangles. drawing the cube next we need to add code to our drawscene() function to draw using the cube's index buffer, adding new gl.bindbuffer() and gl.drawelements() calls: // tell webgl which indices to use to index the vertices gl.bindbuffer(gl.element_array_buffer, buffers.indices); ... { const vertexcount = 36; const type = gl.unsigned_short; const
offset = 0; gl.drawelements(gl.triangles, vertexcount, type,
offset); } 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. finally, let's replace our variable squarerotation by cuberotation and add a second rotation around the x axis: mat4.rotate(modelviewmatrix, modelviewmatrix, ...
Lighting in WebGL - Web APIs
rmals into the buffer by calling bufferdata(). then we add the code to drawscene() to bind the normals array to a shader attribute so the shader code can get access to it: // tell webgl how to pull out the normals from // the normal buffer into the vertexnormal attribute. ...
... // the normal buffer into the vertexnormal attribute. ...
Using shaders to apply color in WebGL - Web APIs
etattriblocation(shaderprogram, 'avertexcolor'), }, ... then, drawscene() can have the following added to it so it actually uses these colors when drawing the square: // tell webgl how to pull out the colors from the color buffer // into the vertexcolor attribute. ...
...from the color buffer // into the vertexcolor attribute. ...
WebXR Device API - Web APIs
e x and z components of the origin are typically presumed to be located at or near the center of the room or surface. xrview represents a single view into the xr scene for a particular frame. each xrview corresponds to the video display surface used to present the scene to the user. for example, a given xr device might have two views: one for the left eye and one for the right. each view has an
offset used to shift the position of the view relative to the camera, in order to allow for creating stereographic effects. xrviewport describes a viewport. a viewport is a rectangular portion of a graphic surface. in webxr, a viewport represents the area of a drawing surface corresponding to a particular xrview, such as the portion of the webgl framebuffer used to render one of the two eyes' perspect...
... relative to an xrspace. xrviewerpose based on xrpose, xrviewerpose specifies the state of a viewer of the webxr scene as indicated by the xr device. included is an array of xrview objects, each representing one perspective on the scene. for example, it takes two views to create the stereoscopic view as perceived by human vision—one for the left eye and a second for the right eye. one view is
offset to the left slightly from the viewer's position, and the other view is
offset to the right by the same distance. the view list can also be used to represent the perspectives of each of the spectators of a scene, in a multi-user environment. xrinputsource represents any input device the user can use to perform targeted actions within the same virtual space as the viewer. input sources may includ...
Using IIR filters - Web APIs
this data to draw a filter frequency plot. we'll do so on a 2d canvas context. ...
...we'll do so on a 2d canvas context. ...
Window - Web APIs
if needed. window.name gets/sets the name of the window. window.navigator read only returns a reference to the navigator object. window.opener returns a reference to the window that opened this current window. window.outerheight read only gets the height of the outside of the browser window. window.outerwidth read only gets the width of the outside of the browser window. window.pagex
offset read only an alias for window.scrollx. window.pagey
offset read only an alias for window.scrolly window.parent read only returns a reference to the parent of the current window or subframe. window.performance read only returns a performance object, which includes the timing and navigation attributes, each of which is an object providing performance-related data. see also using navigatio...
...border of the user's browser viewport to the left side of the screen. window.screeny and window.screentop read only both properties return the vertical distance from the top border of the user's browser viewport to the top side of the screen. window.scrollbars read only returns the scrollbars object, whose visibility can be toggled in the window. window.scrollmaxx read only the maximum
offset that the window can be scrolled to horizontally, that is the document width minus the viewport width. window.scrollmaxy read only the maximum
offset that the window can be scrolled to vertically (i.e., the document height minus the viewport height). window.scrollx read only returns the number of pixels that the document has already been scrolled horizontally. window.scrolly read only r...
XRRigidTransform() - Web APIs
tion is not 1.0. examples in this example, the beginning of the animation of a scene is shown, starting with a request for a reference space of a given type, then shifting the coordinate system based on a transform before requesting the first animation frame. let animationframerequestid = 0; xrsession.requestreferencespace("local-floor") .then((refspace) => { xrreferencespace = refspace.get
offsetreferencespace( new xrrigidtransform(viewerposition, viewerorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); }); after requesting a reference space of type local-floor, the returned promise is eventually resolved, at which time we receive a new reference space object, refspace. after creating an xrrigidtransform from the viewer's initial position and o...
...iewerposition, viewerorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); }); after requesting a reference space of type local-floor, the returned promise is eventually resolved, at which time we receive a new reference space object, refspace. after creating an xrrigidtransform from the viewer's initial position and orientation, we pass the new transform into get
offsetreferencespace() to create another reference space, now
offset so that its origin is located at the same place in space as the coordinates given by viewerposition, with the orientation also revised in the same fashion. then requestanimationframe() is called to ask for a new animation frame to draw into. the drawframe() callback will be executed when the system is ready to draw the next frame. yo...
XRRigidTransform.position - Web APIs
if that fails (probably because bounded-floor isn't supported), we try requesting a local-floor reference ...
...al-floor reference space. if we're not in an immersive session, we instead request a viewer reference space. in all cases, once the space has been obtained, it gets passed into the refspacecreated() function. for immersive spaces, the specified space is simply saved for future use. however, for inline sesions, we know we're in a space not automatically adjusted for floor level, so we request an
offset reference space to shift the viewer's height to 1.5 meters above the presumed floor level of 0 meters. that new reference space is used instead of the one initially received. finally, an animation frame request is submitted. specifications specification status comment webxr device apithe definition of 'xrrigidtransform.position' in that specification. working dra...
XRViewport.x - Web APIs
examples see the main xrviewport page for examples. ...
... examples see the main xrviewport page for examples. ...
XRViewport.y - Web APIs
note: although other web apis typically consider the y axis to begin at the top and grow larger progressing downward, webgl reverses this, with y growing larger as it goes upward on the screen. ...
... note: although other web apis typically consider the y axis to begin at the top and grow larger progressing downward, webgl reverses this, with y growing larger as it goes upward on the screen. ...
-webkit-mask-box-image - CSS: Cascading Style Sheets
<uri> | <gradient> | none <top> <right> <bottom> <left> <length> | <percentage> <x-repeat> <y-repeat> repeat | stretch | round | space values <uri> the location of the image resource to be used as a mask image. <gradient> a -webkit-gradient function to be used as a mask image. none used to specify that a border box is to have no mask image. <length> the size of the mask image's
offset. see <length> for possible units. <percentage> the mask image's
offset has a percentage value relative to the border box's corresponding dimension (width or height). repeat the mask image is repeated as many times as is necessary to span the border box. may include a partial image if the mask image does not divide evenly into the border box. stretch the mask image is stretched to contain th...
...and repeated such that there is no partial mask image at the end of the border box. space the mask image is repeated as many times as possible without stretching. there is no partial mask image at the end of the border box. formal definition value not found in db! formal syntax syntax not found in db! examples setting an image .exampleone { -webkit-mask-box-image: url('mask.png'); }
offsetting and filling an image .exampletwo { -webkit-mask-box-image: url('logo.png') 100 100 0 0 round round; } specifications not part of any standard. ...
@keyframes - CSS: Cascading Style Sheets
r waypoints) along the animation sequence. this gives more control over the intermediate steps of the animation sequence than transitions. syntax @keyframes slidein { from { transform: translatex(0%); } to { transform: translatex(100%); } } values <custom-ident> a name identifying the keyframe list. this must match the identifier production in css syntax. from a starting
offset of 0%. to an ending
offset of 100%. <percentage> a percentage of the time through the animation sequence at which the specified keyframe should occur. description javascript can access the @keyframes at-rule with the css object model interface csskeyframesrule. to use keyframes, create a @keyframes rule with a name that is then used by the animation-name property to match an animation to ...
...ement from its initial state and back. properties that can't be animated in keyframe rules are ignored, but supported properties will still be animated. resolving duplicates if multiple keyframe sets exist for a given name, the last one encountered by the parser is used. @keyframes rules don't cascade, so animations never derive keyframes from more than one rule set. if a given animation time
offset is duplicated, all keyframes in the @keyframes rule for that percentage are used for that frame. there is cascading within a @keyframes rule if multiple keyframes specify the same percentage values. when properties are left out of some keyframes properties that aren't specified in every keyframe are interpolated if possible — properties that can't be interpolated are dropped from the animatio...
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
evenly is requested then the fallback alignment will be used, as the content is treated as a single alignment subject. justify-self the justify-self property is used to align an item inside its containing block on the inline axis. this property does not apply to floated elements or table cells. absolutely positioned elements the alignment container is the positioned block, accounting for the
offset values of top, left, bottom, and right. the normal keyword resolves to stretch, unless the positioned item is a replaced element, in which case it resolves to start. align-self the align-self property does not apply to block-level boxes (including floats), because there is more than one item in the block axis. it also does not apply to table cells. absolutely positioned elements the alignment...
...word resolves to stretch, unless the positioned item is a replaced element, in which case it resolves to start. align-self the align-self property does not apply to block-level boxes (including floats), because there is more than one item in the block axis. it also does not apply to table cells. absolutely positioned elements the alignment container is the positioned block, accounting for the
offset values of top, left, bottom, and right. the normal keyword resolves to stretch, unless the positioned item is a replaced element, in which case it resolves to start. aligning in these layout methods today as we do not currently have browser support for box alignment in block layout, your options for alignment are either to use one of the existing alignment methods or, to make even a single item...
In Flow and Out of Flow - CSS: Cascading Style Sheets
add a margin to the item, in order to push the line boxes away from it. you cannot apply anything to the following in-flow content to achieve that. absolute positioning giving an item position: absolute or position: fixed removes it from flow, and any space that it would have taken up is removed. in the next example i have three paragraph elements, the second element has position absolute, with
offset values of top: 30px and right: 30px. it has been removed from document flow. using position: fixed also removes the item from flow, however the
offsets are based on the viewport rather than the containing block. when taking an item out of flow with positioning, you will need to manage the possibility of content overlapping. out of flow essentially means that the other elements on your page no...
.... when taking an item out of flow with positioning, you will need to manage the possibility of content overlapping. out of flow essentially means that the other elements on your page no longer know that element exists so will not respond to it. 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
offset values to push it around. the space that it would have been placed in normal flow is reserved however, as you can see in the example below. when you do anything to remove, or shift an item from where it would be placed in normal flow, you can expect to need to do some managing of the content and the content around it to prevent overlaps. whether that involves clearing floats, or ensuring that ...
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
specification. for this guide, we will look at this feature of grid and other modern layout methods, learning a little about writing modes and logical vs. physical properties as we do so. logical and physical properties and values css is full of physical positioning keywords – left and right, top and bottom. if we position an item using absolute positioning, we use these physical keywords as
offset values to push the item around. in the code snippet below, the item is placed 20 pixels from the top, and 30 pixels from the left of the container: .container { position: relative; } .item { position: absolute; top: 20px; left: 30px; } <div class="container"> <div class="item">item</div> </div> another place you might see physical keywords in use, is when using text-align: right to...
... do with grid that force you to use physical properties and values. in the guide to box alignment and grids, i demonstrated how auto margins work in a grid area. using an auto margin to push one item away from the others is a common flexbox trick too, however this also ties the layout to the physical space. if you use absolute positioning within a grid area, then you will again be using physical
offsets to push the item around inside the grid area. the key thing is to be aware of, is the tension between physical and logical properties and values. for example, be aware that you may need to make changes to your css to cope with a switch from ltr to rtl. logical properties for everything! our new layout methods give us the ability to use these logical values to place items, however, as soon as w...
Animatable CSS properties - CSS: Cascading Style Sheets
n-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
offset offset-anchor
offset-distance
offset-path
offset-position
offset-rotate opacity order outline outline-color outline-
offset outline-width padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top perspective ...
...oll-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-
offset top transform transform-origin translate vertical-align visibility width word-spacing z-index zoom ...
Layout and the containing block - CSS: Cascading Style Sheets
let's investigate the factors that determine what an element's containing block is. effects of the containing block before learning what determines the containing block of an element, it's useful to know why it matters in the first place. the size and position of an element are often impacted by its containing block. percentage values that are applied to the width, height, padding, margin, and
offset properties of an absolutely positioned element (i.e., which has its position set to absolute or fixed) are computed from the element's containing block. identifying the containing block the process for identifying the containing block depends entirely on the value of the element's position property: if the position property is static, relative, or sticky, the containing block is formed by th...
...a rectangle called the initial containing block. it has the dimensions of the viewport (for continuous media) or the page area (for paged media). calculating percentage values from the containing block as noted above, when certain properties are given a percentage value, the computed value depends on the element's containing block. the properties that work this way are box model properties and
offset properties: the height, top, and bottom properties compute percentage values from the height of the containing block. the width, left, right, padding, and margin properties compute percentage values from the width of the containing block. some examples the html code for all our examples is: <body> <section> <p>this is a paragraph!</p> </section> </body> only the css is altered i...
CSS reference - CSS: Cascading Style Sheets
trix3d()max()max-block-sizemax-heightmax-height (@viewport)max-inline-sizemax-widthmax-width (@viewport)max-zoom (@viewport)@mediamin()min-block-sizemin-heightmin-height (@viewport)min-inline-sizemin-widthmin-width (@viewport)min-zoom (@viewport)minmax()mix-blend-modemmmsn@namespacenegative (@counter-style):not:nth-child:nth-last-child:nth-last-of-type:nth-of-type<number>oobject-fitobject-position
offsetoffset-anchor
offset-distance
offset-path
offset-rotate:only-child:only-of-typeopacityopacity():optionalorderorientation (@viewport)@ornamentsornaments()orphans:out-of-rangeoutlineoutline-coloroutline-
offsetoutline-styleoutline-widthoverflowoverflow-anchoroverflow-blockoverflow-inlineoverflow-wrapoverflow-xoverflow-yoverscroll-behavioroverscroll-behavior-blockoverscroll-behavior-inlineoverscroll-beha...
...rgettarget-counter()target-counters()target-text()text-aligntext-align-lasttext-combine-uprighttext-decorationtext-decoration-colortext-decoration-linetext-decoration-skip-inktext-decoration-styletext-decoration-thicknesstext-emphasistext-emphasis-colortext-emphasis-positiontext-emphasis-styletext-indenttext-justifytext-orientationtext-overflowtext-renderingtext-shadowtext-transformtext-underline-
offsettext-underline-position<time><time-percentage><timing-function>top@top-centertouch-actiontransformtransform-box<transform-function>transform-origintransform-styletransitiontransition-delaytransition-durationtransition-propertytransition-timing-functiontranslatetranslate()translate3d()translatex()translatey()translatez()turnuunicode-bidiunicode-range (@font-face)unset<url>url()user-zoom (@viewport)...
Cubic Bezier Generator - CSS: Cascading Style Sheets
radius, 0, 2 * math.pi); ctx.fill(); ctx.stroke(); ctx.closepath(); } else { alert('you need safari or firefox 1.5+ to see this demo.'); } } function mousedown(e) { var canvas = document.getelementbyid('bezier'); var x1 = cx(document.getelementbyid('x1').value); var y1 = cy(document.getelementbyid('y1').value); var x = e.pagex - canvas.
offsetleft; var y = e.pagey - canvas.
offsettop; var output = document.getelementbyid('output'); output.value = "(" + x + "," + y + ") should be (" + x1 + "," + y1 + ")"; if ((x1 + radius >= x) && (x1 - radius <= x) && (y1 + radius >= y) && (y1 - radius <= y)) { var output = document.getelementbyid('output'); output.value = "p1!"; dragsm = 1; } var x2 =...
... // if we are starting a drag if (dragsm != 0) { canvas.onmousemove = mousemove; } } function mouseup(e) { var output = document.getelementbyid('output'); output.value = "mouse up!"; dragsm = 0; canvas.onmousemove = null; } function mousemove(e) { if (dragsm != 0) { var canvas = document.getelementbyid('bezier'); var x = e.pagex - canvas.
offsetleft; var y = e.pagey - canvas.
offsettop; var output = document.getelementbyid('output'); output.value = "drag!"; if (dragsm == 1) { var x1 = document.getelementbyid('x1'); var y1 = document.getelementbyid('y1'); x1.value = reversex(x); x1.value = math.round(x1.value * 10000) / 10000; y1.value = reversey(...
inset-inline-end - CSS: Cascading Style Sheets
s */ inset-inline-end: inherit; inset-inline-end: initial; inset-inline-end: unset; the shorthand for inset-inline-start and inset-inline-end is inset-inline. syntax values the inset-inline-end property takes the same values as the left property. ...
... the inset-inline-end property takes the same values as the left property. ...
mask-position - CSS: Cascading Style Sheets
x 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: unset; syntax one or more <position> values, separated by commas. values <position> one to four values representing a 2d position regarding the edges of the element's box. relative or absolute
offsets can be given. note that the position can be set outside of the element's box. formal definition initial valuecenterapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesrefer to size of mask painting area minus size of mask layer image (see the text for background-position)computed valueconsists of two keywor...
...ion can be set outside of the element's box. ...
mix-blend-mode - CSS: Cascading Style Sheets
class="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
offset="0" stop-color="hsl(0,100%,50%)" /> <stop
offset="100%" stop-color="hsl(0,0%,100%)" /> </lineargradient> <lineargradient id="green"> <stop
offset="0" stop-color="hsl(120,100%,50%)" /> <stop
offset="100%" stop-color="hsl(120,0%,100%)" /> </lineargradient> <lineargradient id="...
...50%)" /> <stop
offset="100%" stop-color="hsl(0,0%,100%)" /> </lineargradient> <lineargradient id="green"> <stop
offset="0" stop-color="hsl(120,100%,50%)" /> <stop
offset="100%" stop-color="hsl(120,0%,100%)" /> </lineargradient> <lineargradient id="blue"> <stop
offset="0" stop-color="hsl(240,100%,50%)" /> <stop
offset="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"...
scroll-padding-block-end - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...dn/interactive-examples and send us a pull request. 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: unset; values <length-percentage> an inwards
offset from the block end edge of the scrollport, as a valid length or a percentage. auto the
offset is determind by the user agent. this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valu...
scroll-padding-block-start - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...-examples and send us a pull request. 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: unset; values <length-percentage> an inwards
offset from the block start edge of the scrollport, as a valid length or a percentage. auto the
offset is determind by the user agent. this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed va...
scroll-padding-bottom - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... https://github.com/mdn/interactive-examples and send us a pull request. 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: unset; values <length-percentage> an inwards
offset from the bottom edge of the scrollport, as a valid length or a percentage. auto the
offset is determind by the user agent. this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas...
scroll-padding-inline-end - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...ractive-examples and send us a pull request. 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: unset; values <length-percentage> an inwards
offset from the inline end edge of the scrollport, as a valid length or a percentage. auto the
offset is determind by the user agent. this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valu...
scroll-padding-inline-start - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...es and send us a pull request. 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: unset; values <length-percentage> an inwards
offset from the inline start edge of the scrollport, as a valid length or a percentage. auto the
offset is determind by the user agent. this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed v...
scroll-padding-left - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
..., please clone https://github.com/mdn/interactive-examples and send us a pull request. 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: unset; values <length-percentage> an inwards
offset from the left edge of the scrollport, as a valid length or a percentage. auto the
offset is determind by the user agent. this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas sp...
scroll-padding-right - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...e clone https://github.com/mdn/interactive-examples and send us a pull request. 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: unset; values <length-percentage> an inwards
offset from the top edge of the scrollport, as a valid length or a percentage. auto the
offset is determind by the user agent. this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas sp...
scroll-padding-top - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...project, please clone https://github.com/mdn/interactive-examples and send us a pull request. 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: unset; values <length-percentage> an inwards
offset from the top edge of the scrollport, as a valid length or a percentage. auto the
offset is determind by the user agent. this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas sp...
<shape> - CSS: Cascading Style Sheets
applies. note: <shape> and rect() work in conjunction with clip, which has been deprecated in favor of clip-path. when possible, use clip-path and the <basic-shape> data type instead. syntax the <shape> data type is specified using the rect() function, which produces a region in the form of a rectangle. ...
...ble, use clip-path and the <basic-shape> data type instead. syntax the <shape> data type is specified using the rect() function, which produces a region in the form of a rectangle. rect() rect(top, right, bottom, left) values top is a <length> representing the
offset for the top of the rectangle relative to the top border of the element's box. right is a <length> representing the
offset for the right of the rectangle relative to the left border of the element's box. bottom is a <length> representing the
offset for the bottom of the rectangle relative to the top border of the element's box. left is a <length> representing the
offset for the left of the rectangle relative to the left border of the element's box. interpolation when animated, values of the <shape> data ...
<colgroup> - HTML: Hypertext Markup Language
gnment of each column cell content will be handled. 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
offset, defined by the char and charoff attributes. if this attribute is not set, the left value is assumed. the descendant <col> elements may override this value using their own align attribute. note: do not try to set the text-align property on a selector giving a <colgroup> element. because <td> elements are not descendant of the <colgroup> element, they won't inherit it. if the table d...
...t of the content in a column group to a character. typical values for this include a period (.) when attempting to align numbers or monetary values. if align is not set to char, this attribute is ignored, though it will still be used as the default value for the align of the <col> which are members of this column group. charoff this attribute is used to indicate the number of characters to
offset the column data from the alignment character specified by the char attribute. valign this attribute specifies the vertical alignment of the text within each cell of the column. possible values for this attribute are: baseline, which will put the text as close to the bottom of the cell as it is possible, but align it on the baseline of the characters instead of the bottom of them. if ch...
<tbody>: The Table Body element - HTML: Hypertext Markup Language
tal alignment of each cell content will be handled. 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
offset, defined by the char and charoff attributes. if this attribute is not set, the left value is assumed. as this attribute is deprecated, use the css text-align property instead. note: the equivalent text-align property for the align="char" is not implemented in any browsers yet. see the text-align's browser compatibility section for the <string> value. bgcolor the background color o...
...this attribute is deprecated, use the css background-color property instead. char this attribute is used to set the character to align the cells in a column on. typical values for this include a period (.) when attempting to align numbers or monetary values. if align is not set to char, this attribute is ignored. charoff this attribute is used to indicate the number of characters to
offset the column data from the alignment characters specified by the char attribute. valign this attribute specifies the vertical alignment of the text within each row of cells of the table header. possible values for this attribute are: baseline, which will put the text as close to the bottom of the cell as it is possible, but align it on the baseline of the characters instead of the bottom of...
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
tal alignment of each cell content will be handled. 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
offset, defined by the char and charoff attributes unimplemented (see bug 2212). if this attribute is not set, the left value is assumed. note: do not use this attribute as it is obsolete (not supported) in the latest standard. to achieve the same effect as the left, center, right or justify values, use the css text-align property on it. to achieve the same effect as the char value, in css3...
...is attribute is ignored. note: do not use this attribute as it is obsolete (and not supported) in the latest standard. to achieve the same effect as the char, in css3, you can use the character set using the char attribute as the value of the text-align property unimplemented. charoff deprecated since html4obsolete since html5 this attribute is used to indicate the number of characters to
offset the column data from the alignment characters specified by the char attribute. note: do not use this attribute as it is obsolete (and not supported) in the latest standard. valign deprecated since html4obsolete since html5 this attribute specifies the vertical alignment of the text within each row of cells of the table header. possible values for this attribute are: baseline, which wi...
<thead>: The Table Head element - HTML: Hypertext Markup Language
tal alignment of each cell content will be handled. 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
offset, defined by the char and charoff attributes unimplemented (see bug 2212). if this attribute is not set, the left value is assumed. note: do not use this attribute as it is obsolete (not supported) in the latest standard. to achieve the same effect as the left, center, right or justify values, use the css text-align property on it. to achieve the same effect as the char value, in css3...
...not set to char, this attribute is ignored. note: do not use this attribute as it is obsolete (and not supported) in the latest standard. to achieve the same effect as the char, in css3, you can use the character set using the char attribute as the value of the text-align property unimplemented. charoff in html 4, in html5 this attribute is used to indicate the number of characters to
offset the column data from the alignment characters specified by the char attribute. note: do not use this attribute as it is obsolete (and not supported) in the latest standard. valign in html 4, in html5 this attribute specifies the vertical alignment of the text within each row of cells of the table header. possible values for this attribute are: baseline, which will put the text as ...
Array.prototype.slice() - JavaScript
ill not be modified. the source for this interactive demo is stored in a github repository. if you'd like to contribute to the interactive demo project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax arr.slice([start[, end]]) parameters start optional zero-based index at which to start extraction. a negative index can be used, indicating an
offset from the end of the sequence. slice(-2) extracts the last two elements in the sequence. if start is undefined, slice starts from the index 0. if start is greater than the index range of the sequence, an empty array is returned. end optional zero-based index before which to end extraction. slice extracts up to but not including end. for example, slice(1,4) extracts the second element through t...
...art is undefined, slice starts from the index 0. if start is greater than the index range of the sequence, an empty array is returned. end optional zero-based index before which to end extraction. slice extracts up to but not including end. for example, slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3). a negative index can be used, indicating an
offset from the end of the sequence. slice(2,-1) extracts the third element through the second-to-last element in the sequence. if end is omitted, slice extracts through the end of the sequence (arr.length). if end is greater than the length of the sequence, slice extracts through to the end of the sequence (arr.length). return value a new array containing the extracted elements. description slic...
BigInt64Array() constructor - JavaScript
ontrol over byte order is needed, use dataview instead. the contents are initialized to 0n. once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation). syntax new bigint64array(); new bigint64array(length); new bigint64array(typedarray); new bigint64array(object); new bigint64array(buffer [, byte
offset [, 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array. each value in typedarray i...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. examples different wa...
BigUint64Array() constructor - JavaScript
l over byte order is needed, use dataview instead. the contents are initialized to 0n. once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation). syntax new biguint64array(); new biguint64array(length); new biguint64array(typedarray); new biguint64array(object); new biguint64array(buffer [, byte
offset [, 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array. each value in typedarray i...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. examples different wa...
DataView() constructor - JavaScript
the dataview() constructor is used to create dataview objects. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax new dataview(buffer [, byte
offset [, bytelength]]) parameters buffer an existing arraybuffer or sharedarraybuffer to use as the storage backing the new dataview object. byte
offset optional the
offset, in bytes, to the first byte in the above buffer for the new view to reference. if unspecified, the buffer view starts with the first byte. bytelength optional the number of elements in the byte array. if unspecified, the view's length will match the buffer's length. return value a new datavie...
... wasn't a very helpful description.) you can think of the returned object as an "interpreter" of the array buffer of bytes — it knows how to convert numbers to fit within the buffer correctly, both when reading and writing to it. this means handling integer and float conversion, endianness, and other details of representing numbers in binary form. exceptions rangeerror thrown if the byte
offset or bytelength parameter values result in the view extending past the end of the buffer. for example, if the buffer is 16 bytes long, the byte
offset is 8, and the bytelength is 10, this error is thrown because the resulting view tries to extend 2 bytes past the total length of the buffer. examples using dataview var buffer = new arraybuffer(16); var view = new dataview(buffer, 0); view.se...
DataView.prototype.byteLength - JavaScript
contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property. the value is established when an dataview is constructed and cannot be changed. if the dataview is not specifying an
offset 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) va...
...uffer 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
offset of the constructed dataview) specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.bytelength' in that specification. ...
DataView.prototype.getBigInt64() - JavaScript
the getbigint64() method gets a signed 64-bit integer (long long) at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.getbigint64(byte
offset [, littleendian]) parameters byte
offset the
offset, in bytes, from the start of the view to read the data from. littleendian optional indicates whether the 64-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a bigint. errors thrown rangeerror thrown if the byte
offset is set such that it would read beyond the end of the view. ...
...ad the data from. littleendian optional indicates whether the 64-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a bigint. errors thrown rangeerror thrown if the byte
offset 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
offset. examples using the getbigint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getbigint64(0); // 0n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getbigint64()' in that specification. ...
DataView.prototype.getBigUint64() - JavaScript
the getbiguint64() method gets an unsigned 64-bit integer (unsigned long long) at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.getbiguint64(byte
offset [, littleendian]) parameters byte
offset the
offset, in bytes, from the start of the view to read the data from. littleendian optional indicates whether the 64-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a bigint. ...
...a pull request. syntax dataview.getbiguint64(byte
offset [, littleendian]) parameters byte
offset the
offset, in bytes, from the start of the view to read the data from. littleendian optional indicates whether the 64-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a bigint. errors thrown rangeerror thrown if the byte
offset 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
offset. examples using the getbiguint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getbiguint64(0); // 0n specifications specification ecmascript (ecma-262)the definition of 'datavie...
DataView.prototype.getFloat32() - JavaScript
the getfloat32() method gets a signed 32-bit float (float) at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.getfloat32(byte
offset [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 32-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 32-bit float number. ...
...tax dataview.getfloat32(byte
offset [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 32-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 32-bit float number. errors thrown rangeerror thrown if the byte
offset 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
offset. examples using the getfloat32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getfloat32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.proto...
DataView.prototype.getFloat64() - JavaScript
the getfloat64() method gets a signed 64-bit float (double) at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.getfloat64(byte
offset [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 64-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 64-bit float number. ...
...tax dataview.getfloat64(byte
offset [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 64-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 64-bit float number. errors thrown rangeerror thrown if the byte
offset 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
offset. examples using the getfloat64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getfloat64(0); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.proto...
DataView.prototype.getInt16() - JavaScript
the getint16() method gets a signed 16-bit integer (short) at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.getint16(byte
offset [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 16-bit integer number. ...
...yntax dataview.getint16(byte
offset [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 16-bit integer number. errors thrown rangeerror thrown if the byte
offset 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
offset. examples using the getint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getint16(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype...
DataView.prototype.getInt32() - JavaScript
the getint32() method gets a signed 32-bit integer (long) at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.getint32(byte
offset [, littleendian]) parameters byte
offset the
offset, in bytes, from the start of the view where to read the data. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 32-bit integer number. ...
...ntax dataview.getint32(byte
offset [, littleendian]) parameters byte
offset the
offset, in bytes, from the start of the view where to read the data. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 32-bit integer number. errors thrown rangeerror thrown if the byte
offset 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
offset. examples using the getint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getint32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype...
DataView.prototype.getUint16() - JavaScript
the getuint16() method gets an unsigned 16-bit integer (unsigned short) at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.getuint16(byte
offset [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. ...
...x dataview.getuint16(byte
offset [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value an unsigned 16-bit integer number. errors thrown rangeerror thrown if the byte
offset 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
offset. examples using the getuint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getuint16(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototy...
DataView.prototype.getUint32() - JavaScript
the getuint32() method gets an unsigned 32-bit integer (unsigned long) at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.getuint32(byte
offset [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. ...
...x dataview.getuint32(byte
offset [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value an unsigned 32-bit integer number. errors thrown rangeerror thrown if the byte
offset 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
offset. examples using the getuint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getuint32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototy...
DataView.prototype.setFloat32() - JavaScript
the setfloat32() method stores a signed 32-bit float (float) value at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.setfloat32(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 32-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is written. ...
...loat32(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 32-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byte
offset is set such as it would store beyond the end of the view. examples using the setfloat32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setfloat32(1, 3); dataview.getfloat32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setfloat32' in that specification. ...
DataView.prototype.setFloat64() - JavaScript
the setfloat64() method stores a signed 64-bit float (double) value at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.setfloat64(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 64-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is written. ...
...loat64(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 64-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byte
offset is set such as it would store beyond the end of the view. examples using the setfloat64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setfloat64(0, 3); dataview.getfloat64(0); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setfloat64' in that specification. ...
DataView.prototype.setInt16() - JavaScript
the setint16() method stores a signed 16-bit integer (short) value at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.setint16(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is written. ...
...setint16(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byte
offset is set such as it would store beyond the end of the view. examples using the setint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint16(1, 3); dataview.getint16(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setint16' in that specification. ...
DataView.prototype.setInt32() - JavaScript
the setint32() method stores a signed 32-bit integer (long) value at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.setint32(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is written. ...
...setint32(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byte
offset is set such as it would store beyond the end of the view. examples using the setint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint32(1, 3); dataview.getint32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setint32' in that specification. ...
DataView.prototype.setUint16() - JavaScript
the setuint16() method stores an unsigned 16-bit integer (unsigned short) value at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.setuint16(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. ...
...etuint16(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byte
offset is set such as it would store beyond the end of the view. examples using the setuint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint16(1, 3); dataview.getuint16(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setuint16' in that specification. ...
DataView.prototype.setUint32() - JavaScript
the setuint32() method stores an unsigned 32-bit integer (unsigned long) value at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.setuint32(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. ...
...etuint32(byte
offset, value [, littleendian]) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byte
offset is set such as it would store beyond the end of the view. examples using the setuint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint32(1, 3); dataview.getuint32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setuint32' in that specification. ...
Date - JavaScript
e elapsed since midnight on january 1, 1970, utc. this date and time is the same as the unix epoch, which is the predominant base value for computer-recorded date and time values. note: it's important to keep in mind that while the time value at the heart of a date object is utc, the basic methods to fetch the date and time or its components all work in the local (i.e. host system) time zone and
offset. it should be noted that the maximum date is not of the same value as the maximum safe integer (number.max_safe_integer is 9,007,199,254,740,991). instead, it is defined in ecma-262 that a maximum of ±100,000,000 (one hundred million) days relative to january 1, 1970 utc (that is, april 20, 271821 bce ~ september 13, 275760 ce) can be represented by the standard date object (equivalent to ±8,6...
...) returns the month (0–11) in the specified date according to local time. date.prototype.getseconds() returns the seconds (0–59) in the specified date according to local time. date.prototype.gettime() returns the numeric value of the specified date as the number of milliseconds since january 1, 1970, 00:00:00 utc. (negative values are returned for prior times.) date.prototype.gettimezone
offset() returns the time-zone
offset in minutes for the current locale. date.prototype.getutcdate() returns the day (date) of the month (1–31) in the specified date according to universal time. date.prototype.getutcday() returns the day of the week (0–6) in the specified date according to universal time. date.prototype.getutcfullyear() returns the year (4 digits for 4-digit years) in the spe...
Float32Array() constructor - JavaScript
ver byte order is needed, use dataview instead. the contents are initialized to 0. once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation). syntax new float32array(); // new in es2017 new float32array(length); new float32array(typedarray); new float32array(object); new float32array(buffer [, byte
offset [, 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array. each value in typedarray i...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. examples different wa...
Float64Array() constructor - JavaScript
ver byte order is needed, use dataview instead. the contents are initialized to 0. once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation). syntax new float64array(); // new in es2017 new float64array(length); new float64array(typedarray); new float64array(object); new float64array(buffer [, byte
offset [, 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array. each value in typedarray i...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. examples different wa...
Int16Array() constructor - JavaScript
control over byte order is needed, use dataview instead. the contents are initialized to 0. once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation). syntax new int16array(); // new in es2017 new int16array(length); new int16array(typedarray); new int16array(object); new int16array(buffer [, byte
offset [, 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array. each value in typedarray i...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. examples different w...
Int32Array() constructor - JavaScript
control over byte order is needed, use dataview instead. the contents are initialized to 0. once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation). syntax new int32array(); // new in es2017 new int32array(length); new int32array(typedarray); new int32array(object); new int32array(buffer [, byte
offset [, 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array. each value in typedarray i...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. examples different w...
Int8Array() constructor - JavaScript
reates a typed array of twos-complement 8-bit signed integers. the contents are initialized to 0. once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation). syntax new int8array(); // new in es2017 new int8array(length); new int8array(typedarray); new int8array(object); new int8array(buffer [, byte
offset [, 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array. each value in typedarray i...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. examples different w...
SharedArrayBuffer.prototype.slice() - JavaScript
rce for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax sab.slice() sab.slice(begin) sab.slice(begin, end) parameters begin optional zero-based index at which to begin extraction. a negative index can be used, indicating an
offset from the end of the sequence. slice(-2) extracts the last two elements in the sequence. if begin is undefined, slice begins from index 0. end optional zero-based index before which to end extraction. slice extracts up to but not including end. for example, slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3). a negative index can be used, indicatin...
... the end of the sequence. slice(-2) extracts the last two elements in the sequence. if begin is undefined, slice begins from index 0. end optional zero-based index before which to end extraction. slice extracts up to but not including end. for example, slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3). a negative index can be used, indicating an
offset from the end of the sequence. slice(2,-1) extracts the third element through the second-to-last element in the sequence. if end is omitted, slice extracts through the end of the sequence (sab.bytelength). return value a new sharedarraybuffer containing the extracted elements. examples using slice var sab = new sharedarraybuffer(1024); sab.slice(); // sharedarraybuffer { bytelength: 1024...
TypedArray.prototype.byteLength - JavaScript
ute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property. the value is established when a typedarray is constructed and cannot be changed. if the typedarray is not specifying an byte
offset or a length, the length of the referenced arraybuffer will be returned. typedarray is one of the typedarray objects. 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 uint8a...
...ay is one of the typedarray objects. 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
offset of the constructed uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.bytelength' in that specification. ...
TypedArray.prototype.length - JavaScript
tribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. description the length property is an accessor property whose set accessor function is undefined, meaning that you can only read this property. the value is established when a typedarray is constructed and cannot be changed. if the typedarray is not specifying an byte
offset or a length, the length of the referenced arraybuffer will be returned. typedarray is one of the typedarray objects. 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...
...e returned. typedarray is one of the typedarray objects. 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
offset of the constructed uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.length' in that specification. ...
TypedArray.prototype.set() - JavaScript
the set() method stores multiple values in the typed array, reading input values from a specified array. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax typedarray.set(array[,
offset]) typedarray.set(typedarray[,
offset]) parameters array the array from which to copy values. all values from the source array are copied into the target array, unless the length of the source array plus the
offset exceeds the length of the target array, in which case an exception is thrown. typedarray if the source array is a typed array, the two arrays may share the same underlying arraybuffer; the javascript engine will ...
...rom the source array are copied into the target array, unless the length of the source array plus the
offset exceeds the length of the target array, in which case an exception is thrown. typedarray if the source array is a typed array, the two arrays may share the same underlying arraybuffer; the javascript engine will intelligently copy the source range of the buffer to the destination range.
offset optional the
offset into the target array at which to begin writing values from the source array. if this value is omitted, 0 is assumed (that is, the source array will overwrite values in the target array starting at index 0). exceptions a rangeerror, if the
offset is set such as it would store beyond the end of the typed array. examples using set() var buffer = new arraybuffer(8); var ui...
TypedArray.prototype.slice() - JavaScript
s here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax typedarray.slice([begin[, end]]) parameters begin optional zero-based index at which to begin extraction. a negative index can be used, indicating an
offset from the end of the sequence. slice(-2) extracts the last two elements in the sequence. if begin is undefined, slice begins from index 0. end optional zero-based index before which to end extraction. slice extracts up to but not including end. for example, slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3). a negative index can be used, indicatin...
... the end of the sequence. slice(-2) extracts the last two elements in the sequence. if begin is undefined, slice begins from index 0. end optional zero-based index before which to end extraction. slice extracts up to but not including end. for example, slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3). a negative index can be used, indicating an
offset from the end of the sequence. slice(2,-1) extracts the third element through the second-to-last element in the sequence. if end is omitted, slice extracts through the end of the sequence (typedarray.length). return value a new typed array containing the extracted elements. description the slice method does not alter. it returns a shallow copy of elements from the original typed array. if a...
Uint16Array() constructor - JavaScript
the uint16array() typed array constructor creates an array of 16-bit unsigned integers in the platform byte order. syntax new uint16array(); // new in es2017 new uint16array(length); new uint16array(typedarray); new uint16array(object); new uint16array(buffer [, byte
offset [, 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. description the uint...
Uint32Array() constructor - JavaScript
rol over byte order is needed, use dataview instead. the contents are initialized to 0. once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation). syntax new uint32array(); // new in es2017 new uint32array(length); new uint32array(typedarray); new uint32array(object); new uint32array(buffer [, byte
offset [, 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array. each value in typedarray i...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. examples different w...
Uint8Array() constructor - JavaScript
tructor creates a typed array of 8-bit unsigned integers. the contents are initialized to 0. once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation). syntax new uint8array(); // new in es2017 new uint8array(length); new uint8array(typedarray); new uint8array(object); new uint8array(buffer [, byte
offset [, 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array. each value in typedarray i...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. examples different w...
Uint8ClampedArray() constructor - JavaScript
t integer will be set. the contents are initialized to 0. once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation). syntax new uint8clampedarray(); // new in es2017 new uint8clampedarray(length); new uint8clampedarray(typedarray); new uint8clampedarray(object); new uint8clampedarray(buffer [, byte
offset [, 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. typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array. each value in typedarray i...
...32array), the typedarray gets copied into a new typed array. each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array. the length of the new typed array will be same as the length of the typedarray argument. object when called with an object argument, a new typed array is created as if by the typedarray.from() method. buffer, byte
offset, length when called with a buffer, and optionally a byte
offset and a length argument, a new typed array view is created that views the specified arraybuffer. the byte
offset and length parameters specify the memory range that will be exposed by the typed array view. if both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed. examples different w...
JavaScript typed arrays - JavaScript
and efficiency, javascript typed arrays split the implementation into buffers and views. a buffer (implemented by the arraybuffer object) is an object representing a chunk of data; it has no format to speak of and offers no mechanism for accessing its contents. in order to access the memory contained in a buffer, you need to use a view. a view provides a context — that is, a data type, starting
offset, and the number of elements — that turns the data into a typed array. arraybuffer the arraybuffer is a data type that is used to represent a generic, fixed-length binary data buffer. you can't directly manipulate the contents of an arraybuffer; instead, you create a typed array view or a dataview which represents the buffer in a specific format, and use that to read and write the contents o...
...y 0 in the 32-bit array is now ' + int32view[0]); the output from this is "entry 0 in the 32-bit array is now 32". in other words, the two arrays are indeed simply viewed on the same data buffer, treating it as different formats. you can do this with any view types. working with complex data structures by combining a single buffer with multiple views of different types, starting at different
offsets into the buffer, you can interact with data objects containing multiple data types. this lets you, for example, interact with complex data structures from webgl, data files, or c structures you need to use while using js-ctypes. consider this c structure: struct somestruct { unsigned long id; char username[16]; float amountdue; }; you can access a buffer containing data in this format l...
<mpadded> - MathML
(a length prefixed with "+" or "-") . href used to set a hyperlink to a specified uri. lspace sets or increments the horizontal position. possible values: any length or an increment/decrement (a length prefixed with "+" or "-") . mathbackground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color. you can use #rgb, #rrggbb and html color names. v
offset sets or increments the vertical position. possible values: any length or an increment/decrement (a length prefixed with "+" or "-") . width sets or increments the width. possible values: any length or an increment/decrement (a length prefixed with "+" or "-") . pseudo-units it is possible to use the keywords "depth", "height", and "width" as a pseudo-unit for the attributes depth, height, l...
...r increments the vertical position. possible values: any length or an increment/decrement (a length prefixed with "+" or "-") . width sets or increments the width. possible values: any length or an increment/decrement (a length prefixed with "+" or "-") . pseudo-units it is possible to use the keywords "depth", "height", and "width" as a pseudo-unit for the attributes depth, height, lspace, v
offset, and width. they represent each length of the same-named dimension. prior to gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) the mathml2 pseudo-unit lspace was allowed, which is no longer present in the mathml3 recommendation and has been removed now. examples <math> <mpadded height="+150px" width="100px" lspace="2height"> <mi> x </mi> <mo> + </mo> <mi> y </mi> </mpa...
SVG Presentation Attributes - SVG: Scalable Vector Graphics
value: auto|baseline|before-edge|text-before-edge|middle|centra...
...>|<icccolor>|inherit; animatable: yes stop-opacity defines the opacity of a given gradient stop. value: <opacity-value>|inherit; animatable: yes stroke defines the color used to paint the outline of the shape. value: <paint>; animatable: yes stroke-dasharray defines the pattern of dashes and gaps used to paint the outline of the shape. value: none|<dasharray>; animatable: yes stroke-dash
offset defines an
offset on the rendering of the associated dash array. value: <percentage>|<length>; animatable: yes stroke-linecap defines the shape to be used at the end of open subpaths when they are stroked. value: butt|round|square; animatable: yes stroke-linejoin defines the shape to be used at the corners of paths when they are stroked. value: arcs|bevel|miter|miter-clip|round; animatabl...
color-interpolation-filters - SVG: Scalable Vector Graphics
color-interpolation-filters has a different initial value than color-interpolation. color-interpolation-filters has an initial value of linearrgb, whereas color-interpolation has an initial value of srgb. ...
...-interpolation can be used as a css property. 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>, <fe
offset>, <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. this option indicates that the author doesn't require that color interpolation occur in a particular color space. ...
height - SVG: Scalable Vector Graphics
the height attribute defines the vertical length of an element in the user coordinate system. ...
...ht defines the vertical length for the rendering area of the primitive. value <length> | <percentage> default value 100% animatable yes femorphology for <femorphology>, height defines the vertical length for the rendering area of the primitive. value <length> | <percentage> default value 100% animatable yes fe
offset for <fe
offset>, height defines the vertical length for the rendering area of the primitive. value <length> | <percentage> default value 100% animatable yes fespecularlighting for <fespecularlighting>, height defines the vertical length for the rendering area of the primitive. value <length> | <percentage> default value 100% ...
transform-origin - SVG: Scalable Vector Graphics
-percentage> | 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
offset.
offsets that are not explicitly defined are reset to their corresponding initial values. if two or more values are defined and either no value is a keyword, or the only used keyword is center, then the first value represents the horizontal
offset and the second represents the vertical
offset. one-value syntax: the value must be a <length>, a <percentage>, or one of the keywords left, c...
...and bottom. two-value syntax: one value must be a <length>, a <percentage>, or one of the keywords left, center, and right. the other value must be a <length>, a <percentage>, or one of the keywords top, center, and bottom. three-value syntax: the first two values are the same as for the two-value syntax. the third value must be a <length>. it always represents the z
offset. specifications specification status comment css transforms level 1the definition of 'transform-origin' in that specification. working draft scalable vector graphics (svg) 2the definition of 'transform-origin' in that specification. candidate recommendation ...
width - SVG: Scalable Vector Graphics
the width attribute defines the horizontal length of an element in the user coordinate system. ...
...defines the horizontal length for the rendering area of the primitive. value <length> | <percentage> default value 100% animatable yes femorphology for <femorphology>, width defines the horizontal length for the rendering area of the primitive. value <length> | <percentage> default value 100% animatable yes fe
offset for <fe
offset>, width defines the horizontal length for the rendering area of the primitive. value <length> | <percentage> default value 100% animatable yes fespecularlighting for <fespecularlighting>, width defines the horizontal length for the rendering area of the primitive. value <length> | <percentage> default value 100% ...
x - SVG: Scalable Vector Graphics
ribute defines a x-axis coordinate in the user coordinate system. ...
...x defines the minimum x coordinate for the rendering area of the primitive. value <length> | <percentage> default value 0% animatable yes femorphology for <femorphology>, x defines the minimum x coordinate for the rendering area of the primitive. value <length> | <percentage> default value 0% animatable yes fe
offset for <fe
offset>, x defines the minimum x coordinate for the rendering area of the primitive. value <length> | <percentage> default value 0% animatable yes fepointlight for <fepointlight>, x defines the x location for the light source in the coordinate system defined by the primitiveunits attribute on the <filter> element. value <number> ...
y - SVG: Scalable Vector Graphics
ribute defines a y-axis coordinate in the user coordinate system. ...
...y defines the minimum y coordinate for the rendering area of the primitive. value <length> | <percentage> default value 0% animatable yes femorphology for <femorphology>, y defines the minimum y coordinate for the rendering area of the primitive. value <length> | <percentage> default value 0% animatable yes fe
offset for <fe
offset>, y defines the minimum y coordinate for the rendering area of the primitive. value <length> | <percentage> default value 0% animatable yes fepointlight for <fepointlight>, y defines the y location for the light source in the coordinate system defined by the primitiveunits attribute on the <filter> element. value <number> ...
<feDropShadow> - SVG: Scalable Vector Graphics
value type: <number>; default value: 2; animatable: yes stddeviation this attribute defines the standard deviation for the blur operation in the drop shadow. value type: <number>; default value: 2; animatable: yes global attributes core attributes mos...
...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
offset of the drop shadow. value type: <number>; default value: 2; animatable: yes dy this attribute defines the y
offset of the drop shadow. value type: <number>; default value: 2; animatable: yes stddeviation this attribute defines the standard deviation for the blur operation in the drop shadow. value type: <number>; 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 present...
<radialGradient> - SVG: Scalable Vector Graphics
applied to fill or stroke of graphical elements. don't be confused with css radial-gradient() as css gradients can only apply to html elements where svg gradient can only apply to svg elements. 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
offset="10%" stop-color="gold" /> <stop
offset="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. value type: <length> ; default value: 50%; animatable: yes cy this attribute defines ...
...es 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-dash
offset, 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 ...
<textPath> - SVG: Scalable Vector Graphics
fault value: align; animatable: yes path the path on which the text should be rendered. value type: <path_data> ; default value: none; animatable: yes side which side of the path the text should be rendered. value type: left|right ; default value: left; animatable: yes spacing how space between glyphs should be handled. value type: auto|exact ; default value: exact; animatable: yes start
offset how far the beginning of the text should be
offset from the beginning of the path. value type: <length>|<percentage>|<number> ; default value: 0; animatable: yes textlength the width of the space into which the text will render. value type: <length>|<percentage>|<number> ; default value: auto; animatable: yes global attributes core attributes most notably: id, tabindex styling attribu...
...ditional 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-dash
offset, 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...
SVG element reference - SVG: Scalable Vector Graphics
sform> 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> <fe
offset> <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...
..., <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>, <femorphology>, <fe
offset>, <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 elem...
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
implementation 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 start
offset 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...
... svgtextcontentelement.selectsubstring() deprecated implementation status 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
offset 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 <so...
Clipping and masking - SVG: Scalable Vector Graphics
s long as they don't let parts vanish completely. masking the effect of masking is most impressively presented with a gradient. if you want an element to fade out, you can achieve this effect quite quickly with masks. ...
...ely. masking the effect of masking is most impressively presented with a gradient. if you want an element to fade out, you can achieve this effect quite quickly with masks. <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
offset="0" stop-color="black" /> <stop
offset="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 lowest layer and on top a red-filled rect. the lat...
SVG In HTML Introduction - SVG: Scalable Vector Graphics
the only interesting part is the <svg> element it contains. this element and its children are declared t...
...the only interesting part is the <svg> element it contains. this element and its children are declared to be in the svg namespace. the eleme...
SVG and CSS - SVG: Scalable Vector Graphics
croll to get all of it: <svg width="600px" height="600px" viewbox="-300 -300 600 600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>svg demonstration</title> <desc>mozilla css getting started - svg demonstration</desc> <defs> <radialgradient id="fade" cx="0" cy="0" r="200" gradientunits="userspaceonuse"> <stop id="fade-stop-1"
offset="33%"/> <stop id="fade-stop-2"
offset="95%"/> </radialgradient> </defs> <text id="heading" x="-280" y="-270">svg demonstration</text> <text id="caption" x="-280" y="-250">move your mouse pointer over the flower.</text> <g id="flower"> <circle id="overlay" cx="0" cy="0" r="200" stroke="none" fill="url(#fade)"/> <g id="outer-petals"> <g class="quadrant"> ...
... transform="rotate(72)"/> </g> <g id="petals"> <use xlink:href="#quadrant"/> <use xlink:href="#quadrant" transform="rotate(90)"/> <use xlink:href="#quadrant" transform="rotate(180)"/> <use xlink:href="#quadrant" transform="rotate(270)"/> </g> <radialgradient id="fade" cx="0" cy="0" r="200" gradientunits="userspaceonuse"> <stop id="fade-stop-1"
offset="33%"/> <stop id="fade-stop-2"
offset="95%"/> </radialgradient> </defs> <text id="heading" x="-280" y="-270">svg demonstration</text> <text id="caption" x="-280" y="-250">move your mouse pointer over the flower.</text> <g id="flower"> <circle id="overlay" cx="0" cy="0" r="200" stroke="none" fill="url(#fade)"/> <use id="outer-petals" xlink:href="#petals"/> <use id=...
Canvas code snippets - Archive of obsolete content
suretext', // drawfocusring not currently supported // the following might instead be wrapped to be able to chain their child objects 'createimagedata', 'createlineargradient', 'createradialgradient', 'getimagedata', 'putimagedata' ]; var props = ['canvas', 'fillstyle', 'font', 'globalalpha', 'globalcompositeoperation', 'linecap', 'linejoin', 'linewidth', 'miterlimit', 'shadow
offsetx', 'shadow
offsety', 'shadowblur', 'shadowcolor', 'strokestyle', 'textalign', 'textbaseline']; for (let m of methods) { let method = m; canvas2dcontext.prototype[method] = function() { this.ctx[method].apply(this.ctx, arguments); return this; }; } for (let m of gettermethods) { let method = m; canvas2dcontext.prototype[method] = function() { return...
Forms related code snippets - Archive of obsolete content
ndchild(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.
offsetleft + "px"; otable.style.top = (otarget.
offsettop + otarget.
offsetheight) + "px"; otarget.parentnode.insertbefore(otable, otarget); }; ainstances.push(this); } datepicker.prototype.writedays = function () { const nendblanks = (this.current.getday() + bzeroismonday * 6) % 7, nend = amonthlengths[this.current.getmonth()] + nendblanks, ntotal = nend...
Offering a context menu for form controls - Archive of obsolete content
ntent/overlay.js"/> </overlay> change the right-click behavior the overlaid code is responsible for adjusting the behavior of right-clicking on form controls. window.addeventlistener("load", function() { let settargetoriginal = nscontextmenu.prototype.settarget; components.utils.reporterror(settargetoriginal); nscontextmenu.prototype.settarget = function(anode, arangeparent, arange
offset) { settargetoriginal.apply(this, arguments); if (this.istargetaformcontrol(anode)) this.shoulddisplay = true; }; }, false); this code, which is run when the window is opened up, works by replacing the settarget() routine for the prototype of nscontextmenu with one that forces the context menu to display if the target of the menu is a form control. as a result, all con...
CSS3 - Archive of obsolete content
lue, ::choices, ::repeat-item, and ::repeat-index may be postponed to the next iteration of this module . support for icons, defined by the css icon property simultaneously with the new icon value of the css content property. at risk: due to insufficient browser support, standardization of the icon property and the icon value may be postponed to css4. support for the css outline-
offset property giving more control on the position of the outline. support for the css resize property allowing web authors to control if and how elements should be resized. support for the css text-overflow property defining how text overflows, if needed. at risk: due to insufficient browser support, the 2-value syntax of this property as well as the support for <string> values may be ...
Notes on HTML Reflow - Archive of obsolete content
process by which the geometry of the layout engine's formatting objects are computed. the html formatting objects are called frames : a frame corresponds to the geometric information for (roughly) a single element in the content model; the frames are arranged into a hierarchy that parallels the containment hierarchy in the content model. a frame is rectangular, with width, height, and an
offset from the parent frame that contains it. more than one frame may be needed to represent a single element from the content model; for example, text that wraps is broken into several frames, one per wrapped line. in this case, the primary frame is the frame containing the first line of text, with continuing frames (or continuations ) created for subsequent lines. html uses...
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 mozilla.cfg file is an encoded file of javascript commands. the encoding is a simple "byte-shifting" with an
offset of 13 (netscape 4 used a similar encoding, but with a of 7 instead). this file also needs to be "called" from c:\program files\mozilla.org\mozilla\defaults\pref\all.js by appending the following line at the end: pref("general.config.filename", "mozilla.cfg"); note: newer versions of mozilla or firefox store the all.js file in greprefs rather than defaults\pref the moz-byteshift.pl script allows to encode...: moz-byteshift.pl -s 13 <mozilla.cfg.t...
Block and Line Layout Cheat Sheet - Archive of obsolete content
in. nshtmlreflowstate the current state of reflow, built up as reflow recursively descends the frame tree. this is "passed in" to a child frame from its parent, and provides the constraints in which the child frame must size itself; e.g. the width and height available to the child frame. mcomputedwidth mcomputedheight mcomputedmargin mcomputedborderpadding mcomputedpadding mcomputed
offsets mcomputedminwidth mcomputedmaxwidth mcomputedminheight mcomputedmaxheight given the current container frame and the style applied to the child, these values are the resolved values for the child frame's box. nshtmlreflowmetrics the structure that is "filled in" by a frame during reflow, and is used to communicate the frame's desired size information back to its container. mmaximumw...
Nanojit - Archive of obsolete content
bler. the result of compilation is a function that the application can call from c via a pointer to the first instruction. example the following code works with spidermonkey's hacked version of nanojit. 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-
offsetof -fno-rtti -include js-confdefs.h -i dist/include/ -i.. -i ../nanojit -o jittest ../jittest.cpp libjs_static.a note: remove the -ddebug if you have not compiled spidermonkey with --enable-debug, and use whatever you called the sample source file in place of jittest.cpp. #include <stdio.h> #include <stdint.h> #include "jsapi.h" #include "jstracer.h" #include "nanojit.h" using namespace nanoji...
Tamarin Acceptance Test Template - Archive of obsolete content
this is the test template for tamarin acceptance tests (placed in test/acceptance/feature_name): /* -*- mode: js; c-basic-
offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */ /* vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) */ /* ***** begin license block ***** * version: mpl 1.1/gpl 2.0/lgpl 2.1 * * the contents of this file are subject to the mozilla public license version * 1.1 (the "license"); you may not use this file except in compliance with * the license. you may obtain a copy of the license at * http://www.mozilla.org/mpl/ * * software distributed under the license is distributed on an "as is" basis, * without warranty of any kind, either express or implied. see the license * for the specific language governing rights and limitations under ...
Building accessible custom components in XUL - Archive of obsolete content
might initially think of using the css border property, but that will add width and height to the focused cell. a better approach is to use the css outline property, which does maintains the element's dimensions. (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-
offset: -2px; } </code> however, neither of those are our biggest problem. we want this collection of xul elements to act like a single control, a spreadsheet. we want to be able to tab to the spreadsheet, then tab off of it, without cycling through every single cell inside the spreadsheet. (in the next section we'll add support for the arrow keys to move between cells.) that means that we don't want to...
Index - Archive of obsolete content
aduriwithflags xul methods, xul reference (see nsiwebnavigation.loaduri() for details on the referrer and postdata parameters.) 532 makeeditable xul methods, xul reference no summary! 533 menulist.appenditem xul methods, xul reference no summary! 534 menulist.select xul methods, xul reference no summary! 535 moveby
offset xul methods, xul reference no summary! 536 movetabto xul methods, xul reference no summary! 537 moveto xul methods, xul reference no summary! 538 movetoalertposition xul methods, xul reference no summary! 539 onfindagaincommand no summary! 540 onsearchcomplete needshelp, xul methods, xul ...
openPopup - Archive of obsolete content
s on the direction of the anchor. position possible values for position are: before_start, before_end, after_start, after_end, start_before, start_after, end_before, end_after, overlap, and after_pointer. check positioning of the popup guide for a precise description of the effect of the different values. x, y for an anchored popup, the x and y arguments may be used to
offset the popup from its anchored position by some number, measured in css pixels. an unanchored popup appears at the position specified by x and y, relative to the viewport of the document containing the popup node. in this case, the position and attributesoverride arguments are ignored. iscontextmenu the iscontextmenu argument should be true for context menus and false for all other typ...
showPopup - Archive of obsolete content
the anchor and align arguments may be used to further control where the popup appears relative to the element. the anchor argument corresponds to the popupanchor attribute on the element. the align argument corresponds to the popupalign attribute on the element. the anchor and align arguments are ignored if either x or y are not -1. to have a popup appear relative to another element yet still
offset by some number of pixels, determine the actual screen position of the element using the boxobject.screenx and boxobject.screeny properties of the element, and use those as the x and y arguments
offset by the desired values. the popuptype should be one of the strings popup, context, or tooltip. each type of popup is intended to be displayed only temporarily; they are not expected to be display...
Methods - Archive of obsolete content
earchat 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 moveby
offset moveto movetoalertposition onsearchcomplete ontextentered ontextreverted openpopup openpopupatscreen opensubdialog openwindow preferenceforelement reload reloadalltabs reloadtab reloadwithflags removeallitems removeallnotifications removealltabsbut removecurrentnotification removecurrenttab removeitemat removeitemfromselection removenotification remov...
Popup Menus - Archive of obsolete content
appears at the mouse pointer position (at_pointer is not currently implemented with respect to the mouse pointer. it currently appears at the top of the anchor). after_pointer the popup appears at the same horizontal position as the mouse pointer but appears below the element. this is how tooltips appear (after_pointer is not currently implemented with respect to the mouse pointer. it currently
offsets 21 pixels vertically from the anchor, see bug 619887). by adding the position attribute to a popup element, you can specify precisely where the popup appears. you cannot specify an exact pixel position. the position attribute can be used with all three popup types, although you probably would not change the value for tooltips. the example below demonstrates creating a back button with a popup ...
Stacks and Decks - Archive of obsolete content
it. for example, you could create an effect similar to the text-shadow property with the following: example 1 : source view <stack> <description value="shadowed" style="padding-left: 1px; padding-top: 1px; font-size: 15pt"/> <description value="shadowed" style="color: red; font-size: 15pt;"/> </stack> both description elements create text with a size of 15 points. the first, however is
offset 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
offset from the other. the second description element is drawn in red so the effect is more visible. this method has advantages over using text-shadow because you could completely style the shadow apart from the main text. it could have its own...
panel - Archive of obsolete content
s on the direction of the anchor. position possible values for position are: before_start, before_end, after_start, after_end, start_before, start_after, end_before, end_after, overlap, and after_pointer. check positioning of the popup guide for a precise description of the effect of the different values. x, y for an anchored popup, the x and y arguments may be used to
offset the popup from its anchored position by some number, measured in css pixels. an unanchored popup appears at the position specified by x and y, relative to the viewport of the document containing the popup node. in this case, the position and attributesoverride arguments are ignored. iscontextmenu the iscontextmenu argument should be true for context menus and false for all other typ...
nsIContentPolicy - Archive of obsolete content
ed by acontentlocation to determine whether or not to start loading the requested resource. shouldload() can be called while the dom and layout of the document involved is in an inconsistent state. 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.,
offset* properties). query any dom properties that depend on style (e.g., computed style). query any dom properties that depend on the current state of the dom outside the "context" node (e.g., lengths of node lists). [javascript implementations only] access properties of any sort on any object without using xpcnativewrapper (either explicitly or implicitly). due to various dom0 things, this leads to...
Gecko Compatibility Handbook - Archive of obsolete content
he site has upgraded to software that correctly implements ssl. dhtml menus implemented using hiermenu have problems the hiermenu version is obsolete. the earliest version of hiermenu only supported netscape navigator 4.x and internet explorer 4.x and above. later versions did support netscape 6; however, in netscape 6.1 and higher, support for internet explorer's proprietary
offsetxxx properties results in hiermenu placing popups in the wrong position. the most recent versions of hiermenu fully support all gecko-based browsers. upgrade to the most recent version of hiermenu common coding and server problems this section details solutions to the most common problems affecting standards-based browsers as well as issues that may specifically affe...
2006-10-27 - Archive of obsolete content
nouncements none this week. discussions removal of the nn4.6 table border color quirk discussion on removing the nn 4.6 table boarder color quirk, which currently causes a specific markup to produce a green boarder instead of a gray one. help for getting html element width info discussion on retrieving width information on html elements when using the gecko engine. it was determined that the
offsetwidth property can be used to get this value. multiple presshells discussion on why current interfaces allow for multiple presshells and how the relationships work for the following objects: docshell, presshell, prescontext, document, domwindow, widget, docshell and contentviewer. boris zbarsky explains in detail the relationships between these objects. the presshells are currently used for print...
NPByteRange - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents a particular range of bytes from a stream. syntax typedef struct _npbyterange { int32
offset; /* negative
offset = from the end */ uint32 length; struct _npbyterange* next; } npbyterange; fields the data structure has the following fields:
offset offset in bytes to the start of the requested range. this value may be either positive or negative: positive value:
offset from the beginning of the stream. negative value:
offset from the end of the stream. length number of bytes to fetch from the specified
offset. next points to the next npbyterange request in the list of requests, or null if this is the last request. description the plug-in seeks within a stream by building a linked list of o...
NPP_HandleEvent - Archive of obsolete content
own native window, often a child window of the browser window, to draw into. the plug-in has complete control over drawing and event handling within that window. mac os the browser does not give a windowed plug-in a native window, because the mac os platform does not support child windows. instead, the windowed plug-in draws into the graphics port associated with the the browser window, at the
offset that the browser specifies. for this reason, npp_handleevent is only way the plug-in can receive events from its host application on mac os. 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. see also npevent ...
NPStream - Archive of obsolete content
; } npstream; fields the data structure has the following fields: plug-in-private value that the plug-in can use to store a pointer to private data associated with the instance; not modified by the browser. ndata browser-private value that can store data associated with the instance; should not be modified by the plug-in. url the url that the data in the stream is read from or written to. end
offset in bytes of the end of the stream (equivalent to the length of the stream in bytes). can be zero for streams of unknown length, such as streams returned from older ftp servers or generated "on the fly" by cgi scripts. lastmodified time the data in the url was last modified (if applicable), measured in seconds since 12:00 midnight gmt, january 1, 1970. notifydata used only for streams generated ...
-ms-wrap-margin - Archive of obsolete content
the -ms-wrap-margin css property is a microsoft extension that specifies a margin that
offsets the inner wrap shape from other shapes. initial value0applies toexclusion elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values <length> the margin size, a non-negative value. formal syntax <length> specifications not part of any specification. remarks
offsets created by the -ms-wrap-margin property are
offset from the outside of the exclusion. this property can be set to any supported length value. ...
CSS - Archive of obsolete content
-ms-touch-selectthe -ms-touch-select css property is a microsoft extension that toggles the gripper visual elements that enable touch text selection.-ms-wrap-flowthe -ms-wrap-flow css property is a microsoft extension that specifies how exclusions impact inline content within block-level elements.-ms-wrap-marginthe -ms-wrap-margin css property is a microsoft extension that specifies a margin that
offsets the inner wrap shape from other shapes.-ms-wrap-throughthe -ms-wrap-through css property is a microsoft extension that specifies how content should wrap around an exclusion element.:-moz-full-screen-ancestorthe :-moz-full-screen-ancestor css pseudo-class is a mozilla extension that represents all ancestors of the full-screen element, except containing frames in parent documents, which are the fu...
Player paddle and controls - Game development
revious line as follows: paddle.x = game.input.x || game.world.width*0.5; if you haven't already done so, reload your index.html and try it out! position the ball we have the paddle working as expected, so let's position the ball on it. it's very similar to positioning the paddle — we need to have it placed in the middle of the screen horizontally and at the bottom vertically with a little
offset from the bottom. to place it exactly as we want it we will set the anchor to the exact middle of the ball. find the existing ball = game.add.sprite( ... ) line, and replace it with the following two lines: ball = game.add.sprite(game.world.width*0.5, game.world.height-25, 'ball'); ball.anchor.set(0.5); the velocity stays almost the same — we're just changing the second parameter's value from ...
Backgrounds and borders - Learn web development
so in the css below we are positioning the background 20px from the top and 10px from the right: .box { background-image: url(star.png); background-repeat: no-repeat; background-position: top 20px right 10px; } use the example below to play around with these values and move the star around inside the box. note: background-position is a shorthand for b...
CSS values and units - Learn web development
ser support. check out the page on mdn for the <image> data type if you want to read about them. position the <position> data type represents a set of 2d coordinates, used to position an item such as a background image (via background-position). it can take keywords such as top, left, bottom, right, and center to align items with specific bounds of a 2d box, along with lengths, which represent
offsets from the top and left-hand edges of the box. a typical position value consists of two values — the first sets the position horizontally, the second vertically. if you only specify values for one axis the other will default to center. in the following example we have positioned a background image 40px from the top and to the right of the container using a keyword. play around with these v...
Positioning - Learn web development
e order win over positioned elements earlier in the source order. can you change the stacking order? yes, you can, by using the z-index property. "z-index" is a reference to the z-axis. you may recall from previous points in the course where we discussed web pages using horizontal (x-axis) and vertical (y-axis) coordinates to work out positioning for things like background images and drop shadow
offsets. (0,0) is at the top left of the page (or element), and the x- and y-axes run across to the right and down the page (for left to right languages, anyway.) web pages also have a z-axis: an imaginary line that runs from the surface of your screen, towards your face (or whatever else you like to have in front of the screen). z-index values affect where positioned elements sit on that axis; positiv...
Fundamental text and font styling - Learn web development
5rem; text-transform: capitalize; } h1 + p { font-weight: bold; } p { font-size: 1.5rem; color: red; font-family: helvetica, arial, sans-serif; } text drop shadows you can apply drop shadows to your text using the text-shadow property. this takes up to four values, as shown in the example below: text-shadow: 4px 4px 5px red; the four properties are as follows: the horizontal
offset of the shadow from the original text — this can take most available css length and size units, but you'll most commonly use px; positive values move the shadow right, and negative values left. this value has to be included. the vertical
offset of the shadow from the original text; behaves basically just like the horizontal
offset, except that it moves the shadow up/down, not left/right. this v...
CSS basics - Learn web development
pages. to eliminate the gap, we overwrite the browser's default styling with the setting margin: 0;. next, we set the heading's top and bottom padding to 20 pixels. following that, we set the heading text to be the same color as the html background color. finally, text-shadow applies a shadow to the text content of the element. its four values are: the first pixel value sets the horizontal
offset of the shadow from the text: how far it moves across. the second pixel value sets the vertical
offset of the shadow from the text: how far it moves down. the third pixel value sets the blur radius of the shadow. a larger value produces a more fuzzy-looking shadow. the fourth value sets the base color of the shadow. try experimenting with different values to see how it changes the appearance.
Advanced text formatting - Learn web development
etime="2016-01">january 2016</time> <!-- just month and day --> <time datetime="01-20">20 january</time> <!-- just time, hours and minutes --> <time datetime="19:30">19:30</time> <!-- you can do seconds and milliseconds too! --> <time datetime="19:30:01.856">19:30:01.856</time> <!-- date and time --> <time datetime="2016-01-20t19:30">7.30pm, 20 january 2016</time> <!-- date and time with timezone
offset --> <time datetime="2016-01-20t19:30+01:00">7.30pm, 20 january 2016 is 8.30pm in france</time> <!-- calling out a specific week number --> <time datetime="2016-w04">the fourth week of 2016</time> test your skills! you've reached the end of this article, but can you remember the most important information? you can find some further tests to verify that you've retained this information before yo...
Server-side web frameworks - Learn web development
design can have a large impact on how easy it is to test and re-use code. performance of the framework/programming language: usually "speed" is not the biggest factor in selection because even relatively slow runtimes like python are more than "good enough" for mid-sized sites running on moderate hardware. the perceived speed benefits of another language, e.g. c++ or javascript, may well be
offset by the costs of learning and maintenance. caching support: as your website becomes more successful then you may find that it can no longer cope with the number of requests it is receiving as users access it. at this point you may consider adding support for caching. caching is an optimisation where you store all or part of a web response so that it does not have to be recalculated on subsequent ...
Styling Vue components with CSS - Learn web development
thing: grayscale; font-weight: 400; font-size: 16px; font-size: 1rem; line-height: 1.25; box-sizing: border-box; width: 100%; height: 40px; height: 2.5rem; margin-top: 0; padding: 5px; border: 2px solid #0b0c0c; border-radius: 0; -webkit-appearance: none; -moz-appearance: none; appearance: none; } .custom-checkbox > input:focus { outline: 3px dashed #fd0; outline-
offset: 0; box-shadow: inset 0 0 0 2px; } .custom-checkbox { font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; font-weight: 400; font-size: 1.6rem; line-height: 1.25; display: block; position: relative; min-height: 40px; margin-bottom: 10px; padding-left: 40px; clear: left; } .custom-checkbox > input[type="checkbox"] { -webkit-font-smoothing: antialiased; c...
Accessible Toolkit Checklist
nu. space bar toggles checkboxes for listboxes, use owner drawn list items to show a different highlight color when the list is not focused. if you don't the list focus will not be apparent, and screen readers may read the selected list item when they shouldn't. for unfocused lists, use a lighter color highlight to show a non-focused state. for autocomplete lists, use the system color
offset 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. msaa support, including accessible selection, selectable, multiselectable and extselectable states, and statechange events for checkbox children trees when a tree view is tabbed to, select the first item if nothing else is already selected up/down ar...
Creating Sandboxed HTTP Connections
treamlistener(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, asource
offset, 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...
OS.File for the main thread
the current date will be used. modificationdate the last modification date. if numeric, milliseconds since epoch. if omitted or null, the current date will be used. promise can be rejected with os.file.error in case of any error, in particular if the path does not represent an existing file. setposition() change the current position in the file. promise<void> setposition( in number
offset, in object origin ) arguments
offset the new position, as a number of bytes from the origin. origin one of the following: os.file.pos_start (bytes are counted from the start of the file) os.file.pos_cur (bytes are counted from the current position in the file) os.file.pos_end (bytes are counted from the end of the file) promise can be rejected with os.file.error in ...
PopupNotifications.jsm
may dismiss automatically. timeout a timestamp (milliseconds since the epoch) indicating the earliest time after which the notification can be automatically dismissed. notifications that specify a timeout value will not be automatically dismissed until this time. the user may manually dismiss the notification, however. for most use cases, the value of this parameter should be date.now() plus an
offset indicating the amount of time the notification should be kept open (for example, date.now() + 30000 for 30 seconds). persistwhilevisible a boolean value indicating whether or not the notification should persist across location changes. if true, the notification will remain visible even if the browser navigates to a different location. dismissed a boolean value indicating whether or not the no...
Optimizing Applications For NSPR
intended because the stack has been swapped out to the shadow stack and the current thread's stack now occupies the windows stack. this can be difficult to diagnose. for complete cross platform portability, do not take the address of a stack variable and make that address available to another thread. for more details, see the memo on automatic addresses. windows 3.1 does not support 64 bit file
offsets. the nspr 64 bit file
offset apis map to windows 3.1 32 bit file
offset apis. you may use nspr's 64bit file
offset apis in your windows 3.1 applications for cross platform consistency, but do not expect to see real 64 bit file
offset behavior. on windows 3.1, when nspr detects a value in a 64 bit file
offset greater than 32bit significance, it terminates with an assert. the general rules of 16 ...
PRSeekWhence
specifies how to interpret the
offset parameter in setting the file pointer associated with the fd parameter for the pr_seek and pr_seek64 functions. syntax #include <prio.h> typedef prseekwhence { pr_seek_set = 0, pr_seek_cur = 1, pr_seek_end = 2 } prseekwhence; enumerators the enumeration has the following enumerators: pr_seek_set sets the file pointer to the value of the
offset parameter. pr_seek_cur sets the file pointer to its current location plus the value of the
offset parameter. pr_seek_end sets the file pointer to the size of the file plus the value of the
offset parameter. ...
PRTimeParamFn
this type defines a callback function to calculate and return the time parameter
offsets from a calendar time object in gmt. syntax #include <prtime.h> typedef prtimeparameters (pr_callback_decl *prtimeparamfn) (const prexplodedtime *gmt); description the type prtimeparamfn represents a callback function that, when given a time instant in gmt, returns the time zone information (
offset from gmt and dst
offset) at that time instant. ...
PR_MemMap
maps a section of a file to memory. syntax #include <prio.h> void* pr_memmap( prfilemap *fmap, print64
offset, pruint32 len); parameters the function has the following parameters: fmap a pointer to the file-mapping object representing the file to be memory-mapped.
offset the starting
offset of the section of file to be mapped. the
offset must be aligned to whole pages. len length of the section of the file to be mapped. returns the starting address of the memory region to which the section of file is mapped. returns null on error. description pr_memmap maps a section of the file represented by the file mapping fmap to memory. the section of the file starts at
offset and has the length len. when the file-mapping memory region is no longer needed, it should be unmapped w...
PR_dtoa
printn mode, printn ndigits, printn *decpt, printn *sign, char **rve, char *buf, prsize bufsz); parameters the function has these parameters: d the floating point number to be converted to a string. mode the type of conversion to employ. ndigits the number of digits desired in the output string. decpt a pointer to a memory location where the runtime will store the
offset, relative to the beginning of the output string, of the conversion's decimal point. sign a location where the runtime can store an indication that the conversion was of a negative value. *rve if not null this location is set to the address of the end of the result. buf the address of the buffer in which to store the result. bufsz the size of the buffer provided to hold the result. resul...
NSPR API Reference
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
offset interpretation for seek functions i/o functions functions that operate on pathnames functions that act on file descriptors directory i/o functions 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 constan...
NSS 3.33 release notes
pts an additional password context parameter. cert_findcertbynicknameoremailaddrforusagecx - a variation of existing function cert_findcertbynicknameoremailaddrforusage that accepts an additional password context parameter. in secport.h nss_securememcmpzero - check if a memory region is all zero in constant time. port_zallocaligned - allocate aligned memory. port_zallocaligned
offset - allocate aligned memory for structs. in ssl.h ssl_getexperimentalapi - access experimental apis in libssl. bugs fixed in nss 3.33 this bugzilla query returns all the bugs fixed in nss 3.33: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.33 compatibility nss 3.33 shared libraries are ...
nss tech note4
secitem phonenum; secitem rfc822name; secitem id; secitem maxusers; }; typedef struct _mycertextdata mycertextdata; /* template used for decoding the extension */ const sec_asn1template mycertexttemplate[] = { { sec_asn1_sequence, 0, null, sizeof( mycertextdata ) }, { sec_asn1_integer,
offsetof(mycertextdata, version) }, { sec_asn1_octet_string,
offsetof( mycertextdata, streetaddress ) }, { sec_asn1_octet_string,
offsetof( mycertextdata, phonenum ) }, { sec_asn1_octet_string,
offsetof( mycertextdata, rfc822name ) }, { sec_asn1_octet_string,
offsetof( mycertextdata, id ) }, { sec_asn1_integer,
offsetof(mycertextd...
nss tech note7
rror handling omitted for brevity) encodes a rsapublickey from a modulus and a public exponent and imports the public key into nss. struct myrsapublickey { secitem m_modulus; secitem m_exponent; } inpubkey; secitem derpubkey; seckeypublickey *pubkey; const sec_asn1template myrsapublickeytemplate[] = { { sec_asn1_sequence, 0, null, sizeof(myrsapublickey) }, { sec_asn1_integer,
offsetof(myrsapublickey,m_modulus), }, { sec_asn1_integer,
offsetof(myrsapublickey,m_exponent), }, { 0, } }; prarenapool *arena; /* * point inpubkey.m_modulus and m_exponent at the data, and * then set their types to unsigned integers. */ inpubkey.m_modulus.type = siunsignedinteger; inpubkey.m_exponent.type = siunsignedinteger; arena = port_newarena(der_default_chunksize); sec_asn1encodeit...
Pork Tool Development
tory. the "renamer" tool is used as an example; tests are in the "oink/renamer_tests" subdirectory. replacement for the "renamer" tool, a diff file is generated as the ast is traversed, using the visitor pattern. the diff file is generated using the "patcher" class. source locations ast nodes have a location associated with them; sourceloc is defined to be an integer corresponding to an string
offset. this can be translated to an unboxedloc, which has a line and column
offset (see renamer.cc:65). macro expansion this section refers to macro expansion when using mcpp (see installing pork). for the rename_class.cpp test, generate the file with "gcc -e -wp,-w0,-k rename_class.cpp > rename_class.cc" and run the renamer with "../renamer -rename foo bar rename_class.cc". for terminology, suppose ...
Hacking Tips
should find a way to set this breakpoint for the only generated codes you want to look at. run the program. do next in gdb until you reach the definition of the funcptr: // call the per-exported-function trampoline created by generateentry. │ auto funcptr = js_data_to_func_ptr(exportfuncptr, codebase() + func.entry
offset()); │ if (!call_generated_2(funcptr, exportargs.begin(), &tlsdata_)) │ return false; after it's set, x/64i funcptr will show you the trampoline code. there should be a call to an address at some point ; that's what we're targeting. copy that address. 0x...
64-bit Compatibility
a native integer is the size used for intptr_t/uintptr_t, which is usually the width of a general-purpose register on the target cpu. loading and storing native integers the harder cases to detect usually involve runtime value truncation. 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(
offsetof(object, data))); lir_ld is 32-bit. on 64-bit machines you must use lir_ldq. 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(
offsetof(object, data))); when you use lirwriter::insstore, the correct size is chosen for you automatically, based on the size of the input operands. to insert co...
Property cache
igned integer such that: basic layout guarantee — if at time t0 the object x has shape s and at time t1 the object y has shape s, and no shape-regenerating gc occurred, then y at t1 has the same jsclass, jsobjectops, prototype, and property specs as x had at t0. to be more precise regarding property specs, y's properties have the same names, getters, setters, property attributes, and slot
offsets, and they are in the same order, as x's properties at t0. furthermore, y at t1 has the same number of fixed slots that x had at t0, and either both have a slot array or neither does. (informally: objects with the same shape have the same prototype, class, and layout.) prototype chain shadowing guarantee — if at t0 the object x has shape s and a property x.p of x is found along the protot...
SpiderMonkey Internals
n with your own floating type arguments - various vendor sprintf's mishandle nan, +/-inf, and some even print normal floating values inaccurately. prmjtime.c, prmjtime.h time functions. these interfaces are named in a way that makes local vs. universal time confusion likely. caveat emptor, and we're working on it. to make matters worse, java (and therefore javascript) uses "local" time numbers (
offsets from the epoch) in its date class. jsfile.cpp, jsfile.h, jsfile.msg obsolete. do not use these files. makefile.in, build.mk mozilla makefiles. if you're building gecko or firefox, the larger build system will use these files. they are also used for current standalone builds. makefile.ref, rules.mk, config.mk, config/* obsolete spidermonkey standalone makefiles from 1.8 and earlier. see spi...
JIT Optimization Outcomes
nvertedtonative the object whose property is being accessed was previously unboxed but was deoptimized and converted to a native object. structnofield the unboxed property being accessed does not correspond to a field on the typed object. inconsistentfieldtype the type of an unboxed field is not consistent across all the different types of objects it could be accessed from. inconsistentfield
offset the
offset of an unboxed field is not consistent across all the different types of objects it could be accessed from. needstypebarrier optimization failed because somehow the property was accessed in a way that returned a different type than the expected constant. this is an unlikely failure mode, and should not occur. indictionarymode the object whose property is being accessed is in dictio...
Redis Tips
n', now(), 'zarter'); > r.zadd('last-login', now(), 'lloyd'); // he logged in again! w00t! here's what the zset contains now: > r.zrange('last-login', 0, -1, print); // remember, i defined 'print' above ["jparsons", "zcarter", "lloyd"] since this is a set, lloyd only appears once, with updated login timestamp. zrange gives you everything in the zset, in order of score, from the beginning
offset to the end
offset. (0 from the front, -1 from the end.) as you can see, the scores are sorted smallest to biggest. to get the most recent, you can use zrevrange: > r.zrevrange('last-login', 0, -1, print); ["lloyd", "zcarter", "jparsons"] to see the scores, use the optional withscores argument. as a rule, the name of the optional argument is given as a string in the node function call. >...
Handling Mozilla Security Bugs
mation about security bugs will be restricted to a known group of people, using the bugzilla access control restrictions described above. however, that group can and will be expanded as necessary and appropriate. as noted above, information about security bugs can be held confidential for some period of time; there is no pre-determined lmit on how long that time period might be. however, this is
offset 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. the remaining sections of this document describe in more detail how these general policies have been implemented in practice. organizational structure for handling security bugs we are organizing the investigation...
Using XPCOM Utilities to Make Things Easier
le); static const nsmodulecomponentinfo components[] = { { "pretty class name", sample_cid, "@company.com/sample", sampleconstructor } }; ns_impl_nsgetmodule(nssamplemodule, components) string classes in xpcom strings are usually thought of as linear sequences of characters. in c++, the string literal "xpcom", for example, consists of 6 consecutive bytes, where `x' is at byte
offset zero and a null character is at byte
offset 5. other kinds of strings like "wide" strings use two bytes to represent each character, and are often used to deal with unicode strings. the string classes in xpcom are not just limited to representing a null terminated sequence of characters, however. they are fairly complex because they support the gecko layout engine and other subsystems that manag...
XPCOM Stream Guide
in a stream ready for you to consume. most streams are asynchronous: they make no assumptions that all the data a resource provides is available immediately. (this is particularly true of streams that reach out over a network connection, like http and ftp channels.) stream listeners implement three methods. from the nsistreamlistener interface, the .ondataavailable(request, context, inputstream,
offset, count) method gives you the input stream and the number of bytes available. the stream listener must read exactly count bytes before exiting. from the nsirequestobserver interface, the .onstartrequest(request, context) method tells you when the request begins, while the .onstoprequest(request, context) method tells you when the request ends. a request will have one .onstartrequest(request, conte...
nsACString
this class is typically used to represent ascii or utf-8 character arrays. #include "nsstringapi.h" class nsacstring { ... }; typedefs char_type [char] storage unit for this class. self_type [nsacstring] an alias for the type of this class. size_type [pruint32] type used to represent the number of bytes stored in the string. index_type [pruint32] type used to represent an
offset into the string. methods beginreading the beginreading function returns a const pointer to the first element of the string's internal buffer. endreading the endreading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer. length the length function returns the number of storage units in the string's internal buffer ...
nsAString
y used to represent unicode character arrays. #include "nsstringapi.h" class nsastring { ... }; typedefs char_type [prunichar] storage unit for this class. self_type [nsastring] an alias for the type of this class. size_type [pruint32] type used to represent the number of double-byte units stored in the string. index_type [pruint32] type used to represent an
offset into the string. methods beginreading the beginreading function returns a const pointer to the first element of the string's internal buffer. endreading the endreading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer. length the length function returns the number of storage units in the string's intern...
imgIEncoder
format. "no" and "none" are equivalent. delay=# -- default: "500" number of milliseconds to display the frame, before moving to the next frame. dispose=[none|background|previous] -- default: "none" what to do with the image's canvas before rendering the next frame. see apng spec. blend=[source|over] -- default: "source" how to render the new frame on the canvas. see apng spec. x
offset=# -- default: "0" y
offset=# -- default: "0" where to draw the frame, relative to the canvas. jpeg: ----- quality=# -- default: "92" quality of compression, 0-100 (worst-best). quality >= 90 prevents down-sampling of the color channels. methods addimageframe() void addimageframe( [array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, ...
nsIAccessibleHyperText
n long linkindex ); parameters linkindex 0-based index of the link that is to be retrieved. this can be retrieved via getlinkindex(). return value an nsiaccessiblehyperlink object. exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree. ns_error_invalid_arg the link index is invalid. getlinkindex() the link index at the given
offset (character index). long getlinkindex( in long charindex ); parameters charindex the 0-based character index. return value the index of the link if it's presented on the given character index, otherwise -1. exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree. getselectedlinkindex() obsolete since gecko 1.9 (fir...
nsIAccessibleTextChangeEvent
table please add a summary to this article. 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview boolean isinserted(); attributes attribute type description length unsigned long returns length of changed text. read only. modifiedtext domstring the inserted or removed text. read only. start long returns
offset of changed text in accessible. read only. methods isinserted() boolean isinserted(); parameters none. return value true if text was inserted, otherwise false. ...
nsIDOMHTMLTimeRanges
to this article. last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports method overview float start(in unsigned long index); float end(in unsigned long index); attributes attribute type description length unsigned long the number of ranges represented by the nsidomhtmltimeranges object. read only. methods end() returns the time
offset to the end of the specified time range. float end( in unsigned long index ); parameters index the index to the time range whose end time is to be returned. return value the time at which the specified range ends, in seconds measured from the beginning of the timeline represented by the object. exceptions thrown index_size_err the specified index is not valid. start() returns the time offse...
nsIDOMOfflineResourceList
her or not the specified uri represents a resource that's in the application cache's list. note: this method has been deprecated. you should use the mozitems attribute instead. void mozhasitem( in domstring uri ); parameters uri the uri of the resource to check. return value true if the resource is in the list, otherwise false. mozitem returns the uri of the item at the specific
offset into the list of cached resources. note: this method is deprecated in firefox 3.5; you should instead access the list directly using the items attribute. domstring mozitem( in unsigned long index ); parameters index the index of the cached item whose uri should be returned. return value an domstring containing the uri of the specified resource. mozremove() removes an item from t...
nsIDOMWindow
) scrolls the window by the specified number of lines. void scrollbylines( in long numlines ); parameters numlines the number of lines by which to scroll. scrollbypages() scrolls the window by the specified number of pages. void scrollbypages( in long numpages ); parameters numpages the number of pages by which to scroll. scrollto() scrolls the window to an absolute pixel
offset. void scrollto( in long xscroll, in long yscroll ); parameters xscroll the horizontal position to which to scroll, in pixels. yscroll the vertical position to which to scroll, in pixels. sizetocontent() makes the window's size fit the contents of the window. void sizetocontent(); parameters none. see also dom ...
nsIDOMWindowInternal
s the width of the outside of the browser window. outerheight long gets the height of the outside of the browser window. screenx long the horizontal distance of the left border of the user's browser from the left side of the screen. screeny long the vertical distance of the top border of the user's browser from the top edge of the screen. pagex
offset long returns the number of pixels that the document has already been scrolled horizontally. pagey
offset long returns the number of pixels that the document has already been scrolled vertically. scrollmaxx long returns the maximum number of pixels that the document can be scrolled horizontally. scrollmaxy long returns the maximum number of pixels ...
nsIEditor
void cloneattribute(in astring aattribute, in nsidomnode asourcenode); void cloneattributes(in nsidomnode destnode, in nsidomnode sourcenode); nsidomnode createnode(in astring tag, in nsidomnode parent, in long position); void insertnode(in nsidomnode node, in nsidomnode parent, in long aposition); void splitnode(in nsidomnode existingrightnode, in long
offset, out nsidomnode newleftnode); void joinnodes(in nsidomnode leftnode, in nsidomnode rightnode, in nsidomnode parent); void deletenode(in nsidomnode child); void marknodedirty(in nsidomnode node); direction controller void switchtextdirection(); output methods astring outputtostring(in astring formattype, in unsigned long flags); ...
nsIInputStream
%x\n", rv); break; } if (numread == 0) break; // buf now contains numread bytes of data } return rv; } consume all data from an input stream using readsegments(). static ns_method appendsegment(nsiinputstream* astream, void* aclosure, const char* afromsegment, uint32_t ato
offset, uint32_t acount, uint32_t* awritecount) { // afromsegment now contains acount bytes of data. nsacstring* pbuf = (nsacstring*) aclosure; pbuf->append(afromsegment, acount); // indicate that we have consumed all of afromsegment *awritecount = acount; return ns_ok; } // copy the contents of astream into aresultbuf as one c...
nsIInstallLocation
ading. read only. restricted boolean whether or not this install location is on an area of the file system that could be restricted on a restricted-access account, regardless of whether or not the location is restricted with the current user privileges. read only. constants constants representing priority of some default install locations. you should not use the exact values here, you should
offset from these values each time you create a new install location.
offsetting can be brittle but you should know what install locations are being defined for your own application. constant value description priority_app_profile 0 priority_app_system_user 10 priority_xre_system_user 100 priority_app_system_global 1000 priority_xre_system_global 10000 methods getidforlocation(...
nsIMsgDBHdr
ernal database code should set this attribute. threadparent nsmsgkey indicates the parent of this message in its thread. if this is the root of the thread, it will return nsmsgkey_none. messagesize unsigned long indicates the size of this message in bytes. linecount unsigned long indicates the size of the message body in number of lines. status
offset unsigned long indicates the
offset within the message of the x-mozilla-status header. message
offset unsigned long indicates the position of the offline copy of an imap or news messages within the offline store. offlinemessagesize unsigned long indicates the size of the offline copy of an imap or news message. date prtime indicates the date of thi...
nsIScriptableInputStream
mber: the nsiscriptableinputstream has a contract where `init` should only be called once, and should always be closed. ...
NS_CStringInsertData
« xpcom api reference summary the ns_cstringinsertdata function appends data to the existing value of a nsacstring instance. this is a low-level api. #include "nsstringapi.h" nsresult ns_cstringinsertdata( nsacstring& astring, pruint32 a
offset, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified. a
offset [in] an
offset into the string's internal buffer specifying where to place the given characters. adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. return values the ns_cstringinsertdata function retu...
NS_StringInsertData
« xpcom api reference summary the ns_stringinsertdata function appends data to the existing value of a nsacstring instance. this is a low-level api. #include "nsstringapi.h" nsresult ns_stringinsertdata( nsacstring& astring, pruint32 a
offset, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified. a
offset [in] an
offset into the string's internal buffer specifying where to place the given characters. adata [in] a raw character array to copy into this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. return values the ns_stringinsertdata fu...
Add to iPhoto
elf 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() method comes in: shutdown: function() { this.lib.close(); } select api declarations let's take a look at a few of the key apis we declare for core foundation, to see how it's done. cfrange cfrange is a structure that identifies a range; that is, it identifies an
offset to an item in a list and a number of items. in c, the declaration looks like this: typedef struct { cfindex location; cfindex length; } cfrange; to declare this for use with js-ctypes, we use the following code: this.cfrange = new ctypes.structtype("cfrange", [ {'location': ctypes.int32_t}, {'length': ctypes.int32_t}]); this defines corefoun...
Using Objective-C from js-ctypes
e.wrapid() function. */ // apple docs :: working with blocks - https://developer.apple.com/library/ios/documentation/cocoa/conceptual/programmingwithobjectivec/workingwithblocks/workingwithblocks.html var _nsconcreteglobalblock = ctypes.open(ctypes.libraryname('objc')).declare('_nsconcreteglobalblock', ctypes.voidptr_t); // //github.com/realityripple/uxp/blob/master/js/src/ctypes/library.cpp?
offset=0#271 /** * the "block descriptor" is a static singleton struct. probably used in more * complex block scenarios involving actual closure variables needing storage * (in `nodobjc`, javascript closures are leveraged instead). */ // struct is seen here in docs: http://clang.llvm.org/docs/block-abi-apple.html var block_descriptor_1 = ctypes.structtype('block_descriptor_1', [ { reserve...
ArrayType
dx) methods inherited from cdata cdata address() string tosource() string tostring() arraytype cdata methods addressofelement() returns a new cdata object of the appropriate pointer type, whose value points to the specified array element on which the method was called. cdata addressofelement( idx ); parameters idx a numeric value indicating the
offset into the array of the element just to return a pointer. if this value isn't a valid javascript number that's also a valid index into the array, a typeerror exception is thrown. return value a new cdata object pointing to the specified element. the type of the returned object will be determined by ctypes.pointertype(thearraytype.constructor.elementtype)). see also ctype cdata type conver...
CData
arcode); var char16_val = fromcharcode.join(''); console.info('char16_val:', char16_val); return char16_val; } if (!jschar) { try { var char8_val = stringptr.readstring(); console.info('stringptr.readstring():', char8_val); return char8_val; } catch (ex if ex.message.indexof('malformed utf-8 character sequence at
offset ') == 0) { console.warn('ex of
offset utf8 read error when trying to do readstring so using alternative method, ex:', ex); return readjscharstring(); } } else { return readjscharstring(); } } ...
Library
a functiontype cdata object representing the declared api. exceptions thrown ctypes ctype functiontype abi typeerror the return type was specified as an array. alternative syntax another use for ctypes.declare is to get non-function/non-methods from libraries. the syntax for this is seen in firefox codebase here: //github.com/realityripple/uxp/blob/master/js/src/ctypes/library.cpp?
offset=0#271 this shows that we can also supply only two arguments to the declare function. the first being the same as in the above example, name, which is the name of the symbol to export. and in place of the abi argument, we will pass in the type of this export. for example, from the objective-c library we can export the symbol which holds the address to an external block. this would be done like th...
Debugger-API - Firefox Developer Tools
ions): 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. a debugger.script represents a block of javascript code—either a function body or a top-level script. given a debugger.script, one can set breakpoints, translate between source positions and bytecode
offsets (a deviation from the “source level” design principle), and find other static characteristics of the code. a debugger.frame represents a running stack frame. you can use these to walk the stack and find each frame’s script and environment. you can also set onstep and onpop handlers on frames. a debugger.environment represents an environment, associating variable names with stor...
Edit Shape Paths in CSS - Firefox Developer Tools
s ellipse() then you are using the ellipse basic shape. the ellipse() value works in much the same way as circle() in the shape path editor. an ellipse is a squashed circle and therefore has the option to resize horizontally and vertically when you click on the shapes icon. inset() if the value of shape-outside is inset() then you are using the inset basic shape, which enables the creation of
offset values pulling the content in from the margin box. each side of the rectangle can be targeted after clicking on the shapes icon to activate the shape path editor, and dragging each side will update the values for the top, right, bottom, and left
offset values. polygon() if the value of shape-outside is polygon() then you are using the polygon basic shape. this is the most complex of the basi...
Reposition elements in the page - Firefox Developer Tools
ge. 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
offset parent. for relatively positioned elements the dashed lines indicate the original position of the node. the
offsets are indicated by a line and a tooltip for each side. ...
Animation inspector example: Web Animations API - Firefox Developer Tools
le; line-height: normal; } #icon { width: 50px; height: 50px; filter: grayscale(100%); } #note { margin-left: 1em; font: 1.5em "open sans",arial,sans-serif; overflow: hidden; white-space: nowrap; display: inline-block; opacity: 0; width: 0; } javascript content var iconkeyframeset = [ { transform: 'scale(1)', filter: 'grayscale(100%)'}, { filter: 'grayscale(100%)',
offset: 0.333}, { transform: 'scale(1.5)',
offset: 0.666 }, { transform: 'scale(1.5)', filter: 'grayscale(0%)'} ]; var notekeyframeset = [ { opacity: '0', width: '0'}, { opacity: '1', width: '300px'} ]; var iconkeyframeoptions = { duration: 750, fill: 'forwards', easing: 'ease-in', enddelay: 100 } var notekeyframeoptions = { duration: 500, fill: 'forwards', easing: 'ease-out', ...
Work with animations - Firefox Developer Tools
750ms. filter was given a value at 250ms and transform at 500ms. 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 iconkeyframeset = [ { transform: 'scale(1)', filter: 'grayscale(100%)' }, { filter: 'grayscale(100%)',
offset: 0.333 }, { transform: 'scale(1.5)',
offset: 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. hovering over these selectors, we can see that those elements are, respectively, the browser name...
AudioBuffer.copyFromChannel() - Web APIs
ace copies the audio sample data from the specified channel of the audiobuffer to a specified float32array. syntax myarraybuffer.copyfromchannel(destination, channelnumber, startinchannel); parameters destination a float32array to copy the channel's samples to. channelnumber the channel number of the current audiobuffer to copy the channel data from. startinchannel optional an optional
offset into the source channel's buffer from which to begin copying samples. if not specified, a value of 0 (the beginning of the buffer) is assumed by default. return value undefined. exceptions indexsizeerror one of the input parameters has a value that is outside the accepted range: the value of channelnumber specifies a channel number which doesn't exist (that is, it's greater than or eq...
AudioBuffer.copyToChannel() - Web APIs
y. syntax myarraybuffer.copytochannel(source, channelnumber, startinchannel); parameters source a float32array that the channel data will be copied from. channelnumber the channel number of the current audiobuffer to copy the channel data to. if channelnumber is greater than or equal to audiobuffer.numberofchannels, an index_size_err will be thrown. startinchannel optional an optional
offset to copy the data to. if startinchannel is greater than audiobuffer.length, an index_size_err will be thrown. example var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); var anotherarray = new float32array; // copy channel data from second channel of myarraybuffer. myarraybuffer.copyfromchannel(anotherarray,1,0); // copy data from anotherarray to first channel of myar...
AudioBufferSourceNode.loopEnd - Web APIs
the loopend property of the audiobuffersourcenode interface specifies is a floating point number specifying, in seconds, at what
offset into playing the audiobuffer playback should loop back to the time indicated by the loopstart property. this is only used if the loop property is true. syntax audiobuffersourcenode.loopend = end
offsetinseconds; var end
offsetinseconds = audiobuffersourcenode.loopend; value a floating-point number indicating the
offset, in seconds, into the audio buffer at which each loop will loop return to the beginning of the loop (that is, the current play time gets reset to audiobuffersourcenode.loopstart). this property is only used if the loop property is true. the default value is 0. example in this example, the audiocontext.decodeaudiodata() function is used t...
BaseAudioContext.createPeriodicWave() - Web APIs
eoscillator(); 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
offset, which is the value at which the oscillator starts. 0 is good here, because we want to start the curve at the middle of the [-1.0; 1.0] range. the second and subsequent values are sine and cosine components. you can think of it as the result of a fourier transform, where you get frequency domain values from time domain value. here, with createperiodicwave(), you specify the frequencies, and the ...
CanvasGradient.addColorStop() - Web APIs
0 represents the start of the gradient and 1 represents the end; an index_size_err is raised if the number is outside that range. color a css <color> value representing the color of the stop. a syntax_err is raised if the value cannot be parsed as a css <color> value. examples adding stops to a gradient this example uses the addcolorstop method to add stops to a linear canvasgradient object. ...
CanvasGradient - Web APIs
ce represents an opaque object describing a gradient. it is returned by the methods canvasrenderingcontext2d.createlineargradient() or canvasrenderingcontext2d.createradialgradient(). it can be used as a fillstyle or strokestyle. properties as an opaque object, there is no exposed property. methods there is no inherited method. canvasgradient.addcolorstop() adds a new stop, defined by an
offset and a color, to the gradient. if the
offset 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. specifications specification status comment html living standardthe definition of 'canvasgradient' in that specification. living standard ...
CanvasRenderingContext2D.drawFocusIfNeeded() - Web APIs
ton2'); document.addeventlistener('focus', redraw, true); document.addeventlistener('blur', redraw, true); canvas.addeventlistener('click', handleclick, false); redraw(); function redraw() { ctx.clearrect(0, 0, canvas.width, canvas.height); drawbutton(button1, 20, 20); drawbutton(button2, 20, 80); } function handleclick(e) { // calculate click coordinates const x = e.clientx - canvas.
offsetleft; const y = e.clienty - canvas.
offsettop; // focus button1, if appropriate drawbutton(button1, 20, 20); if (ctx.ispointinpath(x, y)) { button1.focus(); } // focus button2, if appropriate drawbutton(button2, 20, 80); if (ctx.ispointinpath(x, y)) { button2.focus(); } } function drawbutton(el, x, y) { const active = document.activeelement === el; const width = 150...
CanvasRenderingContext2D.filter - Web APIs
htens it. a value of 0% will create an image that is completely black, while a value of 100% leaves the input unchanged. contrast() a css <percentage>. adjusts the contrast of the drawing. a value of 0% will create a drawing that is completely black. a value of 100% leaves the drawing unchanged. drop-shadow() applies a drop shadow effect to the drawing. a drop shadow is effectively a blurred,
offset version of the drawing's alpha mask drawn in a particular color, composited below the drawing. this function takes up to five arguments: <
offset-x>: see <length> for possible units. specifies the horizontal distance of the shadow. <
offset-y>: see <length> for possible units. specifies the vertical distance of the shadow. <blur-radius>: the larger this value, the bigger the blur, so the sh...
CanvasRenderingContext2D.isPointInStroke() - Web APIs
canvas.getcontext('2d'); // create ellipse const ellipse = new path2d(); ellipse.ellipse(150, 75, 40, 60, math.pi * .25, 0, 2 * math.pi); ctx.linewidth = 25; ctx.strokestyle = 'red'; ctx.fill(ellipse); ctx.stroke(ellipse); // listen for mouse moves canvas.addeventlistener('mousemove', function(event) { // check whether point is inside ellipse's stroke if (ctx.ispointinstroke(ellipse, event.
offsetx, event.
offsety)) { ctx.strokestyle = 'green'; } else { ctx.strokestyle = 'red'; } // draw ellipse ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.fill(ellipse); ctx.stroke(ellipse); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.ispointinstroke' in that specification...
CanvasRenderingContext2D.save() - Web APIs
nvas 2d api saves the entire state of the canvas by pushing the current state onto a stack. the drawing state the drawing state that gets saved onto a stack consists of: the current transformation matrix. the current clipping region. the current dash list. the current values of the following attributes: strokestyle, fillstyle, globalalpha, linewidth, linecap, linejoin, miterlimit, linedash
offset, shadow
offsetx, shadow
offsety, shadowblur, shadowcolor, globalcompositeoperation, font, textalign, textbaseline, direction, imagesmoothingenabled. syntax void ctx.save(); examples saving the drawing state this example uses the save() method to save the default state and restore() to restore it later, so that you are able to draw a rect with the default state later. html <canvas id="canvas...
Basic animations - Web APIs
d use any image that's larger than the canvas. var img = new image(); // user variables - customize these to change the image being scrolled, its // direction, and the speed. ...
Compositing example - Web APIs
le = "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
offset = 0; // scrollbar
offset 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...
Transformations - Web APIs
s state. canvas states are stored on a stack. every time the save() method is called, the current drawing state is pushed onto the stack. a drawing state consists of the transformations that have been applied (i.e. translate, rotate and scale – see below). the current values of the following attributes: strokestyle, fillstyle, globalalpha, linewidth, linecap, linejoin, miterlimit, linedash
offset, shadow
offsetx, shadow
offsety, shadowblur, shadowcolor, globalcompositeoperation, font, textalign, textbaseline, direction, imagesmoothingenabled. the current clipping path, which we'll see in the next section. you can call the save() method as many times as you like. each time the restore() method is called, the last saved state is popped off the stack and all saved settings are restored. a ...
CaretPosition - Web APIs
the caretposition interface represents the caret position, an indicator for the text insertion point. you can get a caretposition using the document.caretpositionfrompoint method. properties this interface doesn't inherit any properties. caretposition.
offsetnode read only returns a node containing the found node at the caret's position. caretposition.
offset read only returns a long representing the character
offset in the caret position node. methods caretposition.getclientrect specification specification status comment css object model (cssom) view modulethe definition of 'caretposition' in that specification. working draft ...
DOMMatrix - Web APIs
are altered to be mutable. is2d read only a boolean flag whose value is true if the matrix was initialized as a 2d matrix. if false, the matrix is 3d. isidentity read only a boolean whose value is true if the matrix is the identity matrix. 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
offsets in each direction are equal). m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44 double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth. a, b, c, d, e, f double-precision floating-point values representing the components of a 4×4 matrix ...
DOMMatrixReadOnly - Web APIs
n't inherit any properties. is2d read only a boolean flag whose value is true if the matrix was initialized as a 2d matrix. if false, the matrix is 3d. isidentity read only a boolean whose value is true if the matrix is the identity matrix. 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
offsets in each direction are equal). m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44 double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth. a, b, c, d, e, f double-precision floating-point values representing the components of a 4×4 matrix ...
DOMPoint.DOMPoint() - Web APIs
, y, z, w); parameters x optional the x coordinate for the new dompoint. y optional the y coordinate for the new dompoint. z optional the z coordinate for the new dompoint. w optional the perspective value of the new dompoint. examples this example creates a dompoint representing the top-left corner of the current window, then creates a second point based on the first, which is then
offset by 100 pixels both vertically and horizontally. var windtopleft = new dompoint(window.screenx, window.screeny); var newtopleft = dompoint.frompoint(windtopleft); newtopleft.x += 100; newtopleft.y += 100; specifications specification status comment geometry interfaces module level 1the definition of 'dompoint()' in that specification. candidate recommendation init...
Document.createRange() - Web APIs
the document.createrange() method returns a new range object. syntax range = document.createrange(); range is the created range object. example let range = document.createrange(); range.setstart(startnode, start
offset); range.setend(endnode, end
offset); notes once a range is created, you need to set its boundary points before you can make use of most of its methods. specifications specification status comment domthe definition of 'document.createrange' in that specification. living standard ...
Document.timeline - Web APIs
the timeline readonly property of the document interface represents the default timeline of the current document. this timeline is a special instance of documenttimeline that is automatically created on page load. this timeline is unique to each document and persists for the lifetime of the document including calls to document.open(). the time values for this timeline are calculated as a fixed
offset from the global clock such that the zero time corresponds to the navigationstart moment plus a signed delta known as the origin time. prior to establishing the navigationstart moment, the document timeline is inactive. note: a document timeline that is associated with a non-active document is also considered to be inactive. syntax var pagetimeline = document.timeline; var thismoment = paget...
Document - Web APIs
he user, or the current position of the caret. documentorshadowroot.elementfrompoint() returns the topmost element at the specified coordinates. documentorshadowroot.elementsfrompoint() returns an array of all elements at the specified coordinates. documentorshadowroot.caretpositionfrompoint() returns a caretposition object containing the dom node containing the caret, and caret's character
offset within that node. events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of this interface. scroll fired when the document view or an element has been scrolled. also available via the onscroll property. visibilitychange fired when the content of a tab has become visible or has been hidden. also available via the onvisibility...
DocumentOrShadowRoot - Web APIs
is pending, the pointer is unlocked, or if the target is in another document. documentorshadowroot.stylesheetsread only returns a stylesheetlist of cssstylesheet objects for stylesheets explicitly linked into, or embedded in a document. methods documentorshadowroot.caretpositionfrompoint() returns a caretposition object containing the dom node containing the caret, and caret's character
offset within that node. documentorshadowroot.elementfrompoint() returns the topmost element at the specified coordinates. documentorshadowroot.elementsfrompoint() returns an array of all elements at the specified coordinates. documentorshadowroot.getselection() returns a selection object representing the range of text selected by the user, or the current position of the caret. documentorshadowro...
Document Object Model (DOM) - Web APIs
vgfecomponenttransferelement svgfecompositeelement svgfeconvolvematrixelement svgfediffuselightingelement svgfedisplacementmapelement svgfedistantlightelement svgfedropshadowelement svgfefloodelement svgfefuncaelement svgfefuncbelement svgfefuncgelement svgfefuncrelement svgfegaussianblurelement svgfeimageelement svgfemergeelement svgfemergenodeelement svgfemorphologyelement svgfe
offsetelement svgfepointlightelement svgfespecularlightingelement svgfespotlightelement svgfetileelement svgfeturbulenceelement svgfilterelement svgfilterprimitivestandardattributes svgfontelement svgfontfaceelement svgfontfaceformatelement svgfontfacenameelement svgfontfacesrcelement svgfontfaceurielement svgforeignobjectelement svggelement svggeometryelement svgglyphelemen...
EffectTiming.fill - Web APIs
.animate({ transform: 'translatey(100px)' }, 200).finished.then(() => { elem.style.transform = 'translatey(100px)'; }); alternatively, it may be simpler still to set the final value in specified style before triggering the animation and then animate from the start value. this is the approach used in flip animation. elem.style.transform = 'translatey(100px)'; elem.animate({ transform: 'none',
offset: 0 }, 200); for some complex effects where animations layer on top of one another, it may be necessary to use a fill mode temporarily to capture the final value of an animation before canceling it. elem.addeventlistener('click', async evt => { const animation = elem.animate( { transform: `translate(${evt.clientx}px, ${evt.clienty}px)` }, { duration: 800, fill: 'forwards' } ); awa...
Element.clientTop - Web APIs
the width of the top border of an element in pixels. it is a read-only, integer property of element. as it happens, all that lies between the two locations (
offsettop and client area top) is the element's border. this is because the
offsettop indicates the location of the top of the border (not the margin) while the client area starts immediately below the border, (client area includes padding.) therefore, the clienttop value will always equal the integer portion of the .getcomputedstyle() value for "border-top-width". (actually might be math.round(parsefloat()).) for example, if the computed "border-top-width" is zero, then clienttop is also zero. note: this property will round the value to an integer. if you need a fractional value, use element.getboundingclientrect(). gecko-based applic...
Element.getBoundingClientRect() - Web APIs
f you need the bounding rectangle relative to the top-left corner of the document, just add the current scrolling position to the top and left properties (these can be obtained using window.scrollx and window.scrolly) to get a bounding rectangle which is independent from the current scrolling position. cross-browser fallback scripts requiring high cross-browser compatibility can use window.pagex
offset and window.pagey
offset instead of window.scrollx and window.scrolly. scripts without access to these properties can use code like this: // for scrollx (((t = document.documentelement) || (t = document.body.parentnode)) && typeof t.scrollleft == 'number' ? t : document.body).scrollleft // for scrolly (((t = document.documentelement) || (t = document.body.parentnode)) && typeof t.scrolltop == ...
Element.getClientRects() - Web APIs
ny child elements that might happen to overflow. for html <area> elements, svg elements that do not render anything themselves, display:none elements, and generally any elements that are not directly rendered, an empty list is returned. rectangles are returned even for css boxes that have empty border-boxes. the left, top, right, and bottom coordinates can still be meaningful. fractional pixel
offsets are possible. examples these examples draw client rects in various colors. note that the javascript function that paints the client rects is connected to the markup via the class withclientrectsoverlay. html example 1: this html creates three paragraphs with a <span> inside, each embedded in a <div> block. client rects are painted for the paragraph in the second block, and for the <span> ele...
Element.scrollLeftMax - Web APIs
syntax var pxl = element.scrollleftmax; specifications this property is not part of any specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
Element.scrollTopMax - Web APIs
the element.scrolltopmax read-only property returns a number representing the maximum top scroll
offset possible for the element. syntax var pxl = elt.scrolltopmax; specifications this property is not part of any specification. ...
Element.scrollWidth - Web APIs
check for overflow </button> </body> <script> var buttonone = document.getelementbyid('abutton'), buttontwo = document.getelementbyid('anotherbutton'), divone = document.getelementbyid('adiv'), divtwo = document.getelementbyid('anotherdiv'); //check to determine if an overflow is happening function isoverflowing(element) { return (element.scrollwidth > element.
offsetwidth); } function alertoverflow(element) { if (isoverflowing(element)) { alert('contents are overflowing the container.'); } else { alert('no overflows!'); } } buttonone.addeventlistener('click', function() { alertoverflow(divone); }); buttontwo.addeventlistener('click', function() { alertoverflow(divtwo); ...
Element - Web APIs
e prefix of the element, or null if no prefix is specified. nondocumenttypechildnode.previouselementsibling read only is a element, the element immediately preceding the given one in the tree, or null if there is no sibling element. element.scrollheight read only returns a number representing the scroll view height of an element. element.scrollleft is a number representing the left scroll
offset of the element. element.scrollleftmax read only returns a number representing the maximum left scroll
offset possible for the element. element.scrolltop a number representing number of pixels the top of the document is scrolled vertically. element.scrolltopmax read only returns a number representing the maximum top scroll
offset possible for the element. element.scrollwidth read only...
HTMLCanvasElement.toDataURL() - Web APIs
isplay = 'none'; } function removecolors() { var aimages = document.getelementsbyclassname('grayscale'), nimgslen = aimages.length, ocanvas = document.createelement('canvas'), octx = ocanvas.getcontext('2d'); for (var nwidth, nheight, oimgdata, ograyimg, npixel, apix, npixlen, nimgid = 0; nimgid < nimgslen; nimgid++) { ocolorimg = aimages[nimgid]; nwidth = ocolorimg.
offsetwidth; nheight = ocolorimg.
offsetheight; ocanvas.width = nwidth; ocanvas.height = nheight; octx.drawimage(ocolorimg, 0, 0); oimgdata = octx.getimagedata(0, 0, nwidth, nheight); apix = oimgdata.data; npixlen = apix.length; for (npixel = 0; npixel < npixlen; npixel += 4) { apix[npixel + 2] = apix[npixel + 1] = apix[npixel] = (apix[npixel] + apix[npixel + 1] + ap...
HTMLCollection.item - Web APIs
note: because the contents of an htmlcollection are live, changes to the underlying dom can and will cause the position of individual nodes in the collection to change, so the index value will not necessarily remain constant for a given node. syntax var element = htmlcollection.item(index) parameters index the position of the node to be returned. elements appear in an htmlcollection in the same order in which they appear in the document's source. return value the node at the specified index, or null if index is less than zero or greater than or equal to the length property. ...
HTMLImageElement.isMap - Web APIs
mlimageelement.ismap = true|false; let ismap = htmlimageelement.ismap; value a boolean value which is true if the image is being used for a server-side image map; otherwise, the value is false. usage notes when an image marked as being part of a server-side image map is clicked, the browser constructs the string "?x,y", where x and y indicate the coordinates at which the mouse was clicked as
offsets from the top-left corner of the image, specified in css pixels. the browser then fetches that url from the server and displays or downloads it depending on the value of the download attribute. unlike server-side image maps, client-side image maps don't cause the <img> element to adopt interactive content mode. specifications specification status comment html livin...
HTMLImageElement.x - Web APIs
og(`image's global y: ${image.y}`); this uses the <table>'s rows property to get a list of the rows in the table, from which it looks up row 1 (which, being a zero-based index, means the second row from the top). then it looks at that <tr> (table row) element's cells property to get a list of the cells in that row. the third cell is taken from that row (once again, specifying 2 as the zero-based
offset). from there, we can get the <img> element itself from the cell by calling queryselector() on the htmltablecellelement representing that cell. finally, we can look up and display the values of the htmlimageelement's x and y properties. css the css defining the appearance of the table: .group1 { background-color: #d7d9f2; } table { border-collapse: collapse; border: 2px solid rgb(100, ...
HTMLImageElement.y - Web APIs
og(`image's global y: ${image.y}`); this uses the <table>'s rows property to get a list of the rows in the table, from which it looks up row 1 (which, being a zero-based index, means the second row from the top). then it looks at that <tr> (table row) element's cells property to get a list of the cells in that row. the third cell is taken from that row (once again, specifying 2 as the zero-based
offset). from there, we can get the <img> element itself from the cell by calling queryselector() on the htmltablecellelement representing that cell. finally, we can look up and display the values of the htmlimageelement's x and y properties. css the css defining the appearance of the table: .group1 { background-color: #d7d9f2; } table { border-collapse: collapse; border: 2px solid rgb(100, ...
HTMLImageElement - Web APIs
cal url is a pound (hash) symbol (#) followed by the id of the <map> element, such as #my-map-element. the <map> in turn contains <area> elements indicating the clickable areas in the image. htmlimageelement.width an integer value that reflects the width html attribute, indicating the rendered width of the image in css pixels. htmlimageelement.x read only an integer indicating the horizontal
offset of the left border edge of the image's css layout box relative to the origin of the <html> element's containing block. htmlimageelement.y read only the integer vertical
offset of the top border edge of the image's css layout box relative to the origin of the <html> element's containing block. obsolete properties htmlimageelement.align a domstring indicating the alignment of the image w...
HTMLInputElement - Web APIs
, color, checkbox, radio, file, or a button type. selectionstart unsigned long: returns / sets the beginning index of the selected text. when nothing is selected, this returns the position of the text input cursor (caret) inside of the <input> element. selectionend unsigned long: returns / sets the end index of the selected text. when there's no selection, this returns the
offset of the character immediately following the current text input cursor position. selectiondirection string: returns / sets the direction in which selection occurred. possible values are: forward if selection was performed in the start-to-end direction of the current locale backward for the opposite direction none if the direction is unknown size unsigned long: retur...
HTMLTableColElement - Web APIs
a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmltablecolelement.align is a domstring that indicates the horizontal alignment of the cell data in the column. htmltablecolelement.ch is a domstring representing the alignment character for cell data. htmltablecolelement.choff is a domstring representing the
offset for the alignment character. htmltablecolelement.span is an unsigned long that reflects the span html attribute, indicating the number of columns to apply this object's attributes to. must be a positive integer. htmltablecolelement.valign is a domstring that indicates the vertical alignment of the cell data in the column. htmltablecolelement.width is a domstring representing the defa...
HTMLTimeElement.dateTime - Web APIs
mmm 23:59 12:15:47 12:15:52.998 valid local date and time string yyyy-mm-dd hh:mm yyyy-mm-dd hh:mm:ss yyyy-mm-dd hh:mm:ss.mmm yyyy-mm-ddthh:mm yyyy-mm-ddthh:mm:ss yyyy-mm-ddthh:mm:ss.mmm 2013-12-25 11:12 1972-07-25 13:43:07 1941-03-15 07:06:23.678 2013-12-25t11:12 1972-07-25t13:43:07 1941-03-15t07:06:23.678 valid time-zone
offset string z +hhmm +hh:mm -hhmm -hh:mm z +0200 +04:30 -0300 -08:00 valid global date and time string any combination of a valid local date and time string followed by a valid time-zone
offset string 2013-12-25 11:12+0200 1972-07-25 13:43:07+04:30 1941-03-15 07:06:23.678z 2013-12-25t11:12-08:00 valid week string yyyy-www 2...
IntersectionObserver.IntersectionObserver() - Web APIs
n a one-pixel change is enough to trigger a callback). you can provide any combination of the following options: root an element or document object which is an ancestor of the intended target, whose bounding rectangle will be considered the viewport. any part of the target not visible in the visible area of the root is not considered visible. rootmargin a string which specifies a set of
offsets to add to the root's bounding_box when calculating intersections, effectively shrinking or growing the root for calculation purposes. the syntax is approximately the same as that for the css margin property; see the root element and root margin in intersection observer api for more information on how the margin works and the syntax. the default is "0px 0px 0px 0px". threshold either a single...
IntersectionObserver.root - Web APIs
e viewport for the element which is the observer's target. if the root is null, then the bounds of the actual document viewport are used. syntax var root = intersectionobserver.root; value a element or document object whose bounding box is used as the bounds of the viewport for the purposes of determining how much of the target element is visible. the intersection of this bounding rectangle,
offset by any margins specified in the options passed to the intersectionobserver() constructor, the target element's bounds, minus the bounds of every element or other object which overlaps the target element, is considered to be the visible area of the target element. if root is null, then the owning document is used as the root, and the bounds its viewport (that is, the visible area of the document)...
IntersectionObserver.rootMargin - Web APIs
target as partially hidden if an edge is too close to the edge of the root's bounding box. see the root element and root margin in intersection observer api for a more in-depth look at the root margin and how it works with the root's bounding box. syntax var marginstring = intersectionobserver.rootmargin; value a string, formatted similarly to the css margin property's value, which contains
offsets for one or more sides of the root's bounding box. these
offsets are added to the corresponding values in the root's bounding box before the intersection between the resulting rectangle and the target element's bounds. the string returned by this property may not match the one specified when the intersectionobserver was instantiated. the browser is permitted to alter the values if rootmargin is...
IntersectionObserver - Web APIs
n when it detects that a target element's visibility has crossed one or more thresholds. properties intersectionobserver.root read only the element or document whose bounds are used as the bounding box when testing for intersection. if no root value was passed to the constructor or its value is null, the top-level document's viewport is used. intersectionobserver.rootmargin read only an
offset rectangle applied to the root's bounding box when calculating intersections, effectively shrinking or growing the root for calculation purposes. the value returned by this property may not be the same as the one specified when calling the constructor as it may be changed to match internal requirements. each
offset can be expressed in pixels (px) or as a percentage (%). the default is "0px 0px 0px...
IntersectionObserverEntry.rootBounds - Web APIs
the intersectionobserverentry interface's read-only rootbounds property is a domrectreadonly corresponding to the target's root intersection rectangle,
offset by the intersectionobserver.rootmargin if one is specified. syntax var rootbounds = intersectionobserverentry.rootbounds; value a domrectreadonly which describes the root intersection rectangle. for roots which are the document's viewport, this rectangle is the bounds rectangle of the entire document. otherwise, it's the bounds of the root element. this rectangle is
offset by the values in intersectionobserver.rootmargin. specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.rootbounds' in that specification. working draft initial defin...
KeyframeEffect - Web APIs
solving the property value changes between this and other keyframe effects. methods this interface inherits some of its methods from its parent, animationeffect. animationeffect.getcomputedtiming() returns the calculated, current timing values for this keyframe effect. keyframeeffect.getkeyframes() returns the computed keyframes that make up this effect along with their computed keyframe
offsets. animationeffect.gettiming() the effecttiming object associated with the animation containing all the animation's timing values. keyframeeffect.setkeyframes() replaces the set of keyframes that make up this effect. animationeffect.updatetiming() updates the specified timing properties. examples in the follow the white rabbit example, the keyframeeffect constructor is used to create a...
LockedFile - Web APIs
and date of the last modification). returns a filerequest. lockedfile.readasarraybuffer() allows to retrieve a part of the content of the file as an arraybuffer. returns a filerequest object. lockedfile.readastext() allows to retrieve a part of the content of the file as a string. returns a filerequest object. lockedfile.write() allows to write some data in the file starting at the location
offset. returns a filerequest object. lockedfile.append() allows to write some data at the end of the file. returns a filerequest object. lockedfile.truncate() allows to truncate the file's content. returns a filerequest object. lockedfile.flush() allows to guarantee that any buffered data has been transferred to disk. lockedfile.abort() makes the lockedfile inactive and cancels all ongoing oper...
MSManipulationEvent - Web APIs
tate of an element being manipulated has changed. methods msmanipulationevent.initmsmanipulationevent(): used to create a manipulation event that can be called from javascript. properties property description currentstateread only returns the current state of a manipulation event. inertiadestinationxread only represents the predicted horizontal scroll
offset after the inertia phase completes. inertiadestinationyread only represents the predicted vertical scroll
offset after the inertia phase completes. laststateread only returns the last state after a manipulation change event. example interface msmanipulationevent extends uievent { readonly currentstate: number; readonly inertiadestinationx: number; read...
Media Session action types - Web APIs
rmed. the following strings identify the currently available types of media session action: nexttrack advances playback to the next track. pause pauses playback of the media. play begins (or resumes) playback of the media. previoustrack moves back to the previous track. seekbackward seeks backward through the media from the current position. the mediasessionactiondetails property seek
offset specifies the amount of time to seek backward. seekforward seeks forward from the current position through the media. the mediasessionactiondetails property seek
offset specifies the amount of time to seek forward. seekto moves the playback position to the specified time within the media. the time to which to seek is specified in the mediasessionactiondetails property seektime. if you intend t...
MediaSessionActionDetails.seekTime - Web APIs
the mediasessionactiondetails dictionary's seektime property is always included when a seekto action is sent to the action handler callback. its value is the absolute time, in seconds, to move the current play position to. to change the time by an
offset rather than moving to an absolute time, the seekforward or seekbackward actions should be used instead. syntax let mediasessionactiondetails = { seektime: abstimeinseconds }; let abstime = mediasessionactiondetails.seektime; value a floating-point value indicating the absolute time in seconds into the media to which to move the current play position. usage notes to perform a "fast" seek (such as when issuing multiple seekto actions in sequence while handling a scrubbing operation, the details object's fastseek property's value is set t...
MouseEvent.screenX - Web APIs
syntax var x = instanceofmouseevent.screenx return value a double floating point value. early versions of the spec defined this as an integer referring to the number of pixels. see the "browser compatibility" section for details. example this example displays your mouse's coordinates whenever you trigger the mousemove event. ...
MouseEvent.screenY - Web APIs
syntax var y = instanceofmouseevent.screeny return value a double floating point value. early versions of the spec defined this as an integer referring to the number of pixels. see the "browser compatibility" section for details. example this example displays your mouse's coordinates whenever you trigger the mousemove event. ...
OscillatorNode.OscillatorNode() - Web APIs
xt. options optional an object whose properties specify the initial values for the oscillator node's properties. any properties omitted from the object will take on the default value as documented. type the shape of the wave produced by the node. valid values are 'sine', 'square', 'sawtooth', 'triangle' and 'custom'. the default is 'sine'. detune a detuning value (in cents) which will
offset the frequency by the given amount. its default is 0. frequency the frequency (in hertz) of the periodic waveform. its default is 440. periodicwave an arbitrary period waveform described by a periodicwave object. return value a new oscillatornode object instance. specifications specification status comment web audio apithe definition of 'oscillatornode()' i...
OscillatorNode.setPeriodicWave() - Web APIs
ntext(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag); 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
offset, which is the value at which the oscillator starts. 0 is good here, because we want to start the curve at the middle of the [-1.0; 1.0] range. the second and subsequent values are sine and cosine components. you can think of it as the result of a fourier transform, where you get frequency domain values from time domain value. here, with createperiodicwave(), you specify the frequencies, and the ...
PeriodicWave - Web APIs
eoscillator(); 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
offset, which is the value at which the oscillator starts. 0 is good here, because we want to start the curve at the middle of the [-1.0; 1.0] range. the second and subsequent values are sine and cosine components. you can think of it as the result of a fourier transform, where you get frequency domain values from time domain value. here, with createperiodicwave(), you specify the frequencies, and the ...
Range.collapsed - Web APIs
the same position. it returns true if the start and end boundary points of the range are the same point in the dom, false if not. a collapsed range is empty (containing no content), and specifies a single point in a dom tree. to collapse a range, see the range.collapse() method. syntax iscollapsed = range.collapsed; example let range = document.createrange(); range.setstart(startnode, start
offset); range.setend(endnode, end
offset); iscollapsed = range.collapsed; specifications specification status comment domthe definition of 'range.collapsed' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.collapsed' in that specification. obsolete initial specif...
Range.comparePoint() - Web APIs
the range.comparepoint() method returns -1, 0, or 1 depending on whether the referencenode is before, the same as, or after the range. if the reference node is a node of type text, comment, or cdatasection, then
offset is the number of characters from the start of reference node. for other node types,
offset is the number of child nodes between the start of the reference node. syntax returnvalue = range.comparepoint(referencenode,
offset) parameters referencenode the node to compare with the range.
offset an integer greater than or equal to zero representing the
offset inside the referencenode. example range = document.createrange(); range.selectnode(document.getelementsbytagname('div').item(0)); returnvalue = range.comparepoint(document.getelementsbytagname('p').item(0)...
Range.endContainer - Web APIs
the range.endcontainer read-only property returns the node within which the range ends. to change the end position of a node, use the range.setend() method or a similar one. syntax endrangenode = range.endcontainer; example var range = document.createrange(); range.setstart(startnode,start
offset); range.setend(endnode,end
offset); endrangenode = range.endcontainer; specifications specification status comment domthe definition of 'range.endcontainer' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.endcontainer' in that specification. obsolete initial specification. ...
Range.isPointInRange() - Web APIs
the range.ispointinrange() method returns a boolean indicating whether the given point is in the range. it returns true if the point (cursor position) at
offset within referencenode is within this range. syntax bool = range.ispointinrange( referencenode,
offset ) parameters referencenode the node to compare with the range.
offset the
offset into node of the point to compare with the range. example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); bool = range.ispointinrange(document.getelementsbytagname("p").item(0),1); specification specification status comment domthe definition of 'range.ispointinrange()' in that specification. living standard initial definition. ...
Range.startContainer - Web APIs
the range.startcontainer read-only property returns the node within which the range starts. to change the start position of a node, use one of the range.setstart() methods. syntax startrangenode = range.startcontainer; example range = document.createrange(); range.setstart(startnode,start
offset); range.setend(endnode,end
offset); startrangenode = range.startcontainer; specifications specification status comment domthe definition of 'range.endcontainer' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.startcontainer' in that specification. obsolete initial specification. ...
Range - Web APIs
available. properties there are no inherited properties. range.collapsed read only returns a boolean indicating whether the range's start and end points are at the same position. range.commonancestorcontainer read only returns the deepest node that contains the startcontainer and endcontainer nodes. range.endcontainer read only returns the node within which the range ends. range.end
offset read only returns a number representing where in the endcontainer the range ends. range.startcontainer read only returns the node within which the range starts. range.start
offset read only returns a number representing where in the startcontainer the range starts. constructor range() returns a range object with the global document as its start and end. methods there are no inhe...
SVGComponentTransferFunctionElement - Web APIs
ganimatednumber corresponding to the intercept attribute of the given element. svgcomponenttransferfunctionelement.amplitude read only an svganimatednumber corresponding to the amplitude attribute of the given element. svgcomponenttransferfunctionelement.exponent read only an svganimatednumber corresponding to the exponent attribute of the given element. svgcomponenttransferfunctionelement.
offset read only an svganimatednumber corresponding to the
offset attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement. specifications specification status comment filter effects module level 1the definition of 'svgcomponenttransferfunctionelement' in that specification. working draf...
SVGStopElement - Web APIs
roke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgstopelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svgelement. svgstopelement.
offset read only an svganimatednumber corresponding to the
offset of the given element. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgstopelement' in that specification. candidate recommendatio...
SVGTextPathElement - Web APIs
s type or to attempt to switch an existing value to this type. textpath_spacingtype_auto 1 corresponds to the value auto. textpath_spacingtype_exact 2 corresponds to the value exact. properties this interface also inherits properties from its parent interface, svgtextcontentelement, and also implements properties of svgurireference. svgtextpathelement.start
offset read only an svganimatedlength corresponding to the x component of the start
offset attribute of the given element. svgtextpathelement.method read only an svganimatedenumeration corresponding to the method attribute of the given element. it takes one of the textpath_methodtype_* constants defined on this interface. svgtextpathelement.spacing read only an svganimatedenumeration correspondin...
Selection.collapse() - Web APIs
the selection.collapse() method collapses the current selection to a single point. the document is not modified. if the content is focused and editable, the caret will blink there. syntax sel.collapse(node,
offset); parameters node the caret location will be within this node. this value can also be set to null — if null is specified, the method will behave like selection.removeallranges(), i.e. all ranges will be removed from the selection.
offset optional the
offset in node to which the selection will be collapsed. if not specified, the default value 0 is used. examples /* place the caret at the beginning of an html document's body. */ var body = document.getelementsbytagname("body")[0]; window.getselection().collapse(body,0); specifications specificatio...
ShadowRoot - Web APIs
he user, or the current position of the caret. documentorshadowroot.elementfrompoint() returns the topmost element at the specified coordinates. documentorshadowroot.elementsfrompoint() returns an array of all elements at the specified coordinates. documentorshadowroot.caretpositionfrompoint() returns a caretposition object containing the dom node containing the caret, and caret's character
offset within that node. examples the following snippets are taken from our life-cycle-callbacks example (see it live also), which creates an element that displays a square of a size and color specified in the element's attributes. inside the <custom-square> element's class definition we include some life cycle callbacks that make a call to an external function, updatestyle(), which actually applies...
SourceBuffer - Web APIs
returns the time ranges that are currently buffered in the sourcebuffer. sourcebuffer.mode controls how the order of media segments in the sourcebuffer is handled, in terms of whether they can be appended in any order, or they have to be kept in a strict sequence. sourcebuffer.texttracks read only a list of the text tracks currently contained inside the sourcebuffer. sourcebuffer.timestamp
offset controls the
offset applied to timestamps inside media segments that are subsequently appended to the sourcebuffer. sourcebuffer.trackdefaults specifies the default values to use if kind, label, and/or language information is not available in the initialization segment of the media to be appended to the sourcebuffer. sourcebuffer.updating read only a boolean indicating whether the sourcebuf...
StaticRange.StaticRange() - Web APIs
ange as well as a boolean indicating whether or not the range is collapsed (that is, empty). syntax var staticrange = new staticrange(rangespec) parameters rangespec the required rangespec parameter is an object adhering to the staticrangeinit dictionary. the four required rangespec properties are: startcontainer the node in which the starting point of the range is located. start
offset the
offset into the starting node at which the first character of the range is found. endcontainer the node in which the end point of the range is located. end
offset the
offset into the node indicated by end
offset at which the last character in the range is located. return value a new staticrange object initialized with the values given in the rangespec object. exceptions inv...
Text - Web APIs
ty, defined on the slotable mixin. slotable.assignedslot read only returns a htmlslotelement representing the <slot> the node is inserted in. methods inherits methods from its parent, characterdata. text.replacewholetext replaces the text of the current node and all logically adjacent nodes with the specified text. text.splittext breaks the node into two nodes at a specified
offset. specifications specification status comment domthe definition of 'text' in that specification. living standard removed the iselementcontentwhitespace property. removed the replacewholetext() method. added the text() constructor. added the assignedslot property. document object model (dom) level 3 core specificationthe definition of 'text'...
TimeRanges.end() - Web APIs
syntax endtime = timeranges.end(index) parameters index is the range number to return the ending time for. exceptions index_size_err a domexception thrown if the specified index doesn't correspond to an existing range. example given a video element with the id "myvideo": var v = document.getelementbyid("myvideo"); var buf = v.buffered; var numranges = buf.length; if (buf.length == 1) { // only one range if (buf.start(0) == 0 && buf.end(0) == v.duration) { // the one range starts at the beginning and ends at // the end of the video, so the whole thing is loaded } } this example looks at the time ranges and looks to see if the entire video has been loaded. ...
TimeRanges.start() - Web APIs
syntax starttime = timeranges.start(index) parameters index is the range number to return the starting time for. exceptions index_size_err a domexception thrown if the specified index doesn't correspond to an existing range. example given a video element with the id "myvideo": var v = document.getelementbyid("myvideo"); var buf = v.buffered; var numranges = buf.length; if (buf.length == 1) { // only one range if (buf.start(0) == 0 && buf.end(0) == v.duration) { // the one range starts at the beginning and ends at // the end of the video, so the whole thing is loaded } } this example looks at the time ranges and looks to see if the entire video has been loaded. ...
TimeRanges - Web APIs
you reference each time range by using the start() and end() methods, passing the index number of the time range you want to retrieve. ...
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
offset. syntax touchitem.clientx; return value a long representing the x coordinate of the touch point relative to the viewport, not including any scroll
offset. example this example illustrates using the touch object's touch.clientx and touch.clienty properties. the touch.clientx property is the horizontal coordinate of a touch point relative to the browser's viewport excluding any scroll
offset. the touch.clienty property is the vertical coordinate of the touch point relative to the browser's viewport excluding any scroll
offset . in this example, we assume the user initiates a touch on an element with an id of source, moves within the element or out of th...
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
offset. syntax touchitem.clienty; return value a long value representing the y coordinate of the touch point relative to the viewport, not including any scroll
offset. example this example illustrates using the touch object's touch.clientx and touch.clienty properties. the touch.clientx property is the horizontal coordinate of a touch point relative to the browser's viewport excluding any scroll
offset. the touch.clienty property is the vertical coordinate of the touch point relative to the browser's viewport excluding any scroll
offset . in this example, we assume the user initiates a touch on an element with an id of source, moves within the elem...
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
offset. syntax touchitem.pagex; return value a long representing the x coordinate of the touch point relative to the viewport, including any scroll
offset. example this example illustrates how to access the touch object's touch.pagex and touch.pagey properties. the touch.pagex property is the horizontal coordinate of a touch point relative to the viewport (in css pixels), including any scroll
offset. the touch.pagey property is the vertical coordinate of a touch point relative to the viewport (in css pixels), including any scroll
offset. in following simple code snippet, we assume the user initiates one or more touch contacts on the source element, moves the touch...
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
offset. syntax touchitem.pagey; return value a long value that representes the y coordinate of the touch point relative to the viewport, including any scroll
offset. example this example illustrates how to access the touch object's touch.pagex and touch.pagey properties. the touch.pagex property is the horizontal coordinate of a touch point relative to the viewport (in css pixels), including any scroll
offset. the touch.pagey property is the vertical coordinate of a touch point relative to the viewport (in css pixels), including any scroll
offset. in following simple code snippet, we assume the user initiates one or more touch contacts on the source element, moves...
Touch.screenX - Web APIs
example this example illustrates how to access the touch object's touch.screenx and touch.screeny properties. the touch.screenx property is the horizontal (x) coordinate of a touch point relative to the screen in css pixels. the touch.screeny property is the vertical coordinate of a touch point relative to the screen in css pixels. ...
UIEvent.pageX - Web APIs
n any non-mouse events. do not look for pagex on any non-mouse events in new code and update existing code as soon as possible. syntax var pos = event.pagex value an integer value, in pixels, indicating the x coordinate at which the mouse pointer was located when the event occurred. this value is relative to the left edge of the entire document, regardless of the current horizontal scrolling
offset of the document. examples for an example, see the documentation for the standard mouseevent.pagex property, which you should use instead. specifications this property is not part of any specification. see mouseevent.pagex instead. ...
VTTRegion - Web APIs
cue onto. constructor vttregion() returns a newly created vttregion object. properties vttregion.id a domstring that identifies the region. vttregion.width a double representing the width of the region, as a percentage of the video. vttregion.lines a double representing the height of the region, in number of lines. vttregion.regionanchorx a double representing the region anchor x
offset, as a percentage of the region. vttregion.regionanchory a double representing the region anchor y
offset, as a percentage of the region. vttregion.viewportanchorx a double representing the viewport anchor x
offset, as a percentage of the video. vttregion.viewportanchory a double representing the viewport anchor y
offset, as a percentage of the video. vttregion.scroll an enum representing ...
WEBGL_compressed_texture_pvrtc - Web APIs
devices, this extension is named webkit_webgl_compressed_texture_pvrtc. 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 x
offset and y
offset parameters must be 0). ext.compressed_rgb_pvrtc_4bppv1_img rgb compression in 4-bit mode. one block for each 4×4 pixels. ext.compressed_rgba_pvrtc_4bppv1_img rgba compression in 4-bit mode. one block for each 4×4 pixels. ext.compressed_rgb_pvrtc_2bppv1_img rgb compression in 2-bit mode. one block for each 8×4 pixels. ext.compressed_rgba_pvrtc_2bppv1_img rgba compression i...
WebGL2RenderingContext.bindBufferRange() - Web APIs
the webgl2renderingcontext.bindbufferrange() method of the webgl 2 api binds a range of a given webglbuffer to a given binding point (target) at a given index. syntax void gl.bindbufferrange(target, index, buffer,
offset, size); parameters target a glenum specifying the target for the bind operation. possible values: gl.transform_feedback_buffer gl.uniform_buffer index a gluint specifying the index of the target. buffer a webglbuffer which to bind to the binding point (target).
offset a glintptr specifying the starting
offset. size a glsizeiptr specifying the amount of data that can be read from the buffer. return value none. examples gl.bindbufferrange(gl.transform_feedback_buffer, 1, buffer, 0, 4); specifications specification status c...
WebGLRenderingContext.disable() - Web APIs
glrenderingcontext.blendfunc(). gl.cull_face deactivates culling of polygons. see webglrenderingcontext.cullface(). gl.depth_test deactivates depth comparisons and updates to the depth buffer. see webglrenderingcontext.depthfunc(). gl.dither deactivates dithering of color components before they get written to the color buffer. gl.polygon_
offset_fill deactivates adding an
offset to depth values of polygon's fragments. see webglrenderingcontext.polygon
offset(). gl.sample_alpha_to_coverage deactivates the computation of a temporary coverage value determined by the alpha value. gl.sample_coverage deactivates anding the fragment's coverage with the temporary coverage value. see webglrenderingcontext.sample...
WebGLRenderingContext.enable() - Web APIs
ee webglrenderingcontext.blendfunc(). gl.cull_face activates culling of polygons. see webglrenderingcontext.cullface(). gl.depth_test activates depth comparisons and updates to the depth buffer. see webglrenderingcontext.depthfunc(). gl.dither activates dithering of color components before they get written to the color buffer. gl.polygon_
offset_fill activates adding an
offset to depth values of polygon's fragments. see webglrenderingcontext.polygon
offset(). gl.sample_alpha_to_coverage activates the computation of a temporary coverage value determined by the alpha value. gl.sample_coverage activates anding the fragment's coverage with the temporary coverage value. see webglrenderingcontext.samplecovera...
WebGLRenderingContext.isEnabled() - Web APIs
puted fragment color values. see webglrenderingcontext.blendfunc(). gl.cull_face culling of polygons. see webglrenderingcontext.cullface(). gl.depth_test depth comparisons and updates to the depth buffer. see webglrenderingcontext.depthfunc(). gl.dither dithering of color components before they get written to the color buffer. gl.polygon_
offset_fill adding an
offset to depth values of polygon's fragments. see webglrenderingcontext.polygon
offset(). gl.sample_alpha_to_coverage computation of a temporary coverage value determined by the alpha value. gl.sample_coverage anding the fragment's coverage with the temporary coverage value. see webglrenderingcontext.samplecoverage(). gl.scissor_test ...
Raining rectangles - Web APIs
any 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. // in addition we need to remember that vertical position in // webgl increases from bottom to top, unlike in the browser // window. var position = [ evt.pagex - evt.target.
offsetleft, gl.drawingbufferheight - (evt.pagey - evt.target.
offsettop), ]; // if the click falls inside the rectangle, we caught it. // increment score and create a new rectangle. var diffpos = [ position[0] - rainingrect.position[0], position[1] - rainingrect.position[1] ]; if ( diffpos[0] >= 0 && diffpos[0] < rainingrect.size[0] && diffpos[1] >= 0 && diffpos[1] < raining...
Using textures in WebGL - Web APIs
rst, the code to specify the colors buffer is gone, replaced with this: // tell webgl how to pull out the texture coordinates from buffer { const num = 2; // every coordinate composed of 2 values const type = gl.float; // the data in the buffer is 32 bit float const normalize = false; // don't normalize const stride = 0; // how many bytes to get from one set to the next const
offset = 0; // how many bytes inside the buffer to start from gl.bindbuffer(gl.array_buffer, buffers.texturecoord); gl.vertexattribpointer(programinfo.attriblocations.texturecoord, num, type, normalize, stride,
offset); gl.enablevertexattribarray(programinfo.attriblocations.texturecoord); } then add code to specify the texture to map onto the faces, just before draw: // tell webgl we wa...
WebGL best practices - Web APIs
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, srcbyte
offset, dstbuffer, /* optional */ dst
offset, /* 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(target, buffer); gl.getbuffersubdata(target, srcbyte
offset, dstbuffer, dst
offset, length); gl.bindbuffer(target, null); return dest; } async function readpixelsasyn...
Writing a WebSocket server in Java - Web APIs
or a connection..."); socket client = server.accept(); system.out.println("a client connected."); socket methods: java.net.socket getinputstream() returns an input stream for this socket. java.net.socket getoutputstream() returns an output stream for this socket. outputstream methods: write(byte[] b, int off, int len) writes len bytes from the specified byte array starting at
offset off to this output stream. inputstream methods: read(byte[] b, int off, int len) reads up to len bytes of data from the input stream into an array of bytes. let us extend our example. inputstream in = client.getinputstream(); outputstream out = client.getoutputstream(); scanner s = new scanner(in, "utf-8"); handshaking when a client connects to a server, it sends a get request t...
Visualizations with Web Audio API - Web APIs
ough each value in the dataarray. for each one, we make the barheight equal to the array value, set a fill colour based on the barheight (taller bars are brighter), and draw a bar at x pixels across the canvas, which is barwidth wide and barheight/2 tall (we eventually decided to cut each bar in half so they would all fit on the canvas better.) the one value that needs explaining is the vertical
offset position we are drawing each bar at: height-barheight/2. i am doing this because i want each bar to stick up from the bottom of the canvas, not down from the top, as it would if we set the vertical position to 0. therefore, we instead set the vertical position each time to the height of the canvas minus barheight/2, so therefore each bar will be drawn from partway down the canvas, down to the bot...
Web Audio API - Web APIs
the keyboard allows you to switch among the standard waveforms as well as one custom waveform, and you can control the master gain using a volume slider beneath the keyboard. this example makes use of the following web api interfaces: audiocontext,...
Window.open() - Web APIs
work area for applications of the user's operating system to the topmost border (resizing handle) of the browser window. the new window cannot be initially positioned offscreen. if the windowfeatures parameter is non-empty and if no position features are defined, then the left and top coordinates of the new window dimension will be 22 pixels from where the most recently rendered window was. an
offset 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
offset: the new window will be maximized as well. size if only one of them is specified, the behavior is implementation-dependent, and web author should not rely o...
Sending and Receiving Binary Data - Web APIs
} the magic happens in line 5, which overrides the mime type, forcing the browser to treat it as plain text, using a user-defined character set. this tells the browser not to parse it, and to let the bytes pass through unprocessed. var filestream = load_binary_resource(url); var abyte = filestream.charcodeat(x) & 0xff; // throw away high-order byte (f7) the example above fetches the byte at
offset x within the loaded binary data. the valid range for x is from 0 to filestream.length-1. see downloading binary streams with xmlhttprequest for a detailed explanation. see also downloading files. sending binary data the send method of the xmlhttprequest has been extended to enable easy transmission of binary data by accepting an arraybuffer, blob, or file object. the following example creates...
XRBoundedReferenceSpace.boundsGeometry - Web APIs
e which the viewer is required to remain. each point must be at floor level, with its y coordinate's value set to 0. additionally, the value of w is always 1 in every point in the array. additionally, the points must be listed in clockwise order. 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
offset. in other words, the bounds are the physical limitations of the available space, shifted so that the reference space's bounds points are all defined relative to the xrboundedreferencespace's effective origiin. usage notes bounded reference spaces always have their origin located at ground level, where y is 0. as a general rule, with the origin for x and z located in or near the center of the sp...
XRPermissionDescriptor.optionalFeatures - Web APIs
viewer a tracking space whose native origin tracks the viewer's position and orientation. this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions. it's particularly useful when determining the distance between the viewer and an input, or when working with
offset spaces. otherwise, typically, one of the other reference space types will be used more often. 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": ...
XRPermissionDescriptor.requiredFeatures - Web APIs
viewer a tracking space whose native origin tracks the viewer's position and orientation. this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions. it's particularly useful when determining the distance between the viewer and an input, or when working with
offset spaces. otherwise, typically, one of the other reference space types will be used more often. xrreferencespace usage notes examples in this example, permissions are checked to ensure that the user has granted permission for the site or app to use immersive augmented reality mode with the local-floor reference space (presumably since the user is unlikely to start to fly). let xrpermi...
XRPermissionStatus.granted - Web APIs
viewer a tracking space whose native origin tracks the viewer's position and orientation. this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions. it's particularly useful when determining the distance between the viewer and an input, or when working with
offset spaces. otherwise, typically, one of the other reference space types will be used more often. xrreferencespace usage notes examples specifications specification status comment webxr device apithe definition of 'xrpermissionstatus.granted' in that specification. working draft initial definition. ...
XRPose.emulatedPosition - Web APIs
l as laterally—six degree of freedom (6dof) devices—don't require any information from other sources to determine the user's position, so the value of emulatedposition is false. the same notion applies not just to the user's head, but to any object. a hand controller that can directly report its position would have a value of false for this property as well. if its position is computed as an
offset 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
offset drifting relative to the real world space over time. this is because emulating a position based on accelerometer inputs and models tends to introduce minor errors which accumulate over ti...
XRReferenceSpace: reset event - Web APIs
viewer (rather than the user's physical movements being used by the xr device to introduce movement). however, if that kind of "teleportation" is being used, you actually want to avoid jumping the user's position after tracking recovery, this can introduce additional and potentially jarring jumping. instead of allowing this to happen, you can integrate the emulatedposition into the teleportation
offset calculated prior to calling get
offsetreferencespace() to create a new reference space whose updated effective origin is adjusted by the distance the viewer's position jumped since the previous frame. this way, the user's position only changes once rather than twice. the effect of discontinuity size the reset event won't be fired when the discontinuity is small enough that the device is able to ...
XRReferenceSpaceType - Web APIs
viewer a tracking space whose native origin tracks the viewer's position and orientation. this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions. it's particularly useful when determining the distance between the viewer and an input, or when working with
offset spaces. otherwise, typically, one of the other reference space types will be used more often. xrreferencespace specifications specification status comment webxr device apithe definition of 'xrreferencespacetype' in that specification. working draft initial definition. ...
XRRigidTransform.matrix - Web APIs
the matrix is then passed into a library function that uses webgl to render an object matching a given name using the transform matrix specified to position and orient it. let transform = new xrrigidtransform( {x: 0, y: 0.5, z: 0.5}, {x: 0, y: -0.5, z: -0.5, w: 1}); drawglobject("magic-lamp", transform.matrix); specifications ...
XRRigidTransform.orientation - Web APIs
t orientation = xrrigidtransform.orientation; value a dompointreadonly object which contains a unit quaternion providing the orientation component of the transform. as a unit quaternion, the length of the returned quaternion is always 1.0 meters. examples to create a reference space which is oriented to look straight up, positioned 2 meters off of ground level: xrreferencespace = refspace.get
offsetreferencespace( new xrrigidtransform({y: -2}, {x: 0.0, y: 1.0, z: 0.0, w: 1.0}); ); the unit quaternion specified here is [0.0, 1.0, 0.0, 1.0] to indicate that the object should be facing directly along the y axis. specifications specification status comment webxr device apithe definition of 'xrrigidtransform.orientation' in that specification. working draft ...
XRSession.requestAnimationFrame() - Web APIs
y. syntax requestid = xrsession.requestanimationframe(animationframecallback); parameters animationframecallback a function which is called before the next repaint in order to allow you to update and render the xr scene based on elapsed time, animation, user input changes, and so forth. the callback receives as input two parameters: time a domhighrestimestamp indicating the time
offset at which the updated viewer state was received from the webxr device. xrframe an xrframe object describing the state of the objects being tracked by the session. this can be used to obtain the poses of the viewer and the scene itself, as well as other information needed to render a frame of an ar or vr scene. return value an integer value which serves as a unique, non-zero id or handle...
XRSession.requestReferenceSpace() - Web APIs
viewer a tracking space whose native origin tracks the viewer's position and orientation. this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions. it's particularly useful when determining the distance between the viewer and an input, or when working with
offset spaces. otherwise, typically, one of the other reference space types will be used more often. xrreferencespace return value a promise that resolves with an xrreferencespace object. exceptions rather than throwing true exceptions, requestreferencespace() rejects the returned promise with a domexception whose name is found in the list below: notsupportederror the requested referen...
XRViewport - Web APIs
the webxr device api's xrviewport interface provides properties used to describe the size and position of the current viewport within the xrwebgllayer being used to render the 3d scene. properties height read only the height, in pixels, of the viewport. width read only the width, in pixels, of the viewport. x read only the
offset from the origin of the destination graphics surface (typically a xrwebgllayer) to the left edge of the viewport, in pixels. y read only the
offset 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. usage notes currently, the only type of surface available is the xrwebgllayer. the precise orientation of the coordinate system may vary with other surface ...
Web APIs
ormatrixelement svgfecomponenttransferelement svgfecompositeelement svgfeconvolvematrixelement svgfediffuselightingelement svgfedisplacementmapelement svgfedistantlightelement svgfedropshadowelement svgfefloodelement svgfefuncaelement svgfefuncbelement svgfefuncgelement svgfefuncrelement svgfegaussianblurelement svgfeimageelement svgfemergeelement svgfemergenodeelement svgfemorphologyelement svgfe
offsetelement svgfepointlightelement svgfespecularlightingelement svgfespotlightelement svgfetileelement svgfeturbulenceelement svgfilterelement svgfilterprimitivestandardattributes svgfontelement svgfontfaceelement svgfontfaceformatelement svgfontfacenameelement svgfontfacesrcelement svgfontfaceurielement svgforeignobjectelement svggelement svggeometryelement svgglyphelement svgglyphrefel...
Web Accessibility: Understanding Colors and Luminance - Accessibility
ative luminance calculation. calculate relative luminance analyze luminosity contrast ratio some notes: luma and luminance are not the same. from iec 61966-2-2:2003(en), "video systems approximate the lightness response of vision by computing a luma component y′ as a weighted sum of nonlinear r′g′b′ primary components: each rgb signal is, comparable to the 1/3 power function with an
offset defined by l*. luma is often incorrectly referred to as luminance." luminosity and luminance are not the same, but sometimes, in the hsl color spectrum, they are sometimes used interchangably. sometimes the "l" in hsl stands for luminance, and sometimes, for luminosity -- and also, has been referred to as "lightness" luminance and brightness are not the same. brightness is a perception. lumi...
-moz-image-region - CSS: Cascading Style Sheets
roperty. all four values are relative to the upper left corner of the image. note: for a system that works on any background, see -moz-image-rect(). syntax values auto automatically defines the region of the image to use. <shape> a shape defining the part of the image to use. the rect() function defines a rectangle to use as shape. its parameters define the top, right, bottom, and left
offsets of the edges of the image, in this order. formal definition initial valueautoapplies toxul <image> elements and :-moz-tree-image, :-moz-tree-twisty, and :-moz-tree-checkbox pseudo-elements. note: -moz-image-region only works with <image> elements where the icon is specified using list-style-image. it will not work with xul <image src="url" />.inheritedyescomputed valueas specifiedanimation ty...
-webkit-box-reflect - CSS: Cascading Style Sheets
the -webkit-box-reflect css property lets you reflect the content of an element in one specific direction. /* direction values */ -webkit-box-reflect: above; -webkit-box-reflect: below; -webkit-box-reflect: left; -webkit-box-reflect: right; /*
offset 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: unset; note: this feature is not intended to be used by web sites. to achieve reflection on the web, the standard way is to use the css element() function. syntax values above, below, right, left are keywords indicating in which direction the reflection is to happen. <length> indicates the size of the r...
:nth-child() - CSS: Cascading Style Sheets
rd values odd represents elements whose numeric position in a series of siblings is odd: 1, 3, 5, etc. even represents elements whose numeric position in a series of siblings is even: 2, 4, 6, etc. functional notation <an+b> represents elements in a list whose indices match those found in a custom pattern of numbers, defined by an+b, where: a is an integer step size, b is an integer
offset, n is all positive integers, starting from 0. it can be read as the an+bth element of a list. formal syntax :nth-child( <nth> [ of <complex-selector-list> ]? )where <nth> = <an-plus-b> | even | odd<complex-selector-list> = <complex-selector>#where <complex-selector> = <compound-selector> [ <combinator>? <compound-selector> ]*where <compound-selector> = [ <type-selector>? <subclass-selector>*...
CSS Basic User Interface - CSS: Cascading Style Sheets
css basic user interface is a css module that lets you define the rendering and functionality of features related to the user interface. reference properties appearance box-sizing cursor ime-mode nav-down nav-left nav-right nav-up outline outline-width outline-style outline-color outline-
offset resize text-overflow user-select guides using url values for the cursor property explains how a url can be used with the cursor property to produce custom cursors. specifications specification status comment css basic user interface module level 4 working draft css basic user interface module level 3 recommendation css level 2 (revision 1) recommendation initial definition. ...
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
writing modes in css. this means that if you are working in a right to left language, such as arabic, the start of the grid would be the top and right, so the default of justify-content: start would be for grid tracks to start on the right hand side of the grid. setting auto margins, using margin-right or margin-left however, or absolutely positioning items using the top, right, bottom and left
offsets would not honor writing modes. in the next guide, we will look further into this interaction between css grid layout, box alignment and writing modes. this will be important to understand, if you develop sites that are then displayed in multiple languages, or if you want to mix languages or writing modes in a design. ...
CSS Logical Properties and Values - CSS: Cascading Style Sheets
nd inline-start keywords) inset inset-block inset-block-end inset-block-start inset-inline inset-inline-end inset-inline-start other properties caption-side (inline-end and inline-start keywords) overflow-block overflow-inline overscroll-behavior-block overscroll-behavior-inline resize (block and inline keywords) text-align (end and start keywords) deprecated properties
offset-block-end (now inset-block-end )
offset-block-start (now inset-block-start )
offset-inline-end (now inset-inline-end )
offset-inline-start (now inset-inline-start ) guides basic concepts of logical properties and values logical properties for sizing logical properties for margins, borders and padding logical properties for floating and positioning specifications ...
CSS Properties Reference - CSS: Cascading Style Sheets
ntop overflow overflow padding padding padding-bottom paddingbottom padding-left paddingleft padding-right paddingright padding-top paddingtop page-break-after pagebreakafter page-break-before pagebreakbefore position position stroke-dasharray strokedasharray stroke-dash
offset strokedash
offset stroke-width strokewidth text-align textalign text-decoration textdecoration text-indent textindent text-transform texttransform top top vertical-align verticalalign visibility visibility width width z-index zindex ...
Overview of CSS Shapes - CSS: Cascading Style Sheets
ontent flowing around the sides of a rectangular box as before. if they do have shapes support then the visual display is enhanced. basic shapes the value circle(50%) is an example of a basic shape. the specification defines four <basic-shape> values, which are: inset() circle() ellipse() polygon() using the value inset() wraps text around a rectangular shape however you are able to add
offset values, thus pulling the line boxes of any wrapping content closer to the object than would otherwise happen. we have already seen how circle() creates a circular shape. an ellipse() is essentially a squashed circle. if none of these simple shapes do the trick you can create a polygon() and make the shape as complex as you want. in our guide to basic shapes we explore each of the possible basic...
CSS Text Decoration - CSS: Cascading Style Sheets
css text decoration is a module of css that defines features relating to text decoration, such as underlines, text shadows, and emphasis marks. reference properties letter-spacing text-align text-decoration text-decoration-color text-decoration-line text-decoration-
offset text-decoration-skip-ink text-decoration-style text-decoration-thickness text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-indent text-rendering text-shadow text-transform white-space word-spacing guides none. examples .under { text-decoration: underline red; } .over { text-decoration: wavy overline lime; } .line { text-decoration: line-through; } .plain { text-decoration: none; } .underover { text-decoration: dashed underline overline; } .thick { t...
Mozilla CSS extensions - CSS: Cascading Style Sheets
ill 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-outlineobsolete since gecko 1.9.2 -moz-outline-colorobsolete since gecko 1.9.2 -moz-outline-
offsetobsolete 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] p...
animation-delay - CSS: Cascading Style Sheets
ctive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. 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
offset, from the moment at which the animation is applied to the element, at which the animation should begin. this may be specified in either seconds (s) or milliseconds (ms). the unit is required. a positive value indicates that the animation should begin after the specified amount of time has elapsed. a value of 0s, which is the default, indicates that the animation should begin as soon as it's appl...
border-image-slice - CSS: Cascading Style Sheets
creates a slice measured from the top, the second creates slices measured from the left and right, the third creates a slice measured from the bottom. when four positions are specified, they create slices measured from the top, right, bottom, and left in that order (clockwise). the optional fill value, if used, can be placed anywhere in the declaration. values <number> represents an edge
offset in pixels for raster images and coordinates for vector images. for vector images, the number is relative to the element's size, not the size of the source image, so percentages are generally preferable in these cases. <percentage> represents an edge
offset as a percentage of the source image's size: the width of the image for horizontal
offsets, the height for vertical
offsets. fill preserves...
border-image-width - CSS: Cascading Style Sheets
e specified, the first width applies to the top, the second to the left and right, the third to the bottom. when four values are specified, the widths apply to the top, right, bottom, and left in that order (clockwise). values <length-percentage> the width of the border, specified as a <length> or a <percentage>. percentages are relative to the width of the border image area for horizontal
offsets and the height of the border image area for vertical
offsets. must not be negative. <number> the width of the border, specified as a multiple of the corresponding border-width. must not be negative. auto the width of the border is made equal to the intrinsic width or height (whichever is applicable) of the corresponding border-image-slice. if the image does not have the required intrinsic di...
border - CSS: Cascading Style Sheets
candidate recommendation removes specific support for transparent, as it is now a valid <color>; this has no practical impact. though it cannot be set to a custom value using the shorthand, border now r...
clip - CSS: Cascading Style Sheets
/ clip: auto; /* <shape> values */ clip: rect(1px 10em 3rem 2ch); clip: rect(1px, 10em, 3rem, 2ch); /* global values */ clip: inherit; clip: initial; clip: unset; syntax note: where possible, authors are encouraged to use the newer clip-path property instead. values <<shape>()> a rectangular <<shape>()> of the form rect(<top> <right> <bottom> <left>). the <top> and <bottom> values are
offsets from the inside top border edge of the box, while <right> and <left> are
offsets from the inside left border edge of the box — that is, the extent of the padding box. the <top>, <right>, <bottom>, and <left> values may be either a <length> or auto. if any side's value is auto, the element is clipped to that side's inside border edge. auto the element does not clip (default). this is differe...
justify-items - CSS: Cascading Style Sheets
e examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the effect of this property is dependent of the layout mode we are in: in block-level layouts, it aligns the items inside their containing block on the inline axis. for absolutely-positioned elements, it aligns the items inside their containing block on the inline axis, accounting for the
offset values of top, left, bottom, and right. in table cell layouts, this property is ignored (more about alignment in block, absolute positioned and table layout) in flexbox layouts, this property is ignored (more about alignment in flexbox) in grid layouts, it aligns the items inside their grid areas on the inline axis (more about alignment in grid layouts) syntax /* basic keywords */ justify-i...
justify-self - CSS: Cascading Style Sheets
teractive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the effect of this property is dependent of the layout mode we are in: in block-level layouts, it aligns an item inside its containing block on the inline axis. for absolutely-positioned elements, it aligns an item inside its containing block on the inline axis, accounting for the
offset values of top, left, bottom, and right. in table cell layouts, this property is ignored (more about alignment in block, absolute positioned and table layout) in flexbox layouts, this property is ignored (more about alignment in flexbox) in grid layouts, it aligns an item inside its grid area on the inline axis (more about alignment in grid layouts) syntax /* basic keywords */ justify-self: ...
mask-border-slice - CSS: Cascading Style Sheets
creates a slice measured from the top, the second creates slices measured from the left and right, the third creates a slice measured from the bottom. when four positions are specified, they create slices measured from the top, right, bottom, and left in that order (clockwise). the optional fill value, if used, can be placed anywhere in the declaration. values <number> represents an edge
offset in pixels for raster images and coordinates for vector images. for vector images, the number is relative to the element's size, not the size of the source image, so percentages are generally preferable in these cases. <percentage> represents an edge
offset as a percentage of the source image's size: the width of the image for horizontal
offsets, the height for vertical
offsets. fill preserves...
mask-border-width - CSS: Cascading Style Sheets
re specified, the first width applies to the top, the second to the left and right, the third to the bottom. when four values are specified, the widths apply to the top, right, bottom, and left in that order (clockwise). values <length-percentage> the width of the mask border, specified as a <length> or a <percentage>. percentages are relative to the width of the border area for horizontal
offsets and the height of the border area for vertical
offsets. must not be negative. <number> the width of the mask border, specified as a multiple of the corresponding border-width. must not be negative. auto the width of the mask border is made equal to the intrinsic width or height (whichever is applicable) of the corresponding mask-border-slice. if the image does not have the required intrinsic...
mask - CSS: Cascading Style Sheets
shorthand:mask-position: refer to size of mask painting area minus size of mask layer image (see the text for background-position)computed valueas each of the properties of the shorthand:mask-image: as specified, but with <url> values made absolutemask-mode: as specifiedmask-repeat: consists of two keywords, one per dimensionmask-position: consists of two keywords representing the origin and two
offsets from that origin, each given as an absolute length (if given a <length>), otherwise as a percentage.mask-clip: as specifiedmask-origin: as specifiedmask-size: as specified, but with relative lengths converted into absolute lengthsmask-composite: as specifiedanimation typeas each of the properties of the shorthand:mask-image: discretemask-mode: discretemask-repeat: discretemask-position: repeatab...
object-position - CSS: Cascading Style Sheets
ples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax /* <position> values */ object-position: center top; object-position: 100px 50px; /* global values */ object-position: inherit; object-position: initial; object-position: unset; values <position> from one to four values that define the 2d position of the element. relative or absolute
offsets can be used. note: the position can be set so that the replaced element is drawn outside its box. formal definition initial value50% 50%applies toreplaced elementsinheritedyespercentagesrefer to width and height of element itselfcomputed valueas specifiedanimation typerepeatable list of simple list of length, percentage, or calc formal syntax <position>where <position> = [ [ left | cente...
overflow - CSS: Cascading Style Sheets
same value. values visible content is not clipped and may be rendered outside the padding box. hidden content is clipped if necessary to fit the padding box. no scrollbars are provided, and no support for allowing the user to scroll (such as by dragging or using a scroll wheel) is allowed. the content can be scrolled programmatically (for example, by setting the value of a property such as
offsetleft), so the element is still a scroll container. clip like for hidden, the content is clipped to the element's padding box. the difference between clip and hidden is that the clip keyword also forbids all scrolling, including programmatic scrolling. the box is not a scroll container, and does not start a new formatting context. if you wish to start a new formatting context, you can use displ...
repeating-conic-gradient() - CSS: Cascading Style Sheets
nic-gradient.html")}} the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax /* starburst: a a blue on blue starburst: the gradient is a starburst of lighter and darker blue, centered in the upper left quandrant,
offset by 3degrees so there is no up/down straight line */ background: repeating-conic-gradient( from 3deg at 25% 25%, hsl(200, 100%, 50%) 0deg 15deg, hsl(200, 100%, 60%) 10deg 30deg); ); values <angle> preceded by the from keyterm, and taking an angle as its value, defines the gradient rotation in clockwise direction. <position> using the same length, order and keyterm values as the ...
scroll-snap-coordinate - CSS: Cascading Style Sheets
oordinates */ /* global values */ scroll-snap-coordinate: inherit; scroll-snap-coordinate: initial; scroll-snap-coordinate: unset; if the element has been transformed, the snap coordinates are likewise transformed, thus aligning the snap points with the element as it is displayed. syntax values none specifies that the element does not contribute to a snap point. <position> specifies the
offset of the snap coordinates from the start edge of the element’s border box. for each pairing, the first value gives the x coordinate of the snap coordinate, the second value its y coordinate. formal definition initial valuenoneapplies toall elementsinheritednopercentagesrefer to the element’s border boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimat...
scroll-snap-destination - CSS: Cascading Style Sheets
the scroll-snap-destination css property defines the position in x and y coordinates within the scroll container's visual viewport which element snap points align with. /* <position> value */ scroll-snap-destination: 400px 600px; /* global values */ scroll-snap-destination: inherit; scroll-snap-destination: initial; scroll-snap-destination: unset; syntax values <position> specifies the
offset of the snap destination from the start edge of the scroll container’s visual viewport. the first value gives the x coordinate of the snap destination, the second value its y coordinate. formal definition initial value0px 0pxapplies toscroll containersinheritednopercentagesrelative to same axis of the padding-box of the scroll containercomputed valueas specified, but with relative lengths con...
scroll-snap-type-x - CSS: Cascading Style Sheets
et; syntax values none when the visual viewport of this scroll container is scrolled horizontally, it must ignore snap points. mandatory the visual viewport of this scroll container will rest on a snap point if it isn't currently scrolled horizontally. that means it snaps on that point when the scroll action finished, if possible. if content is added, moved, deleted or resized the scroll
offset will be adjusted to maintain the resting on that snap point. proximity the visual viewport of this scroll container may come to rest on a snap point if it isn't currently scrolled horizontally considering the user agent's scroll parameters. if content is added, moved, deleted or resized the scroll
offset may be adjusted to maintain the resting on that snap point. formal definition initial va...
scroll-snap-type-y - CSS: Cascading Style Sheets
unset; syntax values none when the visual viewport of this scroll container is scrolled vertically, it must ignore snap points. mandatory the visual viewport of this scroll container will rest on a snap point if it isn't currently scrolled vertically. that means it snaps on that point when the scroll action finished, if possible. if content is added, moved, deleted or resized the scroll
offset will be adjusted to maintain the resting on that snap point. proximity the visual viewport of this scroll container may come to rest on a snap point if it isn't currently scrolled vertically considering the user agent's scroll parameters. if content is added, moved, deleted or resized the scroll
offset may be adjusted to maintain the resting on that snap point. formal definition initial valu...
scroll-snap-type - CSS: Cascading Style Sheets
. both the scroll container snaps to snap positions in both of its axes independently (potentially snapping to different elements in each axis). mandatory the visual viewport of this scroll container will rest on a snap point if it isn't currently scrolled. that means it snaps on that point when the scroll action finished, if possible. if content is added, moved, deleted or resized the scroll
offset will be adjusted to maintain the resting on that snap point. proximity the visual viewport of this scroll container may come to rest on a snap point if it isn't currently scrolled considering the user agent's scroll parameters. if content is added, moved, deleted or resized the scroll
offset may be adjusted to maintain the resting on that snap point. formal definition initial valuenoneapplie...
url() - CSS: Cascading Style Sheets
ttps://example.com/images/myimg.jpg); url(data:image/png;base64,irxvb0…); url(myfont.woff); url(#idofsvgpath); /* associated properties */ background-image: url("https://mdn.mozillademos.org/files/16761/star.gif"); list-style-image: url('../images/bullet.jpg'); content: url("pdficon.jpg"); cursor: url(mycursor.cur); border-image-source: url(/media/diamonds.png); src: url('fantasticfont.woff');
offset-path: url(#path); mask-image: url("masks.svg#mask1"); /* properties with fallbacks */ cursor: url(pointer.cur), pointer; /* associated short-hand properties */ background: url('https://mdn.mozillademos.org/files/16761/star.gif') bottom right repeat-x blue; border-image: url("/media/diamonds.png") 30 fill / 30px / 30px space; /* as a parameter in another css function */ background-image: cross-...
WAI ARIA Live Regions/API Support - Developer guides
ual 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
offsets and removed text) text inserted text_changed::insert ia2_event_text_inserted (use iaccessibletext::get_newtext to retrieve the
offsets 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...
Video player styling basics - Developer guides
d when the volumechange event is raised: video.addeventlistener('volumechange', function() { checkvolume(); }, false); progress bar a small change also needs to be made to the click handler for the <progress> element. since the enclosing <figure> element now has position:relative set on it, the calculations made by this click handler are incorrect. it now also needs to take into account the
offset position of the parent element: progress.addeventlistener('click', function(e) { var pos = (e.pagex - (this.
offsetleft + this.
offsetparent.
offsetleft)) / this.
offsetwidth; video.currenttime = pos * video.duration; }); fullscreen the fullscreen implemention hasn't changed. responsive styling now that the player has its basic look and feel taken care of, some other styling changes — i...
Creating a cross-browser video player - Developer guides
ack, read media buffering, seeking, and time ranges. skip ahead another feature of most browser default video control sets is the ability to click on the video's progress bar to "skip ahead" to a different point in the video. this can also be achieved by adding a simple click event listener to the progress element: progress.addeventlistener('click', function(e) { var pos = (e.pagex - this.
offsetleft) / this.
offsetwidth; video.currenttime = pos * video.duration; }); this piece of code simply uses the clicked position to (roughly) work out where in the progress element the user has clicked, and to move the video to that position by setting its currenttime attribute. fullscreen the fullscreen api should be straight forward to use: the user clicks a button, if the video is in fullscre...
<col> - HTML: Hypertext Markup Language
o be used. to achieve a similar effect, use the css background-color property. char this attribute is used to set the character to align the cells in a column on. typical values for this include a period (.) when attempting to align numbers or monetary values. if align is not set to char, this attribute is ignored. charoff this attribute is used to indicate the number of characters to
offset the column data from the alignment characters specified by the char attribute. valign this attribute specifies the vertical alignment of the text within each cell of the column. possible values for this attribute are: baseline, which will put the text as close to the bottom of the cell as it is possible, but align it on the baseline of the characters instead of the bottom of them. if char...
<input type="range"> - HTML: Hypertext Markup Language
150px; height: 20px; margin: 0; transform-origin: 75px 75px; transform: rotate(-90deg); } the size of the control is set to be 150 pixels long by 20 pixels tall. the margins are set to 0 and the transform-origin is shifted to the middle of the space the slider rotates through; since the slider is configured to be 150 pixels wide, it rotates through a box which is 150 pixels on each side.
offsetting the origin by 75px on each axis means we will rotate around the center of that space. finally, we rotate counter-clockwise by 90°. the result: a range input which is rotated so the maximum value is at the top and the minimum value is at the bottom. screenshotlive sample appearance property the appearance property has a non-standard value of slider-vertical that, well, makes sliders vertic...
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
ndled. possible values are: left: the content is aligned to the left of the cell. center: the content is centered in the cell. right: the content is aligned to the right of the cell. justify (with text only): the content is stretched out inside the cell so that it covers its entire width. char (with text only): the content is aligned to a character inside the <th> element with minimal
offset. this character is defined by the char and charoff attributes unimplemented (see bug 2212). the default value when this attribute is not specified is left. note: to achieve the same effect as the left, center, right or justify values, apply the css text-align property to the element. to achieve the same effect as the char value, give the text-align property the same value you would u...
<th> - HTML: Hypertext Markup Language
ndled. possible values are: left: the content is aligned to the left of the cell. center: the content is centered in the cell. right: the content is aligned to the right of the cell. justify (with text only): the content is stretched out inside the cell so that it covers its entire width. char (with text only): the content is aligned to a character inside the <th> element with minimal
offset. this character is defined by the char and charoff attributes. the default value when this attribute is not specified is left. note: do not use this attribute as it is obsolete in the latest standard. to achieve the same effect as the left, center, right or justify values, apply the css text-align property to the element. to achieve the same effect as the char value, give the text-al...
<video>: The Video Embed element - HTML: Hypertext Markup Language
), preventing its non-tainted used in <canvas> elements. if invalid, it is handled as if the enumerated keyword anonymous was used. see cors settings attributes for additional information. currenttime reading currenttime returns a double-precision floating-point value indicating the current playback position of the media specified in seconds. if the media has not started playing yet, the time
offset at which it will begin is returned. setting currenttime sets the current playback position to the given time and seeks the media to that position if the media is currently loaded. if the media is being streamed, it's possible that the user agent may not be able to obtain some parts of the resource if that data has expired from the media buffer. other media may have a media timeline that doesn't...
Indexed collections - JavaScript
nd efficiency, javascript typed arrays split the implementation into buffers and views. a buffer (implemented by the arraybuffer object) is an object representing a chunk of data; it has no format to speak of, and offers no mechanism for accessing its contents. in order to access the memory contained in a buffer, you need to use a view. a view provides a context — that is, a data type, starting
offset, and number of elements — that turns the data into an actual typed array. arraybuffer the arraybuffer is a data type that is used to represent a generic, fixed-length binary data buffer. you can't directly manipulate the contents of an arraybuffer; instead, you create a typed array view or a dataview which represents the buffer in a specific format, and use that to read and write the conten...
SyntaxError: a declaration in the head of a for-of loop can't have an initializer - JavaScript
ou might want a for loop that does allow an initializer. examples invalid for-of loop let iterable = [10, 20, 30]; for (let value = 50 of iterable) { console.log(value); } // syntaxerror: a declaration in the head of a for-of loop can't // have an initializer valid for-of loop you need to remove the initializer (value = 50) in the head of the for-of loop. maybe you intended to make 50 an
offset value, in that case you could add it to the loop body, for example. let iterable = [10, 20, 30]; for (let value of iterable) { value += 50; console.log(value); } // 60 // 70 // 80 ...
Array.prototype.indexOf() - JavaScript
active-examples and send us a pull request. syntax arr.indexof(searchelement[, fromindex]) parameters searchelement element to locate in the array. fromindex optional the index to start the search at. if the index is greater than or equal to the array's length, -1 is returned, which means the array will not be searched. if the provided index value is a negative number, it is taken as the
offset from the end of the array. note: if the provided index is negative, the array is still searched from front to back. if the provided index is 0, then the whole array will be searched. default: 0 (entire array is searched). return value the first index of the element in the array; -1 if not found. description indexof() compares searchelement to elements of the array using strict equality (the ...
Array.prototype.lastIndexOf() - JavaScript
tindexof(searchelement[, fromindex]) parameters searchelement element to locate in the array. fromindex optional the index at which to start searching backwards. defaults to the array's length minus one (arr.length - 1), i.e. the whole array will be searched. if the index is greater than or equal to the length of the array, the whole array will be searched. if negative, it is taken as the
offset from the end of the array. note that even when the index is negative, the array is still searched from back to front. if the calculated index is less than 0, -1 is returned, i.e. the array will not be searched. return value the last index of the element in the array; -1 if not found. description lastindexof compares searchelement to elements of the array using strict equality (the same metho...
BigInt64Array - JavaScript
s. see also array.of(). instance properties bigint64array.prototype.buffer returns the arraybuffer referenced by the bigint64array. this is fixed at construction time and thus read only. bigint64array.prototype.bytelength returns the length (in bytes) of the bigint64array from the start of its arraybuffer. this is fixed at construction time and thus read only. bigint64array.prototype.byte
offset returns the
offset (in bytes) of the bigint64array from the start of its arraybuffer. this is fixed at construction time and thus read only. bigint64array.prototype.length returns the number of elements hold in the bigint64array. this is fixed at construction time and thus read only. instance methods bigint64array.prototype.copywithin() copies a sequence of array elements within the arra...
BigUint64Array - JavaScript
e also array.of(). instance properties biguint64array.prototype.buffer returns the arraybuffer referenced by the biguint64array. this is fixed at construction time and thus read only. biguint64array.prototype.bytelength returns the length (in bytes) of the biguint64array from the start of its arraybuffer. this is fixed at construction time and thus read only. biguint64array.prototype.byte
offset returns the
offset (in bytes) of the biguint64array from the start of its arraybuffer. this is fixed at construction time and thus read only. biguint64array.prototype.length returns the number of elements hold in the biguint64array. this is fixed at construction time and thus read only. instance methods biguint64array.prototype.copywithin() copies a sequence of array elements within the ...
DataView.prototype.getInt8() - JavaScript
the getint8() method gets a signed 8-bit integer (byte) at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.getint8(byte
offset) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. return value a signed 8-bit integer number. errors thrown rangeerror thrown if the byte
offset 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
offset. examples using the getint8 method var buffer = new arraybuffer(...
DataView.prototype.getUint8() - JavaScript
the getuint8() method gets an unsigned 8-bit integer (unsigned byte) at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.getuint8(byte
offset) parameters byte
offset the
offset, in byte, from the start of the view where to read the data. return value an unsigned 8-bit integer number. errors thrown rangeerror thrown if the byte
offset 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
offset. examples using the getuint8 method var buffer ...
DataView.prototype.setInt8() - JavaScript
the setint8() method stores a signed 8-bit integer (byte) value at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.setint8(byte
offset, value) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. return value undefined. errors thrown rangeerror thrown if the byte
offset is set such as it would store beyond the end of the view. examples using the setint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint8(1, 3); dataview.g...
DataView.prototype.setUint8() - JavaScript
the setuint8() method stores an unsigned 8-bit integer (byte) value at the specified byte
offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax dataview.setuint8(byte
offset, value) parameters byte
offset the
offset, in byte, from the start of the view where to store the data. value the value to set. return value undefined. errors thrown rangeerror thrown if the byte
offset is set such as it would store beyond the end of the view. examples using the setuint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint8(1, 3); dat...
Date.parse() - JavaScript
a date time string is a simplification of the iso 8601 calendar date extended format. (see the section date time string format in the ecmascript specification for more details.) for example, "2011-10-10" (date-only form), "2011-10-10t14:48:00" (date-time form), or "2011-10-10t14:48:00.000+09:00" (date-time form with milliseconds and time zone) can be passed and will be parsed. when the time zone
offset is absent, date-only forms are interpreted as a utc time and date-time forms are interpreted as local time. while time zone specifiers are used during date string parsing to interpret the argument, the value returned is always the number of milliseconds between january 1, 1970 00:00:00 utc and the point in time represented by the argument or nan. because parse() is a static method of date, it i...
Date.prototype.setMonth() - JavaScript
so, 0 represents january, 11 represents december, -1 represents december of the previous year, and 12 represents january of the following year. dayvalue optional. ...
Date.prototype.toGMTString() - JavaScript
should no longer be used. it remains implemented only for backward compatibility; please use toutcstring() instead. syntax dateobj.togmtstring() return value a string representing the given date following the internet greenwich mean time (gmt) convention. examples simple example in this example, the togmtstring() method converts the date to gmt (utc) using the operating system's time-zone
offset and returns a string value that is similar to the following form. the exact format depends on the platform. var today = new date(); var str = today.togmtstring(); // deprecated! use toutcstring() console.log(str); // mon, 18 dec 1995 17:28:35 gmt specifications specification ecmascript (ecma-262)the definition of 'date.prototype.togmtstring' in that specifica...
Date.prototype.toISOString() - JavaScript
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
Date.prototype.toString() - JavaScript
summarised as: week day: 3 letter english week day name, e.g. "sat" space month name: 3 letter english month name, e.g. "sep" space date: 2 digit day in month, e.g. "01" space year: 4 digit year, e.g. "2018" space hour: 2 digit hour of day, e.g. "14" colon minute: 2 digit minute of hour, e.g. "53" colon second: 2 digit second of minute, e.g. "26" space the string "gmt" timezone
offset sign, either: "+" for positive
offsets (0 or greater) "-" for negative
offsets (less than zero) two digit hour
offset, e.g. "14" two digit minute
offset, e.g. "00" optionally, a timezone name consisting of: space left bracket, i.e. "(" an implementation dependent string representation of the timezone, which might be an abbreviation or full name (there is no standard f...
Float32Array - JavaScript
ble number of arguments. see also array.of(). instance properties float32array.prototype.buffer returns the arraybuffer referenced by the float32array fixed at construction time and thus read only. float32array.prototype.bytelength returns the length (in bytes) of the float32array from the start of its arraybuffer. fixed at construction time and thus read only. float32array.prototype.byte
offset returns the
offset (in bytes) of the float32array from the start of its arraybuffer. fixed at construction time and thus read only. float32array.prototype.length returns the number of elements hold in the float32array. fixed at construction time and thus read only. instance methods float32array.prototype.copywithin() copies a sequence of array elements within the array. see also array.pr...
Float64Array - JavaScript
ble number of arguments. see also array.of(). instance properties float64array.prototype.buffer returns the arraybuffer referenced by the float64array fixed at construction time and thus read only. float64array.prototype.bytelength returns the length (in bytes) of the float64array from the start of its arraybuffer. fixed at construction time and thus read only. float64array.prototype.byte
offset returns the
offset (in bytes) of the float64array from the start of its arraybuffer. fixed at construction time and thus read only. float64array.prototype.length returns the number of elements hold in the float64array. fixed at construction time and thus read only. instance methods float64array.prototype.copywithin() copies a sequence of array elements within the array. see also array.pr...
Int16Array - JavaScript
th a variable number of arguments. see also array.of(). instance properties int16array.prototype.buffer returns the arraybuffer referenced by the int16array fixed at construction time and thus read only. int16array.prototype.bytelength returns the length (in bytes) of the int16array from the start of its arraybuffer. fixed at construction time and thus read only. int16array.prototype.byte
offset returns the
offset (in bytes) of the int16array from the start of its arraybuffer. fixed at construction time and thus read only. int16array.prototype.length returns the number of elements hold in the int16array. fixed at construction time and thus read only. instance methods int16array.prototype.copywithin() copies a sequence of array elements within the array. see also array.prototype.
Int32Array - JavaScript
th a variable number of arguments. see also array.of(). instance properties int32array.prototype.buffer returns the arraybuffer referenced by the int32array fixed at construction time and thus read only. int32array.prototype.bytelength returns the length (in bytes) of the int32array from the start of its arraybuffer. fixed at construction time and thus read only. int32array.prototype.byte
offset returns the
offset (in bytes) of the int32array from the start of its arraybuffer. fixed at construction time and thus read only. int32array.prototype.length returns the number of elements hold in the int32array. fixed at construction time and thus read only. instance methods int32array.prototype.copywithin() copies a sequence of array elements within the array. see also array.prototype.
Int8Array - JavaScript
ay with a variable number of arguments. see also array.of(). instance properties int8array.prototype.buffer returns the arraybuffer referenced by the int8array fixed at construction time and thus read only. int8array.prototype.bytelength returns the length (in bytes) of the int8array from the start of its arraybuffer. fixed at construction time and thus read only. int8array.prototype.byte
offset returns the
offset (in bytes) of the int8array from the start of its arraybuffer. fixed at construction time and thus read only. int8array.prototype.length returns the number of elements hold in the int8array. fixed at construction time and thus read only. instance methods int8array.prototype.copywithin() copies a sequence of array elements within the array. see also array.prototype.copy...
Object.prototype.constructor - JavaScript
{} 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.get
offsetbyinitialposition = function get
offsetbyinitialposition() { let position = this.position let startposition = this.constructor.getstartposition() // error undefined is not a function, since the constructor is child return {
offsetx: startposition.x - position.x,
offsety: startposition.y - position.y } }; for this example we need either to stay parent constructor to continue to wor...
Object.freeze() - JavaScript
comparison to object.seal() objects sealed with object.seal() can have their existing properties changed. existing properties in objects frozen with object.freeze() are made immutable. examples freezing objects var obj = { prop: function() {}, ...
String.prototype.charAt() - JavaScript
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax let character = str.charat(index) parameters index an integer between 0 and str.length - 1. if the index cannot be converted to the integer or no index is provided, the default is 0, so the first character of str is returned. ...
String.prototype.replaceAll() - JavaScript
are as follows: possible name supplied value match the matched substring. (corresponds to $& above.) p1, p2, ... the nth string found by a parenthesized capture group, provided the first argument to replace() was a regexp object. (corresponds to $1, $2, etc. above.) for example, if /(\a+)(\b+)/, was given, p1 is the match for \a+, and p2 for \b+.
offset the
offset of the matched substring within the whole string being examined. (for example, if the whole string was 'abcd', and the matched substring was 'bc', then this argument will be 1.) string 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...
TypedArray.prototype.indexOf() - JavaScript
send us a pull request. syntax typedarray.indexof(searchelement[, fromindex = 0]) parameters searchelement element to locate in the typed array. fromindex the index to start the search at. if the index is greater than or equal to the typed array's length, -1 is returned, which means the typed array will not be searched. if the provided index value is a negative number, it is taken as the
offset from the end of the typed array. note: if the provided index is negative, the typed array is still searched from front to back. if the calculated index is less than 0, then the whole typed array will be searched. default: 0 (entire typed array is searched). return value the first index of the element in the array; -1 if not found. description indexof compares searchelement to elements of the...
TypedArray.prototype.lastIndexOf() - JavaScript
, fromindex = typedarray.length]) parameters searchelement element to locate in the typed array. fromindex optional. the index at which to start searching backwards. defaults to the typed array's length, i.e. the whole typed array will be searched. if the index is greater than or equal to the length of the typed array, the whole typed array will be searched. if negative, it is taken as the
offset from the end of the typed array. note that even when the index is negative, the typed array is still searched from back to front. if the calculated index is less than 0, -1 is returned, i.e. the typed array will not be searched. return value the last index of the element in the array; -1 if not found. description lastindexof compares searchelement to elements of the typed array using strict ...
TypedArray.prototype.subarray() - JavaScript
the subarray() method returns a new typedarray on the same arraybuffer store and with the same element types as for this typedarray object. the begin
offset is inclusive and the end
offset is exclusive. typedarray is one of the typed array types. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax typedarray.subarray([begin [,end]]) parameters begin optional element to begin at. the
offset is inclusive. the whole array will be included in the new view if this value is not specified. end optional element to end at. the
offset is exclusive. if not specified, all elements from the one specified by begin to th...
Uint16Array - JavaScript
variable number of arguments. see also array.of(). instance properties uint16array.prototype.buffer returns the arraybuffer referenced by the uint16array fixed at construction time and thus read only. uint16array.prototype.bytelength returns the length (in bytes) of the uint16array from the start of its arraybuffer. fixed at construction time and thus read only. uint16array.prototype.byte
offset returns the
offset (in bytes) of the uint16array from the start of its arraybuffer. fixed at construction time and thus read only. uint16array.prototype.length returns the number of elements hold in the uint16array. fixed at construction time and thus read only. instance methods uint16array.prototype.copywithin() copies a sequence of array elements within the array. see also array.protot...
Uint32Array - JavaScript
variable number of arguments. see also array.of(). instance properties uint32array.prototype.buffer returns the arraybuffer referenced by the uint32array fixed at construction time and thus read only. uint32array.prototype.bytelength returns the length (in bytes) of the uint32array from the start of its arraybuffer. fixed at construction time and thus read only. uint32array.prototype.byte
offset returns the
offset (in bytes) of the uint32array from the start of its arraybuffer. fixed at construction time and thus read only. uint32array.prototype.length returns the number of elements hold in the uint32array. fixed at construction time and thus read only. instance methods uint32array.prototype.copywithin() copies a sequence of array elements within the array. see also array.protot...
Uint8Array - JavaScript
.of() creates a new uint8array with a variable number of arguments. see also array.of(). instance properties uint8array.prototype.buffer returns the arraybuffer referenced by the uint8array fixed at construction time and thus read only. uint8array.prototype.bytelength returns the length (in bytes) of the uint8array. fixed at construction time and thus read only. uint8array.prototype.byte
offset returns the
offset (in bytes) of the uint8array from the start of its arraybuffer. fixed at construction time and thus read only. uint8array.prototype.length returns the number of elements held in the uint8array. fixed at construction time and thus read only. instance methods uint8array.prototype.copywithin() copies a sequence of array elements within the array. see also array.prototype.
Uint8ClampedArray - JavaScript
see also array.of(). instance properties uint8clampedarray.prototype.buffer returns the arraybuffer referenced by the uint8clampedarray fixed at construction time and thus read only. uint8clampedarray.prototype.bytelength returns the length (in bytes) of the uint8clampedarray from the start of its arraybuffer. fixed at construction time and thus read only. uint8clampedarray.prototype.byte
offset returns the
offset (in bytes) of the uint8clampedarray from the start of its arraybuffer. fixed at construction time and thus read only. uint8clampedarray.prototype.length returns the number of elements hold in the uintclamped8array. fixed at construction time and thus read only. instance methods uint8clampedarray.prototype.copywithin() copies a sequence of array elements within the arra...
MathML attribute reference - MathML
subscript below the baseline of the expression. supscriptshift <mmultiscripts>, <msup>, <msubsup> the minimum space by which to shift the superscript above the baseline of the expression. symmetric <mo> if stretchy is true, this attribute specifies whether the operator should be vertically symmetric around the imaginary math axis (centered fraction line). v
offset <mpadded> sets the vertical position of the child content. width <mglyph>, <mpadded>, <mspace>, <mtable> specifies the desired width. see lengths for possible values. xlink:href all can be used to set a hyperlink to a specfied uri. however, authors are encouraged to use the href attribute instead. xmlns <math> specifies the uri for the mathml n...
<mstyle> - MathML
ies the multiplier to be used to adjust font size due to changes in scriptlevel. the default value is 0.71. the <mstyle> element accepts all attributes of all presentation elements with the following exceptions: height, depth or width do not apply to <mglyph>, <mpadded> or <mtable>. rowalign, columnalign, or groupalign do not apply to <mtr>, <mlabeledtr>, <mtd> or <maligngroup>. lspace or v
offset do not apply to <mpadded>. fontfamily does not apply to <mglyph>. align does not apply to <mtable> or <mstack>. index cannot be set on <mstyle>. src and alt on <mglyph> cannot be set on <mstyle>. actiontype on <maction> cannot be set on <mstyle>. examples using displaystyle and mathcolor to effect style changes in the layout of the whole sum. <math> <mstyle displaystyle="true" mathcol...
additive - SVG: Scalable Vector Graphics
four elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> usage notes value replace | sum default value replace animatable no sum specifies that the animation will add to the underlying value of the attribute and other lower priority animations. replace specifies that the animation will override the underlying value of the attribute and other lower priority animations. ...
alphabetic - SVG: Scalable Vector Graphics
the alphabetic attribute defines the lower baseline of a font. it has the same syntax and semantics as the baseline descriptor within an @font-face. for horizontally oriented glyph layouts, it indicates the alignment coordinate for glyphs to achieve alphabetic baseline alignment. the value is an
offset in the font coordinate system. only one element is using this attribute: <font-face> usage notes value <number> default value 0 animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'alphabetic' in that specification. recommendation initial definition ...
by - SVG: Scalable Vector Graphics
the starting value for the attribute is either indicated by specifying it as value for the attribute given in the attributename or the from attribute. ...
class - SVG: Scalable Vector Graphics
class" 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> <fe
offset> <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> ...
clip - SVG: Scalable Vector Graphics
operty is deprecated. use clip-path instead. value auto | rect() default value auto animatable yes the value auto defines a clipping path along the bounds of the viewport created by the given element.the value rect() defines a clipping rectangle following the following syntax: rect(<top>, <right>, <bottom>, <left>). the <top> and <bottom> values specify
offsets from the top border edge of the element viewport, while <right> and <left> specify
offsets from the left border edge of the element viewport. specifications specification status comment css masking module level 1the definition of 'clip' in that specification. candidate recommendation deprecates clip property, suggests clip-path as replacement. scalabl...
color-rendering - SVG: Scalable Vector Graphics
lineargradient>, <marker>, <mask>, <missing-glyph>, <path>, <pattern>, <polygon>, <polyline>, <radialgradient>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, and <use> html, body, svg { height: 100%; } <svg viewbox="0 0 480 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
offset="0%" stop-color="white"/> <stop
offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient)" color-rendering="optimizequality" /> <text x="45" y="50%" color-rendering="optimizequality">quality-optimized</text> <circle cx="100" cy="100" r="100" color-rendering="optimizespeed" fill="url(#gradient)" style="trans...
fill - SVG: Scalable Vector Graphics
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
offset="0%" stop-color="pink" /> <stop
offset="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. --> <circle cx="250" cy="50" r="20"> <animate attributetype="xml" attributename="r" from="0" to="...
hanging - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs. ...
ideographic - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs. ...
in - SVG: Scalable Vector Graphics
es within a given <filter> element, then a reference to that result will use the closest preceding filter primitive with the given value for attribute result. ...
keyTimes - SVG: Scalable Vector Graphics
the keytimes attribute represents a list of time values used to control the pacing of the animation. each time in the list corresponds to a value in the values attribute list, and defines when the value is used in the animation. each time value in the keytimes list is specified as a floating point value between 0 and 1 (inclusive), representing a proportional
offset into the duration of the animation element. four elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> ...
mathematical - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs. ...
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
offset="0%" style="stop-color:skyblue;" /> <stop
offset="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> ...
paint-order - SVG: Scalable Vector Graphics
rom left to right. if any of the three painting components is omitted, they will be painted in their default order after the specified components. for example, using stroke is equivalent to stroke fill markers. ...
stroke - SVG: Scalable Vector Graphics
, <ellipse>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- simple color stroke --> <circle cx="5" cy="5" r="4" fill="none" stroke="green" /> <!-- stroke a circle with a gradient --> <defs> <lineargradient id="mygradient"> <stop
offset="0%" stop-color="green" /> <stop
offset="100%" stop-color="white" /> </lineargradient> </defs> <circle cx="15" cy="5" r="4" fill="none" stroke="url(#mygradient)" /> </svg> usage notes value <paint> default value none animatable yes specifications specification status comment scalable vector g...
v-alphabetic - SVG: Scalable Vector Graphics
the v-alphabetic attribute defines indicates the alignment coordinate for glyphs to achieve alphabetic baseline alignment. the value is an
offset in the font coordinate system relative to the glyph-specific vert-origin-x attribute. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-alphabetic' in that specification. recommendation initial definition ...
v-hanging - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs to achieve hanging baseline alignment. ...
v-ideographic - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs. ...
v-mathematical - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs. ...
x1 - SVG: Scalable Vector Graphics
ced by the gradientunits attributs value <length> | <percentage> default value 0% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector start at the left bounding limit of the shape it is applied to --> <lineargradient x1="0%" id="g0"> <stop
offset="0" stop-color="black" /> <stop
offset="100%" stop-color="red" /> </lineargradient> <rect x="1" y="1" width="8" height="8" fill="url(#g0)" /> <!-- here the gradient vector start at 80% of the left bounding limit of the shape it is applied to --> <lineargradient x1="80%" id="g1"> <stop
offset="0" stop-color="black" /> <stop
offset="100%" stop-color="red" /> <...
x2 - SVG: Scalable Vector Graphics
by the gradientunits attributs value <length> | <percentage> default value 100% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector end at the right bounding limit of the shape it is applied to --> <lineargradient x2="100%" id="g0"> <stop
offset="0" stop-color="black" /> <stop
offset="100%" stop-color="red" /> </lineargradient> <rect x="1" y="1" width="8" height="8" fill="url(#g0)" /> <!-- here the gradient vector start at 20% of the left bounding limit of the shape it is applied to --> <lineargradient x2="20%" id="g1"> <stop
offset="0" stop-color="black" /> <stop
offset="100%" stop-color="red" /> <...
<a> - SVG: Scalable Vector Graphics
t notably: 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-dash
offset, 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,...
<circle> - SVG: Scalable Vector Graphics
ditional 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-dash
offset, 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...
<clipPath> - SVG: Scalable Vector Graphics
alue: userspaceonuse; animatable: yes global attributes core attributes most notably: id styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dash
offset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriesnonepermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elements<text>, <use> specifications specification status comment css masking module level 1the definition o...
<ellipse> - SVG: Scalable Vector Graphics
ditional 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-dash
offset, 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...
<feGaussianBlur> - SVG: Scalable Vector Graphics
<circle 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" /> <fe
offset 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
ns, 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-dash
offset, 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...
<g> - SVG: Scalable Vector Graphics
ditional 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-dash
offset, 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...
<hatchpath> - SVG: Scalable Vector Graphics
the <hatchpath> svg element defines a hatch path used by the <hatch> element. usage context categoriesnonepermitted contentany number of the following elements, in any order:animation elementsdescriptive elements<script>, <style> attributes global attributes core attributes global event attributes presentation attributes style attributes specific attributes d
offset dom interface this element implements the svghatchpathelement interface. example svg <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <hatch id="hatch" hatchunits="userspaceonuse" pitch="5" rotate="135"> <hatchpath stroke="#a080ff" stroke-width="2"/> </hatch> </defs> <rect fill="url(#hatch)" stroke="black" stroke-width="2" x="10%" y="10%" width...
<line> - SVG: Scalable Vector Graphics
ditional 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-dash
offset, 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...
<marker> - SVG: Scalable Vector Graphics
utes 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-dash
offset, 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...
<mask> - SVG: Scalable Vector Graphics
default value: 120%; animatable: yes global attributes core attributes most notably: id styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dash
offset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility 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>, <fon...
<path> - SVG: Scalable Vector Graphics
ditional 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-dash
offset, 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...
<pattern> - SVG: Scalable Vector Graphics
utes 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-dash
offset, 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...
<polygon> - SVG: Scalable Vector Graphics
ditional 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-dash
offset, 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...
<polyline> - SVG: Scalable Vector Graphics
ditional 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-dash
offset, 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...
<rect> - SVG: Scalable Vector Graphics
ditional 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-dash
offset, 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...
<solidcolor> - SVG: Scalable Vector Graphics
e svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 300 200" height="150"> <defs> <!-- solidcolor is experimental. --> <solidcolor id="mycolor" solid-color="gold" solid-opacity="0.8"/> <!-- lineargradient with a single color stop is a less elegant way to achieve the same effect, but it works in current browsers. ...
<stop> - SVG: Scalable Vector Graphics
the svg <stop> element defines a color and its position to use on a gradient. this element is always a child of a <lineargradient> or <radialgradient> element. 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
offset="5%" stop-color="gold" /> <stop
offset="95%" stop-color="red" /> </lineargradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg> attributes
offset this attribute defines where the gradient stop is placed along the gradient vector. value type: <number>|<percentage>; default value: 0; animatable: yes stop-color this...
<svg> - SVG: Scalable Vector Graphics
ns, 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-dash
offset, 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...
<symbol> - SVG: Scalable Vector Graphics
notably: 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-dash
offset, 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...
<text> - SVG: Scalable Vector Graphics
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, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dash
offset, 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...
<tspan> - SVG: Scalable Vector Graphics
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, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dash
offset, 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...
<use> - SVG: Scalable Vector Graphics
ditional 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-dash
offset, 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...
<view> - SVG: Scalable Vector Graphics
al attributes aria attributes » core attributes » global event attributes » externalresourcesrequired specific attributes viewbox preserveaspectratio zoomandpan viewtarget example svg <svg width="600" height="200" viewbox="0 0 600 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <radialgradient id="gradient"> <stop
offset="0%" stop-color="#8cffa0" /> <stop
offset="100%" stop-color="#8ca0ff" /> </radialgradient> </defs> <circle r="50" cx="180" cy="50" style="fill:url(#gradient)"/> <view id="halfsizeview" viewbox="0 0 1200 400"/> <view id="normalsizeview" viewbox="0 0 600 200"/> <view id="doublesizeview" viewbox="0 0 300 100"/> <a xlink:href="#halfsizeview"> <text x="5" y="20" font-size=...
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
implemented. fegaussianblur implemented. feimage implemented. document fragments (bug 455986) aren't supported in <svg:feimage>. femerge implemented. femergenode implemented. femorphology implemented. fe
offset implemented. fespecularlighting implemented. fetile implemented. feturbulence implemented. fedistantlight implemented. fepointlight implemented. fespotlight implemented. fefun...
Fills and Strokes - SVG: Scalable Vector Graphics
ice to create an even pattern. so the first path renders 5 filled, 10 empty, 5 filled, and then loops back to create 5 empty, 10 filled, 5 empty. the pattern then repeats. 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-dash
offset, which specifies where to start a dasharray on a line. using css in addition to setting attributes on objects, you can also use css to style fills and strokes. not all attributes can be set via css. attributes that deal with painting and filling are usually available, so fill, stroke, stroke-dasharray, etc... can all be set this way, in addition to the gradient and pattern versions of those sho...
Getting started - SVG: Scalable Vector Graphics
file attributes are deprecated in svg 2. as an xml dialect, svg must always bind the namespaces correctly (in the xmlns attribute). see the namespaces crash course page for more info. 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
offset 150px to the right, and 100px downward from the top left corner). the text "svg" is drawn. the interior of each letter is filled in with white. 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. fine adjustments can be made to the font size and vertical position to ensure the final result i...
Texts - SVG: Scalable Vector Graphics
, helvetica, arial, sans-serif; } ]]></style> </svg> the tspan element has the following custom attributes: x set a new absolute x coordinate for the containing text. this overwrites the default current text position. the attribute may also contain a list of numbers, that are one by one applied to the single characters of the tspan element. dx start drawing the text with a horizontal
offset dx from the default current position. here, too, you may provide a list of values that are applied to consecutive characters, hence piling up the
offset over time. likewise, there are y and dy for vertical displacement. rotate rotate all characters by this degree. a list of numbers makes each character rotate to its respective value, with remaining characters rotating according to the last v...