Search completed in 1.13 seconds.
<easing-function> - CSS: Cascading Style Sheets
they correlate a time ratio to an output ratio, both expressed as <number>s. for these values, 0.0 represents the initial state, and 1.0 represents the final state. depending on the specific function used, the calculated output can sometimes grow to be greater than 1.0 or smaller than 0.0 during the course of an animation. ...
...or some properties, such as left or right, this creates a kind of "bouncing" effect. however, certain properties will restrict the output if it goes outside an allowable range. for example, a color component greater than 255 or smaller than 0 will be clipped to the closest allowed value (255 and 0, respectively). some cubic-bezier() curves exhibit this property. syntax there are three types of
easing function: linear, cubic bézier curves, and staircase functions. the value of an <
easing-function> type describes the
easing function using one of those three types.
easing functions css supports three kinds of
easing functions: linear, the subset of the cubic bézier curves that are functions, and staircase functions. the most useful of these functions are given a keyword that allows them to b...
...nd staircase functions. the value of an <
easing-function> type describes the
easing function using one of those three types.
easing functions css supports three kinds of
easing functions: linear, the subset of the cubic bézier curves that are functions, and staircase functions. the most useful of these functions are given a keyword that allows them to be easily referenced. the linear class of
easing functions linear the animation moves from beginning to end at a constant rate. this keyword represents the
easing function cubic-bezier(0.0, 0.0, 1.0, 1.0). the cubic-bezier() class of
easing functions the cubic-bezier() functional notation defines a cubic bézier curve. as these curves are continuous, they are often used to smooth down the start and end of the animation and are therefore...
...And 13 more matches
EffectTiming.easing - Web APIs
the effecttiming dictionary's
easing property in the web animations api specifies the timing function used to scale the time to produce
easing effects, where
easing is the rate of the animation's change over time. element.animate(), keyframeeffectreadonly(), and keyframeeffect() all accept an object of timing properties including
easing. the value of
easing corresponds directly to animationeffecttimingreadonly.
easing in timing objects returned by animationeffectreadonly, keyframeeffectreadonly, and keyframeeffect. syntax var timingproperties = {
easing: single-transition-timing-function } timingproperties.
easing = single-transition-timing-function value a string defining the timing function to use for
easing transitions during the animation process. accepts several pre-defi...
...t be a positive integer (greater than 0). the second parameter, which is optional, specifies the point at which the change of values occur within the interval. if the second parameter is omitted, it is given the value end. step-start equivalent to steps(1, start) step-end equivalent to steps(1, end). ...
... working draft editor's draft. ...
... working draft editor's draft. ...
The Business Benefits of Web Standards - Archive of obsolete content
rying about each engine and attempting to artificially manipulate the results, web standards pages index and rank properly (where they deserve to) across all search engines. in the same way that standards hugely reduce the concern we need to have for browser differences, they also reduce the differences between the way search engines rank pages. there should be little need to plunge into the incr
easing costs and uncertain quality and integrity of proprietary pay per click campaigns. increase website traffic maintain contact with your user on multiple platforms standards-based code and cross-platform go hand in hand. while some browsers have quirks that cause different behavior by platform, mozilla-based browsers are designed to behave identically on all supported platforms (mac, linux, unix,...
...integrity of proprietary pay per click campaigns. increase website traffic maintain contact with your user on multiple platforms standards-based code and cross-platform go hand in hand. while some browsers have quirks that cause different behavior by platform, mozilla-based browsers are designed to behave identically on all supported platforms (mac, linux, unix, windows...) web content is incr
easingly being accessed by a growing number of user agents other than browsers, or by browsers on different platforms - for example mobile telephones. feed content such as rss and atom simply will not work without being implemented by following the requisite standard. assumptions about the user and their platform based on erroneous thinking about the anticipated user community are inevitably always wro...
...y will not work without being implemented by following the requisite standard. assumptions about the user and their platform based on erroneous thinking about the anticipated user community are inevitably always wrong. it does not follow for example that successful business users have wide monitors. the opposite may be true. power users and business travellers are downsizing their notebooks. incr
easingly one person may need to acccess the same site using different platforms at home, in the office and when travelling. they expect a consistent experience. web standards gives us tools, and methodologies for dealing with this paradox and making the wider contribution of making our content universally accessible to people in different social, medical and economic circumstances. happier staff good...
...And 4 more matches
Index - Web APIs
y of the audiocontext interface returns a double that represents the number of seconds of processing latency incurred by the audiocontext passing the audio from the audiodestinationnode to the audio subsystem. 125 audiocontext.close() api, audiocontext, media, method, reference, web audio api, close the close() method of the audiocontext interface closes the audio context, rel
easing any system audio resources that it uses. 126 audiocontext.createjavascriptnode() api, audio, method, obsolete, reference, web, createjavascriptnode the following script illustrates the use of createjavascriptnode(): 127 audiocontext.createmediaelementsource() api, audiocontext, method, reference, référence(2), web audio api, createmediaelementsource for...
...seaudiocontext.createwaveshaper() api, audiocontext, baseaudiocontext, method, reference, web audio api, createwaveshaper a waveshapernode. 246 baseaudiocontext.currenttime api, audiocontext, baseaudiocontext, property, reference, web audio api, currenttime the currenttime read-only property of the baseaudiocontext interface returns a double representing an ever-incr
easing hardware timestamp in seconds that can be used for scheduling audio playback, visualizing timelines, etc. it starts at 0. 247 baseaudiocontext.decodeaudiodata() api, audio, audiocontext, baseaudiocontext, method, reference, web audio api, decodeaudiodata this is the preferred method of creating an audio source for web audio api from an audio track. this method only works on c...
... deprecationreportbody api, deprecationreportbody, experimental, interface, reference, reporting api the deprecationreportbody interface of the reporting api represents the body of a deprecation report (the return value of its report.body property). 826 detecting device orientation api, device orientation, intermediate, mobile, motion, orientation, reference incr
easingly, web-enabled devices are capable of determining their orientation; that is, they can report data indicating changes to their orientation with relation to the pull of gravity. in particular, hand-held devices such as mobile phones can use this information to automatically rotate the display to remain upright, presenting a wide-screen view of the web content when the device is rotated so that its...
...And 4 more matches
Intersection Observer API - Web APIs
350px; height: 350px; margin-top: 10px; border: 4px solid rgb(20, 20, 120); text-align: center; padding: 20px; } javascript finally, let's take a look at the javascript code that uses the intersection observer api to make things happen. setting up first, we need to prepare some variables and install the observer. const numsteps = 20.0; let boxelement; let prevratio = 0.0; let incr
easingcolor = "rgba(40, 40, 190, ratio)"; let decr
easingcolor = "rgba(190, 40, 40, ratio)"; // set things up window.addeventlistener("load", (event) => { boxelement = document.queryselector("#box"); createobserver(); }, false); the constants and variables we set up here are: numsteps a constant which indicates how many thresholds we want to have between a visibility ratio of 0.0 and 1.0. pre...
...erver(); }, false); the constants and variables we set up here are: numsteps a constant which indicates how many thresholds we want to have between a visibility ratio of 0.0 and 1.0. prevratio this variable will be used to record what the visibility ratio was the last time a threshold was crossed; this will let us figure out whether the target element is becoming more or less visible. ...
...es how many thresholds we want to have between a visibility ratio of 0.0 and 1.0. prevratio this variable will be used to record what the visibility ratio was the last time a threshold was crossed; this will let us figure out whether the target element is becoming more or less visible. incr
easingcolor a string defining a color we'll apply to the target element when the visibility ratio is incr
easing. the word "ratio" in this string will be replaced with the target's current visibility ratio, so that the element not only changes color but also becomes incr
easingly opaque as it becomes less obscured. decr
easingcolor similarly, this is a string defining a color we'll apply when the visibility ratio is decr
easing. we call window.addeventlistener() to start listening for the load event; once ...
...And 3 more matches
KeyframeEffect.setKeyframes() - Web APIs
{ 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. keyframes without a specified offset will be evenly spaced between adjacent keyframes. ...
... { 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. keyframes without a specified offset will be evenly spaced between adjacent keyframes. the
easing to apply between keyframes can be specified by providing an
easing value as illustrated below. ...
... 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. keyframes without a specified offset will be evenly spaced between adjacent keyframes. the
easing to apply between keyframes can be specified by providing an
easing value as illustrated below. element.animate([ { opacity: 1,
easing: 'ease-out' }, { opacity: 0.1,
easing: 'ease-in' }, { opacity: 0 } ], 2000); in this example, the specified
easing only applies from the keyframe where it is specified until the next keyframe. any
easing value specified on the options argument, however, applies across a single iteration of the animation — for the entire duration. an ...
...And 3 more matches
Keyframe Formats - Web APIs
{ 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. keyframes without a specified offset will be evenly spaced between adjacent keyframes. ...
... { 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. keyframes without a specified offset will be evenly spaced between adjacent keyframes. the
easing to apply between keyframes can be specified by providing an
easing value as illustrated below. ...
... 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. keyframes without a specified offset will be evenly spaced between adjacent keyframes. the
easing to apply between keyframes can be specified by providing an
easing value as illustrated below. element.animate([ { opacity: 1,
easing: 'ease-out' }, { opacity: 0.1,
easing: 'ease-in' }, { opacity: 0 } ], 2000); in this example, the specified
easing only applies from the keyframe where it is specified until the next keyframe. any
easing value specified on the options argument, however, applies across a single iteration of the animation — for the entire duration. an ...
...And 3 more matches
Applying styles and colors - Web APIs
draw a grid of rectangles, each in a different color. the resulting image should look something like the screenshot. there is nothing too spectacular happening here. we use the two variables i and j to generate a unique rgb color for each square, and only modify the red and green values. the blue channel has a fixed value. by modifying the channels, you can generate all kinds of palettes. by incr
easing the steps, you can achieve something that looks like the color palettes photoshop uses. function draw() { var ctx = document.getelementbyid('canvas').getcontext('2d'); for (var i = 0; i < 6; i++) { for (var j = 0; j < 6; j++) { ctx.fillstyle = 'rgb(' + math.floor(255 - 42.5 * i) + ', ' + math.floor(255 - 42.5 * j) + ', 0)'; ctx.fillrect(j * 25, i * 25, ...
... the valid range is again between 0.0 (fully transparent) and 1.0 (fully opaque). a globalalpha example in this example, we'll draw a background of four different colored squares. on top of these, we'll draw a set of semi-transparent circles. the globalalpha property is set at 0.2 which will be used for all shapes from that point on. every step in the for loop draws a set of circles with an incr
easing radius. the final result is a radial gradient. by overlaying ever more circles on top of each other, we effectively reduce the transparency of the circles that have already been drawn. by incr
easing the step count and in effect drawing more circles, the background would completely disappear from the center of the image. function draw() { var ctx = document.getelementbyid('canvas').getcontext('...
...using rgba() gives you a little more control and flexibility because we can set the fill and stroke style individually. function draw() { var ctx = document.getelementbyid('canvas').getcontext('2d'); // draw background ctx.fillstyle = 'rgb(255, 221, 0)'; ctx.fillrect(0, 0, 150, 37.5); ctx.fillstyle = 'rgb(102, 204, 0)'; ctx.fillrect(0, 37.5, 150, 37.5); ctx.fillstyle = 'r...
...And 2 more matches
Building up a basic demo with A-Frame - Game development
on of animation. rotation there's a special <a-animation> entity that can help us animate elements. add the <a-animation> element seen below to the <a-box> element as a child, as shown: <a-box color="#0095dd" rotation="20 40 0" position="0 1 0"> <a-animation attribute="rotation" from="20 0 0" to="20 360 0" direction="alternate" dur="4000" repeat="indefinite"
easing="ease"> </a-animation> </a-box> as with any other entities, you can define key properties for the animation. we'll be animating the rotation attribute from 20 0 0 to 20 360 0, so it will do a full spin. the animation direction is set to alternate so the animation will be played forward, and then back. the duration is set to 4 seconds, and it will be repeated indefinitely. the animation uses e...
... </a-animation> </a-box> as with any other entities, you can define key properties for the animation. we'll be animating the rotation attribute from 20 0 0 to 20 360 0, so it will do a full spin. the animation direction is set to alternate so the animation will be played forward, and then back. the duration is set to 4 seconds, and it will be repeated indefinitely. the animation uses ease for
easing, with tween.js being implemented internally. scaling we can also add animation to entities with custom geometry like the torus, in much the same way. add the following <a-animation> element to your torus: <a-entity geometry=" primitive: torus; radius: 1; radiustubular: 0.1; segmentstubular: 12;" material=" color: #eaeff2; roughness: 0.1; metalness: 0.5;" rotat...
...by setting the direction to alternate the scale will be animated to 0.5, and then animated back to 1 during 2 seconds. again, the animati...
...by setting the direction to alternate the scale will be animated to 0.5, and then animated back to 1 during 2 seconds. again, the animation is being repeated indefinitely. ...
Appendix: What you should know about open-source software licenses - Archive of obsolete content
ense as the existing work is a straightforward option. if you are not going to be distributing the modified software at all, and will only be using it within your own organization, you need not release it. for example, if you are using an modified version of linux as the operating system for a web server, it’s fine if you don’t release it. picking a license for original works if you are rel
easing source code you have developed yourself, you need to pick a license. but what kind of license? yukihiro matsumoto, the developer behind the ruby scripting language, published a “free software license diagnostic” in his personal blog. it asks a series of questions, and your responses help you pick the right license. in brief, it goes like this: best not to even try: creating a new license f...
...e as that project. none of the above: choose the modified bsd license. the title hints at matsumoto’s diagnostic approach, since it mentions “free software.” this is slightly different from open source. (matsumoto updated his free software license diagnostic for a special open-source section in the january 2007 edition of softbank’s open source magazine.) if a company is considering rel
easing its own software as open source, it should consider dual-licensing or the cpl. applying a license to original works if you want to release your own code as open-source, here’s what you do next. insert the license declaration in the top of every file in your source code; include the full text of the license in your source-code archive; place the source code on a website or otherwise make ...
...xibility when selecting and applying terms; terms of use stated in easy-to-understand language; licensing conditions conform with current copyright laws; also has an rdf schema for attaching metadata. it is particularly convenient in the way that it allows creators to decide whether to permit commercial uses or not, whether to enforce copyleft or not, etc. this is easy to use when you are rel
easing new documents. the future of gpl despite being buffeted by circumstances, open source is becoming more and more solidly established. but the computer ecosystem is changing in fundamental ways, with software patents, drm, internationally applied licenses, and other new challenges coming into focus. to respond to these challenges, the free software foundation has revised the gpl to version 3. dr...
Index - Archive of obsolete content
no summary! 753 flexgroup "flexgroup" is used to group flexible elements together and should be set to an integer. elements with a lower flexgroup are flexed first. when those elements have reached their maximum sizes, the elements with the next higher flexgroup are flexed. this process continues until there are no more elements remaining. the same process occurs when decr
easing the size, except in the other direction. 754 accelerated xul, xul attribute, xul reference no summary! 755 acceltext xul attributes, xul reference no summary! 756 accessible xul attributes, xul reference no summary! 757 accesskey reference, xul, xul attributes, xul reference, accesskey no summary! 758 a...
...eferences which will ensure that the information you need to know is displayed on them. 1962 deploying xulrunner deployment, guide, tutorials, xul, xulrunner current xulrunner is a stable developer preview release. this means that while the release is immature in some areas such as embedding, application deployment, and os integration, it can be used by developers that are rel
easing standalone xul applications. this document explains how deployment should be managed for self contained portable applications built on xulrunner. 1963 dialogs in xulrunner xul, xulrunner the last article in this series covered some simple xul for creating windows, menus, and toolbars. this time i'll look at dialogs, including both custom dialogs and standard operating system ...
...t the possibilities outlined below will inspire you to learn more where you need to. 2246 xforms custom controls examples xforms no summary! 2247 xforms styling xforms no summary! 2248 background-size should not the "browser compatibility" table also list google chrome and konqueror? chome is not mentioned at all, but is becoming incr
easingly popular. konqueror is listed below the table, which seems inconsistent. znerd 04 august 2009 2249 foreach ok, in the end i didn't remove the old code as it isn't hosted anywhere (i thought the github reference contained the code) but inserted a faster implementation above while retaining the rest of the document. 3239 beginner tutorials this page incl...
Animations and tweens - Game development
al sprites sequentially, tweens smoothly animate properties of an object in the gameworld, such as width or opacity. let's add a tween to our game to make the bricks smoothly disappear when they are hit by the ball. ...
...ar. to the end, we use the add.tween() method, specifying brick.scale as the argument as this is what we want to tween. the to() method defines the state of the object at the end of the tween. ...
...lliseconds and the type of
easing to use for the tween. we will also add the optional oncomplete event handler, which defines a function to be executed when the tween finishes. the last thing do to is to start the tween right away using start(). that's the expanded version of the tween definition, but we can also use the shorthand syntax: game.add.tween(brick.scale).to({x:2,y:2}, 500, phaser.
easing.elastic.out, true, 100); this tween will double the brick's scale in half a second using elastic
easing, will start automatically, and have a delay of 100 miliseconds. compare your code you can check the finished code for this lesson in the live demo below, and play with it to understand better how it works: next steps animations and tweens look very nice, but we can add even more to our ...
Work with animations - Firefox Developer Tools
own as a horizontal bar laid across the timeline. the bar is: blue if a transition was used to animate a property orange if a @keyframes animation was used green if the web animations api was used the bar contains a lightning bolt icon if the property was animated using the compositor thread (see more about the cost of animating different css properties). the bar is shaped to reflect the
easing effect used for the animation. in the example above you can see that the first bar is concave, representing ease-in, and the second is convex, representing ease-out. if the animation used css transitions, there is one bar for each property transitioned, and it is labeled with the name of the property being transitioned. if the animation used css @keyframes, there is one bar for each animation, l...
...ad a delay, this is shown as a cross-hatched portion of the bar. delay and enddelay are both represented. if you hover over the bar, a tooltip appears, giving you more detailed information about the animation or transition, including: the type of animation: css transition, css animation, or web animations api the duration of the animation the animation's start and end delay the animation's
easing (or timing function). the animation's fill the playback rate of the animation information about the animated element to the left of each bar is a selector for the element that the animation applies to. if you hover over this selector, the element is highlighted in the page. click the selector to select the element in the inspector. to the left of the selector is a "target" icon (). clicki...
...ation involved two elements, span#note and img#icon. hovering over these selectors, we can see that those elements are, respectively, the browser name "firefox developer edition" and the browser icon. the img#icon animation: animated the filter and transform properties, to scale the icon and color it lasted 750ms, had an enddelay of 100ms used the compositor thread was given an
easing value of ease-in: you can see this by the concave shape of the green bar. the span#note animation: animated the width and opacity properties, to make the name gradually appear lasted 500ms, and had a delay of 150ms was given an
easing value of ease-out: you can see this by the convex shape of the green bar. animation playback at the top of the animation inspector: t...
IDBCursor - Web APIs
confused with idbcursorwithvalue which is just an idbcursor interface with an additional value property. the idbcursor interface of the indexeddb api represents a cursor for traversing or iterating over multiple records in a database. the cursor has a source that indicates which index or object store it is iterating over. it has a position within the range, and moves in a direction that is incr
easing or decr
easing in the order of record keys. the cursor enables an application to asynchronously process all the records in the cursor's range. you can have an unlimited number of cursors at the same time. you always get the same idbcursor object representing a given cursor. operations are performed on the underlying index or object store. note: this feature is available in web workers. properti...
...ition of the cursor in the object store. this can be used to update specific records. constants these constants are no longer available — they were removed in gecko 25. you should use the string constants directly instead. (bug 891944) next : "next" : the cursor shows all records, including duplicates. it starts at the lower bound of the key range and moves upwards (monotonically incr
easing in the order of keys). nextunique : "nextunique" : the cursor shows all records, excluding duplicates. if multiple records exist with the same key, only the first one iterated is retrieved. it starts at the lower bound of the key range and moves upwards. prev : "prev" : the cursor shows all records, including duplicates. it starts at the upper bound of the key range and moves downwards (monoton...
...er of keys). nextunique : "nextunique" : the cursor shows all records, excluding duplicates. if multiple records exist with the same key, only the first one iterated is retrieved. it starts at the lower bound of the key range and moves upwards. prev : "prev" : the cursor shows all records, including duplicates. it starts at the upper bound of the key range and moves downwards (monotonically decr
easing in the order of keys). prevunique : "prevunique" : the cursor shows all records, excluding duplicates. if multiple records exist with the same key, only the first one iterated is retrieved. it starts at the upper bound of the key range and moves downwards. examples in this simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through all the records i...
WebSocket.send() - Web APIs
if the data can't be sent (for example, because it needs to be buffered but the buffer is full), the socket is closed automatically. syntax websocket.send("hello server!"); parameters data the data to send to the server. it may be one of the following types: usvstring a text string. the string is added to the buffer in utf-8 format, and the value of bufferedamount is increased by the number of bytes required to represent the utf-8 string. ...
...he data to send to the server. it may be one of the following types: usvstring a text string. the string is added to the buffer in utf-8 format, and the value of bufferedamount is increased by the number of bytes required to represent the utf-8 string. ...
... exceptions thrown invalid_state_err the connection is not currently open. syntax_err the data is a string that has unpaired surrogates. ...
Inputs and input sources - Web APIs
e. when the user points a device along a target ray in your 3d space and then triggers a select action, the following events are sent to the active xrsession: a selectstart event, indicating that the user has performed the activity that begins the primary action. this may be a gesture, depressing a button, or the like. if the primary action ends successfully (for example, due to the user rel
easing the button or trigger), rather than because of an error, the select event is sent. after the select event is sent or if the controller on which the action is being performed is disconnected or otherwise becomes unavailable, the selectend event is sent. generally speaking, the selectstart and selectend events tell you when you might want to display something to the user indicating that the prim...
... sample code shows a set of squeeze event handlers that implement these events to manage picking up and holding objects from the scene. the code presumes the existence of an avatar object representing the character, as used in several other eamples on this page, as well as the pickupobject() and dropobject() functions, which handle transferring an object from the world to a particular hand and rel
easing an object from the hand and placing it back into the world. picking up an object: handling squeezestart events xrsession.addeventlistener("squeezestart", event => { const targetrayspace = event.inputsource.targetrayspace; const hand = event.inputsource.handedness; let targetraypose = event.frame.getpose(targetrayspace, viewerrefspace); if (!targetraypose) { return; } let targe...
... then pickupobject() is called, specifying the targeted object as the object to remove from the scene and place into the specified hand. pickupobject() also records the original position of the object so it can be returned to that spot if the squeeze is canceled or aborted. dropping the object: the squeeze event handler the squeeze event is received when the user ends the squeeze action by rel
easing their grip. in this example, we interpret that as rel
easing the currently-held object, dropping it into the scene at the targeted location. this code presumes the existence of additional functions findtargetposition(), which follows the target ray until it collides with something, then returns the coordinates at which the collision occurred, and putobject(), which places the object held in the s...
Using the Web Animations API - Web APIs
ons api only takes milliseconds. the other thing you’ll notice is that it’s iterations, not iteration-count. there are a number of small differences between the terminology used in css animations and the terminology used in web animations. for instance, web animations doesn't use the string "infinite", but instead uses the javascript keyword infinity. and instead of timing-function we use
easing. we aren’t listing an
easing value here because, unlike css animations where the default animation-timing-function is ease, in the web animations api the default
easing is linear — which is what we want here. bring the pieces together now it’s time to bring them both together with the element.animate() method: document.getelementbyid("alice").animate( alicetumbling, alicetiming ) a...
......
...then we pause her: alicechange.pause(); if we had left her paused at the beginning of her animation, she’d start at half her full size, as if she’d drunk the entire bottle already! we want to set her animation’s “playhead” in the middle, so she’s already hal...
WindowOrWorkerGlobalScope.setInterval() - Web APIs
te). arguments thisobject the this object on which the callback function is called. it can be an object or null. callback the function that is repeatedly invoked . it is called with three arguments: index (the iterative index of each invocation), length (the number of total invocations assigned to the daemon - finite or infinity) and backwards (a boolean expressing whether the index is incr
easing or decr
easing). it is something like callback.call(thisobject, index, length, backwards). if the callback function returns a false value the daemon is paused. rate (optional) the time lapse (in number of milliseconds) between each invocation. the default value is 100. length (optional) the total number of invocations. it can be a positive integer or infinity. the default value is infinity. ...
...on.owner the this object on which is executed the daemon (read/write). it can be an object or null. mydaemon.task the function that is repeatedly invoked (read/write). it is called with three arguments: index (the iterative index of each invocation), length (the number of total invocations assigned to the daemon - finite or infinity) and backwards (a boolean expressing whether the index is decr
easing or not) – see above. if the mydaemon.task function returns a false value the daemon is paused. mydaemon.rate the time lapse (in number of milliseconds) between each invocation (read/write). mydaemon.length the total number of invocations. it can be a positive integer or infinity (read/write). minidaemon instances methods mydaemon.isatend() returns a boolean expressing whether the daem...
...tive integer or infinity (read/write). minidaemon instances methods mydaemon.isatend() returns a boolean expressing whether the daemon is at the start/end position or not. mydaemon.synchronize() synchronize the timer of a started daemon with the time of its invocation. mydaemon.pause() pauses the daemon. mydaemon.start([reverse]) starts the daemon forward (index of each invocation incr
easing) or backwards (index decr
easing). minidaemon global object methods minidaemon.forcecall(minidaemon) forces a single callback to the minidaemon.task function regardless of the fact that the end has been reached or not. in any case the internal index property is increased/decreased (depending on the actual direction of the process). example usage your html page: <!doctype html> <html> <he...
JavaScript Daemons Management - Archive of obsolete content
sing whether the daemon is at the start/end position or not. mydaemon.synchronize() synchronizes the timer of a started daemon with the time of invocation of mydaemon.synchronize(). if the rate property has been changed, the daemon will be updated with the new rate value. mydaemon.pause() pauses the daemon. mydaemon.start([backwards]) starts the daemon forwards (index of each invocation incr
easing) or backwards (index decr
easing). mydaemon.stop() stops the daemon. all original properties will be restored. if it exists a stop listener will be called with three arguments: index (the iterative index of each invocation), length (the number of total invocations assigned to the daemon - finite or infinity), and backwards (a boolean expressing whether the process is going backwards or not). a...
...ill be ignored. mydaemon.skipfor(delta[, force]) calls synchronously the callback function howmany times in the same direction in which it was oriented. if the force argument is set to true, the possible return false of the callback function will be ignored. mydaemon.close([backwards[, force]]) closes the daemon, doing synchronously all pending operations forward (index of each invocation incr
easing) or backwards (index decr
easing). if the force argument is set to true, the possible return false of the callback function will be ignored. mydaemon.reclose([force]) closes the daemon, doing synchronously all pending operations in the same direction in which is oriented the daemon. if the force argument is set to true, the possible return false of the callback function will be ignored. mydaemo...
From object to iframe — other embedding technologies - Learn web development
now let's look at an <object> example that embeds a pdf into a page (see the live example and the source code): <object data="mypdf.pdf" type="application/pdf" width="800" height="1200" typemustmatch> <p>you don't have a pdf plugin, but you can <a href="mypdf.pdf">download the pdf file. </a> </p> </object> pdfs were a necessary stepping stone ...
... constantly got annoying alerts about updating flash player and your java runtime environment. web technologies have since grown much more robust, and those days are over. for virtually all applications, it's time to stop delivering content that depends on plugins and start taking advantage of web technologies instead. broaden your reach to everyone. everyone has a browser, but plugins are incr
easingly rare, especially among mobile users. since the web is easily used without any plugins, people would rather just go to your competitors' websites than install a plugin. give yourself a break from the extra accessibility headaches that come with flash and other plugins. stay clear of additional security hazards. adobe flash is notoriously insecure, even after countless patches. in 2015, alex st...
Working with Svelte stores - Learn web development
alert.subscribe(), passing it a callback function as a parameter. whenever the value of the store changes, the callback function will be called with the new value as its parameter. in the callback function we just assign the value we receive to the local variable, which will trigger the update of the component's dom. the subscribe() method also returns a clean-up function, which takes care of rel
easing the subscription. so we subscribe when the component is being initialized, and use ondestroy to unsubscribe when the component is unmounted. finally we use the alertcontent variable in our markup, and if the user clicks on the alert we clean it. at the end we include a few css lines to style our alert component. this setup allows us to work with stores in a reactive way. when the value of the...
...le.js file size will drop down to just 18kb. this is just the tip of the iceberg. svelte has lots of options for dealing with animations and transitions. svelte also supports specifying different transitions to apply when the element is added or removed from the dom with the in:fn/out:fn directives, and it also allows you to define your custom css and javascript transitions. it also has several
easing functions to specify the rate of change over time. have a look at the ease visualizer to explore the various ease functions available. the code so far git to see the state of the code as it should be at the end of this article, access your copy of our repo like this: cd mdn-svelte-tutorial/07-next-steps or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/07-next...
Package management basics - Learn web development
rectory you ran the parcel command in, you’ll find a number of new files; the most interesting of which are: node_modules: the dependency files of parcel and date-fns. dist: the distribution directory — these are the automatically packaged, minified files parcel has built for us, and the files it is serving at localhost:1234. these are the files you would upload to your web server when rel
easing the site online for public consumption. so long as we know the package name, we can use it in our code and parcel will go off, fetch, and install (actually "copy") the package into our local directory (under node_modules). building our code for production however, this code is not ready for production. most build tooling systems will have a "development mode" and a "production mode". the impo...
...rcel have had the good sense to name the tool slightly differently. to install parcel 1.x you have to install parcel-bundler, but parcel 2.x is simply called parcel. there's a lot of tools available and the javascript package ecosystem is growing at an unprecedented rate, which has pros and cons. there's improvements being made all the time and the choice, for better or worse, is constantly incr
easing. faced with the overwhelming choice of tooling, probably the most important lesson is to learn what the tool you select is capable of. a rough guide to package manager clients this tutorial installed the parcel package using npm, but as mentioned earlier on there are some alternatives and it's worth at least knowing they exist and having some vague idea of the common commands across the tools. ...
PRIntervalTime
it should therefore never be used for intervals greater than approximately 6 hours. ...
...#include <prinrval.h> typedef pruint32 printervaltime; #define pr_interval_min 1000ul #define pr_interval_max 100000ul #define pr_interval_no_wait 0ul #define pr_interval_no_timeout 0xfffffffful description the units of printervaltime are platform-dependent. they are chosen to be appropriate for the host os, yet provide sufficient resolution and period to be useful to clients. the incr
easing interval value represented by printervaltime wraps. it should therefore never be used for intervals greater than approximately 6 hours. interval times are accurate regardless of host processing requirements and are very cheap to acquire. the constants pr_interval_min and pr_interval_max define a range in ticks per second. these constants bound both the period and the resolution of a printervalti...
Starting WebLock
tiate your own implementation of a nsisimpleenumerator. this is a simple thing to do, but it requires that you pay special attention to the ns_addref. ns_imethodimp weblock::getsites(nsisimpleenumerator * *asites) { myenumerator* enumerator = new myenumerator(mrooturlnode); if (!enumerator) return ns_error_out_of_memory; ns_addref(*asites = enumerator); return ns_ok; } addref, rel
easing, and deleting objects never forget to addref an xpcom object which you instantiate via new. all code that uses or is based on xpcom requires objects that are alive to have a reference count of at least one. ignoring this fact can cause real trouble. a related warning is that you should never delete an xpcom object with delete. it can take hours to find the source of crashes that are caused when...
... which you instantiate via new. all code that uses or is based on xpcom requires objects that are alive to have a reference count of at least one. ignoring this fact can cause real trouble. a related warning is that you should never delete an xpcom object with delete. it can take hours to find the source of crashes that are caused when one part of a system is deleting xpcom objects instead of rel
easing them. note that in the implementation above, myenumerator may become invalid if another thread concurrently accesses the linked list. the enumeration represents only one way to walk the linked listed of url strings. if you require that the enumeration be a snapshot of the list of url strings, then you have to rework this implementation so that the enumerator owns a copy of the linked list. at ...
HTML Drag and Drop API - Web APIs
a translucent representation of the draggable elements follows the pointer during the drag operation. for web sites, extensions, and xul applications, you can customize which elements can become draggable, the type of feedback the draggable elements produce, and the droppable elements. ...
... drag operations, several event types are fired, and some events might fire many times, such as the drag and dragover events. each drag event type has an associated global event handler: event on event handler fires when… drag ondrag …a dragged item (element or text selection) is dragged. dragend ondragend …a drag operation ends (such as rel
easing a mouse button or hitting the esc key; see finishing a drag.) dragenter ondragenter …a dragged item enters a valid drop target. (see specifying drop targets.) dragexit ondragexit …an element is no longer the drag operation's immediate selection target. dragleave ondragleave …a dragged item leaves a valid drop target. dragover ondragov...
IDBCursorSync - Web APIs
_only or snapshot_read mode, or if an index record cannot be changed because the underlying index is auto-populated. serial_err if the data being stored could not be serialized by the internal structured cloning algorithm. constants constant value description next 0 this cursor includes duplicates, and its direction is monotonically incr
easing in the order of keys. next_no_duplicate 1 this cursor does not include duplicates, and its direction is monotonically incr
easing in the order of keys. prev 2 this cursor includes duplicates, and its direction is monotonically decr
easing in the order of keys. prev_no_duplicate 3 this cursor does not include duplicates, and its direction is monotonically...
... methods continue() advances the cursor to the next position along its direction, to the item whose key matches the optional key parameter. if no key is specified, advance to the immediate next position. ...
Pinch zoom gestures - Web APIs
/zoom gesture. function pointerdown_handler(ev) { // the pointerdown event signals the start of a touch interaction. // this event is cached to support 2-finger gestures evcache.push(ev); log("pointerdown", ev); } pointer move the pointermove event handler detects if a user is invoking a two-pointer pinch/zoom gesture. if two pointers are down, and the distance between the pointers is incr
easing (signifying a pinch out or zoom in), the element's background color is changed to pink, and if the distance between the pointers is decr
easing (a pinch in or zoom out), the background color is changed to lightblue. in a more sophisticated application, pinch in or pinch out determination could be used to apply application-specific semantics. when this event is processed, the target's border is se...
...nt is processed, the target's border is set to dashed to provide a clear visual indication the element has received a move event. function pointermove_handler(ev) { // this function implements a 2-pointer horizontal pinch/zoom gesture. // // if the distance between the two pointers has increased (zoom in), // the target element's background is changed to "pink" and if the // distance is decr
easing (zoom out), the color is changed to "lightblue". // // this function sets the target element's border to "dashed" to visually // indicate the pointer's target received a move event. log("pointermove", ev); ev.target.style.border = "dashed"; // find this event in the cache and update its record with this event for (var i = 0; i < evcache.length; i++) { if (ev.pointerid == evcache[i].poi...
Fundamentals of WebXR - Web APIs
ic headsets typically start around 90° or so, while the best headsets generally have a field of view of around 150°. because the fov is a matter of the size of the lenses and how close they are to the user's eyes, there are limitations on how wide the fov can get without installing lenses into the user's eyeballs. a wide fov can substantially improve the user's sense of immersion. however, incr
easing the fov can also increase the weight and cost of the headset. degrees of freedom the term degrees of freedom is an indication of how much freedom of movement the user has within the virtual world. this is directly related to how many types of movement the webxr hardware configuration is capable of recognizing and reproducing into the virtual scene. diagram showing the movements possible with...
...possibly the ceiling and/or floor), thus completely surrounding the user with the simulation and allowing them to be immersed in the scene. the user wears 3d glasses that both add the 3d effect to the projected image, but provide a means for the system to render foreground objects into the world. the user's activity may be monitored using motion sensors that are worn or held by the user, or, incr
easingly commonly, using infrared cameras that detect the user's movements. speakers placed around the chamber provide immersive sound as well. these are not common among everyday users; they're mostly either experimental, used for demonstration purposes, or used by larger organizations. one drawback is that the cave can't simulate anything closer than the wall. important health and safety reminder...
Rendering and the WebXR frame animation callback - Web APIs
z refresh rate. that means that the maximum number of frames it can display in a second is 60. no matter how many frames per second you render beyond that, only 60 of them will make it to the screen in the course of a second. but not all displays run at 60 hz; nowadays, higher performance displays are beginning to use much higher refresh rates. 120 hz—or 120 frame per second—displays are incr
easingly common, for example. the browser always tries to refresh at the same rate as the display, which means that on some computers, your callback will be run a maximum of 60 times per second, while on others it might be called 90 or 120 times per second or even more, depending on the frame rate. time available to render each frame this makes using the most of the time available between frames criti...
...ou can to ensure that it doesn't get called less often than that. you achieve this by doing as much as is practicable off the main thread and by keeping your frame rendering callback as efficient as possible. the division of time into 60 hz blocks with each block being used at least in part to render the scene is shown in the diagram below. this is important because as the computer becomes incr
easingly busy, it may not be able to accurately call your callback every frame and may have to skip frames. this is called dropping frames. this happens when the amount of time it takes to render a frame exceeds the time available between frames, whether because rendering was delayed or because rendering itself took more time than was available. in the diagram above, frame 3 is dropped because frame ...
Starting up and shutting down a WebXR session - Web APIs
perform some basic testing before taking your code to a real device. be aware, however, that the emulator does not yet completely emulate all of the webxr api, so you may run into problems you're not expecting. again, carefully read the readme file and make sure you're aware of the limitations before you begin. important: you should always test your code on actual ar and/or vr hardware before rel
easing or shipping a product! emulated, simulated, or polyfilled environments are not an adequate substitute for actual testing on physical devices. getting the extension download the webxr api emulator for your supported browser below: google chrome mozilla firefox the source code for the extension is also available on github. emulator issues and notes while this isn't the place for a full ar...
...he session's end() method. this returns a promise you can use to know when the shutdown is complete. async function shutdownxr(session) { if (session) { await session.end(); /* at this point, webxr is fully shut down */ } } when shutdownxr() returns to its caller, the webxr session is fully and safely shut down. if you have work that must be done when the session ends, such as rel
easing resources and the like, you should do that work in your end event handler rather than in your main code body. that way, you handle the cleanup regardless of whether the shutdown was automatically or manually triggered. detecting when the session has ended as previously established, you can detect when the webxr session has ended—whether because you've called its end() method, the user turned ...
XRSession.onselectend - Web APIs
note: not to be confused with xrsession.onselectstart and xrsession.onselect. syntax xrsession.onselectend = function(event) { ... ...
... note: not to be confused with xrsession.onselectstart and xrsession.onselect. syntax xrsession.onselectend = function(event) { ... ...
Event reference
asons or because the permission was denied. select some text is being selected. wheel a wheel button of a pointing device is rotated in any direction. drag & drop events event name fired when drag an element or text selection is being dragged (fired continuously every 350ms). dragend a drag operation is being ended (by rel
easing a mouse button or hitting the escape key). dragenter a dragged element or text selection enters a valid drop target. dragstart the user starts dragging an element or text selection. dragleave a dragged element or text selection leaves a valid drop target. dragover an element or text selection is being dragged over a valid drop target (fired continuo...
...t dom l3 a node has been removed from the document (use mutation observers instead). domsubtreemodified mutationevent dom l3 a change happened in the document (use mutation observers instead). drag dragevent html5 an element or text selection is being dragged (every 350ms). dragend dragevent html5 a drag operation is being ended (by rel
easing a mouse button or hitting the escape key). dragenter dragevent html5 a dragged element or text selection enters a valid drop target. dragleave dragevent html5 a dragged element or text selection leaves a valid drop target. dragover dragevent html5 an element or text selection is being dragged over a valid drop target (fires every 350ms). ...
Memory Management - JavaScript
e-counting garbage collector will always have at least one reference intact and will keep the dom element in memory even if it was removed from the dom tree. if the dom element holds a large amount of data (illustrated in the above example with the "lotsofdata" property), the memory consumed by this data will never be released and can lead to memory related issues such as the browser becoming incr
easingly slower. mark-and-sweep algorithm this algorithm reduces the definition of "an object is no longer needed" to "an object is unreachable". this algorithm assumes the knowledge of a set of objects called roots. in javascript, the root is the global object. periodically, the garbage collector will start from these roots, find all objects that are referenced from these roots, then all objects ref...
... nor its reduction of the definition of when "an object is no longer needed". cycles are no longer a problem in the first example above, after the function call returns, the two objects are no longer referenced by any resource that is reachable from the global object. consequently, they will be found unreachable by the garbage collector and have their allocated memory reclaimed. limitation: rel
easing memory manually there are times when it would be convenient to manually decide when and what memory is released. in order to release the memory of an object, it needs to be made explicitly unreachable. as of 2019, it is not possible to explicitly or programmatically trigger garbage collection in javascript. node.js node.js offers additional options and tools for configuring and debugging memo...
Array - JavaScript
fruits.length = 2 console.log(object.keys(fruits)) // ['0', '1'...
... fruits.length = 2 console.log(object.keys(fruits)) // ['0', '1'] console.log(fruits.length) // 2 this is explained further on the array.length page. ...
k - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'k' in that specification. ...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'k' in that specification. ...
numOctaves - SVG: Scalable Vector Graphics
the higher the number of octaves, the more natural the noise looks. though more octaves also require more calculations, resulting in a negative impact on performance. ...
... the higher the number of octaves, the more natural the noise looks. though more octaves also require more calculations, resulting in a negative impact on performance. ...
Chrome Authority - Archive of obsolete content
ence. when the manifest implementation is complete the runtime loader will actually prevent modules from require()ing modules that are not listed in the manifest. likewise, it will prevent modules from getting chrome authority unless the manifest indicates that they have asked for it. this will ensure that reviewers see the same authority restrictions that are enforced upon the running code, incr
easing the effectiveness of the time spent reviewing the add-on. (until this work is complete, modules may be able to sneak around these restrictions). the manifest is built with a simple regexp-based scanner, not a full javascript parser. developers should stick to simple require statements, with a single static string, one per line of code. if the scanner fails to see a require entry, the manifest wi...
Rosetta - Archive of obsolete content
ther scripting language you might expect that most of the browsers will not recognize it. also, regarding some languages (like c), it is even not well defined the meaning of part of their semantics in respect to a scope that is more restricted than the full access to the resources they usually deal with – imagine, for example, the meaning of a c pointer within a html page! nevertheless, the incr
easing computational power of modern browsers together with the introduction of typed arrays in ecmascript allow us, in theory, to build full virtual machines in pure ecmascript. therefore, it is also possible, in theory, to use ecmascript for a smaller task: parsing exotic programming languages (i.e., creating compilers). beyond ecmascript this is not the place for showing a full compiler written in ...
Code snippets - Archive of obsolete content
stringview a library that implements a stringview view for javascript typed arrays. this lets you access data in typed arrays using c-like string functions. rosetta by default, the only possible standardized scripting language for html is ecmascript. hence, if you are going to use another scripting language you might expect that most of the browsers will not recognize it. nevertheless, the incr
easing computational power of modern browsers together with the introduction of typed arrays in ecmascript allow us, in theory, to build full virtual machines in pure ecmascript. therefore, it is also possible, in theory, to use ecmascript for a smaller task: parsing exotic programming languages (i.e., creating compilers). this snippets shows a possible way to start from. browser-oriented code tabb...
Local Storage - Archive of obsolete content
ign your database structure, taking into account features you're planning on adding in the future. adding or removing columns, or making other changes to your db structure from one version of your extension to the next will probably cause breakage of user data in older versions. you'll need to carefully add migration code that moves the data from the old db format to the new, and this becomes incr
easingly complex as you add new versions and new structure changes. so, be careful and plan for the future. there are two paths you can take when creating the local database you'll be using for your extension: generate the database file (through mozistorageservice.opendatabase(), all tables (through mozistorageconnection.createtable(), and initial data when your extension starts up for the first tim...
Setting up an extension development environment - Archive of obsolete content
s chrome urls using traditional directories, rather than a jared structure. see below. place the file in the extensions folder of your profile and restart the application. using directories rather than jars regardless of whether you choose to eventually package your extension's chrome in a jar or in directories, developing in directories is simpler. if you choose a jared structure for rel
easing, you can still develop with a directory structure by editing your chrome.manifest. for example, rather than having content myextension jar:chrome/myextension.jar!/content/ use content myextension chrome/content/ preventing the first launch extension selector requires gecko 8.0(firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) starting in firefox 8, on the first launch of a new version of...
CSS3 - Archive of obsolete content
selectors level 4 working draft css lists module level 3 working draft extends the list counter mechanism so that list markers can be styled and web developers can define new list counter schemes. motion path module level 1 working draft css fonts module level 4 working draft css
easing functions level 1 working draft css logical properties and values level 1 editor's draft modules in the revising phase modules that are in the revising phase are much less stable than those in the refining phase. often the syntax is still under scrutiny and may evolve a lot, in a non-compatible way. alternative syntaxes are tested and often implem...
Creating a status bar extension - Archive of obsolete content
some of the samples in this series may be similar to samples you've seen elsewhere, but the goal of this series of articles is to help compile information for new extension developers into one place to make it easy to jump in and get started. note: the extension created by this tutorial won't work in firefox that don't have a static status bar (that is, firefox 4 and up). you can find a more up-to-date tutorial in the xul school tutorial the essentials of an extension. ...
Index - Archive of obsolete content
no summary! 6 flexgroup "flexgroup" is used to group flexible elements together and should be set to an integer. elements with a lower flexgroup are flexed first. when those elements have reached their maximum sizes, the elements with the next higher flexgroup are flexed. this process continues until there are no more elements remaining. the same process occurs when decr
easing the size, except in the other direction. 7 accelerated xul, xul attribute, xul reference no summary! 8 acceltext xul attributes, xul reference no summary! 9 accessible xul attributes, xul reference no summary! 10 accesskey reference, xul, xul attributes, xul reference, accesskey no summary! 11 activetit...
Complete - Archive of obsolete content
e approach that is normally recommended is pessimistic. the extension is assumed to fail in any future version of the application. to adopt this approach, set the maxversion to the latest actual version where you have tested your extension. the problem with this approach is that you have to release a new xpi every time there is a new release of any of the applications it supports. if you delay rel
easing a new xpi, you risk annoying users who cannot upgrade until you do. the approach used here is optimistic. the extension is assumed to work in any future version of the application. to adopt this approach, set the maxversion to a large number like 99. the problem with this approach is that when changes in an application do make the extension fail, users might have bad experiences ranging from erro...
Scroll Bars - Archive of obsolete content
value 100 might be the number of lines in a list, but it could be anything you want. the initial value in this example is 20. when clicking on one of the scroll bar arrows, the value would change by 1 either up or down. by paging through the scroll bar, the value will change by 10. when the user clicks the scroll bar arrows, the thumb will move by the amount specified by the value increment. incr
easing the value of this attribute will cause the scroll bar to move farther with each click. the leftmost or topmost position of the scroll bar has the value 0 and the rightmost or bottommost position of the scroll bar has the value given by maxpos. by adjusting the values of the scroll bar, you can have the thumb positioned just as you want it and the change when the user clicks the arrows just as you...
Using the Editor from XUL - Archive of obsolete content
tion, causing all windows to be closed. before each window is closed, javascript code in globaloverlay.js tries to call a trytoclose method on each window. in editor.js, we set this to call editorcanclose(). if the user chooses to save the document, or throw away their changes, then the window is closed. when the last reference to the nseditorshell goes away (as a result of nseditorboxobject rel
easing its reference) it releases the owning reference on the editor. editor event handling editing operations happen in response to user events: mouse, key, drag and drop, and ime (international text input) events. in order to receive these events, the editor registers several event listeners on the document being edited. in addition, editor actions in the user interface are propagated via the xul an...
2006-11-3 - Archive of obsolete content
ta for the 1.1 version, all possibly in the next days or week. community is advised to perform tests on both builds to ensure they work flawlessly. 1.0.6 build is located here, and 1.1 beta build is located here. discussions last check-ins on sun-calendar-event-dialog.* files last check-ins on sun-calendar-event-dialog.* files from 50 to 100 locales how to get from the 50 locales and rel
easing 40 to a hundred. revisiting mozillatranslator bugs in bugzilla revisiting mozillatranslator bugs in bugzilla dictionary packages there are some dictionaries at http://dictionaries.mozdev.org/installation.html which are not at https://addons.mozilla.org/en/dictionaries. localization of amo and some other pages of mozilla.com suggestion on localizing popular add-ons as well as web pages...
Browser Detection and Cross Browser Support - Archive of obsolete content
n the past, users did not have the choice of picking a browser which implemented the standards however today they do have a choice. there is no compelling reason for anyone in the world to continue to use a browser which does not support the standards. however, as long as web developers continue to code work arounds for these older browsers, users will not have a compelling reason to upgrade. by c
easing to support older browsers, you can provide a reason for users to upgrade. this will benefit not only them, but yourself as well. supporting only standards based browsers can reduce development and maintanance costs as well as increase the dynamic and compelling content which will attract visitors and increase your revenue. the choice is yours... decide to support the standards today! see also w...
LiveConnect - Archive of obsolete content
code in the mozilla source was removed in version 1.9.2 of the platform (see bug 442399), its former api has been restored (see also the specification and this thread) (building on npapi?), and as of java 6 update 12, extensions as well as applets can make use of this restored api. the reimplementation also restores the ability to use try-catch exceptions within javascript, and is free of the incr
easing number of other bugs introduced by the decline of the original liveconnect (e.g., java.lang.string and arrays not working properly). liveconnect use by applets is enabled via the use of the "mayscript" attribute in applet tags on an html page, following which the applet may refer to classes in the netscape.javascript package to access javascript objects, and scripts may directly call applet meth...
background-size - Archive of obsolete content
konqueror is listed below the table, which seems inconsistent. znerd 04 august 2009 chrome, iron, icab4, omniweb etc. are based on webkit, like netscape 6-8, seamonkey, camino, flock, fennec, blackbird etc. are based on gecko. both layout engines are mentioned in the table. people should refer to the webkit and gecko version to get the info they need. agreed; we should definitely encourage people to look stuff up by engine rather than browser. ...
3D games on the Web - Game development
upport the webgl project documentation and specification is maintained by the khronos group, not the w3c as with most of the web apis. support on modern browsers is very good, even on mobile, so you don't have to worry about that too much. the main browsers are all supporting webgl and all you need to focus on is optimizing the performance on the devices you use. there's an ongoing effort on rel
easing webgl 2.0 (based on opengl es 3.0) in the near future, which will bring many improvements and will help developers build games for the modern web using current, powerful hardware. explaining the basic 3d theory the basics of 3d theory centers around shapes represented in a 3d space, with a coordinate system being used to calculate their positions. see our explaining basic 3d theory article for ...
2D maze game with device orientation - Game development
y a working demo of a game that could have lots of additional features. we can for example add power-ups to collect along the way that will make our ball roll faster, stop the timer for a few seconds or give the ball special powers to go through obstacles. there’s also room for the traps which will slow the ball down or make it more difficult to reach the hole. you can create more levels of incr
easing difficulty. you can even implement achievements, leaderboards and medals for different actions in the game. there are endless possibilities — they only depend on your imagination. summary i hope this tutorial will help you dive into 2d game development and inspire you to create awesome games on your own. you can play the demo game cyber orb and check out its source code on github. html5 give...
FTP - MDN Web Docs Glossary: Definitions of Web-related terms
ftp (file transfer protocol) was the standard protocol for many years for transferring files from one host to another over the internet. incr
easingly, though, teams and hosting accounts don't allow ftp and instead rely on a version control system like git. you will still find it used on older hosting accounts, but it is safe to say that ftp is no longer considered best practice. learn more general knowledge beginner's guide to uploading files via ftp ftp on wikipedia ...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
scripting, javascript, reference, expando expando properties are properties added to dom nodes with javascript, where those properties are not part of the object's dom specification: 138 ftp codingscripting, ftp, glossary, protocol ftp (file transfer protocol) was the standard protocol for many years for transferring files from one host to another over the internet. incr
easingly, though, teams and hosting accounts don't allow ftp and instead rely on a version control system like git. you will still find it used on older hosting accounts, but it is safe to say that ftp is no longer considered best practice. 139 ftu ftu, firefox os, first time use, gaia, glossary, infrastructure, intro ftu (first time use) is the app that loads when you run a newly-i...
Perceived performance - MDN Web Docs Glossary: Definitions of Web-related terms
pear more responsive, even if the download and response times remain the same. actual performance is a measurement from when a request is made, through the downloading, parsing and execution of all resources, and the final paint. while increased performance generally increases perceived performance, there are some techniques that can be used to increase perceived performance while marginally decr
easing actual performance. there are front end optimization techniques that can improve perceived performance, such as adding the defer or async attribute to scripts, or placing scripts at the end of documents, and placing css in the head of documents. learn more perceived performance ...
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
cript takes a copy of the originally passed argument (which is a primitive) and creates a local copy. these copies, existing only inside the functions' scopes, are accessible via the identifiers we specified in the functions' definitions (num for addtwo, foo for addtwo_v2) then, the functions' statements are executed: in the first function, a local num variable had been created. we are incr
easing its value by 2, not the original foo's value! in the second function, a local foo variable had been created. we are incr
easing its value by 2, not the original (external) foo's value! also, in this situation, the external foo variable cannot be accessed directly. this is because of javascript's lexical scoping and the resulting variable shadowing. the local foo hides the external foo. for more...
SEO - MDN Web Docs Glossary: Definitions of Web-related terms
ite more visible in search results, also termed improving search rankings. search engines crawl the web, following links from page to page, and index the content found. when you search, the search engine displays the indexed content. crawlers follow rules. if you follow those rules closely when doing seo for a website, you give the site the best chances of showing up among the first results, incr
easing traffic and possibly revenue (for ecommerce and ads). search engines give some guidelines for seo, but big search engines keep result ranking as a trade secret. seo combines official search engine guidelines, empirical knowledge, and theoretical knowledge from science papers or patents. seo methods fall into three broad classes: technical tag the content using semantic html. when exploring ...
TCP - MDN Web Docs Glossary: Definitions of Web-related terms
network protocol that lets two hosts connect and exchange data streams. tcp guarantees the delivery of data and packets in the same order as they were sent. vint cerf and bob kahn, who were darpa scientists at the time, designed tcp in the 1970s. tcp role is to ensure the packets are reliably delivered, error free. tcp has concurrence control, which means the initial requests start small, incr
easing in size to the levels of bandwidth the computers, servers, and network can support. ...
TTL - MDN Web Docs Glossary: Definitions of Web-related terms
ttl can refer either to : the lifetime of a packet in a network can do before being released the expiry time of cached data networking in networking, the ttl, embedded in the packet, is a usually defined as a number of hops or as an expiration timestamp after which the packet is dropped. it provides a way to avoids network congestion, but rel
easing packets after they roamed the network too long. caching in the context of caching, ttl (as an unsigned 32-bit integer) being a part of the http response header or the dns query, indicates the amount of time in seconds during which the ressource can be cached by the requester. learn more general knowledge ttl on wikipedia technical reference rfc 2181 on ietf rfc1035 on ietf ...
Mobile accessibility - Learn web development
> you should never set user-scalable=no if at all possible — many people rely on zoom to be able to see the content of your website, so taking this functionality away is a really bad idea. there are certain situations where zooming might break the ui; in such cases, if you feel that you absolutely need to disable zoom, you should provide some other kind of equivalent, such as a control for incr
easing the text size in a way that doesn't break your ui. keeping menus accessible because the screen is so much narrower on mobile devices, it is very common to use media queries and other technologies to make the navigation menu shrink down to a tiny icon at the top of the display — which can be pressed to reveal the menu only if it's needed — when the site is viewed on mobile. this is commonly ...
Advanced styling effects - Learn web development
ss is a rectangular box, and images are a physical rectangular box, we can make it look as if our content flows around non-rectangular things by using css shapes. the css shapes specification enables the wrapping of text around a non-rectangular shape. it's especially useful when working with an image which has some white-space you might want to float text around. in the image below we have a pl
easingly round balloon. the actual file is rectangular, but by floating the image (shapes only apply to floated elements) and using the shape-outside property with a value of circle(50%), we can give the effect of the text following the line of the balloon. the shape in this example is not reacting to the content of the image file. instead, the circle function is taking its centre point from the cent...
Cascade and inheritance - Learn web development
ed to the body, and from the introductory lessons we have an understanding of how to change the css applied to something at any point in the document — whether by assigning css to an element or creating a class. we will now take a proper look at how the cascade defines which css rules apply when more than one thing could style an element. there are three factors to consider, listed here in incr
easing order of importance. later ones overrule earlier ones: source order specificity importance we will look at these to see how browsers figure out exactly what css should be applied. source order we have already seen how source order matters to the cascade. if you have more than one rule, which has exactly the same weight, then the one that comes last in the css will win. you can think of t...
Handling different text directions - Learn web development
of sense once you start also dealing with layout methods such as flexbox and grid. test your skills! we have covered a lot in 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 you move on — see test your skills: writing modes. summary the concepts explained in this lesson are becoming incr
easingly important in css. an understanding of the block and inline direction — and how text flow changes with a change in writing mode — will be very useful going forward. it will help you in understanding css even if you never use a writing mode other than a horizontal one. in the next module we will take a good look at overflow in css. previous overview: building blocks next in this mo...
Organizing your CSS - Learn web development
not a sass tutorial, so i will briefly explain a couple of the things that sass can do, which are really helpful in terms of organisation, even if you don't use any of the other sass features. if you want to learn a lot more about sass, start with the sass basics article, then move on to their other documentation. defining variables css now has native custom properties, making this feature incr
easingly less important, however one of the reasons you might use sass is to be able to define all of the colors and fonts used in a project as settings, then use that variable around the project. this means that if you realise you have used the wrong shade of blue, you only need change it in one place. if we created a variable called $base-color as in the first line below, we could then use it through...
Installing basic software - Learn web development
op, or xd, to make images or graphics for your web pages. a version control system, to manage files on servers, collaborate on a project with a team, share code and assets and avoid editing conflicts. right now, git is the most popular version control system along with the github or gitlab hosting service. an ftp program, used on older web hosting accounts to manage files on servers (git is incr
easingly replacing ftp for this purpose). there are loads of (s)ftp programs available including cyberduck, fetch and filezilla. an automation system, like webpack, grunt, or gulp to automatically perform repetitive tasks, such as minifying code and running tests. libraries, frameworks, etc., to speed up writing common functionality. a library tends to be an existing javascript or css file that provid...
The web and web standards - Learn web development
ode to build a website for free, and anyone can contribute to the standards creation process, where the specs are written. because web technologies are created openly, in collaboration between many different companies, it means that no one company gets to control them, which is a really good thing. you wouldn't want a single company suddenly deciding to put the entire web behind a paywall, or rel
easing a new version of html that everyone has to buy to continue making web sites, or worse still, just deciding they aren't interested any more and just turning it off. this allows the web to remain a freely-available public resource. don't break the web another phrase you'll hear around open web standards is "don't break the web" — the idea is that any new web technology that is introduced shoul...
Index - Learn web development
step before you move on is to attempt the assessment for the module — this involves a number of related exercises that must be completed in order to create the final design — a business card/gamer card/social media profile. 119 handling different text directions beginner, css, learn, logical properties, writing modes the concepts explained in this lesson are becoming incr
easingly important in css. an understanding of the block and inline direction — and how text flow changes with a change in writing mode — will be very useful going forward. it will help you in understanding css even if you never use a writing mode other than a horizontal one. 120 images, media, and form elements beginner, css, forms, images, learn, media, replaced content this l...
General asynchronous programming concepts - Learn web development
fore running another operation: main thread: task a task b promise: |__async operation__| since the operation is happening somewhere else, the main thread is not blocked while the async operation is being processed. we'll start to look at how we can write asynchronous code in the next article. exciting stuff, huh? keep reading! conclusion modern software design incr
easingly revolves around using asynchronous programming, to allow programs to do more than one thing at a time. as you use newer and more powerful apis, you'll find more cases where the only way to do things is asynchronously. it used to be hard to write asynchronous code. it still takes getting used to, but it's gotten a lot easier. in the rest of this module, we'll explore further why asynchronous cod...
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
/2) { newstartpos = -( (width/2) + 102 ); posx = math.ceil(newstartpos / 13) * 13; console.log(posx); } else { posx += 2; } this is the code that calculates how to update the position in each animation frame. the method you use to throttle your animation will depend on your particular code. for instance, in the earlier spinner example, you could make it appear to move slower by only incr
easing rotatecount by one on each frame, instead of two. active learning: a reaction game for the final section of this article, you'll create a 2-player reaction game. the game will have two players, one of whom controls the game using the a key, and the other with the l key. when the start button is pressed, a spinner like the one we saw earlier is displayed for a random amount of time between 5 an...
Server-side web frameworks - Learn web development
others. there are of course many differences due to specific design decisions and the nature of the languages. rails has been used for high profile sites, including: basecamp, github, shopify, airbnb, twitch, soundcloud, hulu, zendesk, square, highrise. laravel (php) laravel is a web application framework with expressive, elegant syntax. laravel attempts to take the pain out of development by
easing common tasks used in the majority of web projects, such as: simple, fast routing engine. powerful dependency injection container. multiple back-ends for session and cache storage. expressive, intuitive database orm. database agnostic schema migrations. robust background job processing. real-time event broadcasting. laravel is accessible, yet powerful, providing tools needed for large, ...
Getting started with Ember - Learn web development
in this tutorial) is a service. components and services make up the majority of any emberjs application. use cases generally, emberjs works well for building apps that desire either or both of the following traits: single page applications, including native-like web apps, and progressive web apps (pwas) ember works best when it is the entire front end of your application. incr
easing cohesion among many team's technology stacks community-backed "best practices" allow for faster long-term development speed. ember has clear conventions that are useful for enforcing consistency and helping team members get up to speed quickly. ember with add-ons emberjs has a plugin architecture, which means that add-ons can be installed and provide additional functionality with...
Command line crash course - Learn web development
irectory and file count. so what is going on here? a general philosophy of (unix) command line tools is that they print text to the terminal (also referred to "printing to standard output" or stdout). a good deal of commands can also read content from streamed input (known as "standard input" or stdin). the pipe operator can connect these inputs and outputs together, allowing us to build up incr
easingly more complex operations to suit our needs — the output from one command can become the input to the next command. in this case, ls would normally print its output to stdout, but instead ls’s output is being piped into wc, which takes that output as an input, counting the number of lines it contains, and prints that count to stdout instead. a slightly more complex example let’s go throug...
Software accessibility: Where are we today?
ups of people that have problems doing some of those tasks: print disabled: blind, deaf-blind, low vision, obstructed vision, dyslexic, cognitively disabled and illiterate individuals. physically disabled: users have amputations, paralysis, repetitive stress, cerebral palsy, muscular dystrophy, parkinson's or other problems limiting mobility. hearing impaired we must also consider the incr
easing numbers of aging baby boomers that are beginning to experience problems with their sight, vision or dexterity. when you add all these groups of people together, that's a lot of potential users! in answer to this problem, many small accessibility hardware and software vendors created products and software which helped people who could not perform one of the four basic tasks to use common computer ...
Testopia
ralized management of the software engineering process. requirements as our development has moved forward, we have decided to try to keep abreast of the latest stable release from bugzilla (currently 5.0). this gives us a stable code base to work from. developing plugins or extensions for any software is like trying to hit a moving target. this decision allows us to focus our time more on rel
easing new features often and early rather than back porting. however, this means that most major feature will not be back ported to earlier versions unless and until we have time to do so. anyone wishing to help in this effort is more than welcome. bugzilla 4.x mysql 5.0 or postgresql 8.3 mozilla compatible browser ;-) additional perl modules: text::csv xml::schema validator xml...
Eclipse CDT
ble software sites" in the "install" window, make sure "juno" is still unticked, that "nightly" is ticked, highlight "nightly", click "reload", "ok", and then try again. troubleshooting here is a list of problems people have encountered, and suggestions for solutions. problem occurred (java heap space) if eclipse becomes glacially slow or hangs and then you get this error message, see the incr
easing memory limits section above. if you already carried out the instructions in that section, then double check that your changes to eclipse's memory limits actually took effect and are present in eclipse/help > about eclipse > installation details > configuration. if they did, then maybe you need to increase the limits still further for your os/jvm combination. resource is out of sync with the file...
Internationalized Domain Names (IDN) Support in Mozilla Browsers
he first commercial browser that has built-in support for internationalized domain name under the new ietf rfc's established in 2003. an internationalized domain name (idn) is a domain/host name which uses non-ascii characters. until recently domain names allowed only a subset of 7-bit ascii characters. as the internet has spread to non-english speaking people around the world, it has become incr
easingly clear that forcing them to use domain names written only in a subset of the latin alphabet is not ideal. many of the european languages use the basic latin alphabet with additional accented characters for writing but they were not able to use them in domain names. there are many languages whose writing scripts are not based on latin alphabet at all. speakers of these languages were not able to...
source-editor.jsm
hether or not there are changes that can be redone. boolean canredo(); parameters none. return value true if there are changes that can be redone, otherwise false. canundo() determines whether or not there are changes that can be undone. boolean canundo(); parameters none. return value true if there are changes that can be undone, otherwise false. destroy() destroys the editor, rel
easing resource it's allocated and removing event handlers it's installed. you should call this method when you're done using the editor object. void destroy(); parameters none. dropselection() deselects the currently selected text. void dropselection(); parameters none. endcompoundchange() ends a compound change that was previously started by calling startcompoundchange(). all changes made ...
Localization quick start guide
n for short)! whether you're here to start up your own localization in the mozilla project or to join the efforts of an existing localization, you've come to the right place. this guide is filled with all of the basic, technical information you need to get involved in the mozilla l10n program. we will take you through the steps to get started, from the initial environment setup to testing and rel
easing your own localization. along the way, you'll learn about the variety of projects you can contribute to and the tools used to localize them. when we get to specific examples, we'll take them from the firefox project, as it is the most widely localized project within mozilla. as you near the end of this guide, you should be able to make a change to firefox in your local setting and then see that c...
MathML Demo: <mo> - operator, fence, separator, or accent
fence the column vector will fail because latex fences are symmetric. in mathml, operators that are used for fencing are never symmetric and are always stretchy by default. (i.e., as documented in the suggested operator dictionary). hence <mo symmetric="true"> must be scripted if the intent is to emulated latex fence behavior. the commands \big, \big, \bigg and \bigg produce a discreet set of incr
easingly taller fences, | 1 + | 2 + | 3 + | 4 + | . | + 5 | + 6 | + 7 | + 8 | . here's the same expression in a display | 1 + | 2 + | 3 + | 4 + | . | + 5 | + 6 | + 7 | + 8 | the size ratio is 3.0 : 2.4 : 1.8 : 1.2. fixed sized fences are useful with nested fences as in the following example [ [ a b ] + [ b a ] ] + [ a b ] latex fences that are built ...
Gecko Profiler FAQ
call tree, each node of the calltree is assigned a weight which is just the number of samples that were under this call stack. in a difference call tree, each node’s weight instead is computed as <number of samples under this stack in the “after” profile> minus <number of samples under this stack in the “before” profile>. that tree is then displayed in the usual way, with weights in decr
easing order from top to bottom. then the call stacks whose cost increased the most in the “after” profile will be at the top, and those are the ones you usually want to look at if you caused a regression. in this view, the timestamps of individual samples / stacks will not be meaningful. profiler.firefox.com does not have a comparison view at the moment. i can help you add one, though...
Power profiling overview
ates intel processors have aggressive power-saving features. the first is the ability to switch frequently (thousands of times per second) between active and idle states, and there are actually several different kinds of idle states. these different states are called c-states. c0 is the active/busy state, where instructions are being executed. the other states have higher numbers and reflect incr
easing deeper idle states. the deeper an idle state is, the less power it uses, but the longer it takes to wake up from. note: the acpi standard specifies four states, c0, c1, c2 and c3. intel maps these to processor-specific states such as c0, c1, c2, c6 and c7. and many tools report c-states using the latter names. the exact relationship is confusing, and chapter 13 of the intel optimization manual ...
Refcount tracing and balancing
ject 0x00253ab0. but, more specifically, it shows you that: ns_newfoo() "leaks" a refcount. this is probably "okay" because it's a factory method that creates an addref()-ed object. dosomethingwithfooandreturnittoo() leaks two refcounts. hmm...this probably isn't okay, especially because... main() is back down to leaking one refcount. so from this, we can deduce that main() is correctly rel
easing the refcount that it got on the object returned from dosomethingwithfooandreturnittoo(), so the leak must be somewhere in that function. so now say we go fix the leak in dosomethingwithfooandreturnittoo(), re-run our trace, grovel through the log by hand to find the object that corresponds to 0x00253ab0 in the new run, and run make-tree.pl. what we'd hope to see is a tree that looks like: .root...
Reporting a Performance Problem
ld entries so you may want to increase the buffer size if you find you are unable to capture the profile quickly enough after you notice a performance problem. if you choose custom settings (and then clicking edit settings) for the profiler, you can adjust the size of the buffer (presently defaults to 90 mb) and the time interval between data collection (presently defaults to 1 ms). note that incr
easing the buffer size uses more memory and can make capturing a profile take longer. using the keyboard shortcuts is often more convenient than using the mouse to interact with the ui: ctrl+shift+1 - start/stop the profiler ctrl+shift+2 - take a profile and launch the viewer to view it capturing and sharing a profile while the profiler is recording, reproduce the performance problem. if pos...
MailNews automated testing
it allows reviewers to quickly pick up regressions in patches and helps developers to think about different cases. this page and its sub-pages describe (and link to) the available test mechanisms within mailnews, and provide supporting information for developers and testers. functional testing xpcshell-tests and make check these are core test harnesses to which mailnews adds its own tests. these tests are run against almost every changeset that gets committed to the thunderbird and seamonkey code bases. xpcshell-tests are run in javascript without any chrome present. this makes them especially useful for testing at the component / module level. ...
MailNews
ramework the asynctestutils extended framework is one mechanism for testing the mailnews component of thunderbird. see mailnews automated testing for a description of the other testing mechanisms. leak and bloat tests this page describes how to perform tests that measure memory leaks and bloat for mailnews and its sub-components. mailnews automated testing automated testing is an incr
easingly significant and important part of mailnews development. it allows reviewers to quickly pick up regressions in patches and helps developers to think about different cases. see pages tagged mailnews for additional mailnews-specific information. ...
McCoy
tall.rdf for mccoy and the public part of the key will be added directly to the file. the file will be overwritten so take a backup if you need to. you can then include this install.rdf in your add-on's xpi and release it. if you wish to manually add the public key to the install.rdf you can right click the key, select \"copy public key\" and then add it to the file as an updatekey entry. rel
easing an update once you are ready to release an updated version of your add-on you must create yourself an update.rdf file. you need to use mccoy to sign this file so that the application can verify that it really came from you. simply select the key you originally added to the add-on's install.rdf, then click the "sign" toolbar button, select your update.rdf file and the data in it will be signed. i...
NSPR Contributor Guide
ms from many sources. we (the nspr module owners) sometimes disappoint our contributors when we must reject their contributions. we reject contributions for a variety of reasons. some of these reasons are not obvious to an outside observer. nspr wishes to document some guidelines for those who would contribute to nspr. these guidelines should help the contributor in crafting his contribution, incr
easing its likelihood for acceptance. general guidelines downward compatibility because many different applications, besides the mozilla client, use the nspr api, the api must remain downward compatible across even major releases. this means that the behavior of an existing public api item in nspr cannot change. should you need to have a similar api, with some slightly different behavior or differen...
PR_Now
returns the current time. syntax #include <prtime.h> prtime pr_now(void); parameters none. returns the current time as a prtime value. description pr_now() returns the current time as number of microseconds since the nspr epoch, which is midnight (00:00:00) 1 january 1970 utc. you cannot assume that the values returned by pr_now() are monotonically incr
easing because the system clock of the computer may be reset. to obtain monotonically incr
easing time stamps suitable for measuring elapsed time, use pr_intervalnow(). ...
PR_Unlock
attempting to release a lock that was locked by a different thread causes undefined behavior. syntax #include <prlock.h> prstatus pr_unlock(prlock *lock); parameter pr_unlock has one parameter: lock a pointer to a lock object to be released. returns the function returns one of the following values: if successful, pr_success. if unsuccessful (for example, if the caller does not own the lock), pr_failure. ...
Index
name (electronic mail address), a dns name, an ip address, and a uri. issueraltnames non-critical name-list where: subjaltnames: identifies the name of an extension should be set to 0 since this is non-critical extension name-list: comma separated list of names * add crl number extension: the crl number is a non-critical crl extension which conveys a monotonically incr
easing sequence number for a given crl scope and crl issuer. this extension allows users to easily determine when a particular crl supersedes another crl crlnumber non-critical number where: crlnumber: identifies the name of an extension critical: should be set to 0 since this is non-critical extension number: value of long which identifies the sequential number of a crl. * a...
NSS tools : crlutil
ns include an rfc822 name (electronic mail address), a dns name, an ip address, and a uri. issueraltnames non-critical name-list where: subjaltnames: identifies the name of an extension should be set to 0 since this is non-critical extension name-list: comma separated list of names * add crl number extension: the crl number is a non-critical crl extension which conveys a monotonically incr
easing sequence number for a given crl scope and crl issuer. this extension allows users to easily determine when a particular crl supersedes another crl crlnumber non-critical number where: crlnumber: identifies the name of an extension critical: should be set to 0 since this is non-critical extension number: value of long which identifies the sequential number of a crl. * add revocation reason...
troubleshoot.html
fatal error: bits/predefs.h: no such file or directory in this case remember to set use_64=1 testing nss the ssl stress test opens 2,048 tcp connections in quick succession. kernel data structures may remain allocated for these connections for up to two minutes. some systems may not be configured to allow this many simultaneous connections by default; if the stress tests fail, try incr
easing the number of simultaneous sockets supported. building jss windows only: the shell invoked by gmake, shmsdos.exe, is likely to crash when invoking some java tools on windows. the current workaround is to use some other shell in place of shmsdos, such as sh.exe, which should be distributed with the cygnus toolkit you installed to build nss. the change is unfortunately rather drastic: to tric...
NSS Tools crlutil
), a dns name, an ip address, and a uri. issueraltnames non-critical name-list where: subjaltnames: identifies the name of an extension should be set to 0 since this is non-critical extension name-list: comma separated list of names add crl number extension: the crl number is a non-critical crl extension which conveys a monotonically incr
easing sequence number for a given crl scope and crl issuer. this extension allows users to easily determine when a particular crl supersedes another crl crlnumber non-critical number where: crlnumber: identifies the name of an extension critical: should be set to 0 since this is non-critical extension number: value of long which identifies the sequential num...
NSS tools : crlutil
name (electronic mail address), a dns name, an ip address, and a uri. issueraltnames non-critical name-list where: subjaltnames: identifies the name of an extension should be set to 0 since this is non-critical extension name-list: comma separated list of names * add crl number extension: the crl number is a non-critical crl extension which conveys a monotonically incr
easing sequence number for a given crl scope and crl issuer. this extension allows users to easily determine when a particular crl supersedes another crl crlnumber non-critical number where: crlnumber: identifies the name of an extension critical: should be set to 0 since this is non-critical extension number: value of long which identifies the sequential number of a crl. * a...
Rhino history
scripts are no longer in use they can be collected like any other java object. rhino was released to mozilla.org in april 1998. originally rhino classfile generation had been held back from release. however the licensees of rhino have now agreed to release all of rhino to open source, including class file generation. since its release to open source, rhino has found a variety of uses and an incr
easing number of people have contributed to the code. ...
JSAPI User Guide
evelopment and debugging only, because the extra garbage collection makes js very slow. use js_dumpheap to dump the spidermonkey heap or specific interesting parts of it. see spidermonkey garbage collection internals for more details. gc performance overly frequent garbage collection can be a performance issue. some applications can reduce the frequency of garbage collection simply by incr
easing the initial size of the jsruntime. perhaps the best technique is to perform garbage collection during idle time, when it is least likely to have any impact on the user. by default, the javascript engine performs garbage collection when it has no other choice except to grow the process. this means that garbage collection typically happens when memory-intensive code is running, perhaps the worst p...
Places Developer Guide
", but not places in any folder. nsinavbookmarksservice.tagsfolder - subfolders of this folder are tags, and their children are uris that have been tagged with that folder's name. other bookmarks apis note: this document covers the toolkit places services. however, firefox developers can take advantage of several helper apis that are browser-specific: fuel - a collection of wrapper apis for
easing access to a number of firefox utilities and services nsiplacestransactionsservice - a firefox service for modifying bookmarks in a transactional manner, providing facilities for undo/redo places utilities for javascript - accessors and helper functions for firefox and extensions creating bookmarks, folders and other items creating a bookmark // create an nsiuri for the url to be bookmarked. ...
An Overview of XPCOM
s base interface, and so can be used to call methods such as addref, release, or queryinterface. nsisupports, shown below, supplies the basic functionality for dealing with interface discovery and reference counting. the members of this interface, queryinterface, addref, and release, provide the basic means for getting the right interface from an object, incrementing the reference count, and rel
easing objects once they are not being used, respectively. the nsisupports interface is shown below: the nsisupports interface class sample: public nsisupports { private: nsrefcnt mrefcnt; public: sample(); virtual ~sample(); ns_imethod queryinterface(const nsiid &aiid, void **aresult); ns_imethod_(nsrefcnt) addref(void); ns_imethod_(nsrefcnt) release(void); }; the vario...
Using XPCOM Utilities to Make Things Easier
double byte version, nsembedstring, has the same functionality but the constructor takes nsastring and the .get() method returns the type prunichar*. note that prunichar is a two byte value. in the coming chapters, you'll see examples that use this version in the weblock component. smart pointers all of the interfaces that you've seen so far are reference counted. leaking a reference by not rel
easing an object, as the code below demonstrates, can be a major problem. { nsisupports* value = nsnull; object->method(&value); if (!value) return; // ... if (ns_failed(error)) return; // <------------ leaks |value| //... ns_release(value); // release our reference } a method returns an nsisupports interface pointer that has been reference counted before it is returned (assum...
Index
ry entry. 547 nsidirindexparser directories, file i/o, interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference called for each directory entry. 548 nsidirectoryenumerator directories, file i/o, interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference closes the directory being enumerated, rel
easing the system resource. it is safe to call this function many times. 549 nsidirectoryiterator directories, file i/o, interfaces, interfaces:scriptable, needscontent, xpcom interface reference the nsidirectoryiterator interface provides a way to iterate over the entries in a directory. 550 nsidirectoryservice interfaces, interfaces:scriptable, xpcom, xpcom api refe...
XPCshell Test Manifest Expressions
integers: a series of contiguous digits. only decimal integers are supported. strings: any series of characters enclosed in double quotes " or single quotes '. ...
nsAutoRef
erence to a foreign object. no copy constructor nor copy assignment operators are available, so the handle to the resource will be held until released on destruction of the nsautoref or until explicitly reset() or transferred through provided methods. in order to use nsautoref<t> for a class t associated with a particular resource type, the type of the handle to the resource and the method for rel
easing the resource must be provided for class t. this is usually done by providing a specialization of nsautoreftraits<t>. nsautoref is defined in xpcom/base/nsautoref.h. see also nsautoreftraits, nscountedref ...
nsCountedRef
ffers from nsautoref in that nscountedref constructors add a reference to the resource, and in that nscountedref provides copy construction< and assignment operators enabling more than one concurrent reference to the same resource. in order to use nscountedref<t> for a class t associated with a particular resource type, the type of the handle to the resource and the methods for referencing and rel
easing the resource must be provided for class t. this is usually done by providing a specialization of nsautoreftraits<t>. nscountedref<t> is defined in xpcom/base/nsautoref.h. see also nsautoref, nsautoreftraits ...
nsIDirectoryEnumerator
irefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void close(); attributes attribute type description nextfile nsifile the next file in the sequence. the nextfile attribute is the first element upon the first call. this attribute is null if there is no next element. read only. methods close() closes the directory being enumerated, rel
easing the system resource. it is safe to call this function many times. void close(); parameters none. exceptions thrown ns_ok if the call succeeded and the directory was closed. ns_error_failure if the directory close failed. ...
nsIMutableArray
end an element at the end of the array. void appendelement( in nsisupports element, in boolean weak ); parameters element the element to append. weak whether or not to store the element using a weak reference. exceptions thrown ns_error_failure when a weak reference is requested, but the element does not support nsiweakreference. clear() clear the entire array, rel
easing all stored objects. void clear(); parameters none. insertelementat() insert an element at the given position, moving the element currently located in that position, and all elements in higher position, up by one. void insertelementat( in nsisupports element, in unsigned long index, in boolean weak ); parameters element the element to insert. index the position in the arra...
nsITextInputProcessor
compositionstring("ab"); tip.appendclausetopendingcomposition("ab".length, tip.attr_raw_clause); tip.setcaretposition("ab".length); // this means that the second composition character is inputted by a keypress of "b" key during left shift key is down. var bkeyevent = new keyboardevent("", { key: "b", code: "keyb", keycode: keyboardevent.dom_vk_b }); tip.flushpendingcomposition(bkeyevent); // rel
easing shift key tip.keyup(shiftkeyevent); tip.setpendingcompositionstring("ab"); tip.appendclausetopendingcomposition("ab".length, tip.attr_selected_clause); tip.setcaretposition("ab".length); // this means that the composition string is converted by a keypress of "convert" key. var convertkeyevent = new keyboardevent("", { key: "convert", code: "convert" }); tip.flushpendingcomposition(convertkeye...
nsIXPConnect
wn missing exception missing description wrapnative() wrapnative() will create a new jsobject or return an existing one. the jsobject is returned inside a refcounted nsixpconnectjsobjectholder. as long as this holder is held the jsobject will be protected from collection by javascript's garbage collector. it is a good idea to transfer the jsobject to some equally protected place before rel
easing the holder (i.e., use js_setproperty to make this object a property of some other jsobject). this method now correctly deals with cases where the passed in xpcom object already has an associated jsobject for the cases: 1) the xpcom object has already been wrapped for use in the same scope as an nsixpconnectwrappednative. 2) the xpcom object is in fact an nsixpconnectwrappedjs and thus already ha...
Add to iPhoto
ase the string using cfrelease(), since we're done with it. call cfurlgetfsref() to fill out the fsref structure to reference the same file as the cfurl. if that fails, we display an error; otherwise, we cast the cfmutablearrayref into a cfarrayref by calling ctypes.cast(), then call lsopenurlswithrole() to actually send the image to iphoto. after doing that, we clean up after ourselves by rel
easing the cfurl object and the array, then shutting down the three libraries we used. downloading the image the downloadimage() method handles actually downloading the image to a temporary file; it then returns the local pathname of the downloaded file to the caller. downloadimage: function(src) { // get the file name to download from the url var filename = src.slice(src.lastindexof("/")+1); ...
Initialization and Destruction - Plugins
ich informs the plug-in that its library is about to be unloaded, and gives it a chance to cancel any outstanding i/o requests, delete threads it created, free any memory it allocated, and perform any other closing tasks. the np_shutdown function releases memory or resources shared across all instances of a plug-in. it is called once after the last instance of the plug-in is destroyed, before rel
easing the plug-in library itself. void np_shutdown(void); for an example that shows both the np_initialize and np_shutdown methods, see initialize and shutdown example. initialize and shutdown example this example demonstrates the use of the np_initialize and np_shutdown methods. /* define global variable to hold the user agent string. */ static char* useragent = null; /* initialize function. */ ...
3D view - Firefox Developer Tools
this view makes it easy to visualize the nesting of your content. by clicking and dragging the view, you can rotate and re-orient the 3d presentation of the dom hierarchy of your page to see it from different angles, to better examine its structure. ...
Debugger.Memory - Firefox Developer Tools
a short string describing the reason it determined the full gc was necessary. otherwise, null is returned. known values include the following: “gc mode” “malloc bytes trigger” “allocation trigger” “requested” gccyclenumber the gc cycle’s “number”. does not correspond to the number of gc cycles that have run, but is guaranteed to be monotonically incr
easing. function properties of the debugger.memory.prototype object memory use analysis exposes implementation details memory analysis may yield surprising results, because browser implementation details that are transparent to content javascript often have visible effects on memory consumption. web developers need to know their pages’ actual memory consumption on real browsers, so it is cor...
Index - Firefox Developer Tools
firefox developer tools is a set of web developer tools built into firefox. you can use them to examine, edit, and debug html, css, and javascript. 2 3d view html, tools, web development, web development:tools when you click on the 3d view button, the page goes into 3d view mode; in this mode, you can see your page presented in a 3d view in which nested blocks of html are incr
easingly "tall," projecting outward from the bottom of the page. this view makes it easy to visualize the nesting of your content. 3 accessibility inspector accessibility, accessibility inspector, devtools, guide, tools the accessibility inspector provides a means to access important information exposed to assistive technologies on the current page via the accessibility tree, allowi...
Animation inspector example: Web Animations API - Firefox Developer Tools
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', delay: 150 } var icon = document.getelementbyid("icon"); var note = document.getelementbyid("note"); var iconanimation = icon.animate(iconkeyframeset, iconkeyframeoptions); var noteanimation = note.animate(notekeyframeset, notekeyframeoptions); iconanimation.pause(); noteanim...
Waterfall - Firefox Developer Tools
in every frame. if you're seeing drops in the frame rate, especially during graphically-intensive operations and transitions, check the waterfall for long green markers. garbage collection red markers in the waterfall represent garbage collection (gc) events, in which spidermonkey (the javascript engine in firefox) walks the heap looking for memory that's no longer reachable and subsequently rel
easing it. gc is relevant to performance because while it's running the javascript engine must be paused, so your program is suspended and will be completely unresponsive. to help reduce the length of pauses, spidermonkey implements incremental gc: this means that it can perform garbage collection in fairly small increments, letting the program run in between. sometimes, though, it needs to perform a f...
Animation.pause() - Web APIs
wing/shrinking alice game, largely because animations created with the element.animate() method immediately start playing and must be paused manually if you want to avoid that: // animation of the cupcake slowly getting eaten up var nommingcake = document.getelementbyid('eat-me_sprite').animate( [ { transform: 'translatey(0)' }, { transform: 'translatey(-80%)' } ], { fill: 'forwards',
easing: 'steps(4, end)', duration: alicechange.effect.timing.duration / 2 }); // doesn't actually need to be eaten until a click event, so pause it initially: nommingcake.pause(); additionally, when resetting : // an all-purpose function to pause the animations on alice, the cupcake, and the bottle that reads "drink me." var stopplayingalice = function() { alicechange.pause(); nommingcake.paus...
Animation.play() - Web APIs
tapping the cake causes alice's growing animation (alicechange) to play forward, causing her to get bigger, as well as triggering the cake's animation. two animation.play()s, one eventlistener: // the cake has its own animation: var nommingcake = document.getelementbyid('eat-me_sprite').animate( [ { transform: 'translatey(0)' }, { transform: 'translatey(-80%)' } ], { fill: 'forwards',
easing: 'steps(4, end)', duration: alicechange.effect.timing.duration / 2 }); // pause the cake's animation so it doesn't play immediately. nommingcake.pause(); // this function will play when ever a user clicks or taps var growalice = function() { // play alice's animation. alicechange.play(); // play the cake's animation. nommingcake.play(); } // when a user holds their mouse down or t...
Animation.playState - Web APIs
tears should only be animating when they're visible. so they must be paused as soon as they are animated like so: // setting up the tear animations tears.foreach(function(el) { el.animate( tearsfalling, { delay: getrandommsrange(-1000, 1000), // randomized for each tear duration: getrandommsrange(2000, 6000), // randomized for each tear iterations: infinity,
easing: 'cubic-bezier(0.6, 0.04, 0.98, 0.335)' }); el.pause(); }); // play the tears falling when the ending needs to be shown. tears.foreach(function(el) { el.play(); }); // reset the crying tears animations and pause them. tears.foreach(function(el) { el.pause(); el.currenttime = 0; }); specifications specification status comment web animationsthe definit...
AudioContext.close() - Web APIs
closed contexts cannot have new nodes created, but can decode audio data, create buffers, etc. this function does not automatically release all audiocontext-created objects, unless other references have been released as well; however, it will forcibly release any system audio resources that might prevent additional audiocontexts from being created and used, suspend the progression of audio time in the audio context, and stop processing audio data. the returned promise resolves when all audiocontext-creation-blocking resources have been released. ...
AudioContext - Web APIs
eturns the number of seconds of processing latency incurred by the audiocontext passing the audio from the audiodestinationnode to the audio subsystem. audiocontext.outputlatency read only returns an estimation of the output latency of the current audio context. methods also inherits methods from its parent interface, baseaudiocontext. audiocontext.close() closes the audio context, rel
easing any system audio resources that it uses. audiocontext.createmediaelementsource() creates a mediaelementaudiosourcenode associated with an htmlmediaelement. this can be used to play and manipulate audio from <video> or <audio> elements. audiocontext.createmediastreamsource() creates a mediastreamaudiosourcenode associated with a mediastream representing an audio stream which may come from the ...
AudioWorkletGlobalScope - Web APIs
audioworklet property, which runs its code in a single audioworkletglobalscope. as the global execution context is shared across the current baseaudiocontext, it's possible to define any other variables and perform any actions allowed in worklets — apart from defining audioworkletprocessor-derived classes. properties currentframe read only returns an integer that represents the ever-incr
easing current sample-frame of the audio block being processed. it is incremented by 128 (the size of a render quantum) after the processing of each audio block. currenttime read only returns a double that represents the ever-incr
easing context time of the audio block being processed. it is equal to the currenttime property of the baseaudiocontext the worklet belongs to. samplerate read only retur...
BaseAudioContext.currentTime - Web APIs
it starts at 0. syntax var curtime = baseaudiocontext.currenttime; example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // older webkit/blink browsers require a prefix ... console.log(audioctx.currenttime); reduced time precision to offer protection against timing attacks and fingerprinting, the precision of audioctx.currenttime might get rounded depending on browser settings. ...
BaseAudioContext - Web APIs
#0095dd; pointer-events: all;} properties baseaudiocontext.audioworklet read only secure context returns the audioworklet object, which can be used to create and manage audionodes in which javascript code implementing the audioworkletprocessor interface are run in the background to process audio data. baseaudiocontext.currenttime read only returns a double representing an ever-incr
easing hardware time in seconds used for scheduling. it starts at 0. baseaudiocontext.destination read only returns an audiodestinationnode representing the final destination of all audio in the context. it can be thought of as the audio-rendering device. baseaudiocontext.listener read only returns the audiolistener object, used for 3d spatialization. baseaudiocontext.samplerate read only retur...
CanvasRenderingContext2D.globalAlpha - Web APIs
laying transparent shapes this example illustrates the effect of overlaying multiple transparent shapes on top of each other. we begin by drawing a solid background composed of four differently colored squares. next, we set the globalalpha property to 0.2 (20% opaque); this alpha level will apply to all of our transparent shapes. after that, we use a for loop to draw a series of circles with incr
easing radii. with each new circle, the opacity of the previous circles underneath is effectively increased. if we were to increase the step count (and thus draw more circles), the background would eventually disappear completely from the center of the image. <canvas id="canvas" width="150" height="150"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d');...
CanvasRenderingContext2D.shadowBlur - Web APIs
r applied to shadows. the default is 0 (no blur). note: shadows are only drawn if the shadowcolor property is set to a non-transparent value. one of the shadowblur, shadowoffsetx, or shadowoffsety properties must be non-zero, as well. syntax ctx.shadowblur = level; level a non-negative float specifying the level of shadow blur, where 0 represents no blur and larger numbers represent incr
easingly more blur. this value doesn't correspond to a number of pixels, and is not affected by the current transformation matrix. the default value is 0. negative, infinity, and nan values are ignored. examples adding a shadow to a shape this example adds a blurred shadow to a rectangle. the shadowcolor property sets its color, and shadowblur sets its level of bluriness. html <canvas id="canvas">...
Detecting device orientation - Web APIs
in particular, hand-held devices such as mobile phones can use this information to automatically rotate the display to remain upright, presenting a wide-screen view of the web content when the device is rotated so that its width is greater than its height. there are two javascript events that handle orientation information. the first one is the deviceorientationevent, which is sent when the accelerometer detects a change to the orientation of the device. ...
Document: dragend event - Web APIs
bubbles yes cancelable no default action varies interface dragevent event handler property ondragend examples see the drag event for example code or this jsfiddle demo. ...
Document - Web APIs
so available via the oncut property. paste fired when the user initiates a paste action through the browser's user interface. also available via the onpaste property. drag & drop events drag fired every few hundred milliseconds as an element or text selection is being dragged by the user. also available via the ondrag property. dragend fired when a drag operation is being ended (by rel
easing a mouse button or hitting the escape key). also available via the ondragend property. dragenter fired when a dragged element or text selection enters a valid drop target. also available via the ondragenter property. dragexit fired when an element is no longer the drag operation's immediate selection target. also available via the ondragexit property. dragleave fired when a dragged elemen...
DragEvent - Web APIs
reate a useful datatransfer object from script, since datatransfer objects have a processing and security model that is coordinated by the browser during drag-and-drops. dragevent() creates a synthetic and untrusted dragevent. event types drag this event is fired when an element or text selection is being dragged. dragend this event is fired when a drag operation is being ended (by rel
easing a mouse button or hitting the escape key). dragenter this event is fired when a dragged element or text selection enters a valid drop target. dragexit this event is fired when an element is no longer the drag operation's immediate selection target. dragleave this event is fired when a dragged element or text selection leaves a valid drop target. dragover this event is fired continuously w...
EffectTiming.direction - Web APIs
ce toward the beginning the first iteration, then goes forward during the second, and so forth. examples in the forgotten key example, alice waves her arm up and down by passing her an alternate value for her direction property: // get alice's arm, and wave it up and down document.getelementbyid("alice_arm").animate([ { transform: 'rotate(10deg)' }, { transform: 'rotate(-40deg)' } ], {
easing: 'steps(2, end)', iterations: infinity, direction: 'alternate', duration: 600 }); specifications specification status comment web animationsthe definition of 'direction' in that specification. working draft editor's draft. ...
EffectTiming.iterations - Web APIs
egative number or nan. the property's value is left unchanged. examples in the forgotten key example, alice waves her arm up and down the entire time the page is open by passing infinity as the value for her iterations property: // get alice's arm, and wave it up and down document.getelementbyid("alice_arm").animate([ { transform: 'rotate(10deg)' }, { transform: 'rotate(-40deg)' } ], {
easing: 'steps(2, end)', iterations: infinity, direction: 'alternate', duration: 600 }); specifications specification status comment web animationsthe definition of 'iterations' in that specification. working draft editor's draft. ...
EffectTiming - Web APIs
, backwards (reverse), switches direction after each iteration (alternate), or runs backwards and switches direction after each iteration (alternate-reverse). defaults to "normal". duration optional the number of milliseconds each iteration of the animation takes to complete. defaults to 0. although this is technically optional, keep in mind that your animation will not run if this value is 0.
easing optional the rate of the animation's change over time. accepts the pre-defined values "linear", "ease", "ease-in", "ease-out", and "ease-in-out", or a custom "cubic-bezier" value like "cubic-bezier(0.42, 0, 0.58, 1)". defaults to "linear". enddelay optional the number of milliseconds to delay after the end of an animation. this is primarily of use when sequencing animations based on the end ti...
Element.animate() - Web APIs
, backwards (reverse), switches direction after each iteration (alternate), or runs backwards and switches direction after each iteration (alternate-reverse). defaults to "normal". duration optional the number of milliseconds each iteration of the animation takes to complete. defaults to 0. although this is technically optional, keep in mind that your animation will not run if this value is 0.
easing optional the rate of the animation's change over time. accepts the pre-defined values "linear", "ease", "ease-in", "ease-out", and "ease-in-out", or a custom "cubic-bezier" value like "cubic-bezier(0.42, 0, 0.58, 1)". defaults to "linear". enddelay optional the number of milliseconds to delay after the end of an animation. this is primarily of use when sequencing animations based on the end ti...
Gamepad.timestamp - Web APIs
the gamepad.timestamp property of the gamepad interface returns a domhighrestimestamp representing the last time the data for this gamepad was updated. the idea behind this is to allow developers to determine if the axes and button data have been updated from the hardware. the value must be relative to the navigationstart attribute of the performancetiming interface. values are monotonically incr
easing, meaning that they can be compared to determine the ordering of updates, as newer values will always be greater than or equal to older values. note: this property is not currently supported anywhere. syntax readonly attribute domhighrestimestamp timestamp; example var gp = navigator.getgamepads()[0]; console.log(gp.timestamp); value a domhighrestimestamp. specifications spe...
Using the Gamepad API - Web APIs
sition from the lowest value (-1.0) to the highest value (1.0). timestamp: this returns a domhighrestimestamp representing the last time the data for this gamepad was updated, allowing developers to determine if the axes and button data have been updated from the hardware. the value must be relative to the navigationstart attribute of the performancetiming interface. values are monotonically incr
easing, meaning that they can be compared to determine the ordering of updates, as newer values will always be greater than or equal to older values. note that this property is not currently supported in firefox. note: the gamepad object is available on the gamepadconnected event rather than the window object itself, for security reasons. once we have a reference to it, we can query its properties fo...
IDBCursorWithValue - Web APIs
the idbcursorwithvalue interface of the indexeddb api represents a cursor for traversing or iterating over multiple records in a database. it is the same as the idbcursor, except that it includes the value property. the cursor has a source that indicates which index or object store it is iterating over. it has a position within the range, and moves in a direction that is incr
easing or decr
easing in the order of record keys. the cursor enables an application to asynchronously process all the records in the cursor's range. you can have an unlimited number of cursors at the same time. you always get the same idbcursorwithvalue object representing a given cursor. operations are performed on the underlying index or object store. note: this feature is available in web workers. <div id="interf...
Basic concepts - Web APIs
iting transactions cannot overlap. you can still start several transactions with the same scope at the same time, but they just queue up and execute one after another. cursor a mechanism for iterating over multiple records with a key range. the cursor has a source that indicates which index or object store it is iterating. it has a position within the range, and moves in a direction that is incr
easing or decr
easing in the order of record keys. for the reference documentation on cursors, see idbcursor. key range a continuous interval over some data type used for keys. records can be retrieved from object stores and indexes using keys or a range of keys. you can limit or filter the range using lower and upper bounds. for example, you can iterate over all values of a key between x and y. fo...
IntersectionObserver.thresholds - Web APIs
sholds = intersectionobserver.thresholds; value an array of intersection thresholds, originally specified using the threshold property when instantiating the observer. if only one observer was specified, without being in an array, this value is a one-entry array containing that threshold. regardless of the order your original threshold array was in, this one is always sorted in numerically incr
easing order. if no threshold option was included when intersectionobserver() was used to instantiate the observer, the value of thresholds is simply [0]. be careful! although the options object you can specify when creating an intersectionobserver has a field named threshold, this property is called thresholds. confusing? yes. if you accidentally use thresholds as the name of the field in your optio...
IntersectionObserver - Web APIs
y 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 0px". intersectionobserver.thresholds read only a list of thresholds, sorted in incr
easing numeric order, where each threshold is a ratio of intersection area to bounding box area of an observed target. notifications for a target are generated when any of the thresholds are crossed for that target. if no value was passed to the constructor, 0 is used. methods intersectionobserver.disconnect() stops the intersectionobserver object from observing any target. intersectionobserver.o...
KeyframeEffect.KeyframeEffect() - Web APIs
, backwards (reverse), switches direction after each iteration (alternate), or runs backwards and switches direction after each iteration (alternate-reverse). defaults to "normal". duration optional the number of milliseconds each iteration of the animation takes to complete. defaults to 0. although this is technically optional, keep in mind that your animation will not run if this value is 0.
easing optional the rate of the animation's change over time. accepts the pre-defined values "linear", "ease", "ease-in", "ease-out", and "ease-in-out", or a custom "cubic-bezier" value like "cubic-bezier(0.42, 0, 0.58, 1)". defaults to "linear". enddelay optional the number of milliseconds to delay after the end of an animation. this is primarily of use when sequencing animations based on the end ti...
KeyframeEffect.getKeyframes() - Web APIs
uivalent to specifying start and end states in percentages in css stylesheets using @keyframes. this will be null if the keyframe is automatically spaced using keyframeeffect.spacing. computedoffset the computed offset for this keyframe, calculated when the list of computed keyframes was produced according to keyframeeffect.spacing. unlike offset, above, the computedoffset is never null.
easing the timing function used from this keyframe until the next keyframe in the series. composite the keyframeeffect.composite operation used to combine the values specified in this keyframe with the underlying value. this will be absent if the composite operation specified on the effect is being used. examples in the red queen race example, we can inspect alice and the redqueen's animat...
KeyframeEffectOptions - Web APIs
, backwards (reverse), switches direction after each iteration (alternate), or runs backwards and switches direction after each iteration (alternate-reverse). defaults to "normal". duration optional the number of milliseconds each iteration of the animation takes to complete. defaults to 0. although this is technically optional, keep in mind that your animation will not run if this value is 0.
easing optional the rate of the animation's change over time. accepts the pre-defined values "linear", "ease", "ease-in", "ease-out", and "ease-in-out", or a custom "cubic-bezier" value like "cubic-bezier(0.42, 0, 0.58, 1)". defaults to "linear". enddelay optional the number of milliseconds to delay after the end of an animation. this is primarily of use when sequencing animations based on the end ti...
MediaPositionState.playbackRate - Web APIs
multiplier corresponding to the current relative rate at which the media being performed is playing. a value of 1.0 indicates the media is playing forward at normal speed, while higher values indicate that the media is being played faster than normal. lower values indicate the media is being played more slowly. negative values can be specified to indicate the media is playing in reverse, with decr
easing values then indicating faster and faster reverse playback. note: a value of 0.0 is not permitted. example in this example, an app is updating the browser to let it know that the user has clicked a button causing the playback to shift to a double-speed mode. it begins by creating a mediapositionstate object, then submits it to the browser it by calling navigator.mediasession.setpositionstate(...
MouseEvent.buttons - Web APIs
mple, if the secondary (2) and auxilary (4) buttons are pressed simultaneously, the value is 6 (i.e., 2 + 4). note: do not confuse this property with the mouseevent.button property. the mouseevent.buttons property indicates the state of buttons pressed during any kind of mouse event, while the mouseevent.button property only guarantees the correct value for mouse events caused by pressing or rel
easing one or multiple buttons. syntax var buttonspressed = instanceofmouseevent.buttons return value a number representing one or more buttons. for more than one button pressed simultaneously, the values are combined (e.g., 3 is primary + secondary). 0 : no button or un-initialized 1 : primary button (usually the left button) 2 : secondary button (usually the right button) 4 : auxiliary...
PannerNode.rolloffFactor - Web APIs
lows (negative values are not allowed): "linear" the range is 0 to 1. "inverse" the range is 0 to infinity. "exponential" the range is 0 to infinity. exceptions rangeerror the property has been given a value that is outside the accepted range. ...
Performance API - Web APIs
h of a millisecond (subject to hardware or software constraints). the interfaces support a number of use cases including calculating frame-rates (potentially important in animations) and benchmarking (such as the time to load a resource). since a platform's system clock is subject to various skews (such as ntp adjustments), the interfaces support a monotonic clock i.e. a clock that is always incr
easing. as such, the performance api defines a domhighrestimestamp type rather than using the date.now() interface. domhighrestimestamp the domhighrestimestamp type, as its name implies, represents a high resolution point in time. this type is a double and is used by the performance interfaces. the value could be a discrete point in time or the difference in time between two discrete points in time. ...
RTCConfiguration.certificates - Web APIs
why you might want to—or not to—explicitly provide certificates. description if this property isn't included in the configuration, a set of certificates is automatically generated for each instance of rtcpeerconnection. although a given dtls connection only uses a single certificate, providing multiple options in the certificates list may improve the odds of establishing a connection by incr
easing the chances a mutually-compatible encryption algorithm and key size may be found. the method by which a browser decides which certificate to use is implementation-dependent. some browsers may simply choose the first listed certificate and ignore the rest of the list; others may take a different approach. using certificates when you wish to provide your own certificates for use by an rtcpeercon...
RTCInboundRtpStreamStats.pliCount - Web APIs
his information is only available for video streams. this may trigger the sender to send a full frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media. however, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues. this is often achieved by methods such as incr
easing the compression, lowering resolution, or finding other ways to reduce the bit rate of the stream. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.plicount' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.pliCount - Web APIs
upon receiving a pli packet, the sender may have responded by sending a full frame to the remote peer to allow it to re-synchronize with the media. however, the primary purpose of a pli packet is to allow the rtcrtpsender for which this rtcoutboundrtpstreamstats object provides statistics to consider techniques to mitigate network performance issues. this is often achieved by methods such as incr
easing the compression or lowering resolution, although the mechanisms available to reduce the bit rate of the stream vary from codec to codec. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.plicount' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.pliCount - Web APIs
ata, which may span frame boundaries, has been lost. this may trigger the sender to send a full frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media. however, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues. this is often achieved by methods such as incr
easing the compression, lowering resolution, or finding other ways to reduce the bit rate of the stream. note: this value is only available on the receiver, and only for video media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: plicount' in that specification. candidate recommendation in...
Screen Wake Lock API - Web APIs
wakelock.release() .then(() => { wakelock = null; }); listening for wake lock release this example updates the ui if the wake lock has been released for any reason (such as navigating away from the active window/tab). wakelock.addeventlistener('release', () => { // the wake lock has been releas...
Using Touch Events - Web APIs
touch surface with one finger, the list would contain one item, and if the user touched the surface with three fingers, the list length would be three. the touchevent interface represents an event sent when the state of contacts with a touch-sensitive surface changes. the state changes are starting contact with a touch surface, moving a touch point while maintaining contact with the surface, rel
easing a touch point and canceling a touch event. this interface's attributes include the state of several modifier keys (for example the shift key) and the following touch lists: touches - a list of all of the touch points currently on the screen. targettouches - a list of the touch points on the target dom element. changedtouches - a list of the touch points whose items depends on the associated ...
WakeLockSentinel - Web APIs
e manually released and reacquired. an object representing the wake lock is returned via the navigator.wakelock.request() method. an acquired wakelocksentinel can be released manually via the release() method, or automatically via the platform wake lock. this can happen if the document becomes inactive or looses visibility, if the device is low on power or the user turns on a power save mode. rel
easing all wakelocksentinel instances of a given wake lock type will cause the underlying platform wake lock to be released. properties this interface provides the following properties. type read only returns a string representation of the currently acquired wakelocksentinel type. return values are: 'screen': a screen wake lock. prevents devices from dimming or locking the screen. even...
WebGL by example - Web APIs
next » webgl by example is a series of live samples with short explanations that showcase webgl concepts and capabilities. the examples are sorted according to topic and level of difficulty, covering the webgl rendering context, shader programming, textures, geometry, user interaction, and more. examples by topic the examples are sorted in order of incr
easing difficulty. but rather than just presenting them in a single long list, they are additionally divided into topics. sometimes we revisit a topic several times, such as when needing to discuss it initially at a basic level, and later at intermediate and advanced levels. instead of trying to juggle shaders, geometry, and working with gpu memory, already in the first program, the examples here explore webgl in an incremental wa...
WebGL best practices - Web APIs
tively low, but re-using vaos means fewer vertexattribpointer calls too, so it's worth doing wherever it's easy. delete objects eagerly don't wait for the garbage collector/cycle collector to realize objects are orphaned and destroy them. implementations track the liveness of objects, so 'deleting' them at the api level only releases the handle that refers to the actual object. (conceptually rel
easing the handle's ref-pointer to the object) only once the object is unused in the implementation is it actually freed. for example, if you never want to access your shader objects directly again, just delete their handles after attaching them to a program object. eagerly lose contexts too webgl_lose_context.losecontext() can be used to release a webgl context and its resources eagerly. use this if ...
Geometry and reference spaces in WebXR - Web APIs
it's time to render an animation frame, the callback function specified when you called the webxr session's xrsession object's requestanimationframe() method is invoked. the callback receives as one of its parameters a timestamp indicating the time at which the frame takes place, and should perform all rendering for the corresponding animation frame. as the callback is repeatedly called with incr
easing time values, the callback generates a sequence of frames which are presented using the xr hardware, thereby showing a 3d scene to the user. you can learn more about the animation process in the article rendering and the webxr frame animation callback. for an example and a more detailed, code-level explanation of how to position, orient, and move objects in virtual space, see the article movemen...
Lighting a WebXR setting - Web APIs
webgl and other lighting systems. between the law of reflection and the fact that the brightness of the light rays decreases with distance, the light emitted by a point source and reflected back tends to be brightest at the closest point to the light source and dimmer the farther away it is. even if the surface is flat, the closest point to the light source is the center, with rays becoming incr
easingly long as the angle away from the normal changes. photo of a spotlight shining upon a stucco wall at night. spot light sources a spot light source (or spotlight) is a light source which is located at a specific position, emitting a cone of light in the direction of its orientation vector. a tapering rate parameter defines how quickly the brightness of the light falls off at the edges o...
Movement, orientation, and motion: A WebXR example - Web APIs
e_speed; if (mousepitch < -math.pi * 0.5) { mousepitch = -math.pi * 0.5; } else if (mousepitch > math.pi * 0.5) { mousepitch = math.pi * 0.5; } } given as input the mouse deltas, dx and dy, the new yaw value is computed by subtracting from the current value of mouseyaw the product of dx and the mouse_speed scaling constant. you can, then, control how responsive the mouse is by incr
easing the value of mouse_speed. drawing a frame our callback for xrsession.requestanimationframe() is implemented in the drawframe() function shown below. its job is to obtain the viewer's reference space, compute how much movement needs to be applied to any animated objects given the amount of time that's elapsed since the last frame, and then to render each of the views specified by the viewer's xr...
Web Authentication API - Web APIs
entication api (also referred to as webauthn) uses asymmetric (public-key) cryptography instead of passwords or sms texts for registering, authenticating, and second-factor authentication with websites. this resolves significant security problems related to phishing, data breaches, and attacks against sms texts or other second-factor authentication methods while at the same time significantly incr
easing ease of use (since users don't have to manage dozens of incr
easingly complicated passwords). many websites already have pages that allow users to register new accounts or sign in to an existing account, and the web authentication api acts as a replacement or supplement to those on those existing webpages. similar to the other forms of the credential management api, the web authentication api has...
Using Web Workers - Web APIs
ured to display the results by setting the contents of the div element, and the onerror handler is set to dump the error message. finally, a message is sent to the worker to start it. try this example live. performing web i/o in the background you can find an example of this in the article using workers in extensions . dividing tasks among multiple workers as multi-core computers become incr
easingly common, it's often useful to divide computationally complex tasks among multiple workers, which may then perform those tasks on multiple-processor cores. other types of worker in addition to dedicated and shared web workers, there are other types of worker available: serviceworkers essentially act as proxy servers that sit between web applications, and the browser and network (when availab...
Window - Web APIs
the url after the hash mark ("#") changes. globaleventhandlers.oninput called when the value of an <input> element changes globaleventhandlers.onkeydown called when you begin pressing any key. see keydown event. globaleventhandlers.onkeypress called when a key (except shift, fn, and capslock) is in pressed position. see keypress event. globaleventhandlers.onkeyup called when you finish rel
easing any key. see keyup event. windoweventhandlers.onlanguagechange an event handler property for languagechange events on the window. globaleventhandlers.onload called after all resources and the dom are fully loaded. will not get called when the page is loaded from cache, such as with back button. windoweventhandlers.onmessage is an eventhandler representing the code to be called when the mess...
Web applications and ARIA FAQ - Accessibility
currently work? internet explorer 8+ works with jaws 10+ and nvda. no live region support in nvda. ie9 support is much improved. in some cases, earlier versions may support only some features of aria. more detailed browser compatibility charts are available from multiple sources: caniuse.com the paciello group assistive technologies assistive technologies are incr
easingly adopting aria. some of them include: assistive technology minimum version for basic aria minimum version for live region and alert support nvda 2010.2 (nvda is always a free upgrade) 2011.1 for firefox, no live region support in ie as of 2011.2. orca ? (tbd) ? (tbd) voiceover osx 10.5, ios 4 os x 10.7 ios 5 jaws ...
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
to zero size during this removal of negative free space. the items will be floored at their min-content size — the size that they become if they take advantage of any soft wrapping opportunities available to them. you can see this min-content flooring happen in the below example, where the flex-basis is resolving to the size of the content. if you change the width on the flex container — incr
easing it to 700px for example — and then reduce the flex item width, you can see that the first two items will wrap, however they will never become smaller than that min-content size. as the box gets smaller space is then just removed from the third item. in practice the shrinking behaviour does tend to give you reasonable results. you don’t usually want your content to disappear completely or f...
Basic Shapes - CSS: Cascading Style Sheets
the keyword at followed by a position value. in the below example i have created a circle on an item with a width of 100 pixels, plus a margin of 20 pixels. this gives a total width for the reference box of 140 pixels. i have given a value of 50% for the shape-radius value which means that our radius is 70px. i have then set the position value to 30%. in the live example you can play with incr
easing or decr
easing the size of the circle by changing the size of the radius, moving the circle around with the position value, or setting a reference box as we did for inset(). as an additional example, if you use the keywords top left for position, you can make a quarter circle shape in the top left corner of the page. the example below uses generated content to create a quarter circle shape for te...
Using CSS transitions - CSS: Cascading Style Sheets
(updatetransition, 7000); transition-timing-function specifies a function to define how intermediate values for properties are computed. timing functions determine how intermediate values of the transition are calculated. most timing functions can be specified by providing the graph of the corresponding function, as defined by four points defining a cubic bezier. you can also choose
easing from
easing functions cheat sheet. transition-timing-function: ease <div class="parent"> <div class="box">lorem</div> </div> .parent { width: 250px; height:125px;} .box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position: absolute; -webkit-transition-property: width height background-color font-size ...
animation-timing-function - CSS: Cascading Style Sheets
s and a step position. ease equal to cubic-bezier(0.25, 0.1, 0.25, 1.0), the default value, increases in velocity towards the middle of the animation, slowing back down at the end. linear equal to cubic-bezier(0.0, 0.0, 1.0, 1.0), animates at an even speed. ease-in equal to cubic-bezier(0.42, 0, 1.0, 1.0), starts off slowly, with the speed of the transition of the animating properting incr
easing until complete. ease-out equal to cubic-bezier(0, 0, 0.58, 1.0), starts quickly, slowing down the animation continues. • ease-in-out equal to cubic-bezier(0.42, 0, 0.58, 1.0), with the animating properties slowly transitioning, speeding up, and then slowing down again. cubic-bezier(p1, p2, p3, p4) an author defined cubic-bezier curve, where the p1 and p3 values must be in the range of 0 t...
linear-gradient() - CSS: Cascading Style Sheets
her the vertical side (top or bottom). the order of the side keywords does not matter. if unspecified, it defaults to to bottom. the values to top, to bottom, to left, and to right are equivalent to the angles 0deg, 180deg, 270deg, and 90deg, respectively. the other values are translated into an angle. <angle> the gradient line's angle of direction. a value of 0deg is equivalent to to top; incr
easing values rotate clockwise from there. <linear-color-stop> a color-stop's <color> value, followed by one or two optional stop positions, (each being either a <percentage> or a <length> along the gradient's axis). <color-hint> the color-hint is an interpolation hint defining how the gradient progresses between adjacent color stops. the length defines at which point between two color stops the gra...
offset-path - CSS: Cascading Style Sheets
url() references the id of an svg shape -- circle, ellipse, line, path, polygon, polyline, or rect -- using the shape's geometry as the path. <basic-shape> specifies a css shape including circle(), ellipse(), inset(), polygon(), or...
repeating-linear-gradient() - CSS: Cascading Style Sheets
ther the vertical side (top or bottom). the order of the side keywords does not matter. if unspecified, it defaults to to bottom. the values to top, to bottom, to left, and to right are equivalent to the angles 0deg, 180deg, 270deg, and 90deg respectively. the other values are translated into an angle. <angle> the gradient line's angle of direction. a value of 0deg is equivalent to to top; incr
easing values rotate clockwise from there. <linear-color-stop> a color-stop's <color> value, followed by one or two optional stop positions, (each being either a <percentage> or a <length> along the gradient's axis). a percentage of 0%, or a length of 0, represents the start of the gradient; the value 100% is 100% of the image size, meaning the gradient will not repeat. <color-hint> th color-hint is...
text-overflow - CSS: Cascading Style Sheets
therefore the truncation can happen in the middle of a character. to clip at the transition between characters you can specify text-overflow as an empty string, if that is supported in your target browsers: text-overflow: '';. ellipsis this keyword value will display an ellipsis ('…', u+2026 horizontal ellipsis) to represent clipped text. the ellipsis is displayed inside the content area, decr
easing the amount of text displayed. if there is not enough space to display the ellipsis, it is clipped. <string> the <string> to be used to represent clipped text. the string is displayed inside the content area, shortening the size of the displayed text. if there is not enough space to display the string itself, it is clipped. fade this keyword clips the overflowing inline content and applies...
transition-timing-function - CSS: Cascading Style Sheets
ined by a number of steps and a step position. ease equal to cubic-bezier(0.25, 0.1, 0.25, 1.0), the default value, increases in velocity towards the middle of the transition, slowing back down at the end. linear equal to cubic-bezier(0.0, 0.0, 1.0, 1.0), transitions at an even speed. ease-in equal to cubic-bezier(0.42, 0, 1.0, 1.0), starts off slowly, with the transition speed incr
easing until complete. ease-out equal to cubic-bezier(0, 0, 0.58, 1.0), starts transitioning quickly, slowing down the transition continues. • ease-in-out equal to cubic-bezier(0.42, 0, 0.58, 1.0), starts transitioning slowly, speeds up, and then slows down again. cubic-bezier(p1, p2, p3, p4) an author defined cubic-bezier curve, where the p1 and p3 values must be in the range of 0 to 1. ...
Creating a cross-browser video player - Developer guides
tton that uses the media api's muted attribute to mute the video: this is a boolean indicating whether the video is muted or not. to get it to toggle, we set it to the inverse of itself. volume volinc.addeventlistener('click', function(e) { altervolume('+'); }); voldec.addeventlistener('click', function(e) { altervolume('-'); }); two volume control buttons have been defined, one for incr
easing the volume and another for decr
easing it. a user defined function, altervolume(direction) has been created that deals with this: var altervolume = function(dir) { var currentvolume = math.floor(video.volume * 10) / 10; if (dir === '+') { if (currentvolume < 1) video.volume += 0.1; } else if (dir === '-') { if (currentvolume > 0) video.volume -= 0.1; } } this function...
HTML5 - Developer guides
manipulation of new multimedia content. forms improvements a look at the constraint validation api, several new attributes, new values for the <input> attribute type and the new <output> element. new semantic elements beside sections, media and forms elements, there are numerous new elements, like <mark>, <figure>, <figcaption>, <data>, <time>, <output>, <progress>, or <meter> and <main>, incr
easing the number of valid html5 elements. improvement in <iframe> using the sandbox and srcdoc attributes, authors can now be precise about the level of security and the wished rendering of an <iframe> element. mathml allows directly embedding mathematical formulas. introduction to html5 this article introduces how to indicate to the browser that you are using html5 in your web design or web appl...
Index - Developer guides
ansforms. 27 graphics on the web 2d, 3d, canvas, graphics, html5, svg, web, webgl, webrtc websites and applications often need to present graphics, such as images.these articles provide insight into how you can accomplish this. 28 guide to web apis api, guide, landing, web the web includes a wide array of apis that can be used from javascript to build incr
easingly more powerful and capable applications, running either on the web, locally, or through technology such as node.js, on a server. on this page you'll find a complete list of all of the apis provided by the full web technology stack. 29 index guide, index found 31 pages: 30 introduction to web development beginner, css, codingscripting, development, html, javasc...
The HTML autocomplete attribute - HTML: Hypertext Markup Language
ven when the autocomplete attribute would normally not apply by virtue of its type. see bug 654072. examples <div> <label for="cc-number">enter your credit card number</label> <input name="cc-number" id="cc-number" autocomplete="off"> </div> administrative levels in addresses the four administrative level fields (address-level1 through address-level4) describe the address in terms of incr
easing levels of precision within the country in which the address is located. each country has its own system of administrative levels, and may arrange the levels in different orders when addresses are written. address-level1 always represents the broadest administrative division; it is the least-specific portion of the address short of the country name. form layout flexibility given that different ...
<ol>: The Ordered List element - HTML: Hypertext Markup Language
list items display with a preceding marker, such as a number or letter. the <ol> and <ul> elements may nest as deeply as desired, alternating between <ol> and <ul> however you like. the <ol> and <ul> elements both represent a list of items. the difference is with the <ol> element, the order is meaningful. for example: steps in a recipe turn-by-turn directions the list of ingredients in decr
easing proportion on nutrition information labels to determine which list to use, try changing the order of the list items; if the meaning changes, use the <ol> element — otherwise you can use <ul>. examples simple example <ol> <li>fee</li> <li>fi</li> <li>fo</li> <li>fum</li> </ol> the above html will output: using roman numeral type <ol type="i"> <li>introduction</li> <li>list...
Global attributes - HTML: Hypertext Markup Language
if several elements share the same tabindex, their relative order follows their relative positions in the document. title contains a text representing advisory information related to the element it belongs to. such information can typically, but not necessarily, be presented to the user as a tooltip. translate an enumerated attribute that is used to specify whethe...
Identifying resources on the Web - HTTP
presents. it is worth noting that the part after the #, also known as fragment identifier, is never sent to the server with the request. usage notes when using urls in html content, you should generally only use a few of these url schemes. when referring to subresources — that is, files that are being loaded as part of a larger document — you should only use the http and https schemes. incr
easingly, browsers are removing support for using ftp to load subresources, for security reasons. ftp is still acceptable at the top level (such as typed directly into the browser's url bar, or the target of a link), although some browsers may delegate loading ftp content to another application. examples https://developer.mozilla.org/docs/learn tel:+1-816-555-1212 git@github.com:mdn/browser-compat-da...
Browser detection using the user agent - HTTP
the user agent screen only if (!("maxtouchpoints" in navigator)) { /*code here*/}. using this information of whether the device has a touchscreen, do not change the entire layout of the website just for touch devices: you will only create more work and maintenance for yourself. rather, add in touch conveniences such as bigger, more easily clickable buttons (you can do this using css by simply incr
easing the font size). here is an example of code that increases the padding of #examplebutton to 1em on mobile devices. var hastouchscreen = false; if ("maxtouchpoints" in navigator) { hastouchscreen = navigator.maxtouchpoints > 0; } else if ("msmaxtouchpoints" in navigator) { hastouchscreen = navigator.msmaxtouchpoints > 0; } else { var mq = window.matchmedia && matchmedia("(pointer:coa...
HTTP caching - HTTP
. use this header to define your caching policies with the variety of directives it provides. no caching the cache should not store anything about the client request or server response. a request is sent to the server and a full response is downloaded each and every time. cache-control: no-store cache but revalidate a cache will send the request to the origin server for validation before rel
easing a cached copy. cache-control: no-cache private and public caches the "public" directive indicates that the response may be cached by any cache. this can be useful if pages with http authentication, or response status codes that aren't normally cacheable, should now be cached. on the other hand, "private" indicates that the response is intended for a single user only and must not be stored by ...
Pragma - HTTP
y with http/1.0 clients. header type general header, but response behavior is not specified and thus implementation-specific. forbidden header name no cors-safelisted response header yes syntax pragma: no-cache directives no-cache same as cache-control: no-cache. forces caches to submit the request to the origin server for validation before rel
easing a cached copy. examples pragma: no-cache specifications specification title rfc 7234, section 5.4: pragma hypertext transfer protocol (http/1.1): caching ...
Examples - MathML
pythagorean theorem small example showing a proof of the pythagorean theorem. ...
MathML documentation index - MathML
ur document contains advanced structures like lists or tables but fortunately there are many generators from simple notations, wysiwyg editors and other content management systems to help writing web pages. 3 examples beginner, example, guide, mathml, needsbeginnerupdate below you'll find some examples you can look at to help you to understand how to use mathml to display incr
easingly complex mathematical concepts in web content. 4 mathml: deriving the quadratic formula beginner, education, example, guide, html5, mathml, needsbeginnerupdate this page outlines the derivation of the quadratic formula. 5 proving the pythagorean theorem beginner, example, guide, html5 math, math education, mathml, needsbeginnerupdate we will now prove th...
Web audio codec guide - Web media technologies
irectly (by making the audio waveform more complicated and therefore difficult to reduce in size while maintaining precision). hiss, static, or background noise increases the audio complexity, which generally reduces the amount of compression which is possible. sample rate the more samples available per second, the higher the resulting encoded audio fidelity is likely to be. incr
easing the sample rate increases the encoded audio file's size. sample size the larger the samples, the more detail each sample can contain, resulting in more accurate representation of each sample. depends on the codec; codecs typically have an internal sample format that may or may not be the same as the original sample size. but more source detail may make the encoded file larger; it w...
Web video codec guide - Web media technologies
he aomedia video 1 (av1) codec is an open format designed by the alliance for open media specifically for internet video. it achieves higher data compression rates than vp9 and h.265/hevc, and as much as 50% higher rates than avc. av1 is fully royalty-free and is designed for use by both the <video> element and by webrtc. av1 currently offers three profiles: main, high, and professional with incr
easing support for color depths and chroma subsampling. in addition, a series of levels are specified, each defining limits on a range of attributes of the video. these attributes include frame dimensions, image area in pixels, display and decode rates, average and maximum bit rates, and limits on the number of tiles and tile columns used in the encoding/decoding process. for example, level av1 level 2...
Web media technologies
today, there are a large number of apis available, as well as html elements, dom interfaces, and other features that make it possible to not only perform these tasks, but use media in tandem with other technologies to do truly remarkable things. this article lists the various apis with links to documentation you may find helpful in mastering them. references html these articles cover html features for media developers. <audio> the <audio> element is used to play audio in a web context. ...